コード例 #1
0
        public void DebuggerFight(List <Monster> monsters, int playerHowFast)
        {
            Basic_Map.Build(monsters, player1, "~");
            for (int i = 0; i < monsters.Count; i++)
            {
                Render array = new Render();
                array.RenderMonsterStats(monsters[i]);
            }
            int howManyMonsterWent = 0;

            while (monsters.Count != 0)
            {
                Fight_Rounds code  = new Fight_Rounds();
                Player       code1 = new Player("", 0, 0, "");
                code.RoundStart(monsters, code1);
                for (int i = 0; i <= monsters.Count - 1; i++)
                {
                    if (monsters.Count == 1)
                    {
                        Console.WriteLine(monsters[i].Name + " wins!");
                        return;
                    }
                    if (monsters[i] != null)
                    {
                        if (monsters[i].Health > 0)
                        {
                            monsters[i].MonsterActions(monsters[i], player1, monsters, true);
                            Thread.Sleep(playerHowFast);
                            if (monsters.Count == 1)
                            {
                                Console.WriteLine(monsters[0].Name + " wins!");
                            }
                        }
                        if (monsters[i].Health <= 0)
                        {
                            Console.WriteLine(monsters[i].Name + " has been defeated...");
                            monsters.Remove(monsters[i]);
                        }
                    }
                }
                Console.WriteLine("How many monsters went: " + howManyMonsterWent);
                if (howManyMonsterWent == 1)
                {
                    if (monsters.Count == 1)
                    {
                        Console.WriteLine(monsters[0].Name + " wins!");
                        return;
                    }
                }
                else
                {
                    howManyMonsterWent = 0;
                }
                code.RoundEnd(monsters, player1, isDebuggerFight);
            }
        }
コード例 #2
0
ファイル: Monster.cs プロジェクト: BattleTank05/CmdRpg
        public void MonsterActions(Monster monster, Player player1, List <Monster> monsters, Boolean isDebuggerFight)
        {
            #region monsterAttackAndClassVariables
            Render    code           = new Render();
            Monster   start          = new Monster(0, 0, "");
            Map       map            = new Map("Base_Map");
            Basic_Map code2          = new Basic_Map("Base_Map");
            int       monsterAction  = GetRandom(12, 12);
            int       whichTarget    = GetRandom(0, monsters.Count);
            int       isTargetPlayer = 0;
            #endregion
            switch (monsterAction)
            {
            case 1:
                monster.Block = start.Monster_Defend(monster);
                break;

            case 2:
                if (isDebuggerFight == false)
                {
                    isTargetPlayer = GetRandom(1, 3);
                    if (isTargetPlayer == 2 && player1.posX == this.posX + 1 || player1.posX == this.posX - 1 || player1.posX == this.posX && player1.posY == this.posY + 1 || player1.posY == this.posY - 1 || player1.posY == this.posY)
                    {
                        player1.Health = start.MonsterAttack(player1, monster, monsters);
                    }
                    else
                    {
                        Move(monster, map, monsters, player1, monster);
                    }
                }
                if (monsters[whichTarget] != this && monsters[whichTarget] != null)
                {
                    if (monsters[whichTarget].posX == this.posX + 1 || monsters[whichTarget].posX == this.posX - 1 || monsters[whichTarget].posX == this.posX && monsters[whichTarget].posY == this.posY + 1 || monsters[whichTarget].posY == this.posY - 1 || monsters[whichTarget].posY == this.posY)
                    {
                        monsters[whichTarget].Health = start.MonsterAttack(monsters[whichTarget], monster, monsters);
                    }
                }
                break;

            case 3:
                if (isDebuggerFight == false)
                {
                    isTargetPlayer = GetRandom(1, 3);
                    if (isTargetPlayer == 2 && player1.posX == this.posX + 1 || player1.posX == this.posX - 1 || player1.posX == this.posX && player1.posY == this.posY + 1 || player1.posY == this.posY - 1 || player1.posY == this.posY)
                    {
                        player1.Health = start.MonsterAttack(player1, monster, monsters);
                    }
                    else
                    {
                        Move(monster, map, monsters, player1, monster);
                    }
                }
                if (monsters[whichTarget] != this && monsters[whichTarget] != null)
                {
                    if (monsters[whichTarget].posX == this.posX + 1 || monsters[whichTarget].posX == this.posX - 1 || monsters[whichTarget].posX == this.posX && monsters[whichTarget].posY == this.posY + 1 || monsters[whichTarget].posY == this.posY - 1 || monsters[whichTarget].posY == this.posY)
                    {
                        monsters[whichTarget].Health = start.MonsterAttack(monsters[whichTarget], monster, monsters);
                    }
                }
                break;

            case 4:
                monster.Health           = start.Monster_Heal(monster);
                monster.monsterBleeding -= 1;
                break;

            case 5:
                monster.Dodge = start.Monster_Dodge(monster);
                break;

            case 6:
                if (isDebuggerFight == false)
                {
                    isTargetPlayer = GetRandom(1, 3);
                    if (isTargetPlayer == 2 && player1.posX == this.posX + 1 || player1.posX == this.posX - 1 || player1.posX == this.posX && player1.posY == this.posY + 1 || player1.posY == this.posY - 1 || player1.posY == this.posY)
                    {
                        player1.Health = start.MonsterAttack(player1, monster, monsters);
                    }
                    else
                    {
                        Move(monster, map, monsters, player1, monster);
                    }
                }
                if (monsters[whichTarget] != this && monsters[whichTarget] != null)
                {
                    if (monsters[whichTarget].posX == this.posX + 1 || monsters[whichTarget].posX == this.posX - 1 || monsters[whichTarget].posX == this.posX && monsters[whichTarget].posY == this.posY + 1 || monsters[whichTarget].posY == this.posY - 1 || monsters[whichTarget].posY == this.posY)
                    {
                        monsters[whichTarget].Health = start.MonsterAttack(monsters[whichTarget], monster, monsters);
                    }
                }
                break;

            case 7:
                if (isDebuggerFight == false)
                {
                    isTargetPlayer = GetRandom(1, 3);
                    if (isTargetPlayer == 2 && player1.posX == this.posX + 1 || player1.posX == this.posX - 1 || player1.posX == this.posX && player1.posY == this.posY + 1 || player1.posY == this.posY - 1 || player1.posY == this.posY)
                    {
                        player1.Health = start.MonsterAttack(player1, monster, monsters);
                    }
                    else
                    {
                        Move(monster, map, monsters, player1, monster);
                    }
                }
                if (monsters[whichTarget] != this && monsters[whichTarget] != null)
                {
                    if (monsters[whichTarget].posX == this.posX + 1 || monsters[whichTarget].posX == this.posX - 1 || monsters[whichTarget].posX == this.posX && monsters[whichTarget].posY == this.posY + 1 || monsters[whichTarget].posY == this.posY - 1 || monsters[whichTarget].posY == this.posY)
                    {
                        monsters[whichTarget].Health = start.MonsterAttack(monsters[whichTarget], monster, monsters);
                    }
                }
                break;

            case 8:
                if (isDebuggerFight == false)
                {
                    isTargetPlayer = GetRandom(1, 3);
                    if (isTargetPlayer == 2 && player1.posX == this.posX + 1 || player1.posX == this.posX - 1 || player1.posX == this.posX && player1.posY == this.posY + 1 || player1.posY == this.posY - 1 || player1.posY == this.posY)
                    {
                        player1.Health = start.MonsterAttack(player1, monster, monsters);
                    }
                    else
                    {
                        Move(monster, map, monsters, player1, monster);
                    }
                }
                if (monsters[whichTarget] != this && monsters[whichTarget] != null)
                {
                    if (monsters[whichTarget].posX == this.posX + 1 || monsters[whichTarget].posX == this.posX - 1 || monsters[whichTarget].posX == this.posX && monsters[whichTarget].posY == this.posY + 1 || monsters[whichTarget].posY == this.posY - 1 || monsters[whichTarget].posY == this.posY)
                    {
                        monsters[whichTarget].Health = start.MonsterAttack(monsters[whichTarget], monster, monsters);
                    }
                }
                break;

            case 9:
                if (isDebuggerFight == false)
                {
                    isTargetPlayer = GetRandom(1, 3);
                    if (isTargetPlayer == 2 && player1.posX == this.posX + 1 || player1.posX == this.posX - 1 || player1.posX == this.posX && player1.posY == this.posY + 1 || player1.posY == this.posY - 1 || player1.posY == this.posY)
                    {
                        player1.Health = start.MonsterAttack(player1, monster, monsters);
                    }
                    else
                    {
                        Move(monster, map, monsters, player1, monster);
                    }
                }
                if (monsters[whichTarget] != this && monsters[whichTarget] != null)
                {
                    if (monsters[whichTarget].posX == this.posX + 1 || monsters[whichTarget].posX == this.posX - 1 || monsters[whichTarget].posX == this.posX && monsters[whichTarget].posY == this.posY + 1 || monsters[whichTarget].posY == this.posY - 1 || monsters[whichTarget].posY == this.posY)
                    {
                        monsters[whichTarget].Health = start.MonsterAttack(monsters[whichTarget], monster, monsters);
                    }
                }
                break;

            case 10:
                monster.Parry = start.Monster_Parry(monster);
                break;

            case 11:
                Move(monster, map, monsters, player1, monster);
                break;

            case 12:
                for (int i = 0; i < monster.entityPotions.Count - 1;)
                {
                    if (monster.entityPotions[i].name == "Health_Potion" && monster.Health < monster.maxHealth)
                    {
                        monster.entityPotions[i].PotionEffect("healing", monster, monster.entityPotions[i].damage);
                        monster.entityPotions.Remove(monster.entityPotions[i]);
                        Potion empty = new Potion("Empty_potion", monster.entityPotions.Count + 1);
                        monster.entityPotions.Add(empty);
                    }
                    if (monster.entityPotions[i].name == "Fire_Potion" && Entity.GetNearestEntity(monster, monsters, player1, code2).posX <= monster.posX + 3 && Entity.GetNearestEntity(monster, monsters, player1, code2).posX >= monster.posX - 3 && Entity.GetNearestEntity(monster, monsters, player1, code2).posY <= monster.posY + 3 && Entity.GetNearestEntity(monster, monsters, player1, code2).posY >= monster.posY - 3)
                    {
                        monster.entityPotions[i].PotionEffect("Fire_Potion", Entity.GetNearestEntity(monster, monsters, player1, code2), monster.entityPotions[i].damage);
                        monster.entityPotions.Remove(monster.entityPotions[i]);
                        Potion empty = new Potion("Empty_potion", monster.entityPotions.Count + 1);
                        monster.entityPotions.Add(empty);
                    }
                }
                break;
            }
            //Thread.Sleep(5000);
        }
コード例 #3
0
 public void Fight(List <Monster> monsters, Player player1)
 {
     #region DeclareClassVariables
     Warrior      classActions  = new Warrior("", 0, 0, "");
     Mage         classActions2 = new Mage("", 0, 0, "");
     Rogue        classActions3 = new Rogue("", 0, 0, "");
     Fight_Rounds code          = new Fight_Rounds();
     #endregion
     while (player1.Health > 0 && monsters != null)
     {
         int whichMap = GetRandom(1, 3);
         if (whichMap == 1)
         {
             Basic_Map.Build(monsters, player1, "~");
         }
         else if (whichMap == 2)
         {
             Arena_Branches.Build(monsters, player1, "~");
         }
         if (player1.Health > 0)
         {
             code.RoundStart(monsters, player1);
             if (player1.classType == "Warrior")
             {
                 classActions.WarriorActions(player1, monsters);
             }
             if (player1.classType == "Mage")
             {
                 classActions2.MageActions(player1, monsters);
             }
             if (player1.classType == "Rogue")
             {
                 classActions3.RogueActions(player1, monsters);
             }
             if (monsters.Count == 0)
             {
                 Console.WriteLine("All monsters defeated!");
                 LootPhase(player1, monsters, GetRandom(1, 5) + monsters.Capacity + player1.level);
             }
         }
         for (int i = 0; i < monsters.Count - 1; i++)
         {
             if (monsters[i] != null)
             {
                 if (monsters[i].Health > 0)
                 {
                     monsters[i].MonsterActions(monsters[i], player1, monsters, false);
                 }
                 if (monsters[i].Health <= 0)
                 {
                     Console.WriteLine(monsters[i].Name + " has been defeated...");
                     monsters.Remove(monsters[i]);
                 }
             }
         }
         code.RoundEnd(monsters, player1, isDebuggerFight);
     }
     if (player1.Health <= 0)
     {
         Console.WriteLine("you lose");
         return;
     }
     else if (player1.Health > 0)
     {
         LootPhase(player1, monsters, GetRandom(1, 5));
     }
 }
コード例 #4
0
        public static Entity GetNearestEntity(Entity entity, List <Monster> monsters, Player player1, Basic_Map map)
        {
            int number                   = 0;
            int number1                  = 0;
            int restoreOriginX           = entity.posX;
            int restoreOriginY           = entity.posY;
            int currentClosestEntityPosX = 0;
            int currentClosestEntityPosY = 0;

            for (int i = 0; i < monsters.Count - 1; i++)
            {
                while (entity.posX != monsters[i].posX)
                {
                    entity.posX += 1;
                    number      += 1;
                    if (entity.posX >= map.lengthX)
                    {
                        number = 0;
                        while (entity.posX != monsters[i].posX)
                        {
                            entity.posX -= 1;
                            number      += 1;
                        }
                        if (number < currentClosestEntityPosX || number == 0)
                        {
                            number = currentClosestEntityPosX;
                        }
                    }
                    else
                    {
                        if (number < currentClosestEntityPosX || number == 0)
                        {
                            number = currentClosestEntityPosX;
                        }
                        while (entity.posY != monsters[i].posY)
                        {
                            entity.posY += 1;
                            number1     += 1;
                            if (entity.posY >= map.lengthY)
                            {
                                number1 = 0;
                                while (entity.posY != monsters[i].posY)
                                {
                                    entity.posY -= 1;
                                    number1     += 1;
                                }
                                if (number1 < currentClosestEntityPosY || number1 == 0)
                                {
                                    number = currentClosestEntityPosY;
                                }
                            }
                            else
                            {
                                if (number1 < currentClosestEntityPosY || number1 == 0)
                                {
                                    number = currentClosestEntityPosY;
                                }
                            }
                        }
                    }
                }
            }
            for (int i = 0; i < monsters.Count - 1; i++)
            {
                if (monsters[i].posX == currentClosestEntityPosX && monsters[i].posY == currentClosestEntityPosY)
                {
                    return(monsters[i]);
                }
            }
            entity.posX = restoreOriginX;
            entity.posY = restoreOriginY;
            return(entity);
        }
コード例 #5
0
        public void Move(Entity entity, Map map, List <Monster> monsters, Player player1, Monster monster)
        {
            Basic_Map code       = new Basic_Map("Base_Map");
            int       originPosX = entity.posX;
            int       originPosY = entity.posY;

            if (entity == player1)
            {
                Console.Write("Enter PosX: ");
                int    actualInput  = 0;
                int    actualInput1 = 0;
                string input        = Console.ReadLine();
                try
                {
                    actualInput = Int32.Parse(input);
                }
                catch
                {
                    Move(entity, map, monsters, player1, monster);
                }
                Console.Write("Enter PosY: ");
                string input1 = Console.ReadLine();
                try
                {
                    actualInput1 = Int32.Parse(input1);
                }
                catch
                {
                    Move(entity, map, monsters, player1, monster);
                }
                if (actualInput1 == entity.posY + 1 || actualInput1 == entity.posY - 1 || actualInput1 == entity.posY && actualInput == entity.posX + 1 || actualInput == entity.posX - 1 || actualInput == entity.posX)
                {
                    for (int i = 0; i < monsters.Count; i++)
                    {
                        if (monsters[i] != null)
                        {
                            if (entity.posX == monsters[i].posX && entity.posY == monsters[i].posY)
                            {
                                Console.Write("Are you sure you want to attack " + monsters[i].Name + "?");
                                string input2 = Console.ReadLine();
                                if (input2 == "y" || input2 == "yes")
                                {
                                    Console.WriteLine("Which Weapon do you want to use?\n");
                                    Console.WriteLine("1) Slot 1: " + player1.EntityWeapon.name + " weapon level: " + player1.EntityWeapon.weaponlevel + " weapon damage: " + player1.EntityWeapon.weaponDamage);
                                    Console.WriteLine("2) Slot 2: " + player1.PlayerWeapon2.name + " weapon level: " + player1.PlayerWeapon2.weaponlevel + " weapon damage: " + player1.PlayerWeapon2.weaponDamage);
                                    int    playerAnswer = 0;
                                    string playerInput  = Console.ReadLine();
                                    try
                                    {
                                        playerAnswer = Int32.Parse(playerInput);
                                    }
                                    catch
                                    {
                                        Move(entity, map, monsters, player1, monster);
                                    }
                                    if (playerAnswer == 1)
                                    {
                                        monsters[i].Health = player1.PlayerAttack(monsters[i], player1, player1.EntityWeapon);
                                        entity.posY        = originPosY;
                                        entity.posX        = originPosX;
                                    }
                                    else if (playerAnswer == 2)
                                    {
                                        monsters[i].Health = player1.PlayerAttack(monsters[i], player1, player1.PlayerWeapon2);
                                        entity.posY        = originPosY;
                                        entity.posX        = originPosX;
                                    }
                                }
                                else
                                {
                                    Move(entity, map, monsters, player1, monster);
                                }
                            }
                        }
                    }
                    entity.posY = actualInput1;
                    entity.posX = actualInput;
                }
                else
                {
                    Console.WriteLine("Invalid Coordiantes!");
                    Move(entity, map, monsters, player1, monster);
                }
            }
            else
            {
                int actualInput  = GetRandom(entity.posX - 1, entity.posX + 2);
                int actualInput1 = GetRandom(entity.posY - 1, entity.posY + 2);
                if (player1 != null)
                {
                    if (actualInput == player1.posX && actualInput1 == player1.posY)
                    {
                        player1.Health = monster.MonsterAttack(player1, monster, monsters);
                        entity.posY    = originPosY;
                        entity.posX    = originPosX;
                    }
                }
                else
                {
                    for (int i = 0; i < monsters.Count; i++)
                    {
                        if (entity.posX == monsters[i].posX && entity.posY == monsters[i].posY)
                        {
                            entity.Health = monster.MonsterAttack(entity, monster, monsters);
                            entity.posY   = originPosY;
                            entity.posX   = originPosX;
                        }
                    }
                }
                entity.posX = actualInput;
                entity.posY = actualInput1;
            }
            if (map.mapName == "Base_Map")
            {
                int tries = 3;
                while (entity.posX <= 0 || entity.posY <= 0 || entity.posX > code.lengthX || entity.posY > code.lengthY && tries > 0)
                {
                    Move(entity, map, monsters, player1, monster);
                    tries -= 1;
                    if (tries == 0)
                    {
                        return;
                    }
                }
                Basic_Map.Build(monsters, player1, "~");
            }
            else if (map.mapName == "Arena_Branches")
            {
                int tries = 3;
                while (entity.posX <= 0 || entity.posY <= 0 || entity.posX > code.lengthX || entity.posY > code.lengthY && tries > 0)
                {
                    Move(entity, map, monsters, player1, monster);
                    tries -= 1;
                    if (tries == 0)
                    {
                        return;
                    }
                }
                Arena_Branches.Build(monsters, player1, "~");
            }
        }
コード例 #6
0
        public void WarriorActions(Player player1, List <Monster> monsters)
        {
            Thread.Sleep(1000);
            Program code  = new Program();
            Render  array = new Render();

            if (monsters.Count == 0)
            {
                Console.WriteLine("You Win");
                code.LootPhase(player1, monsters, GetRandom(1, 10));
            }
            array.RenderPlayerActionsShorthand(player1);
            if (player1.level == 1)
            {
                Console.WriteLine("7) Colossal Smash = 10 - 20 Damage + strength");
            }
            //if (player1.entityPotions != null)
            //{
            //    int number = 3;
            //    while (number > 0)
            //    {
            //        Potion potion = player1.GetPotion(entityPotions, number);
            //    }
            //}
            string playerInput;
            int    playerAnswer = 0;
            string input        = Console.ReadLine();

            switch (input)
            {
            case "1":
                if (monsters.Count > 0)
                {
                    for (int i = 0; i < monsters.Count; i++)
                    {
                        if (monsters[i] != null)
                        {
                            if (monsters[i].posX == player1.posX || monsters[i].posX == player1.posX + 1 || monsters[i].posX == player1.posX - 1 && monsters[i].posY == player1.posY || monsters[i].posY == player1.posY + 1 || monsters[i].posY == player1.posY - 1)
                            {
                                if (monsters.Count == 0)
                                {
                                    Console.WriteLine("You Win");
                                    code.LootPhase(player1, monsters, GetRandom(1, 10));
                                }
                                Console.WriteLine("Which Weapon do you want to use?\n");
                                Console.WriteLine("1) Slot 1: " + player1.EntityWeapon.name + " weapon level: " + player1.EntityWeapon.weaponlevel + " weapon damage: " + player1.EntityWeapon.weaponDamage);
                                Console.WriteLine("2) Slot 2: " + player1.PlayerWeapon2.name + " weapon level: " + player1.PlayerWeapon2.weaponlevel + " weapon damage: " + player1.PlayerWeapon2.weaponDamage);
                                playerInput = Console.ReadLine();
                                try
                                {
                                    playerAnswer = Int32.Parse(playerInput);
                                }
                                catch
                                {
                                    WarriorActions(player1, monsters);
                                }
                                if (playerAnswer == 1)
                                {
                                    int monsterList = 1;
                                    Console.WriteLine("Which Foe?\n");
                                    for (int i1 = 0; i1 < monsters.Count; i1++)
                                    {
                                        if (monsters[i1] == null)
                                        {
                                            Console.WriteLine("(Defeated Monster)");
                                        }
                                        else if (monsters[i1].Health > 0 && monsters[i1].posX == player1.posX || monsters[i1].posX == player1.posX + 1 || monsters[i1].posX == player1.posX - 1 && monsters[i1].posY == player1.posY || monsters[i1].posY == player1.posY + 1 || monsters[i1].posY == player1.posY - 1)
                                        {
                                            Console.WriteLine(monsterList + ") " + monsters[i1].Name);
                                            monsterList += 1;
                                        }
                                    }
                                    int    playerAnswer2 = 0;
                                    string playerInput2  = Console.ReadLine();
                                    try
                                    {
                                        playerAnswer2 = Int32.Parse(playerInput2);
                                    }
                                    catch
                                    {
                                        WarriorActions(player1, monsters);
                                    }
                                    switch (playerAnswer2)
                                    {
                                    case 1:
                                        if (monsters[0] != null)
                                        {
                                            monsters[0].Health = player1.PlayerAttack(monsters[0], player1, player1.EntityWeapon);
                                            return;
                                        }
                                        break;

                                    case 2:
                                        if (monsters[1] != null)
                                        {
                                            monsters[1].Health = player1.PlayerAttack(monsters[1], player1, player1.EntityWeapon);
                                            return;
                                        }
                                        break;

                                    case 3:
                                        if (monsters[2] != null)
                                        {
                                            monsters[2].Health = player1.PlayerAttack(monsters[2], player1, player1.EntityWeapon);
                                            return;
                                        }
                                        break;

                                    case 4:
                                        if (monsters[3] != null)
                                        {
                                            monsters[3].Health = player1.PlayerAttack(monsters[3], player1, player1.EntityWeapon);
                                            return;
                                        }
                                        break;

                                    case 5:
                                        if (monsters[4] != null)
                                        {
                                            monsters[4].Health = player1.PlayerAttack(monsters[4], player1, player1.EntityWeapon);
                                            return;
                                        }
                                        break;
                                    }
                                }
                                else if (playerAnswer == 2)
                                {
                                    int monsterList = 1;
                                    Console.WriteLine("Which Foe?\n");
                                    for (int i2 = 0; i2 < monsters.Count; i2++)
                                    {
                                        if (monsters[i2] != null)
                                        {
                                            if (monsters[i2].Health > 0 && monsters[i].posX == player1.posX || monsters[i].posX == player1.posX + 1 || monsters[i].posX == player1.posX - 1 && monsters[i].posY == player1.posY || monsters[i].posY == player1.posY + 1 || monsters[i].posY == player1.posY - 1)
                                            {
                                                Console.WriteLine(monsterList + ") " + monsters[i2].Name);
                                                monsterList += 1;
                                            }
                                        }
                                    }
                                    int    playerAnswer2 = 0;
                                    string playerInput2  = Console.ReadLine();
                                    try
                                    {
                                        playerAnswer2 = Int32.Parse(playerInput2);
                                    }
                                    catch
                                    {
                                        WarriorActions(player1, monsters);
                                    }
                                    switch (playerAnswer2)
                                    {
                                    case 1:
                                        if (monsters[0] != null)
                                        {
                                            monsters[0].Health = player1.PlayerAttack(monsters[0], player1, player1.PlayerWeapon2);
                                            return;
                                        }
                                        break;

                                    case 2:
                                        if (monsters[1] != null)
                                        {
                                            monsters[1].Health = player1.PlayerAttack(monsters[1], player1, player1.PlayerWeapon2);
                                            return;
                                        }
                                        break;

                                    case 3:
                                        if (monsters[2] != null)
                                        {
                                            monsters[2].Health = player1.PlayerAttack(monsters[2], player1, player1.PlayerWeapon2);
                                            return;
                                        }
                                        break;

                                    case 4:
                                        if (monsters[3] != null)
                                        {
                                            monsters[3].Health = player1.PlayerAttack(monsters[3], player1, player1.PlayerWeapon2);
                                            return;
                                        }
                                        break;

                                    case 5:
                                        if (monsters[4] != null)
                                        {
                                            monsters[4].Health = player1.PlayerAttack(monsters[4], player1, player1.PlayerWeapon2);
                                            return;
                                        }
                                        break;
                                    }
                                }
                                else
                                {
                                    WarriorActions(player1, monsters);
                                    Thread.Sleep(500);
                                }
                            }
                        }
                        else
                        {
                            Console.WriteLine("No nearby enemies!");
                            WarriorActions(player1, monsters);
                        }
                    }
                }
                else
                {
                    if (monsters.Count == 0)
                    {
                        Console.WriteLine("You Win");
                        code.LootPhase(player1, monsters, GetRandom(1, 10));
                    }
                }
                break;

            case "2":
                player1.Block = player1.Player_Defend(player1);
                Thread.Sleep(500);
                break;

            case "3":
                Console.WriteLine("Which Weapon do you want to use to Parry?\n");
                Console.WriteLine("1) Slot 1: " + player1.EntityWeapon.name + " weapon level: " + player1.EntityWeapon.weaponlevel + " weapon damage: " + player1.EntityWeapon.weaponDamage);
                Console.WriteLine("2) Slot 2: " + player1.PlayerWeapon2.name + " weapon level: " + player1.PlayerWeapon2.weaponlevel + " weapon parry: " + player1.PlayerWeapon2.weaponParry);
                playerInput = Console.ReadLine();
                try
                {
                    playerAnswer = Int32.Parse(playerInput);
                }
                catch
                {
                    WarriorActions(player1, monsters);
                }
                if (playerAnswer == 1)
                {
                    player1.Parry = player1.Player_Parry(player1, player1.EntityWeapon);
                    return;
                }
                if (playerAnswer == 2)
                {
                    player1.Parry = Player_Parry(player1, player1.PlayerWeapon2);
                    return;
                }
                else
                {
                    WarriorActions(player1, monsters);
                }
                Thread.Sleep(500);
                break;

            case "4":
                if (player1.Health < player1.maxHealth)
                {
                    player1.Health = player1.Player_Heal(player1);
                    Console.WriteLine(player1.Name + " has reduced their bleeding status by one!");
                    player1.entityBleeding -= 1;
                    Console.WriteLine(player1.Name + "'s bleed: " + player1.entityBleeding);
                    Thread.Sleep(500);
                }
                else
                {
                    Console.WriteLine("You are at maximum health!");
                }
                break;

            case "5":
                player1.Dodge = player1.Player_Dodge(player1);
                Thread.Sleep(500);
                break;

            case "6":
                Map map = new Map("Base_Map");
                Move(player1, map, monsters, player1, monsters[0]);
                break;

            case "7":
                Console.WriteLine("Your Potions: ");
                for (int i = 0; i < player1.entityPotions.Count - 1; i++)
                {
                    Console.WriteLine(i + ") " + player1.entityPotions[i].name);
                }
                Console.WriteLine("Which would you like to use?");
                int    newerInput = 0;
                string newInput   = Console.ReadLine();
                try
                {
                    newerInput = Int32.Parse(newInput);
                }
                catch { WarriorActions(player1, monsters); }
                if (newerInput ! > 3 && newerInput ! < 1 && player1.entityPotions[newerInput].name != "Empty_Potion")
                {
                    Basic_Map code2 = new Basic_Map("Base_Map");
                    if (player1.entityPotions[newerInput].name == "Fire_Potion" && Entity.GetNearestEntity(player1, monsters, player1, code2).posX <= player1.posX + 3 && Entity.GetNearestEntity(player1, monsters, player1, code2).posX >= player1.posX - 3 && Entity.GetNearestEntity(player1, monsters, player1, code2).posY <= player1.posY + 3 && Entity.GetNearestEntity(player1, monsters, player1, code2).posY >= player1.posY - 3)
                    {
                        player1.entityPotions[newerInput].PotionEffect("Fire_Potion", Entity.GetNearestEntity(player1, monsters, player1, code2), player1.entityPotions[newerInput].damage);
                        player1.entityPotions.Remove(player1.entityPotions[newerInput]);
                        Potion empty = new Potion("Empty_potion", player1.entityPotions.Count + 1);
                        player1.entityPotions.Add(empty);
                    }
                }
                if (player1.entityPotions[newerInput].name == "Health_Potion" && player1.Health < player1.maxHealth)
                {
                    player1.entityPotions[newerInput].PotionEffect("healing", player1, player1.entityPotions[newerInput].damage);
                    player1.entityPotions.Remove(player1.entityPotions[newerInput]);
                    Potion empty = new Potion("Empty_potion", player1.entityPotions.Count + 1);
                    player1.entityPotions.Add(empty);
                }
                break;

            case "Stats":
                Console.WriteLine("1) see your stats");
                Console.WriteLine("2) see monster's stats");
                Console.WriteLine("3) see your Gear stats");
                string statsType = Console.ReadLine();
                if (statsType == "1")
                {
                    array.RenderPlayerStats(player1);
                }
                if (statsType == "2")
                {
                    for (int i = 0; i < monsters.Capacity; i++)
                    {
                        if (monsters[i] != null)
                        {
                            array.RenderMonsterStats(monsters[i]);
                        }
                        else
                        {
                            Console.WriteLine("(defeated monster)");
                        }
                    }
                }
                if (statsType == "3")
                {
                    array.RenderPlayerGearStats(player1);
                }
                WarriorActions(player1, monsters);
                break;

            case "8":
                if (player1.level >= 1)
                {
                    int monsterList = 1;
                    Console.WriteLine("Which Foe?\n");
                    for (int i = 0; i < monsters.Count; i++)
                    {
                        if (monsters[i] != null)
                        {
                            if (monsters[i].Health > 0 && monsters[i].posX == player1.posX || monsters[i].posX == player1.posX + 1 || monsters[i].posX == player1.posX - 1 && monsters[i].posY == player1.posY || monsters[i].posY == player1.posY + 1 || monsters[i].posY == player1.posY - 1)
                            {
                                Console.WriteLine(monsterList + ") " + monsters[i].Name);
                                monsterList += 1;
                            }
                        }
                    }
                    int    playerAnswer2 = 0;
                    string playerInput2  = Console.ReadLine();
                    try
                    {
                        playerAnswer2 = Int32.Parse(playerInput2);
                    }
                    catch
                    {
                        WarriorActions(player1, monsters);
                    }
                    switch (playerAnswer2)
                    {
                    case 1:
                        if (monsters[0] != null)
                        {
                            monsters[0].Health = Colossal_Smash(player1, monsters[0], player1.EntityWeapon);
                            return;
                        }
                        break;

                    case 2:
                        if (monsters[1] != null)
                        {
                            monsters[1].Health = Colossal_Smash(player1, monsters[1], player1.EntityWeapon);
                            return;
                        }
                        break;

                    case 3:
                        if (monsters[2] != null)
                        {
                            monsters[2].Health = Colossal_Smash(player1, monsters[2], player1.EntityWeapon);
                            return;
                        }
                        break;

                    case 4:
                        if (monsters[3] != null)
                        {
                            monsters[3].Health = Colossal_Smash(player1, monsters[3], player1.EntityWeapon);
                            return;
                        }
                        break;

                    case 5:
                        if (monsters[4] != null)
                        {
                            monsters[4].Health = Colossal_Smash(player1, monsters[4], player1.EntityWeapon);
                            return;
                        }
                        break;
                    }
                }
                else
                {
                    WarriorActions(player1, monsters);
                }
                break;

            case "see inventory":
                break;

            default:
                WarriorActions(player1, monsters);
                break;
            }
            for (int i = 0; i < monsters.Count; i++)
            {
                if (monsters[i] != null)
                {
                    if (monsters[i].Health <= 0)
                    {
                        Console.WriteLine("You have defeated " + monsters[i].Name + "!");
                        player1.ExperienceClamp(player1, 50 + monsters[i].level);
                        monsters.Remove(monsters[i]);
                    }
                }
            }
            return;
        }