feat: 实现战斗效果逻辑和接口重构
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-28 21:57:22 +08:00
committed by cnb
parent 0780eae582
commit 875ad668aa
332 changed files with 2062 additions and 1442 deletions

View File

@@ -6,10 +6,6 @@ import (
"blazing/logic/service/common"
"blazing/logic/service/fight/info"
"blazing/modules/player/model"
"math/rand"
"time"
"github.com/gogf/gf/v2/util/grand"
)
type baseplayer struct {
@@ -22,10 +18,8 @@ type baseplayer struct {
// NewPlayerCaptureContext 创建用户捕捉上下文(每次登录调用)
func newbaseplayer() baseplayer {
rng := rand.New(rand.NewSource(time.Now().UnixNano() + int64(grand.Intn(1000000))))
ret := baseplayer{}
ret.PlayerCaptureContext = &info.PlayerCaptureContext{
Random: rng,
Denominator: 1000,
DecayFactor: 0.10, // 15%衰减率
MinDecayNum: 1,