From a9fa439d8412b2c682d512bfe9cc9322caa4336e Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 7 Jan 2022 16:01:07 +0100 Subject: adjust boss hp and add back fury --- src/wp_shotty.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/wp_shotty.cpp') diff --git a/src/wp_shotty.cpp b/src/wp_shotty.cpp index 580450e..ae978f4 100644 --- a/src/wp_shotty.cpp +++ b/src/wp_shotty.cpp @@ -7,18 +7,20 @@ #include "entity.hpp" wp_shotty::wp_shotty(const char *s, const char *r) - : AWeapon(10, 10, 10, 1.0, s, r) + : AWeapon(10, 10, 10, 0.5, s, r) {} -int wp_shotty::bang(std::vector * enemies, Vector2 playerDirection, Vector2 playerPosition, int * victims) +int wp_shotty::bang(std::vector * enemies, Entity * player) { if (barrel == 0 || GetTime() < (t + cooldown)) { return (1); } else { + Vector2 playerDirection = player->direction; + Vector2 playerPosition = (Vector2){player->posX, player->posY}; barrel--; PlaySound(shot); t = GetTime(); @@ -48,7 +50,8 @@ int wp_shotty::bang(std::vector * enemies, Vector2 playerDirection, Vect en->direction.x = (playerDirection.x / 2); en->direction.y = (playerDirection.y / 2); } - *victims += 1; + player->victims += 1; + player->fury += 1; } } // shotty cone -- cgit v1.2.3