diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 4f6771739f2..68f5d14744c 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -682,3 +682,109 @@ desc = "It's an orb of crystalized blood. Can be used to transfer blood between cultists." var/blood = 50 +/obj/item/portal_amulet + name = "reality sunderer" + icon = 'icons/obj/cult.dmi' + icon_state = "amulet" + desc = "Some amulet made out of metal, bluespace crystals, and blood. Allows cultists to open portals over teleport runes, destroying the rune in the process." + w_class = WEIGHT_CLASS_SMALL + + +/obj/item/portal_amulet/afterattack(atom/O, mob/user, proximity) + . = ..() + if(!iscultist(user)) + if(!iscarbon(user)) + return + var/mob/living/carbon/M = user + to_chat(M, "\"So, you want to explore space?\"") + to_chat(M, "Space flashes around you as you are moved somewhere else!") + M.Confused(10) + M.flash_eyes(override_blindness_check = TRUE) + M.EyeBlind(10) + do_teleport(M, get_turf(M), 5, asoundin = 'sound/magic/cult_spell.ogg') + qdel(src) + return + + if(istype(O, /obj/effect/rune)) + if(!istype(O, /obj/effect/rune/teleport)) + to_chat(user, "[src] only works on teleport runes.") + return + if(!proximity) + to_chat(user, "You are too far away from the teleport rune.") + return + var/obj/effect/rune/teleport/R = O + attempt_portal(R, user) + +/obj/item/portal_amulet/proc/attempt_portal(obj/effect/rune/teleport/R, mob/user) + var/list/potential_runes = list() + var/list/teleport_names = list() + var/list/duplicate_rune_count = list() + var/turf/T = get_turf(src) //used to tell the other rune where we came from + + for(var/I in GLOB.teleport_runes) + var/obj/effect/rune/teleport/target = I + var/result_key = target.listkey + if(target == R || !is_level_reachable(target.z)) + continue + if(result_key in teleport_names) + duplicate_rune_count[result_key]++ + result_key = "[result_key] ([duplicate_rune_count[result_key]])" + else + teleport_names += result_key + duplicate_rune_count[result_key] = 1 + potential_runes[result_key] = target + + if(!length(potential_runes)) + to_chat(user, "There are no valid runes to teleport to!") + return + + if(!is_level_reachable(user.z)) + to_chat(user, "You are not in the right dimension!") + return + + var/input_rune_key = input(user, "Choose a rune to make a portal to.", "Rune to make a portal to") as null|anything in potential_runes //we know what key they picked + var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to? + if(QDELETED(R) || QDELETED(actual_selected_rune) || !Adjacent(user) || user.incapacitated()) + return + + if(is_mining_level(R.z) && !is_mining_level(actual_selected_rune.z)) + actual_selected_rune.handle_portal("lava") + else if(!is_station_level(R.z) || istype(get_area(src), /area/space)) + actual_selected_rune.handle_portal("space", T) + new /obj/effect/portal/cult(get_turf(R), get_turf(actual_selected_rune), src, 4 MINUTES) + to_chat(user, "You use the magic of the amulet to turn [R] into a portal.") + playsound(src, 'sound/magic/cult_spell.ogg', 100, TRUE) + qdel(R) + qdel(src) + +/obj/effect/portal/cult + name = "eldritch portal" + desc = "An evil portal made by dark magics. Suprisingly stable." + icon_state = "portal1" + failchance = 0 + precision = FALSE + var/obj/effect/cult_portal_exit/exit = null + +/obj/effect/portal/cult/Initialize(mapload, target, creator, lifespan) + . = ..() + if(target) + exit = new /obj/effect/cult_portal_exit(target) + +/obj/effect/portal/cult/attackby(obj/I, mob/user, params) + if(istype(I, /obj/item/melee/cultblade/dagger) && iscultist(user) || istype(I, /obj/item/nullrod) && user.mind.isholy) + to_chat(user, "You close the portal with your [I].") + playsound(src, 'sound/magic/magic_missile.ogg', 100, TRUE) + qdel(src) + return + return ..() + +/obj/effect/portal/cult/Destroy() + QDEL_NULL(exit) + return ..() + +/obj/effect/cult_portal_exit + name = "eldritch rift" + desc = "An exit point for some cult portal. Be on guard, more things may come out of it" + icon = 'icons/obj/biomass.dmi' + icon_state = "rift" + color = "red" diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 21c894ea4f6..a0f8cf0e1ae 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -321,7 +321,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( selection_title = "Archives" creation_message = "You invoke the dark magic of the tomes creating a %ITEM%!" choosable_items = list("Shuttle Curse" = /obj/item/shuttle_curse, "Zealot's Blindfold" = /obj/item/clothing/glasses/hud/health/night/cultblind, - "Veil Shifter" = /obj/item/cult_shift) //Add void torch to veil shifter spawn + "Veil Shifter" = /obj/item/cult_shift, "Reality sunderer" = /obj/item/portal_amulet) //Add void torch to veil shifter spawn /obj/structure/cult/functional/archives/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 2e5b492684b..cfa7c31b3ed 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -376,7 +376,7 @@ GLOBAL_LIST_INIT(cult_recipes, list ( \ new /datum/stack_recipe/cult("runed girder (used to make cult walls)", /obj/structure/girder/cult, 1, time = 10, one_per_turf = TRUE, on_floor = TRUE, no_cult_structure = TRUE), \ new /datum/stack_recipe/cult("pylon (heals nearby cultists)", /obj/structure/cult/functional/pylon, 4, time = 40, one_per_turf = TRUE, on_floor = TRUE, no_cult_structure = TRUE), \ new /datum/stack_recipe/cult("forge (crafts shielded robes, flagellant's robes, and mirror shields)", /obj/structure/cult/functional/forge, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE, no_cult_structure = TRUE), \ - new /datum/stack_recipe/cult("archives (crafts zealot's blindfolds, shuttle curse orbs, and veil shifters)", /obj/structure/cult/functional/archives, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE, no_cult_structure = TRUE), \ + new /datum/stack_recipe/cult("archives (crafts zealot's blindfolds, shuttle curse orbs, veil shifters, and reality sunderers)", /obj/structure/cult/functional/archives, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE, no_cult_structure = TRUE), \ new /datum/stack_recipe/cult("altar (crafts eldritch whetstones, construct shells, and flasks of unholy water)", /obj/structure/cult/functional/altar, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE, no_cult_structure = TRUE), )) diff --git a/icons/obj/cult.dmi b/icons/obj/cult.dmi index 3990a894f33..8a3a5b055c5 100644 Binary files a/icons/obj/cult.dmi and b/icons/obj/cult.dmi differ