对多个 boss 技能效果文件中的参数调用进行了统一调整,将原先直接使用 `e.Args()[index]` 的地方, 改为通过 `e.Args()[index].IntPart()` 或 `e.Args()[index]` 进行类型转换后再参与逻辑判断或数值计算。 同时修正了部分 HP 比较方式,由整型比较转为 decimal
40 lines
692 B
Go
40 lines
692 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{})
|
||
|
||
}
|
||
|
||
type Effect134 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect134) DamageFloor(t *info.DamageZone) bool {
|
||
if !e.Hit() {
|
||
return true
|
||
}
|
||
// 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
|
||
}
|