移除冗余的 Calculate_Pre 调用注释,优化技能命中判断流程。 将 SkillID 赋值操作移动至命中条件判断内部,确保仅在技能命中时记录。 注释掉部分不再使用的接口方法定义,保持代码整洁。
37 lines
663 B
Go
37 lines
663 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
/**
|
|
* 造成的伤害不会低于n
|
|
*/
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 135, &Effect135{})
|
|
|
|
}
|
|
|
|
type Effect135 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect135) Damage_Floor(t *info.DamageZone) bool {
|
|
if !e.Hit() {
|
|
return true
|
|
}
|
|
// fmt.Println("Effect135_old", t.Damage.IntPart())
|
|
if t.Type == info.DamageType.Red {
|
|
|
|
t.Damage = decimal.Max(t.Damage, decimal.NewFromInt(int64(e.Args()[0])))
|
|
|
|
}
|
|
//fmt.Println("Effect135_new", t.Damage.IntPart())
|
|
return true
|
|
}
|