Files
bl/logic/service/fight/effect/effect_69.go

53 lines
956 B
Go
Raw Normal View History

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
/**
* 下n回合对手使用体力药剂时效果变成减少相应的体力
*/
type Effect69 struct {
node.EffectNode
}
type Effect69_sub struct {
node.EffectNode
}
func init() {
t := &Effect69{
EffectNode: node.EffectNode{},
}
//t.Owner(true)
//t.Duration(5)
input.InitEffect(input.EffectType.Skill, 69, t)
}
2025-11-11 05:54:24 +00:00
func (e *Effect69) OnSkill() bool {
t := &Effect69_sub{
EffectNode: node.EffectNode{},
}
tt := e.ID()
tt.SetEffectType(input.EffectType.Sub)
t.ID(tt)
t.SetArgs(e.Input, e.SideEffectArgs...)
t.Duration(e.SideEffectArgs[0])
e.Ctx().Opp.AddEffect(e.Ctx().Our, t)
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
}