public SubStateOrderChangeTwo(SubStateAbstract theparent, int selected)
            : base(theparent)
        {
            first = selected;
            int i = 0;

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

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

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

            mX     = 90;
            mY     = 90;
            width  = 900;
            height = 630;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }//end EVC
예제 #2
0
        public void initialize()
        {
            MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.Five_Armies, "Five_Armies");

            background.model = ModelFactory.loadModel("SuperBattleCave");
            background.Scale = 3.0f;

            TurnList.Add(StateHandler.GetPC(0));
            TurnList.Add(StateHandler.GetPC(1));
            TurnList.Add(StateHandler.GetPC(2));
            for (int i = 0; i < MonsterList.Length; i++)
            {
                TurnList.Add(MonsterList[i]);
            }

            current = StateHandler.GetPC(0);

            cameraTarget = PCBuilder.getPC(0);

            strategy = 0;

            x = 75;
            y = 50;
            z = 10;
        }
예제 #3
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, "");
        }
예제 #4
0
 private bool runeSlotTaken(int passedFlag)
 {
     if (!isFlag(passedFlag))
     {
         passedFlag = 42;
     }
     foreach (RuneAbstract r in StateHandler.GetPC(PCid).runes)
     {
         if (r != null && r.Wearflags == passedFlag)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #5
0
        public override List <Actor> GetSceneList()
        {
            List <Actor> temp = new List <Actor>();

            temp.Add(background);
            for (int i = 0; i < MonsterList.Length; i++)
            {
                temp.Add(MonsterList[i]);
            }
            temp.Add(StateHandler.GetPC(0));
            temp.Add(StateHandler.GetPC(1));
            temp.Add(StateHandler.GetPC(2));


            return(temp);
        }
        }//end EVC

        public override void Input(int input)
        {
            base.Input(input);
            StateHandler.AddDelay();
            if (input == Globals.KEY_ACCEPT)
            {
                string temp = StateHandler.GetPC(first).Name;
                StateHandler.SetPC(StateHandler.GetPC(count).Name, first);
                StateHandler.SetPC(temp, count);
                parent             = new SubStateOrderChangeOne((SubStateAbstract)parent.Parent);
                StateHandler.State = parent;
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.State = parent;
            }
        }//end input
예제 #7
0
        private void nextTurn()
        {
            curIndex++;

            if (current == MonsterList[0])
            {
                curIndex = 0;
            }

            if (curIndex > 2)
            {
                current = MonsterList[0];
                return;
            }

            current = StateHandler.GetPC(curIndex);

            if (current.Health < 1)
            {
                bool gameOver = true;
                for (int i = 0; i < 3; i++)
                {
                    if (PCBuilder.getPC(i).Health > 0)
                    {
                        gameOver = false;
                    }
                }
                if (gameOver)
                {
                    StateHandler.AddDelay();
                    Defeat();
                }
                else
                {
                    nextTurn();
                }
            }
            else
            {
                cameraTarget = current;
            }
        }
예제 #8
0
 private bool equipSlotTaken(int passedFlag)
 {
     foreach (EquipmentAbstract e in StateHandler.GetPC(PCid).equipped)
     {
         if (e != null)
         {
             for (int i = 0; i < 5; i++)
             {
                 int flag = 1 << i;
                 if (Globals.IS_SET(e.Wearflags, flag))
                 {
                     if (Globals.IS_SET(passedFlag, flag))
                     {
                         return(true);
                     }
                 }
             }
         }
     }
     return(false);
 }
        public SubStateStatusMenu(StateAbstract parent)
            : base(parent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors       = new Color[31];
            menu         = new string[colors.Length];

            PC temp = null;

            for (int i = 0; i < 29; i += 10)
            {
                temp        = StateHandler.GetPC(i / 10);
                menu[i]     = temp.Name + " " + temp.getTitle();
                menu[i + 1] = temp.getExp() + @"/" + (temp.getLevel() * 1000);
                menu[i + 2] = "Level: " + temp.getLevel();
                menu[i + 3] = "Health: " + temp.Health + "/" + temp.MaxHealth;
                menu[i + 4] = "MP: " + temp.Mp + "/" + temp.MaxMp;
                menu[i + 5] = "Attack: " + temp.getAttack();
                menu[i + 6] = "Defense: " + temp.getDefense();
                menu[i + 7] = "Magic: " + temp.getMagic();
                menu[i + 8] = "Magic Defense: " + temp.getMagicDefense();
                menu[i + 9] = "";
            }
            menu[30] = "Formation: " + FormationHandler.FormName;

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

            mX     = 30;
            mY     = 30;
            width  = 960;
            height = 690;

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