TECHNOLOGY IS INCREDIBLE!

With me moving the Trainer AI elsewhere, I was able to optimise the party stuff a little bit. There's a lot more space and from what I can tell it works fine.

There are now three separate files - one for standard trainers, one for the rival & oak, and one for scaled parties (aka gym battles and related). This is mainly for organisational purposes.

If I run out of space again, I'll rework the Trainer AI script to pull parties another way, storing the party files in individual banks.
This commit is contained in:
Llinos Evans 2023-04-04 20:56:48 +01:00
parent c9b4c2acb9
commit c7510aea57
5 changed files with 223 additions and 203 deletions

View file

@ -102,7 +102,7 @@ FightingDojoTrainerHeader3:
trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_3, 3, FightingDojoBattleText4, FightingDojoEndBattleText4, FightingDojoAfterBattleText4
db -1 ; end
FightingDojoText1: ; gym scaling was removed to make space
FightingDojoText1: ; gym scaling can be removed to make space
text_asm
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
jp nz, .continue1
@ -119,7 +119,24 @@ FightingDojoText1: ; gym scaling was removed to make space
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