Files
bl/logic/service/fight/effect/582.go
xinian 875ad668aa
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 实现战斗效果逻辑和接口重构
2026-03-28 21:57:22 +08:00

43 lines
869 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.CurrentPet.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{})
}