-
Notifications
You must be signed in to change notification settings - Fork 6
/
c_monster.h
executable file
·81 lines (58 loc) · 1.54 KB
/
c_monster.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
#ifndef C_MONSTER_H
#define C_MONSTER_H
#include <cmath>
#include <QObject>
#include <QString>
#include <QList>
#include "pq7_config.h"
#include <iostream>
#include <fstream>
#include "json/json.h"
class c_Monster : public QObject
{
Q_OBJECT
public:
explicit c_Monster(QObject *parent = 0);
QString Discription();
QString Level();
QStringList Drops();
bool makeByLevel(int level);
bool makeLevelRange(int lowest_level, int highest_level);
bool makeMounted(int level);
bool makeMountedRange(int lowest_level, int highest_level);
bool makeGroup(int level);
qulonglong winXP();
void makeSpecial(int level);
void addHealth();
void addAge();
void addCast();
void addSize();
bool isMounted;
bool isGroup;
bool isSpecial;
void clear();
Json::Value save();
void load(Json::Value monsterRoot);
signals:
public slots:
private:
// base information
QString monster_race;
int monster_level;
// modifer adjustments
QStringList mods;
QList<int> mod_values;
QStringList drops;
QString discription;
QString level;
qulonglong awardXP;
bool dropsFormatted;
void makeRandMonster();
QStringList pickSpcByLevel(int level);
// save / load helpers
Json::Value modListToArray(QStringList &mList, QList<int> &vList);
Json::Value dropListToArray(QStringList &list);
void arrayToModList(Json::Value array, QStringList &mList, QList<int> &vList);
QStringList arrayToDropList(Json::Value array);
};
#endif // C_MONSTER_H