Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace RPGGame
- {
- class Movement
- {
- public int X { get; set; }
- public int Y { get; set; }
- }
- public static class Game
- {
- public static void StartGame()
- {
- Console.ForegroundColor = ConsoleColor.Blue;
- Console.BackgroundColor = ConsoleColor.Black;
- Console.WriteLine(
- "_|_|_|_| _| _| _|_|_| _| _|_|_|_| _|_| _| _| _|_|_|_| _|_|_| _|_|_|_|_|\n" +
- "_| _| _| _| _| _| _| _| _| _| _| _| _|\n" +
- "_|_|_| _| _| _| _|_|_| _| _|_| _| _| _|_|_| _|_| _|\n" +
- "_| _| _| _| _| _| _| _| _| _| _| _| _|\n" +
- "_|_|_|_| _| _| _|_|_| _|_|_|_| _|_|_|_| _|_| _| _|_| _|_|_|_| _|_|_| _|\n");
- Console.WriteLine("STEROWANIE \n" +
- "W,S,A,D - PORUSZANIE SIĘ\n" +
- "ENTER - PRZEJŚCIE DALEJ W DIALOGU\n" +
- "ESCAPE - WYJDŹ\n");
- Console.ReadKey();
- Console.Clear();
- NewCharacter();
- Console.ReadKey();
- Console.Clear();
- }
- static void TurtleEncounter()
- {
- Console.WriteLine(" ______________________________");
- Console.WriteLine(" /|_ Głęboko w piasku zauważasz |. ___ ");
- Console.WriteLine("| |małego zółwia.Mag uśmiecha |. .,-;-;-,. /'_'/ ");
- Console.WriteLine("|__ |się i mówi |. _/_/_/_|_|_|) /| ");
- Console.WriteLine(" |'Poznaj Tima, stażystę |. '-<_><_><_><_>=//| ");
- Console.WriteLine(" |lokalnej biblioteki.Został |. `/_/====/_/-'/_/ ");
- Console.WriteLine(" |zamieniony w zółwia w wyniku|. '' '' '' ");
- Console.WriteLine(" |upuszczenia księgi zaklęć ze|.");
- Console.WriteLine(" |świata zwierząt.Od tamtej |.");
- Console.WriteLine(" |pory spędza czas tutaj.-Wyja|.");
- Console.WriteLine(" |śnił Medivh. |.");
- Console.WriteLine(" |Tim byłby ważnym źródłem |.");
- Console.WriteLine(" |informacji, lecz niestety |.");
- Console.WriteLine(" |nawet najlepsi magowie nie |.");
- Console.WriteLine(" |mogą się z nim porozumieć |.");
- Console.WriteLine(" | _________________________|___");
- Console.WriteLine(" | / /.");
- Console.WriteLine(" /_/____________________________/.");
- Console.ReadKey();
- Console.Clear();
- }
- static void ChestEncounter()
- {
- Console.ForegroundColor = ConsoleColor.DarkGray;
- Console.BackgroundColor = ConsoleColor.DarkYellow;
- Console.WriteLine(
- " ____...------------...____\n" +
- " _.- ` /o/ __ ____ __ __ __|o|_`-._\n" +
- " .' |o| |o| '.\n" +
- " |=====/o|======================|o|=====|\n" +
- " |____|_|________..____..________|_|____|\n" +
- " | _/ |_ <==========> _/ |_ |\n" +
- " |________________|=00=|________________|\n" +
- " |===|!/========================|!/===|\n" +
- " | |=| .---. |=| |\n" +
- " |===|o|=========| |========|o|===|\n" +
- " | | | |() ()| | | |\n" +
- " |===|o|======{'-.) A (.-'}=====|o|===|\n" +
- " | __/ |__ '-.|vvv|.-' __/ |__ |\n" +
- " |===|o/ .'.'^'.'.|===|.'.'^'.'.|o/===|\n" +
- " | _|o/ __ {.' __ '.} _ _|o/ _|\n" +
- " llllllllllllllllllllllllllllllllllllll\n");
- Console.ReadKey();
- Console.Clear();
- Console.WriteLine(" ______________________________");
- Console.WriteLine(" /|_ 'Dziwne'- rzekł Medivh - |.");
- Console.WriteLine("| |'Pierwszy raz widzę taką |.");
- Console.WriteLine("|__ |skrzynię.Jest otwór na klucz|.");
- Console.WriteLine(" |lecz samego klucza nie ma. |.");
- Console.WriteLine(" |Spróbujmy to otworzyć.' |.");
- Console.WriteLine(" |Patrzysz jak medivh rzuca |.");
- Console.WriteLine(" |zaklęcie na skrzynie, a ona |.");
- Console.WriteLine(" |bez oporu się otwiera |.");
- Console.WriteLine(" |Ukazując w sobie pełno złota|.");
- Console.WriteLine(" |'Co my z tym zrobimy?- zapy |.");
- Console.WriteLine(" |tałeś. |.");
- Console.WriteLine(" |'Oddamy je dla miasta oraz |.");
- Console.WriteLine(" |znajdziemy wskazówki co do |.");
- Console.WriteLine(" |pochodzenia skarbu |.");
- Console.WriteLine(" | _________________________|___");
- Console.WriteLine(" | / /.");
- Console.WriteLine(" /_/____________________________/.");
- Console.ReadKey();
- Console.Clear();
- }
- static void ShipEncounter()
- {
- Console.ForegroundColor = ConsoleColor.DarkGray;
- Console.BackgroundColor = ConsoleColor.DarkCyan;
- Console.WriteLine(
- " ~~~ |\n" +
- "~~~~ ~~~~ ----- |\n" +
- " ~~~ )___( -----\n" +
- " | )___(\n" +
- " --------- |\n" +
- " / | -------|n" +
- " /___________| / |\n" +
- " | /_________|\n" +
- " --------------- |\n" +
- " / | -------------|\n" +
- " / | / |\n" +
- " /___________________| /_______________|\n" +
- " ____________|______________________|__________\n" +
- " |_ _/\n" +
- " |______________________________________/\n" +
- " ~~.. ...~~~. ....~~~... ..~\n");
- Console.ReadKey();
- Console.Clear();
- Console.ForegroundColor = ConsoleColor.Blue;
- Console.BackgroundColor = ConsoleColor.Black;
- Console.WriteLine(" ______________________________");
- Console.WriteLine(" /|_ Statek,niezwykłe osiągnięcie|.");
- Console.WriteLine("| |ludzkości leżało rozbite na |.");
- Console.WriteLine("|__ |plaży. |.");
- Console.WriteLine(" |Obok pozostałości kabiny |.");
- Console.WriteLine(" |kapitana zauważasz złoto |.");
- Console.WriteLine(" |'Weź je, im niestety już się|.");
- Console.WriteLine(" |nie przyda'-rzekł zasmucony |.");
- Console.WriteLine(" |Medivh. |.");
- Console.WriteLine(" |Z racji, że nic więcej nie |.");
- Console.WriteLine(" |pozostało ze statku,wkładasz|.");
- Console.WriteLine(" |złoto do torby i odchodzisz.|.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | _________________________|___");
- Console.WriteLine(" | / /.");
- Console.WriteLine(" /_/____________________________/.");
- Console.ReadKey();
- Console.Clear();
- }
- static void NewCharacter()
- {
- Console.ForegroundColor = ConsoleColor.Blue;
- Console.BackgroundColor = ConsoleColor.Black;
- string PlayerName;
- Console.WriteLine(" ______________________________");
- Console.WriteLine(" /|_ Twoja historia zaczyna się |.");
- Console.WriteLine("| |na plaży nieznanej wyspy. |.");
- Console.WriteLine("|__ |Nie pamiętasz co się stało, |.");
- Console.WriteLine(" |ale po widoku porozrzucanych|.");
- Console.WriteLine(" |desek wygląda to na rozbity |.");
- Console.WriteLine(" |statek. |.");
- Console.WriteLine(" |Ocalała twoja torba, która |.");
- Console.WriteLine(" |nie zawiera nic cennego lub |.");
- Console.WriteLine(" |wartego uwagi. |.");
- Console.WriteLine(" |Postanawiasz poszukać czegoś|.");
- Console.WriteLine(" |wartościowego w zgliszczach |.");
- Console.WriteLine(" |rozbitego statku. |.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | _________________________|___");
- Console.WriteLine(" | / /.");
- Console.WriteLine(" /_/____________________________/.");
- Console.ReadKey();
- Console.Clear();
- Console.WriteLine(" ______________________________");
- Console.WriteLine(" /|_ Spotykasz maga, który widząc|.");
- Console.WriteLine("| |zniszczony statek, przybiegł|.");
- Console.WriteLine("|__ |na plażę.Widząc go, zadajesz|.");
- Console.WriteLine(" |pytanie. |.");
- Console.WriteLine(" |'Kim jesteś?' |.");
- Console.WriteLine(" |'Jestem Medivh, wielki mag |.");
- Console.WriteLine(" |tego miasta, przybyłem na |.");
- Console.WriteLine(" |ratunek poszkodowanym, ale |.");
- Console.WriteLine(" |jedynym ocalałym jesteś ty.'|.");
- Console.WriteLine(" |'Powiedz mi' -kontynuował- |.");
- Console.WriteLine(" |'Jak masz na imię, ocalały?'|.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | |.");
- Console.WriteLine(" | _________________________|___");
- Console.WriteLine(" | / /.");
- Console.WriteLine(" /_/____________________________/.");
- PlayerName = Console.ReadLine();
- Console.Clear();
- Console.WriteLine(" ______________________________");
- Console.WriteLine(" /|_ 'Hmm," + PlayerName + ",to imie|.");
- Console.WriteLine("| |nie jest z tych stron.' |.");
- Console.WriteLine("|__ |Zapewne po takim wypadku nie|.");
- Console.WriteLine(" |pamiętasz z jakich lądów |.");
- Console.WriteLine(" |pochodzisz'- rzekł mag |.");
- Console.WriteLine(" |'Moje imie oraz moja torba |.");
- Console.WriteLine(" |to jedyne co mi zostało po |.");
- Console.WriteLine(" |rozbitym statku'-odpowiadasz|.");
- Console.WriteLine(" |'Dobrze więc, postarajmy się|.");
- Console.WriteLine(" |znaleźć więcej wskazówek na |.");
- Console.WriteLine(" |temat twojej podróży. W tym |.");
- Console.WriteLine(" |miejscu zostało wiele do |.");
- Console.WriteLine(" |przeszukania, chodźmy'-rzekł|.");
- Console.WriteLine(" |Mag wstając z piasku. |.");
- Console.WriteLine(" | _________________________|___");
- Console.WriteLine(" | / /.");
- Console.WriteLine(" /_/____________________________/.");
- }
- static void Main()
- {
- Game.StartGame();
- bool early_game = true;
- char player = 'O';
- char ship = 'S';
- char turtle = 'T';
- char chest = 'C';
- char[,] map = new char[20, 20]
- {
- {'╔','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','╗'},
- {'║',player,'\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'║','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','\0','║'},
- {'╚','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','═','╝'}
- };
- map[2, 4] = turtle;
- map[1, 10] = ship;
- map[15, 15] = chest;
- int player_X = 1, player_Y = 1;
- while(early_game == true)
- {
- for (int i = 0; i < 20; i++)
- {
- for (int j = 0; j < 20; j++)
- {
- Console.Write(map[i, j] + " ");
- }
- Console.WriteLine();
- }
- Console.WriteLine("ExileQuest Beta 0.2");
- }
- char movement = Console.ReadKey(true).KeyChar;
- if (movement == 'W' && map[player_X - 1, player_Y] != '=' && map[player_X - 1, player_Y] != '║')
- {
- map[player_X, player_Y] = '\0';
- map[player_X - 1, player_Y] = player;
- player_X--;
- }
- else
- {
- map[player_X, player_Y] = player;
- }
- if (movement == 'S' && map[player_X + 1, player_Y] != '=' && map[player_X + 1, player_Y] != '║')
- {
- map[player_X, player_Y] = '\0';
- map[player_X + 1, player_Y] = player;
- player_X++;
- }
- else
- {
- map[player_X, player_Y] = player;
- }
- if (movement == 'A' && map[player_X, player_Y - 1] != '=' && map[player_X, player_Y - 1] != '║')
- {
- map[player_X, player_Y] = '\0';
- map[player_X, player_Y - 1] = player;
- player_Y--;
- }
- else
- {
- map[player_X, player_Y] = player;
- }
- if (movement == 'D' && map[player_X, player_Y + 1] != '=' && map[player_X, player_Y + 1] != '║')
- {
- map[player_X, player_Y] = '\0';
- map[player_X, player_Y + 1] = player;
- player_Y++;
- }
- else
- {
- map[player_X, player_Y] = player;
- }
- if (map[player_X, player_Y] == map[2, 4])
- {
- Console.Clear();
- TurtleEncounter();
- }
- if (map[player_X, player_Y] == map[1,10])
- {
- Console.Clear();
- ShipEncounter();
- early_game = false;
- }
- if (map[player_X, player_Y] == map[15,15])
- {
- Console.Clear();
- ChestEncounter();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement