ref: 2137f0be09d8ad5ff2d995725dee273b55dbcc04
parent: 57a00f14d6997e0dbbf8070ecdc44f55f7ac192c
parent: c75d121c78324077bd058c179c94c596c6457f77
author: Jacob Moody <[email protected]>
date: Wed Mar 22 10:50:07 EDT 2023
merge from upstream
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -211,7 +211,7 @@
; - \1_TMNUM: the learnable TM/HM flag, starting at 1
; - TM##_MOVE: alias for the move id, equal to the value of \1
const TM_\1
-TM{02d:__tmhm_value__}_MOVE = \1
+ DEF TM{02d:__tmhm_value__}_MOVE = \1
add_tmnum \1
ENDM
--- a/data/battle_tower/unknown_levels.asm
+++ b/data/battle_tower/unknown_levels.asm
@@ -13,6 +13,7 @@
db $27
db $42
db $24
+.end
Unknown_17047e:
db $03, 4
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -497,7 +497,7 @@
ld a, [hli]
and a
jr z, .empty
- cp 15
+ cp (Unknown_170470.end - Unknown_170470) + 1
jr nc, .copy_data
push hl
@@ -510,7 +510,7 @@
pop hl
; If Unknown_170470[a-1] <= b, overwrite the current trainer's data
- ; with Unknown17047e, and exit the inner loop.
+ ; with Unknown_17047e, and exit the inner loop.
cp b
jr c, .copy_data
jr z, .copy_data
@@ -518,9 +518,9 @@
.empty
; If a == 0 and b >= $fc, overwrite the current trainer's data with
- ; Unknown17047e, and exit the inner loop.
+ ; Unknown_17047e, and exit the inner loop.
ld a, b
- cp $fc
+ cp NUM_POKEMON + 1
jr nc, .copy_data
.next_iteration