Commit 8fe77b0a authored by Kameron Kinsey's avatar Kameron Kinsey
Browse files

Initialize repository

parent f43b36b0
/******************************************************************************
*
*
* Random Stat Generator for Monster Class
* By: Kameron Kinsey
*
*
*
*
*/
#include "Monster.h"
#include <string>
#include <iostream>
......@@ -613,4 +624,24 @@ Monster::Monster(int seed) {
cout << getWaygd() << endl;
}
}
void Monster::setMonsterStats(int seed) {
srand(seed);
// Set Fight Stat and Modifier
int fight = getFight();
fight = rand() % 20;
setFight(fight);
// Set Flee Stat and Modifier
int flee = getFlee();
flee = rand() % 20;
setFlee(flee);
// Set Talk Stat and Modifier
int talk = getTalk();
talk = rand() % 20;
setTalk(talk);
}
\ No newline at end of file
/******************************************************************************
*
*
* Header File for the Monster Class
* By: Kameron Kinsey
*
*
*
*
*/
#include "Player.h"
#include <cstdlib>
#include <iostream>
......@@ -12,22 +23,5 @@ class Monster {
string getWaygd() { return waygd; }
void setMonsterStats(int seed) {
srand(seed);
// Set Fight Stat and Modifier
int fight = getFight();
fight = rand() % 20;
setFight(fight);
// Set Flee Stat and Modifier
int flee = getFlee();
flee = rand() % 20;
setFlee(flee);
// Set Talk Stat and Modifier
int talk = getTalk();
talk = rand() % 20;
setTalk(talk);
}
void setMonsterStats(int);
};
\ No newline at end of file
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