Gym scaling base

This adds gym scaling for every leader, plus Koichi of the Fighting Dojo.

Me and Ema decided to give Koichi scaling, as he is a gym leader in everything but class. I will likely give Yujirou the same treatment once he's all set up.

The parties have not been set up, assuming Martha is working on them.

An important note: space is somewhat limited on trainers now, so the leaders will need implementing incrementally. You will most likely have to remove unnecessary trainers to make this work.
This commit is contained in:
May Evans 2022-12-17 20:47:39 +00:00
parent 25b61f95be
commit f4f2628f8d
13 changed files with 177 additions and 50 deletions

View file

@ -126,7 +126,24 @@ ErikaText:
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
; call InitBattleEnemyParameters ; put this back if you mess up
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_ERIKA
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld a, $4
ld [wGymLeaderNo], a
ld a, $3

View file

@ -112,7 +112,24 @@ MistyText:
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
; call InitBattleEnemyParameters ; put this back if you mess up
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_MISTY
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld a, $2
ld [wGymLeaderNo], a
xor a

View file

@ -191,7 +191,24 @@ CinnabarGymScript_758b7:
ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
; call InitBattleEnemyParameters ; put this back if you mess up
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_BLAINE
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld hl, wd72d
set 6, [hl]
set 7, [hl]

View file

@ -119,7 +119,24 @@ FightingDojoText1:
ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
; call InitBattleEnemyParameters ; put this back if you mess up
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_BLACKBELT
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld a, $3
ld [wFightingDojoCurScript], a
ld [wCurMapScript], a

View file

@ -126,7 +126,24 @@ KogaText:
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
; call InitBattleEnemyParameters ; put this back if you mess up
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_KOGA
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld a, $5
ld [wGymLeaderNo], a
xor a

View file

@ -127,7 +127,24 @@ SabrinaText:
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
; call InitBattleEnemyParameters ; put this back if you mess up
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_SABRINA
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld a, $6
ld [wGymLeaderNo], a
ld a, $3

View file

@ -134,7 +134,24 @@ LTSurgeText:
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
; call InitBattleEnemyParameters ; put this back if you mess up
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_LT_SURGE
ld [wCurOpponent], a
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
;ends here
ld a, $3
ld [wGymLeaderNo], a
xor a

View file

@ -231,7 +231,7 @@ GiovanniText:
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
call InitBattleEnemyParameters ; giovanni is deliberately not scaled as he is always fought last
ld a, $8
ld [wGymLeaderNo], a
ld a, $3