Nightmare organs

This commit is contained in:
KorPhaeron
2017-10-03 18:20:59 -05:00
committed by CitadelStationBot
parent aec96bbbbe
commit 037ea0ce13
4 changed files with 106 additions and 16 deletions

View File

@@ -44,7 +44,11 @@
//Update the body's icon so it doesnt appear debrained anymore
C.update_hair()
<<<<<<< HEAD
/obj/item/organ/brain/Remove(mob/living/carbon/C, special = 0)
=======
/obj/item/organ/brain/Remove(mob/living/carbon/C, special = 0, no_id_transfer = FALSE)
>>>>>>> 085632f... Nightmare organs (#31034)
..()
if(!special)
if(C.has_brain_worms())

View File

@@ -68,7 +68,11 @@
//Flight and floating
var/override_float = 0
<<<<<<< HEAD
=======
var/obj/item/organ/brain/mutant_brain = /obj/item/organ/brain
>>>>>>> 085632f... Nightmare organs (#31034)
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
var/obj/item/organ/ears/mutantears = /obj/item/organ/ears
var/obj/item/mutanthands

View File

@@ -1,3 +1,5 @@
#define HEART_RESPAWN_THRESHHOLD 40
/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 = "???"
@@ -32,19 +34,14 @@
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,NO_DNA_COPY,NOTRANSSTING)
mutanteyes = /obj/item/organ/eyes/night_vision/nightmare
var/obj/effect/proc_holder/spell/targeted/shadowwalk/shadowwalk
mutant_organs = list(/obj/item/organ/heart/nightmare)
mutant_brain = /obj/item/organ/brain/nightmare
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."
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 while activated. \
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. If killed, you will eventually revive if left in darkness."
/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"
@@ -53,11 +50,6 @@
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))
@@ -68,6 +60,93 @@
return -1
return 0
//Organs
/obj/item/organ/brain/nightmare
name = "tumorous mass"
desc = "A fleshy growth that was dug out of the skull of a Nightmare."
icon_state = "brain-x-d"
var/obj/effect/proc_holder/spell/targeted/shadowwalk/shadowwalk
/obj/item/organ/brain/nightmare/Insert(mob/living/carbon/M, special = 0)
..()
if(M.dna.species.id != "nightmare")
M.set_species(/datum/species/shadow/nightmare)
visible_message("<span class='warning'>[M] thrashes as [src] takes root in their body!</span>")
var/obj/effect/proc_holder/spell/targeted/shadowwalk/SW = new
M.AddSpell(SW)
shadowwalk = SW
/obj/item/organ/brain/nightmare/Remove(mob/living/carbon/M, special = 0)
if(shadowwalk)
M.RemoveSpell(shadowwalk)
..()
/obj/item/organ/heart/nightmare
name = "heart of darkness"
desc = "An alien organ that twists and writhes when exposed to light."
icon = 'icons/obj/surgery.dmi'
icon_state = "demon_heart-on"
color = "#1C1C1C"
var/respawn_progress = 0
var/obj/item/light_eater/blade
/obj/item/organ/heart/nightmare/attack(mob/M, mob/living/carbon/user, obj/target)
if(M != user)
return ..()
user.visible_message("<span class='warning'>[user] raises [src] to their mouth and tears into it with their teeth!</span>", \
"<span class='danger'>[src] feels unnaturally cold in your hands. You raise [src] your mouth and devour it!</span>")
playsound(user, 'sound/magic/demon_consume.ogg', 50, 1)
user.visible_message("<span class='warning'>Blood erupts from [user]'s arm as it reforms into a weapon!</span>", \
"<span class='userdanger'>Icy blood pumps through your veins as your arm reforms itself!</span>")
user.temporarilyRemoveItemFromInventory(src, TRUE)
Insert(user)
/obj/item/organ/heart/nightmare/Insert(mob/living/carbon/M, special = 0)
..()
blade = new/obj/item/light_eater
M.put_in_hands(blade)
START_PROCESSING(SSobj, src)
/obj/item/organ/heart/nightmare/Remove(mob/living/carbon/M, special = 0)
STOP_PROCESSING(SSobj, src)
respawn_progress = 0
if(blade)
QDEL_NULL(blade)
M.visible_message("<span class='warning'>\The [blade] disintegrates!</span>")
..()
/obj/item/organ/heart/nightmare/Stop()
return 0
/obj/item/organ/heart/nightmare/update_icon()
return //always beating visually
/obj/item/organ/heart/nightmare/process()
if(QDELETED(owner) || owner.stat != DEAD)
respawn_progress = 0
return
var/turf/T = get_turf(owner)
if(istype(T))
var/light_amount = T.get_lumcount()
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
respawn_progress++
playsound(owner,'sound/effects/singlebeat.ogg',40,1)
if(respawn_progress >= HEART_RESPAWN_THRESHHOLD)
owner.revive(full_heal = TRUE)
owner.visible_message("<span class='warning'>[owner] staggers to their feet!</span>")
playsound(owner, 'sound/hallucinations/far_noise.ogg', 50, 1)
respawn_progress = 0
//Weapon
/obj/item/light_eater
name = "light eater"
icon_state = "arm_blade"
@@ -113,3 +192,5 @@
visible_message("<span class='danger'>[O] is disintegrated by [src]!</span>")
O.burn()
playsound(src, 'sound/items/welder.ogg', 50, 1)
#undef HEART_RESPAWN_THRESHHOLD

View File

@@ -25,8 +25,9 @@
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)
user.SetStun(0, FALSE)
user.SetKnockdown(0, FALSE)
user.setStaminaLoss(0, 0)
var/obj/effect/dummy/shadow/S2 = new(get_turf(user.loc))
user.forceMove(S2)
S2.jaunter = user