Commit 86e1f43f authored by Aaron Sturtevant's avatar Aaron Sturtevant

commiting

parent 23b3e678
#include <iomanip>
#include <iostream>
#include <string>
#include "Player.h"
#include "Boss.h"
#include "Inventory.h"
#include "Monster.h"
using namespace std;
int Dungeon::rollRoom() {
......@@ -12,14 +16,26 @@ using namespace std;
Monster.summon(encounterNum);
}
void Dungeon::monsterResponse(int encounterNum, string response) {
Monster.monsterResponse(encounterNum, response);
void Dungeon::monsterResponse(int encounterNum, bool playerWon) {
Monster.monsterResponse(encounterNum, playerWon);
}
void Dungeon::getBoss(int floorNum) {
Monster.summonBoss(floorNum);
Boss.summonBoss(floorNum);
}
void Dungeon::bossResponse(int floorNum, string response) {
Monster.bossResponse(floorNum, respose);
}
\ No newline at end of file
void Dungeon::bossResponse(int floorNum, bool playerWon) {
Boss.bossResponse(floorNum, response);
}
void giveItems(int floorNum, Inventory inventory) {
Boss.giveItems(floorNum, inventory);
}
void giveBossItems(int encounterNum, Inventory inventory) {
Boss.giveItems(floorNum, inventory);
}
void giveMonsterItems(int encounterNum, Inventory inventory) {
Boss.giveItems(encounterNum, inventory);
}
......@@ -2,6 +2,10 @@
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include "Player.h"
#include "Boss.h"
#include "Inventory.h"
#include "Monster.h"
using namespace std;
class Dungeon {
......@@ -16,7 +20,7 @@ class Dungeon {
void monsterResponse(int encounterNum, string response);
void getBoss(int floorNum);
void bossResponse(int floorNum, string response);
void giveBossItems(int floorNum, Inventory inventory);
void giveMonsterItems(int encounterNum, Inventory inventory);
};
......@@ -50,11 +50,11 @@ int main() {
cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response;
if((response == 'Fight') || (response == 'Talk') {
if(dungeon.compareStats(playerPtr, dungeon.floorNum)) {
if(dungeon.compareStats(playerPtr, dungeon.floorNum, response)) {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
playerWon = true;
dungeonPtr.floorNum++;
monsterPtr.giveItems(dungeonPtr.floorNum, inventoryPtr);
monsterPtr.giveBossItems(dungeonPtr.floorNum, inventoryPtr);
} else {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
}
......@@ -77,10 +77,10 @@ int main() {
cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response;
if((response == 'Fight') || (response == 'Talk') {
if(dungeon.compareStats(playerPtr, monsterPtr, dungeon.roomEncounter)) {
if(dungeon.compareStats(playerPtr, monsterPtr, dungeon.roomEncounter, response)) {
dungeonPtr.monsterResponse(dungeonPtr.encounterNum, playerWon);
playerWon = true;
monsterPtr.giveItems(dungeonPtr.encounterNum, inventoryPtr);
monsterPtr.giveMonsterItems(dungeonPtr.encounterNum, inventoryPtr);
} else {
dungeonPtr.bossResponse(dungeonPtr.encounterNum, playerWon);
}
......@@ -110,12 +110,11 @@ int main() {
cout << "How do you respond? (Fight, Talk, Or Flee): ";
cin >> response;
if((response == 'Fight') || (response == 'Talk') {
if(dungeon.compareStats(playerPtr, dungeon.floorNum)) {
if(dungeon.compareStats(playerPtr, dungeon.floorNum, response)) {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
playerWon = true;
playerVictory = true;
dungeonPtr.floorNum++;
monsterPtr.giveItems(dungeonPtr.floorNum, inventoryPtr);
} else {
dungeonPtr.bossResponse(dungeonPtr.floorNum, playerWon);
}
......
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