diff --git a/code/modules/antagonists/roguetown/villain/werewolf/werewolf.dm b/code/modules/antagonists/roguetown/villain/werewolf/werewolf.dm
index 606b67fb7be..04d3d305088 100644
--- a/code/modules/antagonists/roguetown/villain/werewolf/werewolf.dm
+++ b/code/modules/antagonists/roguetown/villain/werewolf/werewolf.dm
@@ -43,6 +43,8 @@
var/transformed
var/transforming
var/untransforming
+ var/resisting_transformation = FALSE // Caustic Edit
+ var/ignore_transformation_resist = FALSE // Caustic Edit
var/wolfname = "Verewolf"
/datum/antagonist/werewolf/lesser
diff --git a/code/modules/antagonists/roguetown/villain/werewolf/werewolf_transformation.dm b/code/modules/antagonists/roguetown/villain/werewolf/werewolf_transformation.dm
index 7af94d956d0..3ed1dfe615d 100644
--- a/code/modules/antagonists/roguetown/villain/werewolf/werewolf_transformation.dm
+++ b/code/modules/antagonists/roguetown/villain/werewolf/werewolf_transformation.dm
@@ -7,6 +7,15 @@
if(H.advsetup) return
if(HAS_TRAIT(H, TRAIT_SILVER_BLESSED)) return
+ // Caustic Edit - If we were resisting transformation, Restore strength if we're under the night sky
+ if(transformed && resisting_transformation && !ignore_transformation_resist)
+ if(GLOB.tod == "night")
+ if(isturf(H.loc))
+ var/turf/loc = H.loc
+ if(loc.can_see_sky())
+ remove_transform_resistance(H)
+ // Caustic Edit End
+
// Werewolf transforms at night AND under the sky
if(!transformed && !transforming)
if(GLOB.tod == "night")
@@ -43,18 +52,35 @@
else if(transformed)
if(GLOB.tod != "night")
if(!untransforming)
- untransforming = world.time // Start untransformation phase
-
- if (world.time >= untransforming + 30 SECONDS) // Untransform
+ // Caustic Edit - Transformation resistance
+ if(resisting_transformation && !ignore_transformation_resist)
+ if(isturf(H.loc))
+ var/turf/loc = H.loc
+ if(loc.can_see_sky())
+ if(H.show_redflash())
+ H.flash_fullscreen("redflash3")
+ to_chat(H, span_danger("Astrata has seen me! I can no longer RESIST her!"))
+ untransforming = world.time // Start untransformation phase
+ ignore_transformation_resist = TRUE // Too late, no going back now!
+ else
+ untransforming = world.time // Start untransformation phase
+ // Caustic Edit End
+
+ var/forcing_untransform = !resisting_transformation || ignore_transformation_resist // Caustic Edit: Transformation resistance check
+ if (world.time >= untransforming + 30 SECONDS && forcing_untransform) // Untransform // Caustic Edit: Transformation resistance check
H.emote("rage", forced = TRUE)
H.werewolf_untransform()
transformed = FALSE
untransforming = FALSE // Reset untransforming phase
- else if (world.time >= untransforming) // Alert player
+ else if (world.time >= untransforming && forcing_untransform) // Alert player // Caustic Edit: Transformation resistance check
if(H.show_redflash())
H.flash_fullscreen("redflash1")
to_chat(H, span_warning("Daylight shines around me... the curse begins to fade."))
+ // Caustic Edit - Transformation resistance
+ if(!ignore_transformation_resist)
+ to_chat(H, span_warning("(To resist changing back to continue a scene, head somewhere you cannot see the sun and click here!)"))
+ // Caustic Edit End
/mob/living/carbon/human/species/werewolf/death(gibbed, nocutscene = FALSE)
diff --git a/modular_causticcove/code/modules/antagonists/roguetown/villains/werewolf/werewolf_transformation_resist.dm b/modular_causticcove/code/modules/antagonists/roguetown/villains/werewolf/werewolf_transformation_resist.dm
new file mode 100644
index 00000000000..b63162a5d86
--- /dev/null
+++ b/modular_causticcove/code/modules/antagonists/roguetown/villains/werewolf/werewolf_transformation_resist.dm
@@ -0,0 +1,29 @@
+/datum/antagonist/werewolf/Topic(href, href_list)
+ . = ..()
+ var/mob/living/carbon/human/user = usr
+ var/datum/mind/user_mind = user?.mind
+ if(!user_mind) return // Sanity check
+ if(href_list["task"] == "apply_transform_resistance" && owner == user_mind && !ignore_transformation_resist) // Make sure the person clicking this is actually the user!
+ apply_transform_resistance(user)
+
+
+/datum/antagonist/werewolf/proc/apply_transform_resistance(var/mob/living/carbon/human/user)
+ to_chat(user, span_danger("I RESIST the Sun-Tyrant's will! As long as I stay away from the direct sunlight, I can keep my form... but my resistance has come with a toll. (Remember that the ability to resist un-transformation is strictly a scene tool. Do not abuse this!)"))
+ resisting_transformation = TRUE
+ user.apply_status_effect(/datum/status_effect/debuff/werewolf_transformation_resistance)
+ untransforming = FALSE
+
+/datum/antagonist/werewolf/proc/remove_transform_resistance(var/mob/living/carbon/human/user)
+ to_chat(user, span_notice("The pale light of the moon re-invigorates me. Astrata's scorn fades... My MIGHT is restored!"))
+ resisting_transformation = FALSE
+ user.remove_status_effect(/datum/status_effect/debuff/werewolf_transformation_resistance)
+
+/datum/status_effect/debuff/werewolf_transformation_resistance
+ id = "werewolf_resisting_sun"
+ alert_type = /atom/movable/screen/alert/status_effect/debuff/werewolf_transformation_resistance
+ effectedstats = list(STATKEY_SPD = -2, STATKEY_STR = -6, STATKEY_CON = -8, STATKEY_WIL = -8) // This is a scene tool! A massive stat debuff will help ensure it *stays* that way.
+
+/atom/movable/screen/alert/status_effect/debuff/werewolf_transformation_resistance
+ name = "The Price Of Defiance"
+ desc = "I have resisted the Sun-Tyrant's will, but her outrage has ensured I have paid for doing so. My body feels feeble and sluggish. Only by standing underneath the moonlit sky will my strength be restored."
+ icon_state = "debuff"
\ No newline at end of file
diff --git a/roguetown.dme b/roguetown.dme
index aea436f04d4..1ddbbfb7e50 100644
--- a/roguetown.dme
+++ b/roguetown.dme
@@ -2919,6 +2919,7 @@
#include "modular\piercing\piercing.dm"
#include "modular\piercing\piercings.dm"
#include "modular\piercing\supply.dm"
+#include "modular_causticcove\code\modules\antagonists\roguetown\villains\werewolf\werewolf_transformation_resist.dm"
#include "statpacks\agile.dm"
#include "statpacks\mental.dm"
#include "statpacks\physical.dm"