]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Monster.cpp
apply damage indicated by attack selection
[l2e.git] / src / battle / Monster.cpp
index acbe6cf93bdacbd402eb4cff94ee6ce53396bb51..033614231ff0cea9ffec691b5c0dfcf307822901 100644 (file)
@@ -40,4 +40,13 @@ Monster::~Monster() {
 
 }
 
+
+void Monster::SubtractHealth(int amount) {
+       if (amount > Health()) {
+               health = 0;
+       } else {
+               health -= amount;
+       }
+}
+
 }