对多个 boss 技能效果文件中的参数调用进行了统一调整,将原先直接使用 `e.Args()[index]` 的地方, 改为通过 `e.Args()[index].IntPart()` 或 `e.Args()[index]` 进行类型转换后再参与逻辑判断或数值计算。 同时修正了部分 HP 比较方式,由整型比较转为 decimal
37 lines
645 B
Go
37 lines
645 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
/**
|
|
* 造成的伤害不会低于n
|
|
*/
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 135, &Effect135{})
|
|
|
|
}
|
|
|
|
type Effect135 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect135) DamageFloor(t *info.DamageZone) bool {
|
|
if !e.Hit() {
|
|
return true
|
|
}
|
|
// fmt.Println("Effect135_old", t.Damage.IntPart())
|
|
if t.Type == info.DamageType.Red {
|
|
|
|
t.Damage = alpacadecimal.Max(t.Damage, e.Args()[0])
|
|
|
|
}
|
|
//fmt.Println("Effect135_new", t.Damage.IntPart())
|
|
return true
|
|
}
|