Files
2014-03-29 16:33:31 -04:00

62 lines
1.9 KiB
Plaintext

/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(check_shields(0, M.name))
visible_message("\red <B>[M] attempted to touch [src]!</B>")
return 0
switch(M.a_intent)
if ("help")
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
if ("grab")
if(M == src || anchored)
return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message(text("\red [] has grabbed [] passively!", M, src))
if("hurt")
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
if(!damage)
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
visible_message("\red <B>[M] has lunged at [src]!</B>")
return 0
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
visible_message("\red <B>[M] has slashed at [src]!</B>")
apply_damage(damage, BRUTE, affecting, armor_block)
if (damage >= 25)
visible_message("\red <B>[M] has wounded [src]!</B>")
apply_effect(rand(3, 4), WEAKEN, armor_block)
updatehealth()
if("disarm")
if (prob(80))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
Weaken(5)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
else
if (prob(80))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
drop_item()
visible_message(text("\red <B>[] disarmed []!</B>", M, src))
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
visible_message(text("\red <B>[] has tried to disarm []!</B>", M, src))
return