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 @@
*
*/
#include "Boss"
#include "Boss.h"
#include <string>
#include <iostream>
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;
}
}
}
......@@ -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
......@@ -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;
}
};
......
......@@ -9,14 +9,13 @@
*
*/
#include "Player.h"
#include "Item.h"
#include <cstdlib>
#include <iostream>
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
......@@ -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;
}
}
......
......@@ -30,7 +30,7 @@ class Player {
void setFight(int Fight) { fight = Fight; }
void setTalk(int Talk) { talk = Talk; }
void setPlayerName(string name) { playerName = name; }
void doDamage(int health) { health - 5; }
void doDamage() { health -= 5; }
// Check Victory
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