From 0e77eca05627d3cf4554040be8f7e1ab0198122e Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Thu, 6 Jun 2024 16:38:43 -0400
Subject: [PATCH] tarot card improvements / fixes (#25672)
* tarot card improvements / fixes
* Update code/game/gamemodes/wizard/magic_tarot.dm
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
---------
Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
---
code/datums/spells/construct_spells.dm | 3 ++
code/game/gamemodes/wizard/magic_tarot.dm | 42 +++++++++++++++++++----
code/game/gamemodes/wizard/soulstone.dm | 6 +++-
3 files changed, 44 insertions(+), 7 deletions(-)
diff --git a/code/datums/spells/construct_spells.dm b/code/datums/spells/construct_spells.dm
index 878f085d261..a4e1727c144 100644
--- a/code/datums/spells/construct_spells.dm
+++ b/code/datums/spells/construct_spells.dm
@@ -69,6 +69,9 @@
summon_type = list(/obj/item/soulstone/anybody/purified)
+/datum/spell/aoe/conjure/build/soulstone/any
+ summon_type = list(/obj/item/soulstone/anybody)
+
/datum/spell/aoe/conjure/build/pylon
name = "Cult Pylon"
desc = "This spell uses dark magic to craft an unholy beacon. Heals cultists, and makes a handy light source."
diff --git a/code/game/gamemodes/wizard/magic_tarot.dm b/code/game/gamemodes/wizard/magic_tarot.dm
index 5d4cdd5603f..ce05763ceb3 100644
--- a/code/game/gamemodes/wizard/magic_tarot.dm
+++ b/code/game/gamemodes/wizard/magic_tarot.dm
@@ -173,9 +173,13 @@
. += "Alt-Shift-Click to flip the card over."
/obj/item/magic_tarot_card/attack_self(mob/user)
- if(our_tarot)
- INVOKE_ASYNC(our_tarot, TYPE_PROC_REF(/datum/tarot, activate), user)
poof()
+ if(face_down)
+ flip()
+ if(our_tarot)
+ pre_activate(user)
+ return
+ qdel(src)
/obj/item/magic_tarot_card/throw_at(atom/target, range, speed, mob/thrower, spin, diagonals_first, datum/callback/callback, force, dodgeable)
if(face_down)
@@ -184,9 +188,11 @@
/obj/item/magic_tarot_card/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
- if(isliving(hit_atom) && our_tarot)
- INVOKE_ASYNC(our_tarot, TYPE_PROC_REF(/datum/tarot, activate), hit_atom)
poof()
+ if(isliving(hit_atom) && our_tarot)
+ pre_activate(hit_atom)
+ return
+ qdel(src)
/obj/item/magic_tarot_card/AltShiftClick(mob/user)
flip()
@@ -203,13 +209,37 @@
/obj/item/magic_tarot_card/proc/poof()
new /obj/effect/temp_visual/revenant(get_turf(src))
- qdel(src)
/obj/item/magic_tarot_card/proc/dust()
visible_message("[src] disintegrates into dust!")
new /obj/effect/temp_visual/revenant(get_turf(src))
qdel(src)
+/obj/item/magic_tarot_card/proc/pre_activate(mob/user)
+ forceMove(user)
+ var/obj/effect/temp_visual/tarot_preview/draft = new /obj/effect/temp_visual/tarot_preview(user, our_tarot.card_icon)
+ user.vis_contents += draft
+ user.visible_message("[user] holds up [src]!")
+ addtimer(CALLBACK(our_tarot, TYPE_PROC_REF(/datum/tarot, activate), user), 0.5 SECONDS)
+ QDEL_IN(src, 0.6 SECONDS)
+
+/obj/effect/temp_visual/tarot_preview
+ name = "a tarot card"
+ icon = 'icons/obj/playing_cards.dmi'
+ icon_state = "tarot_the_unknown"
+ pixel_y = 20
+ duration = 1.5 SECONDS
+
+/obj/effect/temp_visual/tarot_preview/Initialize(atom/mapload, new_icon_state)
+ . = ..()
+ if(new_icon_state)
+ icon_state = "tarot_[new_icon_state]"
+ var/new_filter = isnull(get_filter("ray"))
+ ray_filter_helper(1, 40,"#fcf3dc", 6, 20)
+ if(new_filter)
+ animate(get_filter("ray"), alpha = 0, offset = 10, time = duration, loop = -1)
+ animate(offset = 0, time = duration)
+
/datum/tarot
/// Name used for the card
var/name = "XXII - The Unknown."
@@ -572,7 +602,7 @@
return
var/mob/living/carbon/human/H = target
for(var/obj/item/I in H)
- if(istype(/obj/item/bio_chip, I))
+ if(istype(I, /obj/item/bio_chip))
continue
H.unEquip(I)
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index fdf530ea119..896ecf85717 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -389,13 +389,17 @@
/mob/living/simple_animal/hostile/construct/proc/init_construct(mob/living/simple_animal/shade/shade, obj/item/soulstone/SS, obj/structure/constructshell/shell)
if(shade.mind)
shade.mind.transfer_to(src)
+ if(SS.usability)
+ // Replace regular soulstone summoning with anyuse soulstones
+ if(is_type_in_list(/datum/spell/aoe/conjure/build/soulstone, mob_spell_list))
+ RemoveSpell(/datum/spell/aoe/conjure/build/soulstone)
+ AddSpell(new /datum/spell/aoe/conjure/build/soulstone/any)
if(SS.purified)
make_holy()
// Replace regular soulstone summoning with purified soulstones
if(is_type_in_list(/datum/spell/aoe/conjure/build/soulstone, mob_spell_list))
RemoveSpell(/datum/spell/aoe/conjure/build/soulstone)
AddSpell(new /datum/spell/aoe/conjure/build/soulstone/holy)
-
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