54 lines
1.2 KiB
Go
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,
|
|
})
|
|
}
|