/obj/item/weapon/grab/proc/inspect_organ(mob/living/carbon/human/H, mob/user, var/target_zone)
var/obj/item/organ/external/E = H.get_organ(target_zone)
if(!E || (E.status & ORGAN_DESTROYED))
user << "[H] is missing that bodypart."
return
user.visible_message("[user] starts inspecting [affecting]'s [E.name] carefully.")
if(!do_mob(user,H, 10))
user << "You must stand still to inspect [E] for wounds."
else if(E.wounds.len)
user << "You find [E.get_wounds_desc()]"
else
user << "You find no visible wounds."
user << "Checking bones now..."
if(!do_mob(user, H, 20))
user << "You must stand still to feel [E] for fractures."
else if(E.status & ORGAN_BROKEN)
user << "The [E.encased ? E.encased : "bone in the [E.name]"] moves slightly when you poke it!"
H.custom_pain("Your [E.name] hurts where it's poked.")
else
user << "The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine."
user << "Checking skin now..."
if(!do_mob(user, H, 10))
user << "You must stand still to check [H]'s skin for abnormalities."
else
var/bad = 0
if(H.getToxLoss() >= 40)
user << "[H] has an unhealthy skin discoloration."
bad = 1
if(H.getOxyLoss() >= 20)
user << "[H]'s skin is unusaly pale."
bad = 1
if(E.status & ORGAN_DEAD)
user << "[E] is decaying!"
bad = 1
if(!bad)
user << "[H]'s skin is normal."
/obj/item/weapon/grab/proc/jointlock(mob/living/carbon/human/target, mob/attacker, var/target_zone)
if(state < GRAB_AGGRESSIVE)
attacker << "You require a better grab to do this."
return
var/obj/item/organ/external/organ = target.get_organ(check_zone(target_zone))
if(!organ || organ.dislocated == -1)
return
attacker.visible_message("[attacker] [pick("bent", "twisted")] [target]'s [organ.name] into a jointlock!")
var/armor = target.run_armor_check(target, "melee")
if(armor < 60)
target << "You feel extreme pain!"
affecting.adjustHalLoss(Clamp(0, 60-affecting.halloss, 30)) //up to 60 halloss
/obj/item/weapon/grab/proc/attack_eye(mob/living/carbon/human/target, mob/living/carbon/human/attacker)
if(!istype(attacker))
return
var/datum/unarmed_attack/attack = attacker.get_unarmed_attack(target, "eyes")
if(!attack)
return
if(state < GRAB_NECK)
attacker << "You require a better grab to do this."
return
for(var/obj/item/protection in list(target.head, target.wear_mask, target.glasses))
if(protection && (protection.body_parts_covered & EYES))
attacker << "You're going to need to remove the eye covering first."
return
if(!target.has_eyes())
attacker << "You cannot locate any eyes on [target]!"
return
attacker.attack_log += text("\[[time_stamp()]\] Attacked [target.name]'s eyes using grab ([target.ckey])")
target.attack_log += text("\[[time_stamp()]\] Had eyes attacked by [attacker.name]'s grab ([attacker.ckey])")
msg_admin_attack("[key_name(attacker)] attacked [key_name(target)]'s eyes using a grab action.")
attack.handle_eye_attack(attacker, target)
/obj/item/weapon/grab/proc/headbut(mob/living/carbon/human/target, mob/living/carbon/human/attacker)
if(!istype(attacker))
return
if(target.lying)
return
attacker.visible_message("[attacker] thrusts \his head into [target]'s skull!")
var/damage = 20
var/obj/item/clothing/hat = attacker.head
if(istype(hat))
damage += hat.force * 3
var/armor = target.run_armor_check("head", "melee")
target.apply_damage(damage, BRUTE, "head", armor)
attacker.apply_damage(10, BRUTE, "head", attacker.run_armor_check("head", "melee"))
if(!armor && target.headcheck("head") && prob(damage))
target.apply_effect(20, PARALYZE)
target.visible_message("[target] [target.species.knockout_message]")
playsound(attacker.loc, "swing_hit", 25, 1, -1)
attacker.attack_log += text("\[[time_stamp()]\] Headbutted [target.name] ([target.ckey])")
target.attack_log += text("\[[time_stamp()]\] Headbutted by [attacker.name] ([attacker.ckey])")
msg_admin_attack("[key_name(attacker)] has headbutted [key_name(target)]")
attacker.drop_from_inventory(src)
src.loc = null
qdel(src)
return
/obj/item/weapon/grab/proc/dislocate(mob/living/carbon/human/target, mob/living/attacker, var/target_zone)
if(state < GRAB_NECK)
attacker << "You require a better grab to do this."
return
if(target.grab_joint(attacker, target_zone))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
/obj/item/weapon/grab/proc/pin_down(mob/target, mob/attacker)
if(state < GRAB_AGGRESSIVE)
attacker << "You require a better grab to do this."
return
if(force_down)
attacker << "You are already pinning [target] to the ground."
attacker.visible_message("[attacker] starts forcing [target] to the ground!")
if(do_after(attacker, 20) && target)
last_action = world.time
attacker.visible_message("[attacker] forces [target] to the ground!")
apply_pinning(target, attacker)
/obj/item/weapon/grab/proc/apply_pinning(mob/target, mob/attacker)
force_down = 1
target.Weaken(3)
target.lying = 1
step_to(attacker, target)
attacker.set_dir(EAST) //face the victim
target.set_dir(SOUTH) //face up
/obj/item/weapon/grab/proc/devour(mob/target, mob/user)
var/can_eat
if((FAT in user.mutations) && issmall(target))
can_eat = 1
else
var/mob/living/carbon/human/H = user
if(istype(H) && H.species.gluttonous)
if(H.species.gluttonous == 2)
can_eat = 2
else if((H.mob_size > target.mob_size) && !ishuman(target) && iscarbon(target))
can_eat = 1
if(can_eat)
var/mob/living/carbon/attacker = user
user.visible_message("[user] is attempting to devour [target]!")
if(can_eat == 2)
if(!do_mob(user, target)||!do_after(user, 30)) return
else
if(!do_mob(user, target)||!do_after(user, 100)) return
user.visible_message("[user] devours [target]!")
target.loc = user
attacker.stomach_contents.Add(target)
qdel(src)