shithub: pokered

Download patch

ref: 30ecbf6ea3a6cd2afc9191b2b7c49ca70e7e3777
parent: 2454296d32b078123ecfc6434e43d0cb20e12c94
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Fri Jul 17 09:27:27 EDT 2020

SONY -> RIVAL

--- a/audio/play_battle_music.asm
+++ b/audio/play_battle_music.asm
@@ -16,7 +16,7 @@
 	ld a, [wCurOpponent]
 	cp OPP_ID_OFFSET
 	jr c, .wildBattle
-	cp OPP_SONY3
+	cp OPP_RIVAL3
 	jr z, .finalBattle
 	cp OPP_LANCE
 	jr nz, .normalTrainerBattle
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -31,7 +31,7 @@
 	trainer_const TAMER         ; $16
 	trainer_const BIRD_KEEPER   ; $17
 	trainer_const BLACKBELT     ; $18
-	trainer_const SONY1         ; $19
+	trainer_const RIVAL1        ; $19
 	trainer_const PROF_OAK      ; $1A
 	trainer_const CHIEF         ; $1B
 	trainer_const SCIENTIST     ; $1C
@@ -48,8 +48,8 @@
 	trainer_const BLAINE        ; $27
 	trainer_const SABRINA       ; $28
 	trainer_const GENTLEMAN     ; $29
-	trainer_const SONY2         ; $2A
-	trainer_const SONY3         ; $2B
+	trainer_const RIVAL2        ; $2A
+	trainer_const RIVAL3        ; $2B
 	trainer_const LORELEI       ; $2C
 	trainer_const CHANNELER     ; $2D
 	trainer_const AGATHA        ; $2E
--- a/data/maps/objects/OaksLab.asm
+++ b/data/maps/objects/OaksLab.asm
@@ -8,7 +8,7 @@
 	db 0 ; signs
 
 	db 11 ; objects
-	object SPRITE_BLUE, 4, 3, STAY, NONE, 1, OPP_SONY1, 1
+	object SPRITE_BLUE, 4, 3, STAY, NONE, 1, OPP_RIVAL1, 1
 	object SPRITE_POKE_BALL, 6, 3, STAY, NONE, 2 ; person
 	object SPRITE_POKE_BALL, 7, 3, STAY, NONE, 3 ; person
 	object SPRITE_POKE_BALL, 8, 3, STAY, NONE, 4 ; person
--- a/data/maps/objects/SSAnne2F.asm
+++ b/data/maps/objects/SSAnne2F.asm
@@ -16,7 +16,7 @@
 
 	db 2 ; objects
 	object SPRITE_WAITER, 3, 7, WALK, 1, 1 ; person
-	object SPRITE_BLUE, 36, 4, STAY, DOWN, 2, OPP_SONY1, 1
+	object SPRITE_BLUE, 36, 4, STAY, DOWN, 2, OPP_RIVAL1, 1
 
 	; warp-to
 	warp_to 9, 11, SS_ANNE_2F_WIDTH ; SS_ANNE_2F_ROOMS
--- a/data/trainers/move_choices.asm
+++ b/data/trainers/move_choices.asm
@@ -32,7 +32,7 @@
 	move_choices 1       ; TAMER
 	move_choices 1       ; BIRD_KEEPER
 	move_choices 1       ; BLACKBELT
-	move_choices 1       ; SONY1
+	move_choices 1       ; RIVAL1
 	move_choices 1, 3    ; PROF_OAK
 	move_choices 1, 2    ; CHIEF
 	move_choices 1, 2    ; SCIENTIST
@@ -49,8 +49,8 @@
 	move_choices 1, 3    ; BLAINE
 	move_choices 1, 3    ; SABRINA
 	move_choices 1, 2    ; GENTLEMAN
-	move_choices 1, 3    ; SONY2
-	move_choices 1, 3    ; SONY3
+	move_choices 1, 3    ; RIVAL2
+	move_choices 1, 3    ; RIVAL3
 	move_choices 1, 2, 3 ; LORELEI
 	move_choices 1       ; CHANNELER
 	move_choices 1       ; AGATHA
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -921,7 +921,7 @@
 	ld b, MUSIC_DEFEATED_TRAINER
 .gymleader
 	ld a, [wTrainerClass]
-	cp SONY3 ; final battle against rival
+	cp RIVAL3 ; final battle against rival
 	jr nz, .notrival
 	ld b, MUSIC_DEFEATED_GYM_LEADER
 	ld hl, wFlags_D733
@@ -1134,7 +1134,7 @@
 	cp LINK_STATE_BATTLING
 	jr z, .notSony1Battle
 	ld a, [wCurOpponent]
-	cp OPP_SONY1
+	cp OPP_RIVAL1
 	jr nz, .notSony1Battle
 	hlcoord 0, 0  ; sony 1 battle
 	lb bc, 8, 21
--- a/engine/battle/get_trainer_name.asm
+++ b/engine/battle/get_trainer_name.asm
@@ -5,11 +5,11 @@
 	jr nz, .foundName
 	ld hl, wRivalName
 	ld a, [wTrainerClass]
-	cp SONY1
+	cp RIVAL1
 	jr z, .foundName
-	cp SONY2
+	cp RIVAL2
 	jr z, .foundName
-	cp SONY3
+	cp RIVAL3
 	jr z, .foundName
 	ld [wd0b5], a
 	ld a, TRAINER_NAME
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -116,7 +116,7 @@
 
 ; no matches found. is this trainer champion rival?
 	ld a, b
-	cp SONY3
+	cp RIVAL3
 	jr z, .ChampionRival
 	jr .FinishUp ; nope
 .GiveTeamMoves
--- a/engine/link/cable_club.asm
+++ b/engine/link/cable_club.asm
@@ -274,7 +274,7 @@
 	jr nz, .trading
 	ld a, LINK_STATE_BATTLING
 	ld [wLinkState], a
-	ld a, OPP_SONY1
+	ld a, OPP_RIVAL1
 	ld [wCurOpponent], a
 	call ClearScreen
 	call Delay3
--- a/engine/overworld/auto_movement.asm
+++ b/engine/overworld/auto_movement.asm
@@ -286,7 +286,7 @@
 	jp SetSpriteMovementBytesToFF
 
 RivalIDs:
-	db OPP_SONY1
-	db OPP_SONY2
-	db OPP_SONY3
+	db OPP_RIVAL1
+	db OPP_RIVAL2
+	db OPP_RIVAL3
 	db -1 ; end
--- a/home/trainers.asm
+++ b/home/trainers.asm
@@ -395,11 +395,11 @@
 
 PlayTrainerMusic::
 	ld a, [wEngagedTrainerClass]
-	cp OPP_SONY1
+	cp OPP_RIVAL1
 	ret z
-	cp OPP_SONY2
+	cp OPP_RIVAL2
 	ret z
-	cp OPP_SONY3
+	cp OPP_RIVAL3
 	ret z
 	ld a, [wGymLeaderNo]
 	and a
--- a/scripts/CeruleanCity.asm
+++ b/scripts/CeruleanCity.asm
@@ -138,7 +138,7 @@
 	ld hl, CeruleanCityText_1966d
 	ld de, CeruleanCityText_19672
 	call SaveEndBattleTextPointers
-	ld a, OPP_SONY1
+	ld a, OPP_RIVAL1
 	ld [wCurOpponent], a
 
 	; select which team to use during the encounter
--- a/scripts/ChampionsRoom.asm
+++ b/scripts/ChampionsRoom.asm
@@ -64,7 +64,7 @@
 	ld hl, GaryDefeatedText
 	ld de, GaryVictoryText
 	call SaveEndBattleTextPointers
-	ld a, OPP_SONY3
+	ld a, OPP_RIVAL3
 	ld [wCurOpponent], a
 
 	; select which team to use during the encounter
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -381,7 +381,7 @@
 	ret nz
 
 	; define which team rival uses, and fight it
-	ld a, OPP_SONY1
+	ld a, OPP_RIVAL1
 	ld [wCurOpponent], a
 	ld a, [wRivalStarter]
 	cp STARTER2
--- a/scripts/PokemonTower2F.asm
+++ b/scripts/PokemonTower2F.asm
@@ -146,7 +146,7 @@
 	ld hl, PokemonTower2Text_60632
 	ld de, PokemonTower2Text_60637
 	call SaveEndBattleTextPointers
-	ld a, OPP_SONY2
+	ld a, OPP_RIVAL2
 	ld [wCurOpponent], a
 
 	; select which team to use during the encounter
--- a/scripts/Route22.asm
+++ b/scripts/Route22.asm
@@ -131,7 +131,7 @@
 	ld hl, Route22RivalDefeatedText1
 	ld de, Route22Text_511bc
 	call SaveEndBattleTextPointers
-	ld a, OPP_SONY1
+	ld a, OPP_RIVAL1
 	ld [wCurOpponent], a
 	ld hl, StarterMons_50faf
 	call Route22Script_50ed6
@@ -287,7 +287,7 @@
 	ld hl, Route22RivalDefeatedText2
 	ld de, Route22Text_511d0
 	call SaveEndBattleTextPointers
-	ld a, OPP_SONY2
+	ld a, OPP_RIVAL2
 	ld [wCurOpponent], a
 	ld hl, StarterMons_510d9
 	call Route22Script_50ed6
--- a/scripts/SSAnne2F.asm
+++ b/scripts/SSAnne2F.asm
@@ -96,7 +96,7 @@
 	ldh [hSpriteIndexOrTextID], a
 	call DisplayTextID
 	call Delay3
-	ld a, OPP_SONY2
+	ld a, OPP_RIVAL2
 	ld [wCurOpponent], a
 
 	; select which team to use during the encounter
--- a/scripts/SilphCo7F.asm
+++ b/scripts/SilphCo7F.asm
@@ -183,7 +183,7 @@
 	ld hl, SilphCo7Text14
 	ld de, SilphCo7Text_51ecd
 	call SaveEndBattleTextPointers
-	ld a, OPP_SONY2
+	ld a, OPP_RIVAL2
 	ld [wCurOpponent], a
 	ld a, [wRivalStarter]
 	cp STARTER2
--- a/wram.asm
+++ b/wram.asm
@@ -2944,7 +2944,7 @@
 ; bit 0: play time being counted
 ; bit 1: remnant of debug mode; only set by the debug build.
 ; if it is set:
-; 1. skips most of Prof. Oak's speech, and uses NINTEN as the player's name and SONY as the rival's name
+; 1. skips most of Prof. Oak's speech, and uses NINTEN as the player's name and RIVAL as the rival's name
 ; 2. does not have the player start in floor two of the player's house (instead sending them to [wLastMap])
 ; 3. allows wild battles to be avoided by holding down B
 ; furthermore, in the debug build: