From 34f16a131ece61302857b6eb8b6701b17462b31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=5B=CC=B8R=CC=B5e=CC=B5d=CC=B4a=CC=B4c=CC=B6t=CC=B8e=CC=B8?= =?UTF-8?q?d=CC=B4=5D=CC=B5?= <61567407+LanceSmites328@users.noreply.github.com> Date: Thu, 5 Oct 2023 00:46:29 -0400 Subject: [PATCH] Shield Update Fix (#1501) * Update shield.dm * Update shield.dm --- .../objects/items/ego_weapons/subtype/shield.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/ego_weapons/subtype/shield.dm b/code/game/objects/items/ego_weapons/subtype/shield.dm index 48b1092956f2..508d1a00ac8c 100644 --- a/code/game/objects/items/ego_weapons/subtype/shield.dm +++ b/code/game/objects/items/ego_weapons/subtype/shield.dm @@ -90,10 +90,10 @@ block = TRUE block_success = FALSE shield_user.physiology.armor = shield_user.physiology.armor.modifyRating(bomb = 1) //bomb defense must be over 0 - shield_user.physiology.red_mod *= (1 - ((reductions[1]) / 100)) - shield_user.physiology.white_mod *= (1 - ((reductions[2]) / 100)) - shield_user.physiology.black_mod *= (1 - ((reductions[3]) / 100)) - shield_user.physiology.pale_mod *= (1 - ((reductions[4]) / 100)) + shield_user.physiology.red_mod *= max(0.001, (1 - ((reductions[1]) / 100))) + shield_user.physiology.white_mod *= max(0.001, (1 - ((reductions[2]) / 100))) + shield_user.physiology.black_mod *= max(0.001, (1 - ((reductions[3]) / 100))) + shield_user.physiology.pale_mod *= max(0.001, (1 - ((reductions[4]) / 100))) RegisterSignal(user, COMSIG_MOB_APPLY_DAMGE, .proc/AnnounceBlock) if(cleaning) DisableBlock(shield_user) @@ -105,10 +105,10 @@ //Ends the block, causes you to take more damage for as long as debuff_duration if you did not block any damage /obj/item/ego_weapon/shield/proc/DisableBlock(mob/living/carbon/human/user) user.physiology.armor = user.physiology.armor.modifyRating(bomb = -1) - user.physiology.red_mod /= (1 - ((reductions[1]) / 100)) - user.physiology.white_mod /= (1 - ((reductions[2]) / 100)) - user.physiology.black_mod /= (1 - ((reductions[3]) / 100)) - user.physiology.pale_mod /= (1 - ((reductions[4]) / 100)) + user.physiology.red_mod /= max(0.001, (1 - ((reductions[1]) / 100))) + user.physiology.white_mod /= max(0.001, (1 - ((reductions[2]) / 100))) + user.physiology.black_mod /= max(0.001, (1 - ((reductions[3]) / 100))) + user.physiology.pale_mod /= max(0.001, (1 - ((reductions[4]) / 100))) UnregisterSignal(user, COMSIG_MOB_APPLY_DAMGE) deltimer(parry_timer)