43 lines
868 B
Go
43 lines
868 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/action"
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 582: 若未击败对手则下{0}回合攻击必定致命一击
|
|
type Effect582 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect582) Skill_Use() bool {
|
|
if e.Ctx().Opp.CurPet[0].Info.Hp == 0 {
|
|
return true
|
|
}
|
|
|
|
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect582Sub{}, -1)
|
|
return true
|
|
}
|
|
|
|
type Effect582Sub struct {
|
|
RoundEffectArg0Base
|
|
}
|
|
|
|
func (e *Effect582Sub) ActionStart(a, b *action.SelectSkillAction) bool {
|
|
if e.Ctx().SkillEntity == nil {
|
|
return true
|
|
}
|
|
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
|
return true
|
|
}
|
|
|
|
e.Ctx().SkillEntity.XML.CritRate = 16
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 582, &Effect582{})
|
|
}
|