Exemplo n.º 1
0
        internal Player The_Plague_Lands(Player play)
        {
            Console.Clear();
            player = play;
            Area area = new Area("The_Plague_Lands", 6);
            player.Area = area;
            player.updateQuests(null, player.Area, null, 0, 0, 0);
            Console.WriteLine("As you enter the dark forest you feel an itching all over your body \n" +
                "the dirt looks tainted and all the leaves withered away. \n" +
                "you look around and spot a single hill with a castle upon \n" +
                "and around the hill you spot a huge graveyard");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to Graveyard (level 7)");
            Console.WriteLine("2 Go to Orexdale (level 3)");
            Console.WriteLine("3 Go to Undead Castle (level 9)");
            Console.WriteLine("4 Save your progress");
            int choice = 0;
            try_again:
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = Graveyard(player);
                    break;
                case 2:
                    player = Orexdale(player);
                    break;
                case 3:
                    player = Undead_Castle(player);
                    break;
                case 4:
                    return player;
            }
            return player;
        }
Exemplo n.º 2
0
        internal Player The_Stocades(Player play)
        {
            Console.Clear();
            player = play;
            Area area = new Area("The_Stocades", 7);
            player.Area = area;
            Console.WriteLine("As you go down the staircase one of the advisors come running towards you \n" +
                                "if you wanna go into the dungeon, please atleast take your equipment with you \n" +
                                "he hands back all your equipment and as you take it on and go towards the dungeon \n" +
                                "he blesses you");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to The Fery");
            Console.WriteLine("2 Save your progress");
            int choice = 0;
            try_again:
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = The_Fery(player);
                    break;
                case 2:
                    return player;

            }
            return player;
        }
Exemplo n.º 3
0
        internal Player Saepegox(Player play)
        {
            Console.Clear();
            player = play;
            Area area = new Area("Saepegox", 2);
            player.Area = area;
            try_again:
            Console.Clear();
            Console.WriteLine("The desert stretches out as far as your eyes can see, you spot a single oasis \n" +
                                "and wonder whether to turn back or head to it \n");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine("The area consist of Mummies, Pharoahs and Sphinxs");
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to the Eirin (level 1)");
            Console.WriteLine("2 Go to the Oasis of Jaagi (level 5)");
            Console.WriteLine("3 Explore the area");
            Console.WriteLine("4 Save your progress");
            int choice = 0;

            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = Eirin(player);
                    break;
                case 2:
                    player = Oasis_Of_Jaagi(player);
                    break;
                case 3:
                    Console.Clear();
                    switch (rng.Next(1, 3))
                    {
                        case 1:
                            Enemy enemy = SaepegoxEnemy(area.Level);
                            Monster tama = chooseMonster(player);
                            Console.WriteLine("Enemy: " + combatStrength(enemy.Tama));
                            Console.WriteLine("You: " + combatStrength(tama));
                            player = FM.FightMonster(player, tama, enemy);
                            goto try_again;
                        case 2:
                            int money = exploreAreaMoney(area.Level);
                            Console.WriteLine("You found money " + money);
                            player.Money += money;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                    }
                    break;
                case 4:
                    return player;

            }
            return player;
        }
Exemplo n.º 4
0
        internal Player The_Fery(Player play)
        {
            Console.Clear();
            player = play;
            Area area = new Area("The_Fery", 1);
            player.Area = area;
            Console.WriteLine("You approach the castle, but as you reach the gate 2 guards stop you and asks \n" +
                                "to put away your equipment while your inside the castle. \n" +
                                "You put the equipment away and as you enter the castle you see a \n" +
                                "staircase leading to a dungeon and the king sitting as his throne.");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to The Stocades (dungeon level 7)");
            Console.WriteLine("2 Go to Ferrington (city)");
            Console.WriteLine("3 Save your progress");
            int choice = 0;
            try_again:
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = The_Stocades(player);
                    break;
                case 2:
                    player = Ferrington(player);
                    break;
                case 3:
                    return player;

            }
            return player;
        }
Exemplo n.º 5
0
        internal Player Orexdale(Player play)
        {
            Console.Clear();
            player = play;
            Area area = new Area("Orexdale", 3);
            player.Area = area;
            try_again:
            Console.WriteLine("You travel out of the gate and look beyond the horizon and see huge open area of grass and river \n" +
                "you even spot a waterfall across the landscape and far away you see a dark forest with smoke lurking above it \n" +
                 "as you look even further you even spot a few mountains");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine("The area consist of Gnomes, goblinscouts and rivermonsters");
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to Ferrington (city)");
            Console.WriteLine("2 Go to Mount Anor (level 5)");
            Console.WriteLine("3 Go to The Plague Lands (level 6)");
            Console.WriteLine("4 explore the mountains");
            Console.WriteLine("5 Save your progress");
            int choice = 0;

            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = Ferrington(player);
                    break;
                case 2:
                    player = Mount_Anor(player);
                    break;
                case 3:
                    player = The_Plague_Lands(player);
                    break;
                case 4:
                    Console.Clear();
                    switch (rng.Next(1, 4))
                    {
                        case 1:
                            Enemy enemy = OrexdaleEnemy(area.Level);
                            Monster tama = chooseMonster(player);
                            Console.WriteLine("Enemy: " + combatStrength(enemy.Tama));
                            Console.WriteLine("You: " + combatStrength(tama));
                            player = FM.FightMonster(player, tama, enemy);
                            goto try_again;
                        case 2:
                            int metal2 = exploreAreaMetal(area.Level);
                            Console.WriteLine("You found metal " + metal2);
                            player.Metal += metal2;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                        case 3:
                            int money = exploreAreaMoney(area.Level);
                            Console.WriteLine("You found money " + money);
                            player.Money += money;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                    }
                    break;
                case 5:
                    return player;
            }
            return player;
        }
Exemplo n.º 6
0
        internal Player Pladósh(Player play)
        {
            Console.Clear();
            Area area = new Area("Pladósh", 3);
            player = play;
            player.Area = area;
            try_again:
            int choice = 0;
            Console.Clear();
            Console.WriteLine("As you reach the swamp your feets seems to stick to the ground and a smoke starts to appear over the ground \n" +
                                "As you scout out the area you see a witchhut and decided wether to go visit it or explore the swamp \n");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine("The area consist of Fairies, Fireflies and Swamp Humanoids");
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to Eirin (level 1)");
            Console.WriteLine("2 Explore the swamp");
            Console.WriteLine("3 Go to the Withhut");
            Console.WriteLine("4 Save your progress");

            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = Eirin(player);
                    break;
                case 2:
                    Console.Clear();
                    switch (rng.Next(1, 4))
                    {
                        case 1:
                            Enemy enemy = PlagóshEnemy(area.Level);
                            Monster tama = chooseMonster(player);
                            Console.WriteLine("Enemy: " + combatStrength(enemy.Tama));
                            Console.WriteLine("You: " + combatStrength(tama));
                            player = FM.FightMonster(player, tama, enemy);
                            goto try_again;
                        case 2:
                            int herbs2 = exploreAreaHerb(area.Level);
                            Console.WriteLine("You found herbs " + herbs2);
                            player.Herbs += herbs2;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                        case 3:
                            int money = exploreAreaMoney(area.Level);
                            Console.WriteLine("You found money " + money);
                            player.Money += money;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                    }
                    break;
                case 3:
                    player = WitchHut(player);
                    break;
                case 4:
                    return player;
            }
            return player;
        }
Exemplo n.º 7
0
        internal Player Mount_Anor(Player play)
        {
            try_again:
            Console.Clear();
            player = play;
            Area area = new Area("Mount_Anor", 5);
            player.Area = area;
            Console.WriteLine("As you travel towards the mountains you feel an icy wind coming towards you, \n" +
                "it grows as you get closer and closer to the mountain and as you climb it \n" +
                "you start to feel your insides turn to ice.");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine("The area consist of eagles, iron golems and stone golems");
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to Orexdale (level 3)");
            Console.WriteLine("2 Explore the mountain");
            Console.WriteLine("3 Save your progress");
            int choice = 0;
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = Orexdale(player);
                    break;
                case 2:
                    Console.Clear();
                    switch (rng.Next(1, 4))
                    {
                        case 1:
                            Enemy enemy = MountAnorEnemy(area.Level);
                            Monster tama = chooseMonster(player);
                            Console.WriteLine("Enemy: " + combatStrength(enemy.Tama));
                            Console.WriteLine("You: " + combatStrength(tama));
                            player = FM.FightMonster(player, tama, enemy);
                            goto try_again;
                        case 2:
                            int metal2 = exploreAreaMetal(area.Level);
                            Console.WriteLine("You found metal " + metal2);
                            player.Metal += metal2;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                        case 3:
                            int money = exploreAreaMoney(area.Level);
                            Console.WriteLine("You found money " + money);
                            player.Money += money;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                    }
                    break;
                case 3:
                    return player;

            }
            return player;
        }
Exemplo n.º 8
0
        internal Player Oasis_Of_Jaagi(Player play)
        {
            Console.Clear();
            player = play;
            Area area = new Area("Oasis_Of_Jaagi", 5);
            player.Area = area;
            Console.Clear();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to the Saepegox");
            Console.WriteLine("2 Save your progress");
            int choice = 0;
            try_again:
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = Saepegox(player);
                    break;
                case 2:
                    return player;

            }
            return player;
        }
Exemplo n.º 9
0
        internal Player Graveyard(Player play)
        {
            Console.Clear();
            player = play;
            Area area = new Area("Graveyard", 7);
            player.Area = area;
            player.updateQuests(null, player.Area, null, 0, 0, 0);
            Console.WriteLine("The graveyards looks old and ruined as you enter it. \n" +
                "the graves looks like someone has been digging them all up \n" +
                "and the air feels cold as ice, as you look around you can \n" +
                "only see the castle upwards even though you feel like \n" +
                "someone is watching you");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to the The Plague Lands");
            Console.WriteLine("2 Go to the castle");
            Console.WriteLine("3 Save your progress");
            int choice = 0;
            try_again:
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = The_Plague_Lands(player);
                    break;
                case 2:
                    player = Undead_Castle(player);
                    break;
                case 3:
                    return player;
            }
            return player;
        }
Exemplo n.º 10
0
        internal Player Eirin(Player play)
        {
            Console.Clear();
            Area area = new Area("Eirin", 1);
            player = play;
            player.Area = area;
            int choice = 0;
            try_again:
            Console.WriteLine("As you approach the area you see a lot of herbs at the side of the road \n" +
                                "You could either continue towards Pladósh a swapish area or turn your head \n" +
                                "towards the desert Saepegox or head towards to huge town Ferrington");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine("The area consists of goblins and gnomes");
            Console.WriteLine();
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Explore the Eirin");
            Console.WriteLine("2 Explore for herbs");
            Console.WriteLine("3 Go to Pladósh (level 3)");
            Console.WriteLine("4 Go to Saepegox (level 2)");
            Console.WriteLine("5 Go to Ferrington (City)");
            Console.WriteLine("6 Save your progress");
            Console.WriteLine();
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                Console.Clear();
                goto try_again;

            }
            switch (choice)
            {
                case 1:
                    Console.Clear();
                    switch (rng.Next(1, 4))
                    {
                        case 1:
                            Enemy enemy = EirinEnemy(area.Level);
                            Console.WriteLine();
                            Console.WriteLine("You encounted a " + enemy.Name + " its estimated power " + combatStrength(enemy.Tama));
                            Monster tama = chooseMonster(player);
                            player = FM.FightMonster(player, tama, enemy);
                            goto try_again;
                        case 2:
                            int herbs2 = exploreAreaHerb(area.Level);
                            Console.WriteLine("You found herbs " + herbs2);
                            player.Herbs += herbs2;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                        case 3:
                            int money = exploreAreaMoney(area.Level);
                            Console.WriteLine("You found money " + money);
                            player.Money += money;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                    }
                    break;
                case 2:
                    Console.Clear();
                    int herbs = 0;
                    switch (rng.Next(1, 3))
                    {
                        case 1:
                            herbs = exploreAreaHerb(area.Level);
                            Console.WriteLine("You found herbs " + herbs);
                            player.Herbs += herbs;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                        case 2:
                            Console.WriteLine("You didn't find anything");
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                    }
                    goto try_again;
                case 3:
                    player = Pladósh(player);
                    break;
                case 4:
                    player = Saepegox(player);
                    break;
                case 5:
                    player = Ferrington(player);
                    break;
                case 6:
                    return player;
            }

            return player;
        }
Exemplo n.º 11
0
        internal Player Ferrington(Player play)
        {
            try_again:
            Console.Clear();
            player = play;
            Area area = new Area("Ferrington", 1);
            NPC npc = new NPC("Merchant");
            NPC npc2 = new NPC("King's Diplomat");
            Item a = IC.CreateAtkItem("Steel sword", Item.equipment.weapon, 20, 5, 100);
            a.Price = 200;
            npc.addItem(a);
            Item b = IC.CreateHPItem("HP potion 20", Item.equipment.potion, 20, 0);
            b.Price = 5;
            npc.addItem(b);
            Item c = IC.CreateArmorItem("Armor potion 20 ", Item.equipment.potion, 20, 0);
            c.Price = 20;
            npc.addItem(c);

            Quest quest = new Quest("The Goblin cave", "Some goblins are rampaging the trade roads, go hunt 8 goblins down and the rest might flee!", 8, 0, "money 100", false, false);
            Quest quest2 = new Quest("Find the source of the corruption", "Main Quest The king is looking for a hero who will undertake the task, of finding and repelling the corruption", 1, 0, "money 300", false, false);
            Quest quest3 = new Quest("The Sorcerer", "Find the Sorcerer to stop the corruption", 1, 0, "money 300", false, false);

            npc.addQuest(quest);
            npc2.addQuest(quest2);
            npc2.addQuest(quest3);

            area.setNPC(npc);
            area.setNPC2(npc2);
            player.Area = area;
            Console.Clear();
            Console.WriteLine("You approach the huge city you see a couple of guards standing watch.\n" +
                                "You slowly approach them, they sceptically look at you and you little \n" +
                                "monster, but let you through anyways. Inside the huge city you spot a \n" +
                                "castle straight ahead, to your left you find a bunch of houses \n" +
                                "To your right you spot a merchant so fat he would fall over if you \n" +
                                "touched him. You pass him and go around the town and spot another \n" +
                                "gate leading to Orexdale");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Talk to the Merchant");
            Console.WriteLine("2 Talk to the Kings Diplomat");
            Console.WriteLine("3 Go to the The Fery (castle)");
            Console.WriteLine("4 Go to the Eirin (level 1)");
            Console.WriteLine("5 Go to the Orexdale (level 3)");
            Console.WriteLine("6 Save your progress");
            int choice = 0;
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                trader:
                    Console.Clear();
                    Console.WriteLine("1. Do you wanna buy something?");
                    Console.WriteLine("2. Do you need a quest?");
                    Console.WriteLine("3. Return to the area");
                    Console.WriteLine();

                    int choice2 = 0, choice3 = 0;

                    try
                    {
                        choice2 = int.Parse(Console.ReadLine());
                    }
                    catch (Exception)
                    {
                        goto trader;
                    }
                    switch (choice2)
                    {
                        case 1:
                        trader2:
                            Console.Clear();
                            Console.WriteLine("Your money: " + player.Money);
                            Console.WriteLine();
                            Console.WriteLine("*** Displaying items ***");
                            int b2;
                            for (int i = 0; i < area.Npc.Selling.Count; i++)
                            {
                                b2 = i + 1;
                                Console.WriteLine("Item: " + b2 + " " + area.Npc.Selling[i].Name);
                            }
                            try
                            {
                                Console.WriteLine("What item do you want to buy?");
                                Console.WriteLine("Type 0 if you don't want to buy anything");
                                choice3 = int.Parse(Console.ReadLine());
                            }
                            catch (Exception)
                            {
                                goto trader2;
                            }
                            if (choice3 != 0)
                            {
                                if (area.Npc.Selling[choice2 + 1].Price <= player.Money)
                                {
                                    player.Inventory.Add(area.Npc.Selling[choice2 + 1]);
                                    player.Money -= area.Npc.Selling[choice2 + 1].Price;
                                }
                                else
                                {
                                    Console.WriteLine("You can't afford it!");
                                    Console.WriteLine();
                                    Console.WriteLine("Press enter to continue");
                                    Console.ReadLine();
                                    Console.Clear();
                                }

                            }
                            goto trader;
                        case 2:
                        quests:
                            Console.Clear();
                            area.Npc.displayQuests();
                            Console.WriteLine();
                            Console.WriteLine("Are you up for one of the challenges?");
                            Console.WriteLine("Type 0 if you wanna return to the menu");
                            Console.WriteLine("Else type 1");
                            int choice4;
                            try
                            {
                                choice4 = int.Parse(Console.ReadLine());
                            }
                            catch (Exception)
                            {
                                goto quests;
                            }
                            switch (choice4)
                            {
                                case 0:
                                    goto trader;
                                default:
                                    if (player.checkQuest(area.Npc.Quests[choice4 - 1]))
                                    {
                                        Console.Clear();
                                        Console.WriteLine("The quest: " + area.Npc.Quests[choice4 - 1].Name + " has been added to your questlog!");
                                        player.Questlog.Add(area.Npc.Quests[choice4 - 1]);
                                        Console.WriteLine();
                                        Console.WriteLine("Press enter to continue");
                                        Console.ReadLine();
                                    }
                                    else
                                    {
                                        player.completeQuest(area.Npc.Quests[choice4 - 1], null);
                                        Console.WriteLine("You'r either on the quest or finished it");
                                        Console.WriteLine();
                                        Console.WriteLine("Press enter to continue");
                                        Console.ReadLine();
                                    }
                                    break;
                            }
                            break;
                        case 3:
                            goto try_again;
                    }
                    goto trader;
                case 2:
                diplomat:
                    Console.Clear();
                    area.Npc2.displayQuests();
                    int choice5 = 0;
                    try
                    {
                        choice5 = int.Parse(Console.ReadLine());
                    }
                    catch (Exception)
                    {
                        goto diplomat;
                    }
                    switch (choice5)
                    {
                        case 0:
                            goto diplomat;
                        default:
                            switch (choice5)
                            {
                                case 1:
                                    if (player.checkQuest(area.Npc2.Quests[0]))
                                    {
                                        Console.Clear();
                                        Console.WriteLine("The quest: " + area.Npc2.Quests[0].Name + " has been added to your questlog!");
                                        player.Questlog.Add(area.Npc2.Quests[0]);
                                        Console.WriteLine();
                                        Console.WriteLine("Press enter to continue");
                                        Console.ReadLine();
                                    }
                                    else
                                    {
                                        player.completeQuest(area.Npc2.Quests[0], null);
                                        Console.WriteLine("You'r either on the quest or finished it");
                                        Console.WriteLine();
                                        Console.WriteLine("Press enter to continue");
                                        Console.ReadLine();
                                    }
                                    break;
                                case 2:
                                    if (player.completedQuest(area.Npc2.Quests[0]))
                                    {
                                        if (player.checkQuest(area.Npc2.Quests[1]))
                                        {
                                            Console.Clear();
                                            Console.WriteLine("The quest: " + area.Npc2.Quests[1].Name + " has been added to your questlog!");
                                            player.Questlog.Add(area.Npc2.Quests[1]);
                                            Console.WriteLine();
                                            Console.WriteLine("Press enter to continue");
                                            Console.ReadLine();
                                        }
                                        else
                                        {
                                            player.completeQuest(area.Npc2.Quests[1], null);
                                            Console.WriteLine("You'r either on the quest or finished it");
                                            Console.WriteLine();
                                            Console.WriteLine("Press enter to continue");
                                            Console.ReadLine();
                                        }
                                    }
                                    else
                                    {
                                        Console.WriteLine("You need to complete 'Find the source of the corruption' before starting it");
                                        Console.WriteLine();
                                        Console.WriteLine("Press enter to continue");
                                        Console.ReadLine();
                                    }

                                    break;
                                default:
                                    break;
                            }

                            break;
                    }
                    goto try_again;
                case 3:
                    player = The_Fery(player);
                    break;
                case 4:
                    player = Eirin(player);
                    break;
                case 5:
                    player = Orexdale(player);
                    break;
                case 6:
                    return player;

            }
            return player;
        }
Exemplo n.º 12
0
        internal Player WitchHut(Player play)
        {
            try_again:
            Console.Clear();
            player = play;
            Area area = new Area("WitchHut", 1);
            NPC npc = new NPC("Witch Doctor");
            Quest q1 = new Quest("Learning Brewing", "Go find 20 herbs for the Witch Doctor", 20, 0, "herbs 20", false, false);

            npc.addQuest(q1);
            area.setNPC(npc);
            player.Area = area;

            Console.Clear();
            Console.WriteLine("As you walk towards the hut a witch steps outside and looks at you and you wonder whether to \n" +
                                "confront her or go back");
            Console.WriteLine();
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to Pladósh (level 3)");
            Console.WriteLine("2 Talk to the " + npc.Name);
            Console.WriteLine("3 Save your progress");
            int choice = 0;

            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = Pladósh(player);
                    break;
                case 2:
                Witch:
                    Console.Clear();
                    Console.WriteLine("As you walk towards the witch she stares at you and let out a little squek before she asks you");
                    Console.WriteLine();
                    Console.WriteLine("1. Do you wanna brew something?");
                    Console.WriteLine("2. Or head back where you came from?");
                    int choice2;
                    try
                    {
                        choice2 = int.Parse(Console.ReadLine());
                    }
                    catch (Exception)
                    {
                        goto Witch;
                    }
                    switch (choice2)
                    {
                        case 1:
                            bool questCompleted = false;
                            foreach (var item in player.Questlog)
                            {
                                if (item.Name == q1.Name && item.Completed && item.Rewarded)
                                {
                                    questCompleted = true;
                                }
                            }
                            if (questCompleted)
                            {
                                PotionMenu();
                                goto Witch;
                            }
                            else
                            {
                                Console.WriteLine("Before you start brewing you have to do a quest for me");
                                Console.WriteLine();
                                Console.WriteLine("Press 1 to accept the quest");
                                int choice3;
                                try
                                {
                                    choice3 = int.Parse(Console.ReadLine());
                                }
                                catch (Exception)
                                {
                                    goto Witch;
                                }
                                switch (choice3)
                                {
                                    case 1:
                                        Console.Clear();
                                        area.Npc.displayQuests();
                                        if (player.checkQuest(area.Npc.Quests[choice3 - 1]))
                                        {
                                            Console.Clear();
                                            Console.WriteLine("The quest: " + area.Npc.Quests[choice3 - 1].Name + " has been added to your questlog!");
                                            player.Questlog.Add(area.Npc.Quests[choice3 - 1]);
                                            player.updateQuests(null, null, null, player.Herbs, 0, 0);
                                            Console.WriteLine();
                                            Console.WriteLine("Press enter to continue");
                                            Console.ReadLine();
                                        }
                                        else
                                        {
                                            if (player.completeQuest(area.Npc.Quests[choice3 - 1], null))
                                            {
                                                player.Herbs -= 20;
                                            }
                                            else
                                                Console.WriteLine("You'r either on the quest or finished it");
                                            Console.WriteLine();
                                            Console.WriteLine("Press enter to continue");
                                            Console.ReadLine();
                                        }
                                        break;
                                    default:
                                        goto Witch;
                                }
                            }
                            goto Witch;
                        case 2:
                            goto try_again;
                    }
                    break;
                case 3:
                    return player;

            }
            return player;
        }
Exemplo n.º 13
0
        internal Player Undead_Castle(Player play)
        {
            try_again:
            Console.Clear();
            player = play;
            Area area = new Area("Undead_Castle", 9);
            player.Area = area;
            Console.WriteLine("You walk up the hill towards the castle and as you reach the door it opens \n" +
                "and a cold smoke rushes out you look inside and the dark hall consumes you. \n" +
                "As you enter the door you see nothing, but darkness and wonder whether \n" +
                "to continue onwards or turn back");
            Console.WriteLine();
            Console.WriteLine("You are in " + area.Name + " level " + area.Level);
            Console.WriteLine(player.stats());
            Console.WriteLine();
            Console.WriteLine("1 Go to the The Plague Lands (level 6)");
            Console.WriteLine("2 Explore the castle");
            Console.WriteLine("3 Go to the graveyard (level 7)");
            Console.WriteLine("4 Save your progress");
            int choice = 0;
            try
            {
                choice = int.Parse(Console.ReadLine());
            }
            catch (Exception)
            {
                goto try_again;
            }

            switch (choice)
            {
                case 1:
                    player = The_Plague_Lands(player);
                    break;
                case 2:
                    Console.Clear();
                    switch (rng.Next(1, 3))
                    {
                        case 1:
                            Enemy enemy = UndeadCastleEnemy(area.Level);
                            Monster tama = chooseMonster(player);
                            Console.WriteLine("Combat strength");
                            Console.WriteLine("Enemy: " + combatStrength(enemy.Tama));
                            Console.WriteLine("You: " + combatStrength(tama));
                            Console.WriteLine();
                            player = FM.FightMonster(player, tama, enemy);
                            goto try_again;
                        case 2:
                            int money = exploreAreaMoney(area.Level);
                            Console.WriteLine("You found money " + money);
                            player.Money += money;
                            Console.WriteLine();
                            Console.WriteLine("Press enter to continue");
                            Console.ReadLine();
                            Console.Clear();
                            goto try_again;
                    }
                    break;
                case 3:
                    player = Graveyard(player);
                    break;
                case 4:
                    return player;

            }
            return player;
        }