Commit 14c90189 authored by Aaron Sturtevant's avatar Aaron Sturtevant

commiting

parent 86e1f43f
......@@ -25,7 +25,7 @@ using namespace std;
}
void Dungeon::bossResponse(int floorNum, bool playerWon) {
Boss.bossResponse(floorNum, response);
Boss.bossResponse(floorNum, playerWon);
}
void giveItems(int floorNum, Inventory inventory) {
......
......@@ -49,20 +49,28 @@ int main() {
do {
cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response;
if((response == 'Fight') || (response == 'Talk') {
if(dungeon.compareStats(playerPtr, dungeon.floorNum, response)) {
if(response == "Fight"){
if(playerPtr.getFight() >= BossPtr.getFight(encounterNum)) {
playerWon = true;
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
dungeonPtr.floorNum++;
monsterPtr.giveBossItems(dungeonPtr.floorNum, inventoryPtr);
} else {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
playerPtr
}
} else if (response == "Talk") {
if(playerPtr.getFight() >= BossPtr.getTalk(encounterNum)) {
playerWon = true;
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
dungeonPtr.floorNum++;
monsterPtr.giveBossItems(dungeonPtr.floorNum, inventoryPtr);
} else {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
}
} else {
cout << "You run crying out of the room. Shame haunts your footsteps" << endl;
playerWon = true;
}
} while (playerWon == false;);
......@@ -76,19 +84,26 @@ int main() {
do {
cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response;
if((response == 'Fight') || (response == 'Talk') {
if(dungeon.compareStats(playerPtr, monsterPtr, dungeon.roomEncounter, response)) {
if(response == "Fight"){
if(playerPtr.getFight() >= monsterPtr.getFight(encounterNum)) {
playerWon = true;
dungeonPtr.monsterResponse(dungeonPtr.encounterNum, playerWon);
monsterPtr.giveMonsterItems(dungeonPtr.encounterNum, inventoryPtr);
} else {
dungeonPtr.monsterResponse(dungeonPtr.encounterNum, playerWon);
}
} else if (response == "Talk") {
if(playerPtr.getFight() >= monsterPtr.getTalk(encounterNum)) {
playerWon = true;
dungeonPtr.monsterResponse(dungeonPtr.encounterNum, playerWon);
dungeonPtr.floorNum++;
monsterPtr.giveMonsterItems(dungeonPtr.encounterNum, inventoryPtr);
} else {
dungeonPtr.bossResponse(dungeonPtr.encounterNum, playerWon);
dungeonPtr.monsterResponse(dungeonPtr.encounterNum, playerWon);
}
} else {
cout << "You run crying out of the room. Shame haunts your footsteps" << endl;
playerWon = true;
}
} while (playerWon == false;);
......@@ -125,7 +140,7 @@ int main() {
dungeon.floorNum--;
}
delete response;
} while (playerWon == false;);
} while (playerWon == 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