2026-03-08 11:22:00 +08:00
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-28 21:57:22 +08:00
|
|
|
// Effect 169: {0}回合内每回合额外附加{1}%概率令对手{2}
|
2026-03-08 11:22:00 +08:00
|
|
|
type Effect169 struct {
|
2026-03-28 21:57:22 +08:00
|
|
|
RoundEffectArg0Base
|
2026-03-08 11:22:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (e *Effect169) OnSkill() bool {
|
|
|
|
|
|
|
|
|
|
chance := e.Args()[1].IntPart()
|
|
|
|
|
success, _, _ := e.Input.Player.Roll(int(chance), 100)
|
|
|
|
|
if success {
|
|
|
|
|
// 添加异常状态
|
|
|
|
|
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart())) // 以麻痹为例
|
|
|
|
|
if statusEffect != nil {
|
|
|
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 169, &Effect169{})
|
|
|
|
|
|
|
|
|
|
}
|