// "Copyright [year] " #include "Entity.h" #include #include #include #include #include "Moves.h" using std::cerr; using std::cin; using std::cout; using std::endl; using std::string; using std::vector; // void Entity::action() {} void Entity::move() { } void Entity::setPos() { srand(time(0)); // Random Positioning this->colPos = rand_r() % 3; this->rowPos = rand_r() % 3; } bool Entity::checkHealth() { bool life = true; if (con <= 0) { life = false; } return life; } Player::Player() { setPos(); this->con = 10; this->str = 10; this->dex = 10; } void Player::action() { char act; cout << "What will you do?" << endl; cout << " a. Light Attack" << endl; cout << " b. Heavy Attack" << endl; cout << " c. Defend" << endl; cout << " d. Counter" << endl; cout << " f. Flee" << endl; cout << " Enter Action Here: "; cin >> act; switch (act) {} } void Player::setClass(char Class) { switch (Class) { case 'a': // Warrior this->str = 14; this->con = 12; this->dex = 8; break; case 'b': // Rogue break; case 'c': // Mage break; } } void Enemy::setBossClass() { srand(time(0)); int monster = rand_r() % 3; // Boss Monster Randomization switch (monster) { case 1: // Minotaur this->str = 16; this->con = 14; this->dex = 8; break; case 2: // Dragonoid this->str = 14; this->con = 16; this->dex = 12; break; case 3: // Cyclops this->str = 18; this->con = 16; this->dex = 6; break; } } void Enemy::setClassByChoice(int monster) { switch (monster) { case 1: // Goblin this->str = 6; this->con = 6; this->dex = 12; break; case 2: // Orc this->str = 14; this->con = 10; this->dex = 8; break; case 3: // Skeleton this->str = 8; this->con = 10; this->dex = 10; break; } } void Enemy::setClassByRand() { srand(time(0)); int monster = rand_r() % 3; // Monster Randomization switch (monster) { case 1: // Goblin this->str = 6; this->con = 6; this->dex = 12; break; case 2: // Orc this->str = 14; this->con = 10; this->dex = 8; break; case 3: // Skeleton this->str = 8; this->con = 10; this->dex = 10; break; } } Enemy::Enemy() { setPos(); }