-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdarc_f.hpp
72 lines (52 loc) · 1.57 KB
/
darc_f.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
69
70
71
# include <string>
# include <vector>
using namespace std;
class Roll {
int attack_roll(int attack, int defense);
};
// attack = bonus to add to attack rolls (d20). If it hits higher than target (defense), damage roll. if it hits crit, damage roll rwice.
//Players attack and def are based on class
// Warrior class (tank type) - Attack 4, Def 13
// Sorc Class (support spells and aoe) - Attack 2, Def 6
// rogue class (can hit any target, poison, support) - Attack 6, def 8
class ClassType {
private:
int health;
int defense;
int attack;
string class_type;
public:
ClassType(int max_health, int start_defense, int start_attack, string start_class_type);
~ClassType();
};
class Gnoll {
private:
int health;
int defense;
int attack;
bool interact = false;
string name;
public:
Gnoll(int max_health, int start_defense, int start_attack, string new_name);
~Gnoll();
};
//Race type will be human, Elf, Dwarf. Each race has a bonus or minus to stats plus a special.
class RaceType {
protected:
string name;
int attack;
int def;
string race_special;
public:
RaceType(string new_name, int attack_change, int def_change, string new_race_special);
~RaceType();
};
//player class will track name, xp, and level. and will use the objects built from ClassType and RaceType
class Player: public RaceType {
string char_name;
int level;
int xp;
public:
Player(string new_name, int attack_change, int def_change, string new_race_special, string new_char_name, int up_xp, int new_level);
~Player();
};