From 0c751dc7f6c0356cfc2aa5daeb663cb2dad20aae Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Fri, 6 Mar 2015 07:20:57 -0500 Subject: [PATCH] Xeno attack borg fix --- .../modules/mob/living/silicon/robot/robot.dm | 65 +++++++++++++++---- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 79c5fc8b469..3f70e98c3ac 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -904,24 +904,63 @@ var/list/robot_verbs_default = list( usr << "You unlock your cover." /mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - if (M.a_intent =="disarm") - if(!(lying)) + if (!ticker) + M << "You cannot attack people before the game has started." + return + + if (istype(loc, /turf) && istype(loc.loc, /area/start)) + M << "No attacking people at spawn, you jackass." + return + + switch(M.a_intent) + + if ("help") + for(var/mob/O in viewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message(text("[M] caresses [src]'s plating with its scythe like arm."), 1) + + if ("grab") + if (M == src || anchored) + return + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src ) + + M.put_in_active_hand(G) + + G.synch() + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + visible_message("[M] has grabbed [src] passively!") + + if ("harm") M.do_attack_animation(src) - if (prob(85)) - Stun(7) - step(src,get_dir(M,src)) - spawn(5) - step(src,get_dir(M,src)) - add_logs(M, src, "pushed", admin=0) - playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1) - visible_message("[M] has forced back [src]!", \ - "[M] has forced back [src]!") + var/damage = rand(10, 20) + if (prob(90)) + playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) + visible_message("[M] has slashed at [src]!",\ + "[M] has slashed at [src]!") + if(prob(8)) + flick("noise", flash) + adjustBruteLoss(damage) + updatehealth() else playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) visible_message("[M] took a swipe at [src]!", \ "[M] took a swipe at [src]!") - else - ..() + + if ("disarm") + if(!(lying)) + M.do_attack_animation(src) + if (prob(85)) + Stun(7) + step(src,get_dir(M,src)) + spawn(5) + step(src,get_dir(M,src)) + playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1) + visible_message("[M] has forced back [src]!",\ + "[M] has forced back [src]!") + else + playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) + visible_message("[M] attempted to force back [src]!",\ + "[M] attempted to force back [src]!") return