Files
bl/logic/service/fight/effect/462.go

34 lines
670 B
Go
Raw Normal View History

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// Effect 462: {0}回合内受攻击时反弹{1}点固定伤害
type Effect462 struct {
RoundEffectArg0Base
}
func (e *Effect462) Skill_Use_ex() bool {
// 反弹m点固定伤害
bounceDamage := alpacadecimal.NewFromInt(int64(e.Args()[1].IntPart()))
damageZone := &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: alpacadecimal.Min(e.Ctx().Opp.SumDamage, bounceDamage),
}
e.Ctx().Opp.Damage(e.Ctx().Our, damageZone)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 462, &Effect462{})
}