Files
bl/logic/service/fight/effect/effect_69.go
xinian 875ad668aa
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 实现战斗效果逻辑和接口重构
2026-03-28 21:57:22 +08:00

40 lines
784 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"
)
// Effect 69: 下{0}回合对手使用体力药剂时效果变成减少相应的体力
type Effect69 struct {
node.EffectNode
}
type Effect69_sub struct {
node.EffectNode
}
func init() {
t := &Effect69{}
//t.Owner(true)
//t.Duration(5)
input.InitEffect(input.EffectType.Skill, 69, t)
}
func (e *Effect69) OnSkill() bool {
addSubEffect(e.Ctx().Our, e.Ctx().Opp, &e.EffectNode, &Effect69_sub{}, e.SideEffectArgs[0])
return true
}
func (e *Effect69_sub) Heal_Pre(f action.BattleActionI, t *int) bool {
if _, ok := f.(*action.UseItemAction); ok {
*t = -*t // 把t指向的值取反直接作用于外部变量
}
return true
}