Files
bl/logic/service/fight/effect/effect_81.go

50 lines
875 B
Go
Raw Normal View History

2025-11-13 23:48:34 +08:00
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
//下n回合自身攻击技能必定命中
func init() {
input.InitEffect(input.EffectType.Skill, 81, &Effect81{})
}
type Effect81 struct {
node.EffectNode
can bool
}
func (e *Effect81) OnSkill() bool {
2025-11-13 23:48:34 +08:00
e.can = true
return true
}
func (e *Effect81) ActionStart(a, b *action.SelectSkillAction) bool {
2025-11-13 23:48:34 +08:00
if !e.can {
return true
}
//fmt.Println(e.Ctx().SkillEntity)
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.MustHit = 1
return true
}
func (e *Effect81) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
}