2026-03-08 10:34:23 +08:00
|
|
|
|
package effect
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"blazing/logic/service/fight/input"
|
|
|
|
|
|
"blazing/logic/service/fight/node"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2026-03-28 21:57:22 +08:00
|
|
|
|
// Effect 149: 命中后,{0}%令对方{1},{2}%令对方{3}
|
2026-03-08 10:34:23 +08:00
|
|
|
|
type Effect149 struct {
|
|
|
|
|
|
node.EffectNode
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (e *Effect149) OnSkill() bool {
|
|
|
|
|
|
|
|
|
|
|
|
// n%令对方xx
|
|
|
|
|
|
firstChance := e.Args()[0].IntPart()
|
|
|
|
|
|
success1, _, _ := e.Input.Player.Roll(int(firstChance), 100)
|
|
|
|
|
|
if success1 {
|
|
|
|
|
|
effectType1 := int(e.Args()[2].IntPart()) // 第一个异常状态类型
|
|
|
|
|
|
|
|
|
|
|
|
statusEffect1 := e.Ctx().Our.InitEffect(input.EffectType.Status, effectType1)
|
|
|
|
|
|
if statusEffect1 != nil {
|
|
|
|
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect1)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// m%令对方XX
|
|
|
|
|
|
secondChance := e.Args()[1].IntPart()
|
|
|
|
|
|
success2, _, _ := e.Input.Player.Roll(int(secondChance), 100)
|
|
|
|
|
|
if success2 {
|
|
|
|
|
|
effectType2 := int(e.Args()[3].IntPart()) // 第二个异常状态类型
|
|
|
|
|
|
|
|
|
|
|
|
statusEffect2 := e.Ctx().Our.InitEffect(input.EffectType.Status, effectType2)
|
|
|
|
|
|
if statusEffect2 != nil {
|
|
|
|
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect2)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
input.InitEffect(input.EffectType.Skill, 149, &Effect149{})
|
|
|
|
|
|
|
|
|
|
|
|
}
|