|
|
@ -32,6 +32,7 @@ int main() |
|
|
|
Character player = Character(playerName, 1); |
|
|
|
Character archMage = Character("Arch-Mage", 10000); |
|
|
|
std::vector<Character> enemies = { |
|
|
|
Character("GOLDEN PIG", 1000000, 1, 1), |
|
|
|
Character("Uraneus", 1), |
|
|
|
Character("Ekey", 2), |
|
|
|
Character("Wekius", 3), |
|
|
@ -50,27 +51,29 @@ int main() |
|
|
|
choiceInt = UserInterface::getNumber( |
|
|
|
"What are you gonna do today?\n>", |
|
|
|
0, 6); |
|
|
|
switch (choiceInt) |
|
|
|
if (choiceInt == 0) |
|
|
|
{ |
|
|
|
case 0: |
|
|
|
UserInterface::print("You commit sudoku...\n"); |
|
|
|
UserInterface::print("Was it supposed to be seppuku?\n"); |
|
|
|
UserInterface::print("Nevermind, you killed yourself.\n"); |
|
|
|
player.kill(); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
} |
|
|
|
else if (choiceInt == 1) |
|
|
|
{ |
|
|
|
UserInterface::print("You spend the whole day sleeping...\n"); |
|
|
|
UserInterface::print("HP and MP restored.\n"); |
|
|
|
player.rest(); |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
} |
|
|
|
else if (choiceInt == 2) |
|
|
|
{ |
|
|
|
UserInterface::print("You practice your magic in the yard...\n"); |
|
|
|
UserInterface::print("You gained some experience.\n"); |
|
|
|
printf("%ld\n", player.getLevel()); |
|
|
|
fflush(stdout); |
|
|
|
player.increaseExperience((rand() % player.getLevel()) + 1); |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
} |
|
|
|
else if (choiceInt == 3) |
|
|
|
{ |
|
|
|
UserInterface::print("List of your classmates:\n"); |
|
|
|
UserInterface::enemiesInfo(enemies); |
|
|
|
choiceInt = UserInterface::getNumber("Who would you prefer to train with?\n>", 0, enemies.size()); |
|
|
@ -100,9 +103,9 @@ int main() |
|
|
|
UserInterface::print("On second thought, you decide to sleep in your room instead...\n"); |
|
|
|
player.rest(); |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
case 4: |
|
|
|
} |
|
|
|
else if (choiceInt == 4) |
|
|
|
{ |
|
|
|
UserInterface::print("You are going to challenge the Arch-Mage...\n"); |
|
|
|
UserInterface::print("Are you sure? (y/N)\n>"); |
|
|
|
std::cin >> choiceChar; |
|
|
@ -132,15 +135,16 @@ int main() |
|
|
|
UserInterface::print("On second thought, you decide to sleep in your room instead...\n"); |
|
|
|
player.rest(); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 5: |
|
|
|
} |
|
|
|
else if (choiceInt == 5) |
|
|
|
{ |
|
|
|
UserInterface::print("You found some info about the arch-mage:\n"); |
|
|
|
UserInterface::characterInfo(archMage); |
|
|
|
break; |
|
|
|
case 6: |
|
|
|
} |
|
|
|
else if (choiceInt == 6) |
|
|
|
{ |
|
|
|
UserInterface::print("You meditate and got some insight to your ability:\n"); |
|
|
|
UserInterface::characterInfo(player); |
|
|
|
break; |
|
|
|
} |
|
|
|
UserInterface::nextDay(); |
|
|
|
} |
|
|
|