-
Notifications
You must be signed in to change notification settings - Fork 1
/
MonsterManager.h
90 lines (69 loc) · 2.3 KB
/
MonsterManager.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// --------------------------------------------------------------------------------------------------------------------------------
// DEMISERL
// Copyright 2014 Corremn
//
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
// $HeadURL: $
// --------------------------------------------------------------------------------------------------------------------------------
#if !defined(AFX_MONSTERMANAGER_H__31959C7C_29D8_4DF2_9B54_BA49F3533281__INCLUDED_)
#define AFX_MONSTERMANAGER_H__31959C7C_29D8_4DF2_9B54_BA49F3533281__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MonsterData.h"
#include "MonsterItems.h"
#include "DungeonLevel.h"
#include "ActionManager.h"
//non standard monsters
#include "UndeadMonster.h"
#include "SpecialGuardians.h"
#include "RandomMonster.h"
// IMPORTANT - do not use a container that reorganises its internal memory, because I lazily keep pointers to the internal structures.
// list & deque is ok vector bad m'kay
#include <deque>
enum eMonsterMajorType
{
mNormal, //will not exist
mUndead,
mOrc,
mSpecial,
mWizard,
mPlayer,
mBridgeMaster,
mGuards,
mRandom,
mCrocodile,
mDigger,
};
/*struct equipmmentSlots
{
Item * armour;
Item * weapon;
};*/
typedef std::list<MonsterData> MONSTERLIST;
class MonsterManager
{
public:
MonsterManager();
int Initialise();
MonsterData* CreateMonster(int major_type, int minor_type, int level, int x, int y);
int DestroyMonster(int ref);
int DestroyMonster(MONSTERLIST::iterator it);
MonsterData * FindMonsterData(Monster * monster);
MonsterData* Player();
int UpdateMonsters(DungeonLevel* dungeonLevel, ActionManager* actionManager);
int GetNumMonsters();
MONSTERLIST & getMonsterList();
MonsterItems & getMonsterItems();
void PrintMonsters();
int CalculateBrandDamageOnMonster(MonsterData *defender, eBrandType brandType, int damage);
void RunEffects(MonsterData * monster);
const std::string getDescription(const Monster & monster) const;
private:
MonsterItems mMonsterItems;
MONSTERLIST monster_list;
int m_monsterNum;
};
#endif // !defined(AFX_MONSTERMANAGER_H__31959C7C_29D8_4DF2_9B54_BA49F3533281__INCLUDED_)