Beispiel #1
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 #2
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 #3
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;
            }
        }
 public void TestPerson()
 {
     Assert.AreEqual("PersonName0", ObjectNpcLocation.GeneratePerson());
     Assert.AreNotEqual("PersonName0", ObjectNpcLocation.GeneratePerson());
     Assert.AreEqual("PersonName2", ObjectNpcLocation.GeneratePerson());
 }