Move night vision spell and give it to constructs

This commit is contained in:
Mark van Alphen
2019-05-09 03:11:06 +02:00
parent c213e968a2
commit e6b7fd9149
4 changed files with 34 additions and 33 deletions
+27
View File
@@ -0,0 +1,27 @@
/obj/effect/proc_holder/spell/targeted/night_vision
name = "Toggle Nightvision"
desc = "Toggle your nightvision mode."
charge_max = 10
clothes_req = 0
message = "<span class='notice'>You toggle your night vision!</span>"
range = -1
include_user = 1
/obj/effect/proc_holder/spell/targeted/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()
@@ -113,7 +113,7 @@
status_flags = 0
const_type = "juggernaut"
mob_size = MOB_SIZE_LARGE
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
construct_spells = list(/obj/effect/proc_holder/spell/targeted/night_vision, /obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
force_threshold = 11
playstyle_string = "<b>You are a Juggernaut. Though slow, your shell can withstand extreme punishment, \
create shield walls, rip apart enemies and walls alike, and even deflect energy weapons.</b>"
@@ -171,7 +171,7 @@
see_in_dark = 8
attack_sound = 'sound/weapons/bladeslice.ogg'
const_type = "wraith"
construct_spells = list(/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift)
construct_spells = list(/obj/effect/proc_holder/spell/targeted/night_vision, /obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift)
retreat_distance = 2 //AI wraiths will move in and out of combat
playstyle_string = "<b>You are a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</b>"
@@ -202,7 +202,8 @@
minimum_distance = 10 //AI artificers will flee like fuck
attack_sound = 'sound/weapons/punch2.ogg'
const_type = "builder"
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser,
construct_spells = list(/obj/effect/proc_holder/spell/targeted/night_vision,
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser,
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor,
/obj/effect/proc_holder/spell/aoe_turf/conjure/pylon,
@@ -311,7 +312,8 @@
see_in_dark = 8
attack_sound = 'sound/weapons/tap.ogg'
const_type = "harvester"
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
construct_spells = list(/obj/effect/proc_holder/spell/targeted/night_vision,
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor,
/obj/effect/proc_holder/spell/targeted/smoke/disable)
retreat_distance = 2 //AI harvesters will move in and out of combat, like wraiths, but shittier
@@ -189,35 +189,6 @@
L.EyeBlind(4)
return
//Toggle Night Vision
/obj/effect/proc_holder/spell/targeted/night_vision
name = "Toggle Nightvision"
desc = "Toggle your nightvision mode."
charge_max = 10
clothes_req = 0
message = "<span class='notice'>You toggle your night vision!</span>"
range = -1
include_user = 1
/obj/effect/proc_holder/spell/targeted/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()
/mob/living/simple_animal/hostile/statue/sentience_act()
faction -= "neutral"
+1
View File
@@ -371,6 +371,7 @@
#include "code\datums\spells\magnet.dm"
#include "code\datums\spells\mime.dm"
#include "code\datums\spells\mind_transfer.dm"
#include "code\datums\spells\night_vision.dm"
#include "code\datums\spells\projectile.dm"
#include "code\datums\spells\rathens.dm"
#include "code\datums\spells\rod_form.dm"