Files
Paradise/code/datums/spells/night_vision.dm
Qwertytoforty 7bbebbb23f Ports Anti-magic from TG. (#27560)
* the rest of the fucking owl

* OK hands need work but otherwise good

* fuck time out fix vampire after

* temporary codersprite do not merge this lmao

* codersprite up

* pause, time out

* deploy the antimagic

* Update code/__HELPERS/trait_helpers.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>

* Update code/datums/status_effects/buffs.dm

Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>

* Update code/game/gamemodes/wizard/magic_tarot.dm

Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>

---------

Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2025-01-02 08:36:07 +00:00

30 lines
1015 B
Plaintext

/datum/spell/night_vision
name = "Toggle Nightvision"
desc = "Toggle your nightvision mode."
base_cooldown = 10
clothes_req = FALSE
antimagic_flags = NONE
message = "<span class='notice'>You toggle your night vision!</span>"
/datum/spell/night_vision/create_new_targeting()
return new /datum/spell_targeting/self
/datum/spell/night_vision/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
switch(target.lighting_alpha)
if(LIGHTING_PLANE_ALPHA_VISIBLE)
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
name = "Toggle Nightvision \[More]"
if(LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
name = "Toggle Nightvision \[Full]"
if(LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
target.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
name = "Toggle Nightvision \[OFF]"
else
target.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
name = "Toggle Nightvision \[ON]"
target.update_sight()