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

36 lines
747 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.Ctx().Our, e.Ctx().Opp, &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{})
}