Files
bl/logic/service/fight/effect/169.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

30 lines
656 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 {
// 添加异常状态
statusEffect := e.CarrierInput().InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart())) // 以麻痹为例
if statusEffect != nil {
e.TargetInput().AddEffect(e.CarrierInput(), statusEffect)
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 169, &Effect169{})
}