public SubStateSlotMenuEquip(SubStateAbstract theparent, int thePC)
            : base(theparent)
        {
            PCid = thePC;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[4];
            menu         = new string[4];

            for (int i = 0; i < 4; i++)
            {
                if (StateHandler.GetPC(thePC).GetEquipment(i) == null)
                {
                    menu[i] = "Open";
                }
                else
                {
                    menu[i] = StateHandler.GetPC(thePC).GetEquipment(i).Name;
                }
                colors[i] = Color.DarkGray;
            }

            colors[0] = Color.White;

            mX     = 170;
            mY     = 60;
            width  = 760;
            height = 490;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        public SubStateConfirmEquipMenu(SubStateAbstract theparent, int xCoord, int yCoord, int thePC, int itemSlot, int itemLocation, int type)
            : base(theparent)
        {
            PCid     = thePC;
            slot     = itemSlot;
            itemID   = itemLocation;
            itemType = type;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[2];
            menu         = new string[2];

            menu[0] = "Yes";
            menu[1] = "No";

            colors[0] = Color.White;
            colors[1] = Color.DarkGray;

            mX     = xCoord;
            mY     = yCoord;
            width  = 27;
            height = 50;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        public SubStateOptionsMenu(StateAbstract theparent)
            : base(theparent)
        {
            int i;

            parent = theparent;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];

            colors = new Color[1];
            menu   = new string[colors.Length];

            colors[0] = Color.White;
            for (i = 1; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }

            menu[0] = "Difficulty";

            for (i = 1; i < menu.Length; i++)
            {
                menu[i] = "Option " + i;
            }

            mX     = 100;
            mY     = 45;
            width  = 900;
            height = 630;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true, true);
        }
        public SubStateDifficultySelect(StateAbstract theparent)
            : base(theparent)
        {
            int i;

            parent = theparent;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];

            colors = new Color[6];
            menu   = new string[6];

            menu[0] = "Child";
            menu[1] = "Youth";
            menu[2] = "Standard";
            menu[3] = "Challenging";
            menu[4] = "Expert";
            menu[5] = "Insane";

            for (i = 1; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }
            colors[0] = Color.White;

            mX     = 100;
            mY     = 45;
            width  = 900;
            height = 630;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true, true);
        }
예제 #5
0
        public SubStateCharSelectMenuRune(SubStateAbstract theparent)
            : base(theparent)
        {
            parent = theparent;

            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[3];
            menu         = new string[3];

            menu[0] = StateHandler.GetPC(0).Name;
            menu[1] = StateHandler.GetPC(1).Name;
            menu[2] = StateHandler.GetPC(2).Name;

            colors[0] = Color.White;
            colors[1] = Color.DarkGray;
            colors[2] = Color.DarkGray;

            mX     = 100;
            mY     = 45;
            width  = 860;
            height = 590;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        public SubStateCharSelectSpell(SubStateAbstract theparent, SpellAbstract theSpell, PC thePC)
            : base(theparent)
        {
            spell = theSpell;
            curr  = thePC;
            int i = 0, alive = 0;

            for (i = 0; i < StateCombat.MonsterList.Length; i++)
            {
                if (StateCombat.MonsterList[i].Health > 0)
                {
                    alive++;
                }
            }

            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[3 + alive];
            menu         = new string[colors.Length];
            targets      = new Character[colors.Length];

            int unavailable = 0;

            for (i = 0; i < StateCombat.MonsterList.Length; i++)
            {
                if (StateCombat.MonsterList[i].Health < 1)
                {
                    unavailable++;
                }
                else
                {
                    targets[i - unavailable] = StateCombat.MonsterList[i];
                }
            }

            int index = 0;

            for (i = i - unavailable; i < targets.Length; i++, index++)
            {
                targets[i] = StateHandler.GetPC(index);
            }

            for (i = 0; i < menu.Length; i++)
            {
                menu[i] = targets[i].Name;
            }

            for (i = 1; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }
            colors[0] = Color.White;

            mX     = 250;
            mY     = 100;
            width  = 690;
            height = 510;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        }//end EVC

        public override void Input(int input)
        {
            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                if (count == 0)
                {
                    //yes
                }
                else
                {
                    //no
                }
                StateHandler.State = Parent.Parent;
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = Parent;
            }
            else
            {
                base.Input(input);
            }
        }//end input
 public override void Input(int input)
 {
     base.Input(input);
     if (input == Globals.KEY_ACCEPT)
     {
         StateHandler.AddDelay();
         StateHandler.State = new SubStateCharSelectSpell(this, spells[count], curr);
     }
 }
예제 #9
0
        }//end EVC

        public override void Input(int input)
        {
            base.Input(input);
            StateHandler.AddDelay();
            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                StateHandler.State = new SubStateSlotMenuEquip(this, count);
            }
        }//end input
        }//end EVC

        public override void Input(int input)
        {
            StateHandler.AddDelay();
            base.Input(input);
            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                StateHandler.State = new SubStateConfirmUseMenu(this, itemID, count);
            }
        }//end input
예제 #11
0
        }//end EVC

        public override void Input(int input)
        {
            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                StateHandler.State = new SubStateListMenuRune(this, PCid, count);
            }

            StateHandler.AddDelay();
            base.Input(input);
        }//end input
        public SubStateAttackSelect(StateAbstract theparent, Character theAttacker)
            : base(theparent)
        {
            attacker = theAttacker;
            int i = 0, alive = 0;

            for (i = 0; i < StateCombat.MonsterList.Length; i++)
            {
                if (StateCombat.MonsterList[i].Health > 0)
                {
                    alive++;
                }
            }

            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[alive];
            menu         = new string[colors.Length];
            targets      = new Character[colors.Length];

            int unavailable = 0;

            for (i = 0; i < StateCombat.MonsterList.Length; i++)
            {
                if (StateCombat.MonsterList[i].Health < 1)
                {
                    unavailable++;
                }
                else
                {
                    targets[i - unavailable] = StateCombat.MonsterList[i];
                }
            }

            for (i = 0; i < menu.Length; i++)
            {
                menu[i] = targets[i].Name;
            }

            for (i = 1; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }
            colors[0] = Color.White;

            mX     = 450;
            mY     = 450;
            width  = 125;
            height = 100;


            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        public SubStateRuneChange(StateAbstract parent, int thePC, int runeSlot, int theCount)
            : base(parent)
        {
            this.PCid   = thePC;
            this.slot   = runeSlot;
            this.itemID = theCount;

            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[4];
            menu         = new string[4];

            if (itemID < ItemHandler.runeList.Count)
            {
                RuneAbstract run  = ItemHandler.runeList[itemID];
                string       flag = generateFlag(run.Wearflags);
                menu[0] = run.Name;
                menu[1] = "Level " + run.Level.ToString();
                menu[2] = "Slot: " + flag;
                menu[3] = "";

                SpellAbstract[] sp = run.getSpells();
                if (sp != null)
                {
                    foreach (SpellAbstract s in sp)
                    {
                        menu[3] += s.Name + "\n";
                    }
                }
            }
            else
            {
                for (int i = 0; i < menu.Length; i++)
                {
                    menu[i] = "";
                }
            }


            for (int i = 0; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }

            colors[0] = Color.White;

            mX     = 380;
            mY     = 90;
            width  = 140;
            height = 170;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }
        }//end EVC

        public override void Input(int input)
        {
            StateHandler.AddDelay();
            base.Input(input);
            if (input == Globals.KEY_ACCEPT)
            {
                attacker.Attack(targets[count], Globals.ELEMENT_PHYSICAL, "physical attack", 0);
            }
            else
            {
                CameraTarget = StateCombat.MonsterList[count];
            }
        }//end input
        }//end EVC

        public override void Input(int input)
        {
            base.Input(input);
            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                StateHandler.State = new SubStateConfirmMenu(this, 310, 90);
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = Parent;
            }
        }//end input
        public SubStateCharSelectMenuUseCombat(SubStateAbstract theparent, int itemSlot)
            : base(theparent)
        {
            int i = 0, alive = 0;

            for (i = 0; i < StateCombat.MonsterList.Length; i++)
            {
                if (StateCombat.MonsterList[i].Health > 0)
                {
                    alive++;
                }
            }
            itemID = itemSlot;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[3 + alive];
            menu         = new string[colors.Length];

            menu[0] = StateHandler.GetPC(0).Name;
            menu[1] = StateHandler.GetPC(1).Name;
            menu[2] = StateHandler.GetPC(2).Name;

            int unavailable = 0;

            for (i = 0; i < StateCombat.MonsterList.Length; i++)
            {
                if (StateCombat.MonsterList[i].Health < 1)
                {
                    unavailable++;
                }
                else
                {
                    menu[3 + i - unavailable] = StateCombat.MonsterList[i].Name;
                }
            }

            colors[0] = Color.White;
            for (i = 1; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }

            mX     = 170;
            mY     = 60;
            width  = 760;
            height = 490;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        }//end EVC

        public override void Input(int input)
        {
            StateHandler.AddDelay();
            base.Input(input);

            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                spell.Cast(curr, targets[count]);
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = Parent;
            }
        }//end input
예제 #18
0
        }//end EVC

        public override void Input(int input)
        {
            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                base.Input(input);
                if (count == 0)
                {
                    Character user = (Character)StateHandler.CameraTarget;
                    if (person < 3)//targetting player
                    {
                        ItemHandler.itemList[itemSlot].use(user, StateHandler.GetPC(person));
                    }
                    else//targetting monster
                    {
                        person -= 3;

                        for (int i = 0; i < person + 1 && i < StateCombat.MonsterList.Length; i++)
                        {
                            if (StateCombat.MonsterList[i].Health < 1)
                            {
                                person++;
                            }
                        }

                        ItemHandler.itemList[itemSlot].use(user, StateCombat.MonsterList[person]);
                    }
                    ItemHandler.itemList.RemoveAt(itemSlot);
                }
                else if (count == 1)
                {
                    StateHandler.AddDelay();
                    StateHandler.State = Parent;
                }
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = Parent;
            }
            else
            {
                base.Input(input);
            }
        }//end input
        public SubStateSpellSelect(StateAbstract theparent, SpellAbstract[] theSpells, PC thePC)
            : base(theparent)
        {
            spells = theSpells;
            curr   = thePC;

            parent = theparent;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];

            int i;

            colors = new Color[spells.Length];
            menu   = new string[spells.Length];

            for (i = 0; i < spells.Length && spells[i] != null; i++)
            {
                menu[i] = spells[i].Name;
            }

            for (; i < spells.Length; i++)
            {
                menu[i] = "";
            }

            if (colors.Length > 0)
            {
                colors[0] = Color.White;
            }

            for (i = 1; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }

            mX     = 190;
            mY     = 75;
            width  = 780;
            height = 570;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true, true);
        }
예제 #20
0
        }//end EVC

        public override void Input(int input)
        {
            base.Input(input);
            StateHandler.AddDelay();

            if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                if (count == 0)
                {
                    ItemHandler.itemList[itemSlot].use(StateHandler.GetPC(person));
                    ItemHandler.itemList.RemoveAt(itemSlot);
                }
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = Parent.Parent;
            }
        }//end input
        public SubStateRuneSelect(StateAbstract theparent, Character thePC)
            : base(theparent)
        {
            curr = (PC)thePC;

            parent = theparent;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];

            int i, size = calcSize();

            colors = new Color[size];
            menu   = new string[size];

            for (i = 0; i < size; i++)
            {
                menu[i] = curr.runes[i].Name;
            }

            for (; i < size; i++)
            {
                menu[i] = "";
            }

            if (colors.Length > 0)
            {
                colors[0] = Color.White;
            }

            for (i = 1; i < colors.Length; i++)
            {
                colors[i] = Color.DarkGray;
            }

            mX     = 100;
            mY     = 45;
            width  = 900;
            height = 630;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true, true);
        }
        public override void Input(int input)
        {
            base.Input(input);
            StateHandler.AddDelay();
            if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = parent;
            }
            else if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();
                switch (count)
                {
                case 0:
                    StateHandler.Difficulty = Globals.DIFFICULTY_VERY_EASY;
                    break;

                case 1:
                    StateHandler.Difficulty = Globals.DIFFICULTY_EASY;
                    break;

                case 2:
                    StateHandler.Difficulty = Globals.DIFFICULTY_NORMAL;
                    break;

                case 3:
                    StateHandler.Difficulty = Globals.DIFFICULTY_HARD;
                    break;

                case 4:
                    StateHandler.Difficulty = Globals.DIFFICULTY_VERY_HARD;
                    break;

                case 5:
                    StateHandler.Difficulty = Globals.DIFFICULTY_INSANE;
                    break;
                }
                StateHandler.State = parent;
            }
        }
        public SubStateConfirmExit(SubStateAbstract theparent, int xCoord, int yCoord)
            : base(theparent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[2];
            menu         = new string[2];

            menu[0] = "Yes";
            menu[1] = "No";

            colors[0] = Color.White;
            colors[1] = Color.DarkGray;

            mX     = xCoord;
            mY     = yCoord;
            width  = 27;
            height = 50;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        public override void Input(int input)
        {
            base.Input(input);
            if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = parent;
            }
            else if (input == Globals.KEY_ACCEPT)
            {
                StateHandler.AddDelay();

                if (curr.runes[count] != null)
                {
                    StateHandler.State = new SubStateSpellSelect(this, curr.runes[count].getSpells(), curr);
                }
                else
                {
                    StateHandler.State = parent;
                }
            }
        }
        public SubStateCharacterSelectMenu(SubStateAbstract theparent, int xCoord, int yCoord)
            : base(theparent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[3];
            menu         = new string[3];

            menu[0] = StateHandler.GetPC(0).Name;
            menu[1] = StateHandler.GetPC(1).Name;
            menu[2] = StateHandler.GetPC(2).Name;

            colors[0] = Color.White;
            colors[1] = Color.DarkGray;
            colors[2] = Color.DarkGray;

            mX     = xCoord;
            mY     = yCoord;
            width  = 960;
            height = 680;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
        public override void Input(int input)
        {
            base.Input(input);
            if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                StateHandler.State = parent;
            }
            else if (input == Globals.KEY_ACCEPT)
            {
                switch (count)
                {
                case 0:
                    StateHandler.State = new SubStateDifficultySelect(this);
                    break;

                default:
                    StateHandler.AddDelay();
                    StateHandler.State = new SubStateFeatureNotImplemented(this);
                    break;
                }
            }
        }
예제 #27
0
        public SubStateConfirmUseMenu(SubStateAbstract theparent, int theSlot, int thePerson)
            : base(theparent)
        {
            itemSlot = theSlot;
            person   = thePerson;

            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[2];
            menu         = new string[2];

            menu[0] = "Yes";
            menu[1] = "No";

            colors[0] = Color.White;
            colors[1] = Color.DarkGray;

            mX     = 240;
            mY     = 75;
            width  = 27;
            height = 50;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC