Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
refactor(fight): 移除能力操作类型枚举并简化属性设置方法 移除了 info.EnumAbilityOpType 枚举类型及其相关常量定义, 重构了 SetProp 方法调用,不再传递操作类型参数, 通过检查等级正负值来判断是增加还是减少属性, 减少了代码复杂度并统一了属性变更的处理逻辑。 ```
38 lines
862 B
Go
38 lines
862 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/input"
|
||
)
|
||
|
||
// 144. 重生 (hp和btl_maxhp 恢复到 maxhp + maxhp_adj, 技能PP值回满)(a1: 可重生次数)
|
||
// TODO: 实现重生 (hp和btl_maxhp 恢复到 maxhp + maxhp_adj, 技能PP值回满)(a1: 可重生次数)的核心逻辑
|
||
type NewSel144 struct {
|
||
NewSel0
|
||
count int
|
||
}
|
||
|
||
func (e *NewSel144) Action_end_ex() bool {
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
|
||
return true
|
||
}
|
||
|
||
if e.Ctx().Our.CurrentPet.Info.Hp == 0 {
|
||
if e.count >= int(e.Args()[0].IntPart()) {
|
||
return true
|
||
}
|
||
|
||
e.count++
|
||
|
||
e.Ctx().Our.CurrentPet.Info.Hp = e.Ctx().Our.CurrentPet.Info.MaxHp
|
||
e.Ctx().Our.HealPP(-1)
|
||
for i := 0; i < 6; i++ {
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 6)
|
||
}
|
||
}
|
||
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 144, &NewSel144{})
|
||
}
|