mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-21 11:06:25 +01:00
Fixes #6119
This commit is contained in:
@@ -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("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user