readds the mind batterer, fully reworked (#21193)

* readds the mind batterer, fully reworked

* Update code/datums/uplink_items/uplink_general.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/items/devices/traitordevices.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/items/devices/traitordevices.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/items/devices/traitordevices.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* moer changes

* Update code/game/objects/items/devices/traitordevices.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/game/objects/items/devices/traitordevices.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/items/devices/traitordevices.dm

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

* sean review

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
GDN
2023-07-17 08:57:25 -05:00
committed by GitHub
parent 0074140d71
commit 4c1144db1d
4 changed files with 124 additions and 0 deletions
@@ -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)
. = ..()
. += "<span class='warning'>A little label on the side reads: \"Warning: Using this item in quick succession may cause fatigue to the user!\"</span>"
if(times_used >= max_uses)
. += "<span class='notice'>[src] is out of charge.</span>"
if(times_used < max_uses)
. += "<span class='notice'>[src] has [max_uses-times_used] charges left.</span>"
/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, "<span class='danger'>The mind batterer has been burnt out!</span>")
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, "<span class='notice'>You trigger [src]. It has [max_uses-times_used] charges left.</span>")
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, "<span class='danger'>You feel a sudden, electric jolt travel through yourself,</span>")
switch(rand(1, 10))
if(1)
M.apply_status_effect(STATUS_EFFECT_CLINGTENTACLE_BATTERER)
to_chat(M, "<span class='warning'>and your legs lock up for a moment!</span>")
if(2)
M.apply_status_effect(STATUS_EFFECT_PACIFIED_BATTERER)
to_chat(M, "<span class='warning'>and you feel an innate love for life for a fleeting moment!</span>")
if(3)
new /obj/effect/hallucination/delusion(get_turf(M), M)
to_chat(M, "<span class='warning'>and the people around you morph in appearence!</span>")
if(4)
if(prob(80))
M.EyeBlurry(25 SECONDS)
to_chat(M, "<span class='warning'>and something in the back of your head stings like hell!</span>")
else
M.EyeBlind(15 SECONDS)
to_chat(M, "<span class='warning'>and you can't see a goddamn thing!</span>")
if(5)
M.adjustStaminaLoss(40)
to_chat(M, "<span class='warning'>and a wave of tiredness washes over you!</span>")
else
to_chat(M, "<span class='danger'>but as soon as it arrives, it fades.</span>")
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("<span class='notice'>[src] suddenly triggers, sending a shower of sparks everywhere!</span>")
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("<span class='notice'>[src] explodes into a light show of colors!</span>")
if(severity == EMP_HEAVY)
activate_batterer()
times_used = max_uses - 1
activate_batterer()