public void TestRandom()
        {
            ObjectNpcLocation.GenerateObject();
            string random = ObjectNpcLocation.GenerateObjectNpcLocation();

            Assert.IsTrue(random == "PersonName3" || random == "LocationName3" || random == "ObjectName4");
        }
Beispiel #2
0
 public Experiment()
 {
     this.Drama     = 5;
     this.QuestText = new List <string>()
     {
         "Experiment with ", "Perhaps you will find what it is good for."
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GenerateObjectLocation()
     };
 }
Beispiel #3
0
 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()
     };
 }
Beispiel #4
0
 public Repair()
 {
     this.Drama     = 2;
     this.QuestText = new List <string>()
     {
         "Repair the ", "It is badly damaged and it could be useful in the future."
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GenerateObjectLocation()
     };
 }
Beispiel #5
0
 public Gather()
 {
     this.Drama     = 1;
     this.QuestText = new List <string>()
     {
         "Gather the "
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GenerateObject()
     };
 }
Beispiel #6
0
 public Use()
 {
     this.Drama     = 1;
     this.QuestText = new List <string>()
     {
         "Use ", "on ", "to "
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GenerateObject(), ObjectNpcLocation.GenerateObjectNpcLocation()
     };
 }
Beispiel #7
0
 public Explore()
 {
     this.Drama     = 2;
     this.QuestText = new List <string>()
     {
         "Explore the ", "Getting to know the place might be useful."
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GenerateLocation()
     };
 }
Beispiel #8
0
 public Capture()
 {
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GeneratePerson()
     };
     this.QuestText = new List <string>()
     {
         "Capture "
     };
     this.Relationchange.Add(Vars[0], 0.7);
     this.Drama = 8;
 }
Beispiel #9
0
 public Defend()
 {
     this.Drama     = 8;
     this.QuestText = new List <string>()
     {
         "Defend the ", "He/She/It musn't be destroyed"
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GenerateObjectNpcLocation()
     };
     this.Relationchange.Add(Vars[0], 1.5);
 }
Beispiel #10
0
 public Escort()
 {
     this.Drama = 9;
     this.Vars  = new List <string>()
     {
         ObjectNpcLocation.GeneratePerson(), ObjectNpcLocation.GenerateLocation()
     };
     this.QuestText = new List <string>()
     {
         "Escort ", Vars[0] + " must reach the "
     };
     this.Relationchange.Add(Vars[0], 1.5);
 }
Beispiel #11
0
 public Listen()
 {
     this.Drama     = 3;
     this.QuestText = new List <string>()
     {
         "Listen to ", "He is well informed and I'm sure he will share his information."
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GeneratePerson()
     };
     this.Relationchange.Add(Vars[0], 1.1);
 }
Beispiel #12
0
 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);
 }
Beispiel #13
0
 public Spy()
 {
     this.Drama     = 8;
     this.QuestText = new List <string>()
     {
         "Spy as much as you can about "
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GenerateObjectNpc()
     };
     this.Relationchange.Add(Vars[0], 0.9);
 }
Beispiel #14
0
 public Stealth()
 {
     this.Drama     = 7;
     this.QuestText = new List <string>()
     {
         "It's important that noone will see you. Sneak up on ", "and "
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GeneratePerson()
     };
     this.Relationchange.Add(Vars[0], 0.9);
 }
Beispiel #15
0
 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);
 }
Beispiel #16
0
 public Report()
 {
     this.Drama     = 3;
     this.QuestText = new List <string>()
     {
         "Report to "
     };
     this.Vars = new List <string>()
     {
         ObjectNpcLocation.GeneratePerson()
     };
     this.Relationchange.Add(Vars[0], 1.1);
 }
Beispiel #17
0
        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;
            }
        }
Beispiel #18
0
        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
            }
        }
Beispiel #19
0
        public Kill(int depth, int maxDepth)
        {
            this.Drama = 10;
            int random = ObjectNpcLocation.random.Next(2);

            if (depth == maxDepth)
            {
                random = 0;
            }
            switch (random)
            {
            case 0:
                //Kill
                this.QuestText = new List <string>()
                {
                    "Kill ", ", have no mercy. It's a foul creature."
                };
                this.Vars = new List <string>()
                {
                    ObjectNpcLocation.GeneratePerson()
                };
                this.Relationchange.Add(Vars[0], 0);
                break;

            case 1:
                //go and kill
                depth++;
                Quest go = new GoTo(depth, maxDepth);
                this.QuestText = new List <string>()
                {
                    go.GenerateQuestText()
                };
                this.QuestText[0] += "Kill ";
                this.Vars          = new List <string>()
                {
                    ObjectNpcLocation.GeneratePerson()
                };
                this.QuestText.Add("Have no mercy. It's a foul creature.");
                this.Relationchange.Add(Vars[0], 0);
                break;
            }
        }
Beispiel #20
0
        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;
            }
        }
Beispiel #21
0
        public GoTo(int depth, int maxDepth)
        {
            this.Drama = 2;
            int random = ObjectNpcLocation.random.Next(3);

            if (depth == maxDepth)
            {
                random = 0;
            }
            switch (random)
            {
            case 0:
                this.Vars      = null;
                this.QuestText = new List <string> {
                    "Stay here/there and "
                };
                break;

            case 1:
                this.Vars = new List <string>()
                {
                    ObjectNpcLocation.GenerateNpcLocation()
                };
                this.QuestText = new List <string> {
                    "Wander around and find "
                };
                this.Relationchange.Add(Vars[0], 1.1);
                break;

            case 2:
                depth++;
                Quest q = new Learn(depth, maxDepth);
                this.Vars      = q.Vars;
                this.QuestText = q.QuestText;
                break;
            }
        }
 public void TestPerson()
 {
     Assert.AreEqual("PersonName0", ObjectNpcLocation.GeneratePerson());
     Assert.AreNotEqual("PersonName0", ObjectNpcLocation.GeneratePerson());
     Assert.AreEqual("PersonName2", ObjectNpcLocation.GeneratePerson());
 }
 public void TestObject()
 {
     Assert.AreEqual("ObjectName0", ObjectNpcLocation.GenerateObject());
     Assert.AreNotEqual("ObjectName0", ObjectNpcLocation.GenerateObject());
     Assert.AreEqual("ObjectName2", ObjectNpcLocation.GenerateObject());
 }
 public void TestLocation()
 {
     Assert.IsTrue("LocationName0" == ObjectNpcLocation.GenerateLocation());
     Assert.IsFalse("LocationName0" == ObjectNpcLocation.GenerateLocation());
     Assert.IsTrue("LocationName2" == ObjectNpcLocation.GenerateLocation());
 }
Beispiel #25
0
        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;
            }
        }