Nightmare

This commit is contained in:
KorPhaeron
2017-09-11 16:23:35 -05:00
committed by CitadelStationBot
parent 2d29b49985
commit 4d2fe460ed
8 changed files with 140 additions and 14 deletions

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/datum/species/shadow
// Humans cursed to stay in the darkness, lest their life forces drain. They regain health in shadow and die in light.
name = "???"
@@ -21,3 +22,120 @@
H.take_overall_damage(1,1)
else if (light_amount < 0.2) //heal in the dark
H.heal_overall_damage(1,1)
=======
/datum/species/shadow
// Humans cursed to stay in the darkness, lest their life forces drain. They regain health in shadow and die in light.
name = "???"
id = "shadow"
sexes = 0
blacklisted = 1
ignored_by = list(/mob/living/simple_animal/hostile/faithless)
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/shadow
species_traits = list(NOBREATH,NOBLOOD,RADIMMUNE,VIRUSIMMUNE)
dangerous_existence = 1
mutanteyes = /obj/item/organ/eyes/night_vision
/datum/species/shadow/spec_life(mob/living/carbon/human/H)
var/turf/T = H.loc
if(istype(T))
var/light_amount = T.get_lumcount()
if(light_amount > SHADOW_SPECIES_LIGHT_THRESHOLD) //if there's enough light, start dying
H.take_overall_damage(1,1)
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
H.heal_overall_damage(1,1)
/datum/species/shadow/nightmare
name = "Nightmare"
id = "nightmare"
limbs_id = "shadow"
burnmod = 1.5
blacklisted = TRUE
no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform, slot_s_store)
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR,NOHUNGER)
mutanteyes = /obj/item/organ/eyes/night_vision/nightmare
var/obj/effect/proc_holder/spell/targeted/shadowwalk/shadowwalk
var/info_text = "You are a <span class='danger'>Nightmare</span>. The ability <span class='warning'>shadow walk</span> allows unlimited, unrestricted movement in the dark using. \
Your <span class='warning'>light eater</span> will destroy any light producing objects you attack, as well as destroy any lights a living creature may be holding. You will automatically dodge gunfire and melee attacks when on a dark tile."
/datum/species/shadow/nightmare/on_species_gain(mob/living/carbon/C, datum/species/old_species)
. = ..()
var/obj/effect/proc_holder/spell/targeted/shadowwalk/SW = new
C.AddSpell(SW)
shadowwalk = SW
var/obj/item/light_eater/blade = new
C.put_in_hands(blade)
to_chat(C, "[info_text]")
C.real_name = "Nightmare"
C.name = "Nightmare"
if(C.mind)
C.mind.name = "Nightmare"
C.dna.real_name = "Nightmare"
/datum/species/shadow/nightmare/on_species_loss(mob/living/carbon/C)
. = ..()
if(shadowwalk)
C.RemoveSpell(shadowwalk)
/datum/species/shadow/nightmare/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
var/turf/T = H.loc
if(istype(T))
var/light_amount = T.get_lumcount()
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
H.visible_message("<span class='danger'>[H] dances in the shadows, evading [P]!</span>")
playsound(T, "bullet_miss", 75, 1)
return -1
return 0
/obj/item/light_eater
name = "light eater"
icon_state = "arm_blade"
item_state = "arm_blade"
force = 25
armour_penetration = 35
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
flags_1 = ABSTRACT_1 | NODROP_1 | DROPDEL_1
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
/obj/item/light_eater/afterattack(atom/movable/AM, mob/user, proximity)
if(!proximity)
return
if(isopenturf(AM)) //So you can actually melee with it
return
if(isliving(AM))
var/mob/living/L = AM
if(iscyborg(AM))
var/mob/living/silicon/robot/borg = AM
borg.update_headlamp(TRUE, 100)
else
for(var/obj/item/O in AM)
if(O.light_range && O.light_power)
disintegrate(O)
if(L.pulling && L.pulling.light_range && isitem(L.pulling))
disintegrate(L.pulling)
else if(isitem(AM))
var/obj/item/I = AM
if(I.light_range && I.light_power)
disintegrate(I)
/obj/item/light_eater/proc/disintegrate(obj/item/O)
if(istype(O, /obj/item/device/pda))
var/obj/item/device/pda/PDA = O
PDA.set_light(0)
PDA.fon = 0
PDA.f_lum = 0
PDA.update_icon()
visible_message("<span class='danger'>The light in [PDA] shorts out!</span>")
else
visible_message("<span class='danger'>[O] is disintegrated by [src]!</span>")
O.burn()
playsound(src, 'sound/items/welder.ogg', 50, 1)
>>>>>>> 35279a3... Nightmare (#30415)

View File

@@ -72,7 +72,7 @@
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
var/lamp_recharging = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
var/lamp_cooldown = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
var/sight_mode = 0
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
@@ -742,7 +742,7 @@
set_autosay()
/mob/living/silicon/robot/proc/control_headlamp()
if(stat || lamp_recharging || low_power_mode)
if(stat || lamp_cooldown > world.time || low_power_mode)
to_chat(src, "<span class='danger'>This function is currently offline.</span>")
return
@@ -757,8 +757,7 @@
if(lamp_intensity && (turn_off || stat || low_power_mode))
to_chat(src, "<span class='danger'>Your headlamp has been deactivated.</span>")
lamp_intensity = 0
lamp_recharging = TRUE
addtimer(CALLBACK(src, .proc/reset_headlamp), cooldown)
lamp_cooldown = world.time + cooldown
else
set_light(lamp_intensity)
@@ -767,9 +766,6 @@
update_icons()
/mob/living/silicon/robot/proc/reset_headlamp()
lamp_recharging = FALSE
/mob/living/silicon/robot/proc/deconstruct()
var/turf/T = get_turf(src)
if (robot_suit)

View File

@@ -13,7 +13,7 @@
action_icon_state = "ninja_cloak"
action_background_icon_state = "bg_alien"
/obj/effect/proc_holder/spell/targeted/shadowwalk/cast(list/targets,mob/user = usr)
/obj/effect/proc_holder/spell/targeted/shadowwalk/cast(list/targets,mob/living/user = usr)
var/L = user.loc
if(istype(user.loc, /obj/effect/dummy/shadow))
var/obj/effect/dummy/shadow/S = L
@@ -22,9 +22,11 @@
else
var/turf/T = get_turf(user)
var/light_amount = T.get_lumcount()
if(light_amount < 0.2)
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
playsound(get_turf(user), 'sound/magic/ethereal_enter.ogg', 50, 1, -1)
visible_message("<span class='boldwarning'>[user] melts into the shadows!</span>")
user.AdjustStun(-20, 0)
user.AdjustKnockdown(-20, 0)
var/obj/effect/dummy/shadow/S2 = new(get_turf(user.loc))
user.forceMove(S2)
S2.jaunter = user

View File

@@ -61,14 +61,17 @@
/obj/item/organ/eyes/night_vision/alien
name = "alien eyes"
desc = "It turned out they had them after all!"
see_in_dark = 8
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
sight_flags = SEE_MOBS
/obj/item/organ/eyes/night_vision/zombie
name = "undead eyes"
desc = "Somewhat counterintuitively, these half rotten eyes actually have superior vision to those of a living human."
/obj/item/organ/eyes/night_vision/nightmare
name = "burning red eyes"
desc = "Even without their shadowy owner, looking at these eyes gives you a sense of dread."
icon_state = "burning_eyes"
///Robotic
/obj/item/organ/eyes/robotic