/obj/structure/destructible/cult density = 1 anchored = 1 icon = 'icons/obj/cult.dmi' var/cooldowntime = 0 break_sound = 'sound/hallucinations/veryfar_noise.ogg' debris = list(/obj/item/stack/sheet/runed_metal = 1) /obj/structure/destructible/cult/examine(mob/user) ..() to_chat(user, "\The [src] is [anchored ? "":"not "]secured to the floor.") if((iscultist(user) || isobserver(user)) && cooldowntime > world.time) to_chat(user, "The magic in [src] is too weak, [p_they()] will be ready to use again in [getETA()].") /obj/structure/destructible/cult/examine_status(mob/user) if(iscultist(user) || isobserver(user)) var/t_It = p_they(TRUE) var/t_is = p_are() return "[t_It] [t_is] at [round(obj_integrity * 100 / max_integrity)]% stability." return ..() /obj/structure/destructible/cult/attack_animal(mob/living/simple_animal/M) if(istype(M, /mob/living/simple_animal/hostile/construct/builder)) if(obj_integrity < max_integrity) M.changeNext_move(CLICK_CD_MELEE) obj_integrity = min(max_integrity, obj_integrity + 5) Beam(M, icon_state="sendbeam", time=4) M.visible_message("[M] repairs \the [src].", \ "You repair [src], leaving [p_they()] at [round(obj_integrity * 100 / max_integrity)]% stability.") else to_chat(M, "You cannot repair [src], as [p_they()] [p_are()] undamaged!") else ..() /obj/structure/destructible/cult/attackby(obj/I, mob/user, params) if(istype(I, /obj/item/weapon/tome) && iscultist(user)) anchored = !anchored to_chat(user, "You [anchored ? "":"un"]secure \the [src] [anchored ? "to":"from"] the floor.") if(!anchored) icon_state = "[initial(icon_state)]_off" else icon_state = initial(icon_state) else return ..() /obj/structure/destructible/cult/ratvar_act() if(take_damage(rand(25, 50), BURN) && src) //if we still exist var/previouscolor = color color = "#FAE48C" animate(src, color = previouscolor, time = 8) addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8) /obj/structure/destructible/cult/proc/getETA() var/time = (cooldowntime - world.time)/600 var/eta = "[round(time, 1)] minutes" if(time <= 1) time = (cooldowntime - world.time)*0.1 eta = "[round(time, 1)] seconds" return eta /obj/structure/destructible/cult/talisman name = "altar" desc = "A bloodstained altar dedicated to Nar-Sie." icon_state = "talismanaltar" break_message = "The altar shatters, leaving only the wailing of the damned!" /obj/structure/destructible/cult/talisman/attack_hand(mob/living/user) if(!iscultist(user)) to_chat(user, "You're pretty sure you know exactly what this is used for and you can't seem to touch it.") return if(!anchored) to_chat(user, "You need to anchor [src] to the floor with a tome first.") return if(cooldowntime > world.time) to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") return var/choice = alert(user,"You study the schematics etched into the forge...",,"Eldritch Whetstone","Zealot's Blindfold","Flask of Unholy Water") var/pickedtype switch(choice) if("Eldritch Whetstone") pickedtype = /obj/item/weapon/sharpener/cult if("Zealot's Blindfold") pickedtype = /obj/item/clothing/glasses/night/cultblind if("Flask of Unholy Water") pickedtype = /obj/item/weapon/reagent_containers/food/drinks/bottle/unholywater if(src && !QDELETED(src) && anchored && pickedtype && Adjacent(user) && !user.incapacitated() && iscultist(user) && cooldowntime <= world.time) cooldowntime = world.time + 2400 var/obj/item/N = new pickedtype(get_turf(src)) to_chat(user, "You kneel before the altar and your faith is rewarded with an [N]!") /obj/structure/destructible/cult/forge name = "daemon forge" desc = "A forge used in crafting the unholy weapons used by the armies of Nar-Sie." icon_state = "forge" light_range = 3 light_color = LIGHT_COLOR_LAVA break_message = "The force breaks apart into shards with a howling scream!" /obj/structure/destructible/cult/forge/attack_hand(mob/living/user) if(!iscultist(user)) to_chat(user, "The heat radiating from [src] pushes you back.") return if(!anchored) to_chat(user, "You need to anchor [src] to the floor with a tome first.") return if(cooldowntime > world.time) to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") return var/choice = alert(user,"You study the schematics etched into the forge...",,"Shielded Robe","Flagellant's Robe","Nar-Sien Hardsuit") var/pickedtype switch(choice) if("Shielded Robe") pickedtype = /obj/item/clothing/suit/hooded/cultrobes/cult_shield if("Flagellant's Robe") pickedtype = /obj/item/clothing/suit/hooded/cultrobes/berserker if("Nar-Sien Hardsuit") pickedtype = /obj/item/clothing/suit/space/hardsuit/cult if(src && !QDELETED(src) && anchored && pickedtype && Adjacent(user) && !user.incapacitated() && iscultist(user) && cooldowntime <= world.time) cooldowntime = world.time + 2400 var/obj/item/N = new pickedtype(get_turf(src)) to_chat(user, "You work the forge as dark knowledge guides your hands, creating [N]!") /obj/structure/destructible/cult/pylon name = "pylon" desc = "A floating crystal that slowly heals those faithful to Nar'Sie." icon_state = "pylon" light_range = 5 light_color = LIGHT_COLOR_RED break_sound = 'sound/effects/Glassbr2.ogg' break_message = "The blood-red crystal falls to the floor and shatters!" var/heal_delay = 25 var/last_heal = 0 var/corrupt_delay = 50 var/last_corrupt = 0 /obj/structure/destructible/cult/pylon/New() START_PROCESSING(SSfastprocess, src) ..() /obj/structure/destructible/cult/pylon/Destroy() STOP_PROCESSING(SSfastprocess, src) return ..() /obj/structure/destructible/cult/pylon/process() if(!anchored) return if(last_heal <= world.time) last_heal = world.time + heal_delay for(var/mob/living/L in range(5, src)) if(iscultist(L) || isshade(L) || isconstruct(L)) if(L.health != L.maxHealth) new /obj/effect/overlay/temp/heal(get_turf(src), "#960000") if(ishuman(L)) L.adjustBruteLoss(-1, 0) L.adjustFireLoss(-1, 0) L.updatehealth() if(isshade(L) || isconstruct(L)) var/mob/living/simple_animal/M = L if(M.health < M.maxHealth) M.adjustHealth(-1) if(ishuman(L) && L.blood_volume < BLOOD_VOLUME_NORMAL) L.blood_volume += 1.0 CHECK_TICK if(last_corrupt <= world.time) var/list/validturfs = list() var/list/cultturfs = list() for(var/T in circleviewturfs(src, 5)) if(istype(T, /turf/open/floor/engine/cult)) cultturfs |= T continue var/static/list/blacklisted_pylon_turfs = typecacheof(list( /turf/closed, /turf/open/floor/engine/cult, /turf/open/space, /turf/open/floor/plating/lava, /turf/open/chasm)) if(is_type_in_typecache(T, blacklisted_pylon_turfs)) continue else validturfs |= T last_corrupt = world.time + corrupt_delay var/turf/T = safepick(validturfs) if(T) T.ChangeTurf(/turf/open/floor/engine/cult) else var/turf/open/floor/engine/cult/F = safepick(cultturfs) if(F) new /obj/effect/overlay/temp/cult/turf/floor(F) else // Are we in space or something? No cult turfs or // convertable turfs? last_corrupt = world.time + corrupt_delay*2 /obj/structure/destructible/cult/tome name = "archives" desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl." icon_state = "tomealtar" light_range = 1.4 light_color = LIGHT_COLOR_FIRE break_message = "The books and tomes of the archives burn into ash as the desk shatters!" /obj/structure/destructible/cult/tome/attack_hand(mob/living/user) if(!iscultist(user)) to_chat(user, "All of these books seem to be gibberish.") return if(!anchored) to_chat(user, "You need to anchor [src] to the floor with a tome first.") return if(cooldowntime > world.time) to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") return var/choice = alert(user,"You flip through the black pages of the archives...",,"Supply Talisman","Shuttle Curse","Veil Walker Set") var/list/pickedtype = list() switch(choice) if("Supply Talisman") pickedtype += /obj/item/weapon/paper/talisman/supply/weak if("Shuttle Curse") pickedtype += /obj/item/device/shuttle_curse if("Veil Walker Set") pickedtype += /obj/item/device/cult_shift pickedtype += /obj/item/device/flashlight/flare/culttorch if(src && !QDELETED(src) && anchored && pickedtype.len && Adjacent(user) && !user.incapacitated() && iscultist(user) && cooldowntime <= world.time) cooldowntime = world.time + 2400 for(var/N in pickedtype) var/obj/item/D = new N(get_turf(src)) to_chat(user, "You summon [D] from the archives!") /obj/effect/gateway name = "gateway" desc = "You're pretty sure that abyss is staring back." icon = 'icons/obj/cult.dmi' icon_state = "hole" density = 1 anchored = 1