public StateAspect this[StateAspect comparisonState] { get { if (comparisonState.stateType == StateAspect.StateType.Authority) { return(authority); } else if (comparisonState.stateType == StateAspect.StateType.Suspicion) { return(suspicion); } else { return(alert); } } set { if (comparisonState.stateType == StateAspect.StateType.Authority) { authority = value; } else if (comparisonState.stateType == StateAspect.StateType.Suspicion) { suspicion = value; } else { alert = value; } } }
// The above are actually 'topologically' equivalent - both serve as a repository of named flags, specific to this run, which start out false // but could become true as the result of the hacking run. Stuff like paydata, cameras-spoofed, or voiceprint-acquired. The only // real difference is conceptual, for the simplicity of GMs and so forth, and some small difference if you want to know if *all* // of the objectives have been met (ditto 'at least one' and so forth). public HackingAttemptState() { authority = Authority.AuthPrompt; suspicion = Suspicion.None; alert = Alert.None; Objectives = new Dictionary <string, bool>(); Conditions = new Dictionary <string, bool>(); }
public IfStateIs(StateAspect benchmark, StateChangeCriterion criterion) { Benchmark = benchmark; Criterion = criterion; }
public ActionOpportunity IfStateIs(StateAspect benchmark, StateChangeCriterion criterion) { Criterion = new OpportunityCriteria.IfStateIs(benchmark, criterion); return(this); }
public StateChange(StateAspect changeTo, StateChangeCriterion constraint = null) { ChangeTo = changeTo; Constraint = constraint ?? StandardCriteria.ifPossible; }