Files
bl/logic/service/fight/effect/525.go
xinian a2e4ec867c
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
feat: 新增技能效果525、530、550、558、565
2026-03-17 14:35:06 +08:00

32 lines
701 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 525 - {0}回合内有{1}%概率免疫对手的攻击伤害
type Effect525 struct {
node.EffectNode
}
func (e *Effect525) DamageLockEx(t *info.DamageZone) bool {
success, _, _ := e.Input.Player.Roll(int(e.SideEffectArgs[1]), 100)
if success { // 先出手
t.Damage = alpacadecimal.Zero
}
return true
}
func (e *Effect525) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 525, &Effect525{})
}