From 818643440da46684a2fc62a2daad030c5bb2d83b Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 16 Mar 2020 18:05:33 +0100 Subject: [PATCH] fix --- code/game/objects/items.dm | 4 ++-- code/modules/clothing/suits/miscellaneous.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 13 ++++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4370ccdd4a5..fe2296ec99b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -484,8 +484,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb /obj/item/proc/ui_action_click(mob/user, actiontype) attack_self(user) -/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit - return 0 +/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit + return FALSE /obj/item/proc/eyestab(mob/living/carbon/M, mob/living/carbon/user) diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index a13bf474e7e..f81f08650a4 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -674,7 +674,7 @@ H.remove_hud_from(user) /obj/item/clothing/head/hooded/ablative/IsReflect(def_zone) - if(!(def_zone in BODY_ZONE_HEAD)) //If not shot where ablative is covering you, you don't get the reflection bonus! + if(def_zone != BODY_ZONE_HEAD) //If not shot where ablative is covering you, you don't get the reflection bonus! return FALSE if (prob(hit_reflect_chance)) return TRUE diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 1f460e0a1ae..260759cc3d1 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -89,12 +89,15 @@ /mob/living/carbon/human/proc/check_reflect(def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on the reflection chance of the object if(wear_suit) - if(wear_suit.IsReflect(def_zone) == 1) - return 1 + if(wear_suit.IsReflect(def_zone)) + return TRUE + if(head) + if(head.IsReflect(def_zone)) + return TRUE for(var/obj/item/I in held_items) - if(I.IsReflect(def_zone) == 1) - return 1 - return 0 + if(I.IsReflect(def_zone)) + return TRUE + return FALSE /mob/living/carbon/human/proc/check_shields(atom/AM, damage, attack_text = "the attack", attack_type = MELEE_ATTACK, armour_penetration = 0) var/block_chance_modifier = round(damage / -3)