From d3625412208cfc7407b2d59286e2e8a4319f0253 Mon Sep 17 00:00:00 2001 From: Mechoid Date: Wed, 18 Apr 2018 17:57:33 -0700 Subject: [PATCH] Fixes mob wall-bashing. --- code/game/turfs/simulated/wall_attacks.dm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 8bc362a1d7..1eaca16e76 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -57,12 +57,19 @@ source.thermal_conductivity = initial(source.thermal_conductivity) /turf/simulated/wall/proc/fail_smash(var/mob/user) - to_chat(user, "You smash against the wall!") + var/damage_lower = 25 + var/damage_upper = 75 if(isanimal(user)) var/mob/living/simple_animal/S = user playsound(src, S.attack_sound, 75, 1) + if(!(S.melee_damage_upper >= 10)) + to_chat(user, "You bounce against the wall.") + return FALSE + damage_lower = S.melee_damage_lower + damage_upper = S.melee_damage_upper + to_chat(user, "You smash against the wall!") user.do_attack_animation(src) - take_damage(rand(25,75)) + take_damage(rand(damage_lower,damage_upper)) /turf/simulated/wall/proc/success_smash(var/mob/user) to_chat(user, "You smash through the wall!")