Ejemplo n.º 1
0
        void Skill3(Game insGame, GameEngine insGameEngine, Player insPlayer, Barbarian insBarbarian, Wanderer insWanderer, Forcekeeper insForcekeeper)
        {
            switch (insPlayer.arrayData[ActivePlayerID].Class)
            {
            case EnumClass.Barbarian:
                insBarbarian.Skill3(insGame, insGameEngine, insPlayer);
                break;

            case EnumClass.Wanderer:
                insWanderer.Skill3(insGame, insGameEngine, insPlayer);
                break;

            case EnumClass.Forcekeeper:
                insForcekeeper.Skill3(insGame, insGameEngine, insPlayer);
                break;
            }
        }
Ejemplo n.º 2
0
        public void ShowBattleOptions(Game insGame, GameEngine insGameEngine, Player insPlayer, Barbarian insBarbarian, Wanderer insWanderer, Forcekeeper insForcekeeper)
        {
            #region ProgressOfTheBattle
            object[] arrayTempBattleInfo = stackBattleInfo.ToArray();
            Console.WriteLine("                         PROGRESS OF THE BATTLE");
            Console.WriteLine("--------------------------------------------------------------------------");
            switch (stackBattleInfo.Count)
            {
            case 0:
                Console.WriteLine("\n" + "\n" + "\n" + "\n");
                break;

            case 1:
                Console.WriteLine(arrayTempBattleInfo[0]);
                Console.WriteLine("\n" + "\n" + "\n");
                break;

            case 2:
                for (int i = 0; i <= 1; i++)
                {
                    Console.WriteLine(arrayTempBattleInfo[i]);
                }
                Console.WriteLine("\n" + "\n");
                break;

            case 3:
                for (int i = 0; i <= 2; i++)
                {
                    Console.WriteLine(arrayTempBattleInfo[i]);
                }
                Console.WriteLine("\n");
                break;

            case 4:
                for (int i = 0; i <= 3; i++)
                {
                    Console.WriteLine(arrayTempBattleInfo[i]);
                }
                Console.WriteLine();
                break;

            default:
                for (int i = 0; i <= 4; i++)
                {
                    Console.WriteLine(arrayTempBattleInfo[i]);
                }
                break;
            }
            Console.WriteLine("--------------------------------------------------------------------------");
            #endregion
            switch (insPlayer.arrayData[insGameEngine.ActivePlayerID].Class)
            {
            case EnumClass.Barbarian:
            {
                Console.WriteLine("1 - Melee attack (Battle Axe)");
                Console.WriteLine("2 - Distance attack (Throwing Axes)");
                Console.WriteLine("3 - Jump (10 MP)");
                Console.WriteLine("4 - Berserk (20 MP)");
                Console.WriteLine("5 - Devastation (30 MP)");
            }
            break;

            case EnumClass.Wanderer:
            {
                Console.WriteLine("1 - Melee attack (Dagger)");
                Console.WriteLine("2 - Distance attack (Long Bow)");
                Console.WriteLine("3 - Heal (15 MP)");
                Console.WriteLine("4 - Eagle Eye (30 MP)");
                Console.WriteLine("5 - Vampiric Pierce (40 MP)");
            }
            break;

            case EnumClass.Forcekeeper:
            {
                Console.WriteLine("1 - Melee attack (Sinister Touch)");
                Console.WriteLine("2 - Distance attack (Bone Wand)");
                Console.WriteLine("3 - Sleep (25 MP)");
                Console.WriteLine("4 - Fire Shield (40 MP)");
                Console.WriteLine("5 - Lightning (100 MP)");
            }
            break;
            }
            Console.WriteLine("6 - Move forward");
            Console.WriteLine("7 - Move back");
            Console.WriteLine("8 - Pass the turn");
            Console.WriteLine("------------------");
            Console.WriteLine("9 - End the game");
            bool IfKeyIsCorrect = false;
            do
            {
                ConsoleKeyInfo KeyNumber = Console.ReadKey(true);
                switch (KeyNumber.KeyChar)
                {
                case '1':
                    MeeleAttack(insGame, insPlayer);
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '2':
                    DistanceAttack(insGame, insPlayer);
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '3':
                    Skill1(insGame, insGameEngine, insPlayer, insBarbarian, insWanderer, insForcekeeper);
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '4':
                    Skill2(insGame, insGameEngine, insPlayer, insBarbarian, insWanderer, insForcekeeper);
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '5':
                    Skill3(insGame, insGameEngine, insPlayer, insBarbarian, insWanderer, insForcekeeper);
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '6':
                    MoveForward(insGame, insPlayer);
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '7':
                    MoveBack(insGame, insPlayer);
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '8':
                    insGameEngine.stackBattleInfo.Push(insPlayer.arrayData[ActivePlayerID].Name + " passed the turn.");
                    insGame.NextMove(insPlayer);
                    IfKeyIsCorrect = true;
                    break;

                case '9':
                    Console.Clear();
                    insGame.MainMenu();
                    IfKeyIsCorrect = true;
                    break;

                default:
                    break;
                }
            } while (IfKeyIsCorrect == false);
        }
        public void CheckSleep(Game insGame, GameEngine insGameEngine, Player insPlayer, Barbarian insBarbarian, Wanderer insWanderer, Forcekeeper insForcekeeper)
        {
            if (IfSleepIsActive == false)
            {
                insGameEngine.ShowBattleOptions(insGame, insGameEngine, insPlayer, insBarbarian, insWanderer, insForcekeeper);
            }
            else
            {
                insGameEngine.stackBattleInfo.Push(insPlayer.arrayData[insGameEngine.ActivePlayerID].Name + " is sleeping...");
                #region ProgressOfTheBattle
                object[] arrayTempBattleInfo = insGameEngine.stackBattleInfo.ToArray();
                Console.WriteLine("                         PROGRESS OF THE BATTLE");
                Console.WriteLine("--------------------------------------------------------------------------");
                switch (insGameEngine.stackBattleInfo.Count)
                {
                case 0:
                    Console.WriteLine("\n" + "\n" + "\n" + "\n");
                    break;

                case 1:
                    Console.WriteLine(arrayTempBattleInfo[0]);
                    Console.WriteLine("\n" + "\n" + "\n");
                    break;

                case 2:
                    for (int i = 0; i <= 1; i++)
                    {
                        Console.WriteLine(arrayTempBattleInfo[i]);
                    }
                    Console.WriteLine("\n" + "\n");
                    break;

                case 3:
                    for (int i = 0; i <= 2; i++)
                    {
                        Console.WriteLine(arrayTempBattleInfo[i]);
                    }
                    Console.WriteLine("\n");
                    break;

                case 4:
                    for (int i = 0; i <= 3; i++)
                    {
                        Console.WriteLine(arrayTempBattleInfo[i]);
                    }
                    Console.WriteLine();
                    break;

                default:
                    for (int i = 0; i <= 4; i++)
                    {
                        Console.WriteLine(arrayTempBattleInfo[i]);
                    }
                    break;
                }
                Console.WriteLine("--------------------------------------------------------------------------");
                #endregion
                System.Threading.Thread.Sleep(5000); // PARAMETER
                insForcekeeper.IfSleepIsActive = false;
                insGame.NextMove(insPlayer);
            }
        }