コード例 #1
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;
            }
        }
コード例 #2
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;
            }
        }
コード例 #3
0
ファイル: Steal.cs プロジェクト: Tarnium/Bakalarka
        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;
            }
        }