39 lines
742 B
Go
39 lines
742 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
)
|
||
|
||
/**
|
||
* 若造成的伤害低于n,则所有技能的PP值提高m点
|
||
*/
|
||
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 134, &Effect134{})
|
||
|
||
}
|
||
|
||
// Effect 134: 若造成的伤害低于{0},则所有技能的PP值恢复{1}点
|
||
type Effect134 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect134) DamageFloor(t *info.DamageZone) bool {
|
||
|
||
// fmt.Println("Effect134_old", t.Damage.IntPart())
|
||
if t.Type == info.DamageType.Red {
|
||
|
||
is := t.Damage.Cmp(e.Args()[0])
|
||
if is == -1 {
|
||
|
||
e.Ctx().Our.HealPP(int(e.Args()[1].IntPart()))
|
||
|
||
}
|
||
|
||
}
|
||
//fmt.Println("Effect134_new", t.Damage.IntPart())
|
||
return true
|
||
}
|