Advertisement
zCool

Enemy

May 17th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.04 KB | None | 0 0
  1. #ifndef ENEMY_H
  2. #define ENEMY_H
  3. #include "Stats.h"
  4. #include "Character.h"
  5.  
  6. class Enemy:public Character
  7. {
  8. private:
  9.     static const int m_defaultDef = 10;
  10.     static const int m_defaultAtk = 10;
  11.  
  12. public:
  13.     enum decisionTypes // is it ok for this to be public ????
  14.     {
  15.         DEFEND,
  16.         RAGE,
  17.         ATTACK
  18.     };
  19.     Enemy(Stats stats);
  20.     decisionTypes chooseWhatToDo(); //returns either DEFEND, RAGE or ATTACK
  21.     void getHit(int attackerATK, int victimDEF, int victimHP); //calculate damage to Enemy
  22.     void setEnemyDefaultDefense() { m_stats.setDefaultDefense(m_defaultDef); } // is this ugly??
  23.     void setEnemyDefaultAttack() { m_stats.setDefaultAttack(m_defaultAtk); } // see above
  24.     void incrementEnemyDefense(int defenseIncrement) { m_stats.incrementDefense(defenseIncrement); } //see above
  25.     void incrementEnemyAttack(int attackIncrement) { m_stats.incrementAttack(attackIncrement); } //see above
  26.     int getAttackStat() { return m_stats.getAttack(); }
  27.     int getHealthStat() { return m_stats.getHealth(); }
  28.     int getDefenseStat() { return m_stats.getDefense(); }
  29. };
  30. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement