From fc711229144914d127500ee6126bbb5cea292fb1 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Thu, 29 Dec 2016 11:39:18 -0500 Subject: [PATCH] fixes Barring any errent merge conflict fixing fuckery. --- _maps/map_files/shuttles/emergency_narnar.dmm | 19 +- code/game/gamemodes/cult/ritual.dm | 920 +++----- code/game/gamemodes/cult/runes.dm | 2025 ++++++++--------- code/game/machinery/doors/airlock.dm | 5 +- code/game/objects/effects/overlays.dm | 60 +- .../living/carbon/human/species/species.dm | 9 - 6 files changed, 1325 insertions(+), 1713 deletions(-) diff --git a/_maps/map_files/shuttles/emergency_narnar.dmm b/_maps/map_files/shuttles/emergency_narnar.dmm index 040961227cc..537d0f5ba82 100644 --- a/_maps/map_files/shuttles/emergency_narnar.dmm +++ b/_maps/map_files/shuttles/emergency_narnar.dmm @@ -34,18 +34,18 @@ "aH" = (/obj/item/candle/eternal,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aI" = (/obj/effect/decal/cleanable/blood/writing,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aJ" = (/obj/structure/closet/walllocker/emerglocker{pixel_x = 28},/obj/machinery/light/spot{tag = "icon-tube1 (EAST)"; icon_state = "tube1"; dir = 4},/turf/simulated/floor/engine/cult,/area/shuttle/escape) -"aK" = (/mob/living/simple_animal/construct/harvester,/turf/simulated/floor/engine/cult,/area/shuttle/escape) -"aL" = (/mob/living/simple_animal/construct/builder,/turf/simulated/floor/engine/cult,/area/shuttle/escape) +"aK" = (/obj/effect/rune,/mob/living/simple_animal/hostile/construct/wraith,/turf/simulated/floor/engine/cult,/area/shuttle/escape) +"aL" = (/mob/living/simple_animal/hostile/construct/armoured,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aM" = (/obj/effect/decal/cleanable/blood/innards,/obj/effect/decal/cleanable/blood/gibs/body,/turf/simulated/floor/engine/cult,/area/shuttle/escape) -"aN" = (/mob/living/simple_animal/construct/wraith,/turf/simulated/floor/engine/cult,/area/shuttle/escape) -"aO" = (/mob/living/simple_animal/construct/armoured,/turf/simulated/floor/engine/cult,/area/shuttle/escape) +"aN" = (/mob/living/simple_animal/construct/wraith,/mob/living/simple_animal/hostile/construct/builder,/turf/simulated/floor/engine/cult,/area/shuttle/escape) +"aO" = (/mob/living/simple_animal/construct/builder,/mob/living/simple_animal/hostile/construct/behemoth,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aP" = (/obj/item/weapon/storage/firstaid/fire,/obj/item/weapon/extinguisher,/obj/item/weapon/crowbar,/obj/machinery/light/spot{tag = "icon-tube1 (WEST)"; icon_state = "tube1"; dir = 8},/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aQ" = (/obj/effect/decal/cleanable/blood/writing,/obj/effect/decal/cleanable/blood/writing,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aR" = (/turf/simulated/shuttle/wall{icon_state = "swall3"; dir = 2},/obj/effect/spawner/window/reinforced{color = "red"},/turf/simulated/wall/cult,/area/shuttle/escape) "aS" = (/obj/machinery/status_display{pixel_y = -30},/obj/machinery/light/spot,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aT" = (/obj/machinery/door/airlock/cult/friendly,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape) "aU" = (/obj/effect/spawner/window/reinforced{color = "red"},/turf/simulated/shuttle/wall{tag = "icon-swall14"; icon_state = "swall14"; dir = 2},/area/shuttle/escape) -"aV" = (/obj/machinery/door/airlock/cult/friendly,/turf/simulated/shuttle/floor4,/area/shuttle/escape) +"aV" = (/mob/living/simple_animal/construct/armoured,/mob/living/simple_animal/hostile/construct/harvester,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aW" = (/obj/structure/dresser,/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aX" = (/obj/structure/table,/obj/item/weapon/storage/firstaid/o2{layer = 2.8; pixel_x = 4; pixel_y = 6},/obj/item/weapon/storage/firstaid/regular{pixel_x = 2; pixel_y = 6},/obj/item/weapon/storage/firstaid/regular{pixel_x = -2; pixel_y = 4},/obj/item/bodybag/cryobag{pixel_x = 5},/turf/simulated/floor/engine/cult,/area/shuttle/escape) "aY" = (/obj/effect/decal/cleanable/blood/tracks/footprints,/turf/simulated/floor/engine/cult,/area/shuttle/escape) @@ -73,17 +73,18 @@ abasatauacavajavajajawajab abaxajajayajajajajajazaAab arajaBaCacajajajajajajajaD ababababacajajajajajajajab -aEajajajajajaFajajajajajab +aEajajajajajaKajajajajajab abaGajajaFaHaIaHaFajajaJab -acajajajaHaKaIaLaHajajajac +acajajajaHaLaIaOaHajajajac acajajaFaIaIaMaIaIaFajajac -acajajajaHaNaIaOaHajajajac +acajajajaHaNaIaVaHajajajac abaPajajaFaHaQaHaFajajajaR arajajajajaSaFaSajajajajac -abababaTababacaUacaVacacab +abababaTababacaUacaracacab arajajajaWabaaabaXaYaYaZab baajajajbbabaaabbcbcbdaZab abajajbebfabaaabbgbcbdaZab ababbhbhbhabaaabbibibiabab aaabbjbjbjabaaabbjbjbjabaa "} + diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 8e288c39a70..4bf743ef3d7 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -1,698 +1,300 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - -var/cultwords = list() -var/rune_to_english = list() -var/runedec = 0 -var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", "self", "see", "other", "hide") - -/client/proc/check_words() // -- Urist - set category = "Admin" - set name = "Check Rune Words" - set desc = "Check the rune-word meaning" - - if(!check_rights(R_ADMIN)) - return - - if(!cultwords["travel"]) - runerandom() - for(var/word in engwords) - to_chat(usr, "[cultwords[word]] is [word]") - - log_and_message_admins("checked the rune words.") - feedback_add_details("admin_verb","CRW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/proc/runerandom() //randomizes word meaning - var/list/runewords=list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri") ///"orkan" and "allaq" removed. - for(var/word in engwords) - var/runeword = pick(runewords) - cultwords[word] = runeword - rune_to_english[runeword] = word - runewords-=cultwords[word] - - -/obj/effect/rune - desc = "" - anchored = 1 - icon = 'icons/obj/rune.dmi' - icon_state = "1" - var/visibility = 0 - var/view_range = 7 - unacidable = 1 - layer = TURF_LAYER - - var/word1 - var/word2 - var/word3 -// Places these combos are mentioned: this file - twice in the rune code, once in imbued tome, once in tome's HTML runes.dm - in the imbue rune code. If you change a combination - dont forget to change it everywhere. - -// travel self [word] - Teleport to random [rune with word destination matching] -// travel other [word] - Portal to rune with word destination matching - kinda doesnt work. At least the icon. No idea why. -// see blood Hell - Create a new tome -// join blood self - Incorporate person over the rune into the group -// Hell join self - Summon TERROR -// destroy see technology - EMP rune -// travel blood self - Drain blood -// see Hell join - See invisible -// blood join Hell - Raise dead - -// hide see blood - Hide nearby runes -// blood see hide - Reveal nearby runes - The point of this rune is that its reversed obscure rune. So you always know the words to reveal the rune once oyu have obscured it. - -// Hell travel self - Leave your body and ghost around -// blood see travel - Manifest a ghost into a mortal body -// Hell tech join - Imbue a rune into a talisman -// Hell blood join - Sacrifice rune -// destroy travel self - Wall rune -// join other self - Summon cultist rune -// travel technology other - Freeing rune // other blood travel was freedom join other - -// hide other see - Deafening rune // was destroy see hear -// destroy see other - Blinding rune -// destroy see blood - BLOOD BOIL - -// self other technology - Communication rune //was other hear blood -// join hide technology - stun rune. Rune color: bright pink. - -/obj/effect/rune/New() - ..() - var/image/blood = image(loc = src) - blood.override = 1 - for(var/mob/living/silicon/ai/AI in player_list) - AI.client.images += blood - cult_viewpoints += src - -/obj/effect/rune/Destroy() - cult_viewpoints -= src - return ..() - -/obj/effect/rune/examine(mob/user) - ..(user) - if(!iscultist(user) && !isSpirit(user)) - to_chat(user, "A strange collection of symbols drawn in blood.") - return - if(!desc) - to_chat(user, "A spell circle drawn in blood. It reads: [word1] [word2] [word3].") - else - to_chat(user, "Explosive Runes inscription in blood. It reads: [desc].") - - -/obj/effect/rune/attackby(I as obj, user as mob, params) - if(istype(I, /obj/item/weapon/tome) && iscultist(user)) - to_chat(user, "You retrace your steps, carefully undoing the lines of the rune.") - qdel(src) - return - else if(istype(I, /obj/item/weapon/nullrod)) - to_chat(user, "\blue You disrupt the vile magic with the deadening field of \the [I]!") - qdel(src) - return - return - -// This is for the seer rune, so you don't get permanent ghost sight -/obj/effect/rune/Uncrossed(atom/movable/O) - if(isliving(O)) - var/mob/living/L = O - L.update_sight() - -/obj/effect/rune/proc/get_word_string() - if(word1 == cultwords["travel"]) - if(word2 == cultwords["self"]) - return "teleport" - if(word2 == cultwords["other"]) - return "itemport" - return "[rune_to_english[word1]]_[rune_to_english[word2]]_[rune_to_english[word3]]" - - -/obj/effect/rune - var/list/effect_dictionary = list( "teleport"=/obj/effect/rune/proc/teleportRune, - "itemport"=/obj/effect/rune/proc/itemportRune, - "see_blood_hell"=/obj/effect/rune/proc/tomesummon, - "hell_destroy_other"=/obj/effect/rune/proc/armor, - "join_blood_self"=/obj/effect/rune/proc/convert, - "hell_join_self"=/obj/effect/rune/proc/tearreality, - "destroy_see_technology"=/obj/effect/rune/proc/empRune, - "travel_blood_self"=/obj/effect/rune/proc/drain, - "see_hell_join"=/obj/effect/rune/proc/seer, - "blood_join_hell"=/obj/effect/rune/proc/raise, - "hide_see_blood"=/obj/effect/rune/proc/obscureRune, - "hell_travel_self"=/obj/effect/rune/proc/ajourney, - "blood_see_travel"=/obj/effect/rune/proc/manifest, - "hell_technology_join"=/obj/effect/rune/proc/talisman, - "hell_blood_join"=/obj/effect/rune/proc/sacrifice, - "blood_see_hide"=/obj/effect/rune/proc/revealrunesrune, - "destroy_travel_self"=/obj/effect/rune/proc/wall, - "travel_technology_other"=/obj/effect/rune/proc/freedom, - "join_other_self"=/obj/effect/rune/proc/cultsummon, - "hide_other_see"=/obj/effect/rune/proc/deafen, - "destroy_see_other"=/obj/effect/rune/proc/blind, - "destroy_see_blood"=/obj/effect/rune/proc/bloodboil, - "self_other_technology"=/obj/effect/rune/proc/communicate, - "join_hide_technology"=/obj/effect/rune/proc/runestun ) - -/obj/effect/rune/attack_hand(mob/living/user as mob) - if(!iscultist(user)) - to_chat(user, "You can't mouth the arcane scratchings without fumbling over them.") - return - if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle)) - to_chat(user, "You are unable to speak the words of the rune.") - return - if(user.silent) // checking if we've been muted somehow - to_chat(user, "You are unable to speak at all! You cannot say the words of the rune.") - if(!word1 || !word2 || !word3 || prob(user.getBrainLoss())) - return fizzle() - - var/word_string = get_word_string() - if(word_string in effect_dictionary) - cult_log("of type [effect_dictionary[word_string]] activated by [key_name_admin(user)].") - return call(src,effect_dictionary[word_string])() - return fizzle() - +#define CULT_ELDERGOD "eldergod" +#define CULT_SLAUGHTER "slaughter" /obj/effect/rune/proc/fizzle() if(istype(src,/obj/effect/rune)) usr.say(pick("Hakkrutju gopoenjim.", "Nherasai pivroiashan.", "Firjji prhiv mazenhor.", "Tanah eh wakantahe.", "Obliyae na oraie.", "Miyf hon vnor'c.", "Wakabai hij fen juswix.")) else usr.whisper(pick("Hakkrutju gopoenjim.", "Nherasai pivroiashan.", "Firjji prhiv mazenhor.", "Tanah eh wakantahe.", "Obliyae na oraie.", "Miyf hon vnor'c.", "Wakabai hij fen juswix.")) - for(var/mob/V in viewers(src)) + for (var/mob/V in viewers(src)) V.show_message("\red The markings pulse with a small burst of light, then fall dark.", 3, "\red You hear a faint fizzle.", 2) return /obj/effect/rune/proc/check_icon() - icon = get_uristrune_cult(word1, word2, word3) + icon = get_rune_cult(invocation) /obj/item/weapon/tome name = "arcane tome" + desc = "An old, dusty tome with frayed edges and a sinister-looking cover." icon_state ="tome" - throw_speed = 1 + throw_speed = 2 throw_range = 5 w_class = 2 - var/notedat = "" - var/tomedat = "" - var/list/words = list("ire" = "ire", "ego" = "ego", "nahlizet" = "nahlizet", "certum" = "certum", "veri" = "veri", "jatkaa" = "jatkaa", "balaq" = "balaq", "mgar" = "mgar", "karazet" = "karazet", "geeri" = "geeri") + var/scribereduct = 0 + var/canbypass = 0 //ADMINBUS - tomedat = {" - - - - -

The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood.

+/obj/item/weapon/tome/accursed + name = "accursed tome" + desc = "An arcane tome still empowered with a shadow of its former consecration." + scribereduct = 30 //faster because it's made by corrupting a bible - The book is written in an unknown dialect, there are lots of pictures of various complex geometric shapes. You find some notes in english that give you basic understanding of the many runes written in the book. The notes give you an understanding what the words for the runes should be. However, you do not know how to write all these words in this dialect.
- Below is the summary of the runes.
+/obj/item/weapon/tome/imbued //Admin-only tome, allows instant drawing of runes + name = "imbued arcane tome" + desc = "An arcane tome granted by the Geometer itself." + scribereduct = 50 + canbypass = 1 -

Contents

-

- Teleport self: Travel Self (word)
- Teleport other: Travel Other (word)
- Summon new tome: See Blood Hell
- Convert a person: Join Blood Self
- Summon Nar-Sie: Hell Join Self
- Disable technology: Destroy See Technology
- Drain blood: Travel Blood Self
- Raise dead: Blood Join Hell
- Hide runes: Hide See Blood
- Reveal hidden runes: Blood See Hide
- Leave your body: Hell travel self
- Ghost Manifest: Blood See Travel
- Imbue a talisman: Hell Technology Join
- Sacrifice: Hell Blood Join
- Create a wall: Destroy Travel Self
- Summon cultist: Join Other Self
- Free a cultist: Travel technology other
- Deafen: Hide Other See
- Blind: Destroy See Other
- Blood Boil: Destroy See Blood
- Communicate: Self Other Technology
- Stun: Join Hide Technology
- Summon Cultist Armor: Hell Destroy Other
- See Invisible: See Hell Join
-

-

Rune Descriptions

-

Teleport self

- Teleport rune is a special rune, as it only needs two words, with the third word being destination. Basically, when you have two runes with the same destination, invoking one will teleport you to the other one. If there are more than 2 runes, you will be teleported to a random one. Runes with different third words will create separate networks. You can imbue this rune into a talisman, giving you a great escape mechanism.
-

Teleport other

- Teleport other allows for teleportation for any movable object to another rune with the same third word. You need 3 cultists chanting the invocation for this rune to work.
-

Summon new tome

- Invoking this rune summons a new arcane tome. -

Convert a person

- This rune opens target's mind to the realm of Nar-Sie, which usually results in this person joining the cult. However, some people (mostly the ones who posess high authority) have strong enough will to stay true to their old ideals.
-

Summon Nar-Sie

- The ultimate rune. It summons the Avatar of Nar-Sie himself, tearing a huge hole in reality and consuming everything around it. Summoning it is the final goal of any cult.
-

Disable Technology

- Invoking this rune creates a strong electromagnetic pulse in a small radius, making it basically analogic to an EMP grenade. You can imbue this rune into a talisman, making it a decent defensive item.
-

Drain Blood

- This rune instantly heals you of some brute damage at the expense of a person placed on top of the rune. Whenever you invoke a drain rune, ALL drain runes on the station are activated, draining blood from anyone located on top of those runes. This includes yourself, though the blood you drain from yourself just comes back to you. This might help you identify this rune when studying words. One drain gives up to 25HP per each victim, but you can repeat it if you need more. Draining only works on living people, so you might need to recharge your "Battery" once its empty. Drinking too much blood at once might cause blood hunger.
-

Raise Dead

- This rune allows for the resurrection of any dead person. You will need a dead human body and a living human sacrifice. Make 2 raise dead runes. Put a living, awake human on top of one, and a dead body on the other one. When you invoke the rune, the life force of the living human will be transferred into the dead body, allowing a ghost standing on top of the dead body to enter it, instantly and fully healing it. Use other runes to ensure there is a ghost ready to be resurrected.
-

Hide runes

- This rune makes all nearby runes completely invisible. They are still there and will work if activated somehow, but you cannot invoke them directly if you do not see them.
-

Reveal runes

- This rune is made to reverse the process of hiding a rune. It reveals all hidden runes in a rather large area around it. -

Leave your body

- This rune gently rips your soul out of your body, leaving it intact. You can observe the surroundings as a ghost as well as communicate with other ghosts. Your body takes damage while you are there, so ensure your journey is not too long, or you might never come back.
-

Manifest a ghost

- Unlike the Raise Dead rune, this rune does not require any special preparations or vessels. Instead of using full lifeforce of a sacrifice, it will drain YOUR lifeforce. Stand on the rune and invoke it. If theres a ghost standing over the rune, it will materialise, and will live as long as you dont move off the rune or die. You can put a paper with a name on the rune to make the new body look like that person.
-

Imbue a talisman

- This rune allows you to imbue the magic of some runes into paper talismans. Create an imbue rune, then an appropriate rune beside it. Put an empty piece of paper on the imbue rune and invoke it. You will now have a one-use talisman with the power of the target rune. Using a talisman drains some health, so be careful with it. You can imbue a talisman with power of the following runes: summon tome, reveal, conceal, teleport, tisable technology, communicate, deafen, blind and stun.
-

Sacrifice

- Sacrifice rune allows you to sacrifice a living thing or a body to the Geometer of Blood. Monkeys and dead humans are the most basic sacrifices, they might or might not be enough to gain His favor. A living human is what a real sacrifice should be, however, you will need 3 people chanting the invocation to sacrifice a living person. -

Create a wall

- Invoking this rune solidifies the air above it, creating an an invisible wall. To remove the wall, simply invoke the rune again. -

Summon cultist

- This rune allows you to summon a fellow cultist to your location. The target cultist must be unhandcuffed ant not buckled to anything. You also need to have 3 people chanting at the rune to succesfully invoke it. Invoking it takes heavy strain on the bodies of all chanting cultists.
-

Free a cultist

- This rune unhandcuffs and unbuckles any cultist of your choice, no matter where he is. You need to have 3 people invoking the rune for it to work. Invoking it takes heavy strain on the bodies of all chanting cultists.
-

Deafen

- This rune temporarily deafens all non-cultists around you.
-

Blind

- This rune temporarily blinds all non-cultists around you. Very robust. Use together with the deafen rune to leave your enemies completely helpless.
-

Blood boil

- This rune boils the blood all non-cultists in visible range. The damage is enough to instantly critically hurt any person. You need 3 cultists invoking the rune for it to work. This rune is unreliable and may cause unpredicted effect when invoked. It also drains significant amount of your health when succesfully invoked.
-

Communicate

- Invoking this rune allows you to relay a message to all cultists on the station and nearby space objects. -

Stun

- Unlike other runes, this ons is supposed to be used in talisman form. When invoked directly, it simply releases some dark energy, briefly stunning everyone around. When imbued into a talisman, you can force all of its energy into one person, stunning him so hard he cant even speak. However, effect wears off rather fast.
-

Equip Armor

- When this rune is invoked, either from a rune or a talisman, it will equip the user with the armor of the followers of Nar-Sie. To use this rune to its fullest extent, make sure you are not wearing any form of headgear, armor, gloves or shoes, and make sure you are not holding anything in your hands.
-

See Invisible

- When invoked when standing on it, this rune allows the user to see the the world beyond as long as he does not move.
- - - "} +/obj/item/weapon/tome/New() + icon_state = ticker.mode.cultdat.tome_icon + ..() +/obj/item/weapon/tome/examine(mob/user) + ..() + if(iscultist(user) || user.stat == DEAD) + to_chat(user, "The scriptures of [ticker.mode.cultdat.entity_title3]. Allows the scribing of runes and access to the knowledge archives of the cult of [ticker.mode.cultdat.entity_name].") + to_chat(user, "Striking another cultist with it will purge holy water from them.") + to_chat(user, "Striking a noncultist, however, will sear their flesh.") - Topic(href,href_list[]) - if(src.loc == usr) - var/number = text2num(href_list["number"]) - if(usr.stat|| usr.restrained()) - return - switch(href_list["action"]) - if("clear") - words[words[number]] = words[number] - if("change") - words[words[number]] = input("Enter the translation for [words[number]]", "Word notes") in engwords - for(var/w in words) - if((words[w] == words[words[number]]) && (w != words[number])) - words[w] = w - notedat = {" -
Word translation notes
- [words[1]] is [words[words[1]]] Clear
- [words[2]] is [words[words[2]]] Clear
- [words[3]] is [words[words[3]]] Clear
- [words[4]] is [words[words[4]]] Clear
- [words[5]] is [words[words[5]]] Clear
- [words[6]] is [words[words[6]]] Clear
- [words[7]] is [words[words[7]]] Clear
- [words[8]] is [words[words[8]]] Clear
- [words[9]] is [words[words[9]]] Clear
- [words[10]] is [words[words[10]]] Clear
- "} - usr << browse("[notedat]", "window=notes") -// call(/obj/item/weapon/tome/proc/edit_notes)() - else - usr << browse(null, "window=notes") +/obj/item/weapon/tome/attack(mob/living/M, mob/living/user) + if(!istype(M)) + return + if(!iscultist(user)) + return ..() + if(iscultist(M)) + if(M.reagents && M.reagents.has_reagent("holywater")) //allows cultists to be rescued from the clutches of ordained religion + to_chat(user, "You remove the taint from [M].") + var/holy2unholy = M.reagents.get_reagent_amount("holywater") + M.reagents.del_reagent("holywater") + M.reagents.add_reagent("unholywater",holy2unholy) + add_logs(user, M, "smacked", src, " removing the holy water from them") + return + M.take_organ_damage(0, 15) //Used to be a random between 5 and 20 + playsound(M, 'sound/weapons/sear.ogg', 50, 1) + M.visible_message("[user] strikes [M] with the arcane tome!", \ + "[user] strikes you with the tome, searing your flesh!") + flick("tome_attack", src) + user.do_attack_animation(M) + add_logs(user, M, "smacked", src) + +/obj/item/weapon/tome/attack_self(mob/user) + if(!iscultist(user)) + to_chat(user, "[src] seems full of unintelligible shapes, scribbles, and notes. Is this some sort of joke?") + return + open_tome(user) + +/obj/item/weapon/tome/proc/open_tome(mob/user) + var/choice = alert(user,"You open the tome...",,"Scribe Rune","More Information","Cancel") + switch(choice) + if("More Information") + read_tome(user) + if("Scribe Rune") + scribe_rune(user) + if("Cancel") return +/obj/item/weapon/tome/proc/read_tome(mob/user) + var/text = list() + text = jointext(text, "
Archives of [ticker.mode.cultdat.entity_title1]



") + text = jointext(text, "A rune's name and effects can be revealed by examining the rune.<

") -// proc/edit_notes() FUCK IT. Cant get it to work properly. - K0000 -// to_chat(world, "its been called! [usr]") -// notedat = {" -//
Word translation notes
-// [words[1]] is [words[words[1]]] Clear
-// [words[2]] is [words[words[2]]] Clear
-// [words[3]] is [words[words[3]]] Clear
-// [words[4]] is [words[words[4]]] Clear
-// [words[5]] is [words[words[5]]] Clear
-// [words[6]] is [words[words[6]]] Clear
-// [words[7]] is [words[words[7]]] Clear
-// [words[8]] is [words[words[8]]] Clear
-// [words[9]] is [words[words[9]]] Clear
-// [words[10]] is [words[words[10]]] Clear
-// "} -// to_chat(usr, "whatev") -// usr << browse(null, "window=tank") + text = jointext(text, "Rite of Binding
This rune is one of the most important runes the cult has, being the only way to create new talismans. A blank sheet of paper must be on top of the rune. After \ + invoking it and choosing which talisman you desire, the paper will be converted, after some delay into a talisman.

") - attack(mob/living/M as mob, mob/living/user as mob) + text = jointext(text, "Teleport
This rune is unique in that it requires a keyword before the scribing can begin. When invoked, it will find any other Teleport runes; \ + If any are found, the user can choose which rune to send to. Upon activation, the rune teleports everything above it to the selected rune.

") - M.attack_log += text("\[[time_stamp()]\] Has had the [name] used on him by [key_name(user)]") - user.attack_log += text("\[[time_stamp()]\] Used [name] on [key_name(M)]") - msg_admin_attack("[key_name_admin(user)] used [name] on [key_name_admin(M)]") - if(!iscarbon(M)) - M.LAssailant = null - else - M.LAssailant = user - if(istype(M,/mob/dead)) - M.invisibility = 0 - user.visible_message( \ - "\red [user] drags the ghost to our plan of reality!", \ - "\red You drag the ghost to our plan of reality!" \ - ) - return - if(!istype(M)) - return - if(!iscultist(user)) - return ..() - if(iscultist(M)) - if(M.reagents && M.reagents.has_reagent("holywater")) //allows cultists to be rescued from the clutches of ordained religion - to_chat(user, "You remove the taint from [M].") - var/holy2unholy = M.reagents.get_reagent_amount("holywater") - M.reagents.del_reagent("holywater") - M.reagents.add_reagent("unholywater",holy2unholy) - add_logs(user, M, "smacked", src, " removing the holy water from them") - return - M.take_organ_damage(0,rand(5,20)) //really lucky - 5 hits for a crit - for(var/mob/O in viewers(M, null)) - O.show_message(text("[] beats [] with the arcane tome!", user, M), 1) - to_chat(M, "\red You feel searing heat inside!") + text = jointext(text, "Rite of Enlightenment
This rune is critical to the success of the cult. It will allow you to convert normal crew members into cultists. \ + To do this, simply place the crew member upon the rune and invoke it. This rune requires two invokers to use. If the target to be converted is loyalty-implanted or a certain assignment, they will \ + be unable to be converted. People [ticker.mode.cultdat.entity_title3] wishes sacrificed will also be ineligible for conversion, and anyone with a shielding presence like the null rod will not be converted.
\ + Successful conversions will produce a tome for the new cultist.

") + text = jointext(text, "Rite of Tribute
This rune is necessary to achieve your goals. Simply place any dead creature upon the rune and invoke it (this will not \ + target cultists!). If this creature has a mind, a soulstone will be created and the creature's soul transported to it. Sacrificing the dead can be done alone, but sacrificing living crew or your cult's target will require 3 cultists. \ + Soulstones used on construct shells will move that soul into a powerful construct of your choice.

") - attack_self(mob/living/user as mob) - usr = user - if(!usr.canmove || usr.stat || usr.restrained()) - return + text = jointext(text, "Rite of Resurrection
This rune requires two corpses. To perform the ritual, place the corpse you wish to revive onto \ + the rune and the offering body adjacent to it. When the rune is invoked, the body to be sacrificed will turn to dust, the life force flowing into the revival target. Assuming the target is not moved \ + within a few seconds, they will be brought back to life, healed of all ailments.

") - if(!cultwords["travel"]) - runerandom() - if(iscultist(user)) - var/C = 0 - for(var/obj/effect/rune/N in world) - C++ - if(!istype(user.loc,/turf)) - to_chat(user, "\red You do not have enough space to write a proper rune.") - return + text = jointext(text, "Rite of Disruption
Robotic lifeforms have time and time again been the downfall of fledgling cults. This rune may allow you to gain the upper \ + hand against these pests. By using the rune, a large electromagnetic pulse will be emitted from the rune's location. The size of the EMP will grow significantly for each additional adjacent cultist when the \ + rune is activated.

") + text = jointext(text, "Astral Communion
This rune is perhaps the most ingenious rune that is usable by a single person. Upon invoking the rune, the \ + user's spirit will be ripped from their body. In this state, the user's physical body will be locked in place to the rune itself - any attempts to move it will result in the rune pulling it back. \ + The body will also take constant damage while in this form, and may even die. The user's spirit will contain their consciousness, and will allow them to freely wander the station as a ghost. This may \ + also be used to commune with the dead.

") + text = jointext(text, "Rite of the Corporeal Shield
While simple, this rune serves an important purpose in defense and hindering passage. When invoked, the \ + rune will draw a small amount of life force from the user and make the space above the rune completely dense, rendering it impassable to all but the most complex means. The rune may be invoked again to \ + undo this effect and allow passage again.

") + text = jointext(text,"Rite of Joined Souls
This rune allows the cult to free other cultists with ease. When invoked, it will allow the user to summon a single cultist to the rune from \ + any location. It requires two invokers, and will damage each invoker slightly.

") - if(C>=26+runedec+ticker.mode.cult.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist - alert("The cloth of reality can't take that much of a strain. Remove some runes first!") + text = jointext(text, "Blood Boil
When invoked, this rune will do a massive amount of damage to all non-cultist viewers, but it will also emit a small explosion upon invocation. \ + It requires three invokers.

") + + text = jointext(text, "Leeching
When invoked, this rune will transfer lifeforce from the victim to the invoker.

") + + text = jointext(text, "Rite of Spectral Manifestation
This rune allows you to summon spirits as humanoid fighters. When invoked, a spirit above the rune will be brought to life as a human, wearing nothing, that seeks only to serve you and [ticker.mode.cultdat.entity_title3]. \ + However, the spirit's link to reality is fragile - you must remain on top of the rune, and you will slowly take damage. Upon stepping off the rune, all summoned spirits will dissipate, dropping their items to the ground. You may manifest \ + multiple spirits with one rune, but you will rapidly take damage in doing so.

") + + text = jointext(text, "Ritual of Dimensional Rending
This rune is necessary to achieve your goals. On attempting to scribe it, it will produce shields around you and alert everyone you are attempting to scribe it; it takes a very long time to scribe, \ + and does massive damage to the one attempting to scribe it.
Invoking it requires 9 invokers and the sacrifice of a specific crewmember, and once invoked, will summon [ticker.mode.cultdat.entity_title3], [ticker.mode.cultdat.entity_name]. \ + This will complete your objectives.


") + + text = jointext(text, "Talisman of Teleportation
The talisman form of the Teleport rune will transport the invoker to a selected Teleport rune once.

") + + text = jointext(text, "Talisman of Fabrication
This talisman is the main way of creating construct shells. To use it, one must strike 30 sheets of metal with the talisman. The sheets will then be twisted into a construct shell, ready to recieve a soul to occupy it.

") + + text = jointext(text, "Talisman of Tome Summoning
This talisman will produce a single tome at your feet.

") + + text = jointext(text, "Talisman of Veiling/Revealing
This talisman will hide runes on its first use, and on the second, will reveal runes.

") + + text = jointext(text, "Talisman of Disguising
This talisman will permanently disguise all nearby runes as crayon runes.

") + + text = jointext(text, "Talisman of Electromagnetic Pulse
This talisman will EMP anything else nearby. It disappears after one use.

") + + text = jointext(text, "Talisman of Stunning
Attacking a target will knock them down for a long duration in addition to inhibiting their speech. \ + Robotic lifeforms will suffer the effects of a heavy electromagnetic pulse instead.

") + + text = jointext(text, "Talisman of Armaments
The Talisman of Arming will equip the user with armored robes, a backpack, an eldritch longsword, an empowered bola, and a pair of boots. Any items that cannot \ + be equipped will not be summoned. Attacking a fellow cultist with it will instead equip them.

") + + text = jointext(text, "Talisman of Horrors
The Talisman of Horror must be applied directly to the victim, it will shatter your victim's mind with visions of the endtimes that may incapitate them.

") + + text = jointext(text, "Talisman of Shackling
The Talisman of Shackling must be applied directly to the victim, it has 4 uses and cuffs victims with magic shackles that disappear when removed.

") + + text = jointext(text, "In addition to these runes, the cult has a small selection of equipment and constructs.

") + + text = jointext(text, "Equipment:

") + + text = jointext(text, "Cult Blade
Cult blades are sharp weapons that, notably, cannot be used by noncultists. These blades are produced by the Talisman of Arming.

") + + text = jointext(text, "Cult Bola
Cult bolas are strong bolas, useful for snaring targets. These bolas are produced by the Talisman of Arming.

") + + text = jointext(text, "Cult Robes
Cult robes are heavily armored robes. These robes are produced by the Talisman of Arming.

") + + text = jointext(text, "Soulstone
A soulstone is a simple piece of magic, produced either via the starter talisman or by sacrificing humans. Using it on an unconscious or dead human, or on a Shade, will trap their soul in the stone, allowing its use in construct shells. \ +
The soul within can also be released as a Shade by using it in-hand.

") + + text = jointext(text, "Construct Shell
A construct shell is useless on its own, but placing a filled soulstone within it allows you to produce your choice of a Wraith, a Juggernaut, or an Artificer. \ +
Each construct has uses, detailed below in Constructs. Construct shells can be produced via the starter talisman or the Rite of Fabrication.

") + + text = jointext(text, "Constructs:

") + + text = jointext(text, "Shade
While technically not a construct, the Shade is produced when released from a soulstone. It is quite fragile and has weak melee attacks, but is fully healed when recaptured by a soulstone.

") + + text = jointext(text, "Wraith
The Wraith is a fast, lethal melee attacker which can jaunt through walls. However, it is only slightly more durable than a shade.

") + + text = jointext(text, "Juggernaut
The Juggernaut is a slow, but durable, melee attacker which can produce temporary forcewalls. It will also reflect most lethal energy weapons.

") + + text = jointext(text,"Artificer
The Artificer is a weak and fragile construct, able to heal other constructs, produce more soulstones and construct shells, \ + construct fortifying cult walls and flooring, and finally, it can release a few indiscriminate stunning missiles.

") + + text = jointext(text, "Harvester
If you see one, know that you have done all you can and your life is void.

") + + var/datum/browser/popup = new(user, "tome", "", 800, 600) + popup.set_content(text) + popup.open() + return 1 + +/obj/item/weapon/tome/proc/finale_runes_ok(mob/living/user,/obj/effect/rune/rune_to_scribe) + + if(ticker.mode.name == "cult") + if(!canbypass == 1)//not an admin-tome, check things + var/datum/game_mode/cult/cult_mode = ticker.mode + if(!cult_mode.narsie_condition_cleared) + to_chat(user, "There is still more to do before unleashing [cult_mode.cultdat.entity_name] power!") + return 0 + if(!cult_mode.eldergod) + to_chat(user, "\"I am already here. There is no need to try to summon me now.\"") + return 0 + if(cult_mode.demons_summoned) + to_chat(user, "\"We are already here. There is no need to try to summon us now.\"") + return 0 + if(!(CULT_ELDERGOD in cult_mode.objectives) || !(CULT_SLAUGHTER in cult_mode.objectives)) + to_chat(user, "[cult_mode.cultdat.entity_name]'s power does not wish to be unleashed!") + return 0 + var/confirm_final = alert(user, "This is the FINAL step to summon your dietys power, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar-Sie!", "No") + if(confirm_final == "No") + to_chat(user, "You decide to prepare further before scribing the rune.") return else - switch(alert("You open the tome",,"Read it","Scribe a rune", "Notes")) //Fuck the "Cancel" option. Rewrite the whole tome interface yourself if you want it to work better. And input() is just ugly. - K0000 - if("Cancel") - return - if("Read it") - if(usr.get_active_hand() != src) - return - user << browse("[tomedat]", "window=Arcane Tome") - return - if("Notes") - if(usr.get_active_hand() != src) - return - notedat = {" -
Word translation notes
- [words[1]] is [words[words[1]]] Clear
- [words[2]] is [words[words[2]]] Clear
- [words[3]] is [words[words[3]]] Clear
- [words[4]] is [words[words[4]]] Clear
- [words[5]] is [words[words[5]]] Clear
- [words[6]] is [words[words[6]]] Clear
- [words[7]] is [words[words[7]]] Clear
- [words[8]] is [words[words[8]]] Clear
- [words[9]] is [words[words[9]]] Clear
- [words[10]] is [words[words[10]]] Clear
- "} -// call(/obj/item/weapon/tome/proc/edit_notes)() - user << browse("[notedat]", "window=notes") - return - if(usr.get_active_hand() != src) - return + return 1 + else//the game mode is not cult..but we ARE a cultist...ALL ON THE ADMINBUS + if(!canbypass == 1)//not an admin-tome, check things + var/confirm_final = alert(user, "This is the FINAL step to summon your dietys power, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar-Sie!", "No") + if(confirm_final == "No") + to_chat(user, "You decide to prepare further before scribing the rune.") + return 0 + else + return 1 - var/list/dictionary = list ( - "convert" = list("join","blood","self"), - "wall" = list("destroy","travel","self"), - "blood boil" = list("destroy","see","blood"), - "blood drain" = list("travel","blood","self"), - "raise dead" = list("blood","join","hell"), - "summon narsie" = list("hell","join","self"), - "communicate" = list("self","other","technology"), - "emp" = list("destroy","see","technology"), - "manifest" = list("blood","see","travel"), - "summon tome" = list("see","blood","hell"), - "see invisible" = list("see","hell","join"), - "hide" = list("hide","see","blood"), - "reveal" = list("blood","see","hide"), - "astral journey" = list("hell","travel","self"), - "imbue" = list("hell","technology","join"), - "sacrifice" = list("hell","blood","join"), - "summon cultist" = list("join","other","self"), - "free cultist" = list("travel","technology","other"), - "deafen" = list("hide","other","see"), - "blind" = list("destroy","see","other"), - "stun" = list("join","hide","technology"), - "armor" = list("hell","destroy","other"), - "teleport" = list("travel","self"), - "teleport other" = list("travel","other") - ) - - var/list/english = list() - - var/list/scribewords = list("none") - - for(var/entry in words) - if(words[entry] != entry) - english += list(words[entry] = entry) - - for(var/entry in dictionary) - var/list/required = dictionary[entry] - if(length(english&required) == required.len) - scribewords += entry - - var/chosen_rune = null - - if(usr) - chosen_rune = input ("Choose a rune to scribe.") in scribewords - if(!chosen_rune) +/obj/item/weapon/tome/proc/scribe_rune(mob/living/user) + var/turf/runeturf = get_turf(user) + var/chosen_keyword + var/obj/effect/rune/rune_to_scribe + var/entered_rune_name + var/list/possible_runes = list() + var/list/shields = list() + if(locate(/obj/effect/rune) in runeturf) + to_chat(user, "There is already a rune here.") + return + for(var/T in subtypesof(/obj/effect/rune) - /obj/effect/rune/malformed) + var/obj/effect/rune/R = T + if(initial(R.cultist_name)) + possible_runes.Add(initial(R.cultist_name)) //This is to allow the menu to let cultists select runes by name rather than by object path. I don't know a better way to do this + if(!possible_runes.len) + return + entered_rune_name = input(user, "Choose a rite to scribe.", "Sigils of Power") as null|anything in possible_runes + if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + return + for(var/T in typesof(/obj/effect/rune)) + var/obj/effect/rune/R = T + if(initial(R.cultist_name) == entered_rune_name) + rune_to_scribe = R + if(initial(R.req_keyword)) + var/the_keyword = stripped_input(usr, "Please enter a keyword for the rune.", "Enter Keyword", "") + if(!the_keyword) return - if(chosen_rune == "none") - to_chat(user, "\red You decide against scribing a rune, perhaps you should take this time to study your notes.") - return - if(chosen_rune == "teleport") - dictionary[chosen_rune] += input ("Choose a destination word") in english - if(chosen_rune == "teleport other") - dictionary[chosen_rune] += input ("Choose a destination word") in english + chosen_keyword = the_keyword + break + if(!rune_to_scribe) + return + runeturf = get_turf(user) //we may have moved. adjust as needed... + if(locate(/obj/effect/rune) in runeturf) + to_chat(user, "There is already a rune here.") + return + if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + return + if(ispath(rune_to_scribe, /obj/effect/rune/narsie) || ispath(rune_to_scribe, /obj/effect/rune/slaughter))//may need to change this - Fethas + if(finale_runes_ok(user,rune_to_scribe)) + command_announcement.Announce("Figments from an eldritch god are being summoned somwhere on the station from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensionsal Affairs", 'sound/AI/spanomalies.ogg') + for(var/B in spiral_range_turfs(1, user, 1)) + var/turf/T = B + var/obj/machinery/shield/N = new(T) + N.name = "Rune-Scriber's Shield" + N.desc = "A potent shield summoned by cultists to protect them while they prepare the final ritual" + N.icon_state = "shield-cult" + N.health = 60 + shields |= N - if(usr.get_active_hand() != src) - return - - for(var/mob/V in viewers(src)) - V.show_message("\red [user] slices open a finger and begins to chant and paint symbols on the floor.", 3, "\red You hear chanting.", 2) - to_chat(user, "\red You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.") - user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage - if(do_after(user, 50, target = user)) - if(usr.get_active_hand() != src) - return - var/mob/living/carbon/human/H = user - var/obj/effect/rune/R = new /obj/effect/rune(user.loc) - to_chat(user, "\red You finish drawing the arcane markings of the Geometer.") - var/list/required = dictionary[chosen_rune] - R.word1 = english[required[1]] - R.word2 = english[required[2]] - R.word3 = english[required[3]] - R.check_icon() - R.blood_DNA = list() - R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type - R.add_hiddenprint(H) - return - else - to_chat(user, "The book seems full of illegible scribbles. Is this a joke?") - return - - attackby(obj/item/weapon/tome/T as obj, mob/living/user as mob, params) - if(istype(T, /obj/item/weapon/tome)) // sanity check to prevent a runtime error - switch(alert("Copy the runes from your tome?",,"Copy", "Cancel")) - if("cancel") - return - // var/list/nearby = viewers(1,src) //- Fuck this as well. No clue why this doesnt work. -K0000 - // if(T.loc != user) - // return - // for(var/mob/M in nearby) - // if(M == user) - for(var/entry in words) - words[entry] = T.words[entry] - to_chat(user, "You copy the translation notes from your tome.") - - - examine(mob/user) - if(!iscultist(user)) - to_chat(user, "An old, dusty tome with frayed edges and a sinister looking cover.") - else - to_chat(user, "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though.") - -/obj/item/weapon/tome/imbued //admin tome, spawns working runes without waiting - w_class = 2 - var/cultistsonly = 1 - attack_self(mob/user as mob) - if(src.cultistsonly && !iscultist(usr)) - return - if(!cultwords["travel"]) - runerandom() - if(user) - var/r - if(!istype(user.loc,/turf)) - to_chat(user, "\red You do not have enough space to write a proper rune.") - var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun") - r = input("Choose a rune to scribe", "Rune Scribing") in runes //not cancellable. - var/obj/effect/rune/R = new /obj/effect/rune - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - R.blood_DNA = list() - R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type - switch(r) - if("teleport") - var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") - var/beacon - if(usr) - beacon = input("Select the last rune", "Rune Scribing") in words - R.word1=cultwords["travel"] - R.word2=cultwords["self"] - R.word3=beacon - R.loc = user.loc - R.check_icon() - if("itemport") - var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") - var/beacon - if(usr) - beacon = input("Select the last rune", "Rune Scribing") in words - R.word1=cultwords["travel"] - R.word2=cultwords["other"] - R.word3=beacon - R.loc = user.loc - R.check_icon() - if("tome") - R.word1=cultwords["see"] - R.word2=cultwords["blood"] - R.word3=cultwords["hell"] - R.loc = user.loc - R.check_icon() - if("armor") - R.word1=cultwords["hell"] - R.word2=cultwords["destroy"] - R.word3=cultwords["other"] - R.loc = user.loc - R.check_icon() - if("convert") - R.word1=cultwords["join"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] - R.loc = user.loc - R.check_icon() - if("tear in reality") - R.word1=cultwords["hell"] - R.word2=cultwords["join"] - R.word3=cultwords["self"] - R.loc = user.loc - R.check_icon() - if("emp") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["technology"] - R.loc = user.loc - R.check_icon() - if("drain") - R.word1=cultwords["travel"] - R.word2=cultwords["blood"] - R.word3=cultwords["self"] - R.loc = user.loc - R.check_icon() - if("seer") - R.word1=cultwords["see"] - R.word2=cultwords["hell"] - R.word3=cultwords["join"] - R.loc = user.loc - R.check_icon() - if("raise") - R.word1=cultwords["blood"] - R.word2=cultwords["join"] - R.word3=cultwords["hell"] - R.loc = user.loc - R.check_icon() - if("obscure") - R.word1=cultwords["hide"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] - R.loc = user.loc - R.check_icon() - if("astral journey") - R.word1=cultwords["hell"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] - R.loc = user.loc - R.check_icon() - if("manifest") - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["travel"] - R.loc = user.loc - R.check_icon() - if("imbue talisman") - R.word1=cultwords["hell"] - R.word2=cultwords["technology"] - R.word3=cultwords["join"] - R.loc = user.loc - R.check_icon() - if("sacrifice") - R.word1=cultwords["hell"] - R.word2=cultwords["blood"] - R.word3=cultwords["join"] - R.loc = user.loc - R.check_icon() - if("reveal") - R.word1=cultwords["blood"] - R.word2=cultwords["see"] - R.word3=cultwords["hide"] - R.loc = user.loc - R.check_icon() - if("wall") - R.word1=cultwords["destroy"] - R.word2=cultwords["travel"] - R.word3=cultwords["self"] - R.loc = user.loc - R.check_icon() - if("freedom") - R.word1=cultwords["travel"] - R.word2=cultwords["technology"] - R.word3=cultwords["other"] - R.loc = user.loc - R.check_icon() - if("cultsummon") - R.word1=cultwords["join"] - R.word2=cultwords["other"] - R.word3=cultwords["self"] - R.loc = user.loc - R.check_icon() - if("deafen") - R.word1=cultwords["hide"] - R.word2=cultwords["other"] - R.word3=cultwords["see"] - R.loc = user.loc - R.check_icon() - if("blind") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["other"] - R.loc = user.loc - R.check_icon() - if("bloodboil") - R.word1=cultwords["destroy"] - R.word2=cultwords["see"] - R.word3=cultwords["blood"] - R.loc = user.loc - R.check_icon() - if("communicate") - R.word1=cultwords["self"] - R.word2=cultwords["other"] - R.word3=cultwords["technology"] - R.loc = user.loc - R.check_icon() - if("stun") - R.word1=cultwords["join"] - R.word2=cultwords["hide"] - R.word3=cultwords["technology"] - R.loc = user.loc - R.check_icon() + var/mob/living/carbon/human/H = user + var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot") + var/obj/item/organ/external/affecting = H.get_organ(ran_zone(dam_zone)) + user.visible_message("[user] cuts open their \The [affecting] and begins writing in their own blood!", "You slice open your [affecting] and begin drawing a sigil of [ticker.mode.cultdat.entity_title3].") + user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE , affecting) + if(!do_after(user, initial(rune_to_scribe.scribe_delay)-scribereduct, target = get_turf(user))) + for(var/V in shields) + var/obj/machinery/shield/S = V + if(S && !qdeleted(S)) + qdel(S) + return + if(locate(/obj/effect/rune) in runeturf) + to_chat(user, "There is already a rune here.") + return + user.visible_message("[user] creates a strange circle in their own blood.", \ + "You finish drawing the arcane markings of [ticker.mode.cultdat.entity_title3].") + for(var/V in shields) + var/obj/machinery/shield/S = V + if(S && !qdeleted(S)) + qdel(S) + var/obj/effect/rune/R = new rune_to_scribe(runeturf, chosen_keyword) + R.blood_DNA = list() + R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type + R.add_hiddenprint(H) + to_chat(user, "The [lowertext(initial(rune_to_scribe.cultist_name))] rune [initial(rune_to_scribe.cultist_desc)]") diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index ff08b31e700..0729c24de42 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -1,1046 +1,1003 @@ -var/list/sacrificed = list() +/var/list/sacrificed = list() +var/list/non_revealed_runes = (subtypesof(/obj/effect/rune) - /obj/effect/rune/malformed) - -/////////////////////////////////////////FIRST RUNE -/obj/effect/rune/proc/teleportRune() - return teleport(src.word3) - -/obj/effect/rune/proc/teleport(var/key) - var/mob/living/user = usr - var/allrunesloc[] - allrunesloc = new/list() - var/index = 0 -// var/tempnum = 0 - for(var/obj/effect/rune/R in world) - if(R == src) - continue - if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && is_teleport_allowed(R.z)) - index++ - allrunesloc.len = index - allrunesloc[index] = R.loc - if(index >= 5) - to_chat(user, "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric") - if(istype(user, /mob/living)) - user.take_overall_damage(5, 0) - qdel(src) - if(allrunesloc && index != 0) - if(istype(src,/obj/effect/rune)) - user.say("Sas[pick("'","`")]so c'arta forbici!")//Only you can stop auto-muting - else - user.whisper("Sas[pick("'","`")]so c'arta forbici!") - user.visible_message("\red [user] disappears in a flash of red light!", \ - "\red You feel as your body gets dragged through the dimension of Nar-Sie!", \ - "\red You hear a sickening crunch and sloshing of viscera.") - user.loc = allrunesloc[rand(1,index)] - return - if(istype(src,/obj/effect/rune)) - return fizzle() //Use friggin manuals, Dorf, your list was of zero length. - else - call(/obj/effect/rune/proc/fizzle)() - return - -/obj/effect/rune/proc/itemportRune() - return itemport(src.word3) -/obj/effect/rune/proc/itemport(var/key) -// var/allrunesloc[] -// allrunesloc = new/list() -// var/index = 0 -// var/tempnum = 0 - var/culcount = 0 - var/runecount = 0 - var/obj/effect/rune/IP = null - var/mob/living/user = usr - for(var/obj/effect/rune/R in world) - if(R == src) - continue - if(R.word1 == cultwords["travel"] && R.word2 == cultwords["other"] && R.word3 == key) - IP = R - runecount++ - if(runecount >= 2) - to_chat(user, "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric") - if(istype(user, /mob/living)) - user.take_overall_damage(5, 0) - qdel(src) - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - culcount++ - if(culcount>=3) - user.say("Sas[pick("'","`")]so c'arta forbici tarem!") - user.visible_message("\red You feel air moving from the rune - like as it was swapped with somewhere else.", \ - "\red You feel air moving from the rune - like as it was swapped with somewhere else.", \ - "\red You smell ozone.") - for(var/obj/O in src.loc) - if(!O.anchored) - O.loc = IP.loc - for(var/mob/M in src.loc) - M.loc = IP.loc - return - - return fizzle() - - -/////////////////////////////////////////SECOND RUNE - -/obj/effect/rune/proc/tomesummon() - if(istype(src,/obj/effect/rune)) - usr.say("N[pick("'","`")]ath reth sh'yro eth d'raggathnor!") - else - usr.whisper("N[pick("'","`")]ath reth sh'yro eth d'raggathnor!") - usr.visible_message("\red Rune disappears with a flash of red light, and in its place now a book lies.", \ - "\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a book.", \ - "\red You hear a pop and smell ozone.") - if(istype(src,/obj/effect/rune)) - new /obj/item/weapon/tome(src.loc) - else - new /obj/item/weapon/tome(usr.loc) - qdel(src) - return - - - -/////////////////////////////////////////THIRD RUNE - -/obj/effect/rune/proc/convert() - for(var/mob/living/carbon/M in src.loc) - if(iscultist(M)) - continue - if(M.stat==2) - continue - usr.say("Mah[pick("'","`")]weyh pleggh at e'ntrath!") - M.visible_message("\red [M] writhes in pain as the markings below him glow a bloody red.", \ - "\red AAAAAAHHHH!.", \ - "\red You hear an anguished scream.") - cult_log("[key_name_admin(usr)] tried to convert [key_name_admin(M)]") - if(is_convertable_to_cult(M.mind)) - ticker.mode.add_cultist(M.mind) - M.mind.special_role = SPECIAL_ROLE_CULTIST - to_chat(M, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.") - to_chat(M, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") - return 1 - else - to_chat(M, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.") - to_chat(M, "And you were able to force it out of your mind. You now know the truth, there's something horrible out there, stop it and its minions at all costs.") - return 0 - - return fizzle() - - - -/////////////////////////////////////////FOURTH RUNE - -/obj/effect/rune/proc/tearreality() - var/cultist_count = 0 - for(var/mob/M in range(1,src)) - if(iscultist(M) && !M.stat) - M.say("Tok-lyr rqa'nap g[pick("'","`")]lt-ulotf!") - cultist_count += 1 - if(cultist_count >= 9) - cult_log("THE CULT HAS SUMMONED NAR'SIE. GGNORE") - new /obj/singularity/narsie/large(src.loc) - if(ticker.mode.name == "cult") - ticker.mode:eldergod = 0 - return - else - return fizzle() - -/////////////////////////////////////////FIFTH RUNE -/obj/effect/rune/proc/empRune() - emp(src.loc,3) - -/obj/effect/rune/proc/emp(var/U,var/range_red) //range_red - var which determines by which number to reduce the default emp range, U is the source loc, needed because of talisman emps which are held in hand at the moment of using and that apparently messes things up -- Urist - if(istype(src,/obj/effect/rune)) - usr.say("Ta'gh fara[pick("'","`")]qha fel d'amar det!") - else - usr.whisper("Ta'gh fara[pick("'","`")]qha fel d'amar det!") - playsound(U, 'sound/items/Welder2.ogg', 25, 1) - var/turf/T = get_turf(U) - if(T) - T.hotspot_expose(700,125) - var/rune = src // detaching the proc - in theory - empulse(U, (range_red - 2), range_red) - qdel(rune) - return - -/////////////////////////////////////////SIXTH RUNE - -/obj/effect/rune/proc/drain() - var/drain = 0 - for(var/obj/effect/rune/R in world) - if(R.word1==cultwords["travel"] && R.word2==cultwords["blood"] && R.word3==cultwords["self"]) - for(var/mob/living/carbon/D in R.loc) - if(D.stat!=2) - cult_log("[key_name_admin(usr)] has drained blood from [key_name_admin(D)]") - var/bdrain = rand(1,25) - to_chat(D, "\red You feel weakened.") - D.take_overall_damage(bdrain, 0) - drain += bdrain - if(!drain) - return fizzle() - usr.say ("Yu[pick("'","`")]gular faras desdae. Havas mithum javara. Umathar uf'kal thenar!") - usr.visible_message("\red Blood flows from the rune into [usr]!", \ - "\red The blood starts flowing from the rune and into your frail mortal body. You feel... empowered.", \ - "\red You hear a liquid flowing.") - var/mob/living/user = usr - if(user.bhunger) - user.bhunger = max(user.bhunger-2*drain,0) - if(drain>=50) - user.visible_message("\red [user]'s eyes give off eerie red glow!", \ - "\red ...but it wasn't nearly enough. You crave, crave for more. The hunger consumes you from within.", \ - "\red You hear a heartbeat.") - user.bhunger += drain - src = user - spawn() - for(,user.bhunger>0,user.bhunger--) - sleep(50) - user.take_overall_damage(3, 0) - return - user.heal_organ_damage(drain%5, 0) - drain-=drain%5 - for(,drain>0,drain-=5) - sleep(2) - user.heal_organ_damage(5, 0) - return - - - - - - -/////////////////////////////////////////SEVENTH RUNE - -/obj/effect/rune/proc/seer() - if(usr.loc==src.loc) - // No. Bad cultcode. Bad. - var/mob/living/carbon/human/H = usr - if(usr.seer==1) - usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium viortia.") - to_chat(usr, "\red The world beyond fades from your vision.") - usr.see_invisible = SEE_INVISIBLE_LIVING - usr.seer = 0 - else if(usr.see_invisible!=SEE_INVISIBLE_LIVING) - to_chat(usr, "\red The world beyond flashes your eyes but disappears quickly, as if something is disrupting your vision.") - usr.see_invisible = SEE_INVISIBLE_OBSERVER - usr.seer = 0 - else - usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium vivira. Itonis al'ra matum!") - to_chat(usr, "\red The world beyond opens to your eyes.") - usr.see_invisible = SEE_INVISIBLE_OBSERVER - usr.seer = 1 - H.update_sight() - return - return fizzle() - -/////////////////////////////////////////EIGHTH RUNE - -/obj/effect/rune/proc/raise() - var/mob/living/carbon/human/corpse_to_raise - var/mob/living/carbon/human/body_to_sacrifice - - var/is_sacrifice_target = 0 - for(var/mob/living/carbon/human/M in src.loc) - if(M.stat == DEAD) - if(ticker.mode.name == "cult" && M.mind == ticker.mode:sacrifice_target) - is_sacrifice_target = 1 - else - corpse_to_raise = M - if(M.key) - M.ghostize(1) //kick them out of their body - break - if(!corpse_to_raise) - if(is_sacrifice_target) - to_chat(usr, "\red The Geometer of blood wants this mortal for himself.") - return fizzle() - - - is_sacrifice_target = 0 - find_sacrifice: - for(var/obj/effect/rune/R in world) - if(R.word1==cultwords["blood"] && R.word2==cultwords["join"] && R.word3==cultwords["hell"]) - for(var/mob/living/carbon/human/N in R.loc) - if(ticker.mode.name == "cult" && N.mind && N.mind == ticker.mode:sacrifice_target) - is_sacrifice_target = 1 - else - if(N.stat!= DEAD) - body_to_sacrifice = N - break find_sacrifice - - if(!body_to_sacrifice) - if(is_sacrifice_target) - to_chat(usr, "\red The Geometer of blood wants that corpse for himself.") - else - to_chat(usr, "\red The sacrifical corpse is not dead. You must free it from this world of illusions before it may be used.") - return fizzle() - - var/mob/dead/observer/ghost - for(var/mob/dead/observer/O in loc) - if(!O.client) continue - if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue - ghost = O - break - - if(!ghost) - to_chat(usr, "\red You require a restless spirit which clings to this world. Beckon their prescence with the sacred chants of Nar-Sie.") - return fizzle() - - corpse_to_raise.revive() - - corpse_to_raise.key = ghost.key //the corpse will keep its old mind! but a new player takes ownership of it (they are essentially possessed) - //This means, should that player leave the body, the original may re-enter - usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") - corpse_to_raise.visible_message("\red [corpse_to_raise]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.", \ - "\red Life... I'm alive again...", \ - "\red You hear a faint, slightly familiar whisper.") - body_to_sacrifice.visible_message("\red [body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from his remains!", \ - "\red You feel as your blood boils, tearing you apart.", \ - "\red You hear a thousand voices, all crying in pain.") - body_to_sacrifice.gib() - -// if(ticker.mode.name == "cult") -// ticker.mode:add_cultist(corpse_to_raise.mind) -// else -// ticker.mode.cult |= corpse_to_raise.mind - - to_chat(corpse_to_raise, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.") - to_chat(corpse_to_raise, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") - return - - - - - -/////////////////////////////////////////NINETH RUNE - -/obj/effect/rune/proc/obscureRune() - return obscure(4) -/obj/effect/rune/proc/obscure(var/rad) - var/S=0 - for(var/obj/effect/rune/R in orange(rad,src)) - if(R!=src) - R.invisibility=INVISIBILITY_OBSERVER - S=1 - if(S) - if(istype(src,/obj/effect/rune)) - usr.say("Kla[pick("'","`")]atu barada nikt'o!") - for(var/mob/V in viewers(src)) - V.show_message("\red The rune turns into gray dust, veiling the surrounding runes.", 3) - qdel(src) - else - usr.whisper("Kla[pick("'","`")]atu barada nikt'o!") - to_chat(usr, "\red Your talisman turns into gray dust, veiling the surrounding runes.") - for(var/mob/V in orange(1,src)) - if(V!=usr) - V.show_message("\red Dust emanates from [usr]'s hands for a moment.", 3) - - return - if(istype(src,/obj/effect/rune)) - return fizzle() - else - call(/obj/effect/rune/proc/fizzle)() - return - -/////////////////////////////////////////TENTH RUNE - -/obj/effect/rune/proc/ajourney() //some bits copypastaed from admin tools - Urist - if(usr.loc==src.loc) - var/mob/living/carbon/human/L = usr - usr.say("Fwe[pick("'","`")]sh mah erl nyag r'ya!") - usr.visible_message("\red [usr]'s eyes glow blue as \he freezes in place, absolutely motionless.", \ - "\red The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this is a great sight, being here strains your mind and body. Hurry...", \ - "\red You hear only complete silence for a moment.") - usr.ghostize(1) - L.ajourn = 1 - while(L) - if(L.key) - L.ajourn=0 - return - else - L.take_organ_damage(10, 0) - sleep(100) - return fizzle() - - - - -/////////////////////////////////////////ELEVENTH RUNE - -/obj/effect/rune/proc/manifest() - var/obj/effect/rune/this_rune = src - src = null - if(usr.loc!=this_rune.loc) - return this_rune.fizzle() - var/mob/dead/observer/ghost - for(var/mob/dead/observer/O in this_rune.loc) - if(!O.client) continue - if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue - ghost = O - break - if(!ghost) - return this_rune.fizzle() - if(jobban_isbanned(ghost, ROLE_CULTIST) || jobban_isbanned(ghost,"Syndicate")) - return this_rune.fizzle() - - usr.say("Gal'h'rfikk harfrandid mud[pick("'","`")]gib!") - var/mob/living/carbon/human/dummy/D = new(this_rune.loc) - usr.visible_message("\red A shape forms in the center of the rune. A shape of... a man.", \ - "\red A shape forms in the center of the rune. A shape of... a man.", \ - "\red You hear liquid flowing.") - D.real_name = "Unknown" - var/chose_name = 0 - for(var/obj/item/weapon/paper/P in this_rune.loc) - if(P.info) - D.real_name = copytext(P.info, findtext(P.info,">")+1, findtext(P.info,"<",2) ) - chose_name = 1 - break - if(!chose_name) - D.real_name = "[pick(first_names_male)] [pick(last_names)]" - D.universal_speak = 1 - D.status_flags &= ~GODMODE - - D.key = ghost.key - - if(ticker.mode.name == "cult") - ticker.mode:add_cultist(D.mind) - else - ticker.mode.cult+=D.mind - - D.mind.special_role = SPECIAL_ROLE_CULTIST - to_chat(D, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.") - to_chat(D, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") - - var/mob/living/user = usr - while(this_rune && user && user.stat==CONSCIOUS && user.client && user.loc==this_rune.loc) - user.take_organ_damage(1, 0) - sleep(30) - if(D) - D.visible_message("\red [D] slowly dissipates into dust and bones.", \ - "\red You feel pain, as bonds formed between your soul and this homunculus break.", \ - "\red You hear faint rustle.") - D.dust() - return - - - - - -/////////////////////////////////////////TWELFTH RUNE - -/obj/effect/rune/proc/talisman()//only hide, emp, teleport, deafen, blind and tome runes can be imbued atm - var/obj/item/weapon/paper/newtalisman - var/unsuitable_newtalisman = 0 - for(var/obj/item/weapon/paper/P in src.loc) - if(!P.info) - newtalisman = P - break - else - unsuitable_newtalisman = 1 - if(!newtalisman) - if(unsuitable_newtalisman) - to_chat(usr, "\red The blank is tainted. It is unsuitable.") - return fizzle() - - var/obj/effect/rune/imbued_from - var/obj/item/weapon/paper/talisman/T - for(var/obj/effect/rune/R in orange(1,src)) - if(R==src) - continue - if(R.word1==cultwords["travel"] && R.word2==cultwords["self"]) //teleport - T = new(src.loc) - T.imbue = "[R.word3]" - T.info = "[R.word3]" - imbued_from = R - break - if(R.word1==cultwords["see"] && R.word2==cultwords["blood"] && R.word3==cultwords["hell"]) //tome - T = new(src.loc) - T.imbue = "newtome" - imbued_from = R - break - if(R.word1==cultwords["destroy"] && R.word2==cultwords["see"] && R.word3==cultwords["technology"]) //emp - T = new(src.loc) - T.imbue = "emp" - imbued_from = R - break - if(R.word1==cultwords["blood"] && R.word2==cultwords["see"] && R.word3==cultwords["destroy"]) //conceal - T = new(src.loc) - T.imbue = "conceal" - imbued_from = R - break - if(R.word1==cultwords["hell"] && R.word2==cultwords["destroy"] && R.word3==cultwords["other"]) //armor - T = new(src.loc) - T.imbue = "armor" - imbued_from = R - break - if(R.word1==cultwords["blood"] && R.word2==cultwords["see"] && R.word3==cultwords["hide"]) //reveal - T = new(src.loc) - T.imbue = "revealrunes" - imbued_from = R - break - if(R.word1==cultwords["hide"] && R.word2==cultwords["other"] && R.word3==cultwords["see"]) //deafen - T = new(src.loc) - T.imbue = "deafen" - imbued_from = R - break - if(R.word1==cultwords["destroy"] && R.word2==cultwords["see"] && R.word3==cultwords["other"]) //blind - T = new(src.loc) - T.imbue = "blind" - imbued_from = R - break - if(R.word1==cultwords["self"] && R.word2==cultwords["other"] && R.word3==cultwords["technology"]) //communicate - T = new(src.loc) - T.imbue = "communicate" - imbued_from = R - break - if(R.word1==cultwords["join"] && R.word2==cultwords["hide"] && R.word3==cultwords["technology"]) //stun - T = new(src.loc) - T.imbue = "runestun" - imbued_from = R - break - if(imbued_from) - for(var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - usr.say("H'drak v[pick("'","`")]loso, mir'kanas verbot!") - qdel(imbued_from) - qdel(newtalisman) - else - return fizzle() - -/////////////////////////////////////////THIRTEENTH RUNE - -/obj/effect/rune/proc/mend() - var/mob/living/user = usr - src = null - user.say("Uhrast ka'hfa heldsagen ver[pick("'","`")]lot!") - user.take_overall_damage(200, 0) - runedec+=10 - user.visible_message("\red [user] keels over dead, his blood glowing blue as it escapes his body and dissipates into thin air.", \ - "\red In the last moment of your humble life, you feel an immense pain as fabric of reality mends... with your blood.", \ - "\red You hear faint rustle.") - for(,user.stat==2) - sleep(600) - if(!user) - return - runedec-=10 - return - - -/////////////////////////////////////////FOURTEETH RUNE - -// returns 0 if the rune is not used. returns 1 if the rune is used. -/obj/effect/rune/proc/communicate() - . = 1 // Default output is 1. If the rune is deleted it will return 1 - var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") - if(!input) - if(istype(src)) - fizzle() - return 0 - else - return 0 - - // record this - //cult_log("[key_name(usr,0)] says : [input]") - - - var/F = investigate_subject2file("cult") - if(!F) - return 0 - to_chat(F, "[time2text(world.timeofday,"hh:mm")] \ref[usr] ([usr.x],[usr.y],[usr.z]) || [usr] communicates: [input]
") - - var/obj/cult_viewpoint/vp = getCultViewpoint(usr) - if(!vp) - return 0 - - var/displayName = vp.get_display_name() - var/cultName = vp.get_cult_name() - - if(istype(src,/obj/effect/rune)) - usr.say("O bidai nabora se[pick("'","`")]sma!") - else - usr.whisper("O bidai nabora se[pick("'","`")]sma!") - - if(istype(src,/obj/effect/rune)) - usr.say("[input]") - else - usr.whisper("[input]") - - log_say("Cult Message: [key_name(usr)]: [input]") - for(var/datum/mind/H in ticker.mode.cult) - if(H.current) - to_chat(H.current, "[cultName]: [input]") - - for(var/mob/spirit/spirit in spirits) - to_chat(spirit, "[displayName]: [input]") - - - for(var/mob/dead/observer/G in player_list) - G.show_message("[displayName] ([cultName]) ([ghost_follow_link(usr, ghost=G)]): [input]") - - qdel(src) - return 1 - -/////////////////////////////////////////FIFTEENTH RUNE - -/obj/effect/rune/proc/sacrifice() - var/list/mob/living/carbon/human/cultsinrange = list() - var/list/mob/living/carbon/human/victims = list() - for(var/mob/living/carbon/human/V in src.loc)//Checks for non-cultist humans to sacrifice - if(ishuman(V)) - if(!(iscultist(V))) - victims += V//Checks for cult status and mob type - for(var/obj/item/I in src.loc)//Checks for MMIs/brains/Intellicards - if(istype(I,/obj/item/organ/internal/brain)) - var/obj/item/organ/internal/brain/B = I - victims += B.brainmob - else if(istype(I,/obj/item/device/mmi)) - var/obj/item/device/mmi/B = I - victims += B.brainmob - else if(istype(I,/obj/item/device/aicard)) - for(var/mob/living/silicon/ai/A in I) - victims += A - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - cultsinrange += C - C.say("Barhah hra zar[pick("'","`")]garis!") - for(var/mob/H in victims) - if(ticker.mode.name == "cult") - if(H.mind == ticker.mode:sacrifice_target) - if(cultsinrange.len >= 3) - sacrificed += H.mind - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - to_chat(usr, "\red The Geometer of Blood accepts this sacrifice, your objective is now complete.") - else - to_chat(usr, "\red Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual.") - else - if(cultsinrange.len >= 3) - if(H.stat !=2) - if(prob(80)) - to_chat(usr, "\red The Geometer of Blood accepts this sacrifice.") - ticker.mode:grant_runeword(usr) - else - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - to_chat(usr, "\red However, this soul was not enough to gain His favor.") - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(prob(40)) - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - ticker.mode:grant_runeword(usr) - else - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - to_chat(usr, "\red However, a mere dead body is not enough to satisfy Him.") - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(H.stat !=2) - to_chat(usr, "\red The victim is still alive, you will need more cultists chanting for the sacrifice to succeed.") - else - if(prob(40)) - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - ticker.mode:grant_runeword(usr) - else - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - to_chat(usr, "\red However, a mere dead body is not enough to satisfy Him.") - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(cultsinrange.len >= 3) - if(H.stat !=2) - if(prob(80)) - to_chat(usr, "\red The Geometer of Blood accepts this sacrifice.") - ticker.mode:grant_runeword(usr) - else - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - to_chat(usr, "\red However, this soul was not enough to gain His favor.") - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(prob(40)) - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - ticker.mode:grant_runeword(usr) - else - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - to_chat(usr, "\red However, a mere dead body is not enough to satisfy Him.") - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(H.stat !=2) - to_chat(usr, "\red The victim is still alive, you will need more cultists chanting for the sacrifice to succeed.") - else - if(prob(40)) - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - ticker.mode:grant_runeword(usr) - else - to_chat(usr, "\red The Geometer of blood accepts this sacrifice.") - to_chat(usr, "\red However, a mere dead body is not enough to satisfy Him.") - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - -/////////////////////////////////////////SIXTEENTH RUNE - -/obj/effect/rune/proc/revealrunesrune() - revealrunes(src) - -/obj/effect/rune/proc/revealrunes(var/obj/W as obj) - var/go=0 - var/rad - var/S=0 - if(istype(W,/obj/effect/rune)) - rad = 6 - go = 1 - if(istype(W,/obj/item/weapon/paper/talisman)) - rad = 4 - go = 1 - if(istype(W,/obj/item/weapon/storage/bible)) - rad = 1 - go = 1 - if(go) - for(var/obj/effect/rune/R in orange(rad,src)) - if(R!=src) - R:visibility=15 - S=1 - if(S) - if(istype(W,/obj/item/weapon/storage/bible)) - to_chat(usr, "\red Arcane markings suddenly glow from underneath a thin layer of dust!") - return - if(istype(W,/obj/effect/rune)) - usr.say("Nikt[pick("'","`")]o barada kla'atu!") - for(var/mob/V in viewers(src)) - V.show_message("\red The rune turns into red dust, reveaing the surrounding runes.", 3) - qdel(src) - return - if(istype(W,/obj/item/weapon/paper/talisman)) - usr.whisper("Nikt[pick("'","`")]o barada kla'atu!") - to_chat(usr, "\red Your talisman turns into red dust, revealing the surrounding runes.") - for(var/mob/V in orange(1,usr.loc)) - if(V!=usr) - V.show_message("\red Red dust emanates from [usr]'s hands for a moment.", 3) - return - return - if(istype(W,/obj/effect/rune)) - return fizzle() - if(istype(W,/obj/item/weapon/paper/talisman)) - call(/obj/effect/rune/proc/fizzle)() - return - -/////////////////////////////////////////SEVENTEENTH RUNE - -/obj/effect/rune/proc/wall() - usr.say("Khari[pick("'","`")]d! Eske'te tannin!") - src.density = !src.density - var/mob/living/user = usr - user.take_organ_damage(2, 0) - if(src.density) - to_chat(usr, "\red Your blood flows into the rune, and you feel that the very space over the rune thickens.") - else - to_chat(usr, "\red Your blood flows into the rune, and you feel as the rune releases its grasp on space.") - return - -/////////////////////////////////////////EIGHTTEENTH RUNE - -/obj/effect/rune/proc/freedom() - var/mob/living/user = usr - var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in ticker.mode.cult) - if(istype(H.current,/mob/living/carbon)) - cultists+=H.current - var/list/mob/living/carbon/users = new - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - users+=C - if(users.len>=3) - var/mob/living/carbon/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users) - if(!cultist) - return fizzle() - if(cultist == user) //just to be sure. - return - if(!(cultist.buckled || \ - cultist.handcuffed || \ - istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle) || \ - (istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded) || \ - (istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked) || \ - (istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) \ - )) - to_chat(user, "\red The [cultist] is already free.") - return - cultist.buckled = null - if(cultist.handcuffed) - cultist.handcuffed.loc = cultist.loc - cultist.handcuffed = null - cultist.update_handcuffed() - if(cultist.legcuffed) - cultist.legcuffed.loc = cultist.loc - cultist.legcuffed = null - cultist.update_inv_legcuffed() - if(istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle)) - cultist.unEquip(cultist.wear_mask) - if(istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded) - cultist.loc:welded = 0 - if(istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked) - cultist.loc:locked = 0 - if(istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) - cultist.loc:locked = 0 - for(var/mob/living/carbon/C in users) - user.take_overall_damage(15, 0) - C.say("Khari[pick("'","`")]d! Gual'te nikka!") - qdel(src) - return fizzle() - -/////////////////////////////////////////NINETEENTH RUNE - -/obj/effect/rune/proc/cultsummon() - var/mob/living/user = usr - var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in ticker.mode.cult) - if(istype(H.current,/mob/living/carbon)) - cultists+=H.current - var/list/mob/living/carbon/users = new - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - users+=C - if(users.len>=3) - var/mob/living/carbon/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user) - if(!cultist) - return fizzle() - if(cultist == user) //just to be sure. - return - if(cultist.buckled || cultist.handcuffed || (!isturf(cultist.loc) && !istype(cultist.loc, /obj/structure/closet))) - to_chat(user, "\red You cannot summon the [cultist], for his shackles of blood are strong") - return fizzle() - cultist.loc = src.loc - cultist.lying = 1 - cultist.regenerate_icons() - for(var/mob/living/carbon/human/C in orange(1,src)) - if(iscultist(C) && !C.stat) - C.say("N'ath reth sh'yro eth d[pick("'","`")]rekkathnor!") - C.take_overall_damage(25, 0) - user.visible_message("\red Rune disappears with a flash of red light, and in its place now a body lies.", \ - "\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a body.", \ - "\red You hear a pop and smell ozone.") - qdel(src) - return fizzle() - -/////////////////////////////////////////TWENTIETH RUNES - -/obj/effect/rune/proc/deafen() - if(istype(src,/obj/effect/rune)) - var/affected = 0 - for(var/mob/living/carbon/C in range(7,src)) - if(iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.AdjustEarDeaf(50) - C.show_message("\red The world around you suddenly becomes quiet.", 3) - affected++ - if(prob(1)) - C.disabilities |= DEAF - if(affected) - usr.say("Sti[pick("'","`")] kaliedir!") - to_chat(usr, "\red The world becomes quiet as the deafening rune dissipates into fine dust.") - qdel(src) - else - return fizzle() - else - var/affected = 0 - for(var/mob/living/carbon/C in range(7,usr)) - if(iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.AdjustEarDeaf(30) - //talismans is weaker. - C.show_message("\red The world around you suddenly becomes quiet.", 3) - affected++ - if(affected) - usr.whisper("Sti[pick("'","`")] kaliedir!") - to_chat(usr, "\red Your talisman turns into gray dust, deafening everyone around.") - for(var/mob/V in orange(1,src)) - if(!(iscultist(V))) - V.show_message("\red Dust flows from [usr]'s hands for a moment, and the world suddenly becomes quiet..", 3) - return - -/obj/effect/rune/proc/blind() - if(istype(src,/obj/effect/rune)) - var/affected = 0 - for(var/mob/living/carbon/C in viewers(src)) - if(iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.AdjustEyeBlurry(50) - C.AdjustEyeBlind(20) - if(prob(5)) - C.BecomeNearsighted() - if(prob(10)) - C.BecomeBlind() - C.show_message("\red Suddenly you see red flash that blinds you.", 3) - affected++ - if(affected) - usr.say("Sti[pick("'","`")] kaliesin!") - to_chat(usr, "\red The rune flashes, blinding those who not follow the Nar-Sie, and dissipates into fine dust.") - qdel(src) - else - return fizzle() - else - var/affected = 0 - for(var/mob/living/carbon/C in view(2,usr)) - if(iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.AdjustEyeBlurry(30) - C.AdjustEyeBlind(10) - //talismans is weaker. - affected++ - C.show_message("\red You feel a sharp pain in your eyes, and the world disappears into darkness..", 3) - if(affected) - usr.whisper("Sti[pick("'","`")] kaliesin!") - to_chat(usr, "\red Your talisman turns into gray dust, blinding those who not follow the Nar-Sie.") - return - - -/obj/effect/rune/proc/bloodboil() //cultists need at least one DANGEROUS rune. Even if they're all stealthy. /* - var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in ticker.mode.cult) - if(istype(H.current,/mob/living/carbon)) - cultists+=H.current +This file contains runes. +Runes are used by the cult to cause many different effects and are paramount to their success. +They are drawn with an arcane tome in blood, and are distinguishable to cultists and normal crew by examining. +Fake runes can be drawn in crayon to fool people. +Runes can either be invoked by one's self or with many different cultists. Each rune has a specific incantation that the cultists will say when invoking it. +To draw a rune, use an arcane tome. */ - var/culcount = 0 //also, wording for it is old wording for obscure rune, which is now hide-see-blood. -// var/list/cultboil = list(cultists-usr) //and for this words are destroy-see-blood. - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - culcount++ - if(culcount>=3) - for(var/mob/living/carbon/M in viewers(usr)) - if(iscultist(M)) - continue - var/obj/item/weapon/nullrod/N = locate() in M - if(N) - continue - cult_log(": Blood Boil damaged [key_name_admin(M)].") - M.take_overall_damage(51,51) - to_chat(M, "\red Your blood boils!") - if(prob(5)) - spawn(5) - M.gib() - for(var/obj/effect/rune/R in view(src)) - if(prob(10)) - explosion(R.loc, -1, 0, 1, 5) - for(var/mob/living/carbon/human/C in orange(1,src)) - if(iscultist(C) && !C.stat) - C.say("Dedo ol[pick("'","`")]btoh!") - C.take_overall_damage(15, 0) + +/obj/effect/rune + name = "rune" + var/cultist_name = "basic rune" + desc = "An odd collection of symbols drawn in what seems to be blood." + var/cultist_desc = "a basic rune with no function." //This is shown to cultists who examine the rune in order to determine its true purpose. + anchored = 1 + icon = 'icons/obj/rune.dmi' + icon_state = "1" + var/visibility = 0 + var/view_range = 7 + unacidable = 1 + layer = TURF_LAYER + + var/invocation = "Aiy ele-mayo!" //This is said by cultists when the rune is invoked. + var/req_cultists = 1 //The amount of cultists required around the rune to invoke it. If only 1, any cultist can invoke it. + var/rune_in_use = 0 // Used for some runes, this is for when you want a rune to not be usable when in use. + + var/scribe_delay = 50 //how long the rune takes to create + var/scribe_damage = 0.1 //how much damage you take doing it + + var/allow_excess_invokers = 0 //if we allow excess invokers when being invoked + var/construct_invoke = 1 //if constructs can invoke it + + var/req_keyword = 0 //If the rune requires a keyword - go figure amirite + var/keyword //The actual keyword for the rune + + +/obj/effect/rune/New(loc, set_keyword) + ..() + if(set_keyword) + keyword = set_keyword + check_icon() + var/image/blood = image(loc = src) + blood.override = 1 + for(var/mob/living/silicon/ai/AI in player_list) + AI.client.images += blood + +/obj/effect/rune/examine(mob/user) + ..() + if(iscultist(user) || user.stat == DEAD) //If they're a cultist or a ghost, tell them the effects + to_chat(user, "Name: [cultist_name]") + to_chat(user, "Effects: [capitalize(cultist_desc)]") + to_chat(user, "Required Acolytes: [req_cultists]") + if(req_keyword && keyword) + to_chat(user, "Keyword: [keyword]") + +/obj/effect/rune/attackby(obj/I, mob/user, params) + if(istype(I, /obj/item/weapon/tome) && iscultist(user)) + to_chat(user, "You carefully erase the [lowertext(cultist_name)] rune.") qdel(src) - else - return fizzle() - return - -// WIP rune, I'll wait for Rastaf0 to add limited blood. - -/obj/effect/rune/proc/burningblood() - var/culcount = 0 - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - culcount++ - if(culcount >= 5) - for(var/obj/effect/rune/R in world) - if(R.blood_DNA == src.blood_DNA) - for(var/mob/living/M in orange(2,R)) - M.take_overall_damage(0,15) - if(R.invisibility>M.see_invisible) - to_chat(M, "\red Aargh it burns!") - else - to_chat(M, "\red Rune suddenly ignites, burning you!") - var/turf/T = get_turf(R) - T.hotspot_expose(700,125) - for(var/obj/effect/decal/cleanable/blood/B in world) - if(B.blood_DNA == src.blood_DNA) - for(var/mob/living/M in orange(1,B)) - M.take_overall_damage(0,5) - to_chat(M, "\red Blood suddenly ignites, burning you!") - var/turf/T = get_turf(B) - T.hotspot_expose(700,125) - qdel(B) + return + else if(istype(I, /obj/item/weapon/nullrod)) + if(iscultist(user))//cultist..what are doing..cultist..staph... + user.drop_item() + user.visible_message("[I] suddenly glows with white light, forcing [user] to drop it in pain!", \ + "[I] suddenly glows with a white light that sears your hand, forcing you to drop it!") + return + to_chat(user,"You disrupt the magic of [src] with [I].") qdel(src) - -////////// Rune 24 (counting burningblood, which kinda doesnt work yet.) - -/obj/effect/rune/proc/runestun(var/mob/living/T as mob) - if(istype(src,/obj/effect/rune)) ///When invoked as rune, flash and stun everyone around. - usr.say("Fuu ma[pick("'","`")]jin!") - for(var/mob/living/L in viewers(src)) - - if(iscarbon(L)) - var/mob/living/carbon/C = L - C.flash_eyes() - if(C.stuttering < 1 && (!(HULK in C.mutations))) - C.stuttering = 1 - C.Weaken(1) - C.Stun(1) - C.show_message("\red The rune explodes in a bright flash.", 3) - - else if(issilicon(L)) - var/mob/living/silicon/S = L - S.Weaken(5) - S.show_message("\red BZZZT... The rune has exploded in a bright flash.", 3) - qdel(src) - else ///When invoked as talisman, stun and mute the target mob. - usr.say("Dream sign ''Evil sealing talisman'[pick("'","`")]!") - var/obj/item/weapon/nullrod/N = locate() in T - if(N) - for(var/mob/O in viewers(T, null)) - O.show_message(text("[] invokes a talisman at [], but they are unaffected!", usr, T), 1) - else - for(var/mob/O in viewers(T, null)) - O.show_message(text("[] invokes a talisman at []", usr, T), 1) - - if(issilicon(T)) - T.Weaken(10) - - else if(iscarbon(T)) - var/mob/living/carbon/C = T - C.flash_eyes() - if(!(HULK in C.mutations)) - C.AdjustSilence(15) - C.Weaken(10) - C.Stun(10) return -/////////////////////////////////////////TWENTY-FIFTH RUNE - -/obj/effect/rune/proc/armor() - var/mob/living/carbon/human/user = usr - if(istype(src,/obj/effect/rune)) - usr.say("N'ath reth sh'yro eth d[pick("'","`")]raggathnor!") +/obj/effect/rune/attack_hand(mob/living/user) + if(!iscultist(user)) + to_chat(user, "You aren't able to understand the words of [src].") + return + var/list/invokers = can_invoke(user) + if(invokers.len >= req_cultists) + invoke(invokers) else - usr.whisper("N'ath reth sh'yro eth d[pick("'","`")]raggathnor!") - usr.visible_message("\red The rune disappears with a flash of red light, and a set of armor appears on [usr]...", \ - "\red You are blinded by the flash of red light! After you're able to see again, you see that you are now wearing a set of armor.") + fail_invoke(user) - user.equip_to_slot_or_del(new /obj/item/clothing/suit/hooded/cultrobes/alt(user), slot_wear_suit) - user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(user), slot_shoes) - user.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/cultpack(user), slot_back) - //the above update their overlay icons cache but do not call update_icons() - //the below calls update_icons() at the end, which will update overlay icons by using the (now updated) cache - user.put_in_hands(new /obj/item/weapon/melee/cultblade(user)) //put in hands or on floor +/obj/effect/rune/attack_animal(mob/living/simple_animal/M) + if(istype(M, /mob/living/simple_animal/shade) || istype(M, /mob/living/simple_animal/hostile/construct)) + if(construct_invoke || !iscultist(M)) //if you're not a cult construct we want the normal fail message + attack_hand(M) + else + to_chat(M, "You are unable to invoke the rune!") + +/obj/effect/rune/proc/talismanhide() //for talisman of revealing/hiding + visible_message("[src] fades away.") + invisibility = INVISIBILITY_OBSERVER + alpha = 100 //To help ghosts distinguish hidden runes + +/obj/effect/rune/proc/talismanreveal() //for talisman of revealing/hiding + invisibility = 0 + visible_message("[src] suddenly appears!") + alpha = initial(alpha) + +/obj/effect/rune/proc/talismanfake() //for rune disguising + var/runenum = pick(1,2,3,4,5,6) + visible_message("[src] takes on a waxy apperance!") + icon = 'icons/effects/crayondecal.dmi' + icon_state = "rune[runenum]" + color = rgb(255, 0, 0) + +/* +There are a few different procs each rune runs through when a cultist activates it. +can_invoke() is called when a cultist activates the rune with an empty hand. If there are multiple cultists, this rune determines if the required amount is nearby. +invoke() is the rune's actual effects. +fail_invoke() is called when the rune fails, via not enough people around or otherwise. Typically this just has a generic 'fizzle' effect. +structure_check() searches for nearby cultist structures required for the invocation. Proper structures are pylons, forges, archives, and altars. +*/ + +/obj/effect/rune/proc/can_invoke(var/mob/living/user) + //This proc determines if the rune can be invoked at the time. If there are multiple required cultists, it will find all nearby cultists. + var/list/invokers = list() //people eligible to invoke the rune + var/list/chanters = list() //people who will actually chant the rune when passed to invoke() + if(user) + chanters |= user + invokers |= user + if(req_cultists > 1 || allow_excess_invokers) + for(var/mob/living/L in range(1, src)) + if(iscultist(L)) + if(L == user) + continue + if(ishuman(L)) + var/mob/living/carbon/human/H = L + if(!H.can_speak()) + continue + if(L.stat) + continue + invokers |= L + if(invokers.len >= req_cultists) + if(allow_excess_invokers) + chanters |= invokers + else + invokers -= user + shuffle(invokers) + for(var/i in 0 to req_cultists) + var/L = pick_n_take(invokers) + chanters |= L + return chanters + +/obj/effect/rune/proc/invoke(var/list/invokers) + //This proc contains the effects of the rune as well as things that happen afterwards. If you want it to spawn an object and then delete itself, have both here. + if(invocation) + for(var/M in invokers) + var/mob/living/L = M + L.say(invocation) + L.changeNext_move(CLICK_CD_MELEE)//THIS IS WHY WE CAN'T HAVE NICE THINGS + do_invoke_glow() + +/obj/effect/rune/proc/do_invoke_glow() + var/oldtransform = transform + spawn(0) //animate is a delay, we want to avoid being delayed + animate(src, transform = matrix()*2, alpha = 0, time = 5) //fade out + animate(transform = oldtransform, alpha = 255, time = 0) + +/obj/effect/rune/proc/fail_invoke(var/mob/living/user) + //This proc contains the effects of a rune if it is not invoked correctly, through either invalid wording or not enough cultists. By default, it's just a basic fizzle. + visible_message("The markings pulse with a small flash of red light, then fall dark.") + spawn(0) //animate is a delay, we want to avoid being delayed + animate(src, color = rgb(255, 0, 0), time = 0) + animate(src, color = initial(color), time = 5) + +//Malformed Rune: This forms if a rune is not drawn correctly. Invoking it does nothing but hurt the user. +/obj/effect/rune/malformed + cultist_name = "malformed rune" + cultist_desc = "a senseless rune written in gibberish. No good can come from invoking this." + invocation = "Ra'sha yoka!" + +/obj/effect/rune/malformed/invoke(var/list/invokers) + ..() + for(var/M in invokers) + var/mob/living/L = M + to_chat(M, "You feel your life force draining. [ticker.mode.cultdat.entity_title3] is displeased.") + L.apply_damage(30, BRUTE) qdel(src) + +/mob/proc/null_rod_check() //The null rod, if equipped, will protect the holder from the effects of most runes + var/obj/item/weapon/nullrod/N = locate() in src + if(N) + return N + return 0 + +//Rite of Binding: A paper on top of the rune to a talisman. +/obj/effect/rune/imbue + cultist_name = "Rite of Binding" + cultist_desc = "transforms paper into powerful magic talismans." + invocation = "H'drak v'loso, mir'kanas verbot!" + icon_state = "3" + +/obj/effect/rune/imbue/invoke(var/list/invokers) + var/mob/living/user = invokers[1] //the first invoker is always the user + var/turf/T = get_turf(src) + var/list/papers_on_rune = list() + var/entered_talisman_name + var/obj/item/weapon/paper/talisman/talisman_type + var/list/possible_talismans = list() + for(var/obj/item/weapon/paper/P in T) + if(!P.info) + papers_on_rune.Add(P) + if(!papers_on_rune.len) + to_chat(user, "There must be a blank paper on top of [src]!") + fail_invoke() + log_game("Talisman Creation rune failed - no blank papers on rune") + return + if(rune_in_use) + to_chat(user, "[src] can only support one ritual at a time!") + fail_invoke() + log_game("Talisman Creation rune failed - already in use") + return + var/obj/item/weapon/paper/paper_to_imbue = pick(papers_on_rune) + for(var/I in subtypesof(/obj/item/weapon/paper/talisman) - /obj/item/weapon/paper/talisman/malformed - /obj/item/weapon/paper/talisman/supply - /obj/item/weapon/paper/talisman/supply/weak) + var/obj/item/weapon/paper/talisman/J = I + var/talisman_cult_name = initial(J.cultist_name) + if(talisman_cult_name) + possible_talismans[talisman_cult_name] = J //This is to allow the menu to let cultists select talismans by name + entered_talisman_name = input(user, "Choose a talisman to imbue.", "Talisman Choices") as null|anything in possible_talismans + talisman_type = possible_talismans[entered_talisman_name] + if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || rune_in_use || !talisman_type) + return + ..() + visible_message("Dark power begins to channel into the paper!.") + rune_in_use = 1 + if(!do_after(user, 100, target = get_turf(user))) + rune_in_use = 0 + return + new talisman_type(get_turf(src)) + visible_message("[src] glows with power, and bloody images form themselves on [paper_to_imbue].") + qdel(paper_to_imbue) + rune_in_use = 0 + +var/list/teleport_runes = list() +/obj/effect/rune/teleport + cultist_name = "Teleport" + cultist_desc = "warps everything above it to another chosen teleport rune." + invocation = "Sas'so c'arta forbici!" + icon_state = "2" + req_keyword = 1 + var/listkey + +/obj/effect/rune/teleport/New(loc, set_keyword) + ..() + var/area/A = get_area(src) + var/locname = initial(A.name) + listkey = set_keyword ? "[set_keyword] [locname]":"[locname]" + teleport_runes += src + +/obj/effect/rune/teleport/Destroy() + teleport_runes -= src + return ..() + +/obj/effect/rune/teleport/invoke(var/list/invokers) + var/mob/living/user = invokers[1] //the first invoker is always the user + var/list/potential_runes = list() + var/list/teleportnames = list() + var/list/duplicaterunecount = list() + for(var/R in teleport_runes) + var/obj/effect/rune/teleport/T = R + var/resultkey = T.listkey + if(resultkey in teleportnames) + duplicaterunecount[resultkey]++ + resultkey = "[resultkey] ([duplicaterunecount[resultkey]])" + else + teleportnames.Add(resultkey) + duplicaterunecount[resultkey] = 1 + if(T != src && (!is_level_reachable(T.z))) + potential_runes[resultkey] = T + + if(!potential_runes.len) + to_chat(user, "There are no valid runes to teleport to!") + log_game("Teleport rune failed - no other teleport runes") + fail_invoke() + return + + if(!is_level_reachable(user.z)) + to_chat(user, "You are not in the right dimension!") + log_game("Teleport rune failed - user in away mission") + fail_invoke() + return + + var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport 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(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || !actual_selected_rune) + fail_invoke() + return + + var/turf/T = get_turf(src) + var/movedsomething = 0 + var/moveuserlater = 0 + for(var/atom/movable/A in T) + if(A == user) + moveuserlater = 1 + movedsomething = 1 + continue + if(!A.anchored) + movedsomething = 1 + A.forceMove(get_turf(actual_selected_rune)) + if(movedsomething) + ..() + visible_message("There is a sharp crack of inrushing air, and everything above the rune disappears!") + to_chat(user, "You[moveuserlater ? "r vision blurs, and you suddenly appear somewhere else":" send everything above the rune away"].") + if(moveuserlater) + user.forceMove(get_turf(actual_selected_rune)) + else + fail_invoke() + + +//Rite of Enlightenment: Converts a normal crewmember to the cult. Faster for every cultist nearby. +/obj/effect/rune/convert + cultist_name = "Rite of Enlightenment" + cultist_desc = "converts a normal crewmember on top of it to the cult. Does not work on loyalty-implanted crew." + invocation = "Mah'weyh pleggh at e'ntrath!" + icon_state = "3" + req_cultists = 2 + +/obj/effect/rune/convert/do_invoke_glow() return + +/obj/effect/rune/convert/invoke(var/list/invokers) + var/list/convertees = list() + var/turf/T = get_turf(src) + for(var/mob/living/M in T.contents) + if(!iscultist(M) && !isloyal(M)) + convertees.Add(M) + if(!convertees.len) + fail_invoke() + log_game("Convert rune failed - no eligible convertees") + return + var/mob/living/new_cultist = pick(convertees) + if(!is_convertable_to_cult(new_cultist.mind) || new_cultist.null_rod_check()) + for(var/M in invokers) + to_chat(M, "Something is shielding [new_cultist]'s mind!") + if(is_sacrifice_target(new_cultist.mind)) + to_chat(M, "\"I desire this one for myself. SACRIFICE THEM!\"") + fail_invoke() + log_game("Convert rune failed - convertee could not be converted") + return + ..() + new_cultist.visible_message("[new_cultist] writhes in pain as the markings below them glow a bloody red!", \ + "AAAAAAAAAAAAAA-") + ticker.mode.add_cultist(new_cultist.mind, 1) + new /obj/item/weapon/tome(get_turf(src)) + new_cultist.mind.special_role = "Cultist" + to_chat(new_cultist, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \ + and something evil takes root.") + to_chat(new_cultist, "Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [ticker.mode.cultdat.entity_title3] above all else. Bring it back.\ + ") + +//Rite of Tribute: Sacrifices a crew member to Nar-Sie. Places them into a soul shard if they're in their body. +/obj/effect/rune/sacrifice + cultist_name = "Rite of Tribute" + cultist_desc = "sacrifices a crew member to your god. May place them into a soul shard if their spirit remains in their body." + icon_state = "3" + allow_excess_invokers = 1 + invocation = "Barhah hra zar'garis!" + rune_in_use = 0 + +/obj/effect/rune/sacrifice/New() + ..() + cultist_desc = "sacrifices a crew member to [ticker.mode.cultdat.entity_title3]. May place them into a soul shard if their spirit remains in their body." + +/obj/effect/rune/sacrifice/invoke(var/list/invokers) + if(rune_in_use) + return + rune_in_use = 1 + var/mob/living/user = invokers[1] //the first invoker is always the user + var/turf/T = get_turf(src) + var/list/possible_targets = list() + for(var/mob/living/M in T.contents) + if(M.mind) + if(M.mind in sacrificed) + continue + if(!iscultist(M)) + possible_targets.Add(M) + var/mob/offering + if(possible_targets.len > 1) //If there's more than one target, allow choice + offering = input(user, "Choose an offering to sacrifice.", "Unholy Tribute") as null|anything in possible_targets + if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + return + else if(possible_targets.len) //Otherwise, if there's a target at all, pick the only one + offering = possible_targets[possible_targets.len] + if(!offering) + rune_in_use = 0 + return + if(((ishuman(offering) || isrobot(offering)) && offering.stat != DEAD) || is_sacrifice_target(offering.mind)) //Requires three people to sacrifice living targets + if(invokers.len < 3) + for(var/M in invokers) + to_chat(M, "[offering] is too greatly linked to the world! You need three acolytes!") + fail_invoke() + log_game("Sacrifice rune failed - not enough acolytes and target is living") + rune_in_use = 0 + return + visible_message("[src] pulses blood red!") + color = rgb(126, 23, 23) + ..() + sac(invokers, offering) + color = initial(color) + +/obj/effect/rune/sacrifice/proc/sac(var/list/invokers, mob/living/T) + var/sacrifice_fulfilled + if(T) + if(istype(T, /mob/living/simple_animal/pet/corgi)) + for(var/M in invokers) + var/mob/living/L = M + to_chat(L, "\"Even I have standards, such as they are!\"") + if(L.reagents) + L.reagents.add_reagent("hell_water", 2) + if(T.mind) + sacrificed.Add(T.mind) + if(is_sacrifice_target(T.mind)) + sacrifice_fulfilled = 1 + new /obj/effect/overlay/temp/cult/sac(loc) + for(var/M in invokers) + if(sacrifice_fulfilled) + to_chat(M, "\"Yes! This is the one I desire! You have done well.\"") + else + if(ishuman(T) || isrobot(T)) + to_chat(M, "\"I accept this sacrifice.\"") + else + to_chat(M, "\"I accept this meager sacrifice.\"") + if(T.mind) + var/obj/item/device/soulstone/stone = new /obj/item/device/soulstone(get_turf(src)) + stone.invisibility = INVISIBILITY_MAXIMUM //so it's not picked up during transfer_soul() + if(!stone.transfer_soul("VICTIM", T, usr)) //If it cannot be added + qdel(stone) + if(stone) + stone.invisibility = 0 + if(!T) + rune_in_use = 0 + return + if(isrobot(T)) + playsound(T, 'sound/effects/EMPulse.ogg', 100, 1) + T.dust() //To prevent the MMI from remaining + else + playsound(T, 'sound/magic/Disintegrate.ogg', 100, 1) + T.gib() + rune_in_use = 0 + +//Ritual of Dimensional Rending: Calls forth the avatar of Nar-Sie upon the station. +/obj/effect/rune/narsie + cultist_name = "Tear Reality (God)" + cultist_desc = "tears apart dimensional barriers, calling forth your god. Requires 9 invokers." + invocation = "TOK-LYR RQA-NAP G'OLT-ULOFT!!" + req_cultists = 9 + icon = 'icons/effects/96x96.dmi' + color = rgb(125,23,23) + icon_state = "rune_large" + pixel_x = -32 //So the big ol' 96x96 sprite shows up right + pixel_y = -32 + mouse_opacity = 1 //we're huge and easy to click + scribe_delay = 450 //how long the rune takes to create + scribe_damage = 40.1 //how much damage you take doing it + var/used + +/obj/effect/rune/narsie/New() + ..() + cultist_name = "Summon [ticker.mode.cultdat.entity_name]" + cultist_desc = "tears apart dimensional barriers, calling forth [ticker.mode.cultdat.entity_title3]. Requires 9 invokers." + + +/obj/effect/rune/narsie/check_icon() + return + +/obj/effect/rune/narsie/talismanhide() //can't hide this, and you wouldn't want to + return + +/obj/effect/rune/narsie/invoke(var/list/invokers) + if(used) + return + var/mob/living/user = invokers[1] + if(istype(ticker.mode.name, "cult")) + var/datum/game_mode/cult/cult_mode = ticker.mode + if(!is_station_level(user.z)) + message_admins("[user.real_name]([user.ckey]) tried to summon Nar-Sie off station") + for(var/M in invokers) + var/mob/living/L = M + to_chat(L, "\"YOUR SOUL BURNS WITH YOUR ARROGANCE!!!\"") + if(L.reagents) + L.reagents.add_reagent("hell_water", 10) + L.Weaken(7) + L.Stun(7) + fail_invoke() + log_game("Summon Nar-Sie rune failed - off station Z level") + return + if(!cult_mode.eldergod) + for(var/M in invokers) + to_chat(M, "[ticker.mode.cultdat.entity_name] is already on this plane!") + log_game("Summon Nar-Sie rune failed - already summoned") + return + //BEGIN THE SUMMONING + used = 1 + color = rgb(255, 0, 0) + ..() + world << 'sound/effects/dimensional_rend.ogg' + to_chat(world, "The veil... is... TORN!!!--") + icon_state = "rune_large_distorted" + var/turf/T = get_turf(src) + sleep(40) + new /obj/singularity/narsie/large(T) //Causes Nar-Sie to spawn even if the rune has been removed + cult_mode.eldergod = 0 + +/obj/effect/rune/narsie/attackby(obj/I, mob/user, params) //Since the narsie rune takes a long time to make, add logging to removal. + if((istype(I, /obj/item/weapon/tome) && iscultist(user))) + user.visible_message("[user.name] begins erasing the [src]...", "You begin erasing the [src]...") + if(do_after(user, 50, target = src)) //Prevents accidental erasures. + log_game("Summon Narsie rune erased by [user.mind.key] (ckey) with a tome") + message_admins("[key_name_admin(user)] erased a Narsie rune with a tome") + ..() + return + else + if(istype(I, /obj/item/weapon/nullrod)) //Begone foul magiks. You cannot hinder me. + log_game("Summon Narsie rune erased by [user.mind.key] (ckey) using a null rod") + message_admins("[key_name_admin(user)] erased a Narsie rune with a null rod") + ..() + return + + + +/obj/effect/rune/slaughter + cultist_name = "Call Forth The Slaughter (Demons)" + cultist_desc = "Calls forth the doom of a eldrtich being. Three slaughter demons will appear to wreak havoc on the station." + invocation = null + req_cultists = 9 + color = rgb(125,23,23) + scribe_delay = 450 + scribe_damage = 40.1 //how much damage you take doing it + icon = 'icons/effects/96x96.dmi' + icon_state = "rune_large" + pixel_x = -32 + pixel_y = -32 + + var/used = 0 + +/obj/effect/rune/slaughter/check_icon() + return + +/obj/effect/rune/slaughter/talismanhide() //can't hide this, and you wouldn't want to + return + +/obj/effect/rune/slaughter/attackby(obj/I, mob/user, params) //Since the narsie rune takes a long time to make, add logging to removal. + if((istype(I, /obj/item/weapon/tome) && iscultist(user))) + user.visible_message("[user.name] begins erasing the [src]...", "You begin erasing the [src]...") + if(do_after(user, 50, target = src)) //Prevents accidental erasures. + log_game("Summon demon rune erased by [user.mind.key] (ckey) with a tome") + message_admins("[key_name_admin(user)] erased a demon rune with a tome") + ..() + return + else + if(istype(I, /obj/item/weapon/nullrod)) //Begone foul magiks. You cannot hinder me. + log_game("Summon demon rune erased by [user.mind.key] (ckey) using a null rod") + message_admins("[key_name_admin(user)] erased a demon rune with a null rod") + ..() + return + + +/obj/effect/rune/slaughter/invoke(var/list/invokers) + if(used) + return + var/mob/living/user = invokers[1] + if(istype(ticker.mode.name, "cult")) + var/datum/game_mode/cult/cult_mode = ticker.mode + if(!(CULT_SLAUGHTER in cult_mode.objectives)) + message_admins("[usr.real_name]([user.ckey]) tried to summon demons when the objective was wrong") + for(var/M in invokers) + var/mob/living/L = M + to_chat(L, "\"YOUR SOUL BURNS WITH YOUR ARROGANCE!!!\"") + if(L.reagents) + L.reagents.add_reagent("hell_water", 10) + L.Weaken(7) + L.Stun(7) + fail_invoke() + log_game("Summon Demons rune failed - improper objective") + return + if(!is_station_level(user.z)) + message_admins("[user.real_name]([user.ckey]) tried to summon demons off station") + for(var/M in invokers) + var/mob/living/L = M + to_chat(L, "\"YOUR SOUL BURNS WITH YOUR ARROGANCE!!!\"") + if(L.reagents) + L.reagents.add_reagent("hell_water", 10) + L.Weaken(7) + L.Stun(7) + fail_invoke() + log_game("Summon demons rune failed - off station Z level") + return + if(cult_mode.demons_summoned) + for(var/M in invokers) + to_chat(M, "Demons are already on this plane!") + log_game("Summon Demons rune failed - already summoned") + return + //BEGIN THE SLAUGHTER + used = 1 + for(var/mob/living/M in range(1,src)) + if(iscultist(M)) + M.say("TOK-LYR RQA-NAP SHA-NEX!!") + world << 'sound/effects/dimensional_rend.ogg' + to_chat(world, "A hellish cacaphony bombards from all around as something awful tears through the world...") + icon_state = "rune_large_distorted" + sleep(55) + to_chat(world, "\"LIBREATE TE EX INFERIS!\"")//Fethas note:I COULDN'T HELP IT OKAY?! + visible_message("[src] melts away into blood, and three horrific figures emerge from within!") + var/turf/T = get_turf(src) + new /mob/living/simple_animal/slaughter/cult(T) + new /mob/living/simple_animal/slaughter/cult(T, pick(NORTH, EAST, SOUTH, WEST)) + new /mob/living/simple_animal/slaughter/cult(T, pick(NORTHEAST, SOUTHEAST, NORTHWEST, SOUTHWEST)) + cult_mode.demons_summoned = 1 + shuttle_master.emergency.request(null, 0.5,null) + cult_mode.third_phase() + qdel(src) + + +//Rite of Resurrection: Requires two corpses. Revives one and gibs the other. +/obj/effect/rune/raise_dead + cultist_name = "Rite of Resurrection" + cultist_desc = "requires two corpses, one on the rune and one adjacent to the rune. The one on the rune is brought to life, the other is turned to ash." + invocation = null //Depends on the name of the user - see below + icon_state = "1" + +/obj/effect/rune/raise_dead/invoke(var/list/invokers) + var/turf/T = get_turf(src) + var/mob/living/mob_to_sacrifice + var/mob/living/mob_to_revive + var/list/potential_sacrifice_mobs = list() + var/list/potential_revive_mobs = list() + var/mob/living/user = invokers[1] + if(rune_in_use) + return + for(var/mob/living/M in orange(1,src)) + if(M.stat == DEAD && !iscultist(M)) + potential_sacrifice_mobs.Add(M) + if(!potential_sacrifice_mobs.len) + to_chat(user, "There are no eligible sacrifices nearby!") + log_game("Raise Dead rune failed - no catalyst corpse") + return + mob_to_sacrifice = input(user, "Choose a corpse to sacrifice.", "Corpse to Sacrifice") as null|anything in potential_sacrifice_mobs + if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || !mob_to_revive || !mob_to_sacrifice || rune_in_use) + return + for(var/mob/living/M in T.contents) + if(M.stat == DEAD) + potential_revive_mobs.Add(M) + if(!potential_revive_mobs.len) + to_chat(user, "There is no eligible revival target on the rune!") + log_game("Raise Dead rune failed - no corpse to revived") + return + mob_to_revive = input(user, "Choose a corpse to revive.", "Corpse to Revive") as null|anything in potential_revive_mobs + if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || rune_in_use) + return + if(!in_range(mob_to_sacrifice,src)) + to_chat(user, "The sacrificial target has been moved!") + fail_invoke() + log_game("Raise Dead rune failed - catalyst corpse moved") + return + if(!(mob_to_revive in T.contents)) + to_chat(user, "The corpse to revive has been moved!") + fail_invoke() + log_game("Raise Dead rune failed - revival target moved") + return + if(mob_to_sacrifice.stat != DEAD) + to_chat(user, "The sacrificial target must be dead!") + fail_invoke() + log_game("Raise Dead rune failed - catalyst corpse is not dead") + return + rune_in_use = 1 + if(user.name == "Herbert West") + user.say("To life, to life, I bring them!") + else + user.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") + ..() + mob_to_sacrifice.visible_message("[mob_to_sacrifice]'s body rises into the air, connected to [mob_to_revive] by a glowing tendril!") + mob_to_revive.Beam(mob_to_sacrifice,icon_state="sendbeam",icon='icons/effects/effects.dmi',time=20) + sleep(20) + if(!mob_to_sacrifice || !in_range(mob_to_sacrifice, src)) + mob_to_sacrifice.visible_message("[mob_to_sacrifice] disintegrates into a pile of bones") + return + mob_to_sacrifice.dust() + if(!mob_to_revive || mob_to_revive.stat != DEAD) + visible_message("The glowing tendril snaps against the rune with a shocking crack.") + rune_in_use = 0 + return + mob_to_revive.revive() //This does remove disabilities and such, but the rune might actually see some use because of it! + to_chat(mob_to_revive, "\"PASNAR SAVRAE YAM'TOTH. Arise.\"") + mob_to_revive.visible_message("[mob_to_revive] draws in a huge breath, red light shining from their eyes.", \ + "You awaken suddenly from the void. You're alive!") + rune_in_use = 0 + + +/obj/effect/rune/raise_dead/fail_invoke() + ..() + for(var/mob/living/M in range(1,src)) + if(M.stat == DEAD) + M.visible_message("[M] twitches.") + + +//Rite of Disruption: Emits an EMP blast. +/obj/effect/rune/emp + cultist_name = "Rite of Disruption" + cultist_desc = "emits a large electromagnetic pulse, increasing in size for each cultist invoking it, hindering electronics and disabling silicons." + invocation = "Ta'gh fara'qha fel d'amar det!" + icon_state = "5" + allow_excess_invokers = 1 + +/obj/effect/rune/emp/invoke(var/list/invokers) + var/turf/E = get_turf(src) + ..() + visible_message("[src] glows blue for a moment before vanishing.") + switch(invokers.len) + if(1 to 2) + playsound(E, 'sound/items/Welder2.ogg', 25, 1) + for(var/M in invokers) + to_chat(M, "You feel a minute vibration pass through you...") + if(3 to 6) + playsound(E, 'sound/effects/EMPulse.ogg', 50, 1) + for(var/M in invokers) + to_chat(M, "Your hair stands on end as a shockwave eminates from the rune!") + if(7 to INFINITY) + playsound(E, 'sound/effects/EMPulse.ogg', 100, 1) + for(var/M in invokers) + var/mob/living/L = M + to_chat(L, "You chant in unison and a colossal burst of energy knocks you backward!") + L.Weaken(2) + qdel(src) //delete before pulsing because it's a delay reee + empulse(E, 9*invokers.len, 12*invokers.len) // Scales now, from a single room to most of the station depending on # of chanters + +//Rite of Astral Communion: Separates one's spirit from their body. They will take damage while it is active. +/obj/effect/rune/astral + cultist_name = "Astral Communion" + cultist_desc = "severs the link between one's spirit and body. This effect is taxing and one's physical body will take damage while this is active." + invocation = "Fwe'sh mah erl nyag r'ya!" + icon_state = "6" + rune_in_use = 0 //One at a time, please! + construct_invoke = 0 + var/mob/living/affecting = null + +/obj/effect/rune/astral/examine(mob/user) + ..() + if(affecting) + to_chat(user, "A translucent field encases [user] above the rune!") + +/obj/effect/rune/astral/can_invoke(mob/living/user) + if(rune_in_use) + to_chat(user, "[src] cannot support more than one body!") + log_game("Astral Communion rune failed - more than one user") + return list() + var/turf/T = get_turf(src) + if(!user in T.contents) + to_chat(user, "You must be standing on top of [src]!") + log_game("Astral Communion rune failed - user not standing on rune") + return list() + return ..() + +/obj/effect/rune/astral/invoke(var/list/invokers) + var/mob/living/user = invokers[1] + ..() + var/turf/T = get_turf(src) + rune_in_use = 1 + affecting = user + user.color = "#7e1717" + user.visible_message("[user] freezes statue-still, glowing an unearthly red.", \ + "You see what lies beyond. All is revealed. While this is a wondrous experience, your physical form will waste away in this state. Hurry...") + user.ghostize(1) + while(user) + if(!affecting) + visible_message("[src] pulses gently before falling dark.") + affecting = null //In case it's assigned to a number or something + rune_in_use = 0 + return + affecting.apply_damage(1, BRUTE) + if(!(user in T.contents)) + user.visible_message("A spectral tendril wraps around [user] and pulls them back to the rune!") + Beam(user,icon_state="drainbeam",icon='icons/effects/effects.dmi',time=2) + user.forceMove(get_turf(src)) //NO ESCAPE :^) + if(user.key) + user.visible_message("[user] slowly relaxes, the glow around them dimming.", \ + "You are re-united with your physical form. [src] releases its hold over you.") + user.color = initial(user.color) + user.Weaken(3) + rune_in_use = 0 + affecting = null + user.update_sight() + return + if(user.stat == UNCONSCIOUS) + if(prob(10)) + var/mob/dead/observer/G = user.get_ghost() + if(G) + to_chat(G, "You feel the link between you and your body weakening... you must hurry!") + if(user.stat == DEAD) + user.color = initial(user.color) + rune_in_use = 0 + affecting = null + var/mob/dead/observer/G = user.get_ghost() + if(G) + to_chat(G, "You suddenly feel your physical form pass on. [src]'s exertion has killed you!") + return + sleep(10) + rune_in_use = 0 + + +//Rite of the Corporeal Shield: When invoked, becomes solid and cannot be passed. Invoke again to undo. +/obj/effect/rune/wall + cultist_name = "Rite of the Corporeal Shield" + cultist_desc = "when invoked, makes an invisible wall to block passage. Can be invoked again to reverse this." + invocation = "Khari'd! Eske'te tannin!" + icon_state = "1" + +/obj/effect/rune/wall/examine(mob/user) + ..() + if(density) + to_chat(user, "There is a barely perceptible shimmering of the air above [src].") + +/obj/effect/rune/wall/invoke(var/list/invokers) + var/mob/living/user = invokers[1] + ..() + density = !density + user.visible_message("[user] places their hands on [src], and [density ? "the air above it begins to shimmer" : "the shimmer above it fades"].", \ + "You channel your life energy into [src], [density ? "preventing" : "allowing"] passage above it.") + if(iscarbon(user)) + var/mob/living/carbon/C = user + C.apply_damage(2, BRUTE, pick("l_arm", "r_arm")) + + +//Rite of Joined Souls: Summons a single cultist. +/obj/effect/rune/summon + cultist_name = "Rite of Joined Souls" + cultist_desc = "summons a single cultist to the rune. Requires 2 invokers." + invocation = "N'ath reth sh'yro eth d'rekkathnor!" + req_cultists = 2 + allow_excess_invokers = 1 + icon_state = "5" + +/obj/effect/rune/summon/invoke(var/list/invokers) + var/mob/living/user = invokers[1] + var/list/cultists = list() + for(var/datum/mind/M in ticker.mode.cult) + if(!(M.current in invokers) && M.current.stat != DEAD) + cultists |= M.current + var/mob/living/cultist_to_summon = input(user, "Who do you wish to call to [src]?", "Followers of [ticker.mode.cultdat.entity_title3]") as null|anything in cultists + if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + return + if(!cultist_to_summon) + to_chat(user, "You require a summoning target!") + fail_invoke() + log_game("Summon Cultist rune failed - no target") + return + if(!iscultist(cultist_to_summon)) + to_chat(user, "[cultist_to_summon] is not a follower of [ticker.mode.cultdat.entity_title3]!") + fail_invoke() + log_game("Summon Cultist rune failed - no target") + return + if(!is_level_reachable(cultist_to_summon.z)) + to_chat(user, "[cultist_to_summon] is not in our dimension!") + fail_invoke() + log_game("Summon Cultist rune failed - target in away mission") + return + cultist_to_summon.visible_message("[cultist_to_summon] suddenly disappears in a flash of red light!", \ + "Overwhelming vertigo consumes you as you are hurled through the air!") + ..() + visible_message("A foggy shape materializes atop [src] and solidifes into [cultist_to_summon]!") + user.apply_damage(10, BRUTE, "head") + cultist_to_summon.forceMove(get_turf(src)) + qdel(src) + +//Rite of Boiling Blood: Deals extremely high amounts of damage to non-cultists nearby +/obj/effect/rune/blood_boil + cultist_name = "Boil Blood" + cultist_desc = "boils the blood of non-believers who can see the rune, dealing extreme amounts of damage. Requires 3 invokers." + invocation = "Dedo ol'btoh!" + icon_state = "4" + construct_invoke = 0 + req_cultists = 3 + +/obj/effect/rune/blood_boil/do_invoke_glow() + return + +/obj/effect/rune/blood_boil/invoke(var/list/invokers) + ..() + var/turf/T = get_turf(src) + visible_message("[src] briefly bubbles before exploding!") + for(var/mob/living/carbon/C in viewers(T)) + if(!iscultist(C)) + var/obj/item/weapon/nullrod/N = C.null_rod_check() + if(N) + to_chat(C, "\The [N] suddenly burns hotly before returning to normal!") + continue + to_chat(C, "Your blood boils in your veins!") + C.take_overall_damage(45,45) + C.Stun(7) + for(var/M in invokers) + var/mob/living/L = M + L.apply_damage(15, BRUTE, pick("l_arm", "r_arm")) + to_chat(L,"[src] saps your strength!") + qdel(src) + explosion(T, -1, 0, 1, 5) + +//Deals brute damage to all targets on the rune and heals the invoker for each target drained. +/obj/effect/rune/leeching + cultist_name = "Drain Life" + cultist_desc = "drains the life of all targets on the rune, restoring life to the user." + invocation = "Yu'gular faras desdae. Umathar uf'kal thenar!" + icon_state = "3" + +/obj/effect/rune/leeching/can_invoke(mob/living/user) + if(world.time <= user.next_move) + return list() + var/turf/T = get_turf(src) + var/list/potential_targets = list() + for(var/mob/living/carbon/M in T.contents - user) + if(M.stat != DEAD) + potential_targets += M + if(!potential_targets.len) + to_chat(user, "There must be at least one valid target on the rune!") + log_game("Leeching rune failed - no valid targets") + return list() + return ..() + +/obj/effect/rune/leeching/invoke(var/list/invokers) + var/mob/living/user = invokers[1] + user.changeNext_move(CLICK_CD_MELEE) + ..() + var/turf/T = get_turf(src) + for(var/mob/living/carbon/M in T.contents - user) + if(M.stat != DEAD) + var/drained_amount = rand(10,20) + M.apply_damage(drained_amount, BRUTE, "chest") + user.adjustBruteLoss(-drained_amount) + to_chat(M, "You feel extremely weak.") + user.Beam(T,icon_state="drainbeam",icon='icons/effects/effects.dmi',time=5) + user.visible_message("Blood flows from the rune into [user]!", \ + "Blood flows into you, healing your wounds and revitalizing your spirit.") + + +//Rite of Spectral Manifestation: Summons a ghost on top of the rune as a cultist human with no items. User must stand on the rune at all times, and takes damage for each summoned ghost. +/obj/effect/rune/manifest + cultist_name = "Rite of Spectral Manifestation" + cultist_desc = "manifests a spirit as a servant of your god. The invoker must not move from atop the rune, and will take damage for each summoned spirit." + invocation = "Gal'h'rfikk harfrandid mud'gib!" //how the fuck do you pronounce this + icon_state = "6" + construct_invoke = 0 + color = rgb(200, 0, 0) + +/obj/effect/rune/manifest/New(loc) + ..() + cultist_desc = "manifests a spirit as a servant of [ticker.mode.cultdat.entity_title3]. The invoker must not move from atop the rune, and will take damage for each summoned spirit." + + notify_ghosts("Manifest rune created in [get_area(src)].", 'sound/effects/ghost2.ogg', source = src) + +/obj/effect/rune/manifest/can_invoke(mob/living/user) + if(!(user in get_turf(src))) + to_chat(user,"You must be standing on [src]!") + fail_invoke() + log_game("Manifest rune failed - user not standing on rune") + return list() + var/list/ghosts_on_rune = list() + for(var/mob/dead/observer/O in get_turf(src)) + if(O.client && !jobban_isbanned(O, ROLE_CULTIST)) + ghosts_on_rune |= O + if(!ghosts_on_rune.len) + to_chat(user, "There are no spirits near [src]!") + fail_invoke() + log_game("Manifest rune failed - no nearby ghosts") + return list() + return ..() + +/obj/effect/rune/manifest/invoke(var/list/invokers) + var/mob/living/user = invokers[1] + var/list/ghosts_on_rune = list() + for(var/mob/dead/observer/O in get_turf(src)) + if(O.client && !jobban_isbanned(O, ROLE_CULTIST)) + ghosts_on_rune |= O + var/mob/dead/observer/ghost_to_spawn = pick(ghosts_on_rune) + var/mob/living/carbon/human/new_human = new(get_turf(src)) + new_human.real_name = ghost_to_spawn.real_name + new_human.alpha = 150 //Makes them translucent + ..() + visible_message("A cloud of red mist forms above [src], and from within steps... a man.") + to_chat(user, "Your blood begins flowing into [src]. You must remain in place and conscious to maintain the forms of those summoned. This will hurt you slowly but surely...") + var/obj/machinery/shield/N = new(get_turf(src)) + N.name = "Invoker's Shield" + N.desc = "A weak shield summoned by cultists to protect them while they carry out delicate rituals" + N.color = "red" + N.health = 20 + N.mouse_opacity = 0 + new_human.key = ghost_to_spawn.key + ticker.mode.add_cultist(new_human.mind, 0) + to_chat(new_human, "You are a servant of [ticker.mode.cultdat.entity_title3]. You have been made semi-corporeal by the cult of [ticker.mode.cultdat.entity_name], and you are to serve them at all costs.") + + while(user in get_turf(src)) + if(user.stat) + break + user.apply_damage(0.1, BRUTE) + sleep(3) + + qdel(N) + if(new_human) + new_human.visible_message("[new_human] suddenly dissolves into bones and ashes.", \ + "Your link to the world fades. Your form breaks apart.") + for(var/obj/I in new_human) + new_human.unEquip(I) + new_human.dust() \ No newline at end of file diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 89c473421de..5f751556d0d 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -566,7 +566,10 @@ About the new airlock wires panel: ui.open() ui.set_auto_update(1) -/obj/machinery/door/airlock/ui_data(mob/user, datum/topic_state/state = default_state) +/obj/machinery/door/airlock/attack_ai(mob/user as mob) + ui_interact(user) + +/obj/machinery/door/airlock/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls - [src]", 600, 375) diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 7e49136d3cf..94967f60c95 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -110,4 +110,62 @@ /obj/effect/overlay/wall_rot/New() ..() pixel_x += rand(-10, 10) - pixel_y += rand(-10, 10) \ No newline at end of file + pixel_y += rand(-10, 10) +/obj/effect/overlay/temp/cult + randomdir = 0 + duration = 10 + + + icon = 'icons/effects/effects.dmi' + +/obj/effect/overlay/temp/cult/sparks + randomdir = 1 + name = "blood sparks" + icon_state = "bloodsparkles" + +/obj/effect/overlay/temp/cult/phase + name = "phase glow" + duration = 7 + icon_state = "cultin" + +/obj/effect/overlay/temp/cult/phase/New(loc, set_dir) + ..() + if(set_dir) + dir = set_dir + +/obj/effect/overlay/temp/cult/phase/out + icon_state = "cultout" + +/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed + name = "healing glow" + icon = 'icons/effects/effects.dmi' + icon_state = "heal" + duration = 15 + +/obj/effect/overlay/temp/heal/New(loc, colour) + ..() + pixel_x = rand(-12, 12) + pixel_y = rand(-9, 0) + if(colour) + color = colour + +/obj/effect/overlay/temp/cult/sac + name = "maw of Nar-Sie" + icon_state = "sacconsume" + +/obj/effect/overlay/temp/cult/door + name = "unholy glow" + icon_state = "doorglow" + layer = 3.17 //above closed doors + +/obj/effect/overlay/temp/cult/door/unruned + icon_state = "unruneddoorglow" + +/obj/effect/overlay/temp/cult/turf + name = "unholy glow" + icon_state = "wallglow" + layer = TURF_LAYER + 0.07 + +/obj/effect/overlay/temp/cult/turf/open/floor + icon_state = "floorglow" + duration = 5 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index cfd925fd14f..5730b1a49c1 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -601,15 +601,6 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(E.see_invisible) H.see_invisible = min(H.see_invisible, E.see_invisible) - - if(H.seer == 1) - var/obj/effect/rune/R = locate() in H.loc - if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"]) - H.see_invisible = SEE_INVISIBLE_OBSERVER - else - H.see_invisible = SEE_INVISIBLE_LIVING - H.seer = 0 - var/lesser_darkview_bonus = INFINITY // my glasses, I can't see without my glasses if(H.glasses)