Commit 7a13f3ef authored by Aaron Sturtevant's avatar Aaron Sturtevant
Browse files

commiting

parent a3c778b2
......@@ -8,7 +8,7 @@ class Dungeon {
int roomEncounter;
int floorNum = 1;
int monsterRoll;
int roomCounter = 0;
int roomCounter = 1;
int rollRoom(int seed);
void dungeonOutput(int encounterNum);
......
......@@ -9,8 +9,9 @@ int main() {
Dungeon *dungeonPtr = new Dungeon;
Player *playerPtr = new Player;
Items *items = new Item;
Items *itemPtr = new Item;
Monster *monsterPtr = new Monster;
Boss *bossPtr = new Boss;
bool playerWon = false;
bool playerVictory = false;
......@@ -30,22 +31,42 @@ int main() {
// }else{
while (!playerVictory){
while (playerVictory == false){
//floor 1-3
while(dungeonPtr) {
while(dungeonPtr.floorNum <= 3) {
string *response = new string;
playerWon = false;
dungeon.roomEncounter = dungeon.rollRoom(seed);
if(dungeon.roomCounter % 5 == 0) {
dungeon.getBoss(dungeon.floorNum);
cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response;
dungeon.monsterResponse()
if(dungeonPtr.roomCounter % 5 == 0) {
dungeon.getBoss(dungeonPtr.floorNum);
do {
cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response;
if((response == 'Fight') || (response == 'Talk') {
if(dungeon.compareStats(playerPtr, bossPtr)) {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
playerWon = true;
dungeonPtr.floorNum++;
monsterPtr.giveItems(dungeonPtr.floorNum, itemPtr);
} 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;);
playerWon = false;
dungeon.roomCounter++;
} else {
dungeon.roomEncounter = dungeon.rollRoom(seed);
dungeon.dungeonOutput(dungeon.roomEncounter);
}
......
Supports Markdown
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