-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCombat.h
More file actions
48 lines (44 loc) · 674 Bytes
/
Combat.h
File metadata and controls
48 lines (44 loc) · 674 Bytes
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
#include "Player.h"
#include "Enemy.h"
#include "Map.h"
#pragma once
// Contains Spell class
class spell
{
private:
char name[25];
int spellid;
int dmgmod;
int dmgbase;
int AEdamage;
int castingcost;
public:
spell(char *name_, int spellid, int dmgmod_, int dmgbase_, int AEdamage_, int castingcost_)
{
strcpy(name, name_);
dmgbase = dmgbase_;
dmgmod = dmgmod_;
AEdamage = AEdamage_;
castingcost = castingcost_;
}
char *getname()
{
return name;
}
int getspellid()
{
return spellid;
}
int getdamage()
{
return (rand() % dmgbase) + dmgmod;
}
int getAEdamage()
{
return AEdamage;
}
int getcastingcost()
{
return castingcost;
}
};