移除冗余的 Calculate_Pre 调用注释,优化技能命中判断流程。 将 SkillID 赋值操作移动至命中条件判断内部,确保仅在技能命中时记录。 注释掉部分不再使用的接口方法定义,保持代码整洁。
36 lines
599 B
Go
36 lines
599 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
|
||
"github.com/shopspring/decimal"
|
||
)
|
||
|
||
/**
|
||
* 如果此回合miss,则立即死亡
|
||
*/
|
||
type Effect72 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func init() {
|
||
ret := &Effect72{}
|
||
|
||
input.InitEffect(input.EffectType.Skill, 72, ret)
|
||
|
||
}
|
||
|
||
// 命中之后
|
||
func (e *Effect72) OnSkill() bool {
|
||
if !e.Hit() {
|
||
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.True,
|
||
Damage: decimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.Hp)),
|
||
})
|
||
}
|
||
|
||
return true
|
||
}
|