shithub: pokecrystal

Download patch

ref: 2e200ce85e21eee3d46a4c82074425697c0b433d
parent: 17f45b5c95b7ec33bd28d7ab1e8869e287ea4dbc
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Mon Dec 25 10:52:03 EST 2017

More support for MAX_LEVEL = 255

(ValidateOTTrademon and Function102bdc have `cp MAX_LEVEL + 1` operations that would still fail with such a correction, so there isn't perfect support.)

--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -730,7 +730,7 @@
 
 	; risingbadge
 	bit RISINGBADGE, [hl]
-	ld a, MAX_LEVEL + 1
+	ld a, LOW(MAX_LEVEL + 1)
 	jr nz, .getlevel
 
 	; stormbadge