Fix infinite hazard timer, infinite sword glitch & bottle dupe#195
Open
Admentus64 wants to merge 1 commit intomasterfrom
Open
Fix infinite hazard timer, infinite sword glitch & bottle dupe#195Admentus64 wants to merge 1 commit intomasterfrom
Admentus64 wants to merge 1 commit intomasterfrom
Conversation
2acc8ad to
81f3206
Compare
75ca009 to
55dfe69
Compare
2491088 to
3911a88
Compare
c1830e0 to
1f61c5a
Compare
fa270bc to
22262c4
Compare
1ca75fe to
584574b
Compare
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.
Fixes a bug where the hazard timer does not activate when Link's health is exactly 0x1.
The hearts in the HUD do not represent Link's actual health, but rather Link's actual health is shown by using hearts.
To explain. A heart goes into four quarters. And usually a hit from an enemy does at least a minimum of one quarter of a heart. But Link's health is a larger value than 20 times 4 quarters. With 20 hearts Link has a total of 0x140 (320) health. Every 0x10 (16) health is shown as one heart, so a quarter of a heart is actually 4 health. It's not realistically to happen, but when on a quarter of a heart you can still take damage and not die (ex. burn damage to get past the last quarter of a heart).
And then the timer. The hazard timer that set's when underwater without the Zora Tunic or in a heated area without the Goron Tunic is based on Link's remaining actual health. Here's the catch and the bug though, the timer starts at 0 and adds one second for every 2 health. So what happens if Link exactly has 1 health? The timer sets itself to... You guessed it. Zero. 0 seconds. Additionally the timer can't set itself if Link's health is 1 or lower. Sooooo, Link can indefinitely stay in heated rooms or underwater without the appropriate tunic, as long you stay at 1 health. So don't replenish any health or get hit (cus you die obviously).
This fix set the hazard timer to a minimum of one second. It also fixes the timer from not activating if health is exactly 1.
But since this is a helpful glitch, it's an optional file option. The "Power Crouch Stab Fix" option has been renamed to "Fix Useful Glitches" which now includes both glitch fixes (and future ones).
In addition to the infinite hazard timer fix, the "Fix Useful Glitches" option also fixes the Infinite Sword Glitch (ISG) and various bottle (such as the Bottle Dupe Glitch when setting a different item to C / D-Pad when putting an item into a bottle, replacing the new item slot with an extra bottle, or the Fake Ocarina glitch by using a bottle and then another item when backflipping).
Finally, it also fixes a bug where you could set items to the C or D-Pad buttons regardless of allowed age, also called the Equip Swap glitch.