Example #1
0
        public void DrawWithNumber(Player playerToDraw, int dungeonCardNum)
        {
            switch (Factory.RNG.DrawDungeonCard())
            {
            case 1:
                Factory.Console.Output("The room is empty.");
                break;

            case 2:
                Factory.Console.Output("Ambush!");
                playerToDraw.Fight();
                break;

            case 3:
                Factory.Console.Output("Hidden Trap! Draw a trap card.");
                Factory.Console.Input();
                TrapCard newTrap = new TrapCard();
                newTrap.Draw(playerToDraw);
                break;

            case 4:
                Factory.Console.Output("You find the corpse of an unfortunate explorer. Loot it? [Y/N]");
                string input = Factory.Console.Input().ToUpper();
                switch (input)
                {
                case "Y":
                    CorpseCard newCorpseCard = new CorpseCard();
                    newCorpseCard.Draw(playerToDraw);
                    break;

                default:
                    break;
                }
                break;

            case 5:
                Factory.Console.Output("You find the crypt of a long dead warrior. Loot the crypt? [Y/N]");
                string input1 = Factory.Console.Input().ToUpper();
                switch (input1)
                {
                case "Y":
                    CryptCard newCryptCard = new CryptCard();
                    newCryptCard.Draw(playerToDraw);
                    break;

                default:
                    break;
                }
                break;

            case 6:
                Factory.Console.Output("You found some gold! (100 gold)");
                playerToDraw.GoldValue += 100;
                break;

            case 7:
                Factory.Console.Output("You found some gold! (50 gold)");
                playerToDraw.GoldValue += 50;
                break;

            case 8:
                Factory.Console.Output("You found some gold! (200 gold)");
                playerToDraw.GoldValue += 200;
                break;

            case 9:
                Factory.Console.Output("Wizard's Curse! Rotate all coridoors 90 degrees.");
                foreach (Tile thisParticularTile in Board.Instance.Tiles)
                {
                    if (thisParticularTile != null && thisParticularTile.GetType().Equals(typeof(Corridor)))
                    {
                        thisParticularTile.Rotate();
                    }
                }
                break;

            case 10:
                Factory.Console.Output("You found an Unstable Potion!");
                playerToDraw.NumberOfUnstablePotions++;
                break;

            case 11:
                Factory.Console.Output("You found an Unstable Potion!");
                playerToDraw.NumberOfUnstablePotions++;
                break;

            case 12:
                Factory.Console.Output("You encounter a grumpy Wizard who telports you to a random room in the dungeon.");
                playerToDraw.XPosition = Factory.RNG.RandomXPosition();
                playerToDraw.YPosition = Factory.RNG.RandomYPosition();
                Factory.Console.Input();
                Factory.Console.Output("You were teleported to: ({0}, {1})", playerToDraw.XPosition, playerToDraw.YPosition);
                if (Board.Instance.Tiles[playerToDraw.XPosition, playerToDraw.YPosition] == null)
                {
                    Board.Instance.MakeNewRandomTile(playerToDraw.XPosition, playerToDraw.YPosition, Factory.RNG.RandomDirection0To3());
                }
                Board.Instance.Tiles[playerToDraw.XPosition, playerToDraw.YPosition].TileDoThings(playerToDraw);
                break;

            default:
                Factory.Console.Output("The room is empty.");
                break;
            }
        }
Example #2
0
        public override void Draw(Player playerToDraw)
        {
            playerToDraw.NumberOfCatacombsCards++;
            switch (Factory.RNG.DrawCatacombCard())
            {
            case 1:
                Factory.Console.Output("You found a way out!");
                playerToDraw.ExitCatacombs();
                break;

            case 2:
                Factory.Console.Output("You found a hole in the ceiling! Test agility. If you suceed, exit the catacombs.");
                Factory.Console.Input("Your agility: " + playerToDraw.Agility);
                int agilityRoll = Factory.RNG.RollD6() + Factory.RNG.RollD6();
                Factory.Console.Output("You rolled: {0}.", agilityRoll);
                if (agilityRoll <= playerToDraw.Agility)
                {
                    playerToDraw.ExitCatacombs();
                }
                break;

            case 3:
                Factory.Console.Output("Vampire attack! Suffer 1d6 wounds, then test armour.");
                int vampDamage = Factory.RNG.RollD6();
                Factory.Console.Input("You take " + vampDamage + " damage.");
                playerToDraw.Health -= vampDamage;
                Factory.Console.Input("Your armour: " + playerToDraw.Armour);
                int armourRoll = Factory.RNG.RollD6() + Factory.RNG.RollD6();
                Factory.Console.Output("You rolled: {0}.", armourRoll);
                if (armourRoll > playerToDraw.Armour)
                {
                    playerToDraw.BittenByVamp = true;
                    Factory.Console.Input("Suffer 1 damage every turn you are in the catacombs.");
                }
                break;

            case 4:
                Factory.Console.Output("You stumble over a corpse in the darkness. Loot it? [Y/N]");
                string input1 = Factory.Console.Input().ToUpper();
                switch (input1)
                {
                case "Y":
                    CryptCard newCryptCard = new CryptCard();
                    newCryptCard.Draw(playerToDraw);
                    break;

                default:
                    break;
                }
                break;

            case 5:
                Factory.Console.Output("You found an Unstable Potion!");
                playerToDraw.NumberOfUnstablePotions++;
                break;

            case 6:
                Factory.Console.Output("You found some gold! (250 gold)");
                playerToDraw.GoldValue += 250;
                break;

            case 7:
                Factory.Console.Output("You activated over a tripwire! Draw a trap card.");
                Factory.Console.Input();
                TrapCard newTrap = new TrapCard();
                newTrap.Draw(playerToDraw);
                break;

            case 8:
                Factory.Console.Input("A monster leaped out of the darkness!");
                playerToDraw.Fight();
                break;

            case 9:
                Factory.Console.Input("Two monsters attacked!");
                playerToDraw.Fight();
                if (playerToDraw.Health > 0)
                {
                    playerToDraw.Fight();
                }
                break;

            case 10:
                Factory.Console.Output("You found a large diamond! (4000 gold)");
                playerToDraw.GoldValue += 4000;
                break;

            default:
                Factory.Console.Output("You found a way out!");
                playerToDraw.ExitCatacombs();
                break;
            }
        }