Interface IEffectHandler
- Namespace
- SurvivorsMaker.Core
- Assembly
- SurvivorsMaker.Core.dll
Rules for a custom effect, e.g. "+1 armor for every 5 max health". Register it in EffectHandlers under the id effects put in Handler.
public interface IEffectHandler
Methods
Apply(Effect, EffectStore)
Applies the effect. Return a record with handler: this so undo comes back here.
AppliedEffect Apply(Effect effect, EffectStore store)
Parameters
effectEffectstoreEffectStore
Returns
Undo(AppliedEffect, EffectStore)
Reverses this application using its captured token; do not recalculate from current unrelated state.
void Undo(AppliedEffect applied, EffectStore store)
Parameters
appliedAppliedEffectstoreEffectStore