Merge pull request #6354 from MagmaRam/eyestabs

Adds proper miss chance for stabbing people in the eyes.
This commit is contained in:
Atermonera
2019-07-30 16:18:51 -08:00
committed by VirgoBot
parent b79076a62e
commit a175e70865
2 changed files with 11 additions and 7 deletions
+9 -7
View File
@@ -492,13 +492,15 @@ var/list/global/slot_flags_enumeration = list(
user << "<span class='warning'>You cannot locate any eyes on [M]!</span>"
return
if(U.get_accuracy_penalty(U)) //Should only trigger if they're not aiming well
var/hit_zone = get_zone_with_miss_chance(U.zone_sel.selecting, M, U.get_accuracy_penalty(U))
if(!hit_zone)
U.do_attack_animation(M)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<font color='red'><B>[U] attempts to stab [M] in the eyes, but misses!</B></font>")
return
//this should absolutely trigger even if not aim-impaired in some way
var/hit_zone = get_zone_with_miss_chance(U.zone_sel.selecting, M, U.get_accuracy_penalty(U))
if(!hit_zone)
U.do_attack_animation(M)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
//visible_message("<span class='danger'>[U] attempts to stab [M] in the eyes, but misses!</span>")
for(var/mob/V in viewers(M))
V.show_message("<span class='danger'>[U] attempts to stab [M] in the eyes, but misses!</span>")
return
add_attack_logs(user,M,"Attack eyes with [name]")