shithub: pokecrystal

Download patch

ref: 92aab1e1855f7f7001ce96363a3d73ecd1f330e1
parent: 4dbf0d44e0ecd5575f251a649faba549f790b631
author: yenatch <[email protected]>
date: Sun Jan 5 02:28:55 EST 2014

even more battle labels

--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -1430,7 +1430,7 @@
 	ld e, [hl]
 	inc hl
 	ld d, [hl]
-	ld hl, $506f
+	ld hl, BattleAnimations
 	add hl, de
 	add hl, de
 	call Function3ae1
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -130,18 +130,18 @@
 	ld [$d0ee], a
 	ld a, [InLinkBattle]
 	and a
-	ld hl, $47bd
+	ld hl, BattleText_0x807bd
 	jr z, .asm_3c115
 	ld a, [$d0ee]
 	and $c0
 	ld [$d0ee], a
-	ld hl, $47cf
+	ld hl, BattleText_0x807cf
 	call Function3d2e0
 	jr nc, .asm_3c115
 	ld hl, $cd2a
 	bit 4, [hl]
 	jr nz, .asm_3c118
-	ld hl, $5863
+	ld hl, BattleText_0x81863
 
 .asm_3c115
 	call StdBattleTextBox
@@ -407,7 +407,7 @@
 	pop hl
 	ld [hl], a
 	call GetItemName
-	ld hl, $4bde
+	ld hl, BattleText_0x80bde
 	call StdBattleTextBox
 	callab BattleCommand8c
 	pop af
@@ -418,7 +418,7 @@
 	ld de, $0103
 	call Function3ee0f
 	call Function3c8e4
-	ld hl, $4d97
+	ld hl, BecameConfusedText
 	jp StdBattleTextBox
 ; 3c300
 
@@ -730,7 +730,7 @@
 	ld hl, PlayerSubStatus5
 	res 4, [hl]
 	call SetEnemyTurn
-	ld hl, $4c8a
+	ld hl, BattleText_0x80c8a
 	jp StdBattleTextBox
 
 .asm_3c518
@@ -754,7 +754,7 @@
 	ld hl, EnemySubStatus5
 	res 4, [hl]
 	call SetPlayerTurn
-	ld hl, $4c8a
+	ld hl, BattleText_0x80c8a
 	jp StdBattleTextBox
 ; 3c543
 
@@ -1068,11 +1068,11 @@
 	call GetBattleVar
 	and $18
 	jr z, .asm_3c768
-	ld hl, $47e2
+	ld hl, BattleText_0x807e2
 	ld de, $0106
 	and $10
 	jr z, .asm_3c733
-	ld hl, $47f8
+	ld hl, BattleText_0x807f8
 	ld de, $0105
 
 .asm_3c733
@@ -1130,7 +1130,7 @@
 	ld a, $1
 	ld [hBGMapMode], a
 	call Function3ccef
-	ld hl, $480e
+	ld hl, BattleText_0x8080e
 	call StdBattleTextBox
 
 .asm_3c7a1
@@ -1146,7 +1146,7 @@
 	call Function3ee0f
 	call GetQuarterMaxHP
 	call Function3cc3f
-	ld hl, $4822
+	ld hl, BattleText_0x80822
 	call StdBattleTextBox
 
 .asm_3c7c5
@@ -1162,7 +1162,7 @@
 	call Function3ee0f
 	call GetQuarterMaxHP
 	call Function3cc3f
-	ld hl, $4836
+	ld hl, BattleText_0x80836
 	call StdBattleTextBox
 
 .asm_3c7e9
@@ -1214,7 +1214,7 @@
 	ld a, [hl]
 	ld [$d265], a
 	push af
-	ld hl, $4864
+	ld hl, BattleText_0x80864
 	call StdBattleTextBox
 	pop af
 	ret nz
@@ -1304,11 +1304,11 @@
 .asm_3c8d3
 	call Function3cc76
 	call Function3cc3f
-	ld hl, $4de2
+	ld hl, BattleText_0x80de2
 	jr .asm_3c8e1
 
 .asm_3c8de
-	ld hl, $4df5
+	ld hl, BattleText_0x80df5
 
 .asm_3c8e1
 	jp StdBattleTextBox
@@ -1364,7 +1364,7 @@
 	call Function3cc76
 	call Function3c8e4
 	call Function3ccef
-	ld hl, $4880
+	ld hl, BattleText_0x80880
 	jp StdBattleTextBox
 ; 3c93c
 
@@ -1504,7 +1504,7 @@
 	call Function3c8e4
 	call Function3ddc8
 	call Function3c8e4
-	ld hl, $4899
+	ld hl, BattleText_0x80899
 	jp StdBattleTextBox
 ; 3ca26
 
@@ -1536,7 +1536,7 @@
 	ld [hl], a
 	cp $1
 	ret nz
-	ld hl, $48b6
+	ld hl, BattleText_0x808b6
 	call StdBattleTextBox
 	ld a, $10
 	call _GetBattleVar
@@ -1588,7 +1588,7 @@
 	ld [hl], $0
 	call UpdateBattleHuds
 	call SetEnemyTurn
-	ld hl, $524b
+	ld hl, DefrostedOpponentText
 	jp StdBattleTextBox
 
 .asm_3cac9
@@ -1614,7 +1614,7 @@
 .asm_3caef
 	call UpdateBattleHuds
 	call SetPlayerTurn
-	ld hl, $524b
+	ld hl, DefrostedOpponentText
 	jp StdBattleTextBox
 ; 3cafb
 
@@ -1652,7 +1652,7 @@
 
 .asm_3cb2e
 	ld [hBattleTurn], a
-	ld hl, $48d2
+	ld hl, BattleText_0x808d2
 	jp StdBattleTextBox
 ; 3cb36
 
@@ -3453,12 +3453,12 @@
 	add hl, bc
 	ld a, [hl]
 	dec a
-	ld hl, $542b
-	ld bc, $0020
+	ld hl, BaseData + 7 ; type
+	ld bc, $20
 	call AddNTimes
 	ld de, EnemyMonType1
-	ld bc, $0002
-	ld a, $14
+	ld bc, 2
+	ld a, BANK(BaseData)
 	call FarCopyBytes
 	ld a, [BattleMonType1]
 	ld [PlayerMoveType], a
@@ -5128,7 +5128,7 @@
 	ld hl, $cd2a
 	bit 4, [hl]
 	jr nz, .asm_3e1c5
-	ld hl, $5863
+	ld hl, BattleText_0x81863
 	call StdBattleTextBox
 	ld c, $3c
 	call DelayFrames
@@ -8550,40 +8550,45 @@
 Function3f662: ; 3f662
 	ld hl, EnemyMonMove1
 	ld de, $d25e
-	ld b, $4
-.asm_3f66a
+	ld b, 4
+.loop
 	ld a, [de]
 	inc de
 	ld [hli], a
 	and a
-	jr z, .asm_3f690
+	jr z, .clearpp
+
 	push bc
 	push hl
+
 	push hl
 	dec a
-	ld hl, $5b00
-	ld bc, $0007
+	ld hl, Moves + MOVE_PP
+	ld bc, Move2 - Move1
 	call AddNTimes
-	ld a, $10
+	ld a, BANK(Moves)
 	call GetFarByte
 	pop hl
-	ld bc, $0005
+
+	ld bc, EnemyMonPP - (EnemyMonMoves + 1)
 	add hl, bc
 	ld [hl], a
+
 	pop hl
 	pop bc
+
 	dec b
-	jr nz, .asm_3f66a
+	jr nz, .loop
 	ret
 
-.asm_3f68e
+.clear
 	xor a
 	ld [hli], a
 
-.asm_3f690
+.clearpp
 	push bc
 	push hl
-	ld bc, $0005
+	ld bc, EnemyMonPP - (EnemyMonMoves + 1)
 	add hl, bc
 	xor a
 	ld [hl], a
@@ -8590,7 +8595,7 @@
 	pop hl
 	pop bc
 	dec b
-	jr nz, .asm_3f68e
+	jr nz, .clear
 	ret
 ; 3f69e
 
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -4813,7 +4813,7 @@
 	ld [$d265], a
 	ld a, $29
 	call Predef
-	ld hl, $5452
+	ld hl, TransformedTypeText
 	jp StdBattleTextBox
 .asm_35a50
 	jp Function37354
@@ -6224,16 +6224,16 @@
 
 Function36281: ; 36281
 	ld bc, $c6fe
-	ld hl, $7447
+	ld hl, Function3f447
 	ld a, [hBattleTurn]
 	and a
 	jr z, .asm_36292 ; 0x3628a $6
 	ld bc, $c6fa
-	ld hl, $7486
+	ld hl, Function3f486
 .asm_36292
-	ld a, $c
+	ld a, BATTLE_VARS_MOVE_ANIM
 	call GetBattleVar
-	cp $6b
+	cp MINIMIZE
 	ret nz
 	ld a, $1
 	ld [bc], a
@@ -6800,11 +6800,11 @@
 
 
 BattleCommanda6: ; 365af
-	ld hl, $743d
+	ld hl, Function3f43d
 	ld a, [hBattleTurn]
 	and a
 	jr z, .asm_365ba ; 365b5 $3
-	ld hl, $747c
+	ld hl, Function3f47c
 .asm_365ba
 	xor a
 	ld [$ffd4], a
@@ -6814,11 +6814,11 @@
 
 
 BattleCommanda7: ; 365c3
-	ld hl, $7447
+	ld hl, Function3f447
 	ld a, [hBattleTurn]
 	and a
 	jr z, .asm_365ce ; 365c9 $3
-	ld hl, $7486
+	ld hl, Function3f486
 .asm_365ce
 	xor a
 	ld [$ffd4], a
@@ -9709,7 +9709,7 @@
 	ld b, 1
 	call GetSGBLayout
 	call Function32f9
-	call Function37a67
+	call BatonPass_LinkPlayerSwitch
 
 ; Mobile link battles handle entrances differently
 	callba Function3d2e0
@@ -9726,7 +9726,7 @@
 
 ; Wildmons don't have anything to switch to
 	ld a, [IsInBattle]
-	dec a
+	dec a ; WILDMON
 	jp z, FailedBatonPass
 
 	call CheckAnyOtherAliveEnemyMons
@@ -9734,7 +9734,7 @@
 
 	call UpdateEnemyMonInParty
 	call AnimateCurrentMove
-	call Function37a82
+	call BatonPass_LinkEnemySwitch
 
 ; Mobile link battles handle entrances differently
 	callba Function3d2e0
@@ -9759,7 +9759,7 @@
 ; 37a67
 
 
-Function37a67: ; 37a67
+BatonPass_LinkPlayerSwitch: ; 37a67
 	ld a, [InLinkBattle]
 	and a
 	ret z
@@ -9778,7 +9778,7 @@
 ; 37a82
 
 
-Function37a82: ; 37a82
+BatonPass_LinkEnemySwitch: ; 37a82
 	ld a, [InLinkBattle]
 	and a
 	ret z
--- a/main.asm
+++ b/main.asm
@@ -5271,10 +5271,10 @@
 	push hl
 	push de
 	dec a
-	ld hl, $5b00
-	ld bc, $0007
+	ld hl, Moves + MOVE_PP
+	ld bc, Move2 - Move1
 	call AddNTimes
-	ld a, $10
+	ld a, BANK(Moves)
 	call GetFarByte
 	pop de
 	pop hl
@@ -37807,10 +37807,10 @@
 	push hl
 	push bc
 	dec a
-	ld hl, $5b00
-	ld bc, $0007
+	ld hl, Moves + MOVE_PP
+	ld bc, Move2 - Move1
 	call AddNTimes
-	ld a, $10
+	ld a, BANK(Moves)
 	call GetFarByte
 	pop bc
 	pop hl
@@ -83077,11 +83077,11 @@
 	ret
 
 .asm_100c63
-	ld hl, $4c5b
+	ld hl, BattleText_0x80c5b
 	jr .asm_100c6b
 
 .asm_100c68
-	ld hl, $4c39
+	ld hl, BattleText_0x80c39
 
 .asm_100c6b
 	call StdBattleTextBox