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;
        }
 internal static PC GetPC(int toGet)
 {
     if (toGet < PCs.Length)
     {
         return(PCBuilder.getPC(PCs[toGet]));
     }
     return(PCBuilder.getPC(PCs[0]));
 }
        public override void action(Monster parent)
        {
            if (!charged)
            {
                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] = "IMA CHARGIN MAH LASERS!";

                charged = true;

                SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State);
                StateHandler.State = temp;
            }
            else if (charged)
            {
                charged = false;
                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] = "IMA FIRIN MAH LASERS!";

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

                int choice = Globals.Random(0, 3);

                int bonus = 1000;

                if (PCBuilder.getPC(choice).IsDefending())
                {
                    bonus = 0;
                }

                parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_FIRE, "LASERS", bonus);
            }
        }
Example #4
0
        public static Character acquireTarget()
        {
            int choice = Globals.Random(0, 100);

            choice /= 33;

            while (PCBuilder.getPC(choice).Health < 1)
            {
                choice++;
                if (choice > 2)
                {
                    choice = 0;
                }
            }

            return(PCBuilder.getPC(choice));
        }
        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;
            }
        }
Example #6
0
 public CreateMaze()
 {
     level        = PCBuilder.getPC(0).getLevel();
     difficulty   = StateHandler.Difficulty;
     specialflags = 0;
 }
        public override void Update()
        {
            if (fresh)
            {
                fresh     = false;
                actorList = MapFactory.GetCurrentMaze();
                MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.mazebgm, "mazebgm");
                MediaHandler.Background = "default.png";
                mainActor = PCBuilder.getPC("John");
                actorList.Add(mainActor);
                StateHandler.CameraTarget = mainActor;
                if (newGame)
                {
                    StateHandler.Level = 1;
                    StateHandler.Quest = (new QuestExplore(17, 17, null, 2));

                    PCBuilder.getPC(0).equipped[0] = ItemFactory.CreateEquip(Globals.WEARFLAG_WEAPON, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).equipped[1] = ItemFactory.CreateEquip(Globals.WEARFLAG_CHEST, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).equipped[2] = ItemFactory.CreateEquip(Globals.WEARFLAG_HEAD, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).equipped[3] = ItemFactory.CreateEquip(Globals.WEARFLAG_LEGS + Globals.WEARFLAG_FEET, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).runes[0]    = ItemFactory.CreateRune(0, Globals.ELEMENT_NATURE, -1, -1, "");
                    PCBuilder.getPC(0).Health      = PCBuilder.getPC(0).MaxHealth;

                    PCBuilder.getPC(1).equipped[0] = ItemFactory.CreateEquip(Globals.WEARFLAG_WEAPON, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).equipped[1] = ItemFactory.CreateEquip(Globals.WEARFLAG_CHEST, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).equipped[2] = ItemFactory.CreateEquip(Globals.WEARFLAG_HEAD, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).equipped[3] = ItemFactory.CreateEquip(Globals.WEARFLAG_LEGS + Globals.WEARFLAG_FEET, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).runes[0]    = ItemFactory.CreateRune(0, Globals.ELEMENT_FIRE, -1, -1, "");
                    PCBuilder.getPC(1).Health      = PCBuilder.getPC(1).MaxHealth;

                    PCBuilder.getPC(2).equipped[0] = ItemFactory.CreateEquip(Globals.WEARFLAG_WEAPON, Globals.ELEMENT_PHYSICAL, 3, Globals.ITEM_QUALITY_LEGENDARY, "The Smile");
                    PCBuilder.getPC(2).equipped[1] = ItemFactory.CreateEquip(Globals.WEARFLAG_HEAD, Globals.ELEMENT_PHYSICAL, 3, Globals.ITEM_QUALITY_LEGENDARY, "The Glasses");
                    PCBuilder.getPC(2).equipped[2] = ItemFactory.CreateEquip(0, Globals.ELEMENT_PHYSICAL, 4, Globals.ITEM_QUALITY_MYTHICAL, "The Beard");
                    PCBuilder.getPC(2).equipped[3] = ItemFactory.CreateEquip(Globals.WEARFLAG_CHEST | Globals.WEARFLAG_LEGS | Globals.WEARFLAG_FEET, Globals.ELEMENT_PHYSICAL, 3, Globals.ITEM_QUALITY_LEGENDARY, "The Trenchcoat");
                    PCBuilder.getPC(2).runes[0]    = ItemFactory.CreateRune(0, Globals.ELEMENT_WATER, -1, -1, "");
                    PCBuilder.getPC(2).Health      = PCBuilder.getPC(2).MaxHealth;

                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_FIRE + Globals.TYPE_CONSUMABLE_PHYSICAL, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_FIRE, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_WATER, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_NATURE, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_PHYSICAL, 0, 1, Globals.ITEM_QUALITY_TRASH, null));

                    newGame = false;
                }
            }

            if (change)
            {
                change      = false;
                mainActor.X = locX;
                mainActor.Y = locY;
            }
        }