Files
bl/logic/service/fight/effect/effect_172.go
昔念 99ef152434
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
```
refactor(fight): 统一技能执行方法命名并修复战斗逻辑错误

- 将多个boss技能结构体中的OnSkill()方法重命名为Skill_Use()以保持一致性
- 修改fightc.go中的战斗回合逻辑,修复attacker和defender的执行顺序错误
- 将Effect126的TurnStart方法改为Skill_Use方法并返回bool值
- 为Effect499添加缺失的方法实现
- 移除effect_124_126.go中未
2026-03-09 17:42:52 +08:00

27 lines
588 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/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 172 - 2 若后出手则给予对方损伤的1/n会回复自己的体力
type Effect172 struct {
node.EffectNode
}
func (e *Effect172) Skill_Use() bool {
if e.IsFirst() {
return true
}
damage := e.Ctx().Opp.SumDamage
healAmount := damage.Div(e.Args()[0]) // 损伤的1/n
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 172, &Effect172{})
}