public override void revert(CampaignState s) { Character c = s.getCharacter(this.charId); foreach (AttributeMod m in this.modifications) { m.revert(c); } }
public Campaign(String name, String gm, String calendar, String ruleset) { this.name = name; this.players = new Dictionary <string, Player>(); this.gm = this.addPlayer(gm); this.calendarName = calendar; this.calendar = Calendars.newCalendar(this.calendarName); this.rulesetName = ruleset; this.ruleset = Rulesets.newRuleset(this.rulesetName); this.now = this.calendar.defaultTimestamp(); this.state = new CampaignState(this.now); this.timeline = new SortedDictionary <Timestamp, List <Event> >(); }
public virtual void revert(CampaignState s, bool doVirtual = false) { if ((this.isVirtual) && (!doVirtual)) { return; } if (this.results == null) { return; } foreach (EventResult res in this.results) { if (res.subEvent != null) { res.subEvent.revert(s, doVirtual); } res.revert(s); } }
public override void revert(CampaignState s) { this.charId = s.addCharacter(this.character); }
public override void apply(CampaignState s) { this.character = s.getCharacter(this.charId); s.removeCharacter(this.charId); }
public override void revert(CampaignState s) { s.removeCharacter(this.charId); }
public abstract void revert(CampaignState s);
public abstract void apply(CampaignState s);