void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { Spell procSpell = eventInfo.GetProcSpell(); int? energize = procSpell.GetPowerTypeCostAmount(PowerType.Maelstrom); eventInfo.GetActor().CastSpell(eventInfo.GetActor(), SpellIds.AftershockEnergize, new CastSpellExtraArgs(energize != 0) .AddSpellMod(SpellValueMod.BasePoint0, energize.Value)); }
bool CheckEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) { Spell procSpell = eventInfo.GetProcSpell(); if (procSpell != null) { return(procSpell.HasPowerTypeCost(PowerType.HolyPower)); } return(false); }
bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo) { Spell procSpell = eventInfo.GetProcSpell(); if (procSpell != null) { int?cost = procSpell.GetPowerTypeCostAmount(PowerType.Maelstrom); if (cost.HasValue) { return(cost > 0 && RandomHelper.randChance(aurEff.GetAmount())); } } return(false); }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); var costs = eventInfo.GetProcSpell().GetPowerCost(); var m = costs.Find(cost => cost.Power == PowerType.Mana); if (m != null) { int mana = MathFunctions.CalculatePct(m.Amount, 35); if (mana > 0) { GetTarget().CastCustomSpell(SpellIds.ItemManaSurge, SpellValueMod.BasePoint0, mana, GetTarget(), true, null, aurEff); } } }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); var costs = eventInfo.GetProcSpell().GetPowerCost(); var m = costs.Find(cost => cost.Power == PowerType.Mana); if (m != null) { int mana = MathFunctions.CalculatePct(m.Amount, 35); if (mana > 0) { CastSpellExtraArgs args = new(aurEff); args.AddSpellMod(SpellValueMod.BasePoint0, mana); GetTarget().CastSpell(GetTarget(), SpellIds.ItemManaSurge, args); } } }
void HandleProc(AuraEffect aurEff, ProcEventInfo procInfo) { Spell procSpell = procInfo.GetProcSpell(); int amount = aurEff.GetAmount() * procSpell.GetPowerTypeCostAmount(PowerType.ComboPoints).Value * 1000; Unit target = GetTarget(); if (target != null) { Aura aura = target.GetAura(SpellIds.SliceAndDice); if (aura != null) { aura.SetDuration(aura.GetDuration() + amount); } else { CastSpellExtraArgs args = new(TriggerCastFlags.FullMask); args.AddSpellMod(SpellValueMod.Duration, amount); target.CastSpell(target, SpellIds.SliceAndDice, args); } } }
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo) { PreventDefaultAction(); Spell spell = eventInfo.GetProcSpell(); if (spell == null) { return; } Unit caster = eventInfo.GetActor(); var costs = spell.GetPowerCost(); var m = costs.First(cost => cost.Power == PowerType.Mana); if (m == null) { return; } int amount = MathFunctions.CalculatePct(m.Amount, aurEff.GetAmount()); caster.CastCustomSpell(SpellIds.Exhilarate, SpellValueMod.BasePoint0, amount, null, true, null, aurEff); }
bool CheckProc(ProcEventInfo eventInfo) { return(eventInfo.GetProcSpell() != null); }
bool HandleCheckProc(ProcEventInfo eventInfo) { Spell procSpell = eventInfo.GetProcSpell(); return(procSpell && procSpell.HasPowerTypeCost(PowerType.ComboPoints)); }