Commit cba6a64b authored by Aaron Sturtevant's avatar Aaron Sturtevant

X

Merge branch 'master' of gitlab.cs.wallawalla.edu:sturaa/cptr142_group_project
parents a7e41b45 1cbc15d8
...@@ -9,43 +9,90 @@ ...@@ -9,43 +9,90 @@
* *
*/ */
#include "Boss" #include "Boss.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
using namespace std; using namespace std;
Boss::Boss(int floorNumber) { void Boss::summonBoss(int floorNum) {
Boss boss; switch(floorNum) {
switch(floorNumber) {
case 1: case 1:
cout << "A Minotaur stands before you, Warhammer raised and nose pierced" << endl; cout << "A Minotaur stands before you, Warhammer raised and nose pierced" << endl;
boss.setBossStats(seed); setFight(20);
cout << "What are you going to do?" << endl; setTalk(15);
case 2: case 2:
cout << "The Pop-Culture representation of Death Itself stands before you, scythe poised and hungry" << endl; cout << "The Pop-Culture representation of Death Itself stands before you, scythe poised and hungry" << endl;
boss.setBossStats(seed); setFight(17);
cout << "What are you going to do?" << endl; setTalk(17);
case 3: case 3:
cout << "A Dragon stands before you. C'mon, you had to see this coming" << endl; cout << "A Dragon stands before you. C'mon, you had to see this coming" << endl;
monster.setStats(seed); setFight(15);
cout << "What are you going to do?" << endl; 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);
// Set Fight Stat and Modifier int Boss::getFight(int floorNum) {
int fight = getFight();
fight = rand() % 20;
setFight(fight);
// Set Talk Stat and Modifier switch(floorNum) {
int talk = getTalk(); case 1:
talk = rand() % 20; // Minotaur
setTalk(talk); 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) {
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;
}
}
}
...@@ -15,21 +15,13 @@ using namespace std; ...@@ -15,21 +15,13 @@ using namespace std;
class Boss { class Boss {
private: private:
int fight = 10, int fight, talk;
flee = 10,
talk = 10,
health = 5;
public: public:
// Constructor
Boss(int);
// Get Functions // Get Functions
int getFight() { return fight; } int getFight(int floorNum);
int getFlee() { return flee; } int getTalk(int floorNum);
int getTalk() { return talk; }
int getHealth() { return health; }
// Set Function // Other Functions
void setBossStats(int); void summonBoss(int floorNum);
}; };
\ No newline at end of file
...@@ -13,19 +13,19 @@ class Item{ ...@@ -13,19 +13,19 @@ class Item{
int itemFight; int itemFight;
int itemTalk; int itemTalk;
public: public:
Item(string lootName, int lootFight, int lootTalk){ Item(string lootName, int lootFight, int lootTalk) {
itemName = lootName; itemName = lootName;
itemFight = lootFight; itemFight = lootFight;
itemTalk = lootTalk; itemTalk = lootTalk;
} }
string getName(){ string getName() {
return itemName; return itemName;
} }
int getFight(){ int getFight() {
return itemFight; return itemFight;
} }
int getTalk(){ int getTalk() {
return itemTalk; return itemTalk;
} }
}; };
......
...@@ -9,14 +9,13 @@ ...@@ -9,14 +9,13 @@
* *
*/ */
#include "Player.h" #include "Item.h"
#include <cstdlib> #include <cstdlib>
#include <iostream> #include <iostream>
using namespace std; using namespace std;
class Monster { class Monster {
private: private:
string waygd = "What are you going to do?"
int fight, talk; int fight, talk;
public: public:
// Constructor // Constructor
...@@ -25,11 +24,12 @@ class Monster { ...@@ -25,11 +24,12 @@ class Monster {
// Get Functions // Get Functions
int getFight() { return fight; } int getFight() { return fight; }
int getTalk() { return talk; } int getTalk() { return talk; }
string getWaygd() { return waygd; }
// Set Function // Set Function
void setFight(int Fight) { fight = Fight; } void setFight(int Fight) { fight = Fight; }
void setTalk(int Talk) { talk = Talk; } void setTalk(int Talk) { talk = Talk; }
void setMonsterStats(int); void setMonsterStats(int);
// Other Functions
}; };
\ No newline at end of file
...@@ -35,8 +35,8 @@ void Player::setStats(int seed) { ...@@ -35,8 +35,8 @@ void Player::setStats(int seed) {
void check void check
bool Player::checkVictory(bool win) { bool Player::checkVictory(bool playerWon) {
if (win == true) { if (playerWon == true) {
cout << "Congratulations " << getPlayerName() << " you have retrieved the Maguffin of Vauge Desirability!" << endl; cout << "Congratulations " << getPlayerName() << " you have retrieved the Maguffin of Vauge Desirability!" << endl;
} }
} }
......
...@@ -30,7 +30,7 @@ class Player { ...@@ -30,7 +30,7 @@ class Player {
void setFight(int Fight) { fight = Fight; } void setFight(int Fight) { fight = Fight; }
void setTalk(int Talk) { talk = Talk; } void setTalk(int Talk) { talk = Talk; }
void setPlayerName(string name) { playerName = name; } void setPlayerName(string name) { playerName = name; }
void doDamage(int health) { health - 5; } void doDamage() { health -= 5; }
// Check Victory // Check Victory
bool checkVictory(bool win); bool checkVictory(bool win);
......
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