/
JOYCE
/
ONCE_UPON_A_TIME
Обзор
Документация
Войти
/
JOYCE
/
ONCE_UPON_A_TIME
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Program.cs
449 строк
26 KB
JOYCE
SIXth (SAVE/LOAD)
23 июн 2026, 19:15
23 июн 2026, 19:15
537e013
Код
Авторство
О чём код?
using System.Diagnostics.CodeAnalysis; namespace ONCE_UPON_A_TIME { internal class Program { static void Main(string[] args) { Game game = new Game(); int ACHIEVMENTS = 0; Console.WriteLine("DO YOU WANT TO LOAD LAST SAVE?"); string CHOICELOAD = Console.ReadLine(); string ChoiceLoad = CHOICELOAD.ToUpper().Trim(); if (ChoiceLoad == "YES") { game.LoadCP1(); } else { Console.ForegroundColor = ConsoleColor.DarkGreen; Console.WriteLine(" __________"); Console.WriteLine(" - _ - "); Console.WriteLine(" - [ ] - "); Console.WriteLine(" - - - "); Console.WriteLine(" ----------"); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("HELLO, USER."); Console.ReadLine(); Console.WriteLine("PLEASE, ENTER YOUR NAME."); game.YourName = Console.ReadLine().ToUpper(); if (game.YourName == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.WriteLine($"GREAT, {game.YourName}"); Console.WriteLine("DON'T YOU MIND TO SAY WHAT'S YOUR FAVORITE PET"); game.YourPet = Console.ReadLine().ToUpper(); if (game.YourPet == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } string FACE_PET1 = "•⩊•"; Console.WriteLine($"GOOD, YOU CHOOSE {game.YourPet}"); Console.WriteLine("NOW, CHOOSE WHERE YOU WOULD LIKE TO LIVE ([CITY], [COUNTRY])"); game.PastCity = Console.ReadLine().ToUpper(); if (game.PastCity == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.WriteLine($"ALRIGHT, YOU'RE FROM {game.PastCity}"); Console.WriteLine("NOW, TELL ME YOUR FAVORITE COLOR"); game.YourFavColor = Console.ReadLine().ToUpper(); if (game.YourFavColor == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.WriteLine("GOOD"); Console.WriteLine("TELL ME ABOUT YOUR FAVORITE FOOD"); game.YourFavFood = Console.ReadLine().ToUpper(); if (game.YourFavFood == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } if (game.YourFavFood == "PIZZA") { ACHIEVMENT BBB = new ACHIEVMENT("BIRTHDAY BOY BLAM"); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine($"+achievement: {BBB.TITLE}"); ACHIEVMENTS++; } if (game.YourFavFood == "BUTTERSCOTCH PIE") { ACHIEVMENT UT = new ACHIEVMENT("UNDERTALE"); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine($"+achievement: {UT.TITLE}"); ACHIEVMENTS++; } Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("NOW, ARE YOU READY TO START?"); game.Choice1 = Console.ReadLine().ToUpper().Trim(); if (game.Choice1 != "YES") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.WriteLine("GREAT"); Console.ReadLine(); game.SaveCP1(); } Console.WriteLine("DO YOU WANT TO LOAD LAST SAVE? (Check Point 2)"); string CHOICELOAD2 = Console.ReadLine(); string ChoiceLoad2 = CHOICELOAD.ToUpper().Trim(); if (ChoiceLoad == "YES") { game.LoadCP2(); } else { Console.ForegroundColor = ConsoleColor.White; Console.WriteLine($"Your name is {game.YourName}"); Console.WriteLine($"It's 2020, you lived in {game.PastCity}, but now you have to live in Greenville, North Carolina."); Console.WriteLine("It's midday, quiet outside. You're standing in the middle of your room, illuminated by the light from the window. You're extremely bored."); Console.WriteLine("What are you going to do? examine your room or play your PC? (EYR/PYP)"); game.Choice2 = Console.ReadLine().ToUpper().Trim(); if (game.Choice2 == "EYR") { Console.WriteLine("You look around your room. It's a bit of a mess, with papers and things lying on the floor. In the corner, next to the window, stands a large, soft bed. In the other corner stands a desk and a computer; you don't need it yet. There's a closet built into one of the walls."); Console.WriteLine("You look into the closet and see a small flashlight there."); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("You put the flashlight into your inventory."); Console.ForegroundColor = ConsoleColor.White; } if (game.Choice2 == "PYP") { ACHIEVMENT GRASS = new ACHIEVMENT("GO TOUCH DA GRASS"); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine($"+achievement: {GRASS.TITLE}"); ACHIEVMENTS++; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(@" __ ..=====.. |==| || || |= | _ || || |^*| _ |=| o=,===,=o |__||=| |_| _______)~`) |_| [=======] () "); Console.WriteLine("You turn on your relatively old computer, which you bought several years ago in your home country."); Console.WriteLine(@"On the table you found a small, tattered note, it only had numbers written on it: 8284"); Console.WriteLine("As soon as the computer boots up, you see a password prompt. You try to enter something there."); game.PcPassword = Console.ReadLine().ToUpper().Trim(); if (game.PcPassword == "8284") { Console.WriteLine("You confidently enter the password and after a couple of seconds of the PC loading, you see your desktop."); Console.ReadLine(); Console.WriteLine(@" Y88b / 888~~ 888 e88~-_ ,88~-_ e e 888~~ Y88b / 888___ 888 d888 \ d888 \ d8b d8b 888___ Y88b e / 888 888 8888 88888 | d888bdY88b 888 Y88bd8b/ 888 888 8888 88888 | / Y88Y Y888b 888 Y88Y8Y 888 888 Y888 / Y888 / / YY Y888b 888 Y Y 888___ 888____ ""88_-~ `88_-~ / Y888b 888___ 888 | ,88~-_ e e 888~~ 888___| d888 \ d8b d8b 888___ 888 | 88888 | d888bdY88b 888 888 | 88888 | / Y88Y Y888b 888 888 | Y888 / / YY Y888b 888 888 | `88_-~ / Y888b 888___ "); Console.ReadLine(); Console.WriteLine("There are several tabs and files on the desktop, such as \"GIT.txt\", \"Visual Studio 2022\", \"Google Chrome\" and \"Pesterchum\""); Console.WriteLine("You double click on the \"Pesterchum\" icon and it opens."); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(@"*\ (^_^) ████ █████ ████ █████ █████ ████ ███ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ ██ ██ ████ ████ ███ █ ████ ████ █ █████ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █████ ████ █ █████ █ █ ███ █ █ ███ █ █ LOCAL CHAT SYSTEM Version - 2.04 ENTER YOUR EMOTION TODAY:"); game.DailyEmo1 = Console.ReadLine().ToUpper(); if (game.DailyEmo1 == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.WriteLine(@" __ __ _ _ _ ___ _ _ _ \ \ / /__| |__ ___ _ __ ___ | |__ __ _ __| |__ / __| __ _| |__ _ __| | | _____ _____ _ _ \ \/\/ / -_) / _/ _ \ ' \/ -_) | '_ \/ _` / _| / /_ \__ \/ _` | / _` / _` | |__/ _ \ V / -_) '_| \_/\_/\___|_\__\___/_|_|_\___| |_.__/\__,_\__|_\_( ) |___/\__,_|_\__,_\__,_|____\___/\_/\___|_| |/ "); Console.WriteLine($"YOUR EMOTION TODAY: {game.DailyEmo1}"); Console.WriteLine("List of Chums:"); Console.WriteLine(@">PurpleMage >ExpMiner >EmptyWarior >CoolUser >DailyTexter ..."); Console.ForegroundColor = ConsoleColor.White; Console.ReadLine(); Console.WriteLine("You've noticed that you've received a couple of new messages from ExpMiner."); Console.ReadLine(); Console.WriteLine("You clicked on the nickname ExpMiner, which opened a chat."); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("--ExpMiner[EM] began to pestering SaladLover[SL]"); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine(@" EM: Hey-yo EM: What's Up EM: Are U Still Sleeping Idiot?"); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("SL: Hi!"); Console.ReadLine(); Console.WriteLine("SL: That was rude, you know!"); Console.ReadLine(); Console.WriteLine($"SL: And yes, I woke up, but I can't talk for long because I haven't fed my {game.YourPet} yet."); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine(@$" EM: Oh, I Found A Kind Person Here, Taking Care Of The {game.YourPet}. You Probably Spend Money On Charity. EM: Are You Always Trying To Appear Better Than Others??? "); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("SL: Stop behaving like this!"); Console.ReadLine(); Console.WriteLine($"SL: It's weird for me to see you get angry just because I like {game.YourPet}s."); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine(@" EM: This Whole Topic Just Irritates Me, Etc. EM: Forget It, Do You Want To Play UOAT Later? EM: It Seems To Have Been Released."); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("SL: I don't know exactly if I'll be able to go play with you, but I'll try my best!"); Console.ReadLine(); Console.WriteLine($"SL: Okay, I have to feed my {game.YourPet}, and I haven't had breakfast myself yet, so good luck!"); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine(@" EM: OK, See'ya, Dumbass!"); Console.ForegroundColor = ConsoleColor.White; Console.ReadLine(); Console.WriteLine("You switched your PC to sleep mode and then got up from your desk."); } } if (game.Choice2 == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.ReadLine(); Console.WriteLine($"That's enough, you need to feed the {game.YourPet} and have breakfast."); Console.ReadLine(); Console.WriteLine(@$"You walked up to the door of your room and creaked it open before walking inside. You entered the second floor corridor, lit only by sunlight from the windows. The corridor is slightly dusty, the wallpaper on the walls shows evidence of having been there for more than ten years. Most of the interior is made of dark oak, there is a wall clock hanging on the side of your door, it is also quite old, although it was brought from your previous home. In addition to the door to your room, you notice doors to the pantry and the bathroom. You definitely remember that you keep your {game.YourPet}'s food in the pantry, so you should go there. Besides, you're sure you won't have time to brush your teeth if you go feed the {game.YourPet}, although that's not certain. Where are you going to go? Pantry or Bathroom? (P / B)"); game.Choice3 = Console.ReadLine().ToUpper().Trim(); if (game.Choice3 == "P") { Console.WriteLine(@$"You open the even more creaky door to the pantry. It's very dark in there, so you fumble for the switch and turn on the light. It smells of iron, wood, and earth here, strange as it may seem. In the light, you see stacks of boxes and all sorts of junk scattered throughout almost every corner of the small room. You find the right box against the wall next to the entrance, filled with your pet's food. You open it almost immediately, effortlessly. The box is about half full of cans of {game.YourPet} food."); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine($"You take one of the small jars ({game.YourPet} food can) and put it in your inventory."); Console.ForegroundColor = ConsoleColor.White; Console.ReadLine(); Console.WriteLine("After that, you walk out of the pantry, turned off the light"); } if (game.Choice3 == "B") { Console.WriteLine(@$"You open the less creaky, painted bathroom door. It's obviously quite damp and chilly in here. The walls were painted and the ceramic tiles on the floor were replaced a couple of years ago, before you arrived. A long window on the top of the side wall brings street light into the bathroom. You can't find a better way to brush your teeth before leaving, so that's exactly what you do. Your toothpaste has a {game.YourFavFood} flavor, as weird as that may be. After you finish brushing your teeth, you look into the cabinet above the sink and see a bottle of mouthwash there."); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("You put the mouthwash in your inventory."); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("After all this, you leave the bathroom."); Console.ReadLine(); } if (game.Choice3 == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.WriteLine("Looks like it's really time for you to go down to the first floor and get ready to leave."); Console.ReadLine(); Console.WriteLine(@" You walk down the old, creaking steps to the first floor, which, like the second, is illuminated by the sun's rays from the window. You're in the hallway, next to a shelf (with a house key on it), a wardrobe, a coat rack, and a couple of family photos on the walls. You walk through an archway straight into the living room."); Console.ReadLine(); if (game.YourPet.Contains("FISH")) { Console.WriteLine($"You walk into the living room. The fireplace, logically, is out, and your {game.YourPet} is swimming in its aquarium. It's immediately obvious that it's hungry, "); } else { Console.WriteLine($"You walk into the living room. The fireplace, logically, is out, and your {game.YourPet} is sleeping on the old sofa. It's immediately obvious that it's hungry, "); } if (game.Choice3 == "B") { Console.WriteLine("but you have nothing to feed this one."); } if (game.Choice3 == "P") { Console.WriteLine($"so you take the food from the inventory and give it to your {game.YourPet}."); } if (game.Choice3 == "") { Console.WriteLine("Неправильный ввод."); Console.Error.WriteLine("GETOUT"); return; } Console.ReadLine(); Console.WriteLine(@"You walk from the living room to the kitchen. You look in the fridge and the only breakfast you'll find is a bun and lasagna. What do you want to eat? (B/L)"); game.ChoiceBrfast = Console.ReadLine().ToUpper().Trim(); if (game.ChoiceBrfast == "B") { Console.WriteLine(@"You take a plate with a bun and put it in the microwave for 1 minute. You take a plate and sit down at the table and start eating a bun. "); if (game.Choice3 == "P") { Console.WriteLine("You eat the bun in less than a minute, it turns out to be quite filling and fresh."); } else if (game.Choice3 == "B") { Console.WriteLine("You've almost finished your bun, but you should probably give the rest to your pet."); if (game.YourPet.Contains("FISH")) { Console.WriteLine($"You throw the rest of the bun into the aquarium. Job done."); } else { Console.WriteLine($"Well, you probably shouldn't give your cat a bun, as it's unlikely to be good for them."); } } } if (game.ChoiceBrfast == "L") { Console.WriteLine(@"You place the leftover lasagna in a plate and microwave it for 2 minutes. While it's heating up, you pour a glass of grape juice that you took out of the refrigerator. After that, you sit down at the table with a drink and food. "); if (game.Choice3 == "P") { Console.WriteLine("You ate the lasagna and drank the juice in a little over a minute. It was pretty delicious."); } else if (game.Choice3 == "B") { Console.WriteLine("You almost finished the lasagna, but there was too much of it and it got cold, so you should give it to your pet."); if (game.YourPet.Contains("FISH")) { Console.WriteLine($"Although, to be honest, giving fish meat is not the best idea."); } else { if (game.YourPet.Contains("CAT")) { ACHIEVMENT GARFIELD = new ACHIEVMENT("GARFIELD"); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine($"+achievement: {GARFIELD.TITLE}"); ACHIEVMENTS++; } Console.ForegroundColor = ConsoleColor.White; Console.WriteLine($"You give the leftover lasagna to your {game.YourPet}. It's definitely happy about it."); } } } Console.ReadLine(); Console.WriteLine(@"You've wasted enough time already. It's time to go to work. By the way, you work for your friends, and you work as a photographer of special places for the sake of creating your joint game. Today, your job is to go to an abandoned factory and take as many detailed photographs of the rooms and interior as possible. Returning to the hallway, you grab your hoodie and put it on. You really should dress warmer, as it's gotten chilly outside. Taking the keys and opening the door with them, you were greeted by a slightly cool, fresh air. Stepping outside, you see the autumn streets of the neighborhood, bare trees, and a ton of leaves on the ground. The sky is gray, and it might rain today, but who cares?"); Console.ReadLine(); Console.WriteLine(@"You walk past houses, they seem abandoned, and there is no one around you except for the occasional cars passing by. After a couple of minutes of walking past the street and so on, you come to a rather large factory, clearly abandoned for a couple of years The factory is located near a larger, more developed city, and you can even see many high-rises from this hill. The building is completely run-down and made of brick, the windows are broken, and the door is closed. Opening the creaking metal door, a chilling air washed over you. Inside, everything was pitch black, no, even darker than darkness itself. You hardly had a choice but to go inside. So you did."); Console.ReadLine(); Console.WriteLine(@"When you walked inside, you had the feeling that there was no floor at all, as if you were walking on air. You walked further and further, trying to find at least something, until the moment you heard the doors closing. You tried to call for help, but your voice seemed to die away on its own."); if (game.Choice2 == "EYR") { Console.WriteLine(@"You tried turning on the flashlight, and it worked. However, you weren't exactly thrilled, as even the objects (or whatever) caught the light were still just as dark. "); } Console.WriteLine("Suddenly, everything around you seemed to start shaking, and you felt dizzy. The room became windier, and in a moment..."); Console.ReadLine(); Console.WriteLine("It was as if you were falling into an abyss or a pit. You completely lost consciousness."); Console.ReadLine(); Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine(@" _______ __ _ ______ _______ _______ _______ __ __ _______ _______ _______ _______ ______ ____ | || | | || | | || | | || | | || _ || || || || _ | | | | ___|| |_| || _ | | _ || ___| | || |_| || |_| || _ ||_ _|| ___|| | || | | | |___ | || | | | | | | || |___ | || || || |_| | | | | |___ | |_||_ | | | ___|| _ || |_| | | |_| || ___| | _|| || || ___| | | | ___|| __ | | | | |___ | | | || | | || | | |_ | _ || _ || | | | | |___ | | | | | | |_______||_| |__||______| |_______||___| |_______||__| |__||__| |__||___| |___| |_______||___| |_| |___| GREAT JOB!!!"); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine($"ACHIEVMENTS: {ACHIEVMENTS}/3"); game.SaveCP2(); } } } }