示例#1
0
        public static void FightSequence(Enemy currentEnemy)
        {
Start:
            Console.Clear();
            Design.GameUI();
            ViewStats.PlayerStats();
            ViewStats.EnemyStats(currentEnemy);
            if (currentEnemy.enemyStamina > 0 && Program.player.characterStamina > 0)
            {
                Console.Clear();
                Design.GameUI();
                ViewStats.PlayerStats();
                ViewStats.EnemyStats(currentEnemy);
                int characterDice = Dice.Roll(12);
                int enemyDice     = Dice.Roll(12);

                Console.WriteLine("Press space to roll...");
                Console.ReadKey();
                Console.WriteLine(Program.player.characterName + " rolled " + characterDice + " giving an ATTACK SKILL of " + (Program.player.characterSkill + characterDice) + "!");
                Console.WriteLine(currentEnemy.enemyName + " rolled " + enemyDice + " giving an ATTACK SKILL of " + (currentEnemy.EnemySKill + enemyDice) + "!");
                Program.player.battleCharacterSkill = Program.player.characterSkill;
                Program.player.battleCharacterSkill = Program.player.characterSkill + characterDice;
                int battleEnemySkill = currentEnemy.EnemySKill + enemyDice;
                if (Program.player.battleCharacterSkill > battleEnemySkill)
                {
                    Console.WriteLine(Program.player.characterName + " smites the " + currentEnemy.EnemyName + " and inflicts 2 DAMAGE");
                    currentEnemy.EnemyStamina = currentEnemy.EnemyStamina - 2;
                    Console.WriteLine("Press space to continue...");
                    Console.ReadKey();
                    goto Start;
                }
                if (Program.player.battleCharacterSkill < battleEnemySkill)
                {
                    Console.WriteLine(currentEnemy.EnemyName + " attacks " + Program.player.characterName + " dealing 2 DAMAGE");
                    Program.player.characterStamina = Program.player.characterStamina - 2;
                    Console.WriteLine("Press space to continue...");
                    Console.ReadKey();
                    goto Start;
                }
                if (Program.player.battleCharacterSkill == battleEnemySkill)
                {
                    Console.WriteLine("You missed each others attacks!!!");
                    Console.WriteLine("Press space to continue...");
                    Console.ReadKey();
                    goto Start;
                }
            }
            else if (Program.player.characterStamina <= 0)
            {
                Design.Dead();
                Console.WriteLine("\nToo bad you died!");
                Console.WriteLine("Press space to go back to the start...");
                Console.ReadKey();
            }
            else if (currentEnemy.EnemyStamina <= 0)
            {
                Console.WriteLine(Program.player.characterName + " of " + Program.player.birthName + " slayed " + currentEnemy.enemyName + "!");
                Console.WriteLine(Program.player.characterName + " of " + Program.player.birthName + " replenishes 2 STAMINA!");
                Program.player.characterStamina = Program.player.characterStamina + 2;
                Console.WriteLine("Press space to continue...");
                Console.ReadKey();
            }
        }
示例#2
0
        public static void castle()
        {
            Console.Clear();
            Design.GameUI();
            ViewStats.PlayerStats();
            Console.WriteLine("Marching towards the castle you notice a two highwaymen coming towards you. \nWill you stand and fight or flee?");
            Console.WriteLine("Type 'Fight' to face them or 'Flee' to try and avoid them...");
            Program.fightOrFlee = Console.ReadLine();
            if (Program.fightOrFlee == "Fight" || Program.fightOrFlee == "fight")
            {
                Console.WriteLine("Prepare for battle!!!!");
                Console.WriteLine("Press any key to continue...");
                Fight.FightSequence(Program.highwayMan);
            }
            else if (Program.fightOrFlee == "Flee" || Program.fightOrFlee == "flee")
            {
                Console.WriteLine("You try and flee but the Highwaymen were aware of your tactics...");
                Console.WriteLine("You lose 2 STAMINA for being such a coward...");
                Program.player.characterStamina = Program.player.characterStamina - 2;
                Console.WriteLine("Press any key to continue...");
                Fight.FightSequence(Program.highwayMan);
            }

            Console.Clear();
            Design.GameUI();
            ViewStats.PlayerStats();
            Console.WriteLine("Dick Turpin: 'You killed my best mate you bastard! You will pay for this!'");
            Console.WriteLine("Prepare for battle!");
            Console.ReadKey();
            Fight.FightSequence(Program.dickTurpin);
            Console.Clear();
            Design.GameUI();
            ViewStats.PlayerStats();
            Console.WriteLine("Dick Turpin lays on the floor begging you to spare his life. What will you do?");
            Console.WriteLine("Press 'K' to finish off Dick Turpin or 'S' to spare him...");
            Program.killOrSpare = Console.ReadLine();
            if (Program.killOrSpare == "k" || Program.killOrSpare == "K")
            {
                Console.WriteLine(Program.player.characterName + " of " + Program.player.birthName + " clenches his fist once more and \n sees Dick Turpin on his knees. The knuckes bust through his face...");
                Console.WriteLine("Dick Turpin is Dead...");
                Console.WriteLine("You lose 1 SKILL for being so Evil...");
                Program.player.characterSkill = Program.player.characterSkill - 1;
                Console.WriteLine("Press any key to continue...");
                Console.ReadKey();
            }
            else if (Program.killOrSpare == "s" || Program.killOrSpare == "S")
            {
                Console.WriteLine("Dick Turpin is very thankful and gives you his sword...");
                Console.WriteLine(Program.player.characterName + " of " + Program.player.birthName + " received Great Sword of Justice...");
                Console.WriteLine("You gain 2 SKILL...");
                Program.player.characterSkill = Program.player.characterSkill + 2;
                Console.WriteLine("Press any key to continue...");
                Console.ReadKey();
            }

            Console.Clear();
            Design.GameUI();
            ViewStats.PlayerStats();
            Console.WriteLine("This was not a good route to take. Ahead you see multiple people coming from the castle.\nYou turn around.");
            Console.WriteLine("You sprint back the way you came and lose 1 STAMINA from over working yourself.");
            Program.player.characterStamina = Program.player.characterStamina - 1;
            Console.WriteLine("Press any key to continue....");
            Console.ReadLine();
            harbour();
        }