|
|
@ -1,5 +1,6 @@ |
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <thread>
|
|
|
|
#include <chrono>
|
|
|
|
#include <random>
|
|
|
@ -13,7 +14,11 @@ |
|
|
|
|
|
|
|
std::string loadFlag() |
|
|
|
{ |
|
|
|
return ""; |
|
|
|
std::string flagString; |
|
|
|
std::ifstream flagFile("flag.txt"); |
|
|
|
flagFile >> flagString; |
|
|
|
flagFile.close(); |
|
|
|
return flagString; |
|
|
|
} |
|
|
|
|
|
|
|
int main() |
|
|
@ -32,7 +37,7 @@ int main() |
|
|
|
UserInterface::welcomeMessage(); |
|
|
|
UserInterface::epilogue(); |
|
|
|
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 = { |
|
|
|
new Character("Abby", 1, 1, 10, 5, 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()); |
|
|
|
UserInterface::print("You are going to spar with:\n"); |
|
|
|
UserInterface::characterInfo(enemies.at(choiceInt)); |
|
|
|
UserInterface::print("Are you sure? (y/N)"); |
|
|
|
UserInterface::print("Are you sure? (y/N)e">\n>"); |
|
|
|
std::cin >> choiceChar; |
|
|
|
if (choiceChar == 'y' || choiceChar == 'Y') |
|
|
|
{ |
|
|
@ -102,7 +107,7 @@ int main() |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
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; |
|
|
|
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("Turns out the content is just some meaningless word...\n"); |
|
|
|
UserInterface::print("Here is the content:\n"); |
|
|
|
UserInterface::print(flag); |
|
|
|
UserInterface::print(flag + "\n"); |
|
|
|
} |
|
|
|
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 |
|
|
|