public override void ApplyBase(IStatContainer stats, IEventContainer events) { events.GetEvent(EventInfo.Identifier).Event.OnExecute += Explode; _damageMult = stats.AddStat(ExplosionDamageFactorInfo, DamageFactorBase * Coeffecient); _range = stats.AddStat(ExplosionRangeInfo, RangeBase); }
public override void RemoveStack(IStatContainer stats, IEventContainer events) { foreach (Element element in Stats) { stats.RemoveStatElement(element.Info.Identifier, element); } }
public override void ApplyStack(IStatContainer stats, IEventContainer events) { foreach (Element element in Stats) { stats.AddStatElement(element.Info.Identifier, new StatElement(element, element.Value * Coeffecient)); } }
public override void RemoveEffect(IModdable target) { IStatContainer container = target as IStatContainer; Stat stat = container.GetStat(Identifier); switch (Type) { case StatType.Additive: stat.RemoveAdditive(this); break; case StatType.Multiplicative: stat.RemoveMultiplicative(this); break; } }
public override void ApplyEffect(IModdable target) { _target = target; IStatContainer container = target as IStatContainer; Stat stat = container.GetStat(Identifier); //TODO: Consider having StatType be a member of Stat instead of StatMod, then handling how to add the stat in Stat. switch (Type) { case StatType.Additive: stat.AddAdditive(Value.Get() * Coeffecient.Get(), this); break; case StatType.Multiplicative: stat.AddMultiplicative(Value.Get() * Coeffecient.Get(), this); break; } }
public abstract void RemoveStack(IStatContainer stats, IEventContainer events);
public abstract void ApplyStack(IStatContainer stats, IEventContainer events);
public override void RemoveStack(IStatContainer stats, IEventContainer events) { stats.RemoveStatElement(ExplosionDamageFactorInfo.Identifier, this); stats.RemoveStatElement(ExplosionRangeInfo.Identifier, this); }
public override void RemoveBase(IStatContainer stats, IEventContainer events) { events.GetEvent(EventInfo.Identifier).Event.OnExecute -= Explode; }
public override void ApplyStack(IStatContainer stats, IEventContainer events) { stats.AddStatElement(ExplosionDamageFactorInfo.Identifier, new StatElement(this, DamageFactorStack * Coeffecient)); stats.AddStatElement(ExplosionRangeInfo.Identifier, new StatElement(this, RangeStack)); }
public ModContainer(IStatContainer stats, IEventContainer events) { _stats = stats; _events = events; }