29 lines
565 B
Go
29 lines
565 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
// Effect 570: 免疫下{0}次受到的攻击
|
|
type Effect570 struct {
|
|
FixedDurationNeg1Arg0CountBase
|
|
}
|
|
|
|
func (e *Effect570) DamageLockEx(t *info.DamageZone) bool {
|
|
if e.remaining > 0 && t.Type == info.DamageType.Red {
|
|
t.Damage = alpacadecimal.Zero
|
|
e.remaining--
|
|
if e.remaining <= 0 {
|
|
e.Alive(false) // 效果结束
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 570, &Effect570{})
|
|
}
|