public void AddToBattle(Battle battle, int x, int y) { if (Battle != null) { throw new ArgumentException("I don't know what the f**k I'm doing"); } Battle = battle; OverTimeApplier = new OverTimeApplier(Battle, this); Place = Battle.TileSet[x, y]; Battle.Add(this); }
public ChannelingInstance(Battle battle, IEnumerable <Mod> mods, Skill skill, Tile place, Func <Tile> targetSelector) { Stats = new StatSet(); SkillUsageStats = new Dictionary <object, StatSet>(); Battle = battle; Battle.Add(this); Skill = skill; Place = place; TargetSelector = targetSelector; foreach (var m in mods) { m.Affect(Stats); } TurnFinished += (s, e) => Battle.Remove(this); TurnStarted += OnTurnStarted; }
public OverTimeApplier(Battle battle, Being target) { Target = target; battle.Add(this); }
public override void Affect() { base.Affect(); TurnStarted += (s, e) => UnAffect(); _Battle.Add(this); }