refactor(effect): 更新状态枚举类型为 EnumPetStatus

将多个技能效果文件中的 EnumBattleStatus 类型统一更新为 EnumPetStatus,
以更准确地反映其用途。同时修改了相关函数签名和变量声明。

此外,清理了部分注释格式,并补充了关于被动效果不能被免疫的说明。
```
This commit is contained in:
2025-11-14 00:26:34 +08:00
parent 3377c6f0a3
commit 55ff5c6119
16 changed files with 444 additions and 33 deletions

View File

@@ -0,0 +1,39 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
/**
* 损失1/2的体力提升自身的能力
*/
type Effect79 struct {
node.EffectNode
}
func init() {
input.InitEffect(input.EffectType.Skill, 79, &Effect79{})
}
// 命中之后
// 特攻+2速度+1命中+1
func (e *Effect79) OnSkill() bool {
if !e.Hit() {
return true
}
e.Ctx().Our.SetProp(e.Ctx().Our, 2, 2, info.AbilityOpType.ADD)
e.Ctx().Our.SetProp(e.Ctx().Our, 4, 1, info.AbilityOpType.ADD)
e.Ctx().Our.SetProp(e.Ctx().Our, 5, 1, info.AbilityOpType.ADD)
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: decimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.MaxHp)).Div(decimal.NewFromInt(2)),
})
return true
}