|
@ -1,5 +1,6 @@ |
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
#include <iostream>
|
|
|
|
|
|
#include <fstream>
|
|
|
#include <thread>
|
|
|
#include <thread>
|
|
|
#include <chrono>
|
|
|
#include <chrono>
|
|
|
#include <random>
|
|
|
#include <random>
|
|
@ -13,7 +14,11 @@ |
|
|
|
|
|
|
|
|
std::string loadFlag() |
|
|
std::string loadFlag() |
|
|
{ |
|
|
{ |
|
|
return ""; |
|
|
|
|
|
|
|
|
std::string flagString; |
|
|
|
|
|
std::ifstream flagFile("flag.txt"); |
|
|
|
|
|
flagFile >> flagString; |
|
|
|
|
|
flagFile.close(); |
|
|
|
|
|
return flagString; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int main() |
|
|
int main() |
|
@ -32,7 +37,7 @@ int main() |
|
|
UserInterface::welcomeMessage(); |
|
|
UserInterface::welcomeMessage(); |
|
|
UserInterface::epilogue(); |
|
|
UserInterface::epilogue(); |
|
|
player = UserInterface::characterCreation(); |
|
|
player = UserInterface::characterCreation(); |
|
|
archMage = new Character("Arch-Mage", 100, 0, 100000, 100000, 1, 1); |
|
|
|
|
|
|
|
|
archMage = new Character("Arch-Mage", 500, 0, 5000, 5000, 1, 1); |
|
|
enemies = { |
|
|
enemies = { |
|
|
new Character("Abby", 1, 1, 10, 5, 1, 1), |
|
|
new Character("Abby", 1, 1, 10, 5, 1, 1), |
|
|
new Character("John", 2, 3, 20, 10, 1, 1), |
|
|
new Character("John", 2, 3, 20, 10, 1, 1), |
|
@ -73,7 +78,7 @@ int main() |
|
|
choiceInt = UserInterface::getNumber("Who would you prefer to train with?\n>", 0, enemies.size()); |
|
|
choiceInt = UserInterface::getNumber("Who would you prefer to train with?\n>", 0, enemies.size()); |
|
|
UserInterface::print("You are going to spar with:\n"); |
|
|
UserInterface::print("You are going to spar with:\n"); |
|
|
UserInterface::characterInfo(enemies.at(choiceInt)); |
|
|
UserInterface::characterInfo(enemies.at(choiceInt)); |
|
|
UserInterface::print("Are you sure? (y/N)"); |
|
|
|
|
|
|
|
|
UserInterface::print("Are you sure? (y/N)e">\n>"); |
|
|
std::cin >> choiceChar; |
|
|
std::cin >> choiceChar; |
|
|
if (choiceChar == 'y' || choiceChar == 'Y') |
|
|
if (choiceChar == 'y' || choiceChar == 'Y') |
|
|
{ |
|
|
{ |
|
@ -102,7 +107,7 @@ int main() |
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
UserInterface::print("You are going to challenge the Arch-Mage...\n"); |
|
|
UserInterface::print("You are going to challenge the Arch-Mage...\n"); |
|
|
UserInterface::print("Are you sure? (y/N)"); |
|
|
|
|
|
|
|
|
UserInterface::print("Are you sure? (y/N)e">\n>"); |
|
|
std::cin >> choiceChar; |
|
|
std::cin >> choiceChar; |
|
|
if (choiceChar == 'y' || choiceChar == 'Y') |
|
|
if (choiceChar == 'y' || choiceChar == 'Y') |
|
|
{ |
|
|
{ |
|
@ -116,13 +121,13 @@ int main() |
|
|
UserInterface::print("He let you take a glimpse to the scroll that you always wanted...\n"); |
|
|
UserInterface::print("He let you take a glimpse to the scroll that you always wanted...\n"); |
|
|
UserInterface::print("Turns out the content is just some meaningless word...\n"); |
|
|
UserInterface::print("Turns out the content is just some meaningless word...\n"); |
|
|
UserInterface::print("Here is the content:\n"); |
|
|
UserInterface::print("Here is the content:\n"); |
|
|
UserInterface::print(flag); |
|
|
|
|
|
|
|
|
UserInterface::print(flag + "\n"); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
UserInterface::print("You lose, but you still get some experience...\n"); |
|
|
|
|
|
player->revive(); |
|
|
|
|
|
player->increaseExperience(enemies.at(choiceInt)->getLevel() / 2); |
|
|
|
|
|
|
|
|
UserInterface::print("You lose...\n"); |
|
|
|
|
|
UserInterface::print("Sadly his spell was to powerful,\n"); |
|
|
|
|
|
UserInterface::print("You got killed by the arch-mage...\n"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|