From 2a10bbf4bc4236d4224b2a0502611525ecf7ef45 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Tue, 12 Jul 2016 16:00:35 -0400 Subject: [PATCH] Fixes Borg Stun Attack and Simple Animal Armor Penetration (#19269) --- code/game/objects/items/robot/robot_items.dm | 14 +++++++++++++- .../mob/living/carbon/human/human_defense.dm | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index f31ba4f6052..d898405a1d8 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -8,16 +8,28 @@ /obj/item/borg/stun name = "electrically-charged arm" icon_state = "elecarm" + var/charge_cost = 30 /obj/item/borg/stun/attack(mob/living/M, mob/living/silicon/robot/user) - if(!user.cell.use(30)) return + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK)) + playsound(M, 'sound/weapons/Genhit.ogg', 50, 1) + return 0 + if(!user.cell.use(charge_cost)) + return + + user.do_attack_animation(M) M.Weaken(5) M.apply_effect(STUTTER, 5) M.Stun(5) M.visible_message("[user] has prodded [M] with [src]!", \ "[user] has prodded you with [src]!") + + playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) + add_logs(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])") /obj/item/borg/cyborghug diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index db04272b2f0..1727fe4f0de 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -273,8 +273,8 @@ return 0 var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone)) - var/armor = run_armor_check(affecting, "melee") - apply_damage(damage, M.melee_damage_type, affecting, armor, "", "", M.armour_penetration) + var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration) + apply_damage(damage, M.melee_damage_type, affecting, armor) updatehealth()