]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Monster.cpp
initialized monster animations and enabled -Wall compiler flag
[l2e.git] / src / battle / Monster.cpp
index acbe6cf93bdacbd402eb4cff94ee6ce53396bb51..f0b9f3782f0587c1d289d671b669c73c970427b7 100644 (file)
@@ -16,18 +16,15 @@ Monster::Monster()
 , attackScript(0)
 , defenseScript(0)
 
+, meleeAnimation(0)
+, attackAnimation(0)
+, spellAnimation(0)
+
 , maxHealth(0)
 , health(0)
 , maxMana(0)
 , mana(0)
 
-, attack(0)
-, defense(0)
-, agility(0)
-, intelligence(0)
-, gut(0)
-, magicResistance(0)
-
 , expReward(0)
 , goldReward(0)
 
@@ -40,4 +37,13 @@ Monster::~Monster() {
 
 }
 
+
+void Monster::SubtractHealth(int amount) {
+       if (amount > Health()) {
+               health = 0;
+       } else {
+               health -= amount;
+       }
+}
+
 }