From f35cc6fc722d9e4b2bcbc87338430a20bb56041a Mon Sep 17 00:00:00 2001 From: capsaicinz <84609863+capsaicinz@users.noreply.github.com> Date: Fri, 8 Apr 2022 05:01:59 -0500 Subject: [PATCH] you can no longer use spells while in rod form (#66029) * does the thing * EVERY SPELL OH NO * bluh --- code/__DEFINES/traits.dm | 3 +++ code/modules/spells/spell.dm | 2 +- code/modules/spells/spell_types/rod_form.dm | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 49db100c841..99a4b674b5f 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -426,6 +426,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai // Normally only present in the mind of a Research Director. #define TRAIT_ROD_SUPLEX "rod_suplex" +/// This mob is currently in rod form. +#define TRAIT_ROD_FORM "rod_form" + //SKILLS #define TRAIT_UNDERWATER_BASKETWEAVING_KNOWLEDGE "underwater_basketweaving" #define TRAIT_WINE_TASTER "wine_taster" diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index 5501eb73d2c..4c789c71b5d 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -187,7 +187,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th to_chat(user, span_warning("Magic seems to flee from you, you can't gather enough power to cast this spell.")) return FALSE - if(!phase_allowed && istype(user.loc, /obj/effect/dummy)) + if(!phase_allowed && istype(user.loc, /obj/effect/dummy) || HAS_TRAIT(user, TRAIT_ROD_FORM)) to_chat(user, span_warning("[name] cannot be cast unless you are completely manifested in the material plane!")) return FALSE diff --git a/code/modules/spells/spell_types/rod_form.dm b/code/modules/spells/spell_types/rod_form.dm index 9a42a163392..944114d830f 100644 --- a/code/modules/spells/spell_types/rod_form.dm +++ b/code/modules/spells/spell_types/rod_form.dm @@ -40,6 +40,7 @@ rod_max_distance, rod_damage_bonus, ) + ADD_TRAIT(caster, TRAIT_ROD_FORM, MAGIC_TRAIT) /// Wizard Version of the Immovable Rod. /obj/effect/immovablerod/wizard @@ -137,5 +138,6 @@ wizard.notransform = FALSE wizard.forceMove(get_turf(src)) our_wizard = null + REMOVE_TRAIT(wizard, TRAIT_ROD_FORM, MAGIC_TRAIT) #undef BASE_WIZ_ROD_RANGE