Removes the Double Baton 'Tech' / Fixes targeting issues related to the stunbaton (#49774)

* double stun is a no!

* moved before it deducts charge

* fixes an issue with zone selection in batons
This commit is contained in:
moo
2020-03-08 20:34:26 +08:00
committed by GitHub
parent e4972b0dfa
commit 88e06cfc7d
2 changed files with 8 additions and 2 deletions
+7 -2
View File
@@ -210,6 +210,9 @@
/obj/item/melee/baton/proc/baton_effect(mob/living/L, mob/user)
if(shields_blocked(L, user))
return FALSE
if(HAS_TRAIT_FROM(L, TRAIT_IWASBATONED, user)) //no doublebaton abuse anon!
to_chat(user, "<span class='danger'>[L] manages to avoid the attack!</span>")
return FALSE
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
if(!R || !R.cell || !R.cell.use(cell_hit_cost))
@@ -217,13 +220,12 @@
else
if(!deductcharge(cell_hit_cost))
return FALSE
/// After a target is hit, we do a chunk of stamina damage, along with other effects.
/// After a period of time, we then check to see what stun duration we give.
L.Jitter(20)
L.confused = max(confusion_amt, L.confused)
L.stuttering = max(8, L.stuttering)
L.apply_damage(stamina_loss_amt, STAMINA)
L.apply_damage(stamina_loss_amt, STAMINA, BODY_ZONE_CHEST)
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
addtimer(CALLBACK(src, .proc/apply_stun_effect_end, L), apply_stun_delay)
@@ -243,6 +245,9 @@
attack_cooldown_check = world.time + attack_cooldown
ADD_TRAIT(L, TRAIT_IWASBATONED, user)
addtimer(TRAIT_CALLBACK_REMOVE(L, TRAIT_IWASBATONED, user), attack_cooldown)
return 1
/// After the initial stun period, we check to see if the target needs to have the stun applied.