Initial.
This commit is contained in:
parent
ad2a34bbbd
commit
865375cce9
|
@ -71,3 +71,5 @@ Thumbs.db
|
|||
*.dll
|
||||
*.exe
|
||||
|
||||
# Build dir
|
||||
build/*
|
||||
|
|
19
main.cpp
19
main.cpp
|
@ -107,7 +107,7 @@ int main() {
|
|||
{"Exit of the dungeon",
|
||||
"You see some sunlight coming from the top. It's the exit!",
|
||||
{{"Exit the dungeon", "Move on"},
|
||||
{"You exit this damned dungeon. Good job.", "You wanted to stay here for longer, likely because you think your mission isn't over"},
|
||||
{"You exit this damned dungeon. Good job.", "You wanted to stay here for longer, likely because you think your mission isn't over."},
|
||||
{{0, 0, 0, 0, 0, EXT}, {0, 0, 0, 0, 0, REG}}}},
|
||||
};
|
||||
int iShouldStop = 0;
|
||||
|
@ -117,6 +117,7 @@ int main() {
|
|||
char inp[2];
|
||||
int iInputIsCorrect = 1;
|
||||
int iXPFlag = 0;
|
||||
int iTurns = 0;
|
||||
srand(time(0));
|
||||
|
||||
while (!iShouldStop) {
|
||||
|
@ -127,7 +128,8 @@ int main() {
|
|||
if (iInputIsCorrect && !iXPFlag) {
|
||||
iRoomId = rand() % 6 + player.iKeys;
|
||||
room = vRooms[iRoomId];
|
||||
cout << noshowpos << player << endl;
|
||||
cout << noshowpos << player << " [Turns: " << iTurns << "]" << endl;
|
||||
iTurns++;
|
||||
cout << "> " << room.sName << "\n";
|
||||
cout << "=> " << room.sDescription << "\n";
|
||||
for (int i = 0; i < room.choices.vsNames.size(); i++)
|
||||
|
@ -157,11 +159,16 @@ int main() {
|
|||
iEPDelta = min(0, iEPDelta);
|
||||
}
|
||||
|
||||
cout << showpos << "[" << iHPDelta << "hp]" << " ";
|
||||
cout << showpos << "[" << iEPDelta << "ep]" << " ";
|
||||
cout << showpos << "[" << iXPDelta << "xp]" << " ";
|
||||
if (outcome.iPlayerHealthDelta)
|
||||
cout << showpos << "[" << iHPDelta << "hp]" << " ";
|
||||
if (outcome.iPlayerEnduranceDelta)
|
||||
cout << showpos << "[" << iEPDelta << "ep]" << " ";
|
||||
if (outcome.iPlayerXperienceDelta)
|
||||
cout << showpos << "[" << iXPDelta << "xp]" << " ";
|
||||
if (outcome.iPlayerLevelDelta)
|
||||
cout << showpos << "[" << outcome.iPlayerLevelDelta << "lvl]";
|
||||
if (!outcome.iPlayerEnduranceDelta && !outcome.iPlayerHealthDelta && !outcome.iPlayerXperienceDelta)
|
||||
cout << "[Nothing]";
|
||||
} else {
|
||||
switch (outcome.eSpecial) {
|
||||
case TRS:
|
||||
|
@ -250,7 +257,7 @@ int main() {
|
|||
player.iXperience += player.iLevel;
|
||||
}
|
||||
} else if (outcome.eSpecial == EXT) {
|
||||
cout << "You exit the dungeon with " << player.iXperience << "xp. Congrats!" << endl;
|
||||
cout << "You exit the dungeon with " << player.iXperience + player.iArmor * 50 + player.iWeapon * 50 << "xp. Congrats!" << endl;
|
||||
iShouldStop = 1;
|
||||
}
|
||||
cout << room.choices.vsDescriptions[i] << endl;
|
||||
|
|
Loading…
Reference in New Issue