public override void OnEventAboutToTrigger(RuleCalculateAbilityParams evt) { if (evt.Spellbook != Owner.GetSpellbook(Class)) { return; } if (OracleArchetypes.IsGrantedSpell(Owner, evt.Spell)) { evt.AddBonusConcentration(Bonus); } }
public override void OnEventAboutToTrigger(RuleApplyMetamagic evt) { if (evt.Spellbook != Owner.GetSpellbook(Class)) { return; } if (OracleArchetypes.IsGrantedSpell(Owner, evt.Spell)) { Log.Write($"Reduce cost of spell: {evt.Spell.name} by {Reduction}"); evt.ReduceCost(Reduction); } }
public override void OnEventAboutToTrigger(RuleSpellResistanceCheck evt) { if (evt.Ability.Type != AbilityType.Spell) { return; } // TODO: ideally we could check the spellbook used to cast the spell. var spellbook = Owner.GetSpellbook(Class); if (spellbook == null || !spellbook.IsKnown(evt.Ability)) { return; } if (OracleArchetypes.IsGrantedSpell(Owner, evt.Ability)) { evt.AdditionalSpellPenetration += Bonus; } }