refactor(fight/input): 重构效果获取逻辑,优化属性计算流程并新增GetPropEffect方法

This commit is contained in:
1
2025-09-23 18:46:51 +00:00
parent 5a023ccd1c
commit d2205fd3c5
2 changed files with 30 additions and 16 deletions

View File

@@ -26,7 +26,7 @@ type Input struct {
func NewInput(c common.FightI, p common.PlayerI) *Input {
ret := &Input{FightC: c, Player: p}
t, _ := Geteffect(4000000)
t := ret.GetDamageEffect(0)
ret.AddEffect(t) //添加默认基类,实现继承
p.SetFightC(c) //给玩家设置战斗容器
return ret