From cbc6853814b0d1c4cd58784ee8e5c619c6491323 Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Fri, 18 Aug 2023 22:13:36 -0600 Subject: Caporale has higher hit damage when on low health now --- src/entities/caporale.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/entities/caporale.c') diff --git a/src/entities/caporale.c b/src/entities/caporale.c index ff5e6b2..e4566dd 100644 --- a/src/entities/caporale.c +++ b/src/entities/caporale.c @@ -62,8 +62,13 @@ void updateGunsCaporale(Game * game, Entity * entity) { Vector3 direction = Vector3Subtract(player->position, entity->position); direction = Vector3Normalize(direction); + float damage = CAPORALE_BULLET_DAMAGE; + + if (entity->health <= CAPORALE_LOW_HEALTH_THRESHOLD) + damage = CAPORALE_LOW_HEALTH_BULLET_DAMAGE; + // Create bullet and shoot. - Bullet bullet = createBulletFromDirection(*entity, direction, CAPORALE_BULLET_DAMAGE); + Bullet bullet = createBulletFromDirection(*entity, direction, damage); shootBulletAtEntity(player, bullet); } -- cgit v1.2.3