feat(boss-effect): 统一处理参数类型转换,提升数值比较与运算准确性
对多个 boss 技能效果文件中的参数调用进行了统一调整,将原先直接使用 `e.Args()[index]` 的地方, 改为通过 `e.Args()[index].IntPart()` 或 `e.Args()[index]` 进行类型转换后再参与逻辑判断或数值计算。 同时修正了部分 HP 比较方式,由整型比较转为 decimal
This commit is contained in:
@@ -3,6 +3,8 @@ package input
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
)
|
||||
|
||||
type Effect interface {
|
||||
@@ -23,12 +25,12 @@ type Effect interface {
|
||||
Damage_ADD(*info.DamageZone) bool // 攻击前触发 ,这时候就是+区间
|
||||
Damage_Mul(*info.DamageZone) bool // 攻击触发
|
||||
|
||||
Damage_Floor(*info.DamageZone) bool // 保底伤害
|
||||
Damage_DIV_ex(*info.DamageZone) bool //受击前触发 这时候就是百分比减伤区间
|
||||
Damage_SUB_ex(*info.DamageZone) bool // 受击触发 这时候就是点数减伤
|
||||
Damage_Lock(*info.DamageZone) bool //锁定伤害
|
||||
Damage_Lock_ex(*info.DamageZone) bool //被动方锁定伤害
|
||||
Damage_Shield(*info.DamageZone) bool // 护盾值变化时触发
|
||||
DamageFloor(*info.DamageZone) bool // 保底伤害
|
||||
Damage_DIV_ex(*info.DamageZone) bool //受击前触发 这时候就是百分比减伤区间
|
||||
Damage_SUB_ex(*info.DamageZone) bool // 受击触发 这时候就是点数减伤
|
||||
DamageLock(*info.DamageZone) bool //锁定伤害
|
||||
DamageLock_ex(*info.DamageZone) bool //被动方锁定伤害
|
||||
Damage_Shield(*info.DamageZone) bool // 护盾值变化时触发
|
||||
//Damage_Use() bool // 伤害作用
|
||||
Skill_Use_ex() bool //技能PP减少节点
|
||||
Skill_Useed() bool //技能PP减少节点
|
||||
@@ -51,7 +53,7 @@ type Effect interface {
|
||||
//boss是进入防守方才被添加抵御异常状态效果的,boss免疫的实质是给挑战者挂载一个阻止添加给对手的debuff
|
||||
EFFect_Befer(in *Input, effEffect Effect) bool //属性免疫
|
||||
SetArgs(input *Input, param ...int)
|
||||
Args() []int
|
||||
Args() []alpacadecimal.Decimal
|
||||
// 治疗相关触发
|
||||
Heal_Pre(action.BattleActionI, *int) bool // 治疗前触发 回复翻倍效果
|
||||
//Heal(action.BattleActionI) bool // 治疗生效时触发 药剂反噬
|
||||
|
||||
Reference in New Issue
Block a user