diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 23e1374744a..92e50b3f80e 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -167,3 +167,13 @@ #define STATUS_EFFECT_FAKE_VIRUS /datum/status_effect/fake_virus /// This status effect lets the user see the lwap dots. #define STATUS_EFFECT_LWAPSCOPE /datum/status_effect/lwap_scope + +////////////////////////// +// Mind batter variants // +////////////////////////// +// Basically variants with differing effect times to their parent datums, nothing special + +#define STATUS_EFFECT_PACIFIED_BATTERER /datum/status_effect/pacifism/batterer + +#define STATUS_EFFECT_CLINGTENTACLE_BATTERER /datum/status_effect/cling_tentacle/batterer + diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 77b4bd78d95..1a88d3a07ad 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -223,6 +223,11 @@ /datum/status_effect/pacifism/on_remove() REMOVE_TRAIT(owner, TRAIT_PACIFISM, id) +/datum/status_effect/pacifism/batterer + id = "pacifism_debuff_batterer" + alert_type = null + duration = 10 SECONDS + // used to track if hitting someone with a cult dagger/sword should stamina crit. /datum/status_effect/cult_stun_mark id = "cult_stun" @@ -289,6 +294,10 @@ /datum/status_effect/cling_tentacle/on_remove() REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, "[id]") +/datum/status_effect/cling_tentacle/batterer + id = "cling_tentacle_batterer" + alert_type = null + duration = 7 SECONDS // start of `living` level status procs. /** diff --git a/code/datums/uplink_items/uplink_general.dm b/code/datums/uplink_items/uplink_general.dm index 982eee6abe4..8f84aea5056 100644 --- a/code/datums/uplink_items/uplink_general.dm +++ b/code/datums/uplink_items/uplink_general.dm @@ -215,6 +215,12 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/weaponcrafting/gunkit/universal_gun_kit cost = 8 +/datum/uplink_item/dangerous/batterer + name = "Mind Batterer" + desc = "A dangerous syndicate device focused on crowd control and escapes. Causes brain damage, confusion, and other nasty effects to those surrounding the user. Has 5 charges." + reference = "BTR" + item = /obj/item/batterer + cost = 5 // Ammunition diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 12207bc9b9e..422f686a43d 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -263,3 +263,102 @@ charges = 8 max_charges = 8 flawless = TRUE + +/obj/item/batterer + name = "mind batterer" + desc = "A dangerous syndicate device focused on crowd control and escapes. Causes brain damage, confusion, and other nasty effects to those surrounding the user." + icon = 'icons/obj/device.dmi' + icon_state = "batterer" + throwforce = 5 + w_class = WEIGHT_CLASS_TINY + throw_speed = 4 + throw_range = 10 + flags = CONDUCT + item_state = "electronic" + origin_tech = "magnets=3;combat=3;syndicate=3" + + /// How many times the mind batter has been used + var/times_used = 0 + var/max_uses = 5 + /// Is this item on cooldown from being thrown + var/on_throwing_cooldown = FALSE + +/obj/item/batterer/examine(mob/user) + . = ..() + . += "A little label on the side reads: \"Warning: Using this item in quick succession may cause fatigue to the user!\"" + if(times_used >= max_uses) + . += "[src] is out of charge." + if(times_used < max_uses) + . += "[src] has [max_uses-times_used] charges left." + +/obj/item/batterer/attack_self(mob/living/carbon/user) + activate_batterer(user) + +/obj/item/batterer/proc/activate_batterer(mob/user) + times_used++ + if(user) + if(times_used >= max_uses) + to_chat(user, "The mind batterer has been burnt out!") + return + if(!do_after_once(user, 2 SECONDS, target = src, allow_moving = TRUE, attempt_cancel_message = "You think it's best to save this for later.")) + times_used-- + return + to_chat(user, "You trigger [src]. It has [max_uses-times_used] charges left.") + + for(var/mob/living/M in oview(7, get_turf(src))) + if(issilicon(M)) + M.Weaken(10 SECONDS) + else + M.Confused(30 SECONDS) + M.adjustBrainLoss(10) + to_chat(M, "You feel a sudden, electric jolt travel through yourself,") + switch(rand(1, 10)) + if(1) + M.apply_status_effect(STATUS_EFFECT_CLINGTENTACLE_BATTERER) + to_chat(M, "and your legs lock up for a moment!") + if(2) + M.apply_status_effect(STATUS_EFFECT_PACIFIED_BATTERER) + to_chat(M, "and you feel an innate love for life for a fleeting moment!") + if(3) + new /obj/effect/hallucination/delusion(get_turf(M), M) + to_chat(M, "and the people around you morph in appearence!") + if(4) + if(prob(80)) + M.EyeBlurry(25 SECONDS) + to_chat(M, "and something in the back of your head stings like hell!") + else + M.EyeBlind(15 SECONDS) + to_chat(M, "and you can't see a goddamn thing!") + if(5) + M.adjustStaminaLoss(40) + to_chat(M, "and a wave of tiredness washes over you!") + else + to_chat(M, "but as soon as it arrives, it fades.") + add_attack_logs(user, M, "Mind battered with [src]") + + playsound(get_turf(src), 'sound/misc/interference.ogg', 50, TRUE) + if(times_used >= max_uses) + icon_state = "battererburnt" + +/obj/item/batterer/throw_impact(atom/hit_atom) + ..() + if(times_used >= max_uses || on_throwing_cooldown) + return + addtimer(CALLBACK(src, PROC_REF(end_throwing_delay)), 3 SECONDS) + visible_message("[src] suddenly triggers, sending a shower of sparks everywhere!") + do_sparks(4, FALSE, get_turf(src)) + activate_batterer() + on_throwing_cooldown = TRUE + +/obj/item/batterer/proc/end_throwing_delay() + on_throwing_cooldown = FALSE + +/obj/item/batterer/emp_act(severity) + if(times_used >= max_uses) + return + visible_message("[src] explodes into a light show of colors!") + if(severity == EMP_HEAVY) + activate_batterer() + + times_used = max_uses - 1 + activate_batterer()