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)
        {
            switch (Factory.RNG.DrawCryptCard())
            {
            case 1:
                Factory.Console.Output("The crypt was empty.");
                break;

            case 2:
                Factory.Console.Output("You find a pile of old bones. Roll a d6");
                Factory.Console.Input();
                int playerRoll = Factory.RNG.RollD6();
                Factory.Console.Output("You rolled {0}.", playerRoll);
                if (playerRoll <= 3)
                {
                    Factory.Console.Output("The bones rattled and pull themselves together to attack!");
                    playerToDraw.Fight();
                }
                else
                {
                    Factory.Console.Output("Just a dead adventurer. Loot their corpse? [Y/N]");
                    string input1 = Factory.Console.Input().ToUpper();
                    switch (input1)
                    {
                    case "Y":
                        CorpseCard newCorpseCard = new CorpseCard();
                        newCorpseCard.Draw(playerToDraw);
                        break;

                    case "N":
                        break;

                    default:
                        break;
                    }
                }
                break;

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

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

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

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