public static void Room2E() { RoomDesigns.TwoRight(); Console.WriteLine("\n\nYou are in the first room."); int observed = 0; if (observed >= 2) { Program.FayytXP += 5; } string choice = Actions.ChooseFirst(); Console.ResetColor(); while (choice != "straight" && choice != "s" && choice != "right" && choice != "r" && choice != "back" && choice != "b") { if (choice == "observe" || choice == "o") { choice = Actions.Observe(); Console.ResetColor(); } else if (choice == "pick up" || choice == "pick" || choice == "p") { choice = Actions.PickUp(); Console.ResetColor(); } else if (choice == "talk" || choice == "t") { choice = Actions.Talk(); Console.ResetColor(); } else if (choice == "magic" || choice == "m") { observed++; choice = Actions.Magic(); Console.ResetColor(); } else if (choice == "attack" || choice == "a") { observed++; choice = Actions.Attack(); Console.ResetColor(); } else if (choice == "defend" || choice == "d") { observed++; choice = Actions.Defend(); Console.ResetColor(); } else if (choice == "heal" || choice == "h") { observed++; choice = Actions.Healing(); Console.ResetColor(); } else if (choice == "left" || choice == "l") { choice = Actions.Left(); Console.ResetColor(); } else if (choice == "guide" || choice == "g") { choice = Actions.Guide(); Console.ResetColor(); } else { choice = Actions.What(); Console.ResetColor(); } } if (choice == "straight" || choice == "s") { Console.Write("You entered room 15 East."); } else if (choice == "right" || choice == "r") { Entrance(); } else { Console.Write("You entered room 3 West."); } }
public static void Entrance() { RoomDesigns.FayytCastle2(); Console.WriteLine("\n\nYou stand at last at the gate of Castle Fayyt."); string choice = Actions.ChooseFirst(); Console.ResetColor(); while (choice != "straight" && choice != "s") { RoomDesigns.FayytCastle2(); if (choice == "observe" || choice == "o") { Console.Write("\n" + " You see a castle. The walls are ancient and as you make" + "\na slow circuit around it, you can see evidence of other" + "\nscars. Not only has the weather beaten down on the walls" + "\nof the castle, but it has been pitted as if doused in" + "\nacid. There are deep red stains on the ground in" + "\ngeometric shapes that look just enough like pitchforks," + "\nsickles, and other weapons of terrified and angry" + "\nvillagers." + "\n\n You shudder as you complete your circuit and return" + "\nto the gate."); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "pick up" || choice == "pick" || choice == "p") { Console.Write("\n There's nothing out here to pick up..." + "\n\texcept maybe a disease."); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "talk" || choice == "t") { Console.Write("\n" + " With no one else to brag to, you tell yourself how" + "\nincredibly talented, svelte, intelligent, attractive" + "\nand tenacious you are." + "\n You believe it, too."); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "magic" || choice == "m") { Console.Write("\n" + " The magical energies near this castle are amazing..." + "\nand so, so dark. Just reaching into the pool of energy" + "\nto create a spark of light in your hand is like swimming" + "\nin the blackest ocean. You shudder at the attempt." + "\nBut, oh! The strength of that pool makes your feeble" + "\nlight glow many times brighter than normal!" + "\n Perhaps you could get used to this feeling!"); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "attack" || choice == "a") { Console.ForegroundColor = ConsoleColor.Blue; Console.Write("\n\"What are we?\""); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("\n\"We're muggers!\""); Console.ForegroundColor = ConsoleColor.Blue; Console.Write("\n\"And what do we do?\""); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("\n\"We mug 'em!\"\n"); Console.ResetColor(); Console.Write("\nYou mugged the portcullis for "); Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("100,000 gold"); Console.ResetColor(); Console.Write(".\n"); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "defend" || choice == "d") { Console.Write("\n" + " Block, parry, twist away, deflect, fall-back.\n\n" + " It's quiet here. You take a minute to ready yourself\n" + "for the fight to come."); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "heal" || choice == "h") { Console.Write("\nYou heal "); Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("10"); Console.ResetColor(); Console.Write(" hit points."); Fight.HeroHP += 10; if (Fight.HeroHP > Fight.HeroHPMax) { Fight.HeroHP = Fight.HeroHPMax; } Console.Write("\n\nCurrent hit points are "); Console.ForegroundColor = ConsoleColor.Yellow; Console.Write(Fight.HeroHP); Console.ResetColor(); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "left" || choice == "l" || choice == "right" || choice == "r") { Console.Write("\n" + "You are standing outside the gate of the castle. To the\n" + "left and right of you is what used to be a moat. You've\n" + "fashioned a kind of bridge over the long-overgrown moat,\n" + "and unless you want to find out if those long pointy\n" + "things growing up from the floor of the moat are still\n" + "deadly, I suggest you move straight ahead through the\n" + "portcullis."); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "back" || choice == "b") { Console.Write("\n" + " Are you seriously going to give up now and go home?\n" + "CASTLE FAYYT, the pinnacle of your research and\n" + "preparation is before you now. It's taken years of\n" + "scholarly pursuits, decades of physical preparation\n" + "and training, and months of travel through the most\n" + "difficult and inhospitable terrain to get here. You\n" + "steel your nerves. It was a momentary doubt.\n\n" + " There's no turning back now.\n"); choice = Actions.ChooseNow(); Console.ResetColor(); } else if (choice == "Guide" || choice == "g") { choice = Actions.Guide(); Console.ResetColor(); //choice = Actions.chooseNow(); Console.ResetColor(); } else { choice = Actions.What(); Console.ResetColor(); } } if (choice == "straight" || choice == "s") { Room2N(); } }
static void Main(string[] args) { Castle.SplashScreen(); RoomDesigns.FayytCastle(); Console.Write("\n\n\n" + " Welcome to Castle Fayyt." + "\nA text adventure with experience." + "\n\n An adventurer - you - has stumbled" + "\nupon an ancient text in a dusty tome." + "\n\n On it's yellowed and disintegrating" + "\npages reads the history of "); Console.ForegroundColor = ConsoleColor.Magenta; Console.Write("Fayyt Ignatti"); Console.ResetColor(); Console.Write("\n -- the fabled last Lady of Castle Fayyt --" + "\nlong lost to time and passed into the" + "\nrealms of legend and hearsay."); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("\n\nPress enter to continue."); Console.ResetColor(); Console.ReadLine(); Console.Write("\n" + " On a corner of a page, barely" + "\ndiscernible, was a hand-written note:"); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.Write("\n\n\tThe "); Console.ForegroundColor = ConsoleColor.Green; Console.Write("Chalice of Riches "); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.Write("is safe. " + "\n\tHowever hard they search, nobody" + "\n\twill find it in my eternal chambers" + "\n\tfor I will guard it myself." + "\n\tInterlopers-- Be Warned!"); Console.ResetColor(); Console.Write("\n\n" + " This small note led to years of" + "\nresearch as you learned all you could about" + "\nCastle Fayyt, the "); Console.ForegroundColor = ConsoleColor.Green; Console.Write("Chalice of Riches"); Console.ResetColor(); Console.Write("," + "\nand Lady Fayyt herself."); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("\n\nPress enter to continue."); Console.ResetColor(); Console.ReadLine(); Console.WriteLine("\n\n" + " Some legends said her castle was burned" + "\nto the ground while she screamed to death" + "\nwithin its walls; while other legends said" + "\ndespite every effort, nothing could destroy" + "\nher castle, and she could never be killed."); Console.Write("\n\n" + " Despite all the difficulties and setbacks," + "\nhere you stand at the entrance of Castle Fayyt." + "\nLost to time, purged from memory, but now," + "\nwithin your grasp."); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("\n\nPress enter to continue."); Console.ResetColor(); Console.ReadLine(); Console.Write("\n\n" + " Will you be able to defeat what awaits you?" + "\nTo wrest the "); Console.ForegroundColor = ConsoleColor.Green; Console.Write("Chalice of Riches"); Console.ResetColor(); Console.Write(" from the cold grasp" + "\nof the creature that once was "); Console.ForegroundColor = ConsoleColor.Magenta; Console.Write("Fayyt Ignatti"); Console.ResetColor(); Console.Write("? \n\n"); while (true) { Console.WriteLine("Please enter a character name:"); Console.ForegroundColor = ConsoleColor.Cyan; PlayerName = Console.ReadLine(); Console.ResetColor(); if (string.IsNullOrEmpty(PlayerName)) { Console.WriteLine("Every hero or heroinne needs a name."); } else { break; } } Console.Write("\n\nWelcome to the game,"); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write(PlayerName); Console.ResetColor(); Console.Write("." + "\n\tTry not to die.\n\n"); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("\n\nPress enter to begin your adventure."); Console.ResetColor(); Console.ReadLine(); Castle.Entrance(); }