33 lines
738 B
Go
33 lines
738 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
)
|
||
|
||
// 56. 第n回合秒杀敌人(a1: 回合数)
|
||
type NewSel56 struct {
|
||
NewSel0
|
||
}
|
||
|
||
func (e *NewSel56) TurnEnd() {
|
||
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
|
||
if e.ID().GetCatchTime() != e.Ctx().Our.CurPet[0].Info.CatchTime {
|
||
return
|
||
}
|
||
|
||
// 获取当前回合数
|
||
r := e.Ctx().Our.FightC.GetOverInfo()
|
||
if r.Round == uint32(e.Args()[0].IntPart()) {
|
||
// 秒杀对方,将其体力降为0
|
||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.Fixed,
|
||
Damage: e.Ctx().Opp.CurPet[0].GetHP(),
|
||
})
|
||
}
|
||
}
|
||
|
||
func init() {
|
||
input.InitEffect(input.EffectType.NewSel, 56, &NewSel56{})
|
||
}
|