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/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index ed0b7887e5a..c8d4fd2c659 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -49,6 +49,9 @@ whitelisted_species += S.name init_subtypes(/datum/crafting_recipe, crafting_recipes) + + all_cults = typesof(/datum/cult_info) + return 1 /* // Uncomment to debug chemical reaction list. diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index e0d25da3ffd..9f0319c84af 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1810,4 +1810,13 @@ var/global/list/g_fancy_list_of_types = null . += 4 sleep(world.tick_lag*4) //you might be thinking of adding more steps to this, or making it use a loop and a counter var - // not worth it. \ No newline at end of file + // not worth it. + +/proc/make_bit_triplet() + var/list/num_sample = list(1, 2, 3, 4, 5, 6, 7, 8, 9) + var/result = 0 + for(var/i = 0, i < 3, i++) + var/num = pick(num_sample) + num_sample -= num + result += (1 << num) + return result \ No newline at end of file diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index d844292fbb1..7e146a8fc4e 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -108,6 +108,7 @@ #define ui_construct_pull "EAST-1:28,SOUTH+1:10" //above the zone_sel icon +#define ui_construct_health "EAST,CENTER:15" //same height as humans, hugging the right border //Pop-up inventory #define ui_shoes "WEST+1:8,SOUTH:5" diff --git a/code/_onclick/hud/constructs.dm b/code/_onclick/hud/constructs.dm new file mode 100644 index 00000000000..7ed1d66724f --- /dev/null +++ b/code/_onclick/hud/constructs.dm @@ -0,0 +1,63 @@ +/mob/living/simple_animal/hostile/construct/armoured/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/construct/armoured(src) + +/mob/living/simple_animal/hostile/construct/behemoth/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/construct/armoured(src) + +/datum/hud/construct/armoured/New(mob/owner) + ..() + mymob.healths = new /obj/screen() + mymob.healths.icon = 'icons/mob/screen_construct.dmi' + mymob.healths.icon_state = "juggernaut_health0" + mymob.healths.name = "health" + mymob.healths.screen_loc = ui_construct_health + infodisplay += mymob.healths + +/mob/living/simple_animal/hostile/construct/builder/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/construct/builder(src) + +/datum/hud/construct/builder/New(mob/owner) + ..() + mymob.healths = new /obj/screen() + mymob.healths.icon = 'icons/mob/screen_construct.dmi' + mymob.healths.icon_state = "artificer_health0" + mymob.healths.name = "health" + mymob.healths.screen_loc = ui_construct_health + infodisplay += mymob.healths + +/mob/living/simple_animal/hostile/construct/wraith/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/construct/wraith(src) + +/datum/hud/construct/wraith/New(mob/owner) + ..() + mymob.healths = new /obj/screen() + mymob.healths.icon = 'icons/mob/screen_construct.dmi' + mymob.healths.icon_state = "wraith_health0" + mymob.healths.name = "health" + mymob.healths.screen_loc = ui_construct_health + infodisplay += mymob.healths + +/mob/living/simple_animal/hostile/construct/harvester/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/construct/harvester(src) + +/datum/hud/construct/harvester/New(mob/owner) + ..() + mymob.healths = new /obj/screen() + mymob.healths.icon = 'icons/mob/screen_construct.dmi' + mymob.healths.icon_state = "harvester_health0" + mymob.healths.name = "health" + mymob.healths.screen_loc = ui_construct_health + infodisplay += mymob.healths + +/datum/hud/construct/New(mob/owner) + ..() + mymob.pullin = new /obj/screen/pull() + mymob.pullin.icon = 'icons/mob/screen_construct.dmi' + mymob.pullin.icon_state = "pull0" + mymob.pullin.name = "pull" + mymob.pullin.screen_loc = ui_construct_pull \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 50595bb23a6..fcf1ded97cc 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -791,8 +791,8 @@ if(!(src in ticker.mode.cult)) ticker.mode.add_cultist(src) special_role = SPECIAL_ROLE_CULTIST - to_chat(current, "You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.") - to_chat(current, "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.") + to_chat(current, "You catch a glimpse of the Realm of [ticker.mode.cultdat.entity_name], [ticker.mode.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.mode.cultdat.entity_name].") + to_chat(current, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve [ticker.mode.cultdat.entity_title2] above all else. Bring It back.") log_admin("[key_name(usr)] has culted [key_name(current)]") message_admins("[key_name_admin(usr)] has culted [key_name_admin(current)]") if("tome") @@ -1315,17 +1315,16 @@ ticker.mode.cult += src ticker.mode.update_cult_icons_added(src) special_role = SPECIAL_ROLE_CULTIST - to_chat(current, "You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.") - to_chat(current, "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.") + to_chat(current, "You catch a glimpse of the Realm of [ticker.mode.cultdat.entity_name], [ticker.mode.cultdat.entity_title2]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.mode.cultdat.entity_name].") + to_chat(current, "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/datum/game_mode/cult/cult = ticker.mode if(istype(cult)) cult.memorize_cult_objectives(src) else - var/explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it." + var/explanation = "Summon [ticker.mode.cultdat.entity_name] via the use of the appropriate rune. It will only work if nine cultists stand on and around it." to_chat(current, "Objective #1: [explanation]") current.memory += "Objective #1: [explanation]
" - to_chat(current, "The convert rune is join blood self") - current.memory += "The convert rune is join blood self
" + var/mob/living/carbon/human/H = current if(istype(H)) diff --git a/code/datums/spells/construct_spells.dm b/code/datums/spells/construct_spells.dm index 8cbc46e2f03..8632b89df12 100644 --- a/code/datums/spells/construct_spells.dm +++ b/code/datums/spells/construct_spells.dm @@ -2,11 +2,14 @@ /obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser charge_max = 1800 + action_icon_state = "lesserconstruct" + action_background_icon_state = "bg_cult" /obj/effect/proc_holder/spell/aoe_turf/conjure/floor name = "Floor Construction" desc = "This spell constructs a cult floor" - + action_icon_state = "floorconstruct" + action_background_icon_state = "bg_cult" school = "conjuration" charge_max = 20 clothes_req = 0 @@ -19,7 +22,8 @@ /obj/effect/proc_holder/spell/aoe_turf/conjure/wall name = "Lesser Construction" desc = "This spell constructs a cult wall" - + action_icon_state = "lesserconstruct" + action_background_icon_state = "bg_cult" school = "conjuration" charge_max = 100 clothes_req = 0 @@ -47,7 +51,8 @@ /obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone name = "Summon Soulstone" desc = "This spell reaches into Nar-Sie's realm, summoning one of the legendary fragments across time and space" - + action_icon_state = "summonsoulstone" + action_background_icon_state = "bg_cult" school = "conjuration" charge_max = 3000 clothes_req = 0 @@ -57,25 +62,47 @@ summon_type = list(/obj/item/device/soulstone) +/obj/effect/proc_holder/spell/aoe_turf/conjure/pylon + name = "Cult Pylon" + desc = "This spell conjures a fragile crystal from Nar-Sie's realm. Makes for a convenient light source." + action_icon_state = "summonsoulstone" + action_background_icon_state = "bg_cult" + school = "conjuration" + charge_max = 200 + clothes_req = 0 + invocation = "none" + invocation_type = "none" + range = 0 + + summon_type = list(/obj/structure/cult/functional/pylon) + /obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall name = "Shield" desc = "This spell creates a temporary forcefield to shield yourself and allies from incoming fire" - + action_icon_state = "cultforcewall" + action_background_icon_state = "bg_cult" school = "transmutation" charge_max = 300 clothes_req = 0 invocation = "none" invocation_type = "none" range = 0 - summon_type = list(/obj/effect/forcefield) + summon_type = list(/obj/effect/forcefield/cult) summon_lifespan = 200 +/obj/effect/forcefield/cult + desc = "That eerie looking obstacle seems to have been pulled from another dimension through sheer force" + name = "eldritch wall" + icon = 'icons/effects/effects.dmi' + icon_state = "m_shield_cult" + light_color = LIGHT_COLOR_PURE_RED /obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift name = "Phase Shift" desc = "This spell allows you to pass through walls" - + action_icon_state = "phaseshift" + action_background_icon_state = "bg_cult" school = "transmutation" charge_max = 200 clothes_req = 0 @@ -91,7 +118,7 @@ /obj/effect/proc_holder/spell/targeted/projectile/magic_missile/lesser name = "Lesser Magic Missile" desc = "This spell fires several, slow moving, magic projectiles at nearby targets." - + action_background_icon_state = "bg_cult" school = "evocation" charge_max = 400 clothes_req = 0 @@ -103,7 +130,8 @@ /obj/effect/proc_holder/spell/targeted/smoke/disable name = "Paralysing Smoke" desc = "This spell spawns a cloud of paralysing smoke." - + action_icon_state = "parasmoke" + action_background_icon_state = "bg_cult" school = "conjuration" charge_max = 200 clothes_req = 0 diff --git a/code/game/gamemodes/antag_hud.dm b/code/game/gamemodes/antag_hud.dm index 172c2c1e54c..4b290932e8e 100644 --- a/code/game/gamemodes/antag_hud.dm +++ b/code/game/gamemodes/antag_hud.dm @@ -10,8 +10,7 @@ CRASH("join_hud(): [M] ([M.type]) is not a mob!") if(M.mind.antag_hud && !slave) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged M.mind.antag_hud.leave_hud(M) - if(!ismask(M))//FUCK YOU MASK OF NARNAR! - add_to_hud(M) + add_to_hud(M) if(self_visible) add_hud_to(M) M.mind.antag_hud = src diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 63195a186ab..6a92052eed5 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -1,9 +1,8 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 +var/global/list/all_cults = list() /datum/game_mode var/list/datum/mind/cult = list() - var/list/allwords = list("travel","self","see","hell","blood","join","tech","destroy", "other", "hide") - /proc/iscultist(mob/living/M as mob) return istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.cult) @@ -22,8 +21,20 @@ var/mob/living/carbon/human/H = mind.current if(isloyal(H)) return 0 + if(issilicon(mind.current)) + return 0 //can't convert machines, that's ratvar's thing + if(isguardian(mind.current)) + var/mob/living/simple_animal/hostile/guardian/G = mind.current + if(!iscultist(G.summoner)) + return 0 //can't convert it unless the owner is converted return 1 +/proc/is_sacrifice_target(datum/mind/mind) + if(istype(ticker.mode.name, "cult")) + var/datum/game_mode/cult/cult_mode = ticker.mode + if(mind == cult_mode.sacrifice_target) + return 1 + return 0 /datum/game_mode/cult name = "cult" @@ -37,17 +48,37 @@ var/datum/mind/sacrifice_target = null var/finished = 0 - var/list/startwords = list("blood","join","self","hell") var/list/objectives = list() var/eldergod = 1 //for the summon god objective + var/demons_summoned = 0 var/acolytes_needed = 4 //for the survive objective - base number of acolytes, increased by 1 for every 10 players var/const/min_cultists_to_start = 3 var/const/max_cultists_to_start = 4 var/acolytes_survived = 0 + var/narsie_condition_cleared = 0 //allows Nar-Sie to be summonned during cult rounds. set to 1 once the cult reaches the second phase. + var/current_objective = 1 //equals the number of cleared objectives + 1 + var/prenarsie_objectives = 2 //how many objectives at most before the cult gets to summon narsie + var/list/bloody_floors = list() + var/spilltarget = 100 //how many floor tiles must be covered in blood to complete the bloodspill objective + var/convert_target = 0 //how many members the cult needs to reach to complete the convert objective + var/harvested = 0 + + var/list/sacrificed = list() //contains the mind of the sacrifice target ONCE the sacrifice objective has been completed + var/mass_convert = 0 //set to 1 if the convert objective has been accomplised once that round + var/spilled_blood = 0 //set to 1 if the bloodspill objective has been accomplised once that round + var/max_spilled_blood = 0 //highest quantity of blood covered tiles during the round + var/bonus = 0 //set to 1 if the cult has completed the bonus (third phase) objective (harvest, hijack, massacre) + + var/harvest_target = 10 + var/massacre_target = 5 + + var/escaped_shuttle = 0 + var/escaped_pod = 0 + var/survivors = 0 /datum/game_mode/cult/announce() to_chat(world, "The current game mode is - Cult!") @@ -55,16 +86,9 @@ /datum/game_mode/cult/pre_setup() - if(prob(50)) - objectives += "survive" - objectives += "sacrifice" - else - objectives += "eldergod" - objectives += "sacrifice" - if(config.protect_roles_from_antagonist) restricted_jobs += protected_jobs - + ..() var/list/cultists_possible = get_players_for_role(ROLE_CULTIST) for(var/cultists_number = 1 to max_cultists_to_start) @@ -92,10 +116,13 @@ for(var/datum/mind/cult_mind in cult) equip_cultist(cult_mind.current) - grant_runeword(cult_mind.current) + cult_mind.current.faction |= "cult" + var/datum/action/innate/cultcomm/C = new() + C.Grant(cult_mind.current) update_cult_icons_added(cult_mind) - to_chat(cult_mind.current, "\blue You are a member of the cult!") - memorize_cult_objectives(cult_mind) + to_chat(cult_mind.current, "You catch a glimpse of the Realm of [ticker.mode.cultdat.entity_name], [ticker.mode.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.mode.cultdat.entity_name].") + + first_phase() ..() @@ -106,17 +133,19 @@ switch(objectives[obj_count]) if("survive") explanation = "Our knowledge must live on. Make sure at least [acolytes_needed] acolytes escape on the shuttle to spread their work on an another station." + if("convert") + explanation = "We must increase our influence before we can summon [ticker.mode.cultdat.entity_name], Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." + if("bloodspill") + explanation = "We must prepare this place for [ticker.mode.cultdat.entity_title1]'s coming. Spill blood and gibs over [spilltarget] floor tiles." if("sacrifice") if(sacrifice_target) - explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune (hell blood join) and three acolytes to do so." + explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune and three acolytes to do so." else explanation = "Free objective." if("eldergod") - explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it." + explanation = "Summon [ticker.mode.cultdat.entity_name]. It will only work if nine cultists stand on and around it." to_chat(cult_mind.current, "Objective #[obj_count]: [explanation]") cult_mind.memory += "Objective #[obj_count]: [explanation]
" - to_chat(cult_mind.current, "The convert rune is join blood self") - cult_mind.memory += "The convert rune is join blood self
" /datum/game_mode/proc/equip_cultist(mob/living/carbon/human/mob) @@ -128,8 +157,6 @@ to_chat(mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.") mob.mutations.Remove(CLUMSY) - add_cult_viewpoint(mob) // give them a viewpoint - var/obj/item/weapon/paper/talisman/supply/T = new(mob) var/list/slots = list ( "backpack" = slot_in_backpack, @@ -140,49 +167,25 @@ ) var/where = mob.equip_in_one_of_slots(T, slots) if(!where) - to_chat(mob, "Unfortunately, you weren't able to get a talisman. This is very bad and you should adminhelp immediately.") + to_chat(mob, "Unfortunately, you weren't able to get a talisman. This is very bad and you should adminhelp immediately.") else - to_chat(mob, "You have a talisman in your [where], one that will help you start the cult on this station. Use it well and remember - there are others.") + to_chat(mob, "You have a talisman in your [where], one that will help you start the cult on this station. Use it well and remember - there are others.") mob.update_icons() return 1 -/datum/game_mode/cult/grant_runeword(mob/living/carbon/human/cult_mob, var/word) - if(!word) - if(startwords.len > 0) - word=pick(startwords) - startwords -= word - return ..(cult_mob,word) - - -/datum/game_mode/proc/grant_runeword(mob/living/carbon/human/cult_mob, var/word) - if(!cultwords["travel"]) - runerandom() - if(!word) - word=pick(allwords) - var/wordexp = "[cultwords[word]] is [word]..." - to_chat(cult_mob, "\red [pick("You remember something from the dark teachings of your master","You hear a dark voice on the wind","Black blood oozes into your vision and forms into symbols","You have a vision of a [pick("crow","raven","vulture","parrot")] it squawks","You catch a brief glimmer of the otherside")]... [wordexp]") - cult_mob.mind.store_memory("You remember that [wordexp]", 0, 0) - - -/datum/game_mode/proc/add_cult_viewpoint(var/mob/target) - for(var/obj/cult_viewpoint/viewpoint in target) - return - var/obj/cult_viewpoint/viewpoint = new(target) - viewpoint.loc = target - return viewpoint - - /datum/game_mode/proc/add_cultist(datum/mind/cult_mind) //BASE if(!istype(cult_mind)) return 0 if(!(cult_mind in cult) && is_convertable_to_cult(cult_mind)) cult += cult_mind - add_cult_viewpoint(cult_mind.current) - update_cult_icons_added(cult_mind) + cult_mind.current.faction |= "cult" + var/datum/action/innate/cultcomm/C = new() + C.Grant(cult_mind.current) cult_mind.current.attack_log += "\[[time_stamp()]\] Has been converted to the cult!" if(jobban_isbanned(cult_mind.current, ROLE_CULTIST)) replace_jobbaned_player(cult_mind.current, ROLE_CULTIST) + update_cult_icons_added(cult_mind) return 1 @@ -195,41 +198,19 @@ /datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = 1) if(cult_mind in cult) cult -= cult_mind - to_chat(cult_mind.current, "\red An unfamiliar white light flashes through your mind, cleansing the taint of the dark-one and the memories of your time as his servant with it.") + to_chat(cult_mind.current, "An unfamiliar white light flashes through your mind, cleansing the taint of the dark-one and the memories of your time as his servant with it.") + cult_mind.current.faction -= "cult" cult_mind.memory = "" cult_mind.special_role = null - // remove the cult viewpoint object - var/obj/viewpoint = getCultViewpoint(cult_mind.current) - qdel(viewpoint) - + for(var/datum/action/innate/cultcomm/C in cult_mind.current.actions) + qdel(C) update_cult_icons_removed(cult_mind) if(show_message) for(var/mob/M in viewers(cult_mind.current)) to_chat(M, "[cult_mind.current] looks like they just reverted to their old faith!") -/datum/game_mode/proc/add_cult_icon_to_spirit(mob/spirit/currentSpirit) - if(!istype(currentSpirit)) - return FALSE - if(currentSpirit.client) - var/datum/atom_hud/antag/maskhud = huds[ANTAG_HUD_CULT] - maskhud.join_hud(currentSpirit) - set_antag_hud(currentSpirit,"hudcultist") - - -/datum/game_mode/proc/remove_cult_icon_from_spirit(mob/spirit/currentSpirit) - if(!istype(currentSpirit)) - return FALSE - if(currentSpirit.client) - var/datum/atom_hud/antag/maskhud = huds[ANTAG_HUD_CULT] - maskhud.leave_hud(currentSpirit) - set_antag_hud(currentSpirit, null) - - /datum/game_mode/proc/update_cult_icons_added(datum/mind/cult_mind) - for(var/mob/spirit/currentSpirit in spirits) - add_cult_icon_to_spirit(currentSpirit,cult_mind) - var/datum/atom_hud/antag/culthud = huds[ANTAG_HUD_CULT] culthud.join_hud(cult_mind.current) set_antag_hud(cult_mind.current, "hudcultist") @@ -237,9 +218,6 @@ /datum/game_mode/proc/update_cult_icons_removed(datum/mind/cult_mind) - for(var/mob/spirit/currentSpirit in spirits) - remove_cult_icon_from_spirit(currentSpirit,cult_mind) - var/datum/atom_hud/antag/culthud = huds[ANTAG_HUD_CULT] culthud.leave_hud(cult_mind.current) set_antag_hud(cult_mind.current, null) @@ -259,9 +237,18 @@ cult_fail += check_survive() //the proc returns 1 if there are not enough cultists on the shuttle, 0 otherwise if(objectives.Find("eldergod")) cult_fail += eldergod //1 by default, 0 if the elder god has been summoned at least once + if(objectives.Find("slaughter")) + if(!demons_summoned) + cult_fail++ if(objectives.Find("sacrifice")) if(sacrifice_target && !(sacrifice_target in sacrificed)) //if the target has been sacrificed, ignore this step. otherwise, add 1 to cult_fail cult_fail++ + if(objectives.Find("convert")) + if(cult.len < convert_target) + cult_fail++ + if(objectives.Find("bloodspill")) + if(max_spilled_blood < spilltarget) + cult_fail++ return cult_fail //if any objectives aren't met, failure @@ -287,15 +274,16 @@ /datum/game_mode/cult/declare_completion() + bonus_check() if(!check_cult_victory()) feedback_set_details("round_end_result","win - cult win") feedback_set("round_end_result",acolytes_survived) - to_chat(world, "\red The cult wins! It has succeeded in serving its dark masters!") + to_chat(world, " The cult wins! It has succeeded in serving its dark masters!") else feedback_set_details("round_end_result","loss - staff stopped the cult") feedback_set("round_end_result",acolytes_survived) - to_chat(world, "\red The staff managed to stop the cult!") + to_chat(world, " The staff managed to stop the cult!") var/text = "Cultists escaped: [acolytes_survived]" @@ -324,11 +312,59 @@ feedback_add_details("cult_objective","cult_sacrifice|FAIL|GIBBED") if("eldergod") if(!eldergod) - explanation = "Summon Nar-Sie. Success!" + explanation = "Summon [ticker.mode.cultdat.entity_name]. Success!" feedback_add_details("cult_objective","cult_narsie|SUCCESS") else - explanation = "Summon Nar-Sie. Fail." + explanation = "Summon [ticker.mode.cultdat.entity_name]. Fail." feedback_add_details("cult_objective","cult_narsie|FAIL") + if("slaughter") + if(demons_summoned) + explanation = "Bring the Slaughter. Success!" + feedback_add_details("cult_objective","cult_demons|SUCCESS") + else + explanation = "Bring the Slaughter. Fail." + feedback_add_details("cult_objective","cult_demons|FAIL") + + if("convert")//convert half the crew + if(obj_count < objectives.len) + explanation = "Convert [convert_target] crewmembers ([cult.len] cultists at round end). Success!" + feedback_add_details("cult_objective","cult_convertion|SUCCESS") + else + explanation = "Convert [convert_target] crewmembers ([cult.len] total cultists). Fail!" + feedback_add_details("cult_objective","cult_convertion|FAIL") + + if("bloodspill")//cover a large portion of the station in blood + if(obj_count < objectives.len) + explanation = "Cover [spilltarget] tiles of the station in blood (The peak number of covered tiles was: [max_spilled_blood]). Success!" + feedback_add_details("cult_objective","cult_bloodspill|SUCCESS") + else + explanation = "Cover [spilltarget] tiles of the station in blood (The peak number of covered tiles was: [max_spilled_blood]). Fail!" + feedback_add_details("cult_objective","cult_bloodspill|FAIL") + + if("harvest") + if(harvested > harvest_target) + explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] eaten) Success!" + feedback_add_details("cult_objective","cult_harvest|SUCCESS") + else + explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] eaten) Fail!" + feedback_add_details("cult_objective","cult_harvest|FAIL") + + if("hijack") + if(!escaped_shuttle) + explanation = "Do not let a single non-cultist board the Escape Shuttle. ([escaped_shuttle] escaped on the shuttle) ([escaped_pod] escaped on pods) Success!" + feedback_add_details("cult_objective","cult_hijack|SUCCESS") + else + explanation = "Do not let a single non-cultist board the Escape Shuttle. ([escaped_shuttle] escaped on the shuttle) ([escaped_pod] escaped on pods) Fail!" + feedback_add_details("cult_objective","cult_hijack|FAIL") + + if("massacre") + if(survivors < massacre_target) + explanation = "Massacre the crew until less than [massacre_target] people are left on the station. ([survivors] humans left alive) Success!" + feedback_add_details("cult_objective","cult_massacre|SUCCESS") + else + explanation = "Massacre the crew until less than [massacre_target] people are left on the station. ([survivors] humans left alive) Fail!" + feedback_add_details("cult_objective","cult_massacre|FAIL") + text += "
Objective #[obj_count]: [explanation]" to_chat(world, text) diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm new file mode 100644 index 00000000000..de13c11d852 --- /dev/null +++ b/code/game/gamemodes/cult/cult_comms.dm @@ -0,0 +1,39 @@ +/datum/action/innate/cultcomm + name = "Communion" + button_icon_state = "cult_comms" + background_icon_state = "bg_cult" + check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_CONSCIOUS + +/datum/action/innate/cultcomm/IsAvailable() + if(!iscultist(owner)) + return 0 + return ..() + +/datum/action/innate/cultcomm/Activate() + var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") + if(!input || !IsAvailable()) + return + + cultist_commune(usr, input) + return + +/proc/cultist_commune(mob/living/user, message) + if(!message) + return + user.whisper("O bidai nabora se[pick("'","`")]sma!") + sleep(10) + if(!user) + return + user.whisper(message) + var/my_message + if(istype(user, /mob/living/simple_animal/slaughter/cult)) //Harbringers of the Slaughter + my_message = "Harbringer of the Slaughter: [message]" + else + my_message = "[(ishuman(user) ? "Acolyte" : "Construct")] [user]: [message]" + for(var/mob/M in mob_list) + if(iscultist(M)) + to_chat(M, my_message) + else if(M in dead_mob_list) + to_chat(M, " (F) [my_message] ") + + log_say("[user.real_name]/[user.key] : [message]") \ No newline at end of file diff --git a/code/game/gamemodes/cult/cult_datums.dm b/code/game/gamemodes/cult/cult_datums.dm new file mode 100644 index 00000000000..b08632f0359 --- /dev/null +++ b/code/game/gamemodes/cult/cult_datums.dm @@ -0,0 +1,144 @@ +//cult datums by FalseIncarnate + +/datum/cult_info + var/name = "Cult of Nar'Sie" + var/theme = "blood" + var/tome_icon = "tome" + //God Entity + var/entity_name = "Nar'Sie" + var/entity_title1 = "The Dark One" + var/entity_title2 = "The One Who Sees" + var/entity_title3 = "The Geometer of Blood" + var/entity_icon_state = "narsie" + + + //Builder Construct + var/artificer_name = "Artificer" + var/artificer_icon_state = "artificer" + var/artificer_dead_state = "shade_dead" + + //Behemoth Construct + var/behemoth_name = "Behemoth" + var/behemoth_icon_state = "behemoth" + var/behemoth_dead_state = "shade_dead" + + //Wraith Construct + var/wraith_name = "Wraith" + var/wraith_icon_state = "floating" + var/wraith_dead_state = "shade_dead" + + //Armored Construct + var/juggernaut_name = "Juggernaut" + var/juggernaut_icon_state = "behemoth" + var/juggernaut_dead_state = "shade_dead" + + //Harvester Construct + var/harvester_name = "Harvester" + var/harvester_icon_state = "harvester" + var/harvester_dead_state = "shade_dead" + + //Shade Spirit + var/shade_name = "Shade" + var/shade_icon_state = "shade2" + var/shade_dead_state = "shade_dead" + + //Turfs + var/cult_floor_icon_state = "cult" + var/cult_wall_icon_state = "cult" + +/datum/cult_info/fire + name = "Cult of Pyr'Kaeus" + theme = "fire" + tome_icon = "firetome" + + entity_name = "Pyr'Kaeus" + entity_title1 = "The Burning One" + entity_title2 = "The One Who Consumes" + entity_title3 = "The Harbinger of Fire" + entity_icon_state = "narbee" + + cult_wall_icon_state = "firecult" + cult_floor_icon_state = "cultfire" + + artificer_name = "Igniting Ember" + artificer_icon_state = "fireartificer" + + behemoth_name = "Devouring Hatred" + behemoth_icon_state = "firejuggernaut" + + wraith_name = "Living Flame" + wraith_icon_state = "firewraith" + + juggernaut_name = "Pyre Armor" + juggernaut_icon_state = "firejuggernaut" + + harvester_name = "Coal Seeker"//or nipple pincher... + harvester_icon_state = "fireharvester" + + shade_name = "Charred Soul" + shade_icon_state = "shade" + +/datum/cult_info/death + name = "Cult of Mortality" + theme = "death" + + entity_name = "The Reaper" + entity_title1 = "The Silent One" + entity_title2 = "The One Who Beckons" + entity_title3 = "The Ferryman of Oblivion" + + cult_wall_icon_state = "deathcult" + cult_floor_icon_state = "carpet-broken" + + artificer_name = "Boneshaper" + + behemoth_name = "Draugr" + behemoth_icon_state = "horror" + + wraith_name = "Wraith" + wraith_icon_state = "stand" + + juggernaut_name = "Wight" + juggernaut_icon_state = "horror" + + harvester_name = "Psychopomp" + + shade_name = "Banshee" + +/datum/cult_info/proc/get_name(var/type_to_name) + if(!type_to_name) + return + switch(type_to_name) + if("god") + return entity_name + if("behemoth") + return behemoth_name + if("builder") + return artificer_name + if("juggernaut") + return juggernaut_name + if("harvester") + return harvester_name + if("wraith") + return wraith_name + if("shade") + return shade_name + +/datum/cult_info/proc/get_icon(var/type_to_icon) + if(!type_to_icon) + return + switch(type_to_icon) + if("god") + return entity_icon_state + if("behemoth") + return behemoth_icon_state + if("builder") + return artificer_icon_state + if("juggernaut") + return juggernaut_icon_state + if("harvester") + return harvester_icon_state + if("wraith") + return wraith_icon_state + if("shade") + return shade_icon_state \ No newline at end of file diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 91147183ba1..edf0912c4d6 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -1,38 +1,67 @@ /obj/item/weapon/melee/cultblade name = "Cult Blade" - desc = "An arcane weapon wielded by the followers of Nar-Sie" + desc = "An arcane weapon wielded by the followers of a cult." icon_state = "cultblade" item_state = "cultblade" w_class = 4 force = 30 throwforce = 10 + sharp = 1 hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") /obj/item/weapon/melee/cultblade/attack(mob/living/target as mob, mob/living/carbon/human/user as mob) - if(iscultist(user)) - return ..() - else - user.Paralyse(5) - to_chat(user, "\red An unexplicable force powerfully repels the sword from [target]!") - var/organ = ((user.hand ? "l_":"r_") + "arm") - var/obj/item/organ/external/affecting = user.get_organ(organ) - if(affecting.take_damage(rand(force/2, force))) //random amount of damage between half of the blade's force and the full force of the blade. - user.UpdateDamageIcon() - return + if(!iscultist(user)) + user.Weaken(5) + user.unEquip(src, 1) + user.visible_message("A powerful force shoves [user] away from [target]!", \ + "\"You shouldn't play with sharp things. You'll poke someone's eye out.\"") + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm")) + else + user.adjustBruteLoss(rand(force/2,force)) + return + ..() -/obj/item/weapon/melee/cultblade/pickup(mob/living/user as mob) +/obj/item/weapon/melee/cultblade/pickup(mob/living/user) ..() if(!iscultist(user)) - to_chat(user, "\red An overwhelming feeling of dread comes over you as you pick up the cultist's sword. It would be wise to be rid of this blade quickly.") + to_chat(user, "\"I wouldn't advise that.\"") + to_chat(user, "An overwhelming sense of nausea overpowers you!") user.Dizzy(120) +/obj/item/weapon/melee/cultblade/dagger + name = "sacrificial dagger" + desc = "A strange dagger said to be used by sinister groups for \"preparing\" a corpse before sacrificing it to their dark gods." + icon = 'icons/obj/wizard.dmi' + icon_state = "render" + w_class = 2 + force = 15 + throwforce = 25 + var/cooldown = 0 + +/obj/item/weapon/melee/cultblade/dagger/afterattack(mob/living/target as mob, mob/living/carbon/human/user as mob) + ..() + var/mob/living/carbon/human/bleeder = target + if(!(cooldown > world.time) && ((bleeder.stat != DEAD) && !(bleeder.species.flags & NO_BLOOD))) + user.visible_message("The runes on the blade absorb the blood of [target]!") + bleeder.drip(5000) + cooldown = world.time + 2400 + +/obj/item/weapon/restraints/legcuffs/bola/cult + name = "runed bola" + desc = "A strong bola, bound with dark magic. Throw it to trip and slow your victim." + icon = 'icons/obj/items.dmi' + icon_state = "bola_cult" + breakouttime = 45 + weaken = 1 /obj/item/clothing/head/culthood name = "cult hood" icon_state = "culthood" - desc = "A hood worn by the followers of Nar-Sie." + desc = "A hood worn by the followers of a cult." flags_inv = HIDEFACE flags = HEADCOVERSEYES armor = list(melee = 30, bullet = 10, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 0) @@ -44,14 +73,10 @@ icon_state = "cult_hoodalt" item_state = "cult_hoodalt" -/obj/item/clothing/suit/hooded/cultrobes/alt - icon_state = "cultrobesalt" - item_state = "cultrobesalt" - hoodtype = /obj/item/clothing/head/culthood/alt /obj/item/clothing/suit/hooded/cultrobes name = "cult robes" - desc = "A set of armored robes worn by the followers of Nar-Sie" + desc = "A set of armored robes worn by the followers of a cult." icon_state = "cultrobes" item_state = "cultrobes" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS @@ -60,6 +85,11 @@ armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0) flags_inv = HIDEJUMPSUIT +/obj/item/clothing/suit/hooded/cultrobes/alt + icon_state = "cultrobesalt" + item_state = "cultrobesalt" + hoodtype = /obj/item/clothing/head/culthood/alt + /obj/item/clothing/head/magus name = "magus helm" icon_state = "magus" @@ -81,7 +111,7 @@ /obj/item/clothing/head/helmet/space/cult name = "cult helmet" - desc = "A space worthy helmet used by the followers of Nar-Sie" + desc = "A space worthy helmet used by the followers of a cult." icon_state = "cult_helmet" item_state = "cult_helmet" armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) @@ -93,4 +123,211 @@ desc = "A bulky suit of armour, bristling with spikes. It looks space proof." w_class = 3 allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade,/obj/item/weapon/tank) + slowdown = 1 armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + +/obj/item/clothing/suit/hooded/cultrobes/cult_shield + name = "empowered cultist robe" + desc = "Empowered garb which creates a powerful shield around the user." + icon_state = "cult_armour" + item_state = "cult_armour" + w_class = 4 + armor = list(melee = 50, bullet = 40, laser = 50, energy = 30, bomb = 50, bio = 30, rad = 30) + body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade) + var/current_charges = 3 + hoodtype = /obj/item/clothing/head/cult_hoodie + +/obj/item/clothing/head/cult_hoodie + name = "empowered cultist robe" + desc = "Empowered garb which creates a powerful shield around the user." + icon_state = "cult_hoodalt" + armor = list(melee = 50, bullet = 40, laser = 50, energy = 30, bomb = 50, bio = 30, rad = 30) + body_parts_covered = HEAD + flags_inv = HIDEFACE + flags = NODROP | HEADCOVERSEYES + +/obj/item/clothing/suit/hooded/cultrobes/cult_shield/equipped(mob/living/user, slot) + ..() + if(!iscultist(user)) + to_chat(user, "\"I wouldn't advise that.\"") + to_chat(user, "An overwhelming sense of nausea overpowers you!") + user.unEquip(src, 1) + user.Dizzy(30) + user.Weaken(5) + +/obj/item/clothing/suit/hooded/cultrobes/cult_shield/hit_reaction(mob/living/carbon/human/owner, attack_text, isinhands) + if(current_charges) + owner.visible_message("\The [attack_text] is deflected in a burst of blood-red sparks!") + current_charges-- + new /obj/effect/overlay/temp/cult/sparks(get_turf(owner)) + if(!current_charges) + owner.visible_message("The runed shield around [owner] suddenly disappears!") + owner.update_inv_wear_suit() + return 1 + return 0 + +/obj/item/clothing/suit/hooded/cultrobes/berserker + name = "flagellant's robes" + desc = "Blood-soaked robes infused with dark magic; allows the user to move at inhuman speeds, but at the cost of increased damage." + icon_state = "hardsuit-beserker" + item_state = "hardsuit-beserker" + flags_inv = HIDEJUMPSUIT + allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade) + body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + armor = list(melee = -50, bullet = -50, laser = -100, energy = -50, bomb = -50, bio = -50, rad = -50) + slowdown = -1 + hoodtype = /obj/item/clothing/head/berserkerhood + + +/obj/item/clothing/head/berserkerhood + name = "flagellant's robes" + desc = "Blood-soaked garb infused with dark magic; allows the user to move at inhuman speeds, but at the cost of increased damage." + icon_state = "culthood" + flags_inv = HIDEFACE + flags = HEADCOVERSEYES + armor = list(melee = -100, bullet = -100, laser = -100, energy = -100, bomb = -100, bio = -100, rad = -100) + +/obj/item/weapon/whetstone/cult + name = "eldritch whetstone" + desc = "A block, empowered by dark magic. Sharp weapons will be enhanced when used on the stone." + icon = 'icons/obj/cult.dmi' + icon_state = "cultstone" + used = 0 + increment = 5 + max = 40 + prefix = "darkened" + +/obj/item/weapon/reagent_containers/food/drinks/bottle/unholywater + name = "flask of unholy water" + desc = "Toxic to nonbelievers; this water renews and reinvigorates the faithful of a cult." + icon_state = "holyflask" + color = "#333333" + list_reagents = list("unholywater" = 40) + +/obj/item/clothing/glasses/night/cultblind + desc = "May the master guide you through the darkness and shield you from the light." + name = "zealot's blindfold" + icon_state = "blindfold" + item_state = "blindfold" + darkness_view = 8 + flash_protect = 1 + +/obj/item/clothing/glasses/night/cultblind/equipped(mob/user, slot) + ..() + if(!iscultist(user)) + to_chat(user, "\"You want to be blind, do you?\"") + user.unEquip(src, 1) + user.Dizzy(30) + user.Weaken(5) + user.EyeBlind(30) + +/obj/item/device/shuttle_curse + name = "cursed orb" + desc = "You peer within this smokey orb and glimpse terrible fates befalling the escape shuttle." + icon = 'icons/obj/projectiles.dmi' + icon_state ="bluespace" + color = "#ff0000" + var/static/curselimit = 0 + +/obj/item/device/shuttle_curse/attack_self(mob/user) + if(!iscultist(user)) + user.unEquip(src, 1) + user.Weaken(5) + to_chat(user, "A powerful force shoves you away from [src]!") + return + if(curselimit > 1) + to_chat(user, "We have exhausted our ability to curse the shuttle.") + return + if(shuttle_master.emergency.mode == SHUTTLE_CALL) + var/cursetime = 1800 + var/timer = shuttle_master.emergency.timeLeft(1) + cursetime + shuttle_master.emergency.setTimer(timer) + to_chat(user,"You shatter the orb! A dark essence spirals into the air, then disappears.") + playsound(user.loc, "sound/effects/Glassbr1.ogg", 50, 1) + qdel(src) + sleep(20) + var/global/list/curses + if(!curses) + curses = list("A fuel technician just slit his own throat and begged for death. The shuttle will be delayed by two minutes.", + "The shuttle's navigation programming was replaced by a file containing two words, IT COMES. The shuttle will be delayed by two minutes.", + "The shuttle's custodian tore out his guts and began painting strange shapes on the floor. The shuttle will be delayed by two minutes.", + "A shuttle engineer began screaming 'DEATH IS NOT THE END' and ripped out wires until an arc flash seared off her flesh. The shuttle will be delayed by two minutes.", + "A shuttle inspector started laughing madly over the radio and then threw herself into an engine turbine. The shuttle will be delayed by two minutes.", + "The shuttle dispatcher was found dead with bloody symbols carved into their flesh. The shuttle will be delayed by two minutes.", + "Steve repeatedly touched a lightbulb until his hands fell off. The shuttle will be delayed by two minutes.") + var/message = pick(curses) + command_announcement.Announce("[message]", "System Failure", 'sound/misc/notice1.ogg') + curselimit++ + +/obj/item/device/cult_shift + name = "veil shifter" + desc = "This relic teleports you forward a medium distance." + icon = 'icons/obj/cult.dmi' + icon_state ="shifter" + var/uses = 4 + +/obj/item/device/cult_shift/examine(mob/user) + . = ..() + if(uses) + to_chat(user, "It has [uses] uses remaining.") + else + to_chat(user, "It seems drained.") + +/obj/item/device/cult_shift/proc/handle_teleport_grab(turf/T, mob/user) + var/mob/living/carbon/C = user + if(C.pulling) + var/atom/movable/pulled = C.pulling + pulled.forceMove(T) + . = pulled + +/obj/item/device/cult_shift/attack_self(mob/user) + if(!uses || !iscarbon(user)) + to_chat(user, "\The [src] is dull and unmoving in your hands.") + return + if(!iscultist(user)) + user.unEquip(src, 1) + step(src, pick(alldirs)) + to_chat(user, "\The [src] flickers out of your hands, too eager to move!") + return + + var/outer_tele_radius = 9 + + var/mob/living/carbon/C = user + var/turf/mobloc = get_turf(C) + var/list/turfs = new/list() + for(var/turf/T in range(user, outer_tele_radius)) + if(!is_teleport_allowed(T)) + continue + if(get_dir(C, T) != C.dir) + continue + if(T == mobloc) + continue + if(istype(T, /turf/space)) + continue + if(T.x > world.maxx-outer_tele_radius || T.x < outer_tele_radius) + continue //putting them at the edge is dumb + if(T.y > world.maxy-outer_tele_radius || T.y < outer_tele_radius) + continue + + turfs += T + + if(turfs) + uses-- + var/turf/destination = pick(turfs) + if(uses <= 0) + icon_state ="shifter_drained" + playsound(mobloc, "sparks", 50, 1) + new /obj/effect/overlay/temp/cult/phase/out(mobloc) + + var/atom/movable/pulled = handle_teleport_grab(destination, C) + C.forceMove(destination) + if(pulled) + C.start_pulling(pulled) //forcemove resets pulls, so we need to re-pull + + new /obj/effect/overlay/temp/cult/phase(destination) + playsound(destination, 'sound/effects/phasein.ogg', 25, 1) + playsound(destination, "sparks", 50, 1) + + else + to_chat(C, "The veil cannot be torn here!") \ No newline at end of file diff --git a/code/game/gamemodes/cult/cult_objectives.dm b/code/game/gamemodes/cult/cult_objectives.dm new file mode 100644 index 00000000000..a84a83be688 --- /dev/null +++ b/code/game/gamemodes/cult/cult_objectives.dm @@ -0,0 +1,257 @@ +/datum/game_mode/cult/proc/blood_check() + max_spilled_blood = (max(bloody_floors.len,max_spilled_blood)) + if((objectives[current_objective] == "bloodspill") && (bloody_floors.len >= spilltarget) && !spilled_blood) + spilled_blood = 1 + additional_phase() + +/datum/game_mode/cult/proc/check_numbers() + if((objectives[current_objective] == "convert") && (cult.len >= convert_target) && !mass_convert) + mass_convert = 1 + additional_phase() + +/datum/game_mode/cult/proc/first_phase() + + var/new_objective = pick_objective() + + objectives += new_objective + + var/explanation + + switch(new_objective) + if("convert") + explanation = "We must increase our influence before we can summon [ticker.mode.cultdat.entity_name], Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." + if("bloodspill") + spilltarget = 100 + rand(0,player_list.len * 3) + explanation = "We must prepare this place for [ticker.mode.cultdat.entity_title1]'s coming. Spill blood and gibs over [spilltarget] floor tiles." + if("sacrifice") + explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for his blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." + + for(var/datum/mind/cult_mind in cult) + to_chat(cult_mind.current, "Objective #[current_objective]: [explanation]") + cult_mind.memory += "Objective #[current_objective]: [explanation]
" + +/datum/game_mode/cult/proc/bypass_phase() + + switch(objectives[current_objective]) + if("convert") + mass_convert = 1 + if("bloodspill") + spilled_blood = 1 + if("sacrifice") + sacrificed += sacrifice_target + additional_phase() + +/datum/game_mode/cult/proc/additional_phase() + current_objective++ + + message_admins("Picking a new Cult objective.") + var/new_objective = "eldergod" + //the idea here is that if the cult performs well, the should get more objectives before they can summon Nar-Sie. + if(cult.len >= 4)//if there are less than 4 remaining cultists, they get a free pass to the summon objective. + if(current_objective <= prenarsie_objectives) + var/list/unconvertables = get_unconvertables() + if(unconvertables.len <= (cult.len * 2))//if cultists are getting radically outnumbered, they get a free pass to the summon objective. + new_objective = pick_objective() + else + message_admins("There are over twice more unconvertables than there are cultists ([cult.len] cultists for [unconvertables.len]) unconvertables! Nar-Sie objective unlocked.") + log_admin("There are over twice more unconvertables than there are cultists ([cult.len] cultists for [unconvertables.len]) unconvertables! Nar-Sie objective unlocked.") + else + message_admins("The Cult has already completed [prenarsie_objectives] objectives! Nar-Sie objective unlocked.") + log_admin("The Cult has already completed [prenarsie_objectives] objectives! Nar-Sie objective unlocked.") + else + message_admins("There are less than 4 cultists! [ticker.mode.cultdat.entity_name] objective unlocked.") + log_admin("There are less than 4 cultists! [ticker.mode.cultdat.entity_name] objective unlocked.") + gtfo_phase() + + if(!sacrificed.len && (new_objective != "sacrifice")) + sacrifice_target = null + + if(new_objective == "eldergod") + second_phase() + return + else + objectives += new_objective + + var/explanation + + switch(new_objective) + if("convert") + explanation = "We must increase our influence before we can summon [ticker.mode.cultdat.entity_name]. Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." + if("bloodspill") + spilltarget = 100 + rand(0,player_list.len * 3) + explanation = "We must prepare this place for [ticker.mode.cultdat.entity_title1]'s coming. Spread blood and gibs over [spilltarget] of the Station's floor tiles." + if("sacrifice") + explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for his blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." + + for(var/datum/mind/cult_mind in cult) + to_chat(cult_mind.current, "You and your acolytes have completed your task, but this place requires yet more preparation!") + to_chat(cult_mind.current, "Objective #[current_objective]: [explanation]") + cult_mind.memory += "Objective #[current_objective]: [explanation]
" + + message_admins("New Cult Objective: [new_objective]") + log_admin("New Cult Objective: [new_objective]") + + blood_check()//in case there are already enough blood covered tiles when the objective is given. + +/datum/game_mode/cult/proc/gtfo_phase()//YOU HAD ONE JOB + var/explanation + objectives +="survive" + explanation = "Our knowledge must live on. Make sure at least [acolytes_needed] acolytes escape on the shuttle to spread their work on an another station." + for(var/datum/mind/cult_mind in cult) + to_chat(cult_mind.current, "You and your acolytes suddenly feel the urge to do your best, but survive!") + to_chat(cult_mind.current, "Objective Survive: [explanation]") + cult_mind.memory += "Objective Survive: [explanation]
" + + +/datum/game_mode/cult/proc/second_phase() + narsie_condition_cleared = 1 + var/explanation + + if(prob(40))//split the chance of this + objectives += "eldergod" + explanation = "Summon [ticker.mode.cultdat.entity_name] on the Station via the use of the Tear Reality rune." + else + objectives += "slaughter" + explanation = "Bring the Slaughter via the rune 'Bring forth the slaughter'." + + for(var/datum/mind/cult_mind in cult) + to_chat(cult_mind.current, "You and your acolytes have succeeded in preparing the station for the ultimate ritual!") + to_chat(cult_mind.current, "Objective #[current_objective]: [explanation]") + cult_mind.memory += "Objective #[current_objective]: [explanation]
" + +/datum/game_mode/cult/proc/third_phase() + current_objective++ + + sleep(10) + + var/last_objective = pick_bonus_objective() + + objectives += last_objective + + var/explanation + + switch(last_objective) + if("harvest") + explanation = "[ticker.mode.cultdat.entity_title1] hungers for his first meal of this never-ending day. Offer him [harvest_target] humans in sacrifice." + if("hijack") + explanation = "[ticker.mode.cultdat.entity_name] wishes for his troops to start the assault on Centcom immediately. Hijack the escape shuttle and don't let a single non-cultist board it." + if("massacre") + explanation = "[ticker.mode.cultdat.entity_name] wants to watch you as you massacre the remaining humans on the station (until less than [massacre_target] humans are left alive)." + + for(var/datum/mind/cult_mind in cult) + to_chat(cult_mind.current, "Objective #[current_objective]: [explanation]") + cult_mind.memory += "Objective #[current_objective]: [explanation]
" + + message_admins("Last Cult Objective: [last_objective]") + log_admin("Last Cult Objective: [last_objective]") + + +/datum/game_mode/cult/proc/pick_objective() + var/list/possible_objectives = list() + + if(!spilled_blood && (bloody_floors.len < spilltarget)) + possible_objectives |= "bloodspill" + + if(!sacrificed.len) + var/list/possible_targets = list() + for(var/mob/living/carbon/human/player in player_list) + if(is_secure_level(player.z)) //We can't sacrifice people that are on the centcom z-level + continue + if(player.mind && !is_convertable_to_cult(player.mind) && (player.stat != DEAD)) + possible_targets += player.mind + + if(!possible_targets.len) + //There are no living Unconvertables on the station. Looking for a Sacrifice Target among the ordinary crewmembers + for(var/mob/living/carbon/human/player in player_list) + if(is_secure_level(player.z)) //We can't sacrifice people that are on the centcom z-level + continue + if(player.mind && !(player.mind in cult) && (player.stat != DEAD))//make DAMN sure they are not dead + possible_targets += player.mind + + if(possible_targets.len > 0) + sacrifice_target = pick(possible_targets) + possible_objectives |= "sacrifice" + else + message_admins("Didn't find a suitable sacrifice target...what the hell? Shout at a coder.") + log_admin("Didn't find a suitable sacrifice target...what the hell? Shout at a coder.") + + if(!mass_convert) + var/living_crew = 0 + var/living_cultists = 0 + for(var/mob/living/L in player_list) + if(L.stat != DEAD) + if(L.mind in cult) + living_cultists++ + else + if(istype(L, /mob/living/carbon/human)) + living_crew++ + + var/total = living_crew + living_cultists + + if((living_cultists * 2) < total) + if(total < 15) + message_admins("There are [total] players, too little for the mass convert objective!") + log_admin("There are [total] players, too little for the mass convert objective!") + else if(total > 50) + message_admins("There are [total] players, too many for the mass convert objective!") + log_admin("There are [total] players, too many for the mass convert objective!") + else + possible_objectives |= "convert" + convert_target = round(total / 2) + + if(!possible_objectives.len)//No more possible objectives, time to summon Nar-Sie + message_admins("No suitable objectives left! Nar-Sie objective unlocked.") + log_admin("No suitable objectives left! Nar-Sie objective unlocked.") + var/lastbit + if(prob(50)) + lastbit = "eldergod" + else + lastbit = "slaughter" + return lastbit + else + return pick(possible_objectives) + +/datum/game_mode/cult/proc/pick_bonus_objective()//did we summon demons? TIME FOR THE BONUS STAGE + var/list/possible_objectives = list() + + var/living_crew = 0 + for(var/mob/living/carbon/C in player_list) + if(C.stat != DEAD) + if(!(C.mind in cult)) + var/turf/T = get_turf(C) + if(is_station_level(T.z)) //we're only interested in the remaining humans on the station + living_crew++ + + if(living_crew > 5) + possible_objectives |= "massacre" + + if(living_crew > 10) + possible_objectives |= "harvest" + + possible_objectives |= "hijack" //we need at least one objective guarranted to fire + + return pick(possible_objectives) + +/datum/game_mode/cult/proc/bonus_check() + switch(objectives[current_objective]) + if("harvest") + if(harvested >= harvest_target) + bonus = 1 + + if("hijack") + for(var/mob/living/L in player_list) + if(L.stat != DEAD && !(L.mind in cult)) + var/area/A = get_area(L) + if(is_type_in_list(A.loc, centcom_areas)) + escaped_shuttle++ + if(!escaped_shuttle) + bonus = 1 + + if("massacre") + for(var/mob/living/carbon/C in player_list) + if(C.stat != DEAD && !(C.mind in cult)) + var/turf/T = get_turf(C) + if(is_station_level(T.z)) //we're only interested in the remaining humans on the station + survivors++ + if(survivors < massacre_target) + bonus = 1 \ No newline at end of file diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 126601c31dd..72b5bfa292b 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -1,14 +1,15 @@ +//Noncult /obj/structure/cult density = 1 anchored = 1 icon = 'icons/obj/cult.dmi' +//Noncult As we may have this on maps /obj/structure/cult/talisman name = "Altar" desc = "A bloodstained altar dedicated to Nar-Sie" icon_state = "talismanaltar" - /obj/structure/cult/forge name = "Daemon forge" desc = "A forge used in crafting the unholy weapons used by the armies of Nar-Sie" @@ -21,22 +22,219 @@ light_range = 5 light_color = "#3e0000" - /obj/structure/cult/tome name = "Desk" desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl" icon_state = "tomealtar" -// luminosity = 5 -//sprites for this no longer exist -Pete -//(they were stolen from another game anyway) -/* -/obj/structure/cult/pillar - name = "Pillar" - desc = "This should not exist" - icon_state = "pillar" - icon = 'magic_pillar.dmi' -*/ +//Cult versions cuase fuck map conflicts +/obj/structure/cult/functional + var/cooldowntime = 0 + var/health = 100 + var/death_message = "The structure falls apart." //The message shown when the structure is destroyed + var/death_sound = 'sound/items/bikehorn.ogg' + var/heathen_message = "You're a huge nerd, go away. Also, a coder forgot to put a message here." + var/selection_title = "Oops" + var/selection_prompt = "Choose your weapon, nerdwad" + var/creation_delay = 2400 + var/list/choosable_items = list( + "A coder forgot to set this" = /obj/item/weapon/bananapeel + ) + var/creation_message = "A dank smoke comes out, and you pass out. When you come to, you notice a %ITEM%!" + +/obj/structure/cult/functional/proc/destroy_structure() + visible_message(death_message) + playsound(src, death_sound, 50, 1) + qdel(src) + +/obj/structure/cult/functional/examine(mob/user) + . = ..() + if(iscultist(user) && cooldowntime > world.time) + to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") + to_chat(user, "\The [src] is [anchored ? "":"not "]secured to the floor.") + +/obj/structure/cult/functional/attackby(obj/I, mob/user, params) + if(istype(I, /obj/item/weapon/tome) && iscultist(user)) + anchored = !anchored + to_chat(user, "You [anchored ? "":"un"]secure \the [src] [anchored ? "to":"from"] the floor.") + playsound(loc, 'sound/hallucinations/wail.ogg', 75, 1) + if(!anchored) + icon_state = "[initial(icon_state)]_off" + else + icon_state = initial(icon_state) + else + return ..() + +/obj/structure/cult/functional/attack_hand(mob/living/user) + if(!iscultist(user)) + to_chat(user, "[heathen_message]") + return + if(!anchored) + to_chat(user, "You need to anchor [src] to the floor with a tome first.") + return + if(cooldowntime > world.time) + to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") + return + var/choice = input(user, selection_prompt, selection_title) as null|anything in choosable_items + var/pickedtype = choosable_items[choice] + if(pickedtype && Adjacent(user) && src && !qdeleted(src) && !user.incapacitated() && cooldowntime <= world.time) + cooldowntime = world.time + creation_delay + var/obj/item/N = new pickedtype(get_turf(src)) + to_chat(user, replacetext("[creation_message]", "%ITEM%", "[N]")) + +/obj/structure/cult/functional/proc/getETA() + var/time = (cooldowntime - world.time)/600 + var/eta = "[round(time, 1)] minutes" + if(time <= 1) + time = (cooldowntime - world.time)*0.1 + eta = "[round(time, 1)] seconds" + return eta + +/obj/structure/cult/functional/talisman + name = "altar" + desc = "A bloodstained altar dedicated to a cult." + icon_state = "talismanaltar" + health = 150 //Sturdy + death_message = "The altar breaks into splinters, releasing a cascade of spirits into the air!" + death_sound = 'sound/effects/altar_break.ogg' + heathen_message = "There is a foreboding aura to the altar and you want nothing to do with it." + selection_prompt = "You study the rituals on the altar..." + selection_title = "Altar" + creation_message = "You kneel before the altar and your faith is rewarded with an %ITEM%!" + choosable_items = list("Eldritch Whetstone"= /obj/item/weapon/whetstone/cult, "Zealot's Blindfold" = /obj/item/clothing/glasses/night/cultblind, \ + "Flask of Unholy Water" = /obj/item/weapon/reagent_containers/food/drinks/bottle/unholywater, "Cultist Dagger" = /obj/item/weapon/melee/cultblade/dagger) + +/obj/structure/cult/functional/forge + name = "daemon forge" + desc = "A forge used in crafting the unholy weapons used by the armies of a cult." + icon_state = "forge" + health = 300 //Made of metal + death_message = "The forge falls apart, its lava cooling and winking away!" + death_sound = 'sound/effects/forge_destroy.ogg' + heathen_message = "Your hand feels like it's melting off as you try to touch the forge." + selection_prompt = "You study the schematics etched on the forge..." + selection_title = "Forge" + creation_message = "You work the forge as dark knowledge guides your hands, creating %ITEM%!" + choosable_items = list("Shielded Robe" = /obj/item/clothing/suit/hooded/cultrobes/cult_shield, "Flagellant's Robe" = /obj/item/clothing/suit/hooded/cultrobes/berserker, \ + "Cultist Hardsuit" = /obj/item/weapon/storage/box/cult) + + +/obj/structure/cult/functional/forge/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = I + if(!iscarbon(G.affecting)) + to_chat(user, "You may only dunk carbon-based creatures!") + return 0 + if(G.affecting == LAVA_PROOF) + to_chat(user, "Is immune to the lava!") + return 0 + if(G.affecting.stat == DEAD) + to_chat(user, "[G.affecting] is dead!") + return 0 + var/mob/living/carbon/human/C = G.affecting + C.visible_message("[user] dunks [C]'s face into [src]'s lava!", \ + "[user] dunks your face into [src]'s lava!") + if(!C.stat) + C.emote("scream") + user.changeNext_move(CLICK_CD_MELEE) + var/obj/item/organ/external/head/head = C.get_organ("head") + if(head) + C.apply_damage(30, BURN, "head") //30 fire damage because it's FUCKING LAVA + head.disfigure("burn") //Your face is unrecognizable because it's FUCKING LAVA + return 1 + +var/list/blacklisted_pylon_turfs = typecacheof(list( + /turf/simulated/floor/engine/cult, + /turf/space, + /turf/unsimulated/floor/lava, + /turf/unsimulated/floor/chasm, + /turf/simulated/wall, + )) + +/obj/structure/cult/functional/pylon + name = "pylon" + desc = "A floating crystal that slowly heals those faithful to a cult." + icon_state = "pylon" + light_range = 5 + light_color = "#3e0000" + health = 50 //Very fragile + death_message = "The pylon's crystal vibrates and glows fiercely before violently shattering!" + death_sound = 'sound/effects/pylon_shatter.ogg' + + var/heal_delay = 25 + var/last_heal = 0 + var/corrupt_delay = 50 + var/last_corrupt = 0 + +/obj/structure/cult/functional/pylon/attack_hand(mob/living/user)//override as it should not create anything + return + +/obj/structure/cult/functional/pylon/New() + processing_objects |= src + ..() + +/obj/structure/cult/functional/pylon/Destroy() + processing_objects.Remove(src) + return ..() + +/obj/structure/cult/functional/pylon/process() + if(!anchored) + return + if(last_heal <= world.time) + last_heal = world.time + heal_delay + for(var/mob/living/L in range(5, src)) + if(iscultist(L) || istype(L, /mob/living/simple_animal/shade) || istype(L, /mob/living/simple_animal/hostile/construct)) + if(L.health != L.maxHealth) + new /obj/effect/overlay/temp/heal(get_turf(src), "#960000") + if(ishuman(L)) + L.adjustBruteLoss(-1) + L.adjustFireLoss(-1) + L.updatehealth() + if(istype(L, /mob/living/simple_animal/shade) || istype(L, /mob/living/simple_animal/hostile/construct)) + var/mob/living/simple_animal/M = L + if(M.health < M.maxHealth) + M.adjustHealth(-1) + if(last_corrupt <= world.time) + var/list/validturfs = list() + var/list/cultturfs = list() + for(var/T in circleviewturfs(src, 5)) + if(istype(T, /turf/simulated/floor/engine/cult)) + cultturfs |= T + continue + if(is_type_in_typecache(T, blacklisted_pylon_turfs)) + continue + else + validturfs |= T + + last_corrupt = world.time + corrupt_delay + + var/turf/T = safepick(validturfs) + if(T) + T.ChangeTurf(/turf/simulated/floor/engine/cult) + else + var/turf/simulated/floor/engine/cult/F = safepick(cultturfs) + if(F) + new /obj/effect/overlay/temp/cult/turf/open/floor(F) + else + // Are we in space or something? No cult turfs or + // convertable turfs? + last_corrupt = world.time + corrupt_delay*2 + + + +/obj/structure/cult/functional/tome + name = "archives" + desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl." + icon_state = "tomealtar" + health = 125 //Slightly sturdy + death_message = "The desk breaks apart, its books falling to the floor." + death_sound = 'sound/effects/wood_break.ogg' + heathen_message = "What do you hope to seek?" + selection_prompt = "You flip through the black pages of the archives..." + selection_title = "Archives" + creation_message = "You invoke the dark magic of the tomes creating %ITEM%!" + choosable_items = list("Supply Talisman" = /obj/item/weapon/paper/talisman/supply/weak, "Shuttle Curse" = /obj/item/device/shuttle_curse, \ + "Veil Shifter" = /obj/item/device/cult_shift) /obj/effect/gateway name = "gateway" @@ -55,4 +253,18 @@ /obj/effect/gateway/Crossed(AM as mob|obj) spawn(0) return - return \ No newline at end of file + return + + +//Armor kit + +/obj/item/weapon/storage/box/cult + name = "Dark Forge Cache" + can_hold = list("/obj/item/clothing/suit/space/cult", "/obj/item/clothing/head/helmet/space/cult") + max_w_class = 3 + +/obj/item/weapon/storage/box/cult/New() + ..() + new /obj/item/clothing/suit/space/cult(src) + new /obj/item/clothing/head/helmet/space/cult(src) + return diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 8e288c39a70..da0cdc79e94 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -1,698 +1,301 @@ //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 += "
Archives of [ticker.mode.cultdat.entity_title1]



" + 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 += "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 += "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 += "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 += "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 += "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 += "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 += "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 += "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 += "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 += "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 += "Leeching
When invoked, this rune will transfer lifeforce from the victim to the invoker.

" + + 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 += "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 += "Talisman of Teleportation
The talisman form of the Teleport rune will transport the invoker to a selected Teleport rune once.

" + + 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 += "Talisman of Tome Summoning
This talisman will produce a single tome at your feet.

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

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

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

" + + 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 += "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 += "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 += "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 += "In addition to these runes, the cult has a small selection of equipment and constructs.

" + + text += "Equipment:

" + + 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 += "Cult Bola
Cult bolas are strong bolas, useful for snaring targets. These bolas are produced by the Talisman of Arming.

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

" + + 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 += "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 += "Constructs:

" + + 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 += "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 += "Juggernaut
The Juggernaut is a slow, but durable, melee attacker which can produce temporary forcewalls. It will also reflect most lethal energy weapons.

" + + 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 += "Harvester
If you see one, know that you have done all you can and your life is void.

" + + var/text_string = jointext(text, null) + var/datum/browser/popup = new(user, "tome", "", 800, 600) + popup.set_content(text_string) + 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..68b13bb05aa 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/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index 4f4cd137b80..1d0ac22c81c 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -1,255 +1,405 @@ /obj/item/weapon/paper/talisman icon_state = "paper_talisman" - var/imbue = null - var/uses = 0 + var/cultist_name = "talisman" + var/cultist_desc = "A basic talisman. It serves no purpose." + var/invocation = "Naise meam!" info = "


" + var/uses = 1 + var/health_cost = 0 //The amount of health taken from the user when invoking the talisman - attack_self(mob/living/user as mob) - if(iscultist(user)) - var/delete = 1 - switch(imbue) - if("newtome") - call(/obj/effect/rune/proc/tomesummon)() - if("armor") - call(/obj/effect/rune/proc/armor)() - if("emp") - call(/obj/effect/rune/proc/emp)(usr.loc,3) - if("conceal") - call(/obj/effect/rune/proc/obscure)(2) - if("revealrunes") - call(/obj/effect/rune/proc/revealrunes)(src) - if("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") - call(/obj/effect/rune/proc/teleport)(imbue) - if("communicate") - //If the user cancels the talisman this var will be set to 0 - delete = call(/obj/effect/rune/proc/communicate)() - if("deafen") - call(/obj/effect/rune/proc/deafen)() - if("blind") - call(/obj/effect/rune/proc/blind)() - if("runestun") - to_chat(user, "\red To use this talisman, attack your target directly.") - return - if("supply") - supply() - user.take_organ_damage(5, 0) - if(src && src.imbue!="supply" && src.imbue!="runestun") - if(delete) - qdel(src) - return - else - to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?") - return +/obj/item/weapon/paper/talisman/examine(mob/user) + if(iscultist(user) || user.stat == DEAD) + to_chat(user, "Name: [cultist_name]") + to_chat(user, "Effect: [cultist_desc]") + to_chat(user, "Uses Remaining: [uses]") + else + to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?") - - attack(mob/living/carbon/T as mob, mob/living/user as mob) - if(iscultist(user)) - if(imbue == "runestun") - user.take_organ_damage(5, 0) - call(/obj/effect/rune/proc/runestun)(T) - qdel(src) - else - ..() ///If its some other talisman, use the generic attack code, is this supposed to work this way? - else - ..() - - - proc/supply(var/key) - if(!src.uses) - qdel(src) - return - - var/dat = "There are [src.uses] bloody runes on the parchment.
" - dat += "Please choose the chant to be imbued into the fabric of reality.
" - dat += "
" - dat += "N'ath reth sh'yro eth d'raggathnor! - Allows you to summon a new arcane tome.
" - dat += "Sas'so c'arta forbici! - Allows you to move to a rune with the same last word.
" - dat += "Ta'gh fara'qha fel d'amar det! - Allows you to destroy technology in a short range.
" - dat += "Kla'atu barada nikt'o! - Allows you to conceal the runes you placed on the floor.
" - dat += "O bidai nabora se'sma! - Allows you to coordinate with others of your cult.
" - dat += "Fuu ma'jin - Allows you to stun a person by attacking them with the talisman.
" - dat += "Sa tatha najin - Allows you to summon armoured robes and an unholy blade
" - dat += "Kal om neth - Summons a soul stone
" - dat += "Da A'ig Osk - Summons a construct shell for use with captured souls. It is too large to carry on your person.
" - usr << browse(dat, "window=id_com;size=350x200") +/obj/item/weapon/paper/talisman/attack_self(mob/living/user) + if(!iscultist(user)) + to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?") return + if(invoke(user)) + uses-- + if(uses <= 0) + user.drop_item() + qdel(src) +/obj/item/weapon/paper/talisman/proc/invoke(mob/living/user, successfuluse = 1) + . = successfuluse + if(successfuluse) //if the calling whatever says we succeed, do the fancy stuff + if(invocation) + user.whisper(invocation) + if(health_cost && iscarbon(user)) + var/mob/living/carbon/C = user + C.apply_damage(health_cost, BRUTE, pick("l_arm", "r_arm")) - Topic(href, href_list) - if(!src) return - if(usr.stat || usr.restrained() || !in_range(src, usr)) return - - if(href_list["rune"]) - if(istype(usr, /mob/living/carbon/human)) - var/mob/living/carbon/human/M = usr - - switch(href_list["rune"]) - if("newtome") - - var/obj/item/weapon/paper/talisman/T = new(M) - T.imbue = "newtome" - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - - var/where = M.equip_in_one_of_slots(T, slots) - if(!where) - to_chat(M, "You need a space in your backpack, pocket or hand for the new paper.") - else - to_chat(M, "The [href_list["rune"]] talisman in your [where]") - M.update_icons() - src.uses-- - supply() - - - if("teleport") - var/obj/item/weapon/paper/talisman/T = new(M) - T.imbue = "[pick("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri", "orkan", "allaq")]" - T.info = "[T.imbue]" - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - - var/where = M.equip_in_one_of_slots(T, slots) - if(!where) - to_chat(M, "You need a space in your backpack, pocket or hand for the new paper.") - else - to_chat(M, "The [href_list["rune"]] talisman in your [where]") - M.update_icons() - src.uses-- - supply() - - if("emp") - var/obj/item/weapon/paper/talisman/T = new(M) - T.imbue = "emp" - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - - var/where = M.equip_in_one_of_slots(T, slots) - if(!where) - to_chat(M, "You need a space in your backpack, pocket or hand for the new paper.") - else - to_chat(M, "The [href_list["rune"]] talisman in your [where]") - M.update_icons() - src.uses-- - supply() - - if("conceal") - var/obj/item/weapon/paper/talisman/T = new(M) - T.imbue = "conceal" - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - - var/where = M.equip_in_one_of_slots(T, slots) - if(!where) - to_chat(M, "You need a space in your backpack, pocket or hand for the new paper.") - else - to_chat(M, "The [href_list["rune"]] talisman in your [where]") - M.update_icons() - src.uses-- - supply() - - if("communicate") - var/obj/item/weapon/paper/talisman/T = new(M) - T.imbue = "communicate" - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - - var/where = M.equip_in_one_of_slots(T, slots) - if(!where) - to_chat(M, "You need a space in your backpack, pocket or hand for the new paper.") - else - to_chat(M, "The [href_list["rune"]] talisman in your [where]") - M.update_icons() - src.uses-- - supply() - - if("runestun") - var/obj/item/weapon/paper/talisman/T = new(M) - T.imbue = "runestun" - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - - var/where = M.equip_in_one_of_slots(T, slots) - if(!where) - to_chat(M, "You need a space in your backpack, pocket or hand for the new paper.") - else - to_chat(M, "The [href_list["rune"]] talisman in your [where]") - M.update_icons() - src.uses-- - supply() - - if("armor") - var/obj/item/weapon/paper/talisman/T = new(M) - T.imbue = "armor" - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - - var/where = M.equip_in_one_of_slots(T, slots) - if(!where) - to_chat(M, "You need a space in your backpack, pocket or hand for the new paper.") - else - to_chat(M, "The [href_list["rune"]] talisman in your [where]") - M.update_icons() - src.uses-- - supply() - - if("soulstone") - new /obj/item/device/soulstone(get_turf(usr)) - src.uses-- - supply() - if("construct") - new /obj/structure/constructshell(get_turf(usr)) - src.uses-- - supply() - else - return - - - - return +//Malformed Talisman: If something goes wrong. +/obj/item/weapon/paper/talisman/malformed + cultist_name = "malformed talisman" + cultist_desc = "A talisman with gibberish scrawlings. No good can come from invoking this." + invocation = "Ra'sha yoka!" +/obj/item/weapon/paper/talisman/malformed/invoke(mob/living/user, successfuluse = 1) + to_chat(user, "You feel a pain in your head. [ticker.mode.cultdat.entity_title3] is displeased.") + if(iscarbon(user)) + var/mob/living/carbon/C = user + C.apply_damage(10, BRUTE, "head") +//Supply Talisman: Has a few unique effects. Granted only to starter cultists. /obj/item/weapon/paper/talisman/supply - imbue = "supply" - uses = 5 \ No newline at end of file + cultist_name = "Supply Talisman" + cultist_desc = "A multi-use talisman that can create various objects. Intended to increase the cult's strength early on." + invocation = null + uses = 3 + +/obj/item/weapon/paper/talisman/supply/invoke(mob/living/user, successfuluse = 1) + var/dat = list() + dat += "There are [uses] bloody runes on the parchment.
" + dat += "Please choose the chant to be imbued into the fabric of reality.
" + dat += "
" + dat += "N'ath reth sh'yro eth d'raggathnor! - Summons an arcane tome, used to scribe runes and communicate with other cultists.
" + dat += "Sas'so c'arta forbici! - Allows you to move to a selected teleportation rune.
" + dat += "Ta'gh fara'qha fel d'amar det! - Allows you to destroy technology in a short range.
" + dat += "Fuu ma'jin! - Allows you to stun a person by attacking them with the talisman.
" + dat += "Kla'atu barada nikt'o! - Two use talisman, first use makes all nearby runes invisible, second use reveals nearby hidden runes.
" + dat += "Kal'om neth! - Summons a soul stone, used to capure the spirits of dead or dying humans.
" + dat += "Daa'ig osk! - Summons a construct shell for use with soulstone-captured souls. It is too large to carry on your person.
" + var/datum/browser/popup = new(user, "talisman", "", 400, 400) + popup.set_content(jointext(dat, "")) + popup.open() + return 0 + +/obj/item/weapon/paper/talisman/supply/Topic(href, href_list) + if(src) + if(usr.stat || usr.restrained() || !in_range(src, usr)) + return + if(href_list["rune"]) + switch(href_list["rune"]) + if("newtome") + var/obj/item/weapon/tome/T = new(usr) + usr.put_in_hands(T) + if("teleport") + var/obj/item/weapon/paper/talisman/teleport/T = new(usr) + usr.put_in_hands(T) + if("emp") + var/obj/item/weapon/paper/talisman/emp/T = new(usr) + usr.put_in_hands(T) + if("runestun") + var/obj/item/weapon/paper/talisman/stun/T = new(usr) + usr.put_in_hands(T) + if("soulstone") + var/obj/item/device/soulstone/T = new(usr) + usr.put_in_hands(T) + if("construct") + new /obj/structure/constructshell(get_turf(usr)) + if("veiling") + var/obj/item/weapon/paper/talisman/true_sight/T = new(usr) + usr.put_in_hands(T) + uses-- + if(uses <= 0) + if(iscarbon(usr)) + var/mob/living/carbon/C = usr + C.drop_item() + visible_message("[src] crumbles to dust.") + qdel(src) + +/obj/item/weapon/paper/talisman/supply/weak + uses = 2 + +//Rite of Translocation: Same as rune +/obj/item/weapon/paper/talisman/teleport + cultist_name = "Talisman of Teleportation" + cultist_desc = "A single-use talisman that will teleport a user to a random rune of the same keyword." + invocation = "Sas'so c'arta forbici!" + health_cost = 5 + +/obj/item/weapon/paper/talisman/teleport/invoke(mob/living/user, successfuluse = 1) + 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 + potential_runes[resultkey] = T + + if(!potential_runes.len) + to_chat(user, "There are no valid runes to teleport to!") + log_game("Teleport talisman failed - no other teleport runes") + return ..(user, 0) + + if(!is_level_reachable(user.z)) + to_chat(user, "You are not in the right dimension!") + log_game("Teleport talisman failed - user in away mission") + return ..(user, 0) + + 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(!actual_selected_rune) + return ..(user, 0) + user.visible_message("Dust flows from [user]'s hand, and they disappear in a flash of red light!", \ + "You speak the words of the talisman and find yourself somewhere else!") + user.forceMove(get_turf(actual_selected_rune)) + return ..() + + +/obj/item/weapon/paper/talisman/summon_tome + cultist_name = "Talisman of Tome Summoning" + cultist_desc = "A one-use talisman that will call an untranslated tome from the archives of a cult." + invocation = "N'ath reth sh'yro eth d'raggathnor!" + health_cost = 1 + +/obj/item/weapon/paper/talisman/summon_tome/invoke(mob/living/user, successfuluse = 1) + . = ..() + user.visible_message("[user]'s hand glows red for a moment.", \ + "You speak the words of the talisman!") + new /obj/item/weapon/tome(get_turf(user)) + user.visible_message("A tome appears at [user]'s feet!", \ + "An arcane tome materializes at your feet.") + +/obj/item/weapon/paper/talisman/true_sight + cultist_name = "Talisman of Veiling" + cultist_desc = "A multi-use talisman that hides nearby runes. On its second use, will reveal nearby runes." + invocation = "Kla'atu barada nikt'o!" + health_cost = 1 + uses = 2 + var/revealing = FALSE //if it reveals or not + +/obj/item/weapon/paper/talisman/true_sight/invoke(mob/living/user, successfuluse = 1) + . = ..() + if(!revealing) + user.visible_message("Thin grey dust falls from [user]'s hand!", \ + "You speak the words of the talisman, hiding nearby runes.") + invocation = "Nikt'o barada kla'atu!" + revealing = TRUE + for(var/obj/effect/rune/R in range(3,user)) + R.talismanhide() + else + user.visible_message("A flash of light shines from [user]'s hand!", \ + "You speak the words of the talisman, revealing nearby runes.") + for(var/obj/effect/rune/R in range(3,user)) + R.talismanreveal() + +//Rite of False Truths: Same as rune +/obj/item/weapon/paper/talisman/make_runes_fake + cultist_name = "Talisman of Disguising" + cultist_desc = "A talisman that will make nearby runes appear fake." + invocation = "By'o nar'nar!" + +/obj/item/weapon/paper/talisman/make_runes_fake/invoke(mob/living/user, successfuluse = 1) + . = ..() + user.visible_message("Dust flows from [user]s hand.", \ + "You speak the words of the talisman, making nearby runes appear fake.") + for(var/obj/effect/rune/R in orange(6,user)) + R.talismanfake() + R.desc = "A rune drawn in crayon." + + +//Rite of Disruption: Weaker than rune +/obj/item/weapon/paper/talisman/emp + cultist_name = "Talisman of Electromagnetic Pulse" + cultist_desc = "A talisman that will cause a moderately-sized electromagnetic pulse." + invocation = "Ta'gh fara'qha fel d'amar det!" + health_cost = 5 + +/obj/item/weapon/paper/talisman/emp/invoke(mob/living/user, successfuluse = 1) + . = ..() + user.visible_message("[user]'s hand flashes a bright blue!", \ + "You speak the words of the talisman, emitting an EMP blast.") + empulse(src, 4, 8) + + +//Rite of Disorientation: Stuns and inhibit speech on a single target for quite some time +/obj/item/weapon/paper/talisman/stun + cultist_name = "Talisman of Stunning" + cultist_desc = "A talisman that will stun and inhibit speech on a single target. To use, attack target directly." + invocation = "Dream sign:Evil sealing talisman!" + health_cost = 10 + +/obj/item/weapon/paper/talisman/stun/invoke(mob/living/user, successfuluse = 0) + if(successfuluse) //if we're forced to be successful(we normally aren't) then do the normal stuff + return ..() + if(iscultist(user)) + to_chat(user, "To use this talisman, attack the target directly.") + else + to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?") + return 0 + +/obj/item/weapon/paper/talisman/stun/attack(mob/living/target, mob/living/user, successfuluse = 1) + if(iscultist(user)) + invoke(user, 1) + user.visible_message("[user] holds up [src], which explodes in a flash of red light!", \ + "You stun [target] with the talisman!") + var/obj/item/weapon/nullrod/N = locate() in target + if(N) + target.visible_message("[target]'s holy weapon absorbs the talisman's light!", \ + "Your holy weapon absorbs the blinding light!") + else + target.Weaken(10) + target.Stun(10) + target.flash_eyes(1,1) + if(issilicon(target)) + var/mob/living/silicon/S = target + S.emp_act(1) + if(iscarbon(target)) + var/mob/living/carbon/C = target + C.AdjustSilence(5) + C.AdjustStuttering(15) + C.AdjustCultSlur(20) + C.Jitter(15) + user.drop_item() + qdel(src) + return + ..() + + +//Rite of Arming: Equips cultist armor on the user, where available +/obj/item/weapon/paper/talisman/armor + cultist_name = "Talisman of Arming" + cultist_desc = "A talisman that will equip the invoker with cultist equipment if there is a slot to equip it to." + invocation = "N'ath reth sh'yro eth draggathnor!" + +/obj/item/weapon/paper/talisman/armor/invoke(mob/living/user, successfuluse = 1) + . = ..() + var/mob/living/carbon/human/H = user + user.visible_message("Otherworldly armor suddenly appears on [user]!", \ + "You speak the words of the talisman, arming yourself!") + H.equip_or_collect(new /obj/item/clothing/suit/hooded/cultrobes/alt(user), slot_wear_suit) + H.equip_or_collect(new /obj/item/weapon/storage/backpack/cultpack(user), slot_back) + H.drop_item() + H.put_in_hands(new /obj/item/weapon/melee/cultblade(user)) + H.put_in_hands(new /obj/item/weapon/restraints/legcuffs/bola/cult(user)) + +/obj/item/weapon/paper/talisman/armor/attack(mob/living/target, mob/living/user) + if(iscultist(user) && iscultist(target)) + user.drop_item() + invoke(target) + qdel(src) + return + ..() + + +//Talisman of Horrors: Breaks the mind of the victim with nightmarish hallucinations +/obj/item/weapon/paper/talisman/horror + cultist_name = "Talisman of Horrors" + cultist_desc = "A talisman that will break the mind of the victim with nightmarish hallucinations." + invocation = "Lo'Nab Na'Dm!" + +/obj/item/weapon/paper/talisman/horror/attack(mob/living/target, mob/living/user) + if(iscultist(user)) + to_chat(user, "You disturb [target] with visons of the end!") + if(iscarbon(target)) + var/mob/living/carbon/H = target + H.AdjustHallucinate(30) + qdel(src) + + +//Talisman of Fabrication: Creates a construct shell out of 25 metal sheets. +/obj/item/weapon/paper/talisman/construction + cultist_name = "Talisman of Construction" + cultist_desc = "Use this talisman on at least twenty-five metal sheets to create an empty construct shell or on plasteel to make runed metal" + invocation = "Ethra p'ni dedol!" + uses = 25 + +/obj/item/weapon/paper/talisman/construction/attack_self(mob/living/user) + if(iscultist(user)) + to_chat(user, "To use this talisman, place it upon a stack of metal sheets or plasteel sheets!.") + else + to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?") + + +/obj/item/weapon/paper/talisman/construction/attack(obj/M,mob/living/user) + if(iscultist(user)) + to_chat(user, "This talisman will only work on a stack of metal sheets or plasteel sheets!!") + log_game("Construct talisman failed - not a valid target") + +/obj/item/weapon/paper/talisman/construction/afterattack(obj/item/stack/sheet/target, mob/user, proximity_flag, click_parameters) + ..() + if(proximity_flag && iscultist(user)) + if(istype(target, /obj/item/stack/sheet/metal)) + var/turf/T = get_turf(target) + if(target.use(25)) + new /obj/structure/constructshell(T) + to_chat(user, "The talisman clings to the metal and twists it into a construct shell!") + user << sound('sound/magic/Staff_Chaos.ogg',0,1,25) + qdel(src) + return + if(istype(target, /obj/item/stack/sheet/plasteel)) + var/turf/T = get_turf(target) + var/quantity = min(target.amount, uses) + uses -= quantity + new /obj/item/stack/sheet/runed_metal(T,quantity) + target.use(quantity) + to_chat(user, "The talisman clings to the plasteel, transforming it into runed metal!") + user << sound('sound/magic/Staff_Chaos.ogg',0,1,25) + invoke(user, 1) + if(uses <= 0) + qdel(src) + else + to_chat(user, "The talisman must be used on metal or plasteel!") + +//Talisman of Shackling: Applies special cuffs directly from the talisman +/obj/item/weapon/paper/talisman/shackle + cultist_name = "Talisman of Shackling" + cultist_desc = "Use this talisman on a victim to handcuff them with dark bindings." + invocation = "In'totum Lig'abis!" + uses = 4 + +/obj/item/weapon/paper/talisman/shackle/invoke(mob/living/user, successfuluse = 0) + if(successfuluse) //if we're forced to be successful(we normally aren't) then do the normal stuff + return ..() + if(iscultist(user)) + to_chat(user, "To use this talisman, attack the target directly.") + else + to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?") + return 0 + +/obj/item/weapon/paper/talisman/shackle/attack(mob/living/carbon/target, mob/living/user) + if(iscultist(user) && istype(target)) + if(target.stat == DEAD) + user.visible_message("This talisman's magic does not affect the dead!") + return + CuffAttack(target, user) + return + ..() + +/obj/item/weapon/paper/talisman/shackle/proc/CuffAttack(mob/living/carbon/C, mob/living/user) + if(!C.handcuffed) + invoke(user, 1) + playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) + C.visible_message("[user] begins restraining [C] with dark magic!", \ + "[user] begins shaping a dark magic around your wrists!") + if(do_mob(user, C, 30)) + if(!C.handcuffed) + C.handcuffed = new /obj/item/weapon/restraints/handcuffs/energy/cult/used(C) + C.update_handcuffed() + to_chat(user, "You shackle [C].") + add_logs(user, C, "handcuffed") + uses-- + else + to_chat(user, "[C] is already bound.") + else + to_chat(user, "You fail to shackle [C].") + else + to_chat(user, "[C] is already bound.") + if(uses <= 0) + user.drop_item() + qdel(src) + return + +/obj/item/weapon/restraints/handcuffs/energy/cult //For the talisman of shackling + name = "cult shackles" + desc = "Shackles that bind the wrists with sinister magic." + trashtype = /obj/item/weapon/restraints/handcuffs/energy/used + origin_tech = "materials=2;magnets=5" + +/obj/item/weapon/restraints/handcuffs/energy/cult/used/dropped(mob/user) + user.visible_message("[user]'s shackles shatter in a discharge of dark magic!", \ + "Your [src] shatters in a discharge of dark magic!") + qdel(src) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index f94a731573a..c52b54e6f7b 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -31,6 +31,7 @@ var/ert_disabled = 0 var/uplink_welcome = "Syndicate Uplink Console:" var/uplink_uses = 20 + var/datum/cult_info/cultdat = new /datum/cult_info() //here instead of cult for adminbus purposes var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) @@ -45,6 +46,7 @@ ///Checks to see if the game can be setup and ran with the current number of players or whatnot. /datum/game_mode/proc/can_start() var/playerC = 0 + cultdat = setupcult() for(var/mob/new_player/player in player_list) if((player.client)&&(player.ready)) playerC++ @@ -55,6 +57,7 @@ //pre_pre_setup() For when you really don't want certain jobs ingame. /datum/game_mode/proc/pre_pre_setup() + return 1 ///pre_setup() diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index 6269d2e65d6..2750341e982 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -52,18 +52,21 @@ del_on_death = 1 deathmessage = "screams in anger as it collapses into a puddle of viscera!" + var/datum/action/innate/demon/whisper/whisper_action + /mob/living/simple_animal/slaughter/New() ..() var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new AddSpell(bloodspell) + whisper_action = new() + whisper_action.Grant(src) if(istype(loc, /obj/effect/dummy/slaughter)) bloodspell.phased = 1 if(mind) to_chat(src, src.playstyle_string) to_chat(src, "You are not currently in the same plane of existence as the station. Ctrl+Click a blood pool to manifest.") src << 'sound/misc/demon_dies.ogg' - mind.current.verbs += /mob/living/simple_animal/slaughter/proc/slaughterWhisper if(!(vialspawned)) var/datum/objective/slaughter/objective = new var/datum/objective/demonFluff/fluffObjective = new @@ -101,31 +104,127 @@ speed = 0 boost = world.time + 60 + + + +/mob/living/simple_animal/slaughter/cult //Summoned as part of the cult objective "Bring the Slaughter" + name = "harbringer of the slaughter" + real_name = "harbringer of the Slaughter" + desc = "An awful creature from beyond the realms of madness." + maxHealth = 500 + health = 500 + melee_damage_upper = 60 + melee_damage_lower = 60 + environment_smash = 3 //Smashes through EVERYTHING - r-walls included + faction = list("cult") + playstyle_string = "You are a Harbringer of the Slaughter. Brought forth by the servants of Nar-Sie, you have a single purpose: slaughter the heretics \ + who do not worship your master. You may use the ability 'Blood Crawl' near a pool of blood to enter it and become incorporeal. Using the ability again near a blood pool will allow you \ + to emerge from it. You are fast, powerful, and almost invincible. By dragging a dead or unconscious body into a blood pool with you, you will consume it after a time and fully regain \ + your health. You may use the Sense Victims in your Cultist tab to locate a random, living heretic." + +/obj/effect/proc_holder/spell/targeted/sense_victims + name = "Sense Victims" + desc = "Sense the location of heratics" + charge_max = 0 + clothes_req = 0 + range = 20 + cooldown_min = 0 + overlay = null + action_icon_state = "bloodcrawl" + action_background_icon_state = "bg_cult" + panel = "Demon" + +/obj/effect/proc_holder/spell/targeted/sense_victims/cast(list/targets) + var/list/victims = targets + for(var/mob/living/L in living_mob_list) + if(!L.stat && !iscultist(L) && L.key && L != usr) + victims.Add(L) + if(!targets.len) + to_chat(usr, "You could not locate any sapient heretics for the Slaughter.") + return 0 + var/mob/living/victim = pick(victims) + to_chat(victim, "You feel an awful sense of being watched...") + victim.Stun(3) //HUE + var/area/A = get_area(victim) + if(!A) + to_chat(usr, "You could not locate any sapient heretics for the Slaughter.") + return 0 + to_chat(usr, "You sense a terrified soul at [A]. Show them the error of their ways.") + +/mob/living/simple_animal/slaughter/cult/New() + ..() + spawn(5) + var/list/demon_candidates = get_candidates(ROLE_CULTIST) + if(!demon_candidates.len) + visible_message("[src] disappears in a flash of red light!") + qdel(src) + return 0 + var/client/C = pick(demon_candidates) + var/mob/living/simple_animal/slaughter/cult/S = src + if(!C) + visible_message("[src] disappears in a flash of red light!") + qdel(src) + return 0 + + S.key = C.key + S.mind.assigned_role = "Harbringer of the Slaughter" + S.mind.special_role = "Harbringer of the Slaughter" + to_chat(S, playstyle_string) + ticker.mode.add_cultist(S.mind) + var/obj/effect/proc_holder/spell/targeted/sense_victims/SV = new + AddSpell(SV) + var/datum/objective/new_objective = new /datum/objective + new_objective.owner = S.mind + new_objective.explanation_text = "Bring forth the Slaughter to the nonbelievers." + S.mind.objectives += new_objective + to_chat(S, "Objective #[1]: [new_objective.explanation_text]") + ////////////////////The Powers //Paradise Port:I added this cuase..SPOOPY DEMON IN YOUR BRAIN -/mob/living/simple_animal/slaughter/proc/slaughterWhisper() - set name = "Whisper" - set desc = "Whisper to a mortal" - set category = "Daemon" +/datum/action/innate/demon/whisper + name = "Demonic Whisper" + button_icon_state = "cult_comms" + background_icon_state = "bg_demon" - var/list/choices = list() - for(var/mob/living/carbon/C in living_mob_list) - if(C.stat != 2 && C.client && C.stat != DEAD) - choices += C +/datum/action/innate/demon/whisper/IsAvailable() + return ..() - var/mob/living/carbon/M = input(src,"Who do you wish to talk to?") in null|choices - spawn(0) - var/msg = stripped_input(usr, "What do you wish to tell [M]?", null, "") - if(!(msg)) - return - log_say("Slaughter Demon Transmit: [key_name(usr)]->[key_name(M)]: [msg]") - to_chat(usr, "You whisper to [M]: [msg]") - to_chat(M, "Suddenly a strange, demonic voice resonates in your head... [msg]") - for(var/mob/dead/observer/G in player_list) - G.show_message("Demonic message from [usr] ([ghost_follow_link(usr, ghost=G)]) to [M] ([ghost_follow_link(M, ghost=G)]): [msg]") +/datum/action/innate/demon/whisper/proc/choose_targets(mob/user = usr)//yes i am copying from telepathy..hush... + var/list/targets = new /list() + var/list/validtargets = new /list() + for(var/mob/M in view(user.client.view, user)) + if(M && M.mind) + if(M == user) + continue + + validtargets += M + + if(!validtargets.len) + to_chat(usr, "There are no valid targets!") + return + + targets += input("Choose the target to talk to.", "Targeting") as null|mob in validtargets + + if(!targets.len || !targets[1]) + return + +/datum/action/innate/demon/whisper/Activate() + var/list/choice = choose_targets() + + if(!choice.len) + return + + var/msg = stripped_input(usr, "What do you wish to tell [choice]?", null, "") + if(!(msg)) + return + log_say("Slaughter Demon Transmit: [key_name(usr)]->[key_name(choice)]: [msg]") + to_chat(usr, "You whisper to [choice]: [msg]") + to_chat(choice, "Suddenly a strange, demonic voice resonates in your head... [msg]") + for(var/mob/dead/observer/G in player_list) + G.show_message("Demonic message from [usr] ([ghost_follow_link(usr, ghost=G)]) to [choice] ([ghost_follow_link(choice, ghost=G)]): [msg]") //////////The Loot diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index 15ec89d71a2..61abe7bf39e 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -148,3 +148,14 @@ // Populate the syndicate coalition: for(var/datum/faction/syndicate/S in ticker.factions) ticker.syndicate_coalition.Add(S) + +/proc/setupcult() + var/random_cult = pick(all_cults) + var/picked_cult = new random_cult() //this seems redundent as fuck + log_startup_progress("Summoning eldritch horrors...") + if(!picked_cult)//shouldn't happen BUT JUST TO BE SURE LET US KNOW + log_startup_progress(" Failed to select a cult datum, Shank a coder!") + else + log_startup_progress(" [picked_cult] has risen!") + //todo:add adminonly datum var, check for said var here... + return picked_cult \ No newline at end of file diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index a6e973fc536..29eae864fb8 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -104,6 +104,22 @@ /obj/item/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob). switch(choice) + if("FORCE") + var/obj/item/device/soulstone/C = src + if(!iscarbon(target)) //TODO: Add sacrifice stoning for non-organics, just because you have no body doesnt mean you dont have a soul + return 0 + if(contents.len) + return 0 + var/mob/living/carbon/T = target + if(T.client != null) + for(var/obj/item/W in T) + T.unEquip(W) + C.init_shade(T, U) + return 1 + else + to_chat(U, "Capture failed!: The soul has already fled its mortal frame. You attempt to bring it back...") + return C.getCultGhost(T,U) + if("VICTIM") var/mob/living/carbon/human/T = target var/obj/item/device/soulstone/C = src @@ -114,37 +130,15 @@ to_chat(U, "Capture failed!: Kill or maim the victim first!") else if(T.client == null) - to_chat(U, "Capture failed!: The soul has already fled it's mortal frame.") + to_chat(U, "Capture failed!: The soul has already fled its mortal frame. You attempt to bring it back...") + C.getCultGhost(T,U) else if(C.contents.len) to_chat(U, "Capture failed!: The soul stone is full! Use or free an existing soul to make room.") else for(var/obj/item/W in T) T.unEquip(W) - new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton - T.invisibility = 101 - var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc ) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = T - flick("dust-h", animation) - qdel(animation) - var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc ) - S.loc = C //put shade in stone - S.status_flags |= GODMODE //So they won't die inside the stone somehow - S.canmove = 0//Can't move out of the soul stone - S.faction |= "\ref[U]" - S.name = "Shade of [T.real_name]" - S.real_name = "Shade of [T.real_name]" - if(T.client) - T.client.mob = S - S.cancel_camera() - C.icon_state = "soulstone2" - C.name = "Soul Stone: [S.real_name]" - to_chat(S, "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs.") - to_chat(U, "Capture successful!: [T.real_name]'s soul has been ripped from their body and stored within the soul stone.") - to_chat(U, "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls.") - C.imprinted = "[S.name]" + C.init_shade(T, U, vic = 1) qdel(T) if("SHADE") var/mob/living/simple_animal/shade/T = target @@ -174,7 +168,7 @@ var/construct_class = alert(U, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer") switch(construct_class) if("Juggernaut") - var/mob/living/simple_animal/construct/armoured/Z = new /mob/living/simple_animal/construct/armoured (get_turf(T.loc)) + var/mob/living/simple_animal/hostile/construct/armoured/Z = new /mob/living/simple_animal/hostile/construct/armoured (get_turf(T.loc)) Z.key = A.key Z.faction |= "\ref[U]" if(iscultist(U)) @@ -190,7 +184,7 @@ qdel(C) if("Wraith") - var/mob/living/simple_animal/construct/wraith/Z = new /mob/living/simple_animal/construct/wraith (get_turf(T.loc)) + var/mob/living/simple_animal/hostile/construct/wraith/Z = new /mob/living/simple_animal/hostile/construct/wraith (get_turf(T.loc)) Z.key = A.key Z.faction |= "\ref[U]" if(iscultist(U)) @@ -206,7 +200,7 @@ qdel(C) if("Artificer") - var/mob/living/simple_animal/construct/builder/Z = new /mob/living/simple_animal/construct/builder (get_turf(T.loc)) + var/mob/living/simple_animal/hostile/construct/builder/Z = new /mob/living/simple_animal/hostile/construct/builder (get_turf(T.loc)) Z.key = A.key Z.faction |= "\ref[U]" if(iscultist(U)) @@ -224,10 +218,10 @@ to_chat(U, "Creation failed!: The soul stone is empty! Go kill someone!") return -/proc/makeNewConstruct(var/mob/living/simple_animal/construct/ctype, var/mob/target, var/mob/stoner = null, cultoverride = 0) +/proc/makeNewConstruct(var/mob/living/simple_animal/hostile/construct/ctype, var/mob/target, var/mob/stoner = null, cultoverride = 0) if(jobban_isbanned(target, "cultist") || jobban_isbanned(target, "Syndicate")) return - var/mob/living/simple_animal/construct/newstruct = new ctype(get_turf(target)) + var/mob/living/simple_animal/hostile/construct/newstruct = new ctype(get_turf(target)) newstruct.faction |= "\ref[stoner]" newstruct.key = target.key if(stoner && iscultist(stoner) || cultoverride) @@ -242,4 +236,61 @@ to_chat(newstruct, "You are still bound to serve the cult, follow their orders and help them complete their goals at all costs.") else to_chat(newstruct, "You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.") - newstruct.cancel_camera() \ No newline at end of file + newstruct.cancel_camera() + + +/obj/item/device/soulstone/proc/init_shade(mob/living/carbon/human/T, mob/U, vic = 0) + new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton + T.invisibility = 101 + var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc ) + animation.icon_state = "blank" + animation.icon = 'icons/mob/mob.dmi' + animation.master = T + flick("dust-h", animation) + qdel(animation) + var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade(src) + S.status_flags |= GODMODE //So they won't die inside the stone somehow + S.canmove = 0//Can't move out of the soul stone + S.name = "Shade of [T.real_name]" + S.real_name = "Shade of [T.real_name]" + S.key = T.key + if(U) + S.faction |= "\ref[U]" //Add the master as a faction, allowing inter-mob cooperation + if(U && iscultist(U)) + ticker.mode.add_cultist(S.mind, 0) + S.cancel_camera() + name = "soulstone: Shade of [T.real_name]" + icon_state = "soulstone2" + if(U && iswizard(U)) + to_chat(S, "Your soul has been captured! You are now bound to [U.real_name]'s will. Help them succeed in their goals at all costs.") + else if(U && iscultist(U)) + to_chat(S, "Your soul has been captured! You are now bound to the cult's will. Help them succeed in their goals at all costs.") + if(vic && U) + to_chat(U, "Capture successful!: [T.real_name]'s soul has been ripped from their body and stored within the soul stone.") + + +/obj/item/device/soulstone/proc/getCultGhost(mob/living/carbon/human/T, mob/U) + var/mob/dead/observer/chosen_ghost + + for(var/mob/dead/observer/ghost in player_list) //We put them back in their body + if(ghost.mind && ghost.mind.current == T && ghost.client) + chosen_ghost = ghost + break + + if(!chosen_ghost) //Failing that, we grab a ghost + var/list/consenting_candidates = pollCandidates("Would you like to play as a Shade?", "Cultist", null, ROLE_CULTIST, poll_time = 100) + if(consenting_candidates.len) + chosen_ghost = pick(consenting_candidates) + if(!T) + return 0 + if(!chosen_ghost) + to_chat(U, "There were no spirits willing to become a shade.") + return 0 + if(contents.len) //If they used the soulstone on someone else in the meantime + return 0 + T.ckey = chosen_ghost.ckey + for(var/obj/item/W in T) + T.unEquip(W) + init_shade(T, U) + qdel(T) + return 1 \ No newline at end of file diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 0e0eaaf6985..c131652a69a 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -410,7 +410,6 @@ if(H.mind in ticker.mode.syndicates) ticker.mode.update_synd_icons_added() if(H.mind in ticker.mode.cult) - ticker.mode.add_cult_viewpoint(H) ticker.mode.add_cultist(occupant.mind) ticker.mode.update_cult_icons_added() //So the icon actually appears if((H.mind in ticker.mode.implanter) || (H.mind in ticker.mode.implanted)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d3302487483..5f751556d0d 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1,1142 +1,1152 @@ -/* - New methods: - pulse - sends a pulse into a wire for hacking purposes - cut - cuts a wire and makes any necessary state changes - mend - mends a wire and makes any necessary state changes - canAIControl - 1 if the AI can control the airlock, 0 if not (then check canAIHack to see if it can hack in) - canAIHack - 1 if the AI can hack into the airlock to recover control, 0 if not. Also returns 0 if the AI does not *need* to hack it. - arePowerSystemsOn - 1 if the main or backup power are functioning, 0 if not. Does not check whether the power grid is charged or an APC has equipment on or anything like that. (Check (stat & NOPOWER) for that) - requiresIDs - 1 if the airlock is requiring IDs, 0 if not - isAllPowerCut - 1 if the main and backup power both have cut wires. - regainMainPower - handles the effect of main power coming back on. - loseMainPower - handles the effect of main power going offline. Usually (if one isn't already running) spawn a thread to count down how long it will be offline - counting down won't happen if main power was completely cut along with backup power, though, the thread will just sleep. - loseBackupPower - handles the effect of backup power going offline. - regainBackupPower - handles the effect of main power coming back on. - shock - has a chance of electrocuting its target. -*/ - - -// Wires for the airlock are located in the datum folder, inside the wires datum folder. - - -/obj/machinery/door/airlock - name = "airlock" - icon = 'icons/obj/doors/Doorint.dmi' - icon_state = "door_closed" - power_channel = ENVIRON - - var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in. - var/hackProof = 0 // if 1, this door can't be hacked by the AI - var/electrified_until = 0 // World time when the door is no longer electrified. -1 if it is permanently electrified until someone fixes it. - var/main_power_lost_until = 0 //World time when main power is restored. - var/backup_power_lost_until = -1 //World time when backup power is restored. - var/electrified_timer = null - var/main_power_timer = null - var/backup_power_timer = null - var/spawnPowerRestoreRunning = 0 - var/welded = null - var/locked = 0 - var/lights = 1 // bolt lights show by default - var/datum/wires/airlock/wires = null - var/aiDisabledIdScanner = 0 - var/aiHacking = 0 - var/obj/machinery/door/airlock/closeOther = null - var/closeOtherId = null - var/lockdownbyai = 0 - var/assembly_type = /obj/structure/door_assembly - var/mineral = null - var/justzap = 0 - var/safe = 1 - normalspeed = 1 - var/obj/item/weapon/airlock_electronics/electronics = null - var/hasShocked = 0 //Prevents multiple shocks from happening - var/frozen = 0 //special condition for airlocks that are frozen shut, this will look weird on not normal airlocks because of a lack of special overlays. - autoclose = 1 - explosion_block = 1 - var/doorOpen = 'sound/machines/airlock.ogg' - var/doorClose = 'sound/machines/airlock.ogg' - var/doorDeni = 'sound/machines/DeniedBeep.ogg' // i'm thinkin' Deni's - var/boltUp = 'sound/machines/BoltsUp.ogg' - var/boltDown = 'sound/machines/BoltsDown.ogg' - var/is_special = 0 - -/obj/machinery/door/airlock/command - name = "Airlock" - icon = 'icons/obj/doors/Doorcom.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_com - -/obj/machinery/door/airlock/security - name = "Airlock" - icon = 'icons/obj/doors/Doorsec.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_sec - -/obj/machinery/door/airlock/engineering - name = "Airlock" - icon = 'icons/obj/doors/Dooreng.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_eng - -/obj/machinery/door/airlock/medical - name = "Airlock" - icon = 'icons/obj/doors/Doormed.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_med - -/obj/machinery/door/airlock/maintenance - name = "Maintenance Access" - icon = 'icons/obj/doors/Doormaint.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_mai - -/obj/machinery/door/airlock/external - name = "External Airlock" - icon = 'icons/obj/doors/Doorext.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_ext - -/obj/machinery/door/airlock/glass - name = "Glass Airlock" - icon = 'icons/obj/doors/Doorglass.dmi' - opacity = 0 - glass = 1 - doorOpen = 'sound/machines/windowdoor.ogg' - doorClose = 'sound/machines/windowdoor.ogg' - -/obj/machinery/door/airlock/centcom - name = "Airlock" - icon = 'icons/obj/doors/Doorele.dmi' - opacity = 0 - -/obj/machinery/door/airlock/vault - name = "Vault" - icon = 'icons/obj/doors/vault.dmi' - opacity = 1 - assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites. - explosion_block = 2 - -/obj/machinery/door/airlock/freezer - name = "Freezer Airlock" - icon = 'icons/obj/doors/Doorfreezer.dmi' - opacity = 1 - assembly_type = /obj/structure/door_assembly/door_assembly_fre - -/obj/machinery/door/airlock/hatch - name = "Airtight Hatch" - icon = 'icons/obj/doors/Doorhatchele.dmi' - opacity = 1 - assembly_type = /obj/structure/door_assembly/door_assembly_hatch - -/obj/machinery/door/airlock/hatch/gamma - name = "Gamma Level Hatch" - hackProof = 1 - aiControlDisabled = 1 - unacidable = 1 - is_special = 1 - -/obj/machinery/door/airlock/maintenance_hatch - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Doorhatchmaint2.dmi' - opacity = 1 - assembly_type = /obj/structure/door_assembly/door_assembly_mhatch - -/obj/machinery/door/airlock/glass_command - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Doorcomglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_com - glass = 1 - -/obj/machinery/door/airlock/glass_engineering - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Doorengglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_eng - glass = 1 - -/obj/machinery/door/airlock/glass_security - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Doorsecglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_sec - glass = 1 - -/obj/machinery/door/airlock/glass_medical - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Doormedglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_med - glass = 1 - -/obj/machinery/door/airlock/mining - name = "Mining Airlock" - icon = 'icons/obj/doors/Doormining.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_min - -/obj/machinery/door/airlock/atmos - name = "Atmospherics Airlock" - icon = 'icons/obj/doors/Dooratmo.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_atmo - -/obj/machinery/door/airlock/research - name = "Airlock" - icon = 'icons/obj/doors/Doorresearch.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_research - -/obj/machinery/door/airlock/glass_research - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Doorresearchglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_research - glass = 1 - heat_proof = 1 - -/obj/machinery/door/airlock/glass_mining - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Doorminingglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_min - glass = 1 - -/obj/machinery/door/airlock/glass_atmos - name = "Maintenance Hatch" - icon = 'icons/obj/doors/Dooratmoglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_atmo - glass = 1 - -/obj/machinery/door/airlock/gold - name = "Gold Airlock" - icon = 'icons/obj/doors/Doorgold.dmi' - mineral = "gold" - -/obj/machinery/door/airlock/silver - name = "Silver Airlock" - icon = 'icons/obj/doors/Doorsilver.dmi' - mineral = "silver" - -/obj/machinery/door/airlock/diamond - name = "Diamond Airlock" - icon = 'icons/obj/doors/Doordiamond.dmi' - mineral = "diamond" - -/obj/machinery/door/airlock/uranium - name = "Uranium Airlock" - desc = "And they said I was crazy." - icon = 'icons/obj/doors/Dooruranium.dmi' - mineral = "uranium" - var/event_step = 20 - -/obj/machinery/door/airlock/uranium/New() - ..() - addtimer(src, "radiate", event_step) - -/obj/machinery/door/airlock/uranium/proc/radiate() - if(prob(50)) - for(var/mob/living/L in range (3,src)) - L.apply_effect(15,IRRADIATE,0) - addtimer(src, "radiate", event_step) - -/obj/machinery/door/airlock/plasma - name = "plasma airlock" - desc = "No way this can end badly." - icon = 'icons/obj/doors/Doorplasma.dmi' - mineral = "plasma" - -/obj/machinery/door/airlock/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > 300) - PlasmaBurn(exposed_temperature) - -/obj/machinery/door/airlock/plasma/proc/ignite(exposed_temperature) - if(exposed_temperature > 300) - PlasmaBurn(exposed_temperature) - -/obj/machinery/door/airlock/plasma/proc/PlasmaBurn(temperature) - atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500) - new/obj/structure/door_assembly( src.loc ) - qdel(src) - -/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~ - return 0 - -/obj/machinery/door/airlock/bananium - name = "Bananium Airlock" - icon = 'icons/obj/doors/Doorbananium.dmi' - mineral = "bananium" - doorOpen = 'sound/items/bikehorn.ogg' - doorClose = 'sound/items/bikehorn.ogg' - -/obj/machinery/door/airlock/tranquillite - name = "Tranquillite Airlock" - icon = 'icons/obj/doors/Doorfreezer.dmi' - mineral = "tranquillite" - doorOpen = null - doorClose = null - -/obj/machinery/door/airlock/sandstone - name = "Sandstone Airlock" - icon = 'icons/obj/doors/Doorsand.dmi' - mineral = "sandstone" - -/obj/machinery/door/airlock/science - name = "Airlock" - icon = 'icons/obj/doors/Doorsci.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_science - -/obj/machinery/door/airlock/glass_science - name = "Glass Airlocks" - icon = 'icons/obj/doors/Doorsciglass.dmi' - opacity = 0 - assembly_type = /obj/structure/door_assembly/door_assembly_science - glass = 1 - -/obj/machinery/door/airlock/highsecurity - name = "High Tech Security Airlock" - icon = 'icons/obj/doors/hightechsecurity.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity - explosion_block = 2 - -/obj/machinery/door/airlock/highsecurity/red - name = "Secure Armory Airlock" - hackProof = 1 - aiControlDisabled = 1 - -/obj/machinery/door/airlock/shuttle - name = "shuttle airlock" - icon = 'icons/obj/doors/doorshuttle.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_shuttle - -/obj/machinery/door/airlock/alien - name = "Alien Airlock" - desc = "A mysterious alien airlock with a complicated opening mechanism." - hackProof = 1 - icon = 'icons/obj/doors/Doorplasma.dmi' - is_special = 1 - -/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob) - if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user)) - ..(user) - else - to_chat(user, "You do not know how to operate this airlock's mechanism.") - return - -/obj/machinery/door/airlock/alien/attackby(C as obj, mob/user as mob, params) - if(isalien(user) || isrobot(user) || isAI(user)) - ..(C, user) - else - to_chat(user, "You do not know how to operate this airlock's mechanism.") - return - - -/* -About the new airlock wires panel: -* An airlock wire dialog can be accessed by the normal way or by using wirecutters or a multitool on the door while the wire-panel is open. This would show the following wires, which you can either wirecut/mend or send a multitool pulse through. There are 9 wires. -* one wire from the ID scanner. Sending a pulse through this flashes the red light on the door (if the door has power). If you cut this wire, the door will stop recognizing valid IDs. (If the door has 0000 access, it still opens and closes, though) -* two wires for power. Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter). Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be \red open, but bolts-raising will not work. Cutting these wires may electrocute the user. -* one wire for door bolts. Sending a pulse through this drops door bolts (whether the door is powered or not) or raises them (if it is). Cutting this wire also drops the door bolts, and mending it does not raise them. If the wire is cut, trying to raise the door bolts will not work. -* two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter). Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user. -* one wire for opening the door. Sending a pulse through this while the door has power makes it open the door if no access is required. -* one wire for AI control. Sending a pulse through this blocks AI control for a second or so (which is enough to see the AI control light on the panel dialog go off and back on again). Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all. -* one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds. Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted. (Currently it is also STAYING electrified until someone mends the wire) -* one wire for controling door safetys. When active, door does not close on someone. When cut, door will ruin someone's shit. When pulsed, door will immedately ruin someone's shit. -* one wire for controlling door speed. When active, dor closes at normal rate. When cut, door does not close manually. When pulsed, door attempts to close every tick. -*/ -// You can find code for the airlock wires in the wire datum folder. - - -/obj/machinery/door/airlock/Destroy() - qdel(wires) - wires = null - if(main_power_timer) - deltimer(main_power_timer) - main_power_timer = null - if(backup_power_timer) - deltimer(backup_power_timer) - backup_power_timer = null - if(electrified_timer) - deltimer(electrified_timer) - electrified_timer = null - return ..() - -/obj/machinery/door/airlock/bumpopen(mob/living/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite - if(!issilicon(usr)) - if(src.isElectrified()) - if(!src.justzap) - if(src.shock(user, 100)) - src.justzap = 1 - spawn (10) - src.justzap = 0 - return - else /*if(src.justzap)*/ - return - else if(user.hallucination > 50 && prob(10) && src.operating == 0) - to_chat(user, "You feel a powerful shock course through your body!") - user.adjustStaminaLoss(50) - user.AdjustStunned(5) - return - ..(user) - -/obj/machinery/door/airlock/bumpopen(mob/living/simple_animal/user as mob) - ..(user) - - -/obj/machinery/door/airlock/autoclose() - autoclose_timer = 0 - if(!qdeleted(src) && !density && !operating && !locked && !welded && autoclose) - close() - return - -/obj/machinery/door/airlock/proc/isElectrified() - if(src.electrified_until != 0) - return 1 - return 0 - -/obj/machinery/door/airlock/proc/isWireCut(var/wireIndex) - // You can find the wires in the datum folder. - return wires.IsIndexCut(wireIndex) - -/obj/machinery/door/airlock/proc/canAIControl() - return ((src.aiControlDisabled!=1) && (!src.isAllPowerLoss())); - -/obj/machinery/door/airlock/proc/canAIHack() - return ((src.aiControlDisabled==1) && (!hackProof) && (!src.isAllPowerLoss())); - -/obj/machinery/door/airlock/proc/arePowerSystemsOn() - if(stat & (NOPOWER|BROKEN)) - return 0 - return (src.main_power_lost_until==0 || src.backup_power_lost_until==0) - -/obj/machinery/door/airlock/requiresID() - return !(src.isWireCut(AIRLOCK_WIRE_IDSCAN) || aiDisabledIdScanner) - -/obj/machinery/door/airlock/proc/isAllPowerLoss() - if(stat & (NOPOWER|BROKEN)) - return 1 - if(mainPowerCablesCut() && backupPowerCablesCut()) - return 1 - return 0 - -/obj/machinery/door/airlock/proc/mainPowerCablesCut() - return src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1) || src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2) - -/obj/machinery/door/airlock/proc/backupPowerCablesCut() - return src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1) || src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2) - -/obj/machinery/door/airlock/proc/loseMainPower() - main_power_lost_until = mainPowerCablesCut() ? -1 : world.time + SecondsToTicks(60) - if(main_power_lost_until > 0) - main_power_timer = addtimer(src, "regainMainPower", SecondsToTicks(60), 1) - - // If backup power is permanently disabled then activate in 10 seconds if possible, otherwise it's already enabled or a timer is already running - if(backup_power_lost_until == -1 && !backupPowerCablesCut()) - backup_power_lost_until = world.time + SecondsToTicks(10) - backup_power_timer = addtimer(src, "regainBackupPower", SecondsToTicks(10), 1) - - // Disable electricity if required - if(electrified_until && isAllPowerLoss()) - electrify(0) - -/obj/machinery/door/airlock/proc/loseBackupPower() - backup_power_lost_until = backupPowerCablesCut() ? -1 : world.time + SecondsToTicks(60) - if(backup_power_lost_until > 0) - backup_power_timer = addtimer(src, "regainBackupPower", SecondsToTicks(60), 1) - - // Disable electricity if required - if(electrified_until && isAllPowerLoss()) - electrify(0) - -/obj/machinery/door/airlock/proc/regainMainPower() - main_power_timer = null - - if(!mainPowerCablesCut()) - main_power_lost_until = 0 - // If backup power is currently active then disable, otherwise let it count down and disable itself later - if(!backup_power_lost_until) - backup_power_lost_until = -1 - update_icon() - -/obj/machinery/door/airlock/proc/regainBackupPower() - backup_power_timer = null - - if(!backupPowerCablesCut()) - // Restore backup power only if main power is offline, otherwise permanently disable - backup_power_lost_until = main_power_lost_until == 0 ? -1 : 0 - update_icon() - -/obj/machinery/door/airlock/proc/electrify(var/duration, var/feedback = 0) - if(electrified_timer) - deltimer(electrified_timer) - electrified_timer = null - - var/message = "" - if(isWireCut(AIRLOCK_WIRE_ELECTRIFY) && arePowerSystemsOn()) - message = text("The electrification wire is cut - Door permanently electrified.") - electrified_until = -1 - else if(duration && !arePowerSystemsOn()) - message = text("The door is unpowered - Cannot electrify the door.") - electrified_until = 0 - else if(!duration && electrified_until != 0) - message = "The door is now un-electrified." - electrified_until = 0 - else if(duration) //electrify door for the given duration seconds - if(usr) - shockedby += text("\[[time_stamp()]\] - [usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") - else - shockedby += text("\[[time_stamp()]\] - EMP)") - message = "The door is now electrified [duration == -1 ? "permanently" : "for [duration] second\s"]." - electrified_until = duration == -1 ? -1 : world.time + SecondsToTicks(duration) - if(duration != -1) - electrified_timer = addtimer(src, "electrify", SecondsToTicks(duration), 1, 0) - - if(feedback && message) - to_chat(usr, message) - -// shock user with probability prb (if all connections & power are working) -// returns 1 if shocked, 0 otherwise -// The preceding comment was borrowed from the grille's shock script -/obj/machinery/door/airlock/shock(mob/user, prb) - if(!arePowerSystemsOn()) - return 0 - if(hasShocked) - return 0 //Already shocked someone recently? - if(..()) - hasShocked = 1 - sleep(10) - hasShocked = 0 - return 1 - else - return 0 - -/obj/machinery/door/airlock/update_icon() - if(overlays) overlays.Cut() - overlays = list() - if(emergency && arePowerSystemsOn()) - overlays += image('icons/obj/doors/doorint.dmi', "elights") - if(density) - if(locked && lights) - icon_state = "door_locked" - else - icon_state = "door_closed" - if(p_open || welded || frozen) - if(p_open) - overlays += image(icon, "panel_open") - if(welded) - overlays += image(icon, "welded") - if(frozen) - overlays += image(icon, "frozen") - - else - icon_state = "door_open" - - return - - -/obj/machinery/door/airlock/do_animate(animation) - switch(animation) - if("opening") - if(overlays) overlays.Cut() - if(p_open) - spawn(2) // The only work around that works. Downside is that the door will be gone for a millisecond. - flick("o_door_opening", src) //can not use flick due to BYOND bug updating overlays right before flicking - update_icon() - else - flick("door_opening", src)//[stat ? "_stat":] - update_icon() - if("closing") - if(overlays) overlays.Cut() - if(p_open) - spawn(2) - flick("o_door_closing", src) - update_icon() - else - flick("door_closing", src) - update_icon() - if("spark") - if(density) - flick("door_spark", src) - if("deny") - if(density && src.arePowerSystemsOn()) - playsound(src, doorDeni, 50, 0, 3) - flick("door_deny", src) - return - -/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) - ui.open() - ui.set_auto_update(1) - -/obj/machinery/door/airlock/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) - var/data[0] - - data["main_power_loss"] = round(main_power_lost_until > 0 ? max(main_power_lost_until - world.time, 0) / 10 : main_power_lost_until, 1) - data["backup_power_loss"] = round(backup_power_lost_until > 0 ? max(backup_power_lost_until - world.time, 0) / 10 : backup_power_lost_until, 1) - data["electrified"] = round(electrified_until > 0 ? max(electrified_until - world.time, 0) / 10 : electrified_until, 1) - data["open"] = !density - - var/commands[0] - commands[++commands.len] = list("name" = "IdScan", "command"= "idscan", "active" = !aiDisabledIdScanner,"enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) - commands[++commands.len] = list("name" = "Bolts", "command"= "bolts", "active" = !locked, "enabled" = "Raised", "disabled" = "Dropped", "danger" = 0, "act" = 0) - commands[++commands.len] = list("name" = "Bolt Lights", "command"= "lights", "active" = lights, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) - commands[++commands.len] = list("name" = "Safeties", "command"= "safeties", "active" = safe, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) - commands[++commands.len] = list("name" = "Timing", "command"= "timing", "active" = normalspeed, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) - commands[++commands.len] = list("name" = "Door State", "command"= "open", "active" = density, "enabled" = "Closed", "disabled" = "Opened", "danger" = 0, "act" = 0) - commands[++commands.len] = list("name" = "Emergency Access","command"= "emergency", "active" = !emergency, "enabled" = "Disabled", "disabled" = "Enabled", "danger" = 0, "act" = 0) - - data["commands"] = commands - return data - -/obj/machinery/door/airlock/proc/hack(mob/user as mob) - if(src.aiHacking==0) - src.aiHacking=1 - spawn(20) - //TODO: Make this take a minute - to_chat(user, "Airlock AI control has been blocked. Beginning fault-detection.") - sleep(50) - if(src.canAIControl()) - to_chat(user, "Alert cancelled. Airlock control has been restored without our assistance.") - src.aiHacking=0 - return - else if(!src.canAIHack(user)) - to_chat(user, "We've lost our connection! Unable to hack airlock.") - src.aiHacking=0 - return - to_chat(user, "Fault confirmed: airlock control wire disabled or cut.") - sleep(20) - to_chat(user, "Attempting to hack into airlock. This may take some time.") - sleep(200) - if(src.canAIControl()) - to_chat(user, "Alert cancelled. Airlock control has been restored without our assistance.") - src.aiHacking=0 - return - else if(!src.canAIHack(user)) - to_chat(user, "We've lost our connection! Unable to hack airlock.") - src.aiHacking=0 - return - to_chat(user, "Upload access confirmed. Loading control program into airlock software.") - sleep(170) - if(src.canAIControl()) - to_chat(user, "Alert cancelled. Airlock control has been restored without our assistance.") - src.aiHacking=0 - return - else if(!src.canAIHack(user)) - to_chat(user, "We've lost our connection! Unable to hack airlock.") - src.aiHacking=0 - return - to_chat(user, "Transfer complete. Forcing airlock to execute program.") - sleep(50) - //disable blocked control - src.aiControlDisabled = 2 - to_chat(user, "Receiving control information from airlock.") - sleep(10) - //bring up airlock dialog - src.aiHacking = 0 - if(user) - src.attack_ai(user) - -/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(src.isElectrified()) - if(istype(mover, /obj/item)) - var/obj/item/i = mover - if(i.materials[MAT_METAL]) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(5, 1, src) - s.start() - return ..() - -/obj/machinery/door/airlock/attack_hand(mob/user as mob) - if(!istype(user, /mob/living/silicon)) - if(src.isElectrified()) - if(src.shock(user, 100)) - return - - if(ishuman(user) && prob(40) && src.density) - var/mob/living/carbon/human/H = user - if(H.getBrainLoss() >= 60) - playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) - if(!istype(H.head, /obj/item/clothing/head/helmet)) - visible_message("\red [user] headbutts the airlock.") - var/obj/item/organ/external/affecting = H.get_organ("head") - H.Stun(5) - H.Weaken(5) - if(affecting.take_damage(10, 0)) - H.UpdateDamageIcon() - else - visible_message("\red [user] headbutts the airlock. Good thing they're wearing a helmet.") - return - - if(src.p_open) - wires.Interact(user) - else - ..(user) - return - -/obj/machinery/door/airlock/CanUseTopic(var/mob/user) - if(!issilicon(user)) - return STATUS_CLOSE - - if(operating < 0) //emagged - to_chat(user, "Unable to interface: Internal error.") - return STATUS_CLOSE - if(!src.canAIControl()) - if(src.canAIHack(user)) - src.hack(user) - else - if(src.isAllPowerLoss()) //don't really like how this gets checked a second time, but not sure how else to do it. - to_chat(user, "Unable to interface: Connection timed out.") - else - to_chat(user, "Unable to interface: Connection refused.") - return STATUS_CLOSE - - return ..() - -/obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0) - if(..()) - return 1 - - var/activate = text2num(href_list["activate"]) - switch(href_list["command"]) - if("idscan") - if(src.isWireCut(AIRLOCK_WIRE_IDSCAN)) - to_chat(usr, "The IdScan wire has been cut - IdScan feature permanently disabled.") - else if(activate && src.aiDisabledIdScanner) - src.aiDisabledIdScanner = 0 - to_chat(usr, "IdScan feature has been enabled.") - else if(!activate && !src.aiDisabledIdScanner) - src.aiDisabledIdScanner = 1 - to_chat(usr, "IdScan feature has been disabled.") - if("main_power") - if(!main_power_lost_until) - src.loseMainPower() - if("backup_power") - if(!backup_power_lost_until) - src.loseBackupPower() - if("bolts") - if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) - to_chat(usr, "The door bolt control wire has been cut - Door bolts permanently dropped.") - else if(activate && src.lock()) - to_chat(usr, "The door bolts have been dropped.") - else if(!activate && src.unlock()) - to_chat(usr, "The door bolts have been raised.") - if("electrify_temporary") - if(activate && src.isWireCut(AIRLOCK_WIRE_ELECTRIFY)) - to_chat(usr, text("The electrification wire is cut - Door permanently electrified.")) - else if(!activate && electrified_until != 0) - to_chat(usr, "The door is now un-electrified.") - electrify(0) - else if(activate) //electrify door for 30 seconds - shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") - to_chat(usr, "The door is now electrified for thirty seconds.") - electrify(30) - if("electrify_permanently") - if(src.isWireCut(AIRLOCK_WIRE_ELECTRIFY)) - to_chat(usr, text("The electrification wire is cut - Cannot electrify the door.")) - else if(!activate && electrified_until != 0) - to_chat(usr, "The door is now un-electrified.") - electrify(0) - else if(activate) - shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") - to_chat(usr, "The door is now electrified.") - electrify(-1) - if("open") - if(src.welded) - to_chat(usr, text("The airlock has been welded shut!")) - else if(src.locked) - to_chat(usr, text("The door bolts are down!")) - else if(activate && density) - open() - else if(!activate && !density) - close() - if("safeties") - // Safeties! We don't need no stinking safeties! - if(src.isWireCut(AIRLOCK_WIRE_SAFETY)) - to_chat(usr, text("The safety wire is cut - Cannot secure the door.")) - else if(activate && src.safe) - safe = 0 - else if(!activate && !src.safe) - safe = 1 - if("timing") - // Door speed control - if(src.isWireCut(AIRLOCK_WIRE_SPEED)) - to_chat(usr, text("The timing wire is cut - Cannot alter timing.")) - else if(activate && src.normalspeed) - normalspeed = 0 - else if(!activate && !src.normalspeed) - normalspeed = 1 - if("lights") - // Bolt lights - if(src.isWireCut(AIRLOCK_WIRE_LIGHT)) - to_chat(usr, "The bolt lights wire has been cut - The door bolt lights are permanently disabled.") - else if(!activate && src.lights) - lights = 0 - to_chat(usr, "The door bolt lights have been disabled.") - else if(activate && !src.lights) - lights = 1 - to_chat(usr, "The door bolt lights have been enabled.") - if("emergency") - // Emergency access - if(src.emergency) - emergency = 0 - to_chat(usr, "Emergency access has been disabled.") - else - emergency = 1 - to_chat(usr, "Emergency access has been enabled.") - - update_icon() - return 1 - -/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob, params) -// to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user)) - if(!istype(usr, /mob/living/silicon)) - if(src.isElectrified()) - if(src.shock(user, 75)) - return - if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll)) - return - - src.add_fingerprint(user) - if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density)) - var/obj/item/weapon/weldingtool/W = C - if(W.remove_fuel(0,user)) - if(frozen) - frozen = 0 - if(!src.welded) - src.welded = 1 - else - src.welded = null - src.update_icon() - return - else - return - else if(istype(C, /obj/item/weapon/screwdriver)) - src.p_open = !( src.p_open ) - src.update_icon() - else if(istype(C, /obj/item/weapon/wirecutters)) - return src.attack_hand(user) - else if(istype(C, /obj/item/device/multitool)) - return src.attack_hand(user) - else if(istype(C, /obj/item/device/assembly/signaler)) - return src.attack_hand(user) - else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE - var/obj/item/weapon/pai_cable/cable = C - cable.plugin(src, user) - else if(istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/twohanded/fireaxe) ) - var/beingcrowbarred = null - if(istype(C, /obj/item/weapon/crowbar) ) - beingcrowbarred = 1 //derp, Agouri - else - beingcrowbarred = 0 - if( beingcrowbarred && src.p_open && (operating == -1 || (density && welded && operating != 1 && !src.arePowerSystemsOn() && !src.locked)) ) - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.") - if(do_after(user,40, target = src)) - to_chat(user, "\blue You removed the airlock electronics!") - - var/obj/structure/door_assembly/da = new assembly_type(src.loc) - da.anchored = 1 - if(mineral) - da.glass = mineral - //else if(glass) - else if(glass && !da.glass) - da.glass = 1 - da.state = 1 - da.created_name = src.name - da.update_state() - - var/obj/item/weapon/airlock_electronics/ae - if(!electronics) - ae = new/obj/item/weapon/airlock_electronics( src.loc ) - if(!src.req_access) - src.check_access() - if(src.req_access.len) - ae.conf_access = src.req_access - else if(src.req_one_access.len) - ae.conf_access = src.req_one_access - ae.one_access = 1 - else - ae = electronics - electronics = null - ae.loc = src.loc - if(operating == -1) - ae.icon_state = "door_electronics_smoked" - operating = 0 - - qdel(src) - return - else if(arePowerSystemsOn()) - to_chat(user, "\blue The airlock's motors resist your efforts to force it.") - else if(locked) - to_chat(user, "\blue The airlock's bolts prevent it from being forced.") - else if( !welded && !operating ) - if(density) - if(beingcrowbarred == 0) //being fireaxe'd - var/obj/item/weapon/twohanded/fireaxe/F = C - if(F.wielded) - spawn(0) open(1) - else - to_chat(user, "\red You need to be wielding \the [C] to do that.") - else - spawn(0) open(1) - else - if(beingcrowbarred == 0) - var/obj/item/weapon/twohanded/fireaxe/F = C - if(F.wielded) - spawn(0) close(1) - else - to_chat(user, "\red You need to be wielding \the [C] to do that.") - else - spawn(0) close(1) - else - ..() - return - -/obj/machinery/door/airlock/plasma/attackby(C as obj, mob/user as mob, params) - if(is_hot(C) > 300) - message_admins("Plasma airlock ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)") - log_game("Plasma wall ignited by [key_name(user)] in ([x],[y],[z])") - ignite(is_hot(C)) - ..() - -/obj/machinery/door/airlock/open(var/forced=0) - if( operating || welded || locked ) - return 0 - if(!forced) - if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) ) - return 0 - use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people - if(forced) - playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) - else - playsound(src.loc, doorOpen, 30, 1) - if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density) - src.closeOther.close() - return ..() - -/obj/machinery/door/airlock/close(var/forced=0, var/override = 0) - if((operating & !override) || welded || locked) - return - if(!forced) - //despite the name, this wire is for general door control. - //Bolts are already covered by the check for locked, above - if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) ) - return - if(safe) - for(var/turf/turf in locs) - if(locate(/mob/living) in turf) - // playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete - spawn (60) - autoclose() - return - - use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people - if(forced) - playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) - else - playsound(src.loc, doorClose, 30, 1) - var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src)) - if(killthis) - killthis.ex_act(2)//Smashin windows - - if(density) - return 1 - operating = 1 - do_animate("closing") - src.layer = 3.1 - if(!override) sleep(5) - src.density = 1 - if(!safe) - crush() - if(!override) sleep(5) - update_icon() - if(visible && !glass) - set_opacity(1) - operating = 0 - air_update_turf(1) - update_freelook_sight() - if(safe) - if(locate(/mob/living) in get_turf(src)) - open() - - return - -/obj/machinery/door/airlock/proc/lock(var/forced=0) - if(locked) - return 0 - - if(operating && !forced) return 0 - - src.locked = 1 - playsound(src, boltDown, 30, 0, 3) - update_icon() - return 1 - -/obj/machinery/door/airlock/proc/unlock(var/forced=0) - if(!src.locked) - return - - if(!forced) - if(operating || !src.arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) return - - src.locked = 0 - playsound(src,boltUp, 30, 0, 3) - update_icon() - return 1 - -/obj/machinery/door/airlock/New() - ..() - wires = new(src) - if(src.closeOtherId != null) - spawn (5) - for(var/obj/machinery/door/airlock/A in airlocks) - if(A.closeOtherId == src.closeOtherId && A != src) - src.closeOther = A - break - if(frozen) - welded = 1 - update_icon() - -/obj/machinery/door/airlock/hatch/gamma/attackby(C as obj, mob/user as mob, params) -// to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user)) - if(!istype(usr, /mob/living/silicon)) - if(src.isElectrified()) - if(src.shock(user, 75)) - return - if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll)) - return - - if(istype(C, /obj/item/weapon/grenade/plastic/c4)) - to_chat(user, "The hatch is coated with a product that prevents the shaped charge from sticking!") - return - - if(istype(C, /obj/item/mecha_parts/mecha_equipment/rcd) || istype(C, /obj/item/weapon/rcd)) - to_chat(user, "The hatch is made of an advanced compound that cannot be deconstructed using an RCD.") - return - - src.add_fingerprint(user) - if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)) - var/obj/item/weapon/weldingtool/W = C - if(W.remove_fuel(0,user)) - if(frozen) - frozen = 0 - if(!src.welded) - src.welded = 1 - else - src.welded = null - src.update_icon() - return - else - return - - -/obj/machinery/door/airlock/highsecurity/red/attackby(C as obj, mob/user as mob, params) -// to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user)) - if(!istype(usr, /mob/living/silicon)) - if(src.isElectrified()) - if(src.shock(user, 75)) - return - if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll)) - return - - src.add_fingerprint(user) - if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)) - var/obj/item/weapon/weldingtool/W = C - if(W.remove_fuel(0,user)) - if(frozen) - frozen = 0 - if(!src.welded) - src.welded = 1 - else - src.welded = null - src.update_icon() - return - else - return - -/obj/machinery/door/airlock/CanAStarPass(var/obj/item/weapon/card/id/ID) -//Airlock is passable if it is open (!density), bot has access, and is not bolted shut) - return !density || (check_access(ID) && !locked && arePowerSystemsOn()) - -/obj/machinery/door/airlock/emp_act(var/severity) - if(prob(40/severity)) - var/duration = world.time + SecondsToTicks(30 / severity) - if(duration > electrified_until) - electrify(duration) - ..() - -/obj/machinery/door/airlock/power_change() //putting this is obj/machinery/door itself makes non-airlock doors turn invisible for some reason - ..() - if(stat & NOPOWER) - // If we lost power, disable electrification - // Keeping door lights on, runs on internal battery or something. - electrified_until = 0 - update_icon() - -/obj/machinery/door/airlock/proc/prison_open() - if(arePowerSystemsOn()) - src.unlock() - src.open() - src.lock() - -/obj/machinery/door/airlock/hostile_lockdown(mob/origin) - // Must be powered and have working AI wire. - if(canAIControl(src) && !stat) - locked = FALSE //For airlocks that were bolted open. - safe = FALSE //DOOR CRUSH - close() - lock() //Bolt it! - electrified_until = -1 //Shock it! - if(origin) - shockedby += "\[[time_stamp()]\][origin](ckey:[origin.ckey])" - - -/obj/machinery/door/airlock/disable_lockdown() - // Must be powered and have working AI wire. - if(canAIControl(src) && !stat) - unlock() - electrified_until = 0 - open() - safe = TRUE - -////////////////////////////////// -/* - Cult Airlocks -*/ - -/obj/machinery/door/airlock/cult - name = "cult airlock" - icon = 'icons/obj/doors/doorcult.dmi' - assembly_type = /obj/structure/door_assembly/door_assembly_cult - hackProof = 1 - aiControlDisabled = 1 - var/friendly = FALSE - -/obj/machinery/door/airlock/cult/New() - ..() - -/obj/machinery/door/airlock/cult/canAIControl(mob/user) - return (iscultist(user)) - -/obj/machinery/door/airlock/cult/allowed(mob/M) - if(!density) - return 1 - if(friendly || \ - iscultist(M) || \ - istype(M, /mob/living/simple_animal/shade) || \ - istype(M, /mob/living/simple_animal/construct)) - return 1 - else - var/atom/throwtarget - throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(M, src))) - M << pick(sound('sound/hallucinations/turn_around1.ogg',0,1,50), sound('sound/hallucinations/turn_around2.ogg',0,1,50)) - M.Weaken(2) - spawn(0) - M.throw_at(throwtarget, 5, 1,src) - return 0 - -/obj/machinery/door/airlock/cult/narsie_act() - return - -/obj/machinery/door/airlock/cult/friendly - friendly = TRUE +/* + New methods: + pulse - sends a pulse into a wire for hacking purposes + cut - cuts a wire and makes any necessary state changes + mend - mends a wire and makes any necessary state changes + canAIControl - 1 if the AI can control the airlock, 0 if not (then check canAIHack to see if it can hack in) + canAIHack - 1 if the AI can hack into the airlock to recover control, 0 if not. Also returns 0 if the AI does not *need* to hack it. + arePowerSystemsOn - 1 if the main or backup power are functioning, 0 if not. Does not check whether the power grid is charged or an APC has equipment on or anything like that. (Check (stat & NOPOWER) for that) + requiresIDs - 1 if the airlock is requiring IDs, 0 if not + isAllPowerCut - 1 if the main and backup power both have cut wires. + regainMainPower - handles the effect of main power coming back on. + loseMainPower - handles the effect of main power going offline. Usually (if one isn't already running) spawn a thread to count down how long it will be offline - counting down won't happen if main power was completely cut along with backup power, though, the thread will just sleep. + loseBackupPower - handles the effect of backup power going offline. + regainBackupPower - handles the effect of main power coming back on. + shock - has a chance of electrocuting its target. +*/ + + +// Wires for the airlock are located in the datum folder, inside the wires datum folder. + + +/obj/machinery/door/airlock + name = "airlock" + icon = 'icons/obj/doors/Doorint.dmi' + icon_state = "door_closed" + power_channel = ENVIRON + + var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in. + var/hackProof = 0 // if 1, this door can't be hacked by the AI + var/electrified_until = 0 // World time when the door is no longer electrified. -1 if it is permanently electrified until someone fixes it. + var/main_power_lost_until = 0 //World time when main power is restored. + var/backup_power_lost_until = -1 //World time when backup power is restored. + var/electrified_timer = null + var/main_power_timer = null + var/backup_power_timer = null + var/spawnPowerRestoreRunning = 0 + var/welded = null + var/locked = 0 + var/lights = 1 // bolt lights show by default + var/datum/wires/airlock/wires = null + var/aiDisabledIdScanner = 0 + var/aiHacking = 0 + var/obj/machinery/door/airlock/closeOther = null + var/closeOtherId = null + var/lockdownbyai = 0 + var/assembly_type = /obj/structure/door_assembly + var/mineral = null + var/justzap = 0 + var/safe = 1 + normalspeed = 1 + var/obj/item/weapon/airlock_electronics/electronics = null + var/hasShocked = 0 //Prevents multiple shocks from happening + var/frozen = 0 //special condition for airlocks that are frozen shut, this will look weird on not normal airlocks because of a lack of special overlays. + autoclose = 1 + explosion_block = 1 + var/doorOpen = 'sound/machines/airlock.ogg' + var/doorClose = 'sound/machines/airlock.ogg' + var/doorDeni = 'sound/machines/DeniedBeep.ogg' // i'm thinkin' Deni's + var/boltUp = 'sound/machines/BoltsUp.ogg' + var/boltDown = 'sound/machines/BoltsDown.ogg' + var/is_special = 0 + +/obj/machinery/door/airlock/command + name = "Airlock" + icon = 'icons/obj/doors/Doorcom.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_com + +/obj/machinery/door/airlock/security + name = "Airlock" + icon = 'icons/obj/doors/Doorsec.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_sec + +/obj/machinery/door/airlock/engineering + name = "Airlock" + icon = 'icons/obj/doors/Dooreng.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_eng + +/obj/machinery/door/airlock/medical + name = "Airlock" + icon = 'icons/obj/doors/Doormed.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_med + +/obj/machinery/door/airlock/maintenance + name = "Maintenance Access" + icon = 'icons/obj/doors/Doormaint.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_mai + +/obj/machinery/door/airlock/external + name = "External Airlock" + icon = 'icons/obj/doors/Doorext.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_ext + +/obj/machinery/door/airlock/glass + name = "Glass Airlock" + icon = 'icons/obj/doors/Doorglass.dmi' + opacity = 0 + glass = 1 + doorOpen = 'sound/machines/windowdoor.ogg' + doorClose = 'sound/machines/windowdoor.ogg' + +/obj/machinery/door/airlock/centcom + name = "Airlock" + icon = 'icons/obj/doors/Doorele.dmi' + opacity = 0 + +/obj/machinery/door/airlock/vault + name = "Vault" + icon = 'icons/obj/doors/vault.dmi' + opacity = 1 + assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites. + explosion_block = 2 + +/obj/machinery/door/airlock/freezer + name = "Freezer Airlock" + icon = 'icons/obj/doors/Doorfreezer.dmi' + opacity = 1 + assembly_type = /obj/structure/door_assembly/door_assembly_fre + +/obj/machinery/door/airlock/hatch + name = "Airtight Hatch" + icon = 'icons/obj/doors/Doorhatchele.dmi' + opacity = 1 + assembly_type = /obj/structure/door_assembly/door_assembly_hatch + +/obj/machinery/door/airlock/hatch/gamma + name = "Gamma Level Hatch" + hackProof = 1 + aiControlDisabled = 1 + unacidable = 1 + is_special = 1 + +/obj/machinery/door/airlock/maintenance_hatch + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Doorhatchmaint2.dmi' + opacity = 1 + assembly_type = /obj/structure/door_assembly/door_assembly_mhatch + +/obj/machinery/door/airlock/glass_command + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Doorcomglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_com + glass = 1 + +/obj/machinery/door/airlock/glass_engineering + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Doorengglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_eng + glass = 1 + +/obj/machinery/door/airlock/glass_security + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Doorsecglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_sec + glass = 1 + +/obj/machinery/door/airlock/glass_medical + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Doormedglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_med + glass = 1 + +/obj/machinery/door/airlock/mining + name = "Mining Airlock" + icon = 'icons/obj/doors/Doormining.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_min + +/obj/machinery/door/airlock/atmos + name = "Atmospherics Airlock" + icon = 'icons/obj/doors/Dooratmo.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_atmo + +/obj/machinery/door/airlock/research + name = "Airlock" + icon = 'icons/obj/doors/Doorresearch.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_research + +/obj/machinery/door/airlock/glass_research + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Doorresearchglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_research + glass = 1 + heat_proof = 1 + +/obj/machinery/door/airlock/glass_mining + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Doorminingglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_min + glass = 1 + +/obj/machinery/door/airlock/glass_atmos + name = "Maintenance Hatch" + icon = 'icons/obj/doors/Dooratmoglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_atmo + glass = 1 + +/obj/machinery/door/airlock/gold + name = "Gold Airlock" + icon = 'icons/obj/doors/Doorgold.dmi' + mineral = "gold" + +/obj/machinery/door/airlock/silver + name = "Silver Airlock" + icon = 'icons/obj/doors/Doorsilver.dmi' + mineral = "silver" + +/obj/machinery/door/airlock/diamond + name = "Diamond Airlock" + icon = 'icons/obj/doors/Doordiamond.dmi' + mineral = "diamond" + +/obj/machinery/door/airlock/uranium + name = "Uranium Airlock" + desc = "And they said I was crazy." + icon = 'icons/obj/doors/Dooruranium.dmi' + mineral = "uranium" + var/event_step = 20 + +/obj/machinery/door/airlock/uranium/New() + ..() + addtimer(src, "radiate", event_step) + +/obj/machinery/door/airlock/uranium/proc/radiate() + if(prob(50)) + for(var/mob/living/L in range (3,src)) + L.apply_effect(15,IRRADIATE,0) + addtimer(src, "radiate", event_step) + +/obj/machinery/door/airlock/plasma + name = "plasma airlock" + desc = "No way this can end badly." + icon = 'icons/obj/doors/Doorplasma.dmi' + mineral = "plasma" + +/obj/machinery/door/airlock/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(exposed_temperature > 300) + PlasmaBurn(exposed_temperature) + +/obj/machinery/door/airlock/plasma/proc/ignite(exposed_temperature) + if(exposed_temperature > 300) + PlasmaBurn(exposed_temperature) + +/obj/machinery/door/airlock/plasma/proc/PlasmaBurn(temperature) + atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500) + new/obj/structure/door_assembly( src.loc ) + qdel(src) + +/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~ + return 0 + +/obj/machinery/door/airlock/bananium + name = "Bananium Airlock" + icon = 'icons/obj/doors/Doorbananium.dmi' + mineral = "bananium" + doorOpen = 'sound/items/bikehorn.ogg' + doorClose = 'sound/items/bikehorn.ogg' + +/obj/machinery/door/airlock/tranquillite + name = "Tranquillite Airlock" + icon = 'icons/obj/doors/Doorfreezer.dmi' + mineral = "tranquillite" + doorOpen = null + doorClose = null + +/obj/machinery/door/airlock/sandstone + name = "Sandstone Airlock" + icon = 'icons/obj/doors/Doorsand.dmi' + mineral = "sandstone" + +/obj/machinery/door/airlock/science + name = "Airlock" + icon = 'icons/obj/doors/Doorsci.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_science + +/obj/machinery/door/airlock/glass_science + name = "Glass Airlocks" + icon = 'icons/obj/doors/Doorsciglass.dmi' + opacity = 0 + assembly_type = /obj/structure/door_assembly/door_assembly_science + glass = 1 + +/obj/machinery/door/airlock/highsecurity + name = "High Tech Security Airlock" + icon = 'icons/obj/doors/hightechsecurity.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity + explosion_block = 2 + +/obj/machinery/door/airlock/highsecurity/red + name = "Secure Armory Airlock" + hackProof = 1 + aiControlDisabled = 1 + +/obj/machinery/door/airlock/shuttle + name = "shuttle airlock" + icon = 'icons/obj/doors/doorshuttle.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_shuttle + +/obj/machinery/door/airlock/alien + name = "Alien Airlock" + desc = "A mysterious alien airlock with a complicated opening mechanism." + hackProof = 1 + icon = 'icons/obj/doors/Doorplasma.dmi' + is_special = 1 + +/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob) + if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user)) + ..(user) + else + to_chat(user, "You do not know how to operate this airlock's mechanism.") + return + +/obj/machinery/door/airlock/alien/attackby(C as obj, mob/user as mob, params) + if(isalien(user) || isrobot(user) || isAI(user)) + ..(C, user) + else + to_chat(user, "You do not know how to operate this airlock's mechanism.") + return + + +/* +About the new airlock wires panel: +* An airlock wire dialog can be accessed by the normal way or by using wirecutters or a multitool on the door while the wire-panel is open. This would show the following wires, which you can either wirecut/mend or send a multitool pulse through. There are 9 wires. +* one wire from the ID scanner. Sending a pulse through this flashes the red light on the door (if the door has power). If you cut this wire, the door will stop recognizing valid IDs. (If the door has 0000 access, it still opens and closes, though) +* two wires for power. Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter). Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be \red open, but bolts-raising will not work. Cutting these wires may electrocute the user. +* one wire for door bolts. Sending a pulse through this drops door bolts (whether the door is powered or not) or raises them (if it is). Cutting this wire also drops the door bolts, and mending it does not raise them. If the wire is cut, trying to raise the door bolts will not work. +* two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter). Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user. +* one wire for opening the door. Sending a pulse through this while the door has power makes it open the door if no access is required. +* one wire for AI control. Sending a pulse through this blocks AI control for a second or so (which is enough to see the AI control light on the panel dialog go off and back on again). Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all. +* one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds. Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted. (Currently it is also STAYING electrified until someone mends the wire) +* one wire for controling door safetys. When active, door does not close on someone. When cut, door will ruin someone's shit. When pulsed, door will immedately ruin someone's shit. +* one wire for controlling door speed. When active, dor closes at normal rate. When cut, door does not close manually. When pulsed, door attempts to close every tick. +*/ +// You can find code for the airlock wires in the wire datum folder. + + +/obj/machinery/door/airlock/Destroy() + qdel(wires) + wires = null + if(main_power_timer) + deltimer(main_power_timer) + main_power_timer = null + if(backup_power_timer) + deltimer(backup_power_timer) + backup_power_timer = null + if(electrified_timer) + deltimer(electrified_timer) + electrified_timer = null + return ..() + +/obj/machinery/door/airlock/bumpopen(mob/living/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite + if(!issilicon(usr)) + if(src.isElectrified()) + if(!src.justzap) + if(src.shock(user, 100)) + src.justzap = 1 + spawn (10) + src.justzap = 0 + return + else /*if(src.justzap)*/ + return + else if(user.hallucination > 50 && prob(10) && src.operating == 0) + to_chat(user, "You feel a powerful shock course through your body!") + user.adjustStaminaLoss(50) + user.AdjustStunned(5) + return + ..(user) + +/obj/machinery/door/airlock/bumpopen(mob/living/simple_animal/user as mob) + ..(user) + + +/obj/machinery/door/airlock/autoclose() + autoclose_timer = 0 + if(!qdeleted(src) && !density && !operating && !locked && !welded && autoclose) + close() + return + +/obj/machinery/door/airlock/proc/isElectrified() + if(src.electrified_until != 0) + return 1 + return 0 + +/obj/machinery/door/airlock/proc/isWireCut(var/wireIndex) + // You can find the wires in the datum folder. + return wires.IsIndexCut(wireIndex) + +/obj/machinery/door/airlock/proc/canAIControl() + return ((src.aiControlDisabled!=1) && (!src.isAllPowerLoss())); + +/obj/machinery/door/airlock/proc/canAIHack() + return ((src.aiControlDisabled==1) && (!hackProof) && (!src.isAllPowerLoss())); + +/obj/machinery/door/airlock/proc/arePowerSystemsOn() + if(stat & (NOPOWER|BROKEN)) + return 0 + return (src.main_power_lost_until==0 || src.backup_power_lost_until==0) + +/obj/machinery/door/airlock/requiresID() + return !(src.isWireCut(AIRLOCK_WIRE_IDSCAN) || aiDisabledIdScanner) + +/obj/machinery/door/airlock/proc/isAllPowerLoss() + if(stat & (NOPOWER|BROKEN)) + return 1 + if(mainPowerCablesCut() && backupPowerCablesCut()) + return 1 + return 0 + +/obj/machinery/door/airlock/proc/mainPowerCablesCut() + return src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1) || src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2) + +/obj/machinery/door/airlock/proc/backupPowerCablesCut() + return src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1) || src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2) + +/obj/machinery/door/airlock/proc/loseMainPower() + main_power_lost_until = mainPowerCablesCut() ? -1 : world.time + SecondsToTicks(60) + if(main_power_lost_until > 0) + main_power_timer = addtimer(src, "regainMainPower", SecondsToTicks(60), 1) + + // If backup power is permanently disabled then activate in 10 seconds if possible, otherwise it's already enabled or a timer is already running + if(backup_power_lost_until == -1 && !backupPowerCablesCut()) + backup_power_lost_until = world.time + SecondsToTicks(10) + backup_power_timer = addtimer(src, "regainBackupPower", SecondsToTicks(10), 1) + + // Disable electricity if required + if(electrified_until && isAllPowerLoss()) + electrify(0) + +/obj/machinery/door/airlock/proc/loseBackupPower() + backup_power_lost_until = backupPowerCablesCut() ? -1 : world.time + SecondsToTicks(60) + if(backup_power_lost_until > 0) + backup_power_timer = addtimer(src, "regainBackupPower", SecondsToTicks(60), 1) + + // Disable electricity if required + if(electrified_until && isAllPowerLoss()) + electrify(0) + +/obj/machinery/door/airlock/proc/regainMainPower() + main_power_timer = null + + if(!mainPowerCablesCut()) + main_power_lost_until = 0 + // If backup power is currently active then disable, otherwise let it count down and disable itself later + if(!backup_power_lost_until) + backup_power_lost_until = -1 + update_icon() + +/obj/machinery/door/airlock/proc/regainBackupPower() + backup_power_timer = null + + if(!backupPowerCablesCut()) + // Restore backup power only if main power is offline, otherwise permanently disable + backup_power_lost_until = main_power_lost_until == 0 ? -1 : 0 + update_icon() + +/obj/machinery/door/airlock/proc/electrify(var/duration, var/feedback = 0) + if(electrified_timer) + deltimer(electrified_timer) + electrified_timer = null + + var/message = "" + if(isWireCut(AIRLOCK_WIRE_ELECTRIFY) && arePowerSystemsOn()) + message = text("The electrification wire is cut - Door permanently electrified.") + electrified_until = -1 + else if(duration && !arePowerSystemsOn()) + message = text("The door is unpowered - Cannot electrify the door.") + electrified_until = 0 + else if(!duration && electrified_until != 0) + message = "The door is now un-electrified." + electrified_until = 0 + else if(duration) //electrify door for the given duration seconds + if(usr) + shockedby += text("\[[time_stamp()]\] - [usr](ckey:[usr.ckey])") + usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + else + shockedby += text("\[[time_stamp()]\] - EMP)") + message = "The door is now electrified [duration == -1 ? "permanently" : "for [duration] second\s"]." + electrified_until = duration == -1 ? -1 : world.time + SecondsToTicks(duration) + if(duration != -1) + electrified_timer = addtimer(src, "electrify", SecondsToTicks(duration), 1, 0) + + if(feedback && message) + to_chat(usr, message) + +// shock user with probability prb (if all connections & power are working) +// returns 1 if shocked, 0 otherwise +// The preceding comment was borrowed from the grille's shock script +/obj/machinery/door/airlock/shock(mob/user, prb) + if(!arePowerSystemsOn()) + return 0 + if(hasShocked) + return 0 //Already shocked someone recently? + if(..()) + hasShocked = 1 + sleep(10) + hasShocked = 0 + return 1 + else + return 0 + +/obj/machinery/door/airlock/update_icon() + if(overlays) overlays.Cut() + overlays = list() + if(emergency && arePowerSystemsOn()) + overlays += image('icons/obj/doors/doorint.dmi', "elights") + if(density) + if(locked && lights) + icon_state = "door_locked" + else + icon_state = "door_closed" + if(p_open || welded || frozen) + if(p_open) + overlays += image(icon, "panel_open") + if(welded) + overlays += image(icon, "welded") + if(frozen) + overlays += image(icon, "frozen") + + else + icon_state = "door_open" + + return + + +/obj/machinery/door/airlock/do_animate(animation) + switch(animation) + if("opening") + if(overlays) overlays.Cut() + if(p_open) + spawn(2) // The only work around that works. Downside is that the door will be gone for a millisecond. + flick("o_door_opening", src) //can not use flick due to BYOND bug updating overlays right before flicking + update_icon() + else + flick("door_opening", src)//[stat ? "_stat":] + update_icon() + if("closing") + if(overlays) overlays.Cut() + if(p_open) + spawn(2) + flick("o_door_closing", src) + update_icon() + else + flick("door_closing", src) + update_icon() + if("spark") + if(density) + flick("door_spark", src) + if("deny") + if(density && src.arePowerSystemsOn()) + playsound(src, doorDeni, 50, 0, 3) + flick("door_deny", src) + return + +/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) + ui.open() + ui.set_auto_update(1) + +/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) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/door/airlock/ui_data(mob/user, datum/topic_state/state = default_state) + var/data[0] + + data["main_power_loss"] = round(main_power_lost_until > 0 ? max(main_power_lost_until - world.time, 0) / 10 : main_power_lost_until, 1) + data["backup_power_loss"] = round(backup_power_lost_until > 0 ? max(backup_power_lost_until - world.time, 0) / 10 : backup_power_lost_until, 1) + data["electrified"] = round(electrified_until > 0 ? max(electrified_until - world.time, 0) / 10 : electrified_until, 1) + data["open"] = !density + + var/commands[0] + commands[++commands.len] = list("name" = "IdScan", "command"= "idscan", "active" = !aiDisabledIdScanner,"enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) + commands[++commands.len] = list("name" = "Bolts", "command"= "bolts", "active" = !locked, "enabled" = "Raised", "disabled" = "Dropped", "danger" = 0, "act" = 0) + commands[++commands.len] = list("name" = "Bolt Lights", "command"= "lights", "active" = lights, "enabled" = "Enabled", "disabled" = "Disable", "danger" = 0, "act" = 1) + commands[++commands.len] = list("name" = "Safeties", "command"= "safeties", "active" = safe, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) + commands[++commands.len] = list("name" = "Timing", "command"= "timing", "active" = normalspeed, "enabled" = "Nominal", "disabled" = "Overridden", "danger" = 1, "act" = 0) + commands[++commands.len] = list("name" = "Door State", "command"= "open", "active" = density, "enabled" = "Closed", "disabled" = "Opened", "danger" = 0, "act" = 0) + commands[++commands.len] = list("name" = "Emergency Access","command"= "emergency", "active" = !emergency, "enabled" = "Disabled", "disabled" = "Enabled", "danger" = 0, "act" = 0) + + data["commands"] = commands + return data + +/obj/machinery/door/airlock/proc/hack(mob/user as mob) + if(src.aiHacking==0) + src.aiHacking=1 + spawn(20) + //TODO: Make this take a minute + to_chat(user, "Airlock AI control has been blocked. Beginning fault-detection.") + sleep(50) + if(src.canAIControl()) + to_chat(user, "Alert cancelled. Airlock control has been restored without our assistance.") + src.aiHacking=0 + return + else if(!src.canAIHack(user)) + to_chat(user, "We've lost our connection! Unable to hack airlock.") + src.aiHacking=0 + return + to_chat(user, "Fault confirmed: airlock control wire disabled or cut.") + sleep(20) + to_chat(user, "Attempting to hack into airlock. This may take some time.") + sleep(200) + if(src.canAIControl()) + to_chat(user, "Alert cancelled. Airlock control has been restored without our assistance.") + src.aiHacking=0 + return + else if(!src.canAIHack(user)) + to_chat(user, "We've lost our connection! Unable to hack airlock.") + src.aiHacking=0 + return + to_chat(user, "Upload access confirmed. Loading control program into airlock software.") + sleep(170) + if(src.canAIControl()) + to_chat(user, "Alert cancelled. Airlock control has been restored without our assistance.") + src.aiHacking=0 + return + else if(!src.canAIHack(user)) + to_chat(user, "We've lost our connection! Unable to hack airlock.") + src.aiHacking=0 + return + to_chat(user, "Transfer complete. Forcing airlock to execute program.") + sleep(50) + //disable blocked control + src.aiControlDisabled = 2 + to_chat(user, "Receiving control information from airlock.") + sleep(10) + //bring up airlock dialog + src.aiHacking = 0 + if(user) + src.attack_ai(user) + +/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(src.isElectrified()) + if(istype(mover, /obj/item)) + var/obj/item/i = mover + if(i.materials[MAT_METAL]) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(5, 1, src) + s.start() + return ..() + +/obj/machinery/door/airlock/attack_hand(mob/user as mob) + if(!istype(user, /mob/living/silicon)) + if(src.isElectrified()) + if(src.shock(user, 100)) + return + + if(ishuman(user) && prob(40) && src.density) + var/mob/living/carbon/human/H = user + if(H.getBrainLoss() >= 60) + playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) + if(!istype(H.head, /obj/item/clothing/head/helmet)) + visible_message("\red [user] headbutts the airlock.") + var/obj/item/organ/external/affecting = H.get_organ("head") + H.Stun(5) + H.Weaken(5) + if(affecting.take_damage(10, 0)) + H.UpdateDamageIcon() + else + visible_message("\red [user] headbutts the airlock. Good thing they're wearing a helmet.") + return + + if(src.p_open) + wires.Interact(user) + else + ..(user) + return + +/obj/machinery/door/airlock/CanUseTopic(var/mob/user) + if(!issilicon(user)) + return STATUS_CLOSE + + if(operating < 0) //emagged + to_chat(user, "Unable to interface: Internal error.") + return STATUS_CLOSE + if(!src.canAIControl()) + if(src.canAIHack(user)) + src.hack(user) + else + if(src.isAllPowerLoss()) //don't really like how this gets checked a second time, but not sure how else to do it. + to_chat(user, "Unable to interface: Connection timed out.") + else + to_chat(user, "Unable to interface: Connection refused.") + return STATUS_CLOSE + + return ..() + +/obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0) + if(..()) + return 1 + + var/activate = text2num(href_list["activate"]) + switch(href_list["command"]) + if("idscan") + if(src.isWireCut(AIRLOCK_WIRE_IDSCAN)) + to_chat(usr, "The IdScan wire has been cut - IdScan feature permanently disabled.") + else if(activate && src.aiDisabledIdScanner) + src.aiDisabledIdScanner = 0 + to_chat(usr, "IdScan feature has been enabled.") + else if(!activate && !src.aiDisabledIdScanner) + src.aiDisabledIdScanner = 1 + to_chat(usr, "IdScan feature has been disabled.") + if("main_power") + if(!main_power_lost_until) + src.loseMainPower() + if("backup_power") + if(!backup_power_lost_until) + src.loseBackupPower() + if("bolts") + if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) + to_chat(usr, "The door bolt control wire has been cut - Door bolts permanently dropped.") + else if(activate && src.lock()) + to_chat(usr, "The door bolts have been dropped.") + else if(!activate && src.unlock()) + to_chat(usr, "The door bolts have been raised.") + if("electrify_temporary") + if(activate && src.isWireCut(AIRLOCK_WIRE_ELECTRIFY)) + to_chat(usr, text("The electrification wire is cut - Door permanently electrified.")) + else if(!activate && electrified_until != 0) + to_chat(usr, "The door is now un-electrified.") + electrify(0) + else if(activate) //electrify door for 30 seconds + shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") + usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + to_chat(usr, "The door is now electrified for thirty seconds.") + electrify(30) + if("electrify_permanently") + if(src.isWireCut(AIRLOCK_WIRE_ELECTRIFY)) + to_chat(usr, text("The electrification wire is cut - Cannot electrify the door.")) + else if(!activate && electrified_until != 0) + to_chat(usr, "The door is now un-electrified.") + electrify(0) + else if(activate) + shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") + usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + to_chat(usr, "The door is now electrified.") + electrify(-1) + if("open") + if(src.welded) + to_chat(usr, text("The airlock has been welded shut!")) + else if(src.locked) + to_chat(usr, text("The door bolts are down!")) + else if(activate && density) + open() + else if(!activate && !density) + close() + if("safeties") + // Safeties! We don't need no stinking safeties! + if(src.isWireCut(AIRLOCK_WIRE_SAFETY)) + to_chat(usr, text("The safety wire is cut - Cannot secure the door.")) + else if(activate && src.safe) + safe = 0 + else if(!activate && !src.safe) + safe = 1 + if("timing") + // Door speed control + if(src.isWireCut(AIRLOCK_WIRE_SPEED)) + to_chat(usr, text("The timing wire is cut - Cannot alter timing.")) + else if(activate && src.normalspeed) + normalspeed = 0 + else if(!activate && !src.normalspeed) + normalspeed = 1 + if("lights") + // Bolt lights + if(src.isWireCut(AIRLOCK_WIRE_LIGHT)) + to_chat(usr, "The bolt lights wire has been cut - The door bolt lights are permanently disabled.") + else if(!activate && src.lights) + lights = 0 + to_chat(usr, "The door bolt lights have been disabled.") + else if(activate && !src.lights) + lights = 1 + to_chat(usr, "The door bolt lights have been enabled.") + if("emergency") + // Emergency access + if(src.emergency) + emergency = 0 + to_chat(usr, "Emergency access has been disabled.") + else + emergency = 1 + to_chat(usr, "Emergency access has been enabled.") + + update_icon() + return 1 + +/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob, params) +// to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user)) + if(!istype(usr, /mob/living/silicon)) + if(src.isElectrified()) + if(src.shock(user, 75)) + return + if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll)) + return + + src.add_fingerprint(user) + if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density)) + var/obj/item/weapon/weldingtool/W = C + if(W.remove_fuel(0,user)) + if(frozen) + frozen = 0 + if(!src.welded) + src.welded = 1 + else + src.welded = null + src.update_icon() + return + else + return + else if(istype(C, /obj/item/weapon/screwdriver)) + src.p_open = !( src.p_open ) + src.update_icon() + else if(istype(C, /obj/item/weapon/wirecutters)) + return src.attack_hand(user) + else if(istype(C, /obj/item/device/multitool)) + return src.attack_hand(user) + else if(istype(C, /obj/item/device/assembly/signaler)) + return src.attack_hand(user) + else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE + var/obj/item/weapon/pai_cable/cable = C + cable.plugin(src, user) + else if(istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/twohanded/fireaxe) ) + var/beingcrowbarred = null + if(istype(C, /obj/item/weapon/crowbar) ) + beingcrowbarred = 1 //derp, Agouri + else + beingcrowbarred = 0 + if( beingcrowbarred && src.p_open && (operating == -1 || (density && welded && operating != 1 && !src.arePowerSystemsOn() && !src.locked)) ) + playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) + user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.") + if(do_after(user,40, target = src)) + to_chat(user, "\blue You removed the airlock electronics!") + + var/obj/structure/door_assembly/da = new assembly_type(src.loc) + da.anchored = 1 + if(mineral) + da.glass = mineral + //else if(glass) + else if(glass && !da.glass) + da.glass = 1 + da.state = 1 + da.created_name = src.name + da.update_state() + + var/obj/item/weapon/airlock_electronics/ae + if(!electronics) + ae = new/obj/item/weapon/airlock_electronics( src.loc ) + if(!src.req_access) + src.check_access() + if(src.req_access.len) + ae.conf_access = src.req_access + else if(src.req_one_access.len) + ae.conf_access = src.req_one_access + ae.one_access = 1 + else + ae = electronics + electronics = null + ae.loc = src.loc + if(operating == -1) + ae.icon_state = "door_electronics_smoked" + operating = 0 + + qdel(src) + return + else if(arePowerSystemsOn()) + to_chat(user, "\blue The airlock's motors resist your efforts to force it.") + else if(locked) + to_chat(user, "\blue The airlock's bolts prevent it from being forced.") + else if( !welded && !operating ) + if(density) + if(beingcrowbarred == 0) //being fireaxe'd + var/obj/item/weapon/twohanded/fireaxe/F = C + if(F.wielded) + spawn(0) open(1) + else + to_chat(user, "\red You need to be wielding \the [C] to do that.") + else + spawn(0) open(1) + else + if(beingcrowbarred == 0) + var/obj/item/weapon/twohanded/fireaxe/F = C + if(F.wielded) + spawn(0) close(1) + else + to_chat(user, "\red You need to be wielding \the [C] to do that.") + else + spawn(0) close(1) + else + ..() + return + +/obj/machinery/door/airlock/plasma/attackby(C as obj, mob/user as mob, params) + if(is_hot(C) > 300) + message_admins("Plasma airlock ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)") + log_game("Plasma wall ignited by [key_name(user)] in ([x],[y],[z])") + ignite(is_hot(C)) + ..() + +/obj/machinery/door/airlock/open(var/forced=0) + if( operating || welded || locked ) + return 0 + if(!forced) + if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) ) + return 0 + use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people + if(forced) + playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) + else + playsound(src.loc, doorOpen, 30, 1) + if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density) + src.closeOther.close() + return ..() + +/obj/machinery/door/airlock/close(var/forced=0, var/override = 0) + if((operating & !override) || welded || locked) + return + if(!forced) + //despite the name, this wire is for general door control. + //Bolts are already covered by the check for locked, above + if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) ) + return + if(safe) + for(var/turf/turf in locs) + if(locate(/mob/living) in turf) + // playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete + spawn (60) + autoclose() + return + + use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people + if(forced) + playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) + else + playsound(src.loc, doorClose, 30, 1) + var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src)) + if(killthis) + killthis.ex_act(2)//Smashin windows + + if(density) + return 1 + operating = 1 + do_animate("closing") + src.layer = 3.1 + if(!override) sleep(5) + src.density = 1 + if(!safe) + crush() + if(!override) sleep(5) + update_icon() + if(visible && !glass) + set_opacity(1) + operating = 0 + air_update_turf(1) + update_freelook_sight() + if(safe) + if(locate(/mob/living) in get_turf(src)) + open() + + return + +/obj/machinery/door/airlock/proc/lock(var/forced=0) + if(locked) + return 0 + + if(operating && !forced) return 0 + + src.locked = 1 + playsound(src, boltDown, 30, 0, 3) + update_icon() + return 1 + +/obj/machinery/door/airlock/proc/unlock(var/forced=0) + if(!src.locked) + return + + if(!forced) + if(operating || !src.arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) return + + src.locked = 0 + playsound(src,boltUp, 30, 0, 3) + update_icon() + return 1 + +/obj/machinery/door/airlock/New() + ..() + wires = new(src) + if(src.closeOtherId != null) + spawn (5) + for(var/obj/machinery/door/airlock/A in airlocks) + if(A.closeOtherId == src.closeOtherId && A != src) + src.closeOther = A + break + if(frozen) + welded = 1 + update_icon() + +/obj/machinery/door/airlock/hatch/gamma/attackby(C as obj, mob/user as mob, params) +// to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user)) + if(!istype(usr, /mob/living/silicon)) + if(src.isElectrified()) + if(src.shock(user, 75)) + return + if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll)) + return + + if(istype(C, /obj/item/weapon/grenade/plastic/c4)) + to_chat(user, "The hatch is coated with a product that prevents the shaped charge from sticking!") + return + + if(istype(C, /obj/item/mecha_parts/mecha_equipment/rcd) || istype(C, /obj/item/weapon/rcd)) + to_chat(user, "The hatch is made of an advanced compound that cannot be deconstructed using an RCD.") + return + + src.add_fingerprint(user) + if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)) + var/obj/item/weapon/weldingtool/W = C + if(W.remove_fuel(0,user)) + if(frozen) + frozen = 0 + if(!src.welded) + src.welded = 1 + else + src.welded = null + src.update_icon() + return + else + return + + +/obj/machinery/door/airlock/highsecurity/red/attackby(C as obj, mob/user as mob, params) +// to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user)) + if(!istype(usr, /mob/living/silicon)) + if(src.isElectrified()) + if(src.shock(user, 75)) + return + if(istype(C, /obj/item/device/detective_scanner) || istype(C, /obj/item/taperoll)) + return + + src.add_fingerprint(user) + if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)) + var/obj/item/weapon/weldingtool/W = C + if(W.remove_fuel(0,user)) + if(frozen) + frozen = 0 + if(!src.welded) + src.welded = 1 + else + src.welded = null + src.update_icon() + return + else + return + +/obj/machinery/door/airlock/CanAStarPass(var/obj/item/weapon/card/id/ID) +//Airlock is passable if it is open (!density), bot has access, and is not bolted shut) + return !density || (check_access(ID) && !locked && arePowerSystemsOn()) + +/obj/machinery/door/airlock/emp_act(var/severity) + if(prob(40/severity)) + var/duration = world.time + SecondsToTicks(30 / severity) + if(duration > electrified_until) + electrify(duration) + ..() + +/obj/machinery/door/airlock/power_change() //putting this is obj/machinery/door itself makes non-airlock doors turn invisible for some reason + ..() + if(stat & NOPOWER) + // If we lost power, disable electrification + // Keeping door lights on, runs on internal battery or something. + electrified_until = 0 + update_icon() + +/obj/machinery/door/airlock/proc/prison_open() + if(arePowerSystemsOn()) + src.unlock() + src.open() + src.lock() + +/obj/machinery/door/airlock/hostile_lockdown(mob/origin) + // Must be powered and have working AI wire. + if(canAIControl(src) && !stat) + locked = FALSE //For airlocks that were bolted open. + safe = FALSE //DOOR CRUSH + close() + lock() //Bolt it! + electrified_until = -1 //Shock it! + if(origin) + shockedby += "\[[time_stamp()]\][origin](ckey:[origin.ckey])" + + +/obj/machinery/door/airlock/disable_lockdown() + // Must be powered and have working AI wire. + if(canAIControl(src) && !stat) + unlock() + electrified_until = 0 + open() + safe = TRUE + +////////////////////////////////// +/* + Cult Airlocks +*/ + +/obj/machinery/door/airlock/cult + name = "cult airlock" + icon = 'icons/obj/doors/doorcult.dmi' + assembly_type = /obj/structure/door_assembly/door_assembly_cult + hackProof = 1 + aiControlDisabled = 1 + var/friendly = FALSE + +/obj/machinery/door/airlock/cult/New() + ..() + +/obj/machinery/door/airlock/cult/canAIControl(mob/user) + return (iscultist(user)) + +/obj/machinery/door/airlock/cult/allowed(mob/M) + if(!density) + return 1 + if(friendly || \ + iscultist(M) || \ + istype(M, /mob/living/simple_animal/shade) || \ + istype(M, /mob/living/simple_animal/construct)) + return 1 + else + var/atom/throwtarget + throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(M, src))) + M << pick(sound('sound/hallucinations/turn_around1.ogg',0,1,50), sound('sound/hallucinations/turn_around2.ogg',0,1,50)) + M.Weaken(2) + spawn(0) + M.throw_at(throwtarget, 5, 1,src) + return 0 + +/obj/machinery/door/airlock/cult/narsie_act() + return + +/obj/machinery/door/airlock/cult/friendly + friendly = TRUE diff --git a/code/game/magic/Uristrunes.dm b/code/game/magic/Uristrunes.dm index df25e084d19..5cb7dc4127e 100644 --- a/code/game/magic/Uristrunes.dm +++ b/code/game/magic/Uristrunes.dm @@ -1,79 +1,36 @@ - -var/list/word_to_uristrune_table = null - -/proc/word_to_uristrune_bit(word) - if(word_to_uristrune_table == null) - word_to_uristrune_table = list() - - var/bit = 1 - var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "mgar", "balaq", "karazet", "geeri") - - while(length(words)) - var/w = pick(words) - - word_to_uristrune_table[w] = bit - - words -= w - bit <<= 1 - - - return word_to_uristrune_table[word] - - - -/proc/get_uristrune_cult(word1, word2, word3) +/proc/get_rune_cult(word) var/animated - if((word1 == cultwords["travel"] && word2 == cultwords["self"]) \ - || (word1 == cultwords["join"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["join"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["see"] && word2 == cultwords["blood"] && word3 == cultwords["hell"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["technology"]) \ - || (word1 == cultwords["travel"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["see"] && word2 == cultwords["hell"] && word3 == cultwords["join"]) \ - || (word1 == cultwords["blood"] && word2 == cultwords["join"] && word3 == cultwords["hell"]) \ - || (word1 == cultwords["hide"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["travel"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["technology"] && word3 == cultwords["join"]) \ - || (word1 == cultwords["hell"] && word2 == cultwords["blood"] && word3 == cultwords["join"]) \ - || (word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["hide"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["travel"] && word2 == cultwords["technology"] && word3 == cultwords["other"]) \ - || (word1 == cultwords["join"] && word2 == cultwords["other"] && word3 == cultwords["self"]) \ - || (word1 == cultwords["hide"] && word2 == cultwords["other"] && word3 == cultwords["see"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["other"]) \ - || (word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) \ - || (word1 == cultwords["self"] && word2 == cultwords["other"] && word3 == cultwords["technology"]) \ - || (word1 == cultwords["travel"] && word2 == cultwords["other"]) \ - || (word1 == cultwords["join"] && word2 == cultwords["hide"] && word3 == cultwords["technology"]) ) + if(word && !(ticker.mode.cultdat.theme == "fire")) animated = 1 else animated = 0 - var/bits = word_to_uristrune_bit(word1) \ - | word_to_uristrune_bit(word2) \ - | word_to_uristrune_bit(word3) + var/bits = make_bit_triplet() - return get_uristrune(bits, animated) + return get_rune(bits, animated) -var/list/uristrune_cache = list() +var/list/rune_cache = list() +var/runetype = "rune" -/proc/get_uristrune(symbol_bits, animated = 0) +/proc/get_rune(symbol_bits, animated = 0) var/lookup = "[symbol_bits]-[animated]" - if(lookup in uristrune_cache) - return uristrune_cache[lookup] + if(ticker.mode.cultdat.theme == "fire") + runetype = "fire-rune" - var/icon/I = icon('icons/effects/uristrunes.dmi', "blank") + if(lookup in rune_cache) + return rune_cache[lookup] + + var/icon/I = icon('icons/effects/uristrunes.dmi', "[runetype]-179") for(var/i = 0, i < 10, i++) if(symbol_bits & (1 << i)) - I.Blend(icon('icons/effects/uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY) + I.Blend(icon('icons/effects/uristrunes.dmi', "[runetype]-[1 << i]"), ICON_OVERLAY) - I.SwapColor(rgb(0, 0, 0, 100), rgb(100, 0, 0, 200)) + I.SwapColor(rgb(0, 0, 0, 100), rgb(100, 0, 0, 200))//TO DO COMMENT:NEED TO ADJUST FOR DIFFRNET CULTS I.SwapColor(rgb(0, 0, 0, 50), rgb(150, 0, 0, 200)) for(var/x = 1, x <= 32, x++) @@ -127,6 +84,6 @@ var/list/uristrune_cache = list() result.Insert(I3, "", frame = 7, delay = 2) result.Insert(I2, "", frame = 8, delay = 2) - uristrune_cache[lookup] = result + rune_cache[lookup] = result return result diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 3527c3fd49a..4c70d0bfa09 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -24,6 +24,14 @@ var/global/list/image/splatter_cache=list() /obj/effect/decal/cleanable/blood/New() ..() update_icon() + if(ticker && ticker.mode && istype(ticker.mode.name, "cult")) + var/datum/game_mode/cult/mode_ticker = ticker.mode + var/turf/T = get_turf(src) + if(T && (is_station_level(T.z)))//F I V E T I L E S + if(!(T in mode_ticker.bloody_floors)) + mode_ticker.bloody_floors += T + mode_ticker.bloody_floors[T] = T + mode_ticker.blood_check() if(istype(src, /obj/effect/decal/cleanable/blood/gibs)) return if(src.type == /obj/effect/decal/cleanable/blood) @@ -36,6 +44,15 @@ var/global/list/image/splatter_cache=list() spawn(DRYING_TIME * (amount+1)) dry() +/obj/effect/decal/cleanable/blood/Destroy() + if(ticker.mode && istype(ticker.mode.name, "cult")) + var/datum/game_mode/cult/mode_ticker = ticker.mode + var/turf/T = get_turf(src) + if(T && (is_station_level(T.z))) + mode_ticker.bloody_floors -= T + mode_ticker.blood_check() + .=..() + /obj/effect/decal/cleanable/blood/update_icon() if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]" color = basecolor 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/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 0b99edde497..509d6adb0a7 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -98,6 +98,11 @@ var/global/list/datum/stack_recipe/metal_recipes = list( flags = CONDUCT origin_tech = "materials=1" +/obj/item/stack/sheet/metal/narsie_act() + if(prob(20)) + new /obj/item/stack/sheet/runed_metal(loc, amount) + qdel(src) + /obj/item/stack/sheet/metal/cyborg materials = list() @@ -201,3 +206,37 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( /obj/item/stack/sheet/cardboard/New(var/loc, var/amt = null) recipes = cardboard_recipes return ..() + +/* + * Runed Metal + */ + +var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \ + new/datum/stack_recipe("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), + new/datum/stack_recipe("runed girder", /obj/structure/cultgirder, 1, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("pylon", /obj/structure/cult/functional/pylon, 3, time = 40, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("forge", /obj/structure/cult/functional/forge, 5, time = 40, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("archives", /obj/structure/cult/functional/tome, 2, time = 40, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("altar", /obj/structure/cult/functional/talisman, 5, time = 40, one_per_turf = 1, on_floor = 1), \ + ) + +/obj/item/stack/sheet/runed_metal + name = "runed metal" + desc = "Sheets of cold metal with shifting inscriptions writ upon them." + singular_name = "runed metal" + icon_state = "sheet-runed" + icon = 'icons/obj/items.dmi' + sheettype = "runed" + +/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user) + if(!iscultist(user)) + to_chat(user, "Only one with forbidden knowledge could hope to work this metal...") + return + return ..() + +/obj/item/stack/sheet/runed_metal/fifty + amount = 50 + +/obj/item/stack/sheet/runed_metal/New(var/loc, var/amount=null) + recipes = runed_metal_recipes + return ..() diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index 4dc192e065b..7e62a14250b 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -103,7 +103,7 @@ /obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj) if(armed && isturf(src.loc)) - if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator)) + if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/hostile/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator)) var/mob/living/L = AM armed = 0 icon_state = "[initial(icon_state)][armed]" diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 042f6d2423a..8a9b86d4e81 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -100,7 +100,7 @@ if(istype(A, /turf/simulated/floor)) to_chat(user, "You hit the floor with the bible.") if(user.mind && (user.mind.assigned_role == "Chaplain")) - call(/obj/effect/rune/proc/revealrunes)(src) + call(/obj/effect/rune/proc/talismanreveal)(src) if(user.mind && (user.mind.assigned_role == "Chaplain")) if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder to_chat(user, "You bless [A].") diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index f83c257740f..9dddd902740 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -144,6 +144,20 @@ obj/structure/door_assembly/multi_tile/Move() bound_width = world.icon_size bound_height = width * world.icon_size +/obj/structure/door_assembly/door_assembly_cult + icon = 'icons/obj/doors/Doorcult.dmi' + base_icon_state = "construction" + base_name = "engraved airlock" + airlock_type = "/cult" + glass = -1 + + +/obj/structure/door_assembly/door_assembly_cultruned + icon = 'icons/obj/doors/Doorcultruned.dmi' + base_icon_state = "construction" + base_name = "runed airlock" + airlock_type = "/cult/runed" + glass = -1 /obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob, params) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 643728dd6cb..6051bbebef6 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -188,6 +188,11 @@ if(prob(40)) qdel(src) +/obj/structure/girder/narsie_act() + if(prob(25)) + new /obj/structure/cultgirder(loc) + qdel(src) + /obj/structure/girder/bullet_act(var/obj/item/projectile/Proj) if(istype(Proj ,/obj/item/projectile/beam/pulse)) src.ex_act(2) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 1c3c3f8e793..e2e287052ff 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -13,6 +13,12 @@ handle_rotation() return +/obj/structure/stool/bed/chair/narsie_act() + if(prob(20)) + var/obj/structure/stool/bed/chair/wood/W = new/obj/structure/stool/bed/chair/wood(get_turf(src)) + W.dir = dir + qdel(src) + /obj/structure/stool/bed/chair/Move(atom/newloc, direct) ..() handle_rotation() @@ -81,6 +87,9 @@ burntime = 20 // TODO: Special ash subtype that looks like charred chair legs +/obj/structure/stool/bed/chair/wood/narsie_act() + return + /obj/structure/stool/bed/chair/wood/normal icon_state = "wooden_chair" name = "wooden chair" diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 6a7476d6be1..ae9e6b41d05 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -41,6 +41,10 @@ density = 0 qdel(src) +/obj/structure/table/narsie_act() + if(prob(20)) + new /obj/structure/table/woodentable(loc) + /obj/structure/table/update_icon() if(smooth && !flipped) icon_state = "" @@ -386,6 +390,10 @@ return 1 + +/obj/structure/table/woodentable/narsie_act() + return + /obj/structure/table/woodentable/poker //No specialties, Just a mapping object. name = "gambling table" desc = "A seedy table for seedy dealings in seedy places." @@ -398,6 +406,9 @@ new /obj/item/stack/tile/grass(loc) ..() +/obj/structure/table/woodentable/poker/narsie_act() + return + /obj/structure/glasstable_frame name = "glass table frame" desc = "A metal frame for a glass table." diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 051dbe55495..22331e4f484 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -76,6 +76,9 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f /obj/structure/window/blob_act() destroy() +/obj/structure/window/narsie_act() + color = "#7D1919" + /obj/structure/window/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) destroy() diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 761e05f60c3..c6b51a05067 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -133,6 +133,11 @@ name = "engraved floor" icon_state = "cult" +/turf/simulated/floor/engine/cult/New() + ..() + if(ticker.mode)//only do this if the round is going..otherwise..fucking asteroid.. + icon_state = ticker.mode.cultdat.cult_floor_icon_state + /turf/simulated/floor/engine/cult/narsie_act() return diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index def35564327..da77242a276 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -5,10 +5,22 @@ icon_state = "cult" builtin_sheet = null canSmoothWith = null + smooth = SMOOTH_FALSE + +/turf/simulated/wall/cult/New() + ..() + if(ticker.mode)//game hasn't started offically don't do shit.. + new /obj/effect/overlay/temp/cult/turf(src) + icon_state = ticker.mode.cultdat.cult_wall_icon_state + +/turf/simulated/wall/cult/artificer + name = "runed stone wall" + desc = "A cold stone wall engraved with indecipherable symbols. Studying them causes your head to pound." + /turf/simulated/wall/cult/narsie_act() return - + /turf/simulated/wall/cult/break_wall() new /obj/effect/decal/cleanable/blood(src) return (new /obj/structure/cultgirder(src)) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index f3cf5c920db..c56b3c7404f 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -37,7 +37,6 @@ var/list/admin_verbs_admin = list( /client/proc/jumptoturf, /*allows us to jump to a specific turf*/ /client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/ /client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/ - /client/proc/check_words, /*displays cult-words*/ /client/proc/check_ai_laws, /*shows AI and borg laws*/ /client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */ /client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/ diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 47efc802957..2e76bcea6a2 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -270,9 +270,6 @@ else if(isobserver(M)) M_job = "Ghost" - else if(isSpirit(M)) - M_job = (ismask(M)) ? "Mask" : "Spirit" - M_job = replacetext(M_job, "'", "") M_job = replacetext(M_job, "\"", "") M_job = replacetext(M_job, "\\", "") @@ -360,10 +357,6 @@ dat += "Ghost" else if(isalien(M)) dat += "Alien" - else if(ismask(M)) - dat += "Mask" - else if(isSpirit(M)) - dat += "Spirit" else dat += "Unknown" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index aeb00df710a..1efb3567828 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -336,9 +336,9 @@ if("coffee") M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob, 1 ) if("parrot") M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob, 1 ) if("polyparrot") M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob, 1 ) - if("constructarmoured") M.change_mob_type( /mob/living/simple_animal/construct/armoured , null, null, delmob, 1 ) - if("constructbuilder") M.change_mob_type( /mob/living/simple_animal/construct/builder , null, null, delmob, 1 ) - if("constructwraith") M.change_mob_type( /mob/living/simple_animal/construct/wraith , null, null, delmob, 1 ) + if("constructarmoured") M.change_mob_type( /mob/living/simple_animal/hostile/construct/armoured , null, null, delmob, 1 ) + if("constructbuilder") M.change_mob_type( /mob/living/simple_animal/hostile/construct/builder , null, null, delmob, 1 ) + if("constructwraith") M.change_mob_type( /mob/living/simple_animal/hostile/construct/wraith , null, null, delmob, 1 ) if("shade") M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob, 1 ) @@ -1419,19 +1419,6 @@ var/mob/living/silicon/ai/ai_character = H.AIize() ai_character.moveToAILandmark() - - else if(href_list["makemask"]) - if(!check_rights(R_SPAWN)) return - - if(alert(usr, "Confirm make mask?",, "Yes", "No") != "Yes") - return - - var/mob/currentMob = locate(href_list["makemask"]) - message_admins("\red Admin [key_name_admin(usr)] made [key_name_admin(currentMob)] into a Mask of Nar'Sie!", 1) - log_admin("[key_name(usr)] made [key_name(currentMob)] into a Mask of Nar'Sie!") - currentMob.make_into_mask(0,0) - - else if(href_list["makealien"]) if(!check_rights(R_SPAWN)) return diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index e9648119f42..e71c6981d97 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -164,7 +164,6 @@ client/proc/one_click_antag() H = pick(candidates) H.mind.make_Cultist() candidates.Remove(H) - temp.grant_runeword(H) return 1 diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm index 7a6480943a7..dcb10c651c0 100644 --- a/code/modules/awaymissions/mission_code/stationCollision.dm +++ b/code/modules/awaymissions/mission_code/stationCollision.dm @@ -161,7 +161,7 @@ var/sc_safecode5 = "[rand(0,9)]" desc = "Your body becomes weak and your feel your mind slipping away as you try to comprehend what you know can't be possible." move_self = 0 //Contianed narsie does not move! grav_pull = 0 //Contained narsie does not pull stuff in! - var/uneatable = list(/turf/space, /obj/effect/overlay, /atom/movable/lighting_overlay, /mob/living/simple_animal/construct) + var/uneatable = list(/turf/space, /obj/effect/overlay, /atom/movable/lighting_overlay, /mob/living/simple_animal/hostile/construct) //Override this to prevent no adminlog runtimes and admin warnings about a singularity without containment /obj/singularity/narsie/sc_Narsie/admin_investigate_setup() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index a1fc5699d62..9954b8e12b2 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -240,17 +240,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients to_chat(usr, "Another consciousness is in your body...It is resisting you.") return - if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). - var/turf/T = get_turf(mind.current) - var/found_astral_rune = 0 - if(T) - for(var/obj/effect/rune/R in T.contents) //whilst corpse is alive, we can only reenter the body if it's on the rune - if(R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) //astral journeying rune - found_astral_rune = 1 - break - if(!found_astral_rune) - to_chat(usr, "The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.") - return mind.current.ajourn=0 mind.current.key = key 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) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 5deb73d219f..b85146b8b63 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -113,6 +113,7 @@ handle_sleeping() handle_slowed() handle_drunk() + handle_cultslurring() /mob/living/proc/handle_stunned() @@ -149,6 +150,11 @@ AdjustSlur(-1) return slurring +/mob/living/proc/handle_cultslurring() + if(cultslurring) + AdjustCultSlur(-1) + return cultslurring + /mob/living/proc/handle_paralysed() if(paralysis) AdjustParalysis(-1, updating = 1, force = 1) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 62102a2f662..02013cdc8b5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -675,7 +675,7 @@ /mob/living/narsie_act() if(client) - makeNewConstruct(/mob/living/simple_animal/construct/harvester, src, null, 1) + makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, src, null, 1) spawn_dust() gib() return diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 46e69594177..d5a1580ded9 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -79,7 +79,10 @@ proc/get_radio_key_from_channel(var/channel) message = stutter(message) verb = "stammers" speech_problem_flag = 1 - + if(cultslurring) + message = cultslur(message) + verb = "slurs" + speech_problem_flag = 1 if(!IsVocal()) message = "" speech_problem_flag = 1 diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index d713c6dcf23..5f1418fcae5 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -1,5 +1,5 @@ -/mob/living/simple_animal/construct +/mob/living/simple_animal/hostile/construct name = "Construct" real_name = "Construct" desc = "" @@ -19,24 +19,31 @@ faction = list("cult") flying = 1 universal_speak = 1 + AIStatus = AI_OFF //normal constructs don't have AI + var/const_type = "shade" var/list/construct_spells = list() + var/playstyle_string = "You are a generic construct! Your job is to not exist, and you should probably adminhelp this." loot = list(/obj/item/weapon/reagent_containers/food/snacks/ectoplasm) del_on_death = 1 deathmessage = "collapses in a shattered heap." -/mob/living/simple_animal/construct/New() +/mob/living/simple_animal/hostile/construct/New() ..() - name = text("[initial(name)] ([rand(1, 1000)])") - real_name = name + name = "[ticker.mode.cultdat.get_name(const_type)] ([rand(1, 1000)])" + real_name = ticker.mode.cultdat.get_name(const_type) + icon_living = ticker.mode.cultdat.get_icon(const_type) + icon_state = ticker.mode.cultdat.get_icon(const_type) for(var/spell in construct_spells) AddSpell(new spell(null)) - updateglow() -/mob/living/simple_animal/construct/examine(mob/user) + if(ticker.mode.cultdat.theme == "blood") + updateglow() + +/mob/living/simple_animal/hostile/construct/examine(mob/user) to_chat(user, "*---------*") ..(user) - var/msg = "" + var/msg = "" if(src.health < src.maxHealth) msg += "" if(src.health >= src.maxHealth/2) @@ -48,32 +55,34 @@ to_chat(user, msg) -/mob/living/simple_animal/construct/attack_animal(mob/living/simple_animal/M as mob) - if(istype(M, /mob/living/simple_animal/construct/builder)) - health += 5 - M.custom_emote(1,"mends some of \the [src]'s wounds.") - else - if(M.melee_damage_upper <= 0) - M.custom_emote(1, "[M.friendly] \the [src]") +/mob/living/simple_animal/hostile/construct/attack_animal(mob/living/simple_animal/M) + if(istype(M, /mob/living/simple_animal/hostile/construct/builder)) + if(health < maxHealth) + adjustBruteLoss(-5) + if(src != M) + Beam(M,icon_state="sendbeam",icon='icons/effects/effects.dmi',time=4) + M.visible_message("[M] repairs some of \the [src]'s dents.", \ + "You repair some of [src]'s dents, leaving [src] at [health]/[maxHealth] health.") + else + M.visible_message("[M] repairs some of its own dents.", \ + "You repair some of your own dents, leaving you at [M.health]/[M.maxHealth] health.") else - M.do_attack_animation(src) - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\The [M] [M.attacktext] \the [src]!", 1) - add_logs(M, src, "attacked") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) + if(src != M) + to_chat(M, "You cannot repair [src]'s dents, as it has none!") + else + to_chat(M, "You cannot repair your own dents, as you have none!") + else if(src != M) + ..() -/mob/living/simple_animal/construct/narsie_act() +/mob/living/simple_animal/hostile/construct/narsie_act() return /////////////////Juggernaut/////////////// -/mob/living/simple_animal/construct/armoured +/mob/living/simple_animal/hostile/construct/armoured name = "Juggernaut" real_name = "Juggernaut" desc = "A possessed suit of armour driven by the will of the restless dead" @@ -91,11 +100,19 @@ environment_smash = 2 attack_sound = 'sound/weapons/punch3.ogg' status_flags = 0 + const_type = "juggernaut" mob_size = MOB_SIZE_LARGE construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall) force_threshold = 11 + playstyle_string = "You are a Juggernaut. Though slow, your shell can withstand extreme punishment, \ + create shield walls, rip apart enemies and walls alike, and even deflect energy weapons." -/mob/living/simple_animal/construct/armoured/bullet_act(var/obj/item/projectile/P) + +/mob/living/simple_animal/hostile/construct/armoured/hostile //actually hostile, will move around, hit things + AIStatus = AI_ON + environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP + +/mob/living/simple_animal/hostile/construct/armoured/bullet_act(var/obj/item/projectile/P) if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)) var/reflectchance = 80 - round(P.damage/3) if(prob(reflectchance)) @@ -128,7 +145,7 @@ -/mob/living/simple_animal/construct/wraith +/mob/living/simple_animal/hostile/construct/wraith name = "Wraith" real_name = "Wraith" desc = "A wicked bladed shell contraption piloted by a bound spirit" @@ -142,15 +159,19 @@ attacktext = "slashes" see_in_dark = 7 attack_sound = 'sound/weapons/bladeslice.ogg' + const_type = "wraith" construct_spells = list(/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift) + retreat_distance = 2 //AI wraiths will move in and out of combat + playstyle_string = "You are a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls." - +/mob/living/simple_animal/hostile/construct/wraith/hostile //actually hostile, will move around, hit things + AIStatus = AI_ON /////////////////////////////Artificer///////////////////////// -/mob/living/simple_animal/construct/builder +/mob/living/simple_animal/hostile/construct/builder name = "Artificer" real_name = "Artificer" desc = "A bulbous construct dedicated to building and maintaining The Cult of Nar-Sie's armies" @@ -165,18 +186,70 @@ melee_damage_upper = 5 attacktext = "rams" environment_smash = 2 + retreat_distance = 10 + minimum_distance = 10 //AI artificers will flee like fuck attack_sound = 'sound/weapons/punch2.ogg' + const_type = "builder" construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser, /obj/effect/proc_holder/spell/aoe_turf/conjure/wall, /obj/effect/proc_holder/spell/aoe_turf/conjure/floor, + /obj/effect/proc_holder/spell/aoe_turf/conjure/pylon, /obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone, /obj/effect/proc_holder/spell/targeted/projectile/magic_missile/lesser) + playstyle_string = "You are an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, \ + use magic missile, repair allied constructs (by clicking on them), \ + and, most important of all, create new constructs by producing soulstones to capture souls, \ + and shells to place those soulstones into." + + +/mob/living/simple_animal/hostile/construct/builder/Found(atom/A) //what have we found here? + if(istype(A, /mob/living/simple_animal/hostile/construct)) //is it a construct? + var/mob/living/simple_animal/hostile/construct/C = A + if(C.health < C.maxHealth) //is it hurt? let's go heal it if it is + return 1 + else + return 0 + else + return 0 + +/mob/living/simple_animal/hostile/construct/builder/CanAttack(atom/the_target) + if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it + return 0 + if(Found(the_target) || ..()) //If we Found it or Can_Attack it normally, we Can_Attack it as long as it wasn't invisible + return 1 //as a note this shouldn't be added to base hostile mobs because it'll mess up retaliate hostile mobs + +/mob/living/simple_animal/hostile/construct/builder/MoveToTarget(var/list/possible_targets) + ..() + if(isliving(target)) + var/mob/living/L = target + if(istype(L, /mob/living/simple_animal/hostile/construct) && L.health >= L.maxHealth) //is this target an unhurt construct? stop trying to heal it + LoseTarget() + return 0 + if(L.health <= melee_damage_lower+melee_damage_upper) //ey bucko you're hurt as fuck let's go hit you + retreat_distance = null + minimum_distance = 1 + +/mob/living/simple_animal/hostile/construct/builder/Aggro() + ..() + if(istype(target, /mob/living/simple_animal/hostile/construct)) //oh the target is a construct no need to flee + retreat_distance = null + minimum_distance = 1 + +/mob/living/simple_animal/hostile/construct/builder/LoseAggro() + ..() + retreat_distance = initial(retreat_distance) + minimum_distance = initial(minimum_distance) + +/mob/living/simple_animal/hostile/construct/builder/hostile //actually hostile, will move around, hit things, heal other constructs + AIStatus = AI_ON + environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP + /////////////////////////////Behemoth///////////////////////// -/mob/living/simple_animal/construct/behemoth +/mob/living/simple_animal/hostile/construct/behemoth name = "Behemoth" real_name = "Behemoth" desc = "The pinnacle of occult technology, Behemoths are the ultimate weapon in the Cult of Nar-Sie's arsenal." @@ -195,13 +268,22 @@ environment_smash = 2 attack_sound = 'sound/weapons/punch4.ogg' force_threshold = 11 + const_type = "behemoth" var/energy = 0 var/max_energy = 1000 +/mob/living/simple_animal/hostile/construct/behemoth/hostile //actually hostile, will move around, hit things + AIStatus = AI_ON + environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP + +/mob/living/simple_animal/hostile/construct/behemoth/Life() + weakened = 0 + return ..() + /////////////////////////////Harvester///////////////////////// -/mob/living/simple_animal/construct/harvester +/mob/living/simple_animal/hostile/construct/harvester name = "Harvester" real_name = "Harvester" desc = "A harbinger of Nar-Sie's enlightenment. It'll be all over soon." @@ -215,16 +297,25 @@ attacktext = "prods" speed = 0 environment_smash = 1 - see_in_dark = 7 + see_in_dark = 8 attack_sound = 'sound/weapons/tap.ogg' + const_type = "harvester" construct_spells = list(/obj/effect/proc_holder/spell/targeted/smoke/disable) + retreat_distance = 2 //AI harvesters will move in and out of combat, like wraiths, but shittier + playstyle_string = "You are a Harvester. You are not strong, but your powers of domination will assist you in your role: \ + Bring those who still cling to this world of illusion back to the master so they may know Truth." -/mob/living/simple_animal/construct/harvester/Process_Spacemove(var/movement_dir = 0) + +/mob/living/simple_animal/hostile/construct/harvester/Process_Spacemove(var/movement_dir = 0) return 1 +/mob/living/simple_animal/hostile/construct/harvester/hostile //actually hostile, will move around, hit things + AIStatus = AI_ON + + ////////////////Glow//////////////////// -/mob/living/simple_animal/construct/proc/updateglow() +/mob/living/simple_animal/hostile/construct/proc/updateglow() overlays = 0 var/overlay_layer = LIGHTING_LAYER + 1 if(layer != MOB_LAYER) @@ -233,32 +324,75 @@ overlays += image(icon,"glow-[icon_state]",overlay_layer) set_light(2, -2, l_color = "#FFFFFF") -////////////////Powers////////////////// +///ui stuff + +/mob/living/simple_animal/hostile/construct/armoured/handle_hud_icons_health() + ..() + if(healths) + switch(health) + if(250 to INFINITY) healths.icon_state = "juggernaut_health0" + if(208 to 249) healths.icon_state = "juggernaut_health1" + if(167 to 207) healths.icon_state = "juggernaut_health2" + if(125 to 166) healths.icon_state = "juggernaut_health3" + if(84 to 124) healths.icon_state = "juggernaut_health4" + if(42 to 83) healths.icon_state = "juggernaut_health5" + if(1 to 41) healths.icon_state = "juggernaut_health6" + else healths.icon_state = "juggernaut_health7" -/* -/client/proc/summon_cultist() - set category = "Behemoth" - set name = "Summon Cultist (300)" - set desc = "Teleport a cultist to your location" - if(istype(usr,/mob/living/simple_animal/constructbehemoth)) +/mob/living/simple_animal/hostile/construct/behemoth/handle_hud_icons_health() + ..() + if(healths) + switch(health) + if(750 to INFINITY) healths.icon_state = "juggernaut_health0" + if(625 to 749) healths.icon_state = "juggernaut_health1" + if(500 to 624) healths.icon_state = "juggernaut_health2" + if(375 to 499) healths.icon_state = "juggernaut_health3" + if(250 to 374) healths.icon_state = "juggernaut_health4" + if(125 to 249) healths.icon_state = "juggernaut_health5" + if(1 to 124) healths.icon_state = "juggernaut_health6" + else healths.icon_state = "juggernaut_health7" - if(usr.energy<300) - to_chat(usr, "\red You do not have enough power stored!") - return +/mob/living/simple_animal/hostile/construct/builder/handle_hud_icons_health() + ..() + if(healths) + switch(health) + if(50 to INFINITY) healths.icon_state = "artificer_health0" + if(42 to 49) healths.icon_state = "artificer_health1" + if(34 to 41) healths.icon_state = "artificer_health2" + if(26 to 33) healths.icon_state = "artificer_health3" + if(18 to 25) healths.icon_state = "artificer_health4" + if(10 to 17) healths.icon_state = "artificer_health5" + if(1 to 9) healths.icon_state = "artificer_health6" + else healths.icon_state = "artificer_health7" - if(usr.stat) - return - usr.energy -= 300 - var/list/mob/living/cultists = new - for(var/datum/mind/H in ticker.mode.cult) - if(istype(H.current,/mob/living)) - cultists+=H.current - var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - usr) - if(!cultist) - return - if(cultist == usr) //just to be sure. - return - cultist.loc = usr.loc - usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/ + +/mob/living/simple_animal/hostile/construct/wraith/handle_hud_icons_health() + + ..() + if(healths) + switch(health) + if(75 to INFINITY) healths.icon_state = "wraith_health0" + if(62 to 74) healths.icon_state = "wraith_health1" + if(50 to 61) healths.icon_state = "wraith_health2" + if(37 to 49) healths.icon_state = "wraith_health3" + if(25 to 36) healths.icon_state = "wraith_health4" + if(12 to 24) healths.icon_state = "wraith_health5" + if(1 to 11) healths.icon_state = "wraith_health6" + else healths.icon_state = "wraith_health7" + + +/mob/living/simple_animal/hostile/construct/harvester/handle_hud_icons_health() + + ..() + if(healths) + switch(health) + if(150 to INFINITY) healths.icon_state = "harvester_health0" + if(125 to 149) healths.icon_state = "harvester_health1" + if(100 to 124) healths.icon_state = "harvester_health2" + if(75 to 99) healths.icon_state = "harvester_health3" + if(50 to 74) healths.icon_state = "harvester_health4" + if(25 to 49) healths.icon_state = "harvester_health5" + if(1 to 24) healths.icon_state = "harvester_health6" + else healths.icon_state = "harvester_health7" \ No newline at end of file diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 45207fd5426..402f94e837e 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -67,6 +67,8 @@ Your character moves slower. * Slurring * Your character cannot enunciate clearly. + * CultSlurring * + Your character cannot enunciate clearly while mumbling about elder codes. * Stunned * Your character is unable to move, and drops stuff in their hands. They keep standing, though. * Stuttering * @@ -108,6 +110,7 @@ /mob // On `/mob` for now, to support legacy code var/confused = 0 + var/cultslurring = 0 var/dizziness = 0 var/drowsyness = 0 var/druggy = 0 @@ -387,6 +390,18 @@ var/new_value = directional_bounded_sum(slurring, amount, bound_lower, bound_upper) SetSlur(new_value) +// CULTSLURRING + +/mob/living/CultSlur(amount) + SetSlur(max(slurring, amount)) + +/mob/living/SetCultSlur(amount) + slurring = max(amount, 0) + +/mob/living/AdjustCultSlur(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(cultslurring, amount, bound_lower, bound_upper) + SetCultSlur(new_value) + // STUN /mob/living/Stun(amount, updating = 1, force = 0) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 98ad38c36fa..0b04647d094 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -547,6 +547,47 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM) rename_character(oldname, newname) +/proc/cultslur(n) // Inflicted on victims of a stun talisman + var/phrase = html_decode(n) + var/leng = lentext(phrase) + var/counter=lentext(phrase) + var/newphrase="" + var/newletter="" + while(counter>=1) + newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2) + if(rand(1,2)==2) + if(lowertext(newletter)=="o") + newletter="u" + if(lowertext(newletter)=="t") + newletter="ch" + if(lowertext(newletter)=="a") + newletter="ah" + if(lowertext(newletter)=="u") + newletter="oo" + if(lowertext(newletter)=="c") + newletter=" NAR " + if(lowertext(newletter)=="s") + newletter=" SIE " + if(rand(1,4)==4) + if(newletter==" ") + newletter=" no hope... " + if(newletter=="H") + newletter=" IT COMES... " + + switch(rand(1,15)) + if(1) + newletter="'" + if(2) + newletter+="agn" + if(3) + newletter="fth" + if(4) + newletter="nglu" + if(5) + newletter="glor" + newphrase+="[newletter]";counter-=1 + return newphrase + /mob/proc/get_preference(toggleflag) if(!client) return FALSE diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index d99fc342c2b..74c9528071c 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -164,11 +164,6 @@ if(mob.stat==DEAD) return -// handle possible spirit movement - if(istype(mob,/mob/spirit)) - var/mob/spirit/currentSpirit = mob - return currentSpirit.Spirit_Move(direct) - if(mob.notransform) return//This is sota the goto stop mobs from moving var if(isliving(mob)) diff --git a/code/modules/mob/spirit/cultnet.dm b/code/modules/mob/spirit/cultnet.dm deleted file mode 100644 index b43ee46b842..00000000000 --- a/code/modules/mob/spirit/cultnet.dm +++ /dev/null @@ -1,32 +0,0 @@ -/* - -This file contains the code necessary to do the display code for cult spirits. - -It reuses a lot of code from the AIEye cameraNetwork. In order to work properly, some of those files needed to be modified as well. - -*/ - - -/proc/isCultRune(var/viewpoint) - var/obj/effect/rune/test_rune = viewpoint - if(test_rune) - return TRUE - return FALSE - - -/proc/isCultViewpoint(var/viewpoint) - var/obj/cult_viewpoint/vp = viewpoint - if(vp) - return TRUE - return FALSE - -/* -RUNE JUNK -*/ - -/obj/effect/rune/proc/can_use() - return TRUE - -/obj/effect/rune/proc/can_see() - return hear(view_range, get_turf(src)) - diff --git a/code/modules/mob/spirit/mask/mask.dm b/code/modules/mob/spirit/mask/mask.dm deleted file mode 100644 index 2b907ca7f5a..00000000000 --- a/code/modules/mob/spirit/mask/mask.dm +++ /dev/null @@ -1,227 +0,0 @@ -/mob/spirit/mask - icon = 'icons/mob/spirits/mask.dmi' - icon_state = "depressurized" - -/mob/spirit/mask/New() - ..() - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(null)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(null)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(null)) - - -/mob/spirit/mask/verb/go_to_follower() - set category = "Mask" - set name = "Go to follower" - set desc = "Select who you would like to go too." - - var/obj/cult_viewpoint/cultist = pick_cultist() - if(cultist) - follow_cultist(cultist.owner) - cult_log("[key_name_admin(src)] started following [key_name_admin(cultist)].") - to_chat(src, "You start following [cultist.get_display_name()].") - - -/mob/spirit/mask/verb/urge_cultist() - set category = "Mask" - set name = "Urge cultist" - set desc = "Push your cultists to do something." - - var/obj/cult_viewpoint/cultist = pick_cultist() - if(cultist) - if(cultist.owner) - var/newUrge = stripped_input(usr, "", "Set Urge", "") - cultist.set_urge(newUrge) - to_chat(src, "You urge [cultist.owner.name] to [newUrge].") - cult_log("controlled by [key_name_admin(src)] has urged [key_name_admin(cultist.owner)] to [newUrge].") - -/mob/spirit/mask/verb/set_cult_name() - set category = "Mask" - set name = "Set Cult Name" - set desc = "Grant a cultist a name." - - var/obj/cult_viewpoint/cultist = pick_cultist() - if(cultist) - var/newName = stripped_input(usr, "", "Set Cult Name", "") - if(!newName) - return - cultist.set_cult_name(newName) - to_chat(src, "You grant [cultist.owner.name] the secret name of [newName].") - if(cultist.owner) - cult_log("[key_name_admin(src)] has set [key_name_admin(cultist.owner)] to \'[newName]\'") - - -/mob/spirit/mask/verb/urge_cult() - set category = "Mask" - set name = "Urge Cult" - set desc = "Set urge on the entire cult." - - var/newUrge = stripped_input(usr, "Please choose an urge.", "Set Urge", "") - for(var/obj/cult_viewpoint/viewpoint in cult_viewpoints) - viewpoint.set_urge(newUrge) - to_chat(src, "You urge the entire cult to [newUrge].") - cult_log("[key_name_admin(src)] has urged the entire cult to [newUrge]") - - -/mob/spirit/mask/verb/set_favor_for_cultist() - set category = "Mask" - set name = "Show your favor" - set desc = "Set the favor for a cultist" - - var/obj/cult_viewpoint/cultist = pick_cultist() - if(cultist) - if(cultist.owner) - var/list/favor = list("Pleased", "Displeased", "Indifference") - var/emotion = input("Pick your emotion", "Mask", null, null) in favor - switch(emotion) - if("Pleased") - cultist.set_favor(1) - cult_log("[key_name_admin(src)] is pleased with [key_name_admin(cultist.owner)]") - if("Displeased") - cultist.set_favor(-1) - cult_log("[key_name_admin(src)] is displeased with [key_name_admin(cultist.owner)]") - if("Indifference") - cultist.set_favor(0) - cult_log("[key_name_admin(src)] is indifferent too [key_name_admin(cultist.owner)]") - - -/mob/spirit/mask/proc/set_name() - spawn(0) - var/newName = stripped_input(src, "Please pick a name.", "Pick Name for Mask", "") - name = newName ? newName : "Mask of Nar'sie" - to_chat(src, "You have set your name to [name].") - - -/mob/spirit/mask/proc/pick_cultist() - var/list/cultists = list() - for(var/obj/cult_viewpoint/viewpoint in cult_viewpoints) - cultists[viewpoint.get_display_name()]=viewpoint - var/input = input("Please, select a cultist!", "Cult", null, null) as null|anything in cultists - var/obj/cult_viewpoint/result = cultists[input] - return result - - -// this proc makes the mask visible very briefly -/mob/spirit/mask/proc/flicker() - spawn(0) - alpha = 127 - invisibility=0 - sleep(5) - invisibility=initial(invisibility) - alpha = 255 - -/proc/flicker_mask(mob/spirit/mask/target) - if(istype(target)) - target.flicker() - -// SPELLS -/obj/effect/proc_holder/spell/aoe_turf/blood_speech - name = "Speak to your Acolytes" - desc = "This spell allows you to speak to your flock." - school = "unknown evil" - charge_type = "recharge" - charge_max = 2000 - clothes_req = 0 - invocation = "none" - invocation_type = "none" - range = 0 - -/obj/effect/proc_holder/spell/aoe_turf/blood_speech/cast(list/targets) - var/input = stripped_input(usr, "Please choose a message to tell your acolytes.", "Voice of Blood", "") - if(!input) - revert_cast(usr) - cult_log("[key_name_admin(usr)]says : [input]") - flicker_mask(usr) - for(var/datum/mind/H in ticker.mode.cult) - if(H.current) - to_chat(H.current, "[usr.name]: [input]") - for(var/mob/spirit/spirit in spirits) - to_chat(spirit, "[usr.name]: [input]") - - -/obj/effect/proc_holder/spell/aoe_turf/shatter_lights - name = "Spread Shadows" - desc = "This spell breaks lights near the mask." - school = "unknown evil" - charge_type = "recharge" - charge_max = 1000 - clothes_req = 0 - invocation = "none" - invocation_type = "none" - range = 0 - -/obj/effect/proc_holder/spell/aoe_turf/shatter_lights/cast(list/targets) - cult_log("[key_name_admin(usr)] used Spread Shadows.") - flicker_mask(usr) - spawn(0) - for(var/area/A in range(3,get_turf(usr))) - for(var/obj/machinery/light/L in A) - L.on = 1 - L.broken() - sleep(1) - for(var/obj/item/device/flashlight/F in A) - F.on = 0 - - -/obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman - name = "Create Talisman" - desc = "This spell conjures a talisman" - - school = "conjuration" - charge_type = "recharge" - charge_max = 3000 - clothes_req = 0 - invocation = "none" - invocation_type = "none" - range = 0 - summon_type = list(/obj/item/weapon/paper/talisman) - - var/list/talismans = list( "Armor"="armor", - "Blind"="blind", - "Conceal"="conceal", - "Communicate"="communicate", - "Deafen"="deafen", - "EMP"="emp", - "Teleport"="teleport", - "Tome"="newtome", - "Reveal Runes", - "Stun"="runestun", - "Soul Stone"="soulstone", - "Construct"="construct") - - -/obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman/cast(list/targets) - - var/talisman = input("Pick a talisman type", "Talisman", null, null) as null|anything in talismans - var/imbue_value = talismans[talisman] - if(!talisman) - to_chat(usr, "You choose not to create a talisman.") - revert_cast(usr) - return - - cult_log("[key_name_admin(usr,0)] created a talisman of type [talisman].") - flicker_mask(usr) - - switch(talisman) - - if("Teleport") - var/target_rune = input("Pick a teleport target", "Teleport Rune", null, null) as null|anything in engwords - if(!target_rune) - to_chat(usr, "You choose not to create a talisman.") - revert_cast(usr) - return - summon_type = list(/obj/item/weapon/paper/talisman) - newVars = list("imbue" = "[target_rune]", "info" = "[target_rune]") - - if("Soul Stone") - summon_type = list(/obj/item/device/soulstone) - newVars = list() - - if("Construct") - summon_type = list(/obj/structure/constructshell) - newVars = list() - - else - summon_type = list(/obj/item/weapon/paper/talisman) - newVars = list("imbue" = "[imbue_value]") - - ..() \ No newline at end of file diff --git a/code/modules/mob/spirit/mask/respawn.dm b/code/modules/mob/spirit/mask/respawn.dm deleted file mode 100644 index 60330de917d..00000000000 --- a/code/modules/mob/spirit/mask/respawn.dm +++ /dev/null @@ -1,20 +0,0 @@ -/proc/there_can_be_only_one_mask(var/mob/spirit/mask/target) - if(!istype(target)) - return - for(var/mob/spirit/mask/currentSpirit in spirits) - if(currentSpirit) - if(currentSpirit!=target) - // create the ghost - var/mob/dead/observer/ghost = currentSpirit.ghostize(TRUE) - // let the deposed mask respawn immediately, the poor dear - ghost.timeofdeath = world.time - 20000 - ghost.newPlayerType = /mob/new_player/cultist - // remove old mask body - qdel(currentSpirit) - - -/mob/new_player/cultist/AttemptLateSpawn(rank) - var/mob/newCharacter = ..(rank) - if(ticker.mode) - if(is_convertable_to_cult(newCharacter.mind)) - ticker.mode.add_cultist(newCharacter.mind) \ No newline at end of file diff --git a/code/modules/mob/spirit/movement.dm b/code/modules/mob/spirit/movement.dm deleted file mode 100644 index b014fb42927..00000000000 --- a/code/modules/mob/spirit/movement.dm +++ /dev/null @@ -1,61 +0,0 @@ -// spirits are not moved by airflow -mob/spirit/Move() - return 0 - -// this is the main move proc for spirits, it uses their 'setLoc' function to handle all the visibility shenanigans -// this, like most movement code for these guys, is cribbed from the AIEye movement code -mob/spirit/proc/Spirit_Move(direct) - - var/initial = initial(sprint) - var/max_sprint = 50 - - // if we haven't moved in a while, we stop sprinting - if(cooldown && cooldown < world.timeofday) // 3 seconds - sprint = initial - - for(var/i = 0; i < max(sprint, initial); i += 20) - var/turf/step = get_turf(get_step(src, direct)) - if(step) - setLoc(step) - - dir = direct // update our sprite - - cooldown = world.timeofday + 5 - if(acceleration) - sprint = min(sprint + 0.5, max_sprint) - else - sprint = initial - - // if we're trying to move, we want to stop following our target - follow_target = null - - -/mob/spirit/proc/follow_cultist(mob/living/target as mob) - if(!istype(target)) return - var/obj/cult_viewpoint/currentView = getCultViewpoint(target) - var/mob/spirit/U = usr - - if(!currentView) - to_chat(U, "As a spirit, you may only track cultists.") - - U.follow_target = target - to_chat(U, "Now following [currentView.get_cult_name()].") - - spawn (0) - while(U.follow_target == target) - if(U.follow_target == null) - return - U.setLoc(get_turf(target)) - sleep(10) - - -mob/spirit/setLoc(var/T) - T = get_turf(T) - loc = T - -mob/spirit/verb/toggle_acceleration() - set category = "Spirit" - set name = "Toggle Acceleration" - - acceleration = !acceleration - to_chat(usr, "Acceleration has been toggled [acceleration ? "on" : "off"].") diff --git a/code/modules/mob/spirit/spirit.dm b/code/modules/mob/spirit/spirit.dm deleted file mode 100644 index a42d9e6817e..00000000000 --- a/code/modules/mob/spirit/spirit.dm +++ /dev/null @@ -1,70 +0,0 @@ -/* -This mob type is used for entities that exist within the Cult's spirit world. They share the same visibility network and are intangible. -*/ - -mob/spirit - name = "spirit" - desc = "A spirit" - icon = 'icons/mob/mob.dmi' - icon_state = "ghost" - layer = 4 - stat = CONSCIOUS - status_flags = GODMODE // spirits cannot be killed - density = 0 - canmove = 0 - blinded = 0 - anchored = 1 - mouse_opacity = 0 - invisibility = INVISIBILITY_SPIRIT - universal_speak = 1 - - // pseudo-movement values - var/sprint = 10 - var/cooldown = 0 - var/acceleration = 1 - var/follow_target = null - - -mob/spirit/proc/is_active() - if(client && client.inactivity <= 10 * 60 * 10) - return TRUE - return FALSE - - -mob/spirit/New() - sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF - see_invisible = SEE_SPIRITS - see_in_dark = 100 - - loc = pick(latejoin) - - // no nameless spirits - if(!name) - name = "Boogyman" - - spirits+=src - - ..() - -mob/spirit/Destroy() - spirits-=src - return ..() - - -mob/spirit/Topic(href, href_list) - - if(usr != src) - return - ..() - - to_chat(usr, "Spirit Href = [href]") - for(var/tempref in href_list) - to_chat(usr, "Spirit href list [tempref] = [href_list[tempref]]") - - if(href_list["track"]) - to_chat(usr, "Got to tracking.") - var/mob/target = locate(href_list["track"]) in mob_list - var/mob/spirit/A = locate(href_list["track2"]) in spirits - if(A && target) - A.follow_cultist(target) - return \ No newline at end of file diff --git a/code/modules/mob/spirit/viewpoint.dm b/code/modules/mob/spirit/viewpoint.dm deleted file mode 100644 index 94cbef5190b..00000000000 --- a/code/modules/mob/spirit/viewpoint.dm +++ /dev/null @@ -1,203 +0,0 @@ -#define FAVOR_PLEASED 1 -#define FAVOR_INDIFFERENT 0 -#define FAVOR_DISPLEASED -1 - - -var/obj/cult_viewpoint/list/cult_viewpoints = list() - - -/obj/cult_viewpoint - var/view_range = 7 - var/updating = 0 - var/mob/owner = null - var/urge = "" - var/favor = FAVOR_INDIFFERENT - var/cult_name = null - - -/obj/cult_viewpoint/New(var/mob/target) - owner = target - //src.loc = owner - cult_viewpoints+=src - //handle_missing_mask() - ..() - - -/obj/cult_viewpoint/Destroy() - processing_objects.Remove(src) - cult_viewpoints-=src - return ..() - - -// VERBS -/obj/cult_viewpoint/verb/check_urge() - set category = "Cult" - set desc = "Discover what your god commands of you." - set name = "Check Urge" - set src in usr - if(src.urge) - to_chat(owner, "\red \b You feel the urge to [src.urge]") - else - to_chat(owner, "\b You feel no supernatural compulsions.") - - -/obj/cult_viewpoint/verb/reach_out() - set category = "Cult" - set desc = "Reach out for your gods presence." - set name = "Reach Out" - set src in usr - - for(var/mob/spirit/mask/currentMask in spirits) - if(currentMask.is_active()) - to_chat(owner, "\red \b You feel the reassuring presence of your god.") - to_chat(currentMask, "[get_display_name()] has reached out to you.") - - return - to_chat(owner, "\b You feel a chilling absence.") - handle_missing_mask() - - -/obj/cult_viewpoint/verb/check_favor() - set category = "Cult" - set desc = "Check your favor with your god." - set name = "Check Favor" - set src in usr - switch(favor) - if(FAVOR_PLEASED) - to_chat(owner, "\red \b You bask in your gods favor.") - if(FAVOR_INDIFFERENT) - to_chat(owner, "\red \b You feel nothing.") - if(FAVOR_DISPLEASED) - to_chat(owner, "\red \b You cringe at your gods displeasure.") - - -/obj/cult_viewpoint/verb/pray_to_mask() - set category = "Cult" - set desc = "Pray to your god" - set name = "Pray to Nar'Sie" - set src in usr - - var/input = stripped_input(usr, "Please choose a message to say to your god.", "Pray to Nar'Sie", "") - if(!input) - return - - cult_log("[key_name(usr,0)](Pray):[input]") - to_chat(owner, "You pray to Nar'Sie: [input]") - - for(var/mob/spirit/spirit in spirits) - to_chat(spirit, "[get_display_name()] prays : [input]") - - -// PROCS -/obj/cult_viewpoint/proc/set_favor(var/newFavor) - favor = newFavor - check_favor() - - -/obj/cult_viewpoint/proc/set_urge(var/newUrge) - if(!newUrge) - src.urge = null - src.urge = copytext(newUrge, 1, MAX_MESSAGE_LEN) - check_urge() - - -/obj/cult_viewpoint/proc/can_use() - if(owner.stat != DEAD) - return TRUE - return FALSE - - -/obj/cult_viewpoint/proc/can_see() - return hear(view_range, get_turf(owner)) - - -/obj/cult_viewpoint/proc/get_cult_name() - if(cult_name) - return cult_name - return "An Unknown Servant" - - -/obj/cult_viewpoint/proc/set_cult_name(var/newName) - if(!owner) - return FALSE - if(newName) - cult_name = newName - to_chat(owner, "\red \b You have been blessed with the secret name of '[newName]'.") - else - cult_name = null - to_chat(owner, "\red \b Your god has taken your secret name.") - - -/obj/cult_viewpoint/proc/get_display_name() - if(istype(src,/obj/effect/rune)) - return name - if(!owner) - return - if(cult_name) - return cult_name - return owner.name - - -/obj/cult_viewpoint/proc/become_mask() - set category = "Cult" - set name = "Become Mask" - set desc = "Sacrifice your life and become a Mask of Nar'sie." - set src in usr - - cult_log("[key_name(usr,0)] has tried to become a Mask of Nar'sie.") - - if(!active_mask()) - var/confirm = alert(owner.client, "You are about to become a Mask of Nar'sie. This will destroy your body, and you will only be able to guide the other cultists through communication. Are you sure?", "Confirm Your Sacrifice", "Yes", "No") - if(confirm == "Yes") - var/transformation_type = alert(owner.client, "You are about to become a Mask. Do you want it to be subtle or violent?", "Mask", "Subtle", "Violent") - if(!active_mask()) - cult_log("[key_name(usr,0)] has become a Mask of Nar'sie.") - if(transformation_type=="Subtle") - log_admin("[key_name_admin(owner)] has subtly become a Mask of Nar'sie") - owner.make_into_mask(0,0) - else - log_admin("[key_name_admin(owner)] has violently become a Mask of Nar'sie") - owner.make_into_mask(1,1) - else - return - else - to_chat(owner, "\b You cannot become a mask of Nar'Sie because a Mask already exists.") - mask_has_been_found() - return - - -/obj/cult_viewpoint/proc/active_mask() - for(var/mob/spirit/mask/currentMask in spirits) - if(currentMask.is_active()) - return TRUE - return FALSE - - -/obj/cult_viewpoint/proc/handle_missing_mask() - if(active_mask()) - mask_has_been_found() - else - mask_is_missing() - - -/obj/cult_viewpoint/proc/mask_has_been_found() - for(var/obj/cult_viewpoint/viewpoint in cult_viewpoints) - if(viewpoint.verbs.Find(/obj/cult_viewpoint/proc/become_mask)) - viewpoint.verbs-=/obj/cult_viewpoint/proc/become_mask - - -/obj/cult_viewpoint/proc/mask_is_missing() - for(var/obj/cult_viewpoint/viewpoint in cult_viewpoints) - if(!viewpoint.verbs.Find(/obj/cult_viewpoint/proc/become_mask)) - viewpoint.verbs+=/obj/cult_viewpoint/proc/become_mask - - -/proc/getCultViewpoint(var/mob/currentMob) - for(var/obj/cult_viewpoint/currentView in currentMob) - return currentView - return FALSE - - -#undef FAVOR_PLEASED -#undef FAVOR_INDIFFERENT -#undef FAVOR_DISPLEASED \ No newline at end of file diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index 7358486deee..ace8ab1b621 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -171,6 +171,14 @@ /mob/proc/AdjustSlur() return +/mob/proc/CultSlur() + return + +/mob/proc/SetCultSlur() + return + +/mob/proc/AdjustCultSlur() + return /mob/proc/Stun() return diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 9033d6438cd..8adc505102b 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -42,56 +42,6 @@ qdel(src) return O -/mob/living/carbon/human/make_into_mask(var/should_gib = 0) - for(var/t in organs) - qdel(t) - return ..(should_gib) - - -/mob/proc/make_into_mask(var/should_gib = 0, var/should_remove_items = 0) - - if(!should_gib) - icon = null - invisibility = 101 - - if(!should_remove_items) - for(var/obj/item/W in src) - unEquip(W) - - var/mob/spirit/mask/new_spirit = new() - - if(mind) - new_spirit.mind = mind - new_spirit.mind.assigned_role = "Mask" - new_spirit.mind.original = new_spirit - - new_spirit.key = key - new_spirit.loc=loc - - if(should_gib) - spawn(0) - src.gib() // gib the body - else - spawn(0)//To prevent the proc from returning null. - src.visible_message( \ - "[src] disappears into the shadows, never to be seen again.", \ - "You disappear into the shadows, never to be seen again.", \ - "You hear strange noise, you can't quite place it.") - qdel(src) - - to_chat(new_spirit, "You are a Mask of Nar'sie now. You are a tiny fragment of the unknowable entity that is the god.") - to_chat(new_spirit, "Your job is to help your acolytes complete their goals. Be spooky. Do evil.") - - new_spirit.set_name() - - // let spirits identify cultists - if(ticker.mode) - ticker.mode.add_cult_icon_to_spirit(new_spirit) - - // highlander test - there_can_be_only_one_mask(new_spirit) - - return new_spirit //human -> robot diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index eb54497b69e..ee8f6d96c67 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -24,7 +24,9 @@ /obj/singularity/narsie/large/New() ..() - to_chat(world, "NAR-SIE HAS RISEN") + icon_state = ticker.mode.cultdat.entity_icon_state + name = ticker.mode.cultdat.entity_name + to_chat(world, " [name] HAS RISEN") world << pick(sound('sound/hallucinations/im_here1.ogg'), sound('sound/hallucinations/im_here2.ogg')) var/area/A = get_area(src) @@ -38,7 +40,7 @@ shuttle_master.emergency.request(null, 0.3) // Cannot recall /obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob) - makeNewConstruct(/mob/living/simple_animal/construct/harvester, user, null, 1) + makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, user, null, 1) new /obj/effect/effect/sleep_smoke(user.loc) @@ -121,12 +123,12 @@ /obj/singularity/narsie/proc/acquire(var/mob/food) - to_chat(target, "NAR-SIE HAS LOST INTEREST IN YOU") + to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HAS LOST INTEREST IN YOU") target = food if(ishuman(target)) - to_chat(target, "NAR-SIE HUNGERS FOR YOUR SOUL") + to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HUNGERS FOR YOUR SOUL") else - to_chat(target, "NAR-SIE HAS CHOSEN YOU TO LEAD HIM TO HIS NEXT MEAL") + to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL") //Wizard narsie /obj/singularity/narsie/wizard diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index ef00ea54c61..f5e409a1cb4 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -278,6 +278,7 @@ M.AdjustStuttering(4, bound_lower = 0, bound_upper = 20) M.Dizzy(5) if(iscultist(M) && prob(5)) + M.AdjustCultSlur(5)//5 seems like a good number... M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","Egkau'haom'nai en Chaous","Ho Diak'nos tou Ap'iron","R'ge Na'sie","Diabo us Vo'iscum","Si gn'um Co'nu")) if(current_cycle >= 75 && prob(33)) // 30 units, 150 seconds M.AdjustConfused(3) @@ -359,6 +360,7 @@ M.adjustFireLoss(2) M.adjustOxyLoss(2) M.adjustBruteLoss(2) + M.AdjustCultSlur(10)//CUASE WHY THE HELL NOT ..() /datum/reagent/fuel/unholywater/on_mob_delete(mob/living/M) diff --git a/goon/browserassets/css/browserOutput.css b/goon/browserassets/css/browserOutput.css index 3a4ff4c3770..c5c0e8e93d2 100644 --- a/goon/browserassets/css/browserOutput.css +++ b/goon/browserassets/css/browserOutput.css @@ -322,6 +322,9 @@ h1.alert, h2.alert {color: #000000;} .say_quote {font-family: Georgia, Verdana, sans-serif;} .cult {color: #800080; font-weight: bold; font-style: italic;} .cultspeech {color: #7F0000; font-style: italic;} +.cultitalic {color: #960000; font-style: italic;} +.cultlarge {color: #960000; font-weight: bold; font-size: 3;} +.narsie {color: #960000; font-weight: bold; font-size: 15;} .interface {color: #330033;} .big {font-size: 150%;} .reallybig {font-size: 175%;} diff --git a/icons/effects/96x96.dmi b/icons/effects/96x96.dmi index 4bf7cf5f4ba..4061ac44a96 100644 Binary files a/icons/effects/96x96.dmi and b/icons/effects/96x96.dmi differ diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index 725d97ce21b..95d8f86e425 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/effects/uristrunes.dmi b/icons/effects/uristrunes.dmi index e3d0afa06e5..e9675c48a90 100644 Binary files a/icons/effects/uristrunes.dmi and b/icons/effects/uristrunes.dmi differ diff --git a/icons/mob/actions.dmi b/icons/mob/actions.dmi index 0804b76bc11..fcdd79b3741 100644 Binary files a/icons/mob/actions.dmi and b/icons/mob/actions.dmi differ diff --git a/icons/mob/mob.dmi b/icons/mob/mob.dmi index 491349985d4..fd305492464 100644 Binary files a/icons/mob/mob.dmi and b/icons/mob/mob.dmi differ diff --git a/icons/mob/screen_construct.dmi b/icons/mob/screen_construct.dmi new file mode 100644 index 00000000000..67a37ccd738 Binary files /dev/null and b/icons/mob/screen_construct.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 31be4923470..de27e629ee8 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index e45908cb152..2016309aaff 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/cult.dmi b/icons/obj/cult.dmi index 768d22193c2..6901e1c25a2 100644 Binary files a/icons/obj/cult.dmi and b/icons/obj/cult.dmi differ diff --git a/icons/obj/doors/Doorcultruned.dmi b/icons/obj/doors/Doorcultruned.dmi new file mode 100644 index 00000000000..f9f4aa92466 Binary files /dev/null and b/icons/obj/doors/Doorcultruned.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index d0c6f7591ac..0d503c324e3 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/narsie.dmi b/icons/obj/narsie.dmi index b367734cff5..ac11a2730cb 100644 Binary files a/icons/obj/narsie.dmi and b/icons/obj/narsie.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index 89db9fa1c27..1164d5c5363 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/icons/obj/wizard.dmi b/icons/obj/wizard.dmi index c35817db609..c51a531b2f8 100644 Binary files a/icons/obj/wizard.dmi and b/icons/obj/wizard.dmi differ diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi index 7b67484616a..86a544fa278 100644 Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ diff --git a/icons/turf/walls/cult_wall.dmi b/icons/turf/walls/cult_wall.dmi index 5239f7b1e06..052b3f4f8cd 100644 Binary files a/icons/turf/walls/cult_wall.dmi and b/icons/turf/walls/cult_wall.dmi differ diff --git a/paradise.dme b/paradise.dme index 814d6963c0f..2c8c24688fa 100644 --- a/paradise.dme +++ b/paradise.dme @@ -107,6 +107,7 @@ #include "code\_onclick\hud\alien.dm" #include "code\_onclick\hud\alien_larva.dm" #include "code\_onclick\hud\bot.dm" +#include "code\_onclick\hud\constructs.dm" #include "code\_onclick\hud\fullscreen.dm" #include "code\_onclick\hud\guardian.dm" #include "code\_onclick\hud\hud.dm" @@ -408,7 +409,10 @@ #include "code\game\gamemodes\changeling\powers\tiny_prick.dm" #include "code\game\gamemodes\changeling\powers\transform.dm" #include "code\game\gamemodes\cult\cult.dm" +#include "code\game\gamemodes\cult\cult_comms.dm" +#include "code\game\gamemodes\cult\cult_datums.dm" #include "code\game\gamemodes\cult\cult_items.dm" +#include "code\game\gamemodes\cult\cult_objectives.dm" #include "code\game\gamemodes\cult\cult_structures.dm" #include "code\game\gamemodes\cult\ritual.dm" #include "code\game\gamemodes\cult\runes.dm" @@ -1696,12 +1700,6 @@ #include "code\modules\mob\new_player\poll.dm" #include "code\modules\mob\new_player\preferences_setup.dm" #include "code\modules\mob\new_player\sprite_accessories.dm" -#include "code\modules\mob\spirit\cultnet.dm" -#include "code\modules\mob\spirit\movement.dm" -#include "code\modules\mob\spirit\spirit.dm" -#include "code\modules\mob\spirit\viewpoint.dm" -#include "code\modules\mob\spirit\mask\mask.dm" -#include "code\modules\mob\spirit\mask\respawn.dm" #include "code\modules\nano\nanoexternal.dm" #include "code\modules\nano\nanomanager.dm" #include "code\modules\nano\nanomapgen.dm" diff --git a/sound/effects/altar_break.ogg b/sound/effects/altar_break.ogg new file mode 100644 index 00000000000..72625df1000 Binary files /dev/null and b/sound/effects/altar_break.ogg differ diff --git a/sound/effects/dimensional_rend.ogg b/sound/effects/dimensional_rend.ogg new file mode 100644 index 00000000000..98bd3ef193f Binary files /dev/null and b/sound/effects/dimensional_rend.ogg differ diff --git a/sound/effects/forge_destroy.ogg b/sound/effects/forge_destroy.ogg new file mode 100644 index 00000000000..2b198e83af4 Binary files /dev/null and b/sound/effects/forge_destroy.ogg differ diff --git a/sound/effects/pylon_shatter.ogg b/sound/effects/pylon_shatter.ogg new file mode 100644 index 00000000000..7c5ccb37a15 Binary files /dev/null and b/sound/effects/pylon_shatter.ogg differ diff --git a/sound/effects/wood_break.ogg b/sound/effects/wood_break.ogg new file mode 100644 index 00000000000..e720e3327bc Binary files /dev/null and b/sound/effects/wood_break.ogg differ