예제 #1
0
        public QuestExplore(int x, int y, QuestInterface passed, int diff)
        {
            this.next = passed;
            this.QuestType = Globals.QUEST_EXPLORE;
            this.progress = 0;
            this.required = 1;
            this.goalX = x;
            this.goalY = y;
            this.difficulty = diff;

            this.messages = new string[2][];
            this.messages[1] = new string[5];
            this.messages[1][0] = "           Boss Battle!";
            this.messages[1][1] = "";
            this.messages[1][2] = "      You have encountered the boss";
            this.messages[1][3] = "    guarding this level of the maze for the";
            this.messages[1][4] = "      FLYING SPAGHETTI CODE MONSTER";

            this.messages[0] = new string[4];
            this.messages[0][0] = "             You're trapped!";
            this.messages[0][1] = "      Find your way out before the";
            this.messages[0][2] = "     FLYING SPAGHETTI CODE MONSTER";
            this.messages[0][3] = " catches you and crashes your computer!";

            SubStateAbstract quest = new SubStateDisplayMessage(this.messages[0], 120, 450, 300, 300, StateHandler.State);
            StateHandler.State = quest;
        }
예제 #2
0
        private void Victory()
        {
            won = true;
            MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1];
            Color[] colors = new Color[2];
            colors[0] = Color.White;
            colors[1] = Color.White;

            int mX     = 400;
            int mY     = 100;
            int height = 100;
            int width  = 345;

            int exp = getExp();

            string[] attackMessage = new string[2];
            attackMessage[0] = "Victory!!";
            attackMessage[1] = "You have earned " + exp + " Exp!";

            for (int i = 0; i < 3; i++)
            {
                StateHandler.GetPC(i).addExp(exp);
            }

            SubStateDisplayMessage temp = new SubStateDisplayMessage(attackMessage, height, width, mX, mY, StateHandler.State);

            StateHandler.State = temp;

            ItemFactory.combatGenerate(MonsterList[0].Element, StateHandler.Level, MonsterList[0].Quality, MonsterList[0].Boss, "");
        }
예제 #3
0
        }//end DVC

        public QuestExplore(int x, int y, QuestInterface passed, int diff)
        {
            this.next       = passed;
            this.QuestType  = Globals.QUEST_EXPLORE;
            this.progress   = 0;
            this.required   = 1;
            this.goalX      = x;
            this.goalY      = y;
            this.difficulty = diff;

            this.messages       = new string[2][];
            this.messages[1]    = new string[5];
            this.messages[1][0] = "           Boss Battle!";
            this.messages[1][1] = "";
            this.messages[1][2] = "      You have encountered the boss";
            this.messages[1][3] = "    guarding this level of the maze for the";
            this.messages[1][4] = "      FLYING SPAGHETTI CODE MONSTER";

            this.messages[0]    = new string[4];
            this.messages[0][0] = "             You're trapped!";
            this.messages[0][1] = "      Find your way out before the";
            this.messages[0][2] = "     FLYING SPAGHETTI CODE MONSTER";
            this.messages[0][3] = " catches you and crashes your computer!";

            SubStateAbstract quest = new SubStateDisplayMessage(this.messages[0], 120, 450, 300, 300, StateHandler.State);

            StateHandler.State = quest;
        }//end EVC
예제 #4
0
 protected override void die()
 {
     string[] messages = new string[1];
     messages[0] = "You have defeated the test NPC!";
     SubStateAbstract message = new SubStateDisplayMessage(messages, 50, 405, 400, 400, StateHandler.State);
     StateHandler.State = message;
 }
예제 #5
0
        }//end EVC

        internal override void Complete()
        {
            Monster monster = MonsterFactory.randomMonster(StateHandler.Level, 0, Globals.MOB_WEAK, true);

            monster.Boss = true;

            StateHandler.State = new StateCombat(monster);

            StateHandler.Level++;

            MapFactory.GenerateNewMaze();
            StateInGame.locX   = MapFactory.startX;
            StateInGame.locY   = MapFactory.startY;
            StateInGame.change = true;

            SubStateAbstract quest = new SubStateDisplayMessage(this.messages[1], 120, 450, 400, 400, StateHandler.State);

            StateHandler.State = quest;
        }
예제 #6
0
        public override void action(Monster parent)
        {
            MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1];
            Color[] colors = new Color[1];
            colors[0] = Color.White;

            int mX = 400;
            int mY = 100;
            int height = 100;
            int width = 345;

            string[] attackMessage = new string[1];
            attackMessage[0] = "Water Attack!";

            SubStateDisplayMessage temp = new SubStateDisplayMessage(attackMessage, height, width, mX, mY, StateHandler.State);
            StateHandler.State = temp;

            parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_WATER, "water attack", 0);
        }
        }//end DVC

        public QuestCombatTESTING(int x, int y, QuestInterface passed, int diff)
        {
            this.next      = passed;
            this.QuestType = Globals.QUEST_EXPLORE;
            this.progress  = 0;
            this.required  = 1;
            this.goalX     = x;
            this.goalY     = y;

            this.messages       = new string[2][];
            this.messages[1]    = new string[8];
            this.messages[1][0] = "             Congratulations!";
            this.messages[1][1] = "";
            this.messages[1][2] = "         You have beaten the ambush";
            this.messages[1][3] = "             and thwarted the";
            this.messages[1][4] = "      FLYING SPAGHETTI CODE MONSTER";
            this.messages[1][5] = "";
            this.messages[1][6] = "";
            this.messages[1][7] = "Press [R] to generate a new maze to escape!";

            this.messages[0]    = new string[4];
            this.messages[0][0] = "          You've been ambushed!";
            this.messages[0][1] = "     Fight your way out before the";
            this.messages[0][2] = "     FLYING SPAGHETTI CODE MONSTER";
            this.messages[0][3] = " catches you and crashes your computer!";

            Monster monster = MonsterFactory.randomMonster(StateHandler.Level, 0, Globals.MOB_WEAK, true);

            monster.Boss = true;

            StateHandler.State = new StateCombat(monster);

            StateHandler.Level++;

            MapFactory.GenerateNewMaze();
            StateInGame.locX   = MapFactory.startX;
            StateInGame.locY   = MapFactory.startY;
            StateInGame.change = true;

            SubStateAbstract quest = new SubStateDisplayMessage(this.messages[0], 120, 450, 300, 300, StateHandler.State);

            StateHandler.State = quest;
        }//end EVC
예제 #8
0
        public QuestCombatTESTING(int x, int y, QuestInterface passed, int diff)
        {
            this.next = passed;
            this.QuestType = Globals.QUEST_EXPLORE;
            this.progress = 0;
            this.required = 1;
            this.goalX = x;
            this.goalY = y;

            this.messages = new string[2][];
            this.messages[1] = new string[8];
            this.messages[1][0] = "             Congratulations!";
            this.messages[1][1] = "";
            this.messages[1][2] = "         You have beaten the ambush";
            this.messages[1][3] = "             and thwarted the";
            this.messages[1][4] = "      FLYING SPAGHETTI CODE MONSTER";
            this.messages[1][5] = "";
            this.messages[1][6] = "";
            this.messages[1][7] = "Press [R] to generate a new maze to escape!";

            this.messages[0] = new string[4];
            this.messages[0][0] = "          You've been ambushed!";
            this.messages[0][1] = "     Fight your way out before the";
            this.messages[0][2] = "     FLYING SPAGHETTI CODE MONSTER";
            this.messages[0][3] = " catches you and crashes your computer!";

            Monster monster = MonsterFactory.randomMonster(StateHandler.Level, 0, Globals.MOB_WEAK, true);

            monster.Boss = true;

            StateHandler.State = new StateCombat(monster);

            StateHandler.Level++;

            MapFactory.GenerateNewMaze();
            StateInGame.locX = MapFactory.startX;
            StateInGame.locY = MapFactory.startY;
            StateInGame.change = true;

            SubStateAbstract quest = new SubStateDisplayMessage(this.messages[0], 120, 450, 300, 300, StateHandler.State);
            StateHandler.State = quest;
        }
예제 #9
0
        public override void action(Monster parent)
        {
            MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1];
            Color[] colors = new Color[1];
            colors[0] = Color.White;

            int mX     = 400;
            int mY     = 100;
            int height = 100;
            int width  = 345;

            string[] attackMessage = new string[1];
            attackMessage[0] = "Water Attack!";

            SubStateDisplayMessage temp = new SubStateDisplayMessage(attackMessage, height, width, mX, mY, StateHandler.State);

            StateHandler.State = temp;

            parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_WATER, "water attack", 0);
        }
예제 #10
0
        private void Defeat()
        {
            lost = true;
            StateAbstract title = new StateTitleScreen();

            MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1];
            Color[] colors = new Color[2];
            colors[0] = Color.White;
            colors[1] = Color.White;

            int mX     = 400;
            int mY     = 100;
            int height = 100;
            int width  = 345;

            string[] attackMessage = new string[2];
            attackMessage[0] = "Game Over!!";
            attackMessage[1] = "The Flying Spaghetti Code Monster has triumphed!";

            SubStateDisplayMessage temp = new SubStateDisplayMessage(attackMessage, height, width, mX, mY, StateHandler.State);

            StateHandler.State = temp;
        }
예제 #11
0
        internal static void combatGenerate(int specials, int level, int mobquality, bool boss, string name)
        {
            int          quality;
            ItemAbstract test = null;

            int chance = Globals.Random(0, 100);
            int min;

            switch (mobquality)
            {
            case Globals.MOB_WEAK:
                min = 70;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_COMMON;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_TRASH;
                }
                break;

            case Globals.MOB_NORMAL:
                min = 60;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_UNCOMMON;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_COMMON;
                }
                break;

            case Globals.MOB_HARD:
                min = 50;
                if (Globals.Random(0, 100) > 90)
                {
                    quality = Globals.ITEM_QUALITY_RARE;
                }
                else if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_UNCOMMON;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_COMMON;
                }
                break;

            case Globals.MOB_VERY_HARD:
                min = 40;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_RARE;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_UNCOMMON;
                }
                break;

            case Globals.MOB_INSANE:
                min = 30;
                if (Globals.Random(0, 100) > 50)
                {
                    quality = Globals.ITEM_QUALITY_EPIC;
                }
                else
                {
                    quality = Globals.ITEM_QUALITY_MASTERWORK;
                }
                break;

            case Globals.MOB_BOSS:
                min     = 20;
                quality = Globals.ITEM_QUALITY_LEGENDARY;
                break;

            case Globals.MOB_SPECIAL:
            default:                               // Default means it's GREATER than MOB_SPECIAL.
                min     = 0;
                quality = Globals.ITEM_QUALITY_MYTHICAL;
                break;
            }

            if (boss)
            {
                min    = 0;
                level += 2;
            }

            if (chance < min)
            {
                return;
            }

            test = generateItem(specials, level, quality, "");

            string[] temp = new string[1];
            temp[0] = "You have acquired a " + test.Name;

            SubStateDisplayMessage message = new SubStateDisplayMessage(temp, 50, 400, 350, 350, StateHandler.State);

            StateHandler.State = message;
        }
예제 #12
0
 protected void displayMessage(int i, int height, int width, int x, int y)
 {
     SubStateAbstract message = new SubStateDisplayMessage(messages[i], height, width, x, y, StateHandler.State);
     StateHandler.State = message;
 }
예제 #13
0
        private void Victory()
        {
            won = true;
            MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1];
            Color[] colors = new Color[2];
            colors[0] = Color.White;
            colors[1] = Color.White;

            int mX = 400;
            int mY = 100;
            int height = 100;
            int width = 345;

            int exp = getExp();

            string[] attackMessage = new string[2];
            attackMessage[0] = "Victory!!";
            attackMessage[1] = "You have earned " + exp + " Exp!";

            for (int i = 0; i < 3; i++)
                StateHandler.GetPC(i).addExp(exp);

            SubStateDisplayMessage temp = new SubStateDisplayMessage(attackMessage, height, width, mX, mY, StateHandler.State);
            StateHandler.State = temp;

            ItemFactory.combatGenerate(MonsterList[0].Element, StateHandler.Level, MonsterList[0].Quality, MonsterList[0].Boss, "");
        }
예제 #14
0
        private void Defeat()
        {
            lost = true;
            StateAbstract title = new StateTitleScreen();

            MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1];
            Color[] colors = new Color[2];
            colors[0] = Color.White;
            colors[1] = Color.White;

            int mX = 400;
            int mY = 100;
            int height = 100;
            int width = 345;

            string[] attackMessage = new string[2];
            attackMessage[0] = "Game Over!!";
            attackMessage[1] = "The Flying Spaghetti Code Monster has triumphed!";

            SubStateDisplayMessage temp = new SubStateDisplayMessage(attackMessage, height, width, mX, mY, StateHandler.State);
            StateHandler.State = temp;
        }
예제 #15
0
        internal static void combatGenerate(int specials, int level, int mobquality, bool boss, string name)
        {
            int quality;
            ItemAbstract test = null;

            int chance = Globals.Random(0, 100);
            int min;

            switch (mobquality)
            {
                case Globals.MOB_WEAK:
                    min = 70;
                    if (Globals.Random(0, 100) > 50)
                        quality = Globals.ITEM_QUALITY_COMMON;
                    else
                        quality = Globals.ITEM_QUALITY_TRASH;
                    break;
                case Globals.MOB_NORMAL:
                    min = 60;
                    if (Globals.Random(0, 100) > 50)
                        quality = Globals.ITEM_QUALITY_UNCOMMON;
                    else
                        quality = Globals.ITEM_QUALITY_COMMON;
                    break;
                case Globals.MOB_HARD:
                    min = 50;
                    if (Globals.Random(0, 100) > 90)
                        quality = Globals.ITEM_QUALITY_RARE;
                    else if (Globals.Random(0, 100) > 50)
                        quality = Globals.ITEM_QUALITY_UNCOMMON;
                    else
                        quality = Globals.ITEM_QUALITY_COMMON;
                    break;
                case Globals.MOB_VERY_HARD:
                    min = 40;
                    if (Globals.Random(0, 100) > 50)
                        quality = Globals.ITEM_QUALITY_RARE;
                    else
                        quality = Globals.ITEM_QUALITY_UNCOMMON;
                    break;
                case Globals.MOB_INSANE:
                    min = 30;
                    if (Globals.Random(0, 100) > 50)
                        quality = Globals.ITEM_QUALITY_EPIC;
                    else
                        quality = Globals.ITEM_QUALITY_MASTERWORK;
                    break;
                case Globals.MOB_BOSS:
                    min = 20;
                    quality = Globals.ITEM_QUALITY_LEGENDARY;
                    break;
                case Globals.MOB_SPECIAL: default: // Default means it's GREATER than MOB_SPECIAL.
                    min = 0;
                    quality = Globals.ITEM_QUALITY_MYTHICAL;
                    break;
            }

            if (boss)
            {
                min = 0;
                level += 2;
            }

            if (chance < min)
                return;

            test = generateItem(specials, level, quality, "");

            string[] temp = new string[1];
            temp[0] = "You have acquired a " + test.Name;

            SubStateDisplayMessage message = new SubStateDisplayMessage(temp, 50, 400, 350, 350, StateHandler.State);
            StateHandler.State = message;
        }
예제 #16
0
        protected void displayMessage(int i, int height, int width, int x, int y)
        {
            SubStateAbstract message = new SubStateDisplayMessage(messages[i], height, width, x, y, StateHandler.State);

            StateHandler.State = message;
        }
        }//end EVC

        internal override void Complete()
        {
            SubStateAbstract quest = new SubStateDisplayMessage(this.messages[1], 150, 500, 300, 300, StateHandler.State);

            StateHandler.State = quest;
        }
예제 #18
0
        internal override void Complete()
        {
            Monster monster = MonsterFactory.randomMonster(StateHandler.Level, 0, Globals.MOB_WEAK, true);

            monster.Boss = true;

            StateHandler.State = new StateCombat(monster);

            StateHandler.Level++;

            MapFactory.GenerateNewMaze();
            StateInGame.locX = MapFactory.startX;
            StateInGame.locY = MapFactory.startY;
            StateInGame.change = true;

            SubStateAbstract quest = new SubStateDisplayMessage(this.messages[1], 120, 450, 400, 400, StateHandler.State);
            StateHandler.State = quest;
        }
예제 #19
0
 internal override void Complete()
 {
     SubStateAbstract quest = new SubStateDisplayMessage(this.messages[1], 150, 500, 300, 300, StateHandler.State);
     StateHandler.State = quest;
 }