refactor(fight/effect): 重构技能效果处理逻辑,统一使用DamageZone结构管理伤害值,新增Effect20疲惫效果和先/后手威力翻倍效果
This commit is contained in:
@@ -18,14 +18,17 @@ type Input struct {
|
||||
FightC common.FightI
|
||||
// info.BattleActionI
|
||||
Effects *utils.OrderedMap[int, Effect] //effects 实际上全局就是effect无限回合 //effects容器 技能的
|
||||
DamageZone map[info.EnumDamageType]int //伤害容器
|
||||
First bool //是否先手
|
||||
DamageZone struct {
|
||||
Attack int //攻击伤害
|
||||
OldAttack int //攻击伤害被挡前伤害记录
|
||||
} //伤害容器
|
||||
First bool //是否先手
|
||||
}
|
||||
|
||||
func NewInput(c common.FightI, p common.PlayerI) *Input {
|
||||
ret := &Input{FightC: c, Player: p}
|
||||
ret.Effects = utils.NewOrderedMap[int, Effect]()
|
||||
ret.DamageZone = make(map[info.EnumDamageType]int)
|
||||
|
||||
// t := Geteffect(EffectType.Damage, 0)
|
||||
// t.Effect.SetArgs(ret)
|
||||
// ret.AddEffect(t) //添加默认基类,实现继承
|
||||
|
||||
Reference in New Issue
Block a user