From 4c30e98f4a4018a25d3a9f3ee790d589be803cb0 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 13 Nov 2020 14:43:17 +0100 Subject: Added main for cpp04/ex01 and cpp04/ex02, Fixed cpp04/03 MateriaSource --- cpp04/ex01/SuperMutant.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp04/ex01/SuperMutant.cpp') 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 +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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); } -- cgit