diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index ef8c74b1ef2..c4f381f88b3 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -123,8 +123,11 @@ if(user.a_intent == I_HURT) if (!..()) //item/attack() does it's own messaging and logs return 0 // item/attack() will return 1 if they hit, 0 if they missed. - agony *= 0.5 //whacking someone causes a much poorer contact than prodding them. stun *= 0.5 + if(status) //Checks to see if the stunbaton is on. + agony *= 0.5 //whacking someone causes a much poorer contact than prodding them. + else + agony = 0 //we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to. else //copied from human_defense.dm - human defence code should really be refactored some time. @@ -155,15 +158,13 @@ L.visible_message("[L] has been prodded with [src] by [user]!") //stun effects - if (status) - L.stun_effect_act(stun, agony, target_zone, src) - else - ..() + L.stun_effect_act(stun, agony, target_zone, src) playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src] (JMP)") - - deductcharge(hitcost) + + if(status) + deductcharge(hitcost) if(ishuman(L)) var/mob/living/carbon/human/H = L diff --git a/html/changelogs/alberky-PR-1024.yml b/html/changelogs/alberky-PR-1024.yml new file mode 100644 index 00000000000..158b3a3fddf --- /dev/null +++ b/html/changelogs/alberky-PR-1024.yml @@ -0,0 +1,6 @@ +author: Alberyk + +delete-after: True + +changes: + - bugfix: "Stun-batons should not deal twice their damage when offline."