mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Fixes Borg Stun Arm Bypassing Shields
This commit is contained in:
@@ -7,28 +7,26 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "elecarm"
|
||||
var/charge_cost = 30
|
||||
|
||||
/obj/item/borg/stun/attack(mob/M, mob/living/silicon/robot/user)
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R && R.cell && R.cell.charge > 0)
|
||||
R.cell.use(charge_cost)
|
||||
else
|
||||
|
||||
/obj/item/borg/stun/attack(mob/living/M, mob/living/silicon/robot/user)
|
||||
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)
|
||||
if(M.stuttering < 5)
|
||||
M.stuttering = 5
|
||||
M.apply_effect(STUTTER, 5)
|
||||
M.Stun(5)
|
||||
|
||||
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has prodded you with [src].</span>")
|
||||
"<span class='userdanger'>[user] has prodded you with [src]!</span>")
|
||||
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
add_logs(M, user, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user