public virtual void EndEffectAction(Creature target) { Debug.Log("end effect: " + this.name); BasicEffectContainer container = GetEffectContainer(target) as BasicEffectContainer; effectAction.EndEffect(target, container.ChangeinTargetValue); container.ChangeinTargetValue = 0; container.valueAfterProtections = 0; }
private void RemoveEffectAction(Creature target) { for (int i = 0; i < target.activeBasicEffects.Count; i++) { BasicEffectContainer container = target.activeBasicEffects [i]; if (container.basicEffect.effectAction == actionToRemove) { container.basicEffect.EndEffect(target); } } for (int j = 0; j < target.activeTimedEffects.Count; j++) { TimedEffectContainer container = target.activeTimedEffects [j]; if (container.timedEffect.effectAction == actionToRemove) { container.timedEffect.EndEffect(target); } } }
public virtual void LogChangeInTargetValue(Creature target, float value) { BasicEffectContainer container = (GetEffectContainer(target)) as BasicEffectContainer; container.ChangeinTargetValue = value; }
private float GetFinalValue(Creature target) { BasicEffectContainer container = (GetEffectContainer(target)) as BasicEffectContainer; return(container.valueAfterProtections); }