shithub: pokecrystal

Download patch

ref: ec1fe073a341a796cf7e3125ef95280c615a5eb8
parent: 97a11c623ebd2c3e8d40a9c01b42669b2094da2c
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Mon Mar 15 11:40:48 EDT 2021

$11 = wTempMonStructEnd - wTempMonLevel

--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -4660,8 +4660,8 @@
 	ld [de], a
 	ld hl, wBattleMonLevel
 	ld de, wTempMonLevel
-	ld bc, $11
-	call CopyBytes
+	ld bc, wTempMonStructEnd - wTempMonLevel
+	call CopyBytes ; battle_struct and party_struct end with the same data
 	ld a, [wCurBattleMon]
 	ld hl, wPartyMon1Species
 	call GetPartyLocation
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -138,7 +138,7 @@
 	dw Script_opentext                   ; 47
 	dw Script_refreshscreen              ; 48
 	dw Script_closetext                  ; 49
-	dw Script_writeunusedbyte      ; 4a
+	dw Script_writeunusedbyte            ; 4a
 	dw Script_farwritetext               ; 4b
 	dw Script_writetext                  ; 4c
 	dw Script_repeattext                 ; 4d