adds slapping! (#24092)

* slap using disarm intent to the head against somebody with help intent
This commit is contained in:
anconfuzedrock
2017-02-17 20:58:51 -05:00
committed by Leo
parent b164e8fee6
commit 098caf7c9b
2 changed files with 12 additions and 1 deletions

View File

@@ -994,7 +994,18 @@
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) /datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(target.check_block()) var/aim_for_mouth = user.zone_selected == "mouth"
var/target_on_help_and_unarmed = target.a_intent == INTENT_HELP && !target.get_active_held_item()
var/target_aiming_for_mouth = target.zone_selected == "mouth"
var/target_restrained = target.restrained()
if(aim_for_mouth && ( target_on_help_and_unarmed || target_restrained || target_aiming_for_mouth))
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
user.visible_message("<span class='danger'>[user] slaps [target] in the face!</span>",
"<span class='notice'> You slap [target] in the face! </span>",\
"You hear a slap.")
target.endTailWag()
return FALSE
else if(target.check_block())
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>") target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
return 0 return 0
if(attacker_style && attacker_style.disarm_act(user,target)) if(attacker_style && attacker_style.disarm_act(user,target))

BIN
sound/weapons/slap.ogg Normal file

Binary file not shown.