Esempio n. 1
0
 public override void BuildOptions(Architect builder)
 {
     myStat = builder.MyOutline.PickStat ();
     threshold = builder.CurrentStats[myStat] + (builder.MyNovel.Rand.Next (-2, 3));
     myOptions.Add (new Option (builder, 1)); //One option for passing
     myOptions.Add (new Option (builder, 2)); //One option for failing
 }
Esempio n. 2
0
		public Novel (Prosebreaker inbound) {
			rand = new Random ();
			words = inbound.Words;
			firstWords = inbound.FirstWords;
			crossReference = inbound.CrossReference;
			grammars = inbound.Grammars;
			string statReport = "";
			int charCount = 0;

			Console.WriteLine ("Building a novel.");

			foreach (DiscoveredChar thisChar in inbound.DiscoveredChars.Values) {
				thisChar.ResolvePronouns ();
			}

			characters.AddRange (inbound.DiscoveredChars.Values);

			foreach (DiscoveredChar thisChar in characters) {
				charCount++;
				thisChar.Number = charCount;
			}

			for (int i = 0; i < 4; i++) {
				charCount++;
				characters.Add (new Character (charCount));
			}

			for (int i = 0; i < 4; i++) {
				bool duplicate = false;
				Stat stat;

				stat = new Stat (crossReference [Vocabulary.SpeechPart.Adjective], rand);

				foreach (Stat thisStat in stats) {
					if (stat.Name == thisStat.Name) {
						duplicate = true;
					}
				}

				if (!duplicate) {
					stats.Add (stat);
					if (stat.Opposed == null) {
						statReport = (statReport + stat.Name + " ");
					}
					else {
						statReport = (statReport + stat.Name + " (vs " + stat.Opposed + ") ");
					}
				}
			}
		}