30 lines
600 B
Go
30 lines
600 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
// 25. 如果 hp 被打成 0, 则立刻增加一些hp
|
|
// TODO: 实现如果 hp 被打成 0, 则立刻增加一些hp的核心逻辑
|
|
type NewSel25 struct {
|
|
NewSel0
|
|
}
|
|
|
|
func (e *NewSel25) Action_end_ex() bool {
|
|
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
|
return true
|
|
}
|
|
if e.Ctx().Our.CurPet[0].Info.Hp == 0 {
|
|
|
|
e.Ctx().Our.Heal(e.Ctx().Our, nil, alpacadecimal.NewFromInt(1))
|
|
|
|
}
|
|
|
|
return true
|
|
}
|
|
func init() {
|
|
input.InitEffect(input.EffectType.NewSel, 25, &NewSel25{})
|
|
}
|