33 lines
640 B
Go
33 lines
640 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 408, &Effect408{})
|
|
input.InitEffect(input.EffectType.Skill, 463, &Effect408{})
|
|
}
|
|
|
|
// Effect 408: {0}回合内每回合所受的伤害减少{1}
|
|
type Effect408 struct {
|
|
RoundEffectSideArg0Base
|
|
}
|
|
|
|
func (e *Effect408) DamageSubEx(t *info.DamageZone) bool {
|
|
|
|
if t.Type != info.DamageType.Red {
|
|
return true
|
|
}
|
|
|
|
if t.Damage.Cmp(e.Args()[1]) > 0 {
|
|
t.Damage = t.Damage.Sub(e.Args()[1])
|
|
} else {
|
|
t.Damage = alpacadecimal.Zero
|
|
}
|
|
return true
|
|
}
|