25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
584 B

6 년 전
  1. #ifndef _2EASY4ME_MONSTER_H_
  2. #define _2EASY4ME_MONSTER_H_
  3. #include "character.hpp"
  4. class Monster : public Character
  5. {
  6. protected:
  7. int bounty;
  8. public:
  9. Monster(char *name)
  10. : Character(name)
  11. {
  12. this->bounty = 0;
  13. }
  14. Monster(char *name, int hp, int att, int def)
  15. : Character(name, hp, att, def)
  16. {
  17. this->bounty = 0;
  18. }
  19. Monster(char *name, int hp, int att, int def, int bounty)
  20. : Character(name, hp, att, def)
  21. {
  22. this->bounty = bounty;
  23. }
  24. int drop()
  25. {
  26. return bounty;
  27. }
  28. };
  29. #endif