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)`
This commit is contained in:
Eldred Habert 2019-03-03 18:36:42 +01:00 committed by GitHub
parent c170810ad4
commit ce7e955d10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,6 +126,7 @@ Some fixes are mentioned as breaking compatibility with link battles. This can b
+ ld a, HIGH(MAX_STAT_VALUE) + ld a, HIGH(MAX_STAT_VALUE)
+ cp b + cp b
+ jr c, .cap + jr c, .cap
+ ret nz
+ ld a, LOW(MAX_STAT_VALUE) + ld a, LOW(MAX_STAT_VALUE)
+ cp c + cp c
+ ret nc + ret nc