2025-09-24 22:29:19 +00:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/fight/info"
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 对方体力小于1/2时威力加倍
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
func init() {
|
2025-09-24 22:30:58 +00:00
|
|
|
input.InitEffect(input.EffectType.Skill, 2, &Effect2{
|
2025-09-24 22:29:19 +00:00
|
|
|
EffectNode: node.EffectNode{},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Effect2 struct {
|
|
|
|
|
node.EffectNode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (e *Effect2) BeforeSkill(opp *input.Input, skill *info.SkillEntity) {
|
2025-09-24 23:14:27 +00:00
|
|
|
opp.Prop(e.Input, func() { //我方取敌方防御
|
|
|
|
|
if opp.CurrentPet.Info.Hp < (opp.CurrentPet.Info.MaxHp / 2) {
|
|
|
|
|
skill.Power *= 2
|
2025-09-24 22:29:19 +00:00
|
|
|
|
2025-09-24 23:14:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
2025-09-24 22:29:19 +00:00
|
|
|
|
|
|
|
|
}
|