Monster.h
1 #pragma once 2 #include "Creature.h" 3 4 enum MonsterType 5 { 6 MT_SLIME = 1, 7 MT_ORC = 2, 8 MT_SKELETON = 3 9 }; 10 11 class Monster : public Creature 12 { 13 public: 14 Monster(int monsterType) 15 : Creature(CT_MONSTER), _monsterType(monsterType) 16 { 17 18 } 19 20 virtual void PrintInfo(); 21 22 protected: 23 int _monsterType; 24 }; 25 26 class Slime : public Monster 27 { 28 public: 29 Slime() : Monster(MT_SLIME) 30 { 31 _hp = 50; 32 _attack = 5; 33 _defence = 2; 34 } 35 }; 36 37 class Orc : public Monster 38 { 39 public: 40 Orc() : Monster(MT_ORC) 41 { 42 _hp = 80; 43 _attack = 8; 44 _defence = 3; 45 } 46 }; 47 48 class Skeleton : public Monster 49 { 50 public: 51 Skeleton() : Monster(MT_SKELETON) 52 { 53 _hp = 100; 54 _attack = 15; 55 _defence = 4; 56 } 57 };