From 13ca926c0fc42a0c615e58cfa139141dce7e09cd Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 14 Feb 2015 19:12:40 -0500 Subject: [PATCH] Fixes throwing miss chance using min instead of max Also adjusted slightly to make throwing a bit more distinct from projectile weapons. Throwing is worse with range but better up close. --- code/modules/mob/living/carbon/human/human_defense.dm | 6 +++--- code/modules/mob/living/living_defense.dm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index ac86766bde..399eabcf04 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -315,11 +315,11 @@ emp_act zone = ran_zone("chest",75) //Hits a random part of the body, geared towards the chest //check if we hit + var/miss_chance = 15 if (O.throw_source) var/distance = get_dist(O.throw_source, loc) - zone = get_zone_with_miss_chance(zone, src, min(15*(distance-2), 0)) - else - zone = get_zone_with_miss_chance(zone, src, 15) + miss_chance = max(15*(distance-2), 0) + zone = get_zone_with_miss_chance(zone, src, miss_chance) if(!zone) visible_message("\blue \The [O] misses [src] narrowly!") diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index faafc23b2d..eb0c9ce859 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -109,7 +109,7 @@ var/miss_chance = 15 if (O.throw_source) var/distance = get_dist(O.throw_source, loc) - miss_chance = min(15*(distance-2), 0) + miss_chance = max(15*(distance-2), 0) if (prob(miss_chance)) visible_message("\blue \The [O] misses [src] narrowly!")