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

52 lines
992 B
Go
Raw Normal View History

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
/**
* 如果先出手则受攻击时反弹200%的伤害给对手持续n回合
*/
func init() {
t := &Effect73{
EffectNode: node.EffectNode{},
}
2025-11-21 05:47:51 +00:00
input.InitEffect(input.EffectType.Skill, 73, t)
}
type Effect73 struct {
node.EffectNode
}
// 默认添加回合
func (e *Effect73) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
2025-11-21 05:47:51 +00:00
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0] - 1)
}
func (e *Effect73) Action_end_ex() bool {
if !e.IsFirst() {
return true
}
tt := &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Opp.SumDamage.Mul(alpacadecimal.NewFromInt(2)),
}
maxhp := e.Ctx().Our.CurrentPet.GetMaxHP().Mul(alpacadecimal.NewFromInt(30))
if tt.Damage.Cmp(maxhp) == 1 {
tt.Damage = maxhp
}
e.Ctx().Opp.Damage(e.Ctx().Our, tt)
return true
}