feat(fight): 实现属性变化还原机制并优化属性操作逻辑

- 为多个效果(effect_38、effect_45、effect_51、effect_55、effect_56)添加 `Alive` 方法,
  用于在效果结束时还原精灵被修改的属性(如 MaxHp、Prop[0]、Prop[1]、PetInfo.Type)。
- 统一将对精灵属性类型的访问由 `PType` 修改为 `PetInfo.Type`,提升代码一致性与可维护性。
- 移除旧的回合开始/结束时手动保存和还原精灵信息的逻辑
This commit is contained in:
2025-11-15 00:15:09 +08:00
parent a86782b1ea
commit d73eb9eb26
12 changed files with 206 additions and 187 deletions

View File

@@ -41,8 +41,8 @@ type Effect interface {
// OnOwnerSwitchIn() bool // 所属玩家精灵出战时触发
// OnOwnerSwitchOut() bool // 所属玩家精灵下场时触发
Turn_End() //回合结束计算
PreBattleEnd() bool //战斗结束前
Turn_End() //回合结束计算
//PreBattleEnd() bool //战斗结束前
OnBattleEnd() bool //战斗结束
Prop_Befer(in *Input, prop, level int8, ptype info.EnumAbilityOpType) bool //锁定属性
//效果添加时候应该区分主动方和被动方来确认是主动添加的还是受击添加的