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

54 lines
1.2 KiB
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 563: 命中后{0}回合内若对手受到特攻伤害则100%烧伤
type Effect563 struct {
node.EffectNode
ptype info.EnumCategory
}
func (e *Effect563) OnSkill() bool {
rounds := int(e.Args()[0].IntPart())
addSubEffect(e.Ctx().Our, e.Ctx().Opp, &e.EffectNode, &Effect563_sub{
ptype: e.ptype,
}, rounds)
return true
}
// SpecialAttackBurnEffect 是一个临时效果,当对手受到特攻伤害时烧伤
type Effect563_sub struct {
node.EffectNode
ptype info.EnumCategory
}
func (e *Effect563_sub) Skill_Use_ex() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() != e.ptype {
return true
}
burnEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Burned))
if burnEffect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, burnEffect)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 563, &Effect563{
ptype: info.Category.SPECIAL,
})
input.InitEffect(input.EffectType.Skill, 564, &Effect563{
ptype: info.Category.PHYSICAL,
})
}