Files
bl/logic/service/fight/effect/440.go
xinian 78a68148ce
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
chore: update fight logic and effect implementations
2026-04-05 02:25:44 +08:00

36 lines
756 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/input"
"blazing/logic/service/fight/node"
)
// Effect 440: {0}回合内对手使用技能消耗的PP值变为{1}倍
type Effect440 struct {
node.EffectNode
}
func (e *Effect440) Skill_Use() bool {
// 创建一个延迟生效的效果,在下一回合开始生效
addSubEffect(e.CarrierInput(), e.TargetInput(), &e.EffectNode, &Effect440_sub{
m: int(e.Args()[1].IntPart()),
}, int(e.Args()[0].IntPart()))
return true
}
type Effect440_sub struct {
node.EffectNode
m int
}
func (e *Effect440_sub) HookPP(count *int) bool {
*count *= e.m // 把t指向的值取反直接作用于外部变量
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 440, &Effect440{})
}