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