mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Dead bodies are no longer perfect shields.
This commit is contained in:
@@ -235,9 +235,18 @@
|
|||||||
//if they have a neck grab on someone, that person gets hit instead
|
//if they have a neck grab on someone, that person gets hit instead
|
||||||
var/obj/item/weapon/grab/G = locate() in M
|
var/obj/item/weapon/grab/G = locate() in M
|
||||||
if(G && G.state >= GRAB_NECK)
|
if(G && G.state >= GRAB_NECK)
|
||||||
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
|
if(G.affecting.stat == DEAD)
|
||||||
if(Bump(G.affecting, forced=1))
|
var/shield_chance = min(80, (30 * (M.mob_size / 10))) //Small mobs have a harder time keeping a dead body as a shield than a human-sized one. Unathi would have an easier job, if they are made to be SIZE_LARGE in the future. -Mech
|
||||||
return //If Bump() returns 0 (keep going) then we continue on to attack M.
|
if(prob(shield_chance))
|
||||||
|
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
|
||||||
|
if(Bump(G.affecting, forced=1))
|
||||||
|
return
|
||||||
|
else
|
||||||
|
visible_message("<span class='danger'>\The [M] tries to use [G.affecting] as a shield, but fails!</span>")
|
||||||
|
else
|
||||||
|
visible_message("<span class='danger'>\The [M] uses [G.affecting] as a shield!</span>")
|
||||||
|
if(Bump(G.affecting, forced=1))
|
||||||
|
return //If Bump() returns 0 (keep going) then we continue on to attack M.
|
||||||
|
|
||||||
passthrough = !attack_mob(M, distance)
|
passthrough = !attack_mob(M, distance)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user