33 lines
654 B
Go
33 lines
654 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
|
||
"github.com/alpacahq/alpacadecimal"
|
||
)
|
||
|
||
// 488 - 若对手的体力小于400,则造成的伤害增加10%
|
||
type Effect488 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect488) Damage_Mul(t *info.DamageZone) bool {
|
||
if e.Ctx().SkillEntity == nil {
|
||
return true
|
||
}
|
||
|
||
opponentHp := e.Ctx().Opp.CurrentPet.GetHP()
|
||
|
||
if opponentHp.Cmp(alpacadecimal.NewFromInt(400)) < 0 {
|
||
t.Damage = t.Damage.Mul(alpacadecimal.NewFromFloat(1.1))
|
||
}
|
||
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 488, &Effect488{})
|
||
|
||
}
|