-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonster.hpp
68 lines (48 loc) · 1.28 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#pragma once
#include "sprite.hpp"
#include "map.hpp"
#include "player.hpp"
#include "monsters/ball.hpp"
class player;
class map;
class monster {
private:
player *Player;
map *Map;
int MaxAttackCount;
int BeforeHP = this->MaxHP;
int PoisonLeft = 0;
int PoisonCount = 0;
int PoisonDamage;
int KnockBackCount = 0;
pos KnockBack{};
pos SpawnPoint{};
std::map<std::string, int> Graph;
std::map<std::string, pos> GraphSize;
public:
bool Use;
bool Hide = false;
sprite Sprite;
int HP, MaxHP;
std::vector<bool> BlockCol = {
false, // air
true, // wall
true, // stone
true, // pond
};
int AttackCount;
void Update();
void DrawRing(int Scroll);
void DrawHP(int Scroll);
bool GetAttack(int ResetAttackCount = 0);
bool GetDeath();
int GetHP();
void Heal(int AddHP);
void Damage(int Damage, pos Motion, bool Poison = false);
enum shape {
SQUARE, CIRCLE
};
bool CheckHit(sprite Sprite, enum shape Shape = SQUARE);
monster();
monster(pos Pos, int HP, int StartAttackCount, map *Map, player *Player, std::map<std::string, int> Graph, pos Size = pos(32, 32));
};