diff --git a/Boss.cpp b/Boss.cpp index 01183ee73f6f78f71202ace8d0e8074dce1d1dda..a2296b9848828a505eb8501bc75cdd918b70f3ff 100644 --- a/Boss.cpp +++ b/Boss.cpp @@ -9,43 +9,91 @@ * */ - #include "Boss" +#include "Boss.h" #include #include using namespace std; -Boss::Boss(int floorNumber) { +void Boss::summonBoss(int floorNum) { - Boss boss; - - switch(floorNumber) { + switch(floorNum) { case 1: cout << "A Minotaur stands before you, Warhammer raised and nose pierced" << endl; - boss.setBossStats(seed); - cout << "What are you going to do?" << endl; + setFight(20); + setTalk(15); case 2: cout << "The Pop-Culture representation of Death Itself stands before you, scythe poised and hungry" << endl; - boss.setBossStats(seed); - cout << "What are you going to do?" << endl; + setFight(17); + setTalk(17); case 3: cout << "A Dragon stands before you. C'mon, you had to see this coming" << endl; - monster.setStats(seed); - cout << "What are you going to do?" << endl; + setFight(15); + setTalk(20); + case 4: + cout << "A hooded figure stands before you, dice in one hand, and a rulebook in the other. " << endl + << "You cannot escape the power of the Dungen Master." << endl; + setFight(20); + setTalk(20); } } -void Boss::setBossStats(int seed) { - srand(seed); + +int Boss::getFight(int floorNum) { - // Set Fight Stat and Modifier - int fight = getFight(); - fight = rand() % 20; - setFight(fight); + switch(floorNum) { + case 1: + // Minotaur + return fight = 20; + case 2: + // Death + return fight = 17; + case 3: + // Dragon + return fight = 15; + case 4: + // Dungen Master + return fight = 20 + } +} + +int Boss::getTalk(int floorNum) { - // Set Talk Stat and Modifier - int talk = getTalk(); - talk = rand() % 20; - setTalk(talk); + switch(floorNum) { + case 1: + // Minotaur + return talk = 15; + case 2: + // Death + return talk = 17; + case 3: + // Dragon + return talk = 20; + case 4: + // Dungen Master + return talk = 20 + } } +void Boss::bossResponse(int floorNum, int playerWon) { + + if (playerWon == true) { + switch(floorNum) { + case 1: + // Minotaur + cout << "The Minotaur drops its hammer, a bellow escapes its lips as it falls to the floor. Defeated" << endl; + case 2: + // Death + cout << "Death drops its scythe, as it disappears into the Soul Realm. Defeated" << endl; + case 3: + // Dragon + cout << "The Dragon falls in a bout of flame, its fighting 'til its last breath. Defeated" << endl; + case 4: + // Dungen Master + cout << "\"How did you defeat me?\" The Dungen Master exclaims. \"I had everyting prepared with utmost care.\"" << endl + << "\"Perfectly laid traps, well executed enemies, but somehow you still beat me.\"" << endl + << "\"Take it then, if you are willing to endure the consequences. . .\"" << endl; + Player player; + player.checkVictory(playerWon); + } +} diff --git a/Boss.h b/Boss.h index 962bda5d3633fb9d306cd109ab57958121bcc15b..7d07d0b9616994c33114248de978bc31a747e15c 100644 --- a/Boss.h +++ b/Boss.h @@ -15,21 +15,13 @@ using namespace std; class Boss { private: - int fight = 10, - flee = 10, - talk = 10, - health = 5; + int fight, talk; public: - // Constructor - Boss(int); - // Get Functions - int getFight() { return fight; } - int getFlee() { return flee; } - int getTalk() { return talk; } - int getHealth() { return health; } + int getFight(int floorNum); + int getTalk(int floorNum); - // Set Function - void setBossStats(int); + // Other Functions + void summonBoss(int floorNum); }; \ No newline at end of file diff --git a/Item.h b/Item.h index 3aa3e8b3fe854a7d44bb7e53cb0fd0d98fcbdc0f..0a9c125b7366a4ec68682c0e8dc6c78d4ce707d5 100644 --- a/Item.h +++ b/Item.h @@ -13,19 +13,19 @@ class Item{ int itemFight; int itemTalk; public: - Item(string lootName, int lootFight, int lootTalk){ + Item(string lootName, int lootFight, int lootTalk) { itemName = lootName; itemFight = lootFight; itemTalk = lootTalk; } - string getName(){ + string getName() { return itemName; } - int getFight(){ + int getFight() { return itemFight; } - int getTalk(){ + int getTalk() { return itemTalk; } }; diff --git a/Monster.h b/Monster.h index 47ace836133dae27fc88484801fa28397bd8bb2a..d937fcf4bb76a57b95338c1d199c8d4fcbe26c18 100644 --- a/Monster.h +++ b/Monster.h @@ -9,14 +9,13 @@ * */ -#include "Player.h" +#include "Item.h" #include #include using namespace std; class Monster { private: - string waygd = "What are you going to do?" int fight, talk; public: // Constructor @@ -25,11 +24,12 @@ class Monster { // Get Functions int getFight() { return fight; } int getTalk() { return talk; } - string getWaygd() { return waygd; } // Set Function void setFight(int Fight) { fight = Fight; } void setTalk(int Talk) { talk = Talk; } void setMonsterStats(int); + + // Other Functions }; \ No newline at end of file diff --git a/Player.cpp b/Player.cpp index f129b666a6e8682c5f33375ea3ff7035bb8894bc..1ff6d66d2921cca26fe778c15da1ea1456e9e25c 100644 --- a/Player.cpp +++ b/Player.cpp @@ -35,8 +35,8 @@ void Player::setStats(int seed) { void check -bool Player::checkVictory(bool win) { - if (win == true) { +bool Player::checkVictory(bool playerWon) { + if (playerWon == true) { cout << "Congratulations " << getPlayerName() << " you have retrieved the Maguffin of Vauge Desirability!" << endl; } }