public static ConditionSpec.Builder AddAoESpellEndStandardHook(this ConditionSpec.Builder builder) { // adds a EK_S_Spell_End handler that: // 1. Ends particles for all spell objects // 2. RemoveSpellMod() return(builder.AddSignalHandler(D20DispatcherKey.SIG_Spell_End, SpellEffects.AoESpellRemove, 0)); }
// Removes the condition when the given signal is received public static ConditionSpec.Builder RemoveOnSignal(this ConditionSpec.Builder builder, D20DispatcherKey signal) { builder.AddSignalHandler(signal, (in DispatcherCallbackArgs evt) => evt.RemoveThisCondition()); return(builder); }