Files
bl/logic/service/fight/boss/NewSeIdx_79.go
昔念 b851ab9fdb ```
refactor(fight): 统一Action方法命名规范

将Action_start和Action_start_ex方法重命名为ActionStart和ActionStartEx,
使其符合Go语言驼峰命名规范。同时更新接口定义和所有相关调用处的方法名。

- 重命名Action_start为ActionStart
- 重命名Action_start_ex为ActionStartEx
- 更新interface.go中的方法定义
- 更新所有实现类中的方法签名
- 更新fightc.go中的方法
2026-01-05 23:00:42 +08:00

49 lines
1.0 KiB
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/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
)
// 79. 受到超过n的伤害时下一招威力翻倍a1: n
type NewSel79 struct {
NewSel0
triggered bool
}
func (e *NewSel79) DamageDivEx(t *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
// 检查受到的伤害是否超过阈值
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) > 0 {
// 标记本回合已触发,下次攻击威力翻倍
e.triggered = true
}
return true
}
func (e *NewSel79) ActionStart(a, b *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
// 如果上一回合被触发过,本回合攻击威力翻倍
if e.triggered {
e.Ctx().SkillEntity.Power = e.Ctx().SkillEntity.Power * 2
e.triggered = false
}
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 79, &NewSel79{})
}