Our Hero can safely wait until recovered#27
Merged
Conversation
fca1cc1 to
a877be9
Compare
Contributor
Author
|
Rebased onto master. Additional changes:
|
|
I got stuck in time stop (stp) earlier today, I couldn't get out and had to leave the game. I wonder if this is why, I could believe I might have hit "M" while in the stopped time. Cool feature though! |
Contributor
Author
|
@clashleyca Good catch! The root cause is actually a related change that inadvertently caused time stop to last forever. I created #29 to fix this. |
Owner
|
Thanks for the bug report! I've shipped Aaron's fix |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements the
Mcommand to wait multiple turns until the hero has regenerated all of their HP and spells, or until interrupted by a nearby monster or taking damage.I pretty much followed the outline from the existing TODO comment, with a few differences:
nomoveflag, because otherwise the hero waits one additional turn after interrupted.Mto recover while already at full HP and accidentally waste 100 turns. This way, you can always safely pressMto make sure you're recovered without needing to checking your HP and spells first.For now, this command is effectively undocumented in-game, like the
Pshortcut to auto-pray.One thing I noticed that isn't specific to this PR but is related: it doesn't seem that other uses of
nearbymonst()andnearbymonsters()check whether the hero can actually see the nearby monster (e.g. invisible monsters, blindness), which could inadvertently reveal information to the player that their character shouldn't know. I think it might make more sense to fix this across the codebase in a different PR; if you agree, I can open an issue.