Files
bl/logic/service/fight/effect/563_564.go
xinian afc67b0582
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix: 修正技能563和564的类型初始化
2026-03-21 00:27:12 +08:00

64 lines
1.4 KiB
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// {
// "id": 563,
// "argsNum": 1,
// "info": "命中后{0}回合内若对手受到特攻伤害则100%烧伤"
// },
//
// {
// "id": 564,
// "argsNum": 1,
// "info": "命中后{0}回合内若对手受到攻击伤害则100%烧伤"
// },
type Effect563 struct {
node.EffectNode
ptype info.EnumCategory
}
func (e *Effect563) OnSkill() bool {
rounds := int(e.Args()[0].IntPart())
e.Ctx().Opp.AddEffect(e.Ctx().Our, e.GenSub(&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,
})
}