Files
Aurora.3/code/game/objects/items/devices/traitordevices.dm
T
LordFowlandErki 8d436c4a03 Converts all necessary << outputs into the to_chat() macro. (#6076)
This PR will lead us towards the Promised Day, for in its wake there shall be much celebration and ecstasy as this world becomes a world suitable for developer hegemony. The first strike is thusly;

All << is converted into to_chat().
2019-03-10 23:39:03 +02:00

57 lines
1.4 KiB
Plaintext

/*
Miscellaneous traitor devices
BATTERER
*/
/*
The Batterer, like a flashbang but 50% chance to knock people over. Can be either very
effective or pretty fucking useless.
*/
/obj/item/device/batterer
name = "mind batterer"
desc = "A strange device with twin antennas."
icon_state = "batterer"
throwforce = 5
w_class = 1.0
throw_speed = 4
throw_range = 10
flags = CONDUCT
item_state = "electronic"
origin_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 3, TECH_ILLEGAL = 3)
var/times_used = 0 //Number of times it's been used.
var/max_uses = 2
/obj/item/device/batterer/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
if(!user) return
if(times_used >= max_uses)
to_chat(user, "<span class='warning'>The mind batterer has been burnt out!</span>")
return
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [src] to knock down people in the area.</font>")
for(var/mob/living/carbon/human/M in orange(10, user))
spawn()
if(prob(50))
M.Weaken(rand(10,20))
if(prob(25))
M.Stun(rand(5,10))
to_chat(M, "<span class='danger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
else
to_chat(M, "<span class='danger'>You feel a sudden, electric jolt travel through your head.</span>")
playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
to_chat(user, "<span class='notice'>You trigger [src].</span>")
times_used += 1
if(times_used >= max_uses)
icon_state = "battererburnt"