forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathattack.cpp
More file actions
36 lines (26 loc) · 679 Bytes
/
attack.cpp
File metadata and controls
36 lines (26 loc) · 679 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
#include "stdafx.h"
#include "attack.h"
using namespace std;
Attack::Attack(const Creature* a, AttackLevel l, AttackType t, int h, int s, bool b, Optional<EffectType> _effect)
: attacker(a), level(l), type(t), toHit(h), strength(s), back(b), effect(_effect) {}
const Creature* Attack::getAttacker() const {
return attacker;
}
int Attack::getStrength() const {
return strength;
}
int Attack::getToHit() const {
return toHit;
}
AttackType Attack::getType() const {
return type;
}
AttackLevel Attack::getLevel() const {
return level;
}
bool Attack::inTheBack() const {
return back;
}
Optional<EffectType> Attack::getEffect() const {
return effect;
}