Skip to content
91 changes: 61 additions & 30 deletions modular_darkpack/modules/powers/code/discipline/visceratika.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@
owner.set_body_sprite("gargoyle")
owner.update_body_parts()
owner.update_body()
// since dot 4 is always active and requires no roll
if(level >= 4)
owner.physiology.brute_mod *= 0.8
owner.physiology.heat_mod *= 0.5
//owner.physiology.clone_mod *= 0.9
//ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, TRAIT_GENERIC)
ADD_TRAIT(owner, TRAIT_NOSOFTCRIT, DISCIPLINE_TRAIT(type))
if(!(owner.is_clan(/datum/subsplat/vampire_clan/gargoyle)))
ADD_TRAIT(owner, TRAIT_MASQUERADE_VIOLATING_FACE, DISCIPLINE_TRAIT(type))

//SKIN OF THE CHAMELEON
/datum/discipline_power/visceratika/skin_of_the_chameleon
Expand Down Expand Up @@ -68,45 +59,77 @@
level = 2
check_flags = DISC_CHECK_CONSCIOUS | DISC_CHECK_CAPABLE | DISC_CHECK_SEE
toggled = TRUE
var/area/starting_area
var/datum/storyteller_roll/scry_the_hearthstone/scry_roll

/datum/storyteller_roll/scry_the_hearthstone
bumper_text = "scry the hearthstone"
applicable_stats = list(STAT_PERCEPTION, STAT_AWARENESS)
roll_output_type = ROLL_PRIVATE

/datum/discipline_power/visceratika/scry_the_hearthstone/New(datum/discipline/discipline)
. = ..()

scry_roll = new()
Comment on lines +69 to +72

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda intresting. None of our rolls really do this, i dont really see the reason not to lazy load the datums on the off chance we dont need to waste the effort of making them. Though i have considered standerdizing a "main_roll" datum for powers (gifts and discs) so we can parse out some behavoir like displaying the stats used and such in the button tooltip.


/datum/discipline_power/visceratika/scry_the_hearthstone/can_activate(atom/target, alert)
. = ..()
if (!.)
return .

// Can only be used to detect people 'inside a given structure'
var/area/in_area = get_area(owner)
if (in_area.outdoors)
if (alert)
to_chat(owner, span_warning("You can only use [name] indoors!"))
return FALSE

/datum/discipline_power/visceratika/scry_the_hearthstone/pre_activation_checks()
. = ..()
if(!scry_roll)
scry_roll = new()

if(scry_roll.st_roll(owner, owner) == ROLL_SUCCESS)
return TRUE
else
return FALSE

/datum/discipline_power/visceratika/scry_the_hearthstone/activate()
. = ..()
for(var/mob/living/player in GLOB.player_list)
if(get_area(player) == get_area(owner))
var/their_name = player.name
if(ishuman(player))
var/mob/living/carbon/human/human_player = player
their_name = human_player.name
to_chat(owner, "- [their_name]")
starting_area = get_area(owner)

// In the TTRPG this is resisted when targets are hiding (V20 p. 476), but there is no roll to resist here
// This also bypasses magical invisibility (e.g. Obfuscate) without comparing Discipline dots like in the TTRPG
var/found_anyone = FALSE
for(var/mob/living/player in (GLOB.player_list - owner))
if(get_area(player) != get_area(owner))
continue

var/distance = get_dist(owner, player)
var/location_description
if (distance == 0)
location_description = "close to you"
else
location_description = "[distance] [distance == 1 ? "yard" : "yards"] [dir2text(get_dir(owner, player))]"
Comment on lines +104 to +109

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, if we are gonna display it using "yards" then we should make sure to convert it using the defines.

Image


to_chat(owner, "- [GET_GUESTBOOK_NAME(owner, player)] is [location_description]")
found_anyone = TRUE

if (!found_anyone)
to_chat(owner, span_notice("You don't sense anyone interesting in the area."))

ADD_TRAIT(owner, TRAIT_THERMAL_VISION, DISCIPLINE_TRAIT(type))
owner.update_sight()
//visceratika 2 gives a gargoyle a heatmap of all living people in a building. if they leave the building, they need to re-cast it.
RegisterSignal(owner, COMSIG_EXIT_AREA, PROC_REF(on_area_exited))

/datum/discipline_power/visceratika/scry_the_hearthstone/proc/on_area_exited(atom/movable/source, area/old_area)
SIGNAL_HANDLER
/datum/discipline_power/visceratika/scry_the_hearthstone/deactivate(atom/target, direct)
. = ..()

to_chat(owner, span_warning("You lose your connection to the stone as you leave the area."))
starting_area = null
REMOVE_TRAIT(owner, TRAIT_THERMAL_VISION, DISCIPLINE_TRAIT(type))
owner.update_sight()
UnregisterSignal(owner, COMSIG_EXIT_AREA)

/datum/discipline_power/visceratika/scry_the_hearthstone/proc/on_area_exited(atom/movable/source, area/old_area)
SIGNAL_HANDLER

to_chat(owner, span_warning("You lose your connection to the stone as you leave the area."))
try_deactivate()

//BOND WITH THE MOUNTAIN
Expand Down Expand Up @@ -178,10 +201,16 @@

vitae_cost = 0

/datum/discipline_power/visceratika/armor_of_terra/post_gain()
Comment thread
TheCarnalest marked this conversation as resolved.
owner.physiology.brute_mod *= 0.8
owner.physiology.heat_mod *= 0.5
ADD_TRAIT(owner, TRAIT_NOSOFTCRIT, DISCIPLINE_TRAIT(type))
if (!owner.is_clan(/datum/subsplat/vampire_clan/gargoyle))
ADD_TRAIT(owner, TRAIT_MASQUERADE_VIOLATING_FACE, DISCIPLINE_TRAIT(type))

/datum/discipline_power/visceratika/armor_of_terra/activate()
. = ..()
to_chat(owner, span_danger("This is a passive ability. The effects are already active!"))

to_chat(owner, span_danger("[name] is a passive ability. The effects are already active!"))

//FLOW WITHIN THE MOUNTAIN
/datum/discipline_power/visceratika/flow_within_the_mountain
Expand All @@ -197,12 +226,14 @@
duration_length = 1 SCENES // might be too long...
cooldown_length = 10 SECONDS

/datum/discipline_power/visceratika/flow_within_the_mountain/try_activate()
// placed in try_activate instead of pre_activation_checks so as to not consume blood while running this check
/datum/discipline_power/visceratika/flow_within_the_mountain/can_activate(atom/target, alert)
. = ..()
if (!.)
return.
Comment thread
TheCarnalest marked this conversation as resolved.
Outdated

if(!HAS_TRAIT(owner, TRAIT_BOND_WITHIN_THE_MOUNTAIN))
to_chat(owner, span_notice("You must cast Bond with the Mountain first before using Flow within the Mountain"))
to_chat(owner, span_notice("You must cast Bond with the Mountain before using Flow within the Mountain"))
return FALSE
..()

/datum/discipline_power/visceratika/flow_within_the_mountain/activate()
. = ..()
Expand Down
Loading