-
Notifications
You must be signed in to change notification settings - Fork 77
Scry the Hearthstone bugfixes and enhancements #1101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TheCarnalest
wants to merge
10
commits into
DarkPack13:master
Choose a base branch
from
TheCarnalest:fix-visceratika-bug
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+72
−31
Open
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
df230f4
Fix Visceratika not using guestbooks, a runtime, and refactor it
TheCarnalest d13e7ef
Add another note of what TTRPG mechanics aren't included
TheCarnalest 9fd9958
Make Scry the Hearthstone also display distance and direction to loca…
TheCarnalest 20d5ff3
Change distance to yards
TheCarnalest c4458dd
Fix trailing quotation mark
TheCarnalest 04182ed
Restrict ability to only indoor areas
TheCarnalest 7c92088
Improve Visceratika code quality
TheCarnalest 3c31a24
Add a space between return and .
TheCarnalest 67e8cd1
Remove Armor of Terra effects on loss and give better user feedback
TheCarnalest be72a52
Merge branch 'master' into fix-visceratika-bug
TheCarnalest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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() | ||
|
|
||
| /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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| 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 | ||
|
|
@@ -178,10 +201,16 @@ | |
|
|
||
| vitae_cost = 0 | ||
|
|
||
| /datum/discipline_power/visceratika/armor_of_terra/post_gain() | ||
|
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 | ||
|
|
@@ -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. | ||
|
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() | ||
| . = ..() | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
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.