From ad2cf64c7bb4854818088ff722d9529481b2bbb9 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Mon, 1 Sep 2014 22:41:15 +0930 Subject: [PATCH] Fixes #6119 --- code/modules/mob/living/living_defense.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 6f308e6add4..3e895c73c2c 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -61,7 +61,7 @@ src <<"\red You have been hit by [P]!" del P return - + //Armor var/absorb = run_armor_check(def_zone, P.flag) var/proj_sharp = is_sharp(P) @@ -78,13 +78,13 @@ //Handles the effects of "stun" weapons /mob/living/proc/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null) flash_pain() - + if (stun_amount) Stun(stun_amount) Weaken(stun_amount) apply_effect(STUTTER, stun_amount) apply_effect(EYE_BLUR, stun_amount) - + if (agony_amount) apply_damage(agony_amount, HALLOSS, def_zone, 0, used_weapon) apply_effect(STUTTER, agony_amount/10) @@ -108,16 +108,16 @@ var/obj/item/weapon/W = O dtype = W.damtype var/throw_damage = O.throwforce*(speed/5) - + var/miss_chance = 15 if (O.throw_source) var/distance = get_dist(O.throw_source, loc) miss_chance = min(15*(distance-2), 0) - + if (prob(miss_chance)) visible_message("\blue \The [O] misses [src] narrowly!") return - + src.visible_message("\red [src] has been hit by [O].") var/armor = run_armor_check(null, "melee") @@ -125,7 +125,7 @@ apply_damage(throw_damage, dtype, null, armor, is_sharp(O), has_edge(O), O) O.throwing = 0 //it hit, so stop moving - + if(ismob(O.thrower)) var/mob/M = O.thrower var/client/assailant = M.client @@ -145,7 +145,7 @@ src.throw_at(get_edge_target_turf(src,dir),1,momentum) if(!W || !src) return - + if(W.sharp) //Projectile is suitable for pinning. //Handles embedding for non-humans and simple_animals. O.loc = src @@ -158,6 +158,7 @@ visible_message("[src] is pinned to the wall by [O]!","You are pinned to the wall by [O]!") src.anchored = 1 src.pinned += O + src.verbs += /mob/proc/yank_out_object //This is called when the mob is thrown into a dense turf /mob/living/proc/turf_collision(var/turf/T, var/speed)