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);
        }
        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
        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);
        }