Commit a7e41b45 authored by Aaron Sturtevant's avatar Aaron Sturtevant

commiting

parent 14c90189
...@@ -28,14 +28,10 @@ using namespace std; ...@@ -28,14 +28,10 @@ using namespace std;
Boss.bossResponse(floorNum, playerWon); Boss.bossResponse(floorNum, playerWon);
} }
void giveItems(int floorNum, Inventory inventory) {
Boss.giveItems(floorNum, inventory);
}
void giveBossItems(int encounterNum, Inventory inventory) { void giveBossItems(int encounterNum, Inventory inventory) {
Boss.giveItems(floorNum, inventory); Boss.giveItems(floorNum, inventory);
} }
void giveMonsterItems(int encounterNum, Inventory inventory) { void giveMonsterItems(int encounterNum, Inventory inventory) {
Boss.giveItems(encounterNum, inventory); Monster.giveItems(encounterNum, inventory);
} }
...@@ -57,7 +57,7 @@ int main() { ...@@ -57,7 +57,7 @@ int main() {
monsterPtr.giveBossItems(dungeonPtr.floorNum, inventoryPtr); monsterPtr.giveBossItems(dungeonPtr.floorNum, inventoryPtr);
} else { } else {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon); dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
playerPtr playerPtr.doDamage();
} }
} else if (response == "Talk") { } else if (response == "Talk") {
if(playerPtr.getFight() >= BossPtr.getTalk(encounterNum)) { if(playerPtr.getFight() >= BossPtr.getTalk(encounterNum)) {
...@@ -73,7 +73,7 @@ int main() { ...@@ -73,7 +73,7 @@ int main() {
playerWon = true; playerWon = true;
} }
} while (playerWon == false;); } while (playerWon == false);
playerWon = false; playerWon = false;
dungeon.roomCounter++; dungeon.roomCounter++;
...@@ -106,7 +106,7 @@ int main() { ...@@ -106,7 +106,7 @@ int main() {
playerWon = true; playerWon = true;
} }
} while (playerWon == false;); } while (playerWon == false);
playerWon = false; playerWon = false;
dungeon.roomCounter++; dungeon.roomCounter++;
...@@ -124,21 +124,29 @@ int main() { ...@@ -124,21 +124,29 @@ int main() {
string *response = new string; string *response = new string;
cout << "How do you respond? (Fight, Talk, Or Flee): "; cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response; cin >> response;
if((response == 'Fight') || (response == 'Talk') { if(response == "Fight"){
if(dungeon.compareStats(playerPtr, dungeon.floorNum, response)) { if(playerPtr.getFight() >= BossPtr.getFight(encounterNum)) {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
playerWon = true; playerWon = true;
playerVictory = true; dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
dungeonPtr.floorNum++; dungeonPtr.floorNum++;
monsterPtr.giveBossItems(dungeonPtr.floorNum, inventoryPtr);
} else { } else {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon); dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
} playerPtr
}
} else { } else if (response == "Talk") {
cout << "You run crying out of the room. Shame haunts your footsteps" << endl; if(playerPtr.getFight() >= BossPtr.getTalk(encounterNum)) {
playerWon = true; playerWon = true;
dungeon.floorNum--; playerVictory = true;
} dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
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;
}
delete response; 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