aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex01/SuperMutant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp04/ex01/SuperMutant.cpp')
-rw-r--r--cpp04/ex01/SuperMutant.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp04/ex01/SuperMutant.cpp b/cpp04/ex01/SuperMutant.cpp
index c9ce83c..8813217 100644
--- a/cpp04/ex01/SuperMutant.cpp
+++ b/cpp04/ex01/SuperMutant.cpp
@@ -6,7 +6,7 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/14 13:30:47 by charles #+# #+# */
-/* Updated: 2020/11/12 13:54:19 by cacharle ### ########.fr */
+/* Updated: 2020/11/13 10:35:24 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -35,5 +35,7 @@ SuperMutant::~SuperMutant()
void SuperMutant::takeDamage(int amount)
{
+ if (amount < 0)
+ amount = 3;
Enemy::takeDamage(amount - 3);
}