diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 13a34b6bae..de66a03c11 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -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()) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 07f3acea48..9da5572f0e 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index 5c635fb870..5f8f125965 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -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 Nightmare. The ability shadow walk allows unlimited, unrestricted movement in the dark using. \ - Your light eater 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 Nightmare. The ability shadow walk allows unlimited, unrestricted movement in the dark while activated. \ + Your light eater 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("[M] thrashes as [src] takes root in their body!") + 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("[user] raises [src] to their mouth and tears into it with their teeth!", \ + "[src] feels unnaturally cold in your hands. You raise [src] your mouth and devour it!") + playsound(user, 'sound/magic/demon_consume.ogg', 50, 1) + + + user.visible_message("Blood erupts from [user]'s arm as it reforms into a weapon!", \ + "Icy blood pumps through your veins as your arm reforms itself!") + 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("\The [blade] disintegrates!") + ..() + +/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("[owner] staggers to their feet!") + 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("[O] is disintegrated by [src]!") O.burn() playsound(src, 'sound/items/welder.ogg', 50, 1) + +#undef HEART_RESPAWN_THRESHHOLD \ No newline at end of file diff --git a/code/modules/spells/spell_types/shadow_walk.dm b/code/modules/spells/spell_types/shadow_walk.dm index 45ea521098..9f9b4ac223 100644 --- a/code/modules/spells/spell_types/shadow_walk.dm +++ b/code/modules/spells/spell_types/shadow_walk.dm @@ -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("[user] melts into the shadows!") - 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