Files
bl/logic/service/fight/effect/effect_79.go
昔念 55ff5c6119 ```
refactor(effect): 更新状态枚举类型为 EnumPetStatus

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

此外,清理了部分注释格式,并补充了关于被动效果不能被免疫的说明。
```
2025-11-14 00:26:34 +08:00

40 lines
856 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}