fix(fight): 修复技能效果获取逻辑并调整伤害计算方式
-
This commit is contained in:
@@ -27,10 +27,11 @@ type Input struct {
|
||||
|
||||
func NewInput(c common.FightI, p common.PlayerI) *Input {
|
||||
ret := &Input{FightC: c, Player: p}
|
||||
t := ret.GetDamageEffect(0)
|
||||
ret.Effects = utils.NewOrderedMap[int, Effect]()
|
||||
t := GetDamageEffect(0)
|
||||
ret.AddEffect(t) //添加默认基类,实现继承
|
||||
p.SetFightC(c) //给玩家设置战斗容器
|
||||
ret.Effects = utils.NewOrderedMap[int, Effect]()
|
||||
|
||||
return ret
|
||||
|
||||
}
|
||||
@@ -72,7 +73,7 @@ func (i *Input) GetStatusBonus() float64 {
|
||||
maxBonus := 1.0 // 默认无状态倍率
|
||||
|
||||
for statusIdx := 0; statusIdx < 20; statusIdx++ {
|
||||
t, ok := i.GetStatusEffect(statusIdx)
|
||||
t, ok := GetStatusEffect(statusIdx)
|
||||
|
||||
// 检查状态是否存在(数组中值为1表示存在该状态)
|
||||
if ok && t.Stack() > 0 {
|
||||
|
||||
Reference in New Issue
Block a user