shithub: pokecrystal

Download patch

ref: ce7e955d10ce86109a458dca23845bf5e64c6db0
parent: c170810ad4952e3add1b1453db7436c5a8c16cce
author: Eldred Habert <[email protected]>
date: Sun Mar 3 13:36:42 EST 2019

Correct Metal Powder fix

The cap would be applied when it shouldn't - if the high byte was below `HIGH(MAX_STAT_VALUE)` (and thus the value below the cap) but the low byte above `LOW(MAX_STAT_VALUE)`

--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -126,6 +126,7 @@
 +	ld a, HIGH(MAX_STAT_VALUE)
 +	cp b
 +	jr c, .cap
++	ret nz
 +	ld a, LOW(MAX_STAT_VALUE)
 +	cp c
 +	ret nc