Datumizes Cult. (#24379)

* cult 1

* massive data refactor

* progress

* More crap

* IM SCARED IT COMPILES

* oops

* more fixes

* good comment

* hell yeah, team control

* lol

* blamo

* blam

* More stuff

* team refactor

* epic merge fail

* src not _src_

* more

* progress

* cult

* more stuff

* water

* goodbye __IMPLIED_TYPE__

* time to undraft

* FUCK FUCK FUCK

* okay this is better

* goodbye todos

* fix

* order of operations

* last fix? maybe

* yeah

* oops

* okay this should be ALL the fixes

* wow

* hell yeah

* wow

* fixes duplicate teams + adds more team safeties

* how the fuck did this happen

* admin objective improvements

* wah more bullshit

* guh

* fuuuuck

* fucking hell

* fixes
This commit is contained in:
Contrabang
2024-03-16 20:36:55 +00:00
committed by GitHub
parent 0c25bf4a21
commit 2ec55dbfbb
69 changed files with 1328 additions and 1137 deletions
+10 -11
View File
@@ -136,7 +136,7 @@
..()
/datum/action/innate/cult/blood_spell/IsAvailable()
if(!iscultist(owner) || owner.incapacitated() || !charges)
if(!IS_CULTIST(owner) || owner.incapacitated() || !charges)
return FALSE
return ..()
@@ -229,8 +229,7 @@
button_icon_state = "cult_dagger"
/datum/action/innate/cult/blood_spell/dagger/New()
if(SSticker.mode)
button_icon_state = SSticker.cultdat.dagger_icon
button_icon_state = GET_CULT_DATA(dagger_icon, "cult_dagger")
..()
/datum/action/innate/cult/blood_spell/dagger/Activate()
@@ -298,7 +297,7 @@
/obj/effect/proc_holder/horror/InterceptClickOn(mob/living/user, params, atom/target)
if(..())
return
if(ranged_ability_user.incapacitated() || !iscultist(user))
if(ranged_ability_user.incapacitated() || !IS_CULTIST(user))
user.ranged_ability.remove_ranged_ability(user)
return
if(user.holy_check())
@@ -307,7 +306,7 @@
if(!isturf(T))
return FALSE
if(target in view(7, ranged_ability_user))
if(!ishuman(target) || iscultist(target))
if(!ishuman(target) || IS_CULTIST(target))
return
var/mob/living/carbon/human/H = target
H.Hallucinate(120 SECONDS)
@@ -336,7 +335,7 @@
owner.visible_message("<span class='warning'>Thin grey dust falls from [owner]'s hand!</span>", \
"<span class='cultitalic'>You invoke the veiling spell, hiding nearby runes and cult structures.</span>")
charges--
if(!SSticker.mode.cult_risen || !SSticker.mode.cult_ascendant)
if(!SSticker.mode.cult_team.cult_risen || !SSticker.mode.cult_team.cult_ascendant)
playsound(owner, 'sound/magic/smoke.ogg', 25, TRUE, SOUND_RANGE_SET(4)) // If Cult is risen/ascendant.
else
playsound(owner, 'sound/magic/smoke.ogg', 25, TRUE, SOUND_RANGE_SET(1)) // If Cult is unpowered.
@@ -352,7 +351,7 @@
"<span class='cultitalic'>You invoke the counterspell, revealing nearby runes and cult structures.</span>")
charges--
owner.whisper(invocation)
if(!SSticker.mode.cult_risen || !SSticker.mode.cult_ascendant)
if(!SSticker.mode.cult_team.cult_risen || !SSticker.mode.cult_team.cult_ascendant)
playsound(owner, 'sound/misc/enter_blood.ogg', 25, TRUE, SOUND_RANGE_SET(7)) // If Cult is risen/ascendant.
else
playsound(owner, 'sound/magic/smoke.ogg', 25, TRUE, SOUND_RANGE_SET(1)) // If Cult is unpowered.
@@ -429,7 +428,7 @@
afterattack(user, user, TRUE)
/obj/item/melee/blood_magic/attack(mob/living/M, mob/living/carbon/user)
if(!iscarbon(user) || !iscultist(user))
if(!iscarbon(user) || !IS_CULTIST(user))
uses = 0
qdel(src)
return
@@ -462,7 +461,7 @@
if(!isliving(target) || !proximity)
return
var/mob/living/L = target
if(iscultist(target))
if(IS_CULTIST(target))
return
if(user.holy_check())
return
@@ -511,7 +510,7 @@
var/list/teleportnames = list()
var/list/duplicaterunecount = list()
var/atom/movable/teleportee
if(!iscultist(target) || !proximity)
if(!IS_CULTIST(target) || !proximity)
to_chat(user, "<span class='warning'>You can only teleport adjacent cultists with this spell!</span>")
return
if(user != target) // So that the teleport effect shows on the correct mob
@@ -875,7 +874,7 @@
if(!proximity)
return ..()
if(ishuman(target))
if(iscultist(target))
if(IS_CULTIST(target))
heal_cultist(user, target)
target.clean_blood()
else
+8 -12
View File
@@ -5,7 +5,7 @@
buttontooltipstyle = "cult"
/datum/action/innate/cult/IsAvailable()
if(!iscultist(owner))
if(!IS_CULTIST(owner))
return FALSE
return ..()
@@ -55,7 +55,7 @@
living_message = "<span class='cult[(large ? "large" : "speech")]'>[title]: [message]</span>"
for(var/mob/M in GLOB.player_list)
if(iscultist(M))
if(IS_CULTIST(M))
to_chat(M, living_message)
else if((M in GLOB.dead_mob_list) && !isnewplayer(M))
to_chat(M, "<span class='cult[(large ? "large" : "speech")]'>[title] ([ghost_follow_link(user, ghost=M)]): [message]</span>")
@@ -78,7 +78,7 @@
living_message = "<span class='cultlarge'>[title]: [message]</span>"
for(var/mob/M in GLOB.player_list)
if(iscultist(M))
if(IS_CULTIST(M))
to_chat(M, living_message)
else if((M in GLOB.dead_mob_list) && !isnewplayer(M))
to_chat(M, "<span class='cultlarge'>[title] ([ghost_follow_link(user, ghost=M)]): [message]</span>")
@@ -92,20 +92,17 @@
check_flags = AB_CHECK_CONSCIOUS
/datum/action/innate/cult/check_progress/New()
if(SSticker.mode)
button_icon_state = SSticker.cultdat.tome_icon
button_icon_state = GET_CULT_DATA(tome_icon, "tome")
..()
/datum/action/innate/cult/check_progress/IsAvailable()
if(iscultist(owner) || isobserver(owner))
return TRUE
return FALSE
return IS_CULTIST(owner) || isobserver(owner)
/datum/action/innate/cult/check_progress/Activate()
if(!IsAvailable())
return
if(SSticker && SSticker.mode)
SSticker.mode.cult_objs.study(usr, TRUE)
if(SSticker?.mode?.cult_team)
SSticker.mode.cult_team.study_objectives(usr, TRUE)
else
to_chat(usr, "<span class='cultitalic'>You fail to study the Veil. (This should never happen, adminhelp and/or yell at a coder)</span>")
@@ -117,8 +114,7 @@
button_icon_state = "blood_dagger"
/datum/action/innate/cult/use_dagger/Grant()
if(SSticker.mode)
button_icon_state = SSticker.cultdat.dagger_icon
button_icon_state = GET_CULT_DATA(dagger_icon, "blood_dagger")
..()
/datum/action/innate/cult/use_dagger/override_location()
-3
View File
@@ -74,9 +74,6 @@
var/airlock_unruned_icon_file = 'icons/obj/doors/airlocks/cult/unruned/cult.dmi'
var/airlock_unruned_overlays_file = 'icons/obj/doors/airlocks/cult/unruned/cult-overlays.dmi'
/// Are cultist mirror shields active yet?
var/mirror_shields_active = FALSE
/datum/cult_info/fire
name = "Cult of Kha'Rin"
+20 -22
View File
@@ -7,8 +7,7 @@
w_class = WEIGHT_CLASS_SMALL
/obj/item/tome/New()
if(SSticker.mode)
icon_state = SSticker.cultdat.tome_icon
icon_state = GET_CULT_DATA(tome_icon, "tome")
..()
/obj/item/melee/cultblade
@@ -26,9 +25,8 @@
sprite_sheets_inhand = list("Skrell" = 'icons/mob/clothing/species/skrell/held.dmi') // To stop skrell stabbing themselves in the head
/obj/item/melee/cultblade/New()
if(SSticker.mode)
icon_state = SSticker.cultdat.sword_icon
item_state = SSticker.cultdat.sword_icon
icon_state = GET_CULT_DATA(sword_icon, "blood_blade")
item_state = GET_CULT_DATA(sword_icon, "blood_blade")
..()
/obj/item/melee/cultblade/examine(mob/user)
@@ -36,7 +34,7 @@
. += "<span class='notice'>This blade is a powerful weapon, capable of severing limbs easily. Nonbelievers are unable to use this weapon. Striking a nonbeliever after downing them with your cult magic will stun them completely.</span>"
/obj/item/melee/cultblade/attack(mob/living/target, mob/living/carbon/human/user)
if(!iscultist(user))
if(!IS_CULTIST(user))
user.Weaken(10 SECONDS)
user.unEquip(src, 1)
user.visible_message("<span class='warning'>A powerful force shoves [user] away from [target]!</span>",
@@ -47,7 +45,7 @@
else
user.adjustBruteLoss(rand(force/2, force))
return
if(!iscultist(target))
if(!IS_CULTIST(target))
var/datum/status_effect/cult_stun_mark/S = target.has_status_effect(STATUS_EFFECT_CULT_STUN)
if(S)
S.trigger()
@@ -55,7 +53,7 @@
/obj/item/melee/cultblade/pickup(mob/living/user)
. = ..()
if(!iscultist(user))
if(!IS_CULTIST(user))
to_chat(user, "<span class='cultlarge'>\"I wouldn't advise that.\"</span>")
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
user.Confused(20 SECONDS)
@@ -74,13 +72,13 @@
knockdown_duration = 2 SECONDS
/obj/item/restraints/legcuffs/bola/cult/throw_at(atom/target, range, speed, mob/thrower, spin, diagonals_first, datum/callback/callback)
if(thrower && !iscultist(thrower)) // A couple of objs actually proc throw_at, so we need to make sure that yes, we got tossed by a person before trying to send a message
if(thrower && !IS_CULTIST(thrower)) // A couple of objs actually proc throw_at, so we need to make sure that yes, we got tossed by a person before trying to send a message
thrower.visible_message("<span class='danger'>The bola glows, and boomarangs back at [thrower]!</span>")
throw_impact(thrower)
. = ..()
/obj/item/restraints/legcuffs/bola/cult/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscultist(hit_atom))
if(IS_CULTIST(hit_atom))
hit_atom.visible_message("<span class='warning'>[src] bounces off of [hit_atom], as if repelled by an unseen force!</span>")
return
. = ..()
@@ -164,7 +162,7 @@
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/equipped(mob/living/user, slot)
..()
if(!iscultist(user)) // Todo: Make this only happen when actually equipped to the correct slot. (For all cult items)
if(!IS_CULTIST(user)) // Todo: Make this only happen when actually equipped to the correct slot. (For all cult items)
to_chat(user, "<span class='cultlarge'>\"I wouldn't advise that.\"</span>")
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
user.unEquip(src, 1)
@@ -201,7 +199,7 @@
/obj/item/clothing/suit/hooded/cultrobes/flagellant_robe/equipped(mob/living/user, slot)
..()
if(!iscultist(user))
if(!IS_CULTIST(user))
to_chat(user, "<span class='cultlarge'>\"I wouldn't advise that.\"</span>")
to_chat(user, "<span class='warning'>An overwhelming sense of nausea overpowers you!</span>")
user.unEquip(src, 1)
@@ -268,7 +266,7 @@
/obj/item/clothing/glasses/hud/health/night/cultblind/equipped(mob/living/user, slot)
..()
if(!iscultist(user))
if(!IS_CULTIST(user))
to_chat(user, "<span class='cultlarge'>\"You want to be blind, do you?\"</span>")
user.unEquip(src, 1)
user.Confused(60 SECONDS)
@@ -283,7 +281,7 @@
var/global/curselimit = 0
/obj/item/shuttle_curse/attack_self(mob/living/user)
if(!iscultist(user))
if(!IS_CULTIST(user))
user.unEquip(src, 1)
user.Weaken(10 SECONDS)
to_chat(user, "<span class='warning'>A powerful force shoves you away from [src]!</span>")
@@ -334,7 +332,7 @@
if(!uses || !iscarbon(user))
to_chat(user, "<span class='warning'>[src] is dull and unmoving in your hands.</span>")
return
if(!iscultist(user))
if(!IS_CULTIST(user))
user.unEquip(src, TRUE)
step(src, pick(GLOB.alldirs))
to_chat(user, "<span class='warning'>[src] flickers out of your hands, too eager to move!</span>")
@@ -461,11 +459,11 @@
*/
/obj/item/shield/mirror/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
// Incase they get one by some magic
if(!SSticker.cultdat.mirror_shields_active)
if(!SSticker.mode.cult_team.mirror_shields_active)
to_chat(owner, "<span class='warning'>This shield is powerless! You must perform the required sacrifice to empower it!</span>")
return
if(iscultist(owner) && !owner.holy_check()) // Cultist holding the shield
if(IS_CULTIST(owner) && !owner.holy_check()) // Cultist holding the shield
// Hit by a projectile
if(istype(hitby, /obj/item/projectile))
@@ -533,7 +531,7 @@
illusions++
else if(isliving(loc))
var/mob/living/holder = loc
if(iscultist(holder))
if(IS_CULTIST(holder))
to_chat(holder, "<span class='cultitalic'>The shield's illusions are back at full strength!</span>")
else
to_chat(holder, "<span class='warning'>[src] vibrates slightly, and starts glowing.")
@@ -584,7 +582,7 @@
var/turf/T = get_turf(hit_atom)
if(isliving(hit_atom))
var/mob/living/L = hit_atom
if(iscultist(L))
if(IS_CULTIST(L))
playsound(src, 'sound/weapons/throwtap.ogg', 50)
if(!L.restrained() && L.put_in_active_hand(src))
L.visible_message("<span class='warning'>[L] catches [src] out of the air!</span>")
@@ -688,7 +686,7 @@
hitsound = 'sound/effects/splat.ogg'
/obj/item/projectile/magic/arcane_barrage/blood/prehit(atom/target)
if(iscultist(target))
if(IS_CULTIST(target))
damage = 0
nodamage = TRUE
if(ishuman(target))
@@ -720,7 +718,7 @@
/obj/item/portal_amulet/afterattack(atom/O, mob/user, proximity)
. = ..()
if(!iscultist(user))
if(!IS_CULTIST(user))
if(!iscarbon(user))
return
var/mob/living/carbon/M = user
@@ -799,7 +797,7 @@
exit = new /obj/effect/cult_portal_exit(target)
/obj/effect/portal/cult/attackby(obj/I, mob/user, params)
if(istype(I, /obj/item/melee/cultblade/dagger) && iscultist(user) || istype(I, /obj/item/nullrod) && HAS_MIND_TRAIT(user, TRAIT_HOLY))
if(istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user) || istype(I, /obj/item/nullrod) && HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "<span class='notice'>You close the portal with your [I].</span>")
playsound(src, 'sound/magic/magic_missile.ogg', 100, TRUE)
qdel(src)
+14 -362
View File
@@ -1,49 +1,10 @@
/datum/game_mode
/// A list of all minds currently in the cult
var/list/datum/mind/cult = list()
var/datum/cult_objectives/cult_objs = new
/// Does the cult have glowing eyes
var/cult_risen = FALSE
/// Does the cult have halos
var/cult_ascendant = FALSE
/// How many crew need to be converted to rise
var/rise_number
/// How many crew need to be converted to ascend
var/ascend_number
/// Used for the CentComm announcement at ascension
var/ascend_percent
var/datum/team/cult/cult_team
/proc/iscultist(mob/living/M)
return istype(M) && M.mind && SSticker && SSticker.mode && (M.mind in SSticker.mode.cult)
/proc/is_convertable_to_cult(datum/mind/mind)
if(!mind)
return FALSE
if(!mind.current)
return FALSE
if(is_sacrifice_target(mind))
return FALSE
if(iscultist(mind.current))
return TRUE //If they're already in the cult, assume they are convertable
if(HAS_MIND_TRAIT(mind.current, TRAIT_HOLY))
return FALSE
if(ishuman(mind.current))
var/mob/living/carbon/human/H = mind.current
if(ismindshielded(H)) //mindshield protects against conversions unless removed
return FALSE
if(mind.offstation_role)
return FALSE
if(issilicon(mind.current))
return FALSE //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 TRUE //can't convert it unless the owner is converted
if(isgolem(mind.current))
return FALSE
if(isanimal(mind.current))
return FALSE
return TRUE
/datum/game_mode/proc/get_cult_team()
if(!cult_team)
new /datum/team/cult() // assignment happens in create_team()
return cult_team
/datum/game_mode/cult
name = "cult"
@@ -54,6 +15,8 @@
required_enemies = 3
recommended_enemies = 4
var/list/pre_cult = list()
var/const/min_cultists_to_start = 3
var/const/max_cultists_to_start = 4
@@ -71,335 +34,24 @@
break
var/datum/mind/cultist = pick(cultists_possible)
cultists_possible -= cultist
cult += cultist
pre_cult += cultist
cultist.restricted_roles = restricted_jobs
cultist.special_role = SPECIAL_ROLE_CULTIST
return (length(cult) > 0)
return length(pre_cult)
/datum/game_mode/cult/post_setup()
modePlayer += cult
cult_objs.setup()
for(var/datum/mind/cult_mind in cult)
SEND_SOUND(cult_mind.current, sound('sound/ambience/antag/bloodcult.ogg'))
to_chat(cult_mind.current, CULT_GREETING)
equip_cultist(cult_mind.current)
cult_mind.current.faction |= "cult"
cult_mind.add_mind_objective(/datum/objective/servecult)
if(cult_mind.assigned_role == "Clown")
to_chat(cult_mind.current, "<span class='cultitalic'>A dark power has allowed you to overcome your clownish nature, letting you wield weapons without harming yourself.</span>")
cult_mind.current.dna.SetSEState(GLOB.clumsyblock, FALSE)
singlemutcheck(cult_mind.current, GLOB.clumsyblock, MUTCHK_FORCED)
var/datum/action/innate/toggle_clumsy/A = new
A.Grant(cult_mind.current)
update_cult_icons_added(cult_mind)
cult_objs.study(cult_mind.current)
to_chat(cult_mind.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Cultist)</span>")
cult_threshold_check()
addtimer(CALLBACK(src, PROC_REF(cult_threshold_check)), 2 MINUTES) // Check again in 2 minutes for latejoiners
new /datum/team/cult(pre_cult)
..()
/datum/game_mode/proc/equip_cultist(mob/living/carbon/human/H, metal = TRUE)
if(!istype(H))
return
. += cult_give_item(/obj/item/melee/cultblade/dagger, H)
if(metal)
. += cult_give_item(/obj/item/stack/sheet/runed_metal/ten, H)
to_chat(H, "<span class='cult'>These will help you start the cult on this station. Use them well, and remember - you are not the only one.</span>")
/datum/game_mode/proc/cult_give_item(obj/item/item_path, mob/living/carbon/human/H)
var/list/slots = list(
"backpack" = SLOT_HUD_IN_BACKPACK,
"left pocket" = SLOT_HUD_LEFT_STORE,
"right pocket" = SLOT_HUD_RIGHT_STORE)
var/T = new item_path(H)
var/item_name = initial(item_path.name)
var/where = H.equip_in_one_of_slots(T, slots)
if(!where)
to_chat(H, "<span class='userdanger'>Unfortunately, you weren't able to get a [item_name]. This is very bad and you should adminhelp immediately (press F1).</span>")
return FALSE
else
to_chat(H, "<span class='danger'>You have a [item_name] in your [where].</span>")
return TRUE
/datum/game_mode/proc/add_cultist(datum/mind/cult_mind)
if(!istype(cult_mind))
return FALSE
if(!ascend_percent) // If the rise/ascend thresholds haven't been set (non-cult rounds)
cult_objs.setup()
cult_threshold_check()
if(!(cult_mind in cult))
cult += cult_mind
cult_mind.current.faction |= "cult"
cult_mind.special_role = SPECIAL_ROLE_CULTIST
if(cult_mind.assigned_role == "Clown")
to_chat(cult_mind.current, "<span class='cultitalic'>A dark power has allowed you to overcome your clownish nature, letting you wield weapons without harming yourself.</span>")
cult_mind.current.dna.SetSEState(GLOB.clumsyblock, FALSE)
singlemutcheck(cult_mind.current, GLOB.clumsyblock, MUTCHK_FORCED)
var/datum/action/innate/toggle_clumsy/A = new
A.Grant(cult_mind.current)
SEND_SOUND(cult_mind.current, sound('sound/ambience/antag/bloodcult.ogg'))
cult_mind.current.create_attack_log("<span class='danger'>Has been converted to the cult!</span>")
cult_mind.current.create_log(CONVERSION_LOG, "Converted to the cult")
if(jobban_isbanned(cult_mind.current, ROLE_CULTIST) || jobban_isbanned(cult_mind.current, ROLE_SYNDICATE))
replace_jobbanned_player(cult_mind.current, ROLE_CULTIST)
if(!cult_objs.cult_status && ishuman(cult_mind.current))
cult_objs.setup()
update_cult_icons_added(cult_mind)
add_cult_actions(cult_mind)
cult_mind.add_mind_objective(/datum/objective/servecult)
if(cult_risen)
rise(cult_mind.current)
if(cult_ascendant)
ascend(cult_mind.current)
check_cult_size()
cult_objs.study(cult_mind.current)
to_chat(cult_mind.current, "<span class='motd'>For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Cultist)</span>")
RegisterSignal(cult_mind.current, COMSIG_MOB_STATCHANGE, PROC_REF(cultist_stat_change))
RegisterSignal(cult_mind.current, COMSIG_PARENT_QDELETING, PROC_REF(remove_cultist))
return TRUE
/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = TRUE, remove_gear = FALSE, mob/target_mob)
if(!(cult_mind in cult)) // Not actually a cultist in the first place
return
var/mob/cultist = target_mob
if(!cultist)
cultist = cult_mind.current
cult -= cult_mind
cultist.faction -= "cult"
cult_mind.special_role = null
cult_mind.objective_holder.clear(/datum/objective/servecult)
for(var/datum/action/innate/cult/C in cultist.actions)
qdel(C)
update_cult_icons_removed(cult_mind)
if(ishuman(cultist))
var/mob/living/carbon/human/H = cultist
REMOVE_TRAIT(H, CULT_EYES, null)
H.change_eye_color(H.original_eye_color, FALSE)
H.update_eyes()
H.remove_overlay(HALO_LAYER)
H.update_body()
if(remove_gear) // No flagellants robe for non-cultists
for(var/I in H.contents)
if(is_type_in_list(I, CULT_CLOTHING))
H.unEquip(I)
if(cult_mind.assigned_role == "Clown")
to_chat(H, "<span class='sans'>You are free of the dark power suppressing your clownish nature. You are clumsy again! Honk!</span>")
H.dna.SetSEState(GLOB.clumsyblock, TRUE)
singlemutcheck(H, GLOB.clumsyblock, MUTCHK_FORCED)
for(var/datum/action/innate/toggle_clumsy/A in H.actions)
A.Remove(H)
cult_mind.current.create_log(CONVERSION_LOG, "Deconverted from the cult")
check_cult_size()
if(show_message)
cultist.visible_message("<span class='cult'>[cultist] looks like [cultist.p_they()] just reverted to [cultist.p_their()] old faith!</span>",
"<span class='userdanger'>An unfamiliar white light flashes through your mind, cleansing the taint of [SSticker.cultdat ? SSticker.cultdat.entity_title1 : "Nar'Sie"] and the memories of your time as their servant with it.</span>")
UnregisterSignal(cult_mind.current, COMSIG_MOB_STATCHANGE)
UnregisterSignal(cult_mind.current, COMSIG_PARENT_QDELETING)
/datum/game_mode/proc/add_cult_immunity(mob/living/target)
ADD_TRAIT(target, TRAIT_CULT_IMMUNITY, CULT_TRAIT)
addtimer(CALLBACK(src, PROC_REF(remove_cult_immunity), target), 1 MINUTES)
/datum/game_mode/proc/remove_cult_immunity(mob/living/target)
REMOVE_TRAIT(target, TRAIT_CULT_IMMUNITY, CULT_TRAIT)
/**
* Decides at the start of the round how many conversions are needed to rise/ascend.
*
* The number is decided by (Percentage * (Players - Cultists)), so for example at 110 players it would be 11 conversions for rise. (0.1 * (110 - 4))
* These values change based on population because 20 cultists are MUCH more powerful if there's only 50 players, compared to 120.
*
* Below 100 players, [CULT_RISEN_LOW] and [CULT_ASCENDANT_LOW] are used.
* Above 100 players, [CULT_RISEN_HIGH] and [CULT_ASCENDANT_HIGH] are used.
*/
/datum/game_mode/proc/cult_threshold_check()
var/list/living_players = get_living_players(exclude_nonhuman = TRUE, exclude_offstation = TRUE)
var/players = length(living_players)
var/cultists = get_cultists() // Don't count the starting cultists towards the number of needed conversions
if(players >= CULT_POPULATION_THRESHOLD)
// Highpop
ascend_percent = CULT_ASCENDANT_HIGH
rise_number = round(CULT_RISEN_HIGH * (players - cultists))
ascend_number = round(CULT_ASCENDANT_HIGH * (players - cultists))
else
// Lowpop
ascend_percent = CULT_ASCENDANT_LOW
rise_number = round(CULT_RISEN_LOW * (players - cultists))
ascend_number = round(CULT_ASCENDANT_LOW * (players - cultists))
/**
* Returns the current number of cultists and constructs.
*
* Returns the number of cultists and constructs in a list ([1] = Cultists, [2] = Constructs), or as one combined number.
*
* * separate - Should the number be returned as a list with two separate values (Humans and Constructs) or as one number.
*/
/datum/game_mode/proc/get_cultists(separate = FALSE)
var/cultists = 0
var/constructs = 0
for(var/datum/mind/M as anything in cult)
if(QDELETED(M) || M.current?.stat == DEAD)
continue
if(ishuman(M.current) && !M.current.has_status_effect(STATUS_EFFECT_SUMMONEDGHOST))
cultists++
else if(isconstruct(M.current))
constructs++
if(separate)
return list(cultists, constructs)
return cultists + constructs
/datum/game_mode/proc/cultist_stat_change(mob/target_cultist, new_stat, old_stat)
SIGNAL_HANDLER // COMSIG_MOB_STATCHANGE from cultists
if(new_stat == old_stat) // huh, how? whatever, we ignore it
return
if(new_stat != DEAD && old_stat != DEAD)
return // switching between alive and unconcious
// switching between dead and alive/unconcious
check_cult_size()
/datum/game_mode/proc/check_cult_size()
var/cult_players = get_cultists()
if(cult_ascendant)
// The cult only falls if below 1/2 of the rising, usually pretty low. e.g. 5% on highpop, 10% on lowpop
if(cult_players < (rise_number / 2))
cult_fall()
return
if((cult_players >= rise_number) && !cult_risen)
cult_rise()
return
if(cult_players >= ascend_number)
cult_ascend()
/datum/game_mode/proc/cult_rise()
cult_risen = TRUE
for(var/datum/mind/M in cult)
if(!ishuman(M.current))
continue
SEND_SOUND(M.current, sound('sound/hallucinations/i_see_you2.ogg'))
to_chat(M.current, "<span class='cultlarge'>The veil weakens as your cult grows, your eyes begin to glow...</span>")
addtimer(CALLBACK(src, PROC_REF(rise), M.current), 20 SECONDS)
/datum/game_mode/proc/cult_ascend()
cult_ascendant = TRUE
for(var/datum/mind/M in cult)
if(!ishuman(M.current))
continue
SEND_SOUND(M.current, sound('sound/hallucinations/im_here1.ogg'))
to_chat(M.current, "<span class='cultlarge'>Your cult is ascendant and the red harvest approaches - you cannot hide your true nature for much longer!</span>")
addtimer(CALLBACK(src, PROC_REF(ascend), M.current), 20 SECONDS)
GLOB.major_announcement.Announce("Picking up extradimensional activity related to the Cult of [SSticker.cultdat ? SSticker.cultdat.entity_name : "Nar'Sie"] from your station. Data suggests that about [ascend_percent * 100]% of the station has been converted. Security staff are authorized to use lethal force freely against cultists. Non-security staff should be prepared to defend themselves and their work areas from hostile cultists. Self defense permits non-security staff to use lethal force as a last resort, but non-security staff should be defending their work areas, not hunting down cultists. Dead crewmembers must be revived and deconverted once the situation is under control.", "Central Command Higher Dimensional Affairs", 'sound/AI/commandreport.ogg')
/datum/game_mode/proc/cult_fall()
cult_ascendant = FALSE
for(var/datum/mind/M in cult)
if(!ishuman(M.current))
continue
SEND_SOUND(M.current, sound('sound/hallucinations/wail.ogg'))
to_chat(M.current, "<span class='cultlarge'>The veil repairs itself, your power grows weaker...</span>")
addtimer(CALLBACK(src, PROC_REF(descend), M.current), 20 SECONDS)
GLOB.major_announcement.Announce("Paranormal activity has returned to minimal levels. \
Security staff should minimize lethal force against cultists, using non-lethals where possible. \
All dead cultists should be taken to medbay or robotics for immediate revival and deconversion. \
Non-security staff may defend themselves, but should prioritize leaving any areas with cultists and reporting the cultists to security. \
Self defense permits non-security staff to use lethal force as a last resort. Hunting down cultists may make you liable for a manslaughter charge. \
Any access granted in response to the paranormal threat should be reset. \
Any and all security gear that was handed out should be returned. Finally, all weapons (including improvised) should be removed from the crew.",
"Central Command Higher Dimensional Affairs", 'sound/AI/commandreport.ogg')
/datum/game_mode/proc/rise(cultist)
if(!ishuman(cultist) || !iscultist(cultist))
return
var/mob/living/carbon/human/H = cultist
if(!H.original_eye_color)
H.original_eye_color = H.get_eye_color()
H.change_eye_color(BLOODCULT_EYE, FALSE)
H.update_eyes()
ADD_TRAIT(H, CULT_EYES, CULT_TRAIT)
H.update_body()
/datum/game_mode/proc/ascend(cultist)
if(!ishuman(cultist) || !iscultist(cultist))
return
var/mob/living/carbon/human/H = cultist
new /obj/effect/temp_visual/cult/sparks(get_turf(H), H.dir)
H.update_halo_layer()
/datum/game_mode/proc/descend(cultist)
if(!ishuman(cultist) || !iscultist(cultist))
return
var/mob/living/carbon/human/H = cultist
new /obj/effect/temp_visual/cult/sparks(get_turf(H), H.dir)
H.update_halo_layer()
to_chat(cultist, "<span class='userdanger'>The halo above your head shatters!</span>")
playsound(cultist, "shatter", 50, TRUE)
/datum/game_mode/proc/update_cult_icons_added(datum/mind/cult_mind)
var/datum/atom_hud/antag/culthud = GLOB.huds[ANTAG_HUD_CULT]
if(cult_mind.current)
culthud.join_hud(cult_mind.current)
set_antag_hud(cult_mind.current, "hudcultist")
/datum/game_mode/proc/update_cult_icons_removed(datum/mind/cult_mind)
var/datum/atom_hud/antag/culthud = GLOB.huds[ANTAG_HUD_CULT]
if(cult_mind.current)
culthud.leave_hud(cult_mind.current)
set_antag_hud(cult_mind.current, null)
/datum/game_mode/proc/add_cult_actions(datum/mind/cult_mind)
if(cult_mind.current)
var/datum/action/innate/cult/comm/C = new
var/datum/action/innate/cult/check_progress/D = new
C.Grant(cult_mind.current)
D.Grant(cult_mind.current)
if(ishuman(cult_mind.current))
var/datum/action/innate/cult/blood_magic/magic = new
magic.Grant(cult_mind.current)
var/datum/action/innate/cult/use_dagger/dagger = new
dagger.Grant(cult_mind.current)
cult_mind.current.update_action_buttons(TRUE)
/datum/game_mode/cult/declare_completion()
if(cult_objs.cult_status == NARSIE_HAS_RISEN)
if(cult_team.sacrifices_required == NARSIE_HAS_RISEN)
SSticker.mode_result = "cult win - cult win"
to_chat(world, "<span class='danger'> <FONT size = 3>The cult wins! It has succeeded in summoning [SSticker.cultdat.entity_name]!</FONT></span>")
else if(cult_objs.cult_status == NARSIE_HAS_FALLEN)
to_chat(world, "<span class='danger'> <FONT size = 3>The cult wins! It has succeeded in summoning [GET_CULT_DATA(entity_name, "their god")]!</FONT></span>")
else if(cult_team.sacrifices_required == NARSIE_HAS_FALLEN)
SSticker.mode_result = "cult draw - narsie died, nobody wins"
to_chat(world, "<span class='danger'> <FONT size = 3>Nobody wins! [SSticker.cultdat.entity_name] was summoned, but banished!</FONT></span>")
to_chat(world, "<span class='danger'> <FONT size = 3>Nobody wins! [GET_CULT_DATA(entity_name, "the cult god")] was summoned, but banished!</FONT></span>")
else
SSticker.mode_result = "cult loss - staff stopped the cult"
to_chat(world, "<span class='warning'> <FONT size = 3>The staff managed to stop the cult!</FONT></span>")
var/list/endtext = list()
endtext += "<br><b>The cultists' objectives were:</b>"
for(var/datum/objective/obj in cult_objs.presummon_objs)
endtext += "<br>[obj.explanation_text] - "
if(!obj.check_completion())
endtext += "<font color='red'>Fail.</font>"
else
endtext += "<font color='green'><B>Success!</B></font>"
if(cult_objs.cult_status >= NARSIE_NEEDS_SUMMONING)
endtext += "<br>[cult_objs.obj_summon.explanation_text] - "
if(!cult_objs.obj_summon.check_completion())
endtext+= "<font color='red'>Fail.</font>"
else
endtext += "<font color='green'><B>Success!</B></font>"
to_chat(world, endtext.Join(""))
..()
+40 -136
View File
@@ -1,123 +1,4 @@
/// Replace with team antag datum objectives from tg once ported
/datum/cult_objectives
var/cult_status = NARSIE_IS_ASLEEP
var/list/presummon_objs = list()
var/datum/objective/eldergod/obj_summon = new
var/sacrifices_done = 0
var/sacrifices_required = 2
/datum/cult_objectives/proc/setup()
if(cult_status != NARSIE_IS_ASLEEP)
return FALSE
cult_status = NARSIE_DEMANDS_SACRIFICE
var/datum/objective/sacrifice/obj_sac = new
if(obj_sac.find_target())
presummon_objs.Add(obj_sac)
else
ready_to_summon()
/datum/cult_objectives/proc/study(mob/living/M, display_members = FALSE) //Called by cultists/cult constructs checking their objectives
if(!M)
return FALSE
switch(cult_status)
if(NARSIE_IS_ASLEEP)
to_chat(M, "<span class='cult'>[SSticker.cultdat ? SSticker.cultdat.entity_name : "The Dark One"] is asleep.</span>")
if(NARSIE_DEMANDS_SACRIFICE)
if(!length(presummon_objs))
to_chat(M, "<span class='danger'>Error: No objectives in sacrifice list. Something went wrong. Oof.</span>")
else
var/datum/objective/sacrifice/current_obj = presummon_objs[length(presummon_objs)] //get the last obj in the list, ie the current one
to_chat(M, "<span class='cult'>The Veil needs to be weakened before we are able to summon [SSticker.cultdat ? SSticker.cultdat.entity_title1 : "The Dark One"].</span>")
to_chat(M, "<span class='cult'>Current goal: [current_obj.explanation_text]</span>")
if(NARSIE_NEEDS_SUMMONING)
to_chat(M, "<span class='cult'>The Veil is weak! We can summon [SSticker.cultdat ? SSticker.cultdat.entity_title3 : "The Dark One"]!</span>")
to_chat(M, "<span class='cult'>Current goal: [obj_summon.explanation_text]</span>")
if(NARSIE_HAS_RISEN)
to_chat(M, "<span class='cultlarge'>\"I am here.\"</span>")
to_chat(M, "<span class='cult'>Current goal:</span> <span class='cultlarge'>\"Feed me.\"</span>")
if(NARSIE_HAS_FALLEN)
to_chat(M, "<span class='cultlarge'>[SSticker.cultdat ? SSticker.cultdat.entity_name : "The Dark One"] has been banished!</span>")
to_chat(M, "<span class='cult'>Current goal: Slaughter the unbelievers!</span>")
else
to_chat(M, "<span class='danger'>Error: Cult objective status currently unknown. Something went wrong. Oof.</span>")
if(display_members)
var/list/cult = SSticker.mode.get_cultists(TRUE)
var/total_cult = cult[1] + cult[2]
var/rise = SSticker.mode.rise_number - total_cult
var/ascend = SSticker.mode.ascend_number - total_cult
var/overview = "<span class='cultitalic'><br><b>Current cult members: [total_cult]"
if(!SSticker.mode.cult_ascendant)
if(rise > 0)
overview += " | Conversions until Rise: [rise]"
else if(ascend > 0)
overview += " | Conversions until Ascension: [ascend]"
to_chat(M, "[overview]</b></span>")
if(cult[2]) // If there are any constructs, separate them out
to_chat(M, "<span class='cultitalic'><b>Cultists:</b> [cult[1]]")
to_chat(M, "<span class='cultitalic'><b>Constructs:</b> [cult[2]]")
/datum/cult_objectives/proc/current_sac_objective() //Return the current sacrifice objective datum, if any
if(cult_status == NARSIE_DEMANDS_SACRIFICE && length(presummon_objs))
var/datum/objective/sacrifice/current_obj = presummon_objs[length(presummon_objs)]
return current_obj
return FALSE
/datum/cult_objectives/proc/is_sac_target(datum/mind/mind)
if(cult_status != NARSIE_DEMANDS_SACRIFICE || !length(presummon_objs))
return FALSE
var/datum/objective/sacrifice/current_obj = presummon_objs[length(presummon_objs)]
if(current_obj.target == mind)
return TRUE
return FALSE
/datum/cult_objectives/proc/find_new_sacrifice_target(datum/mind/mind)
var/datum/objective/sacrifice/current_obj = presummon_objs[length(presummon_objs)]
if(current_obj.find_target())
for(var/datum/mind/cult_mind in SSticker.mode.cult)
if(cult_mind && cult_mind.current)
to_chat(cult_mind.current, "<span class='danger'>[SSticker.cultdat.entity_name]</span> murmurs, <span class='cultlarge'>Our goal is beyond your reach. Sacrifice [current_obj.target] instead...</span>")
return TRUE
return FALSE
/datum/cult_objectives/proc/succesful_sacrifice()
var/datum/objective/sacrifice/current_obj = presummon_objs[length(presummon_objs)]
current_obj.sacced = TRUE
sacrifices_done++
if(sacrifices_done >= sacrifices_required)
ready_to_summon()
else
var/datum/objective/sacrifice/obj_sac = new
if(obj_sac.find_target())
presummon_objs += obj_sac
for(var/datum/mind/cult_mind in SSticker.mode.cult)
if(cult_mind && cult_mind.current)
to_chat(cult_mind.current, "<span class='cult'>You and your acolytes have made progress, but there is more to do still before [SSticker.cultdat ? SSticker.cultdat.entity_title1 : "The Dark One"] can be summoned!</span>")
to_chat(cult_mind.current, "<span class='cult'>Current goal: [obj_sac.explanation_text]</span>")
else
ready_to_summon()
/datum/cult_objectives/proc/ready_to_summon()
cult_status = NARSIE_NEEDS_SUMMONING
for(var/datum/mind/cult_mind in SSticker.mode.cult)
if(cult_mind && cult_mind.current)
to_chat(cult_mind.current, "<span class='cult'>You and your acolytes have succeeded in preparing the station for the ultimate ritual!</span>")
to_chat(cult_mind.current, "<span class='cult'>Current goal: [obj_summon.explanation_text]</span>")
/datum/cult_objectives/proc/succesful_summon()
cult_status = NARSIE_HAS_RISEN
obj_summon.summoned = TRUE
/datum/cult_objectives/proc/narsie_death()
cult_status = NARSIE_HAS_FALLEN
obj_summon.killed = TRUE
//Objectives
// Objectives
/// Given to cultists on conversion/roundstart
/datum/objective/servecult
explanation_text = "Assist your fellow cultists and Tear the Veil! (Use the Study Veil action to check your progress.)"
@@ -131,26 +12,49 @@
/datum/objective/sacrifice/check_completion()
return sacced || completed
/datum/objective/sacrifice/find_target()
var/list/target_candidates = list()
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(is_admin_level(H.z)) //We can't sacrifice people that are on the centcom z-level
/datum/objective/sacrifice/find_target(list/target_blacklist)
. = ..()
if(target && !(target in target_blacklist)) // check the blacklist, it wont update otherwise
return
//There are no living unconvertables on the station. Looking for a Sacrifice Target among the convertable minds
var/list/possible_targets = list()
for(var/datum/mind/possible_target in SSticker.minds)
if(possible_target in target_blacklist)
continue
if(H.mind && !iscultist(H) && !is_convertable_to_cult(H.mind) && (H.stat != DEAD) && !H.mind.offstation_role)
target_candidates += H.mind
if(!length(target_candidates)) //There are no living unconvertables on the station. Looking for a Sacrifice Target among the ordinary crewmembers
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(is_admin_level(H.z)) //We can't sacrifice people that are on the centcom z-level
continue
if(H.mind && !iscultist(H) && (H.stat != DEAD) && !H.mind.offstation_role) // Same checks, but add them even if they could be converted
target_candidates += H.mind
if(length(target_candidates))
target = pick(target_candidates)
explanation_text = "Sacrifice [target], the [target.assigned_role] via invoking an Offer rune with [target.p_their()] body or brain on it and three acolytes around it."
var/mind_result = is_invalid_target(possible_target)
if(mind_result && mind_result != TARGET_INVALID_CULT_CONVERTABLE)
continue
possible_targets += possible_target
if(length(possible_targets))
target = pick(possible_targets)
update_explanation_text()
return TRUE
message_admins("Cult Sacrifice: Could not find unconvertible or convertible target. Nar'Sie summoning unlocked!")
return FALSE
/datum/objective/sacrifice/is_invalid_target(datum/mind/possible_target)
. = ..()
if(.)
return
if(possible_target.has_antag_datum(/datum/antagonist/cultist))
return TARGET_INVALID_CULTIST
if(!SSticker.mode.cult_team)
stack_trace("/datum/objective/sacrifice/is_invalid_target was called without there being an assigned cult team")
return
if(SSticker.mode.cult_team.is_convertable_to_cult(possible_target))
return TARGET_INVALID_CULT_CONVERTABLE
/datum/objective/sacrifice/update_explanation_text()
if(target?.current)
explanation_text = "Sacrifice [target], the [target.assigned_role] via invoking an Offer rune with [target.p_their()] body or brain on it and three acolytes around it."
else
// Code will reach here as part of find_target, but people should never be able to READ it.
explanation_text = "If you're reading this, something went very wrong. Contact an admin."
/datum/objective/eldergod
needs_target = FALSE
@@ -183,7 +87,7 @@
if(valid_spot)
summon_spots += summon
sanity++
explanation_text = "Summon [SSticker.cultdat ? SSticker.cultdat.entity_name : "your god"] by invoking the rune 'Tear Veil' with 9 cultists, constructs, or summoned ghosts on it.\
explanation_text = "Summon [GET_CULT_DATA(entity_name, "your god")] by invoking the rune 'Tear Veil' with 9 cultists, constructs, or summoned ghosts on it.\
\nThe summoning can only be accomplished in [english_list(summon_spots)] - where the veil is weak enough for the ritual to begin."
+11 -11
View File
@@ -48,25 +48,25 @@
/obj/structure/cult/functional/examine(mob/user)
. = ..()
if(iscultist(user) && cooldowntime > world.time)
if(IS_CULTIST(user) && cooldowntime > world.time)
. += "<span class='cultitalic'>The magic in [src] is weak, it will be ready to use again in [get_ETA()].</span>"
. += "<span class='notice'>[src] is [anchored ? "":"not "]secured to the floor.</span>"
/obj/structure/cult/functional/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/melee/cultblade/dagger) && iscultist(user))
if(istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user))
if(user.holy_check())
return
anchored = !anchored
to_chat(user, "<span class='notice'>You [anchored ? "":"un"]secure [src] [anchored ? "to":"from"] the floor.</span>")
if(!anchored)
icon_state = SSticker.cultdat?.get_icon("[initial(icon_state)]_off")
icon_state = GET_CULT_DATA(get_icon("[initial(icon_state)]_off"), "[initial(icon_state)]_off")
else
icon_state = SSticker.cultdat?.get_icon("[initial(icon_state)]")
icon_state = GET_CULT_DATA(get_icon(initial(icon_state)), initial(icon_state))
return
return ..()
/obj/structure/cult/functional/attack_hand(mob/living/user)
if(!iscultist(user))
if(!IS_CULTIST(user))
to_chat(user, "[heathen_message]")
return
if(invisibility)
@@ -150,7 +150,7 @@
/obj/structure/cult/functional/altar/Initialize(mapload)
. = ..()
icon_state = SSticker.cultdat?.altar_icon_state
icon_state = GET_CULT_DATA(altar_icon_state, "altar")
cooldowntime = world.time + CULT_STRUCTURE_COOLDOWN
/obj/structure/cult/functional/forge
@@ -170,7 +170,7 @@
/obj/structure/cult/functional/forge/get_choosable_items()
. = ..()
if(SSticker.cultdat.mirror_shields_active)
if(SSticker.mode.cult_team.mirror_shields_active)
// Both lines here are needed. If you do it without, youll get issues.
. += "Mirror Shield"
.["Mirror Shield"] = /obj/item/shield/mirror
@@ -178,7 +178,7 @@
/obj/structure/cult/functional/forge/Initialize(mapload)
. = ..()
icon_state = SSticker.cultdat?.forge_icon_state
icon_state = GET_CULT_DATA(forge_icon_state, "forge")
/obj/structure/cult/functional/forge/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/grab))
@@ -236,7 +236,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list(
/obj/structure/cult/functional/pylon/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)
icon_state = SSticker.cultdat?.pylon_icon_state
icon_state = GET_CULT_DATA(pylon_icon_state, "pylon")
/obj/structure/cult/functional/pylon/attack_hand(mob/living/user)//override as it should not create anything
return
@@ -260,7 +260,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list(
if(last_heal <= world.time)
last_heal = world.time + heal_delay
for(var/mob/living/L in range(5, src))
if(iscultist(L) || iswizard(L) || isshade(L) || isconstruct(L))
if(IS_CULTIST(L) || iswizard(L) || isshade(L) || isconstruct(L))
if(L.health != L.maxHealth)
new /obj/effect/temp_visual/heal(get_turf(src), COLOR_HEALING_GREEN)
@@ -322,7 +322,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list(
/obj/structure/cult/functional/archives/Initialize(mapload)
. = ..()
icon_state = SSticker.cultdat?.archives_icon_state
icon_state = GET_CULT_DATA(archives_icon_state, "archives")
/obj/effect/gateway
name = "gateway"
+16 -17
View File
@@ -22,19 +22,18 @@
/obj/item/melee/cultblade/dagger/New()
..()
if(SSticker.mode)
icon_state = SSticker.cultdat.dagger_icon
item_state = SSticker.cultdat.dagger_icon
icon_state = GET_CULT_DATA(dagger_icon, "blood_dagger")
item_state = GET_CULT_DATA(dagger_icon, "blood_dagger")
/obj/item/melee/cultblade/dagger/examine(mob/user)
. = ..()
if(iscultist(user) || user.stat == DEAD)
. += "<span class='cult'>A dagger gifted by [SSticker.cultdat.entity_title3]. Allows the scribing of runes and access to the knowledge archives of the cult of [SSticker.cultdat.entity_name].</span>"
if(IS_CULTIST(user) || user.stat == DEAD)
. += "<span class='cult'>A dagger gifted by [GET_CULT_DATA(entity_title3, "your god")]. Allows the scribing of runes and access to the knowledge archives of the cult of [GET_CULT_DATA(entity_name, "your god")].</span>"
. += "<span class='cultitalic'>Striking another cultist with it will purge holy water from them.</span>"
. += "<span class='cultitalic'>Striking a noncultist will tear their flesh, additionally, if you recently downed them with cult magic it will stun them completely.</span>"
/obj/item/melee/cultblade/dagger/attack(mob/living/M, mob/living/user)
if(iscultist(M))
if(IS_CULTIST(M))
if(M.reagents && M.reagents.has_reagent("holywater")) //allows cultists to be rescued from the clutches of ordained religion
if(M == user) // Targeting yourself
to_chat(user, "<span class='warning'>You can't remove holy water from yourself!</span>")
@@ -51,7 +50,7 @@
. = ..()
/obj/item/melee/cultblade/dagger/attack_self(mob/user)
if(!iscultist(user))
if(!IS_CULTIST(user))
to_chat(user, "<span class='warning'>[src] is covered in unintelligible shapes and markings.</span>")
return
scribe_rune(user)
@@ -59,26 +58,26 @@
/obj/item/melee/cultblade/dagger/proc/narsie_rune_check(mob/living/user, area/A)
var/datum/game_mode/gamemode = SSticker.mode
if(gamemode.cult_objs.cult_status < NARSIE_NEEDS_SUMMONING)
to_chat(user, "<span class='cultitalic'><b>[SSticker.cultdat.entity_name]</b> is not ready to be summoned yet!</span>")
if(gamemode.cult_team.cult_status < NARSIE_NEEDS_SUMMONING)
to_chat(user, "<span class='cultitalic'><b>[GET_CULT_DATA(entity_name, "Your god")]</b> is not ready to be summoned yet!</span>")
return FALSE
if(gamemode.cult_objs.cult_status == NARSIE_HAS_RISEN)
if(gamemode.cult_team.cult_status == NARSIE_HAS_RISEN)
to_chat(user, "<span class='cultlarge'>\"I am already here. There is no need to try to summon me now.\"</span>")
return FALSE
var/list/summon_areas = gamemode.cult_objs.obj_summon.summon_spots
var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots
if(!(A in summon_areas))
to_chat(user, "<span class='cultlarge'>[SSticker.cultdat.entity_name] can only be summoned where the veil is weak - in [english_list(summon_areas)]!</span>")
to_chat(user, "<span class='cultlarge'>[GET_CULT_DATA(entity_name, "Your god")] can only be summoned where the veil is weak - in [english_list(summon_areas)]!</span>")
return FALSE
var/confirm_final = tgui_alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence AND your location!",
"Are you prepared for the final battle?", list("My life for [SSticker.cultdat.entity_name]!", "No"))
"Are you prepared for the final battle?", list("My life for [GET_CULT_DATA(entity_name, "the cult")]!", "No"))
if(user)
if(confirm_final == "No" || confirm_final == null)
to_chat(user, "<span class='cultitalic'><b>You decide to prepare further before scribing the rune.</b></span>")
return FALSE
else
if(locate(/obj/effect/rune) in range(1, user))
to_chat(user, "<span class='cultlarge'>You need a space cleared of runes before you can summon [SSticker.cultdat.entity_title1]!</span>")
to_chat(user, "<span class='cultlarge'>You need a space cleared of runes before you can summon [GET_CULT_DATA(entity_title1, "your god")]!</span>")
return FALSE
else
return TRUE
@@ -150,7 +149,7 @@
if(narsie_rune)
if(!narsie_rune_check(user, A))
return // don't do shit
var/list/summon_areas = gamemode.cult_objs.obj_summon.summon_spots
var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots
if(!(A in summon_areas)) // Check again to make sure they didn't move
to_chat(user, "<span class='cultlarge'>The ritual can only begin where the veil is weak - in [english_list(summon_areas)]!</span>")
return
@@ -170,7 +169,7 @@
else
others_message = "<span class='biggerdanger'>[user] cuts [user.p_their()] body and begins writing something particularly ominous in [user.p_their()] own blood!</span>"
user.visible_message(others_message,
"<span class='cultitalic'>You slice open your body and begin drawing a sigil of [SSticker.cultdat.entity_title3].</span>")
"<span class='cultitalic'>You slice open your body and begin drawing a sigil of [GET_CULT_DATA(entity_title3, "your god")].</span>")
drawing_rune = TRUE // Only one at a time
var/scribe_successful = do_after(user, initial(rune.scribe_delay) * scribe_multiplier, target = runeturf)
@@ -184,7 +183,7 @@
return
user.visible_message("<span class='warning'>[user] creates a strange circle in [user.p_their()] own blood.</span>",
"<span class='cultitalic'>You finish drawing the arcane markings of [SSticker.cultdat.entity_title3].</span>")
"<span class='cultitalic'>You finish drawing the arcane markings of [GET_CULT_DATA(entity_title3, "your god")].</span>")
var/obj/effect/rune/R = new rune(runeturf, keyword)
if(narsie_rune)
+73 -88
View File
@@ -68,7 +68,7 @@ To draw a rune, use a ritual dagger.
/obj/effect/rune/examine(mob/user)
. = ..()
if(iscultist(user) || user.stat == DEAD) //If they're a cultist or a ghost, tell them the effects
if(IS_CULTIST(user) || isobserver(user)) //If they're a cultist or a ghost, tell them the effects
. += "<b>Name:</b> [cultist_name]"
. += "<b>Effects:</b> [capitalize(cultist_desc)]"
. += "<b>Required Acolytes:</b> [req_cultists]"
@@ -76,7 +76,7 @@ To draw a rune, use a ritual dagger.
. += "<b>Keyword:</b> <span class='cultitalic'>[keyword]</span>"
/obj/effect/rune/attackby(obj/I, mob/user, params)
if(istype(I, /obj/item/melee/cultblade/dagger) && iscultist(user))
if(istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user))
// Telerunes with portals open
if(istype(src, /obj/effect/rune/teleport))
var/obj/effect/rune/teleport/T = src // Can't erase telerunes if they have a portal open
@@ -92,7 +92,7 @@ To draw a rune, use a ritual dagger.
qdel(src)
return
if(istype(I, /obj/item/nullrod))
if(iscultist(user))//cultist..what are doing..cultist..staph...
if(IS_CULTIST(user))//cultist..what are doing..cultist..staph...
user.drop_item()
user.visible_message("<span class='warning'>[I] suddenly glows with a white light, forcing [user] to drop it in pain!</span>", \
"<span class='danger'>[I] suddenly glows with a white light that sears your hand, forcing you to drop it!</span>") // TODO: Make this actually burn your hand
@@ -104,7 +104,7 @@ To draw a rune, use a ritual dagger.
/obj/effect/rune/attack_hand(mob/living/user)
user.Move_Pulled(src) // So that you can still drag things onto runes
if(!iscultist(user))
if(!IS_CULTIST(user))
to_chat(user, "<span class='warning'>You aren't able to understand the words of [src].</span>")
return
var/list/invokers = can_invoke(user)
@@ -115,7 +115,7 @@ To draw a rune, use a ritual dagger.
/obj/effect/rune/attack_animal(mob/living/simple_animal/M)
if(isshade(M) || isconstruct(M))
if(construct_invoke || !iscultist(M)) //if you're not a cult construct we want the normal fail message
if(construct_invoke || !IS_CULTIST(M)) //if you're not a cult construct we want the normal fail message
attack_hand(M)
else
to_chat(M, "<span class='warning'>You are unable to invoke the rune!</span>")
@@ -164,7 +164,7 @@ structure_check() searches for nearby cultist structures required for the invoca
// Get anyone nearby
if(req_cultists > 1 || allow_excess_invokers)
for(var/mob/living/L in range(1, src))
if(iscultist(L))
if(IS_CULTIST(L))
if(L == user)
continue
if(L.stat)
@@ -202,7 +202,7 @@ structure_check() searches for nearby cultist structures required for the invoca
L.apply_damage(invoke_damage, BRUTE)
to_chat(L, "<span class='cultitalic'>[src] saps your strength!</span>")
do_invoke_glow()
SSblackbox.record_feedback("nested tally", "runes_invoked", 1, list("[initial(cultist_name)]", "[length(SSticker.mode.cult)]")) // the name of the rune, and the number of cultists in the cult when it was invoked
SSblackbox.record_feedback("nested tally", "runes_invoked", 1, list("[initial(cultist_name)]", "[length(SSticker.mode.cult_team.members)]")) // the name of the rune, and the number of cultists in the cult when it was invoked
if(ghost_invokers)
SSblackbox.record_feedback("nested tally", "runes_invoked_with_ghost", 1, list("[initial(cultist_name)]", "[ghost_invokers]")) //the name of the rune and the number of ghosts used to invoke it.
@@ -214,7 +214,7 @@ structure_check() searches for nearby cultist structures required for the invoca
* * location - Location to teleport from
* * target - Location to teleport to
*/
/obj/effect/rune/proc/teleport_effect(mob/living/user, turf/location, target)
/obj/effect/rune/proc/teleport_effect(mob/living/user, turf/location, turf/target)
new /obj/effect/temp_visual/dir_setting/cult/phase/out(location, user.dir)
new /obj/effect/temp_visual/dir_setting/cult/phase(target, user.dir)
// So that the mob only appears after the effect is finished
@@ -236,15 +236,6 @@ structure_check() searches for nearby cultist structures required for the invoca
animate(src, color = rgb(255, 0, 0), time = 0)
animate(src, color = rune_blood_color, time = 5)
/obj/effect/rune/proc/check_icon()
if(!SSticker.mode)//work around for maps with runes and cultdat is not loaded all the way
var/bits = make_bit_triplet()
icon = get_rune(bits)
else
icon = get_rune_cult(invocation)
//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"
@@ -256,7 +247,7 @@ structure_check() searches for nearby cultist structures required for the invoca
..()
for(var/M in invokers)
var/mob/living/L = M
to_chat(L, "<span class='cultitalic'><b>You feel your life force draining. [SSticker.cultdat.entity_title3] is displeased.</b></span>")
to_chat(L, "<span class='cultitalic'><b>You feel your life force draining. [GET_CULT_DATA(entity_title3, "Your god")] is displeased.</b></span>")
qdel(src)
/mob/proc/null_rod_check() //The null rod, if equipped, will protect the holder from the effects of most runes
@@ -282,7 +273,7 @@ structure_check() searches for nearby cultist structures required for the invoca
var/list/offer_targets = list()
var/turf/T = get_turf(src)
for(var/mob/living/M in T)
if(!iscultist(M) || (M.mind && is_sacrifice_target(M.mind)))
if(!IS_CULTIST(M) || (M.mind && IS_SACRIFICE_TARGET(M.mind)))
if(isconstruct(M)) // No offering constructs please
continue
offer_targets += M
@@ -300,7 +291,7 @@ structure_check() searches for nearby cultist structures required for the invoca
var/obj/item/organ/internal/brain/brain = O
b_mob = brain.brainmob
if(b_mob && b_mob.mind && (!iscultist(b_mob) || is_sacrifice_target(b_mob.mind)))
if(b_mob && b_mob.mind && (!IS_CULTIST(b_mob) || IS_SACRIFICE_TARGET(b_mob.mind)))
offer_targets += b_mob
if(!length(offer_targets))
@@ -318,7 +309,7 @@ structure_check() searches for nearby cultist structures required for the invoca
rune_in_use = FALSE
return
if(L.stat != DEAD && is_convertable_to_cult(L.mind))
if(L.stat != DEAD && SSticker.mode.cult_team.is_convertable_to_cult(L.mind))
..()
do_convert(L, invokers)
else
@@ -333,50 +324,49 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/I in invokers)
to_chat(I, "<span class='warning'>You need at least two invokers to convert!</span>")
return
else
convertee.visible_message("<span class='warning'>[convertee] writhes in pain as the markings below them glow a bloody red!</span>", \
"<span class='cultlarge'><i>AAAAAAAAAAAAAA-</i></span>")
SSticker.mode.add_cultist(convertee.mind)
convertee.mind.special_role = "Cultist"
to_chat(convertee, "<span class='cultitalic'><b>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 \
convertee.visible_message("<span class='warning'>[convertee] writhes in pain as the markings below them glow a bloody red!</span>", \
"<span class='cultlarge'><i>AAAAAAAAAAAAAA-</i></span>")
convertee.mind.add_antag_datum(/datum/antagonist/cultist)
to_chat(convertee, "<span class='cultitalic'><b>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.</b></span>")
to_chat(convertee, "<span class='cultitalic'><b>Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [SSticker.cultdat.entity_title3] above all else. Bring it back.\
to_chat(convertee, "<span class='cultitalic'><b>Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [GET_CULT_DATA(entity_title3, "your god")] above all else. Bring it back.\
</b></span>")
if(ishuman(convertee))
var/mob/living/carbon/human/H = convertee
var/brutedamage = convertee.getBruteLoss()
var/burndamage = convertee.getFireLoss()
if(brutedamage || burndamage) // If the convertee is injured
// Heal 90% of all damage, including robotic limbs
H.adjustBruteLoss(-(brutedamage * 0.9), robotic = TRUE)
H.adjustFireLoss(-(burndamage * 0.9), robotic = TRUE)
if(ismachineperson(H))
H.visible_message("<span class='warning'>A dark force repairs [convertee]!</span>",
"<span class='cultitalic'>Your damage has been repaired. Now spread the blood to others.</span>")
else
H.visible_message("<span class='warning'>[convertee]'s wounds heal and close!</span>",
"<span class='cultitalic'>Your wounds have been healed. Now spread the blood to others.</span>")
for(var/obj/item/organ/external/E in H.bodyparts)
E.mend_fracture()
E.fix_internal_bleeding()
E.fix_burn_wound()
for(var/datum/disease/critical/crit in H.viruses) // cure all crit conditions
crit.cure()
H.uncuff()
H.Silence(6 SECONDS) //Prevent "HALP MAINT CULT" before you realise you're converted
var/obj/item/melee/cultblade/dagger/D = new(get_turf(src))
if(H.equip_to_slot_if_possible(D, SLOT_HUD_IN_BACKPACK, FALSE, TRUE))
to_chat(H, "<span class='cultlarge'>You have a dagger in your backpack. Use it to do [SSticker.cultdat.entity_title1]'s bidding.</span>")
if(ishuman(convertee))
var/mob/living/carbon/human/H = convertee
var/brutedamage = convertee.getBruteLoss()
var/burndamage = convertee.getFireLoss()
if(brutedamage || burndamage) // If the convertee is injured
// Heal 90% of all damage, including robotic limbs
H.adjustBruteLoss(-(brutedamage * 0.9), robotic = TRUE)
H.adjustFireLoss(-(burndamage * 0.9), robotic = TRUE)
if(ismachineperson(H))
H.visible_message("<span class='warning'>A dark force repairs [convertee]!</span>",
"<span class='cultitalic'>Your damage has been repaired. Now spread the blood to others.</span>")
else
to_chat(H, "<span class='cultlarge'>There is a dagger on the floor. Use it to do [SSticker.cultdat.entity_title1]'s bidding.</span>")
H.visible_message("<span class='warning'>[convertee]'s wounds heal and close!</span>",
"<span class='cultitalic'>Your wounds have been healed. Now spread the blood to others.</span>")
for(var/obj/item/organ/external/E in H.bodyparts)
E.mend_fracture()
E.fix_internal_bleeding()
E.fix_burn_wound()
for(var/datum/disease/critical/crit in H.viruses) // cure all crit conditions
crit.cure()
H.uncuff()
H.Silence(6 SECONDS) //Prevent "HALP MAINT CULT" before you realise you're converted
var/obj/item/melee/cultblade/dagger/D = new(get_turf(src))
if(H.equip_to_slot_if_possible(D, SLOT_HUD_IN_BACKPACK, FALSE, TRUE))
to_chat(H, "<span class='cultlarge'>You have a dagger in your backpack. Use it to do [GET_CULT_DATA(entity_title1, "your god")]'s bidding.</span>")
else
to_chat(H, "<span class='cultlarge'>There is a dagger on the floor. Use it to do [GET_CULT_DATA(entity_title1, "your god")]'s bidding.</span>")
/obj/effect/rune/convert/proc/do_sacrifice(mob/living/offering, list/invokers)
var/mob/living/user = invokers[1] //the first invoker is always the user
if(offering.stat != DEAD || (offering.mind && is_sacrifice_target(offering.mind))) //Requires three people to sacrifice living targets/sacrifice objective
if(offering.stat != DEAD || (offering.mind && IS_SACRIFICE_TARGET(offering.mind))) //Requires three people to sacrifice living targets/sacrifice objective
if(length(invokers) < 3)
for(var/M in invokers)
to_chat(M, "<span class='cultitalic'>[offering] is too greatly linked to the world! You need three acolytes!</span>")
@@ -386,7 +376,6 @@ structure_check() searches for nearby cultist structures required for the invoca
var/sacrifice_fulfilled
var/worthless = FALSE
var/datum/game_mode/gamemode = SSticker.mode
if(isliving(offering) && !isbrain(offering))
var/mob/living/L = offering
@@ -398,7 +387,7 @@ structure_check() searches for nearby cultist structures required for the invoca
if(offering.mind)
GLOB.sacrificed += offering.mind
if(is_sacrifice_target(offering.mind))
if(IS_SACRIFICE_TARGET(offering.mind))
sacrifice_fulfilled = TRUE
else
GLOB.sacrificed += offering
@@ -407,9 +396,9 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/M in invokers)
if(sacrifice_fulfilled)
to_chat(M, "<span class='cultlarge'>\"Yes! This is the one I desire! You have done well.\"</span>")
if(!SSticker.cultdat.mirror_shields_active) // Only show once
if(!SSticker.mode.cult_team.mirror_shields_active) // Only show once
to_chat(M, "<span class='cultitalic'>You are now able to construct mirror shields inside the daemon forge.</span>")
SSticker.cultdat.mirror_shields_active = TRUE
SSticker.mode.cult_team.mirror_shields_active = TRUE
else
if(ishuman(offering) && offering.mind?.offstation_role && offering.mind.special_role != SPECIAL_ROLE_ERT) //If you try it on a ghost role, you get nothing
to_chat(M, "<span class='cultlarge'>\"This soul is of no use to either of us.\"</span>")
@@ -435,7 +424,7 @@ structure_check() searches for nearby cultist structures required for the invoca
offering.gib()
playsound(offering, 'sound/magic/disintegrate.ogg', 100, TRUE, SOUND_RANGE_SET(10))
if(sacrifice_fulfilled)
gamemode.cult_objs.succesful_sacrifice()
SSticker.mode.cult_team.successful_sacrifice()
return TRUE
/obj/effect/rune/teleport
@@ -592,7 +581,7 @@ structure_check() searches for nearby cultist structures required for the invoca
/obj/effect/rune/raise_dead/examine(mob/user)
. = ..()
if(iscultist(user) || user.stat == DEAD)
if(IS_CULTIST(user) || user.stat == DEAD)
. += "<b>Sacrifices unrewarded:</b><span class='cultitalic'> [length(GLOB.sacrificed) - sacrifices_used]</span>"
. += "<b>Sacrifice cost per ressurection:</b><span class='cultitalic> [SOULS_TO_REVIVE]</span>"
@@ -625,7 +614,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
return
for(var/mob/living/M in T.contents)
if(!iscultist(M))
if(!IS_CULTIST(M))
continue
potential_revive_mobs |= M
if(!length(potential_revive_mobs))
@@ -704,7 +693,7 @@ structure_check() searches for nearby cultist structures required for the invoca
..()
rune_in_use = FALSE
for(var/mob/living/M in range(0, src))
if(iscultist(M) && M.stat == DEAD)
if(IS_CULTIST(M) && M.stat == DEAD)
M.visible_message("<span class='warning'>[M] twitches.</span>")
//Rite of the Corporeal Shield: When invoked, becomes solid and cannot be passed. Invoke again to undo.
@@ -753,7 +742,7 @@ structure_check() searches for nearby cultist structures required for the invoca
var/mob/living/user = invokers[1]
var/list/cultists = list()
for(var/datum/mind/M in SSticker.mode.cult)
for(var/datum/mind/M in SSticker.mode.cult_team.members)
if(!(M.current in invokers) && M.current && M.current.stat != DEAD)
cultists[M.current.real_name] = M.current
var/input = tgui_input_list(user, "Who do you wish to call to [src]?", "Acolytes", cultists)
@@ -774,8 +763,8 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
log_game("Summon Cultist rune failed - target restrained")
return
if(!iscultist(cultist_to_summon))
to_chat(user, "<span class='cultitalic'>[cultist_to_summon] is not a follower of the [SSticker.cultdat.entity_title3]!</span>")
if(!IS_CULTIST(cultist_to_summon))
to_chat(user, "<span class='cultitalic'>[cultist_to_summon] is not a follower of [GET_CULT_DATA(entity_title3, "our god")]!</span>")
fail_invoke()
log_game("Summon Cultist rune failed - target was deconverted")
return
@@ -788,7 +777,7 @@ structure_check() searches for nearby cultist structures required for the invoca
cultist_to_summon.visible_message("<span class='warning'>[cultist_to_summon] suddenly disappears in a flash of red light!</span>", \
"<span class='cultitalic'><b>Overwhelming vertigo consumes you as you are hurled through the air!</b></span>")
..()
INVOKE_ASYNC(src, PROC_REF(teleport_effect), cultist_to_summon, get_turf(cultist_to_summon), src)
INVOKE_ASYNC(src, PROC_REF(teleport_effect), cultist_to_summon, get_turf(cultist_to_summon), get_turf(src))
visible_message("<span class='warning'>[src] begins to bubble and rises into the form of [cultist_to_summon]!</span>")
cultist_to_summon.forceMove(get_turf(src))
qdel(src)
@@ -822,7 +811,7 @@ structure_check() searches for nearby cultist structures required for the invoca
var/turf/T = get_turf(src)
var/list/targets = list()
for(var/mob/living/L in viewers(T))
if(!iscultist(L) && L.blood_volume && !ismachineperson(L))
if(!IS_CULTIST(L) && L.blood_volume && !ismachineperson(L))
var/atom/I = L.null_rod_check()
if(I)
if(isitem(I))
@@ -860,7 +849,7 @@ structure_check() searches for nearby cultist structures required for the invoca
var/multiplier = iteration / 2 // Iteration 1 = 0.5, Iteration 2 = 1, etc.
set_light(6, 1 * iteration, color)
for(var/mob/living/L in viewers(T))
if(!iscultist(L) && L.blood_volume && !ismachineperson(L))
if(!IS_CULTIST(L) && L.blood_volume && !ismachineperson(L))
if(L.null_rod_check())
continue
L.take_overall_damage(0, tick_damage * multiplier)
@@ -876,7 +865,7 @@ structure_check() searches for nearby cultist structures required for the invoca
return FALSE
var/list/cultists = list()
for(var/mob/living/M in range(1, src)) // Get all cultists currently in range
if(iscultist(M) && !M.incapacitated())
if(IS_CULTIST(M) && !M.incapacitated())
cultists += M
if(length(cultists) < req_cultists) // Stop the rune there's not enough invokers
@@ -896,9 +885,9 @@ structure_check() searches for nearby cultist structures required for the invoca
/obj/effect/rune/manifest/examine(mob/user)
. = ..()
if(iscultist(user) || user.stat == DEAD)
if(IS_CULTIST(user) || user.stat == DEAD)
. += "<b>Amount of ghosts summoned:</b><span class='cultitalic'> [ghosts]</span>"
. += "<b>Maximum amount of ghosts:</b><span class='cultitalic'> [clamp(default_ghost_limit - SSticker.mode.cult_objs.sacrifices_done, minimum_ghost_limit, default_ghost_limit)]</span>"
. += "<b>Maximum amount of ghosts:</b><span class='cultitalic'> [clamp(default_ghost_limit - SSticker.mode.cult_team.sacrifices_done, minimum_ghost_limit, default_ghost_limit)]</span>"
. += "Lowers to a minimum of [minimum_ghost_limit] for each objective accomplished."
/obj/effect/rune/manifest/invoke(list/invokers)
@@ -928,7 +917,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
log_game("Manifest rune failed - not enough health")
return list()
if(ghosts >= clamp(default_ghost_limit - SSticker.mode.cult_objs.sacrifices_done, minimum_ghost_limit, default_ghost_limit))
if(ghosts >= clamp(default_ghost_limit - SSticker.mode.cult_team.sacrifices_done, minimum_ghost_limit, default_ghost_limit))
to_chat(user, "<span class='cultitalic'>You are sustaining too many ghosts to summon more!</span>")
fail_invoke()
log_game("Manifest rune failed - too many summoned ghosts")
@@ -945,7 +934,7 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/mob/dead/observer/O in T)
if(!O.client)
continue
if(iscultist(O) || jobban_isbanned(O, ROLE_CULTIST))
if(IS_CULTIST(O) || jobban_isbanned(O, ROLE_CULTIST))
continue
if(!HAS_TRAIT(O, TRAIT_RESPAWNABLE) || QDELETED(src) || QDELETED(O))
continue
@@ -974,8 +963,8 @@ structure_check() searches for nearby cultist structures required for the invoca
"<span class='cultitalic'>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...</span>")
var/obj/machinery/shield/cult/weak/shield = new(T)
SSticker.mode.add_cultist(new_human.mind, 0)
to_chat(new_human, "<span class='cultlarge'>You are a servant of the [SSticker.cultdat.entity_title3]. You have been made semi-corporeal by the cult of [SSticker.cultdat.entity_name], and you are to serve them at all costs.</span>")
new_human.mind.add_antag_datum(/datum/antagonist/cultist)
to_chat(new_human, "<span class='cultlarge'>You are a servant of [GET_CULT_DATA(entity_title3, "the cult")]. You have been made semi-corporeal by the cult of [GET_CULT_DATA(entity_name, "your god")], and you are to serve them at all costs.</span>")
while(!QDELETED(src) && !QDELETED(user) && !QDELETED(new_human) && (user in T))
if(new_human.InCritical())
@@ -999,7 +988,7 @@ structure_check() searches for nearby cultist structures required for the invoca
"<span class='cultlarge'>Your link to the world fades. Your form breaks apart.</span>")
for(var/obj/item/I in new_human.get_all_slots())
new_human.unEquip(I)
SSticker.mode.remove_cultist(new_human.mind, FALSE)
new_human.mind.remove_antag_datum(/datum/antagonist/cultist, silent_removal = TRUE)
new_human.dust()
/obj/effect/rune/manifest/proc/ghostify(mob/living/user, turf/T)
@@ -1054,11 +1043,8 @@ structure_check() searches for nearby cultist structures required for the invoca
/obj/effect/rune/narsie/New()
..()
cultist_name = "Summon [SSticker.cultdat ? SSticker.cultdat.entity_name : "your god"]"
cultist_desc = "tears apart dimensional barriers, calling forth [SSticker.cultdat ? SSticker.cultdat.entity_title3 : "your god"]."
/obj/effect/rune/narsie/check_icon()
return
cultist_name = "Summon [GET_CULT_DATA(entity_name, "your god")]"
cultist_desc = "tears apart dimensional barriers, calling forth [GET_CULT_DATA(entity_title3, "your god")]."
/obj/effect/rune/narsie/cult_conceal() //can't hide this, and you wouldn't want to
return
@@ -1070,19 +1056,18 @@ structure_check() searches for nearby cultist structures required for the invoca
if(used)
return
var/mob/living/user = invokers[1]
var/datum/game_mode/gamemode = SSticker.mode
if(!is_station_level(user.z))
message_admins("[key_name_admin(user)] tried to summon an eldritch horror off station")
log_game("Summon Nar'Sie rune failed - off station Z level")
return
if(gamemode.cult_objs.cult_status == NARSIE_HAS_RISEN)
if(SSticker.mode.cult_team.cult_status == NARSIE_HAS_RISEN)
for(var/M in invokers)
to_chat(M, "<span class='cultlarge'>\"I am already here. There is no need to try to summon me now.\"</span>")
log_game("Summon god rune failed - already summoned")
return
//BEGIN THE SUMMONING
gamemode.cult_objs.succesful_summon()
SSticker.mode.cult_team.successful_summon()
used = TRUE
color = COLOR_RED
..()
@@ -1098,7 +1083,7 @@ structure_check() searches for nearby cultist structures required for the invoca
new /obj/singularity/narsie/large(T) //Causes Nar'Sie to spawn even if the rune has been removed
/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/melee/cultblade/dagger) && iscultist(user)))
if((istype(I, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user)))
log_game("Summon Narsie rune erased by [key_name(user)] with a cult dagger")
message_admins("[key_name_admin(user)] erased a Narsie rune with a cult dagger")
if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me.
-1
View File
@@ -20,7 +20,6 @@
var/probability = 0
var/station_was_nuked = FALSE //see nuclearbomb.dm and malfunction.dm
var/explosion_in_progress = FALSE //sit back and relax
var/list/datum/mind/modePlayer = new
var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
var/list/secondary_restricted_jobs = list() // Same as above, but for secondary antagonists
var/list/protected_jobs = list() // Jobs that can't be traitors
@@ -117,7 +117,7 @@
return new /datum/spell_targeting/alive_mob_list
/obj/effect/proc_holder/spell/sense_victims/valid_target(mob/living/target, user)
return target.stat == CONSCIOUS && target.key && !iscultist(target) // Only conscious, non cultist players
return target.stat == CONSCIOUS && target.key && !IS_CULTIST(target) // Only conscious, non cultist players
/obj/effect/proc_holder/spell/sense_victims/cast(list/targets, mob/user)
var/mob/living/victim = targets[1]
@@ -152,7 +152,7 @@
S.mind.assigned_role = "Harbinger of the Slaughter"
S.mind.special_role = "Harbinger of the Slaughter"
to_chat(S, playstyle_string)
SSticker.mode.add_cultist(S.mind)
S.mind.add_antag_datum(/datum/antagonist/cultist)
var/obj/effect/proc_holder/spell/sense_victims/SV = new
AddSpell(SV)
+5 -29
View File
@@ -1,6 +1,3 @@
// then call SSticker.mode.add_revolutionary(_THE_PLAYERS_MIND_)
// nothing else needs to be done, as that proc will check if they are a valid target.
// Just make sure the converter is a head before you call it!
// To remove a rev (from brainwashing or w/e), call SSticker.mode.remove_revolutionary(_THE_PLAYERS_MIND_),
// this will also check they're not a head, so it can just be called freely
@@ -41,7 +38,7 @@
if(GLOB.configuration.gamemode.prevent_mindshield_antags)
restricted_jobs |= protected_jobs
for(var/i = 1 to REVOLUTION_MAX_HEADREVS)
for(var/i in 1 to REVOLUTION_MAX_HEADREVS)
if(!length(possible_revolutionaries))
break
var/datum/mind/new_headrev = pick_n_take(possible_revolutionaries)
@@ -56,14 +53,13 @@
/datum/game_mode/revolution/post_setup()
rev_team = new /datum/team/revolution()
get_rev_team()
for(var/i in 1 to rev_team.need_another_headrev(1)) // yes this is a ONE, not a true
if(!length(pre_revolutionaries))
break
var/datum/mind/new_headrev = pick_n_take(pre_revolutionaries)
new_headrev.add_antag_datum(/datum/antagonist/rev/head)
rev_team.add_member(new_headrev)
..()
@@ -81,7 +77,7 @@
/datum/game_mode/proc/get_rev_team()
if(!rev_team)
rev_team = new /datum/team/revolution()
new /datum/team/revolution() // assignment happens in create_team()
return rev_team
//////////////////////////////////////
@@ -109,25 +105,6 @@
return TRUE
return ..()
///////////////////////////////////////////////////
//Deals with converting players to the revolution//
///////////////////////////////////////////////////
/datum/game_mode/proc/add_revolutionary(datum/mind/rev_mind)
var/mob/living/carbon/human/conversion_target = rev_mind.current
if(rev_mind.assigned_role in GLOB.command_positions)
return FALSE
if(ismindshielded(conversion_target))
return FALSE
if(rev_mind.has_antag_datum(/datum/antagonist/rev))
return FALSE
if(!conversion_target)
return FALSE
rev_team.add_member(rev_mind)
conversion_target.Silence(10 SECONDS)
conversion_target.Stun(10 SECONDS)
return TRUE
//////////////////////////////////////////////////////////////////////////////
//Deals with players being converted from the revolution (Not a rev anymore)// // Modified to handle borged MMIs. Accepts another var if the target is being borged at the time -- Polymorph.
//////////////////////////////////////////////////////////////////////////////
@@ -136,9 +113,8 @@
var/remove_head = (beingborged && rev_mind.has_antag_datum(/datum/antagonist/rev/head))
if(rev_mind.has_antag_datum(/datum/antagonist/rev, FALSE) || remove_head)
var/datum/antagonist/rev = rev_mind.has_antag_datum(/datum/antagonist/rev)
rev.silent = TRUE // We have some custom text, lets make the removal silent
rev_team.remove_member(rev_mind)
// We have some custom text, lets make the removal silent
rev_mind.remove_antag_datum(/datum/antagonist/rev, silent_removal = TRUE)
if(beingborged)
revolutionary.visible_message(
-14
View File
@@ -130,17 +130,3 @@
GLOB.assigned_mutation_blocks[block] = mutation
//testing("DNA2: [numsToAssign.len] blocks are unused: [english_list(numsToAssign)]")
/proc/setupcult()
var/static/datum/cult_info/picked_cult // Only needs to get picked once
if(picked_cult)
return picked_cult
var/random_cult = pick(typesof(/datum/cult_info))
picked_cult = new random_cult()
if(!picked_cult)
stack_trace("Cult datum creation failed")
//todo:add adminonly datum var, check for said var here...
return picked_cult
+25 -28
View File
@@ -35,10 +35,10 @@
held_body = null
/obj/item/soulstone/proc/can_use(mob/living/user)
if(iscultist(user) && purified && !iswizard(user))
if(IS_CULTIST(user) && purified && !iswizard(user))
return FALSE
if(iscultist(user) || iswizard(user) || (HAS_MIND_TRAIT(user, TRAIT_HOLY) && purified) || usability)
if(IS_CULTIST(user) || iswizard(user) || (HAS_MIND_TRAIT(user, TRAIT_HOLY) && purified) || usability)
return TRUE
return FALSE
@@ -66,7 +66,7 @@
/obj/item/soulstone/pickup(mob/living/user)
. = ..()
if(iscultist(user) && purified && !iswizard(user))
if(IS_CULTIST(user) && purified && !iswizard(user))
to_chat(user, "<span class='danger'>[src] reeks of holy magic. You will need to cleanse it with a ritual dagger before anything can be done with it.</span>")
return
if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
@@ -120,7 +120,7 @@
to_chat(user, "<span class='warning'>A mysterious force prevents you from trapping this being's soul.</span>")
return ..()
if(iscultist(user) && iscultist(M))
if(IS_CULTIST(user) && IS_CULTIST(M))
to_chat(user, "<span class='cultlarge'>\"Come now, do not capture your fellow's soul.\"</span>")
return ..()
@@ -178,7 +178,7 @@
return
/obj/item/soulstone/attackby(obj/item/O, mob/user)
if(istype(O, /obj/item/storage/bible) && !iscultist(user) && HAS_MIND_TRAIT(user, TRAIT_HOLY))
if(istype(O, /obj/item/storage/bible) && !IS_CULTIST(user) && HAS_MIND_TRAIT(user, TRAIT_HOLY))
if(purified)
return
to_chat(user, "<span class='notice'>You begin to exorcise [src].</span>")
@@ -193,9 +193,9 @@
for(var/mob/M in contents)
if(M.mind)
icon_state = "purified_soulstone2"
if(iscultist(M))
SSticker.mode.remove_cultist(M.mind, FALSE)
to_chat(M, "<span class='userdanger'>An unfamiliar white light flashes through your mind, cleansing the taint of [SSticker.cultdat ? SSticker.cultdat.entity_title1 : "Nar'Sie"] \
if(IS_CULTIST(M))
M.mind.remove_antag_datum(/datum/antagonist/cultist, silent_removal = TRUE)
to_chat(M, "<span class='userdanger'>An unfamiliar white light flashes through your mind, cleansing the taint of [GET_CULT_DATA(entity_title1, "Nar'Sie")] \
and the memories of your time as their servant with it.</span>")
to_chat(M, "<span class='danger'>Assist [user], your saviour, and get vengeance on those who enslaved you!</span>")
else
@@ -206,7 +206,7 @@
EX.icon_state = "shade_angelic"
user.visible_message("<span class='notice'>[user] purifies [src]!</span>", "<span class='notice'>You purify [src]!</span>")
else if(istype(O, /obj/item/melee/cultblade/dagger) && iscultist(user))
else if(istype(O, /obj/item/melee/cultblade/dagger) && IS_CULTIST(user))
if(!purified)
return
to_chat(user, "<span class='notice'>You begin to cleanse [src] of holy magic.</span>")
@@ -220,11 +220,11 @@
for(var/mob/M in contents)
if(M.mind)
icon_state = "soulstone2"
SSticker.mode.add_cultist(M.mind)
M.mind.add_antag_datum(/datum/antagonist/cultist)
to_chat(M, "<span class='cult'>Your shard has been cleansed of holy magic, and you are now bound to the cult's will. Obey them and assist in their goals.</span>")
for(var/mob/living/simple_animal/shade/EX in src)
EX.holy = FALSE
EX.icon_state = SSticker.cultdat?.shade_icon_state
EX.icon_state = GET_CULT_DATA(shade_icon_state, "shade")
to_chat(user, "<span class='notice'>You have cleansed [src] of holy magic.</span>")
else
..()
@@ -254,7 +254,7 @@
B.brainmob.key = S.key
S.cancel_camera()
held_body.forceMove(get_turf(src))
SSticker.mode.add_cult_immunity(held_body)
SSticker.mode?.cult_team?.add_cult_immunity(held_body)
remove_held_body()
new /obj/effect/temp_visual/cult/sparks(get_turf(src))
playsound(src, 'sound/effects/pylon_shatter.ogg', 40, TRUE)
@@ -269,7 +269,7 @@
else
icon_state = "soulstone"
name = initial(name)
if(iscultist(A))
if(IS_CULTIST(A))
to_chat(A, "<span class='userdanger'>You have been released from your prison, but you are still bound to the cult's will. Help them succeed in their goals at all costs.</span>")
else
to_chat(A, "<span class='userdanger'>You have been released from your prison, but you are still bound to your [purified ? "saviour" : "creator"]'s will.</span>")
@@ -288,7 +288,7 @@
/obj/structure/constructshell/examine(mob/user)
. = ..()
if(in_range(user, src) && (iscultist(user) || iswizard(user) || user.stat == DEAD))
if(in_range(user, src) && (IS_CULTIST(user) || iswizard(user) || user.stat == DEAD))
. += "<span class='cult'>A construct shell, used to house bound souls from a soulstone.</span>"
. += "<span class='cult'>Placing a soulstone with a soul into this shell allows you to produce your choice of the following:</span>"
. += "<span class='cultitalic'>An <b>Artificer</b>, which can produce <b>more shells and soulstones</b>, as well as fortifications.</span>"
@@ -349,7 +349,7 @@
return
if(T.stat == DEAD)
to_chat(user, "<span class='danger'>Capture failed!</span> The shade has already been banished!")
if((iscultist(T) && purified) || (T.holy && !purified))
if((IS_CULTIST(T) && purified) || (T.holy && !purified))
to_chat(user, "<span class='danger'>Capture failed!</span> The shade recoils away from [src]!")
else
if(locate(/mob/living/simple_animal/shade) in contents)
@@ -370,9 +370,9 @@
"Wraith" = /mob/living/simple_animal/hostile/construct/wraith,
"Artificer" = /mob/living/simple_animal/hostile/construct/builder)
/// Custom construct icons for different cults
var/list/construct_icons = list("Juggernaut" = image(icon = 'icons/mob/cult.dmi', icon_state = SSticker.cultdat.get_icon("juggernaut")),
"Wraith" = image(icon = 'icons/mob/cult.dmi', icon_state = SSticker.cultdat.get_icon("wraith")),
"Artificer" = image(icon = 'icons/mob/cult.dmi', icon_state = SSticker.cultdat.get_icon("builder")))
var/list/construct_icons = list("Juggernaut" = image(icon = 'icons/mob/cult.dmi', icon_state = GET_CULT_DATA(get_icon("juggernaut"), "behemoth")),
"Wraith" = image(icon = 'icons/mob/cult.dmi', icon_state = GET_CULT_DATA(get_icon("wraith"), "floating")),
"Artificer" = image(icon = 'icons/mob/cult.dmi', icon_state = GET_CULT_DATA(get_icon("builder"), "artificer")))
if(shade)
var/construct_choice = show_radial_menu(user, shell, construct_icons, custom_check = CALLBACK(src, PROC_REF(radial_check), user), require_near = TRUE)
@@ -404,12 +404,12 @@
RemoveSpell(/obj/effect/proc_holder/spell/aoe/conjure/build/soulstone)
AddSpell(new /obj/effect/proc_holder/spell/aoe/conjure/build/soulstone/holy)
else if(iscultist(src)) // Re-grant cult actions, lost in the transfer
else if(mind.has_antag_datum(/datum/antagonist/cultist)) // Re-grant cult actions, lost in the transfer
var/datum/action/innate/cult/comm/CC = new
var/datum/action/innate/cult/check_progress/D = new
CC.Grant(src)
D.Grant(src)
SSticker.mode.cult_objs.study(src) // Display objectives again
SSticker.mode.cult_team.study_objectives(src) // Display objectives again
to_chat(src, "<span class='userdanger'>You are still bound to serve the cult, follow their orders and help them complete their goals at all costs.</span>")
else
to_chat(src, "<span class='userdanger'>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</span>")
@@ -429,10 +429,9 @@
new /obj/effect/particle_effect/smoke/sleeping(target.loc)
C.faction |= "\ref[user]"
C.key = target.key
if(user && iscultist(user) || cult_override)
SSticker.mode.add_cultist(C.mind)
SSticker.mode.update_cult_icons_added(C.mind)
if(user && iscultist(user))
if(user && IS_CULTIST(user) || cult_override)
C.mind.add_antag_datum(/datum/antagonist/cultist)
if(user && IS_CULTIST(user))
to_chat(C, "<B>You are still bound to serve the cult, follow their orders and help them complete their goals at all costs.</B>")
else
to_chat(C, "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>")
@@ -454,10 +453,8 @@
if(iswizard(user))
SSticker.mode.update_wiz_icons_added(S.mind)
S.mind.special_role = SPECIAL_ROLE_WIZARD_APPRENTICE
if(iscultist(user))
SSticker.mode.add_cultist(S.mind)
S.mind.special_role = SPECIAL_ROLE_CULTIST
S.mind.store_memory("<b>Serve the cult's will.</b>")
if(IS_CULTIST(user))
S.mind.add_antag_datum(/datum/antagonist/cultist)
to_chat(S, "<span class='userdanger'>Your soul has been captured! You are now bound to the cult's will. Help them succeed in their goals at all costs.</span>")
else
S.mind.store_memory("<b>Serve [user.real_name], your creator.</b>")
-1
View File
@@ -28,7 +28,6 @@
var/datum/mind/wizard = pick(possible_wizards)
wizards += wizard
modePlayer += wizard
wizard.assigned_role = SPECIAL_ROLE_WIZARD //So they aren't chosen for other jobs.
wizard.special_role = SPECIAL_ROLE_WIZARD
wizard.set_original_mob(wizard.current)