public void TestRandom() { ObjectNpcLocation.GenerateObject(); string random = ObjectNpcLocation.GenerateObjectNpcLocation(); Assert.IsTrue(random == "PersonName3" || random == "LocationName3" || random == "ObjectName4"); }
public Gather() { this.Drama = 1; this.QuestText = new List <string>() { "Gather the " }; this.Vars = new List <string>() { ObjectNpcLocation.GenerateObject() }; }
public Exchange() { this.Drama = 4; this.QuestText = new List <string>() { "Exchange ", "for ", "I'm sure we can find good use for it." }; this.Vars = new List <string>() { ObjectNpcLocation.GenerateObject(), ObjectNpcLocation.GenerateObject() }; }
public Use() { this.Drama = 1; this.QuestText = new List <string>() { "Use ", "on ", "to " }; this.Vars = new List <string>() { ObjectNpcLocation.GenerateObject(), ObjectNpcLocation.GenerateObjectNpcLocation() }; }
public Give() { this.Drama = 3; this.QuestText = new List <string>() { "Give the ", "to " }; this.Vars = new List <string>() { ObjectNpcLocation.GenerateObject(), ObjectNpcLocation.GeneratePerson() }; this.Relationchange.Add(Vars[1], 1.2); }
public Take() { this.Drama = 3; this.QuestText = new List <string>() { "Take ", "from " }; this.Vars = new List <string>() { ObjectNpcLocation.GenerateObject(), ObjectNpcLocation.GenerateNpcLocation() }; this.Relationchange.Add(Vars[1], 0.95); }
public Get(int depth, int maxDepth) { int random = ObjectNpcLocation.random.Next(2); this.Drama = 4; if (depth == maxDepth) { random = 0; } switch (random) { //You have object case 0: this.Vars = new List <string>() { ObjectNpcLocation.GenerateObject() }; this.QuestText = new List <string> { "You should have " }; break; //Go to <Location> and take <Object> case 1: depth++; Quest q = new GoTo(depth, maxDepth); updateDrama(q.Drama); Quest g = new Gather(); updateDrama(g.Drama); this.QuestText = new List <string>() { q.GenerateQuestText() + g.QuestText[0] }; this.Vars = new List <string>() { g.Vars[0] }; break; case 2: depth++; Quest steal = new Steal(depth, maxDepth); this.Vars = steal.Vars; this.QuestText = steal.QuestText; updateDrama(steal.Drama); break; } }
public Learn(int depth, int maxDepth) { this.Drama = 2; int random = ObjectNpcLocation.random.Next(3); if (depth == maxDepth) { random = 0; } switch (random) { case 0: //You know this.Vars = null; this.QuestText = new List <string> { "Find out where to go to " }; break; case 1: //go then listen to someone depth++; Quest q = new GoTo(depth, maxDepth); this.Vars = q.Vars; this.QuestText = q.QuestText; string person = ObjectNpcLocation.GeneratePerson(); this.QuestText.Add("Listen to " + person + ". " + person + " knows where to find what you're looking for."); this.Relationchange.Add(person, 1.1); break; case 2: //Book with intel depth++; Quest q1 = new GoTo(depth, maxDepth); this.Vars = q1.Vars; this.QuestText = q1.QuestText; string book = ObjectNpcLocation.GenerateObject(); this.QuestText.Add("Read the book " + book + ". It contains all the intel you need to get where you need."); break; //to do - get something give to someone he will tell you where to go } }
public Damage() { this.Drama = 6; int random = ObjectNpcLocation.random.Next(3); switch (random) { case 0: //Item this.Vars = new List <string> { ObjectNpcLocation.GenerateObject() }; this.QuestText = new List <string> { "Damage " }; break; case 1: //Person this.Vars = new List <string> { ObjectNpcLocation.GeneratePerson() }; this.QuestText = new List <string> { "Fight " }; this.Relationchange.Add(Vars[0], 0.7); break; case 2: //Location this.Vars = new List <string> { ObjectNpcLocation.GenerateLocation() }; this.QuestText = new List <string> { "Vandalize " }; break; } }
public void TestObject() { Assert.AreEqual("ObjectName0", ObjectNpcLocation.GenerateObject()); Assert.AreNotEqual("ObjectName0", ObjectNpcLocation.GenerateObject()); Assert.AreEqual("ObjectName2", ObjectNpcLocation.GenerateObject()); }
public Steal(int depth, int maxDepth) { this.Drama = 7; int random = ObjectNpcLocation.random.Next(3); if (depth == maxDepth) { random = 2; } switch (random) { case 0: //Go sneak and steal depth++; Quest q = new GoTo(depth, maxDepth); this.Vars = new List <string>(); this.QuestText = new List <string>() { q.GenerateQuestText() }; depth++; Quest q1 = new Stealth(); this.QuestText[0] += q1.GenerateQuestText(); this.updateDrama(q1.Drama); Quest take = new Take(); take.Vars[1] = q1.Vars[0]; this.QuestText.Add(take.GenerateQuestText()); this.Relationchange.Add(q1.Vars[0], 0.9); this.updateDrama(take.Drama); this.updateDrama(q.Drama); break; case 1: //go kill take depth++; Quest go = new GoTo(depth, maxDepth); this.Vars = new List <string>(); this.QuestText = new List <string>() { go.GenerateQuestText() }; depth++; Quest kill = new Kill(depth, maxDepth); this.QuestText[0] += kill.GenerateQuestText(); Quest take1 = new Take(); take1.Vars[1] = kill.Vars[0]; this.QuestText.Add(take1.GenerateQuestText()); this.Relationchange.Add(kill.Vars[0], 0); this.updateDrama(go.Drama); this.updateDrama(kill.Drama); this.updateDrama(take1.Drama); break; case 2: //steal object from location this.QuestText = new List <string>() { "Steal ", "from " }; this.Vars = new List <string>() { ObjectNpcLocation.GenerateObject(), ObjectNpcLocation.GenerateLocation() }; break; } }