Files
bl/logic/service/fight/effect/effect_72.go
xinian 937ddd0a97
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix: 修复宠物存活状态判定逻辑
移除 `NotAlive` 字段,改用 `Alive()` 方法通过 HP 判断存活状态,修正相关效果触发逻辑。
2026-03-17 13:34:50 +08:00

44 lines
700 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
/**
* 如果此回合miss则立即死亡
*/
type Effect72 struct {
node.EffectNode
}
func init() {
ret := &Effect72{}
input.InitEffect(input.EffectType.Skill, 72, ret)
}
// SkillHit 命中之后
func (e *Effect72) SkillHit() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().AttackTime != 0 {
return true
}
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.True,
Damage: alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.Hp)),
})
return true
}