Example #1
0
 public static void Event4(Dungeon d, Creature p, Event e)
 {
     Console.Clear();
     Console.WriteLine("You find yourself in a hallway, connecting the kitchens to the rest of the castle\nThis area is run by The Cook.\nBe careful, those who run afoul of him often end up in his stew");
     Explore.currentShell.encountered = true;
     Utilities.Keypress();
     Explore.GameDungeon(d, p);
 }
Example #2
0
 public static void Event3(Dungeon d, Creature p, Event e)
 {
     Console.Clear();
     Console.WriteLine("You find yourself in a hallway, connecting the servant's quarters to the rest of the castle\nSomewhere in there is Cecil, the head butler.\nPerhaps he will have the key you need to access the owner's private quarters?");
     Explore.currentShell.encountered = true;
     Utilities.Keypress();
     Explore.GameDungeon(d, p);
 }
Example #3
0
 public static void Event1(Dungeon d, Creature p, Event e)
 {
     Console.Clear();
     Console.WriteLine(e.flavor);
     Event.TFRescued = true;
     Explore.currentShell.encountered = true;
     Utilities.Keypress();
     Explore.GameDungeon(d, p);
 }
Example #4
0
 public static void Event1(Dungeon d, Creature p, Event e)
 {
     Console.Clear();
     Console.WriteLine("You see several townsfolk huddling for warmth, obviously scared.\nOne comes up to you to speak\n\n" + Colour.SPEAK + "'Thank god you're here! We'd given up all hope!" +
                       "\nUntie us and we will reward you handomely when we get back!'\n\n" + Colour.RESET + "You untie them and point the way out.\n" +
                       "Be sure to meet them in the tavern afterwards to claim your reward.\n\nThat is.... if you live");
     Event.TFRescued = true;
     RescueName      = Family.FamilyFirstNames[0];
     Explore.currentShell.encountered = true;
     Utilities.Keypress();
     Explore.GameDungeon(d, p);
 }
Example #5
0
    public static void FightReward(Dungeon d, Creature p)
    {
        Utilities.Keypress();
        Console.Clear();
        int    goldroll = Utilities.rand.Next(-2, 6);
        int    xproll   = Utilities.rand.Next(-1, 3);
        double goldAdd  = (Combat.GoldReward + (goldroll * d.tier)) * d.diminishingReturns;
        int    gold     = Convert.ToInt32(goldAdd);
        double xpAdd    = Combat.XPReward + (xproll * d.tier) * d.diminishingReturns;
        int    xp       = Convert.ToInt32(xpAdd);

        Console.WriteLine("You have defeated your enemies\n");
        Console.WriteLine($"You find {gold} gold");
        p.gold += gold;
        Console.WriteLine($"You gain {xp} experience");
        p.xp += xp;
        if (p.xp >= LevelMaster.xpRequired[p.level])
        {
            Utilities.ColourText(Colour.XP, "YOU ARE ELIGIBLE FOR A LEVEL RAISE\n");
        }
        //Get the drops on the drop list
        for (int i = 0; i < Combat.DropList.Count; i++)
        {
            //If you already have it, increase the amount. Otherwise, add it to the list
            Console.WriteLine($"You find a {Combat.DropList[i].name}");
            bool exists = false;
            for (int x = 0; x < p.Drops.Count; x++)
            {
                if (p.Drops[x] == Combat.DropList[i])
                {
                    p.Drops[x].amount++;
                    exists = true;
                    break;
                }
            }
            if (exists == false)
            {
                p.Drops.Add(Combat.DropList[i]);
            }
        }
        Utilities.Keypress();
        Explore.currentShell.encountered = true;
        if (Combat.bossFight)
        {
            BossReward(d, p);
        }
        Explore.GameDungeon(d, p);
    }
Example #6
0
    public static void RoomSearch(Room room, Dungeon d, Creature p)
    {
        Console.Clear();
        //Search or move on. Search can get stuff but risks a fight if you didn't have one yet.
        Console.WriteLine("You appear to be alone... for now");
        Console.WriteLine("You can either [S]earch the room or [M]ove on");
        Console.WriteLine("\nWhat would you like to do?");
        string choice = Console.ReadKey(true).KeyChar.ToString().ToLower();

        if (choice == "m")
        {
            Explore.currentShell.encountered = true;
            Explore.GameDungeon(d, p);
        }

        if (choice == "s")
        {
            //Make a list for events, only add if successful
            EventDisplay = new List <Event> {
            };
            Console.Clear();
            Console.Write("You find");
            Utilities.DotDotDotSL();
            Console.Write(" ");
            for (int i = 0; i < room.EventArray.Length; i++)
            {
                //if successful, add event to list
                int EventSuccessRoll = Utilities.rand.Next(1, 101);
                if (EventSuccessRoll <= room.EventArray[i].success)
                {
                    EventDisplay.Add(room.EventArray[i]);
                }
            }
            //Tell us what we won!
            string a = (EventDisplay.Count == 3) ? $"{EventDisplay[0].flavor},{EventDisplay[1].flavor} and {EventDisplay[2].flavor}" : (EventDisplay.Count == 2) ? $"{EventDisplay[0].flavor} and {EventDisplay[1].flavor}" : (EventDisplay.Count == 1) ? $"{EventDisplay[0].flavor}" : "Nothing!";
            Console.WriteLine(a);
            Console.WriteLine("");
            // Now give it to me!
            Reward.RoomSearch(room, d, p, EventDisplay, d.tier);
            Utilities.Keypress();
        }
        else
        {
            RoomSearch(room, d, p);
        }
    }
Example #7
0
 public static void RegularRoom(Dungeon d, Creature p, Shell currentShell)
 {
     //Check for monsters
     Monster.Summon(currentShell.assignedRoom, d, p);
     //Get a chance to explore
     RoomSearch(currentShell.assignedRoom, d, p);
     //If you chose not to explore it's back to main dungeon screen, this second chance at baddies is risk for searching
     //You may have been heard
     Console.Clear();
     Console.Write("You hear shuffling in the distance, were you heard?");
     Utilities.DotDotDot();
     Monster.Summon(currentShell.assignedRoom, d, p);
     if (d.monsterSummon > 50)
     {
         Console.WriteLine("Phew! You got luckey!");
     }
     else
     {
         Console.WriteLine("No one came to investigate.\nNot surprising, the dungeon seems pretty empty");
     }
     Utilities.Keypress();
     Explore.currentShell.encountered = true;
     Explore.GameDungeon(d, p);
 }
Example #8
0
    public static void Event2(Dungeon d, Creature p, Event e)
    {
        Console.Clear();
        bool key = false;

        for (int i = 0; i < p.Drops.Count; i++)
        {
            if (p.Drops[i].name == "Chest Key" && p.Drops[i].amount > 0)
            {
                key = true;
            }
        }
        Console.WriteLine(e.flavor);
        Utilities.EmbedColourText(Colour.DAMAGE, "You could ", "bash", " the lock, but risk destroying the contents");
        Utilities.EmbedColourText(Colour.ABILITY, "You could", " pick", " the lock, but in the time it takes, more monsters may find you");
        Utilities.EmbedColourText(Colour.NAME, "If only you had a", " key", "!\n\n");
        Utilities.EmbedColourText(Colour.DAMAGE, Colour.ABILITY, Colour.NAME, "", "[B]", "ash the lock        ", "[P]", "ick the lock             ", "[K]", "ey            [R]eturn");
        string choice = Console.ReadKey(true).KeyChar.ToString().ToLower();

        if (choice == "b")
        {
            Console.Clear();
            Utilities.ColourText(Colour.DAMAGE, "BLAM!");
            Utilities.DotDotDot();
            Console.WriteLine("\n\n\n\n\n\n\n");
            int bashRoll = Utilities.rand.Next(1, 101);
            if (bashRoll <= e.success + e.effect)
            {
                Console.WriteLine("Success!\n\n");
                Thread.Sleep(300);
                Reward.TreasureLootTable(d.tier, p);
                Utilities.Keypress();
            }
            else
            {
                Console.WriteLine("Failure!");
                Thread.Sleep(300);
                Console.WriteLine("It looks like the valuables inside were fragile indeed. Oh well, maybe next time");
                Utilities.Keypress();
            }
        }
        else if (choice == "p")
        {
            Console.Clear();
            Utilities.ColourText(Colour.ABILITY, "CHICK CHICK!");
            Utilities.DotDotDot();
            Console.WriteLine("\n\n\n\n\n\n\n");
            int pickRoll = Utilities.rand.Next(1, 101);
            if (pickRoll <= e.success)
            {
                Console.WriteLine("Success!\n\n");
                Thread.Sleep(300);
                Reward.TreasureLootTable(d.tier, p);
                Utilities.Keypress();
            }
            else if (pickRoll > e.success && pickRoll <= e.success + e.effect)
            {
                Console.WriteLine("You got in!\n\n");
                Thread.Sleep(300);
                Reward.TreasureLootTable(d.tier, p);
                Utilities.Keypress();
                Console.WriteLine("\nThat took a while though, it looks like someone found you!");
                p.force = true;
                Utilities.Keypress();
                Console.Clear();
                Monster.Summon(Room.StarterSpecialRoomList[2], d, p);
            }
            else
            {
                Console.WriteLine("Failure!");
                Thread.Sleep(300);
                Console.WriteLine("Not only could you not get in, you took so long that someone found you!");
                p.force = true;
                Utilities.Keypress();
                Console.Clear();
                Monster.Summon(Room.StarterSpecialRoomList[2], d, p);
            }
        }
        else if (choice == "k" && key == true)
        {
            Console.Clear();
            Utilities.ColourText(Colour.NAME, "CLICK!");
            Utilities.DotDotDot();
            Console.WriteLine("\n\n\n\n\n\n\n");
            Console.WriteLine("Success!\n\n");
            Thread.Sleep(300);
            Console.WriteLine("Inside you find a bunch of treasure, to be described later!");
            Utilities.Keypress();
        }
        else if (choice == "k" && key == false)
        {
            Utilities.EmbedColourText(Colour.NAME, "\n\nYou don't have a ", "key", "!");
            Utilities.Keypress();
            Event1(d, p, e);
        }
        else if (choice == "r")
        {
            Explore.currentShell.encountered = true;
            Explore.GameDungeon(d, p);
        }
        else if (choice == "x")
        {
            p.Drops.Add(new Drop("Chest Key", 1, 100, 1));
            Event1(d, p, e);
        }
        else
        {
            Event1(d, p, e);
        }
        Explore.currentShell.encountered = true;
        Explore.GameDungeon(d, p);
    }
Example #9
0
    public static void Event3(Dungeon d, Creature p, Event e)
    {
        Console.Clear();
        Console.WriteLine(e.flavor);
        Utilities.EmbedColourText(Colour.ENERGY, "You could ", "study ", "the runes, trying to learn the secrets of the Orc gods");
        Utilities.EmbedColourText(Colour.DAMAGE, "You could ", "desecrate ", "the runes, angering the orcs but possibly interrupting their power source");
        Utilities.EmbedColourText(Colour.MITIGATION, "You could ", "walk away, ", "moving on to the next room\n\n");
        Utilities.EmbedColourText(Colour.ENERGY, Colour.DAMAGE, Colour.MITIGATION, "", "[S]", "tudy        ", "[D]", "esecrate             ", "[W]", "alk away\n\n");
        string choice = Console.ReadKey(true).KeyChar.ToString().ToLower();

        if (choice == "s")
        {
            Console.Clear();
            Utilities.ColourText(Colour.ENERGY, "Studying");
            Utilities.DotDotDot();
            Console.WriteLine("\n\n\n\n\n\n\n");
            int roll = Utilities.rand.Next(1, 101);
            if (roll <= 75)
            {
                if (p.health < p.maxHealth)
                {
                    Utilities.ColourText(Colour.ENERGY, "Success! ");
                    Utilities.EmbedColourText(Colour.HEALTH, "Your ", "health ", "returns to maximum!");
                    p.health = p.maxHealth;
                }
                else
                {
                    Console.WriteLine("Sadly, you glean very little from the runes");
                }
            }
            else
            {
                Utilities.ColourText(Colour.DAMAGE, "This was not for you to know! It's too much for your mind or body!");
                p.health = 1;
                Utilities.EmbedColourText(Colour.HEALTH, Colour.DAMAGE, "Your ", "health ", "is reduced to ", "1", "!");
            }
            Utilities.Keypress();
            Explore.currentShell.encountered = true;
            Explore.GameDungeon(d, p);
        }
        if (choice == "d")
        {
            Console.Clear();
            Utilities.ColourText(Colour.DAMAGE, "Desecrating");
            Utilities.DotDotDot();
            Console.WriteLine("\n\n\n\n\n\n\n");
            int roll = Utilities.rand.Next(1, 101);
            if (roll <= 25)
            {
                Utilities.ColourText(Colour.HEALTH, "Success! ");
                desecrated = true;
                Utilities.EmbedColourText(Colour.HEALTH, "You hear screams from further in the dungeon!\nNext fight, every monster starts with", " HALF ", "health!");
            }
            else
            {
                Utilities.ColourText(Colour.DAMAGE, "You have made the gods angry!");
                Utilities.EmbedColourText(Colour.HEALTH, Colour.DAMAGE, "Your ", "health ", "is reduced to ", "1", "!");
            }
            Utilities.Keypress();
            Explore.currentShell.encountered = true;
            Explore.GameDungeon(d, p);
        }
        if (choice == "w")
        {
            Explore.currentShell.encountered = true;
            Explore.GameDungeon(d, p);
        }
        else
        {
            Event3(d, p, e);
        }
    }