diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index d38d858f2bc..3f5dcb4db80 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -89,6 +89,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy. #define TRAIT_STUNIMMUNE "stun_immunity" #define TRAIT_STUNRESISTANCE "stun_resistance" +#define TRAIT_IWASBATONED "iwasbatoned" //Anti Dual-baton cooldown bypass exploit. #define TRAIT_SLEEPIMMUNE "sleep_immunity" #define TRAIT_PUSHIMMUNE "push_immunity" #define TRAIT_SHOCKIMMUNE "shock_immunity" diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 7c74edcc127..1d85142e284 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -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, "[L] manages to avoid the attack!") + 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.