Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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("<a href='?src=[REF(src)];task=apply_transform_resistance;'>(To resist changing back to continue a scene, head somewhere you cannot see the sun and click here!)</a>"))
// Caustic Edit End


/mob/living/carbon/human/species/werewolf/death(gibbed, nocutscene = FALSE)
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <b>RESIST</b> 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"
1 change: 1 addition & 0 deletions roguetown.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading