ref: e6d02b4b7b69701f223fe9100ccc21ad2089afc4
parent: 6af65df2fcc0b8018f3e9e81de25a76425ff0c3e
author: YamaArashi <shadow962@live.com>
date: Thu Jul 23 17:20:20 EDT 2015
make route22 rival events more consistent
--- a/constants/event_constants.asm
+++ b/constants/event_constants.asm
@@ -1317,9 +1317,9 @@
const EVENT_522 ; 522, (D7EB, bit 2)
const EVENT_523 ; 523, (D7EB, bit 3)
const EVENT_524 ; 524, (D7EB, bit 4)
- const EVENT_BEAT_ROUTE22_RIVAL_1ST_FIGHT ; 525, (D7EB, bit 5)
- const EVENT_BEAT_ROUTE22_RIVAL_2ND_FIGHT ; 526, (D7EB, bit 6)
- const EVENT_ROUTE22_RIVAL_WANTS_FIGHT ; 527, (D7EB, bit 7)
+ const EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE ; 525, (D7EB, bit 5)
+ const EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE ; 526, (D7EB, bit 6)
+ const EVENT_ROUTE22_RIVAL_WANTS_BATTLE ; 527, (D7EB, bit 7)
const EVENT_528 ; 528, (D7EC, bit 0)
const EVENT_529 ; 529, (D7EC, bit 1)
const EVENT_52A ; 52A, (D7EC, bit 2)
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -634,7 +634,7 @@
predef HideObject
SetEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE
ResetEventReuseHL EVENT_2ND_ROUTE22_RIVAL_BATTLE
- SetEventReuseHL EVENT_ROUTE22_RIVAL_WANTS_FIGHT
+ SetEventReuseHL EVENT_ROUTE22_RIVAL_WANTS_BATTLE
ld a, HS_ROUTE_22_RIVAL_1
ld [wcc4d], a
predef ShowObject
@@ -985,7 +985,7 @@
ld b,POKE_BALL
call IsItemInBag
jr nz, .asm_1d2e7
- CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_FIGHT
+ CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
jr nz, .asm_1d2d0
CheckEvent EVENT_GOT_POKEDEX
jr nz, .asm_1d2c8
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -72,7 +72,7 @@
ld [wcc4d], a
predef HideObject
- ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT
+ ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
; deactivate gym trainers
SetEvent EVENT_BEAT_PEWTER_GYM_TRAINER_0
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -55,7 +55,7 @@
db $FF
Route22Script0: ; 50f00 (14:4f00)
- CheckEvent EVENT_ROUTE22_RIVAL_WANTS_FIGHT
+ CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE
ret z
ld hl, .Route22RivalBattleCoords
call ArePlayerCoordsInArray
@@ -163,7 +163,7 @@
call SetSpriteFacingDirectionAndDelay
ld a, $f0
ld [wJoyIgnore], a
- SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_FIGHT
+ SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
ld a, $1
ld [hSpriteIndexOrTextID], a
call DisplayTextID
@@ -227,7 +227,7 @@
ld [wcc4d], a
predef HideObject
call PlayDefaultMusic
- ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT
+ ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
ld a, $0
ld [W_ROUTE22CURSCRIPT], a
ret
@@ -322,7 +322,7 @@
call SetSpriteFacingDirectionAndDelay
ld a, $f0
ld [wJoyIgnore], a
- SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_FIGHT
+ SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE
ld a, $2
ld [hSpriteIndexOrTextID], a
call DisplayTextID
@@ -372,7 +372,7 @@
ld [wcc4d], a
predef HideObject
call PlayDefaultMusic
- ResetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT
+ ResetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
ld a, $7
ld [W_ROUTE22CURSCRIPT], a
ret
@@ -384,7 +384,7 @@
Route22Text1: ; 5117b (14:517b)
TX_ASM
- CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_FIGHT
+ CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
jr z, .asm_5118b
ld hl, Route22RivalAfterBattleText1
call PrintText
@@ -397,7 +397,7 @@
Route22Text2: ; 51194 (14:5194)
TX_ASM
- CheckEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_FIGHT
+ CheckEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE
jr z, .asm_511a4
ld hl, Route22RivalAfterBattleText2
call PrintText
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -165,7 +165,7 @@
ld a, HS_ROUTE_22_RIVAL_2
ld [wcc4d], a
predef ShowObject
- SetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_FIGHT
+ SetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
jp ViridianGymScript_748d6
ViridianGymTextPointers: ; 749ec (1d:49ec)