refactor(fight/effect): 重构技能伤害计算逻辑,将伤害处理移至Effect0.OnSkill方法并优化效果调用流程
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/jinzhu/copier"
|
||||
"github.com/mohae/deepcopy"
|
||||
)
|
||||
|
||||
type Input struct {
|
||||
@@ -27,9 +26,9 @@ type Input struct {
|
||||
|
||||
func NewInput(c common.FightI, p common.PlayerI) *Input {
|
||||
ret := &Input{FightC: c, Player: p}
|
||||
t := ret.GetDamageEffect(0)
|
||||
ret.AddEffect(deepcopy.Copy(t).(Effect)) //添加默认基类,实现继承
|
||||
p.SetFightC(c) //给玩家设置战斗容器
|
||||
t, _ := Geteffect(4000000)
|
||||
ret.AddEffect(t) //添加默认基类,实现继承
|
||||
p.SetFightC(c) //给玩家设置战斗容器
|
||||
return ret
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user