Commit 8d622d6d authored by Milwaukee Davis's avatar Milwaukee Davis

Update main.cpp to return items from encounters

parent 0d38a078
......@@ -60,8 +60,8 @@ int main() {
if(playerPtr->getFight() >= bossPtr->getFight(dungeonPtr->floorNum)) {
playerWon = true;
dungeonPtr->bossResponse(dungeonPtr->floorNum, playerWon);
bossPtr->giveBossItems(dungeonPtr->floorNum, *inventoryPtr);
dungeonPtr->floorNum++;
dungeonPtr->giveBossItems(dungeonPtr->floorNum, *inventoryPtr);
} else {
dungeonPtr->bossResponse(dungeonPtr->floorNum, playerWon);
playerPtr->doDamage();
......@@ -70,8 +70,8 @@ int main() {
if(playerPtr->getFight() >= bossPtr->getTalk(dungeonPtr->floorNum)) {
playerWon = true;
dungeonPtr->bossResponse(dungeonPtr->floorNum, playerWon);
bossPtr->giveBossItems(dungeonPtr->floorNum, *inventoryPtr);
dungeonPtr->floorNum++;
dungeonPtr->giveBossItems(dungeonPtr->floorNum, *inventoryPtr);
} else {
dungeonPtr->bossResponse(dungeonPtr->floorNum, playerWon);
}
......@@ -79,7 +79,7 @@ int main() {
cout << "You run crying out of the room. Shame haunts your footsteps" << endl;
playerWon = true;
}
ingameMenu(*inventoryPtr);
} while (playerWon == false);
playerWon = false;
......@@ -95,16 +95,16 @@ int main() {
if(playerPtr->getFight() >= monsterPtr->getFight(dungeonPtr->roomEncounter)) {
playerWon = true;
dungeonPtr->monsterResponse(dungeonPtr->roomEncounter, playerWon);
dungeonPtr->giveMonsterItems(dungeonPtr->roomEncounter, *inventoryPtr);
monsterPtr->giveMonsterItems(dungeonPtr->roomEncounter, *inventoryPtr);
} else {
dungeonPtr->monsterResponse(dungeonPtr->roomEncounter, playerWon);
monsterPtr->monsterResponse(dungeonPtr->roomEncounter, playerWon);
playerPtr->doDamage();
}
} else if (response == "Talk") {
if(playerPtr->getFight() >= monsterPtr->getTalk(dungeonPtr->roomEncounter)) {
playerWon = true;
dungeonPtr->monsterResponse(dungeonPtr->roomEncounter, playerWon);
dungeonPtr->giveMonsterItems(dungeonPtr->roomEncounter, *inventoryPtr);
monsterPtr->giveMonsterItems(dungeonPtr->roomEncounter, *inventoryPtr);
} else {
dungeonPtr->monsterResponse(dungeonPtr->roomEncounter, playerWon);
playerPtr->doDamage();
......@@ -113,7 +113,7 @@ int main() {
cout << "You run crying out of the room. Shame haunts your footsteps" << endl;
playerWon = true;
}
ingameMenu(*inventoryPtr);
} while (playerWon == false);
playerWon = false;
......@@ -155,6 +155,7 @@ int main() {
cout << "You run crying out of the room. Shame haunts your footsteps" << endl;
playerWon = true;
}
ingameMenu(*inventoryPtr);
}while (playerWon == false);
} while (playerVictory == false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment