]> git.localhorst.tv Git - l2e.git/blob - src/battle/Capsule.cpp
709ef3bf0af340cbf36adfb10f4eb5cfa7269c47
[l2e.git] / src / battle / Capsule.cpp
1 #include "Capsule.h"
2
3 namespace battle {
4
5 Capsule::Capsule()
6 : name(0)
7
8 , maxHealth(0)
9 , health(0)
10 , maxMana(0)
11 , mana(0)
12
13 , level(0)
14
15 , battleSprite(0)
16 , meleeAnimation(0)
17 , attackAnimation(0)
18 , spellAnimation(0) {
19
20 }
21
22
23 void Capsule::SubtractHealth(int amount) {
24         if (amount > health) {
25                 health = 0;
26         } else {
27                 health -= amount;
28         }
29 }
30
31 }