Files
bl/logic/service/fight/effect/169.go
昔念 6e95e014fa 1
2026-04-15 22:16:56 +08:00

33 lines
726 B
Go

package effect
import (
"blazing/logic/service/fight/input"
)
// Effect 169: {0}回合内每回合额外附加{1}%概率令对手{2}
type Effect169 struct {
RoundEffectArg0Base
}
func (e *Effect169) OnSkill() bool {
chance := e.Args()[1].IntPart()
success, _, _ := e.Input.Player.Roll(int(chance), 100)
if success {
e.ForEachOpponentSlot(func(target *input.Input) bool {
if target == nil {
return true
}
statusEffect := e.CarrierInput().InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
if statusEffect != nil {
target.AddEffect(e.CarrierInput(), statusEffect)
}
return true
})
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 169, &Effect169{})
}