diff --git a/code/modules/antagonists/eldritch_cult/eldritch_book.dm b/code/modules/antagonists/eldritch_cult/eldritch_book.dm index 265f4db095..808932443f 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_book.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_book.dm @@ -89,6 +89,7 @@ var/list/lore = list() data["charges"] = charge + data["total_sacs"] = cultie.total_sacrifices for(var/X in to_know) lore = list() @@ -96,7 +97,11 @@ lore["type"] = EK.type lore["name"] = EK.name lore["cost"] = EK.cost - lore["disabled"] = EK.cost <= charge ? FALSE : TRUE + lore["sacs"] = EK.sacs_needed + if(EK.cost <= charge && cultie.total_sacrifices >= EK.sacs_needed) + lore["disabled"] = FALSE + else + lore["disabled"] = TRUE lore["path"] = EK.route lore["state"] = "Research" lore["flavour"] = EK.gain_text @@ -108,6 +113,7 @@ var/datum/eldritch_knowledge/EK = known[X] lore["name"] = EK.name lore["cost"] = EK.cost + lore["sacs"] = EK.sacs_needed lore["disabled"] = TRUE lore["path"] = EK.route lore["state"] = "Researched" diff --git a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm index a390c04a1c..3d6059dfe3 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm @@ -165,6 +165,25 @@ new /obj/effect/reality_smash(chosen_location) ReworkNetwork() +/** +*CIT CHANGE +* +*Creates a singular reality smash +*Credit to slimelust +*/ + +/datum/reality_smash_tracker/proc/RandomSpawnSmash(var/deferred = FALSE) + var/turf/chosen_location = get_safe_random_station_turf() + //we also dont want them close to each other, at least 1 tile of separation + var/obj/effect/reality_smash/what_if_i_have_one = locate() in range(1, chosen_location) + var/obj/effect/broken_illusion/what_if_i_had_one_but_got_used = locate() in range(1, chosen_location) + var/tries = 10 + while((what_if_i_have_one || what_if_i_had_one_but_got_used) && tries-- > 0) + chosen_location = get_safe_random_station_turf() + new /obj/effect/reality_smash(chosen_location) + if(!deferred) + ReworkNetwork() + /** * Adds a mind to the list of people that can see the reality smashes * @@ -200,15 +219,23 @@ /obj/effect/broken_illusion/Initialize() . = ..() addtimer(CALLBACK(src,.proc/show_presence),15 SECONDS) + addtimer(CALLBACK(src,.proc/remove_presence),195 SECONDS) var/image/I = image('icons/effects/eldritch.dmi',src,null,OBJ_LAYER) I.override = TRUE add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/silicons, "pierced_reality", I) +/obj/effect/broken_illusion/Destroy() + GLOB.reality_smash_track.RandomSpawnSmash() + return ..() + ///Makes this obj appear out of nothing /obj/effect/broken_illusion/proc/show_presence() animate(src,alpha = 255,time = 15 SECONDS) +/obj/effect/broken_illusion/proc/remove_presence() + qdel(src) + /obj/effect/broken_illusion/attack_hand(mob/living/user, list/modifiers) if(!ishuman(user)) return ..() diff --git a/code/modules/antagonists/eldritch_cult/eldritch_items.dm b/code/modules/antagonists/eldritch_cult/eldritch_items.dm index 86ef2afacb..87a4ddf7eb 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_items.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_items.dm @@ -44,46 +44,6 @@ if(target.stat == DEAD) to_chat(user,"[target.real_name] is dead. Bring them onto a transmutation rune!") -/datum/action/innate/heretic_shatter - name = "Shattering Offer" - desc = "After a brief delay, you will be granted salvation from a dire situation at the cost of your blade. (Teleports you to a random safe turf on your current z level after a windup, but destroys your blade.)" - background_icon_state = "bg_ecult" - button_icon_state = "shatter" - icon_icon = 'icons/mob/actions/actions_ecult.dmi' - check_flags = MOBILITY_HOLD|MOBILITY_MOVE|MOBILITY_USE - var/mob/living/carbon/human/holder - var/obj/item/melee/sickly_blade/sword - -/datum/action/innate/heretic_shatter/Grant(mob/user, obj/object) - sword = object - holder = user - //i know what im doing - return ..() - -/datum/action/innate/heretic_shatter/IsAvailable() - if(IS_HERETIC(holder) || IS_HERETIC_MONSTER(holder)) - return ..() - else - return FALSE - -/datum/action/innate/heretic_shatter/Activate() - if(do_after(holder,10, target = holder)) - if(!sword || QDELETED(sword)) - return - if(!IsAvailable()) //Never trust the user. - return - var/swordz = (get_turf(sword))?.z //SHOULD usually have a turf but if it doesn't better be prepared. - if(!swordz) - to_chat(holder, "[sword] flickers but remains in place, as do you...") - return - var/turf/safe_turf = find_safe_turf(zlevels = swordz, extended_safety_checks = TRUE) - if(!safe_turf) - to_chat(holder, "[sword] flickers but remains in place, as do you...") - return - do_teleport(holder,safe_turf,forceMove = TRUE,channel=TELEPORT_CHANNEL_MAGIC) - to_chat(holder,"You feel a gust of energy flow through your body... the Rusted Hills heard your call...") - qdel(sword) - /obj/item/melee/sickly_blade name = "sickly blade" desc = "A sickly green crescent blade, decorated with an ornamental eye. You feel like you're being watched..." @@ -101,11 +61,6 @@ throwforce = 10 hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "tore", "lacerated", "ripped", "diced", "rended") - var/datum/action/innate/heretic_shatter/linked_action - -/obj/item/melee/sickly_blade/Initialize() - . = ..() - linked_action = new(src) /obj/item/melee/sickly_blade/attack(mob/living/target, mob/living/user) if(!(IS_HERETIC(user) || IS_HERETIC_MONSTER(user))) @@ -120,13 +75,17 @@ return return ..() -/obj/item/melee/sickly_blade/pickup(mob/user) - . = ..() - linked_action.Grant(user, src) - -/obj/item/melee/sickly_blade/dropped(mob/user, silent) - . = ..() - linked_action.Remove(user, src) +/obj/item/melee/sickly_blade/attack_self(mob/user) + var/turf/safe_turf = find_safe_turf(zlevels = z, extended_safety_checks = TRUE) + if(IS_HERETIC(user) || IS_HERETIC_MONSTER(user)) + if(do_teleport(user, safe_turf, forceMove = TRUE, channel = TELEPORT_CHANNEL_MAGIC)) + to_chat(user,"As you shatter [src], you feel a gust of energy flow through your body. The Rusted Hills heard your call...") + else + to_chat(user,"You shatter [src], but your plea goes unanswered.") + else + to_chat(user,"You shatter [src].") + playsound(src, "shatter", 70, TRUE) //copied from the code for smashing a glass sheet onto the ground to turn it into a shard + qdel(src) /obj/item/melee/sickly_blade/afterattack(atom/target, mob/user, proximity_flag, click_parameters) . = ..() @@ -141,6 +100,11 @@ else eldritch_knowledge_datum.on_ranged_attack_eldritch_blade(target,user,click_parameters) +/obj/item/melee/sickly_blade/examine(mob/user) + . = ..() + if(IS_HERETIC(user) || IS_HERETIC_MONSTER(user)) + . += "A heretic (or a servant of one) can shatter this blade to teleport to a random, mostly safe location by activating it in-hand." + /obj/item/melee/sickly_blade/rust name = "rusted blade" desc = "This crescent blade is decrepit, wasting to rust. Yet still it bites, ripping flesh and bone with jagged, rotten teeth." @@ -243,6 +207,7 @@ // slightly worse than normal cult robes armor = list("melee" = 30, "bullet" = 30, "laser" = 30,"energy" = 30, "bomb" = 15, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) pocket_storage_component_path = /datum/component/storage/concrete/pockets/void_cloak + mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON /obj/item/clothing/suit/hooded/cultrobes/void/ToggleHood() if(!iscarbon(loc)) diff --git a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm index d2132be4bc..33a17c3278 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm @@ -15,6 +15,8 @@ var/gain_text = "" ///Cost of knowledge in souls var/cost = 0 + ///Required sacrifices to unlock + var/sacs_needed = 0 ///Next knowledge in the research tree var/list/next_knowledge = list() ///What knowledge is incompatible with this. This will simply make it impossible to research knowledges that are in banned_knowledge once this gets researched. @@ -230,7 +232,6 @@ atoms -= H H.gib() - /////////////// ///Base lore/// /////////////// diff --git a/code/modules/antagonists/eldritch_cult/knowledge/ash_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/ash_lore.dm index 0256382723..e453f5456d 100644 --- a/code/modules/antagonists/eldritch_cult/knowledge/ash_lore.dm +++ b/code/modules/antagonists/eldritch_cult/knowledge/ash_lore.dm @@ -109,10 +109,15 @@ gain_text = "When the Glory of the Lantern scorches and sears their skin, nothing will protect them from the ashes." desc = "Fire off five streams of fire from your hand, each setting ablaze targets hit and scorching them upon contact." cost = 2 + sacs_needed = 3 spell_to_add = /obj/effect/proc_holder/spell/pointed/nightwatchers_rite next_knowledge = list(/datum/eldritch_knowledge/final/ash_final) route = PATH_ASH +/datum/eldritch_knowledge/spell/nightwatchers_rite/on_gain(mob/user) + . = ..() + priority_announce("Large heat signatures discovered! A swelling fiery horror is coming..", sound = 'sound/misc/notice1.ogg') + /datum/eldritch_knowledge/ash_blade_upgrade name = "Fiery Blade" gain_text = "Blade in hand, he swung and swung as the ash fell from the skies. His city, his people... all burnt to cinders, and yet life still remained in his charred body." @@ -181,6 +186,7 @@ desc = "Bring 3 corpses onto a transmutation rune, you will become immune to fire, the vacuum of space, cold and other enviromental hazards and become overall sturdier to all other damages. You will gain a spell that passively creates ring of fire around you as well ,as you will gain a powerful ability that lets you create a wave of flames all around you." required_atoms = list(/mob/living/carbon/human) cost = 5 + sacs_needed = 8 route = PATH_ASH var/list/trait_list = list(TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE) diff --git a/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm index 9e71f34735..023be4b3e7 100644 --- a/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm +++ b/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm @@ -170,7 +170,7 @@ gain_text = "The Uncanny Man, who walks alone in the valley between the worlds... I was able to summon his aid." desc = "You can now summon a Raw Prophet by transmutating a pair of eyes, a left arm and a pool of blood. Raw prophets have increased seeing range, as well as X-Ray vision, but they are very fragile." cost = 1 - required_atoms = list(/obj/item/organ/eyes,/obj/item/bodypart/l_arm,/obj/item/bodypart/r_arm,/obj/effect/decal/cleanable/blood) + required_atoms = list(/obj/item/organ/eyes,/obj/item/bodypart/l_arm,/obj/effect/decal/cleanable/blood) mob_to_summon = /mob/living/simple_animal/hostile/eldritch/raw_prophet next_knowledge = list(/datum/eldritch_knowledge/flesh_blade_upgrade,/datum/eldritch_knowledge/rune_carver,/datum/eldritch_knowledge/curse/paralysis) route = PATH_FLESH @@ -217,6 +217,7 @@ desc = "Bring 3 bodies onto a transmutation rune to shed your human form and ascend to untold power." required_atoms = list(/mob/living/carbon/human) cost = 5 + sacs_needed = 8 route = PATH_FLESH /datum/eldritch_knowledge/final/flesh_final/on_finished_recipe(mob/living/user, list/atoms, loc) @@ -257,6 +258,11 @@ gain_text = "The ignorant mind that inhabits their feeble bodies will crumble when they acknowledge - willingly or not, the truth." desc = "By forcing the knowledge of the Mansus upon my foes, I can show them things that would drive any normal man insane." cost = 2 + sacs_needed = 3 spell_to_add = /obj/effect/proc_holder/spell/targeted/touch/mad_touch next_knowledge = list(/datum/eldritch_knowledge/final/flesh_final) route = PATH_FLESH + +/datum/eldritch_knowledge/spell/touch_of_madness/on_gain(mob/user) + . = ..() + priority_announce("The stench of rotting flesh fills the air... An approaching abomination has been detected!", sound = 'sound/misc/notice1.ogg') diff --git a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm index aa927ffcfc..509c35261e 100644 --- a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm +++ b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm @@ -159,15 +159,21 @@ desc = "Applying your knowledge of rust to the human body, a knowledge that could decay your foes from the inside out, resulting in organ failure, vomiting, or eventual death through the peeling of rotting flesh." gain_text = "Rust, decay, it's all the same. All that remains is application." cost = 2 + sacs_needed = 3 spell_to_add = /obj/effect/proc_holder/spell/targeted/touch/grasp_of_decay next_knowledge = list(/datum/eldritch_knowledge/final/rust_final) route = PATH_RUST +/datum/eldritch_knowledge/spell/grasp_of_decay/on_gain(mob/user) + . = ..() + priority_announce("A foul wind is blowing... The floor creaks with rust as something sinister approaches!", sound = 'sound/misc/notice1.ogg') + /datum/eldritch_knowledge/final/rust_final name = "Rustbringer's Oath" desc = "Bring three corpses onto a transmutation rune. After you finish the ritual, rust will now automatically spread from the rune. Your healing on rust is also tripled, while you become more resilient overall." gain_text = "Champion of rust. Corruptor of steel. Fear the dark for the Rustbringer has come! Rusted Hills, CALL MY NAME!" cost = 5 + sacs_needed = 8 required_atoms = list(/mob/living/carbon/human) route = PATH_RUST diff --git a/code/modules/antagonists/eldritch_cult/knowledge/void_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/void_lore.dm index 6046bfbdf5..97b5af0f4d 100644 --- a/code/modules/antagonists/eldritch_cult/knowledge/void_lore.dm +++ b/code/modules/antagonists/eldritch_cult/knowledge/void_lore.dm @@ -160,15 +160,21 @@ gain_text = "This world will be my stage, and nothing will be out of my reach." desc = "Gain the ability to mark a 7x7 area as your domain after a short delay. Creatures in your domain are slowed and branded with a void mark, allowing you to quickly teleport to them and slash them, further inhibiting their ability to move." cost = 2 + sacs_needed = 3 spell_to_add = /obj/effect/proc_holder/spell/aoe_turf/domain_expansion next_knowledge = list(/datum/eldritch_knowledge/final/void_final) route = PATH_VOID +/datum/eldritch_knowledge/spell/domain_expansion/on_gain(mob/user) + . = ..() + priority_announce("Echos of the lost in space are heard... An ominous presence is being detected! ", sound = 'sound/misc/notice1.ogg') + /datum/eldritch_knowledge/final/void_final name = "Waltz at the End of Time" desc = "Bring 3 corpses onto the transmutation rune. After you finish the ritual you will automatically silence people around you and will summon a snow storm around you." gain_text = "The world falls into darkness. I stand in an empty plane, small flakes of ice fall from the sky. The Aristocrat stands before me, he motions to me. We will play a waltz to the whispers of dying reality, as the world is destroyed before our eyes." cost = 5 + sacs_needed = 8 required_atoms = list(/mob/living/carbon/human) route = PATH_VOID ///soundloop for the void theme diff --git a/tgui/packages/tgui/interfaces/ForbiddenLore.js b/tgui/packages/tgui/interfaces/ForbiddenLore.js index 1225132810..cecbacdc27 100644 --- a/tgui/packages/tgui/interfaces/ForbiddenLore.js +++ b/tgui/packages/tgui/interfaces/ForbiddenLore.js @@ -7,7 +7,7 @@ import { Window } from '../layouts'; export const ForbiddenLore = (props, context) => { const { act, data } = useBackend(context); const { - charges, + charges, total_sacs, } = data; const to_know = flow([ sortBy(to_know => to_know.state !== "Research", @@ -21,6 +21,8 @@ export const ForbiddenLore = (props, context) => {
Charges left : {charges} +
+ Completed Sacrifices : {total_sacs} {to_know!== null ? ( to_know.map(knowledge => (
{ cost: knowledge.cost, })} /> {' '} - Cost : {knowledge.cost} + Cost : {knowledge.cost} + | Sacrifices Required : {knowledge.sacs} {knowledge.flavour}