public override void OnEventAboutToTrigger(RuleCalculateAbilityParams evt) { cost_to_pay = 0; if (!CanBeUsedOn(evt.Spell, evt.AbilityData)) { return; } cost_to_pay = calculate_cost(this.Owner.Unit); evt.AddMetamagic(Metamagic); }
public override void OnEventAboutToTrigger(RuleCalculateAbilityParams evt) { cost_to_pay = 0; if (!CanBeUsedOn(evt.Spell, evt.AbilityData)) { return; } cost_to_pay = 2 * (evt.Spellbook.GetSpellLevel(evt.Spell) + MetamagicHelper.DefaultCost(Metamagic)); evt.AddMetamagic(this.Metamagic); }