Files
bl/logic/service/fight/boss/NewSeIdx_403.go
2026-04-04 04:28:04 +08:00

46 lines
1.1 KiB
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/info"
"blazing/logic/service/fight/input"
)
// 403. n%几率令对手m回合内每回合减少r点体力a1: n, a2: m, a3: r
// TODO: 需要实现一个持续伤害的状态效果
type NewSel403 struct {
NewSel0
// 记录剩余减伤回合数
remainingTurns int
}
func (e *NewSel403) Action_end_ex() bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet[0].Info.CatchTime {
return true
}
if e.remainingTurns > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[2],
})
}
// n%几率触发
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if !success {
return true
}
e.remainingTurns = int(e.Args()[1].IntPart())
return true
}
func (e *NewSel403) TurnEnd() {
// 每回合减少减伤效果剩余回合数
if e.remainingTurns > 0 {
e.remainingTurns--
}
}
func init() {
input.InitEffect(input.EffectType.NewSel, 403, &NewSel403{})
}