shithub: pokecrystal

Download patch

ref: 5eed48f05d3634146deb2442cd8f62bbad0ae352
parent: 1205fe5100c09624350b5e6822b4c063586afcaf
author: PikalaxALT <[email protected]>
date: Thu Nov 5 14:13:09 EST 2015

Some battle labels

--- a/battle/ai/items.asm
+++ b/battle/ai/items.asm
@@ -163,9 +163,9 @@
 	and a
 	ret nz
 
-	ld a, [wc650]
+	ld a, [wEnemyTrainerItem1]
 	ld b, a
-	ld a, [wc651]
+	ld a, [wEnemyTrainerItem2]
 	or b
 	ret z
 
@@ -180,7 +180,7 @@
 	ld b, h
 	ld c, l
 	ld hl, AI_Items
-	ld de, wc650
+	ld de, wEnemyTrainerItem1
 .loop
 	ld a, [hl]
 	and a
@@ -233,7 +233,7 @@
 	xor a
 	ld [EnemyFuryCutterCount], a
 	ld [EnemyProtectCount], a
-	ld [wc72c], a
+	ld [wEnemyRageCounter], a
 
 	ld hl, EnemySubStatus4
 	res SUBSTATUS_RAGE, [hl]
@@ -706,7 +706,7 @@
 	res SUBSTATUS_RAGE, [hl]
 	xor a
 	ld [hBattleTurn], a
-	callab Function3dc5b
+	callab PursuitSwitch
 	push af
 	ld a, [CurOTMon]
 	ld hl, OTPartyMon1Status
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -1343,11 +1343,11 @@
 
 ; Encourage this move based on Rage's counter.	
 .asm_38b8c
-	ld a, [wc72c]
+	ld a, [wEnemyRageCounter]
 	cp $2
 	ret c
 	dec [hl]
-	ld a, [wc72c]
+	ld a, [wEnemyRageCounter]
 	cp $3
 	ret c
 	dec [hl]
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -458,23 +458,24 @@
 Function3c314: ; 3c314
 	ld a, [wLinkMode]
 	and a
-	jr z, .asm_3c35b
+	jr z, .skip_ai
 	ld a, [wBattleAction]
 	cp $e
-	jr z, .asm_3c35b
+	jr z, .skip_ai
 	cp $d
-	jr z, .asm_3c35b
+	jr z, .skip_ai
 	sub NUM_MOVES
-	jr c, .asm_3c35b
+	jr c, .skip_ai
 	ld a, [wd0ec]
 	cp $2
-	jr nz, .asm_3c34c
+	jr nz, .switch
 	ld a, [$ffcb]
 	cp $2
 	jr z, .asm_3c341
+
 	call BattleRandom
 	cp 1 + (50 percent)
-	jp c, .asm_3c3f1
+	jp c, .done
 	jp Function3c3f3
 
 .asm_3c341
@@ -481,21 +482,21 @@
 	call BattleRandom
 	cp 1 + (50 percent)
 	jp c, Function3c3f3
-	jp .asm_3c3f1
+	jp .done
 
-.asm_3c34c
+.switch
 	callab AI_Switch
 	call SetEnemyTurn
 	call SpikesDamage
 	jp Function3c3f3
 
-.asm_3c35b
+.skip_ai
 	ld a, [wd0ec]
 	and a
-	jp nz, .asm_3c3f1
+	jp nz, .done
 	call CompareMovePriority
 	jr z, .asm_3c36d
-	jp c, .asm_3c3f1
+	jp c, .done
 	jp Function3c3f3
 
 .asm_3c36d
@@ -513,7 +514,7 @@
 	call BattleRandom
 	cp e
 	jr nc, .asm_3c3c5
-	jp .asm_3c3f1
+	jp .done
 
 .asm_3c391
 	ld a, b
@@ -533,13 +534,13 @@
 	jp c, Function3c3f3
 	call BattleRandom
 	cp e
-	jp c, .asm_3c3f1
+	jp c, .done
 	jr .asm_3c3c5
 
 .asm_3c3b5
 	call BattleRandom
 	cp e
-	jp c, .asm_3c3f1
+	jp c, .done
 	call BattleRandom
 	cp c
 	jp c, Function3c3f3
@@ -551,7 +552,7 @@
 	ld c, $2
 	call StringCmp
 	jr z, .asm_3c3d8
-	jp nc, .asm_3c3f1
+	jp nc, .done
 	jp Function3c3f3
 
 .asm_3c3d8
@@ -560,7 +561,7 @@
 	jr z, .asm_3c3e9
 	call BattleRandom
 	cp 1 + (50 percent)
-	jp c, .asm_3c3f1
+	jp c, .done
 	jp Function3c3f3
 
 .asm_3c3e9
@@ -567,7 +568,7 @@
 	call BattleRandom
 	cp 1 + (50 percent)
 	jp c, Function3c3f3
-.asm_3c3f1
+.done
 	scf
 	ret
 ; 3c3f3
@@ -678,7 +679,7 @@
 	ld hl, PlayerSubStatus4
 	res SUBSTATUS_RAGE, [hl]
 	xor a
-	ld [wc72b], a
+	ld [wPlayerRageCounter], a
 
 .asm_3c4a4
 	ld a, [wPlayerMoveStruct + MOVE_EFFECT]
@@ -698,7 +699,7 @@
 	xor a
 	ld [PlayerFuryCutterCount], a
 	ld [PlayerProtectCount], a
-	ld [wc72b], a
+	ld [wPlayerRageCounter], a
 	ld hl, PlayerSubStatus4
 	res SUBSTATUS_RAGE, [hl]
 
@@ -711,7 +712,7 @@
 	xor a
 	ld [PlayerFuryCutterCount], a
 	ld [PlayerProtectCount], a
-	ld [wc72b], a
+	ld [wPlayerRageCounter], a
 	ld hl, PlayerSubStatus4
 	res SUBSTATUS_RAGE, [hl]
 	xor a
@@ -3798,7 +3799,7 @@
 	ld [EnemyDisableCount], a
 	ld [EnemyFuryCutterCount], a
 	ld [EnemyProtectCount], a
-	ld [wc72c], a
+	ld [wEnemyRageCounter], a
 	ld [EnemyDisabledMove], a
 	ld [wc6fa], a
 	ld [wc730], a
@@ -4301,7 +4302,7 @@
 	ld [PlayerDisableCount], a
 	ld [PlayerFuryCutterCount], a
 	ld [PlayerProtectCount], a
-	ld [wc72b], a
+	ld [wPlayerRageCounter], a
 	ld [DisabledMove], a
 	ld [wc6fe], a
 	ld [wc731], a
@@ -4361,7 +4362,7 @@
 	jp [hl]
 ; 3dc5b
 
-Function3dc5b: ; 3dc5b
+PursuitSwitch: ; 3dc5b
 	ld a, BATTLE_VARS_MOVE
 	call GetBattleVar
 	ld b, a
@@ -4368,7 +4369,7 @@
 	call GetMoveEffect
 	ld a, b
 	cp EFFECT_PURSUIT
-	jr nz, .asm_3dce4
+	jr nz, .done
 
 	ld a, [CurBattleMon]
 	push af
@@ -4376,11 +4377,11 @@
 	ld hl, DoPlayerTurn
 	ld a, [hBattleTurn]
 	and a
-	jr z, .asm_3dc7e
+	jr z, .do_turn
 	ld hl, DoEnemyTurn
 	ld a, [LastPlayerMon]
 	ld [CurBattleMon], a
-.asm_3dc7e
+.do_turn
 	ld a, BANK(DoPlayerTurn)
 	rst FarCall
 
@@ -4394,7 +4395,7 @@
 
 	ld a, [hBattleTurn]
 	and a
-	jr z, .asm_3dcc0
+	jr z, .check_enemy_fainted
 
 	ld a, [LastPlayerMon]
 	call UpdateBattleMon
@@ -4401,7 +4402,7 @@
 	ld hl, BattleMonHP
 	ld a, [hli]
 	or [hl]
-	jr nz, .asm_3dce4
+	jr nz, .done
 
 	ld a, $f0
 	ld [CryTracks], a
@@ -4414,13 +4415,13 @@
 	predef FlagPredef
 	call PlayerMonFaintedAnimation
 	ld hl, BattleText_PkmnFainted
-	jr .asm_3dcdf
+	jr .done_fainted
 
-.asm_3dcc0
+.check_enemy_fainted
 	ld hl, EnemyMonHP
 	ld a, [hli]
 	or [hl]
-	jr nz, .asm_3dce4
+	jr nz, .done
 
 	ld de, SFX_KINESIS
 	call PlaySFX
@@ -4431,12 +4432,12 @@
 	call EnemyMonFaintedAnimation
 	ld hl, BattleText_EnemyPkmnFainted
 
-.asm_3dcdf
+.done_fainted
 	call StdBattleTextBox
 	scf
 	ret
 
-.asm_3dce4
+.done
 	and a
 	ret
 ; 3dce6
@@ -5510,7 +5511,7 @@
 	res SUBSTATUS_RAGE, [hl]
 
 	call SetEnemyTurn
-	call Function3dc5b
+	call PursuitSwitch
 	jr c, .ok
 	call Function3dce6
 .ok
@@ -6187,7 +6188,7 @@
 	ld hl, EnemySubStatus4
 	res SUBSTATUS_RAGE, [hl]
 	xor a
-	ld [wc72c], a
+	ld [wEnemyRageCounter], a
 
 .asm_3e8af
 	ld a, [wEnemyMoveStruct + MOVE_EFFECT]
@@ -6208,7 +6209,7 @@
 	xor a
 	ld [EnemyFuryCutterCount], a
 	ld [EnemyProtectCount], a
-	ld [wc72c], a
+	ld [wEnemyRageCounter], a
 	ld hl, EnemySubStatus4
 	res SUBSTATUS_RAGE, [hl]
 	ret
@@ -8483,10 +8484,10 @@
 	ld [hBGMapMode], a
 	call EmptyBattleTextBox
 	hlcoord 9, 7
-	ld bc, 5 << 8 + 11
+	lb bc, 5, 11
 	call ClearBox
 	hlcoord 1, 0
-	ld bc, 4 << 8 + 10
+	lb bc, 4, 10
 	call ClearBox
 	call ClearSprites
 	ld a, [wBattleMode]
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -3295,12 +3295,12 @@
 	bit SUBSTATUS_RAGE, a
 	ret z
 
-	ld de, wc72c
+	ld de, wEnemyRageCounter
 	ld a, [hBattleTurn]
 	and a
-	jr z, .asm_3526b
-	ld de, wc72b
-.asm_3526b
+	jr z, .player
+	ld de, wPlayerRageCounter
+.player
 	ld a, [de]
 	inc a
 	ret z
@@ -3324,9 +3324,9 @@
 	ld c, a
 	ld a, [hBattleTurn]
 	and a
-	ld a, [wc72b]
+	ld a, [wPlayerRageCounter]
 	jr z, .asm_35290
-	ld a, [wc72c]
+	ld a, [wEnemyRageCounter]
 .asm_35290
 	and a
 	jr z, .asm_3529a
--- a/home/map.asm
+++ b/home/map.asm
@@ -1398,7 +1398,7 @@
 	call FarDecompress
 	ld hl, w6_d000
 	ld de, VTiles2
-	ld bc, $0600
+	ld bc, $60 tiles
 	call CopyBytes
 	ld a, [rVBK]
 	push af
@@ -1406,7 +1406,7 @@
 	ld [rVBK], a
 	ld hl, w6_d600
 	ld de, VTiles2
-	ld bc, $0600
+	ld bc, $60 tiles
 	call CopyBytes
 	pop af
 	ld [rVBK], a
--- a/main.asm
+++ b/main.asm
@@ -32413,7 +32413,7 @@
 	ld hl, TrainerClassAttributes
 	ld bc, NUM_TRAINER_ATTRIBUTES
 	call AddNTimes
-	ld de, wc650
+	ld de, wEnemyTrainerItem1
 	ld a, [hli]
 	ld [de], a
 	inc de
--- a/wram.asm
+++ b/wram.asm
@@ -455,8 +455,8 @@
 
 wc64d:: ds 1
 wc64e:: ds 2
-wc650:: ds 1
-wc651:: ds 1
+wEnemyTrainerItem1:: ds 1
+wEnemyTrainerItem2:: ds 1
 wc652:: ds 4
 wc656::
 OTName:: ds NAME_LENGTH ; c656
@@ -818,8 +818,8 @@
 wc724:: ds 3
 wc727:: ds 2
 wc729:: ds 2
-wc72b:: ds 1
-wc72c:: ds 1
+wPlayerRageCounter:: ds 1
+wEnemyRageCounter:: ds 1
 wc72d:: ds 1 ; if 0 then PrintButItFailed
 wc72e:: ds 1
 wc72f:: ds 1