From 3472077f8261f89fdd82f3cebf03ed938b46a4e8 Mon Sep 17 00:00:00 2001 From: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com> Date: Fri, 28 Jan 2022 02:43:29 -0500 Subject: [PATCH] Purified shades get converted to shades if they get converted & related fixes (#64233) Purified shades now get converted to shades (mainly name & icon change) if they get converted to cult Using twisted construction on a non-cult soulstone now makes it a cult soulstone (including converting any shade inside to a cult shade if any shades are inside) Fixes a bug found during testing where soulstones with a shade that has been recaptured would say "soulstone: Shade of Shade of [NAME]", caused due to real_name already being "Shade of [NAME]". Purified shades now show who they were prior to being captured. --- code/modules/antagonists/cult/blood_magic.dm | 9 +++++- code/modules/antagonists/cult/runes.dm | 3 ++ .../antagonists/wizard/equipment/soulstone.dm | 28 +++++++++++++++++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 1b4268765a2..df9db661adb 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -178,7 +178,7 @@ /datum/action/innate/cult/blood_spell/construction name = "Twisted Construction" - desc = "Empowers your hand to corrupt certain metalic objects.
Converts:
Plasteel into runed metal
50 metal into a construct shell
Living cyborgs into constructs after a delay
Cyborg shells into construct shells
Airlocks into brittle runed airlocks after a delay (harm intent)" + desc = "Empowers your hand to corrupt certain metalic objects.
Converts:
Plasteel into runed metal
50 metal into a construct shell
Living cyborgs into constructs after a delay
Cyborg shells into construct shells
Purified soulstones (and any shades inside) into cultist soulstones
Airlocks into brittle runed airlocks after a delay (harm intent)" button_icon_state = "transmute" magic_path = "/obj/item/melee/blood_magic/construction" health_cost = 12 @@ -576,6 +576,7 @@ [IRON_TO_CONSTRUCT_SHELL_CONVERSION] iron into a construct shell\n Living cyborgs into constructs after a delay\n Cyborg shells into construct shells\n + Purified soulstones (and any shades inside) into cultist soulstones\n Airlocks into brittle runed airlocks after a delay (harm intent)"} /obj/item/melee/blood_magic/construction/afterattack(atom/target, mob/user, proximity_flag, click_parameters) @@ -652,6 +653,12 @@ else channeling = FALSE return + else if(istype(target,/obj/item/soulstone)) + var/obj/item/soulstone/candidate = target + if(candidate.corrupt()) + uses-- + to_chat(user, span_warning("You corrupt [candidate]!")) + SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25)) else to_chat(user, span_warning("The spell will not work on [target]!")) return diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 42a478627a1..efae533e74f 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -283,6 +283,9 @@ structure_check() searches for nearby cultist structures required for the invoca H.cultslurring = 0 if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) H.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") + if(isshade(convertee)) + convertee.icon_state = "shade_cult" + convertee.name = convertee.real_name return TRUE /obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers) diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm index 8799874b0db..e6adc38807f 100644 --- a/code/modules/antagonists/wizard/equipment/soulstone.dm +++ b/code/modules/antagonists/wizard/equipment/soulstone.dm @@ -52,10 +52,32 @@ mob_cultist.mind.remove_antag_datum(/datum/antagonist/cult) for(var/mob/living/simple_animal/shade/sharded_shade in src) sharded_shade.icon_state = "ghost1" - sharded_shade.name = "Purified [initial(sharded_shade.name)]" + sharded_shade.name = "Purified [sharded_shade.real_name]" exorcist.visible_message(span_notice("[exorcist] purifies [src]!")) UnregisterSignal(src, COMSIG_BIBLE_SMACKED) +/** + * corrupt: turns the soulstone into a cult one and turns the occupant shade, if any, into a cultist + */ +/obj/item/soulstone/proc/corrupt() + if(theme == THEME_CULT) + return FALSE + required_role = null + theme = THEME_CULT + icon_state = "soulstone" + for(var/mob/shade_to_convert in contents) + if(!shade_to_convert.mind) + continue + icon_state = "soulstone2" + if(IS_CULTIST(shade_to_convert)) + continue + shade_to_convert.mind.add_antag_datum(/datum/antagonist/cult) + for(var/mob/living/simple_animal/shade/sharded_shade in src) + sharded_shade.icon_state = "shade_cult" + sharded_shade.name = sharded_shade.real_name + RegisterSignal(src, COMSIG_BIBLE_SMACKED) + return TRUE + /obj/item/soulstone/proc/role_check(mob/who) return required_role ? (who.mind && who.mind.has_antag_datum(required_role, TRUE)) : TRUE @@ -175,7 +197,7 @@ if(THEME_HOLY) icon_state = "purified_soulstone" A.icon_state = "shade_holy" - A.name = "Purified [initial(A.name)]" + A.name = "Purified [A.real_name]" A.loot = list(/obj/item/ectoplasm/angelic) if(THEME_WIZARD) icon_state = "mystic_soulstone" @@ -289,7 +311,7 @@ icon_state = "mystic_soulstone2" if(theme == THEME_CULT) icon_state = "soulstone2" - name = "soulstone: Shade of [shade.real_name]" + name = "soulstone: [shade.real_name]" to_chat(shade, span_notice("Your soul has been captured by [src]. Its arcane energies are reknitting your ethereal form.")) if(user != shade) to_chat(user, "[span_info("Capture successful!:")] [shade.real_name]'s soul has been captured and stored within [src].")