37 lines
843 B
Go
37 lines
843 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/action"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 539: 对手处于能力提升状态时先制额外+1且威力翻倍
|
|
type Effect539 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect539) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
|
|
if e.Ctx().Opp.HasPropADD() {
|
|
// 增加自身技能优先级
|
|
if sattack != nil && sattack.PlayerID == e.Ctx().Our.UserID && sattack.SkillEntity != nil {
|
|
sattack.SkillEntity.XML.Priority += 1
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
|
|
func (e *Effect539) SkillHit() bool {
|
|
if e.Ctx().SkillEntity == nil {
|
|
return true
|
|
}
|
|
if e.Ctx().Opp.HasPropADD() {
|
|
e.Ctx().SkillEntity.XML.Power *= 2
|
|
}
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 539, &Effect539{})
|
|
}
|