27 lines
540 B
Go
27 lines
540 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
// Effect 525: {0}回合内有{1}%概率免疫对手的攻击伤害
|
|
type Effect525 struct {
|
|
RoundEffectArg0Base
|
|
}
|
|
|
|
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 init() {
|
|
input.InitEffect(input.EffectType.Skill, 525, &Effect525{})
|
|
|
|
}
|