From c40cad165818b0d6524947e101fa339c787afb91 Mon Sep 17 00:00:00 2001 From: Putnam Date: Wed, 20 Nov 2019 19:01:59 -0800 Subject: [PATCH] Starting an explosion rework, fun fun --- .../mob/living/carbon/human/human_defense.dm | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 2ab7c6d404..37a76ea5b2 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -386,43 +386,34 @@ return var/b_loss = 0 var/f_loss = 0 - var/bomb_armor = getarmor(null, "bomb") + var/bomb_armor = max(0,(100-getarmor(null, "bomb"))/100) switch (severity) if (1) - if(prob(bomb_armor)) - b_loss = 500 + if(bomb_armor) + b_loss = 500*bomb_armor var/atom/throw_target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src))) throw_at(throw_target, 200, 4) - damage_clothes(400 - bomb_armor, BRUTE, "bomb") + damage_clothes(400*bomb_armor, BRUTE, "bomb") else - for(var/I in contents) - var/atom/A = I - A.ex_act(severity) + damage_clothes(400,BRUTE,"bomb") gib() return if (2) - b_loss = 60 - f_loss = 60 - if(bomb_armor) - b_loss = 30*(2 - round(bomb_armor*0.01, 0.05)) - f_loss = b_loss - damage_clothes(200 - bomb_armor, BRUTE, "bomb") + b_loss = 60*bomb_armor + f_loss = 60*bomb_armor + damage_clothes(200*bomb_armor, BRUTE, "bomb") if (!istype(ears, /obj/item/clothing/ears/earmuffs)) adjustEarDamage(30, 120) - if (prob(max(70 - (bomb_armor * 0.5), 0))) - Unconscious(200) + Unconscious(200*bomb_armor) if(3) - b_loss = 30 - if(bomb_armor) - b_loss = 15*(2 - round(bomb_armor*0.01, 0.05)) + b_loss = 30*bomb_armor damage_clothes(max(50 - bomb_armor, 0), BRUTE, "bomb") if (!istype(ears, /obj/item/clothing/ears/earmuffs)) adjustEarDamage(15,60) - if (prob(max(50 - (bomb_armor * 0.5), 0))) - Unconscious(160) + Unconscious(100*bomb_armor) take_overall_damage(b_loss,f_loss)