Exemple #1
0
        public override void revert(CampaignState s)
        {
            Character c = s.getCharacter(this.charId);

            foreach (AttributeMod m in this.modifications)
            {
                m.revert(c);
            }
        }
Exemple #2
0
 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> >();
 }
Exemple #3
0
 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);
     }
 }
Exemple #4
0
 public override void revert(CampaignState s)
 {
     this.charId = s.addCharacter(this.character);
 }
Exemple #5
0
 public override void apply(CampaignState s)
 {
     this.character = s.getCharacter(this.charId);
     s.removeCharacter(this.charId);
 }
Exemple #6
0
 public override void revert(CampaignState s)
 {
     s.removeCharacter(this.charId);
 }
Exemple #7
0
 public abstract void revert(CampaignState s);
Exemple #8
0
 public abstract void apply(CampaignState s);