-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMonster.hpp
38 lines (28 loc) · 1.07 KB
/
Monster.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "./GeneralMethod.hpp"
#include "./Character.hpp"
#include "./Fighter.hpp"
class Fighter;
class Monster : public Character {
private:
int dropExpAmount;
public:
Monster() {};
Monster(std::string name, ElementalAttribute element, int maxhp, int atk, int def, int spd, int dropExpAmount);
virtual ~Monster() {};
virtual void damagedMessage(int const damagePoint);
virtual void deadMessage();
void initAttackMethod();
void randomAttack(Fighter& fighter);
int getDropExpAmount();
void setDropExpAmount(int dropExpAmount);
};
inline Monster :: Monster(std::string const name, ElementalAttribute const element, int const maxhp, int const atk, int const def, int const spd, int dropExpAmount) : Character(name, element, maxhp, atk, def, spd), dropExpAmount(dropExpAmount) {
this->initAttackMethod();
}
inline int Monster :: getDropExpAmount() {
return this->dropExpAmount;
}
inline void Monster :: setDropExpAmount(int dropExpAmount) {
this->dropExpAmount = dropExpAmount;
}