Battle Tent done!

So it turns out that the code used in Factory Adventure *or* the TPP Anniversary Repository, by all accounts, should not actually work. Like, no, really, it ends up loading 0xFF as code, thus why it would always rst38. It just...doesn't...do anything. My friend Enigami, who figured out the issue, described the function as being "half-finished".

We came up with a solution that results in less functionality - now it needs a free box - but it results in less load times, so maybe it's just better this way. I doubt many people will catch that many Pokemon unless they were shooting for a living dex, which is unfeasible in its current state anyway.

I considered putting Bottle Caps in here, but it felt like making the game too grindy, so I changed it to just be in the Battle Tent shop with a very high price.
This commit is contained in:
Llinos Evans 2023-05-14 20:28:37 +01:00
parent 0397961a8b
commit 7ebb4d02a4
4 changed files with 23 additions and 26 deletions

View file

@ -287,6 +287,7 @@ Credits
* dannye33 - Assisting with crysaudio implementation
* erosunica - Assistance with developing Celadon University & Citrine City, plus sources for various subjects.
* Chatot4444 - Assisting with gym scaling code
* Enigami - Reworking the Battle Tent's RestoreTeam code to make it work properly
* ZumiIsawhat? - Restorations of beta OST
* FrenchOrange - Reconstructions of various overworld beta sprites.
* Helix Chamber, RacieBeep, loumilouminosus, Orchid, GBCRetro, & catstorm26 - Prototype Pokémon sprites

View file

@ -76,7 +76,7 @@ ItemPrices::
bcd3 0 ; LIFT_KEY
bcd3 0 ; EXP_ALL
bcd3 0 ; was OLD_ROD, now CANDY_SACK. Plan to be one-of-a-kind, so 0 to discourage sale a la Master Ball.
bcd3 5000 ; was GOOD_ROD, now BOTTLE_CAP. Sells for 5000 in SV.
bcd3 9800 ; was GOOD_ROD, now BOTTLE_CAP. Sells for 5000 in SV, but making it in-line with the Stat Exp items feels right.
bcd3 0 ; SUPER_ROD
bcd3 0 ; PP_UP
bcd3 0 ; ETHER

View file

@ -207,7 +207,7 @@ BTTrainerClassList::
db ENGINEER, SPRITE_SUPER_NERD, 4
db FISHER, SPRITE_FISHER, 3
db CUE_BALL, SPRITE_HIKER, 0
db GAMBLER, SPRITE_GAMBLER, 0
db COOLTRAINER_F, SPRITE_COOLTRAINER_F, 0
db BEAUTY, SPRITE_BEAUTY, 7
db PSYCHIC_TR, SPRITE_YOUNGSTER, 5
db ROCKER, SPRITE_ROCKER, 4

View file

@ -171,6 +171,9 @@ BattleTent_Normal:
BattleTent_RestoreTeam:
ld b, 3
; remove the current 3 team
; The original Battle Tent's removeloop effectively didn't work, so Enigami replaced it with one that does.
; However, it results in the need for compromises with box functionality.
; We don't know how the code in the port managed to function - it's possible the streamed version was different.
.removeloop
push bc
xor a
@ -180,13 +183,9 @@ BattleTent_RestoreTeam:
pop bc
dec b
jr nz, .removeloop
ld a, [wBTOrder+1]
swap a
and $7
ld b, a
ld a, [wBoxCount]
sub b
ld c, a
ld b, a
ld c, 0
; withdraw all party 'mons from the box
.withdloop
@ -438,11 +437,9 @@ BattleTentGuy:
ld hl, BattleTentNotEnough
jr c, .finalskip
; box space check
ld a, [wPartyCount]
ld b, a
; Due to the way the loops have changed, and the weird old function, the Battle Tent now requires a free box to work.
ld a, [wBoxCount]
add b
cp MONS_PER_BOX + 1
cp 1
ld hl, BattleTentNoBoxTmp
jr c, .skip2
.finalskip
@ -717,14 +714,13 @@ BattleTentNotEnough:
BattleTentNoBoxTmp:
text "..whoops! your"
line "current #MON"
cont "BOX does not"
cont "have enough"
cont "space!"
cont "BOX needs to"
cont "be empty!"
para "We need to"
line "store all of your"
cont "party's #MON"
cont "into the box."
cont "into a BOX."
para "Try changing"
line "or emptying it."
@ -810,6 +806,6 @@ BattleTentGuy2_Heal:
; Battle Tent
BattleTentMart::
script_mart POTION, SUPER_POTION, HYPER_POTION, REVIVE, FULL_HEAL, POKE_DOLL, X_ATTACK, X_DEFEND, X_SPEED, X_SPECIAL
script_mart FULL_RESTORE, MAX_REVIVE, FULL_HEAL, BOTTLE_CAP, POKE_DOLL, X_ATTACK, X_DEFEND, X_SPEED, X_SPECIAL, GUARD_SPEC
INCLUDE "engine/battletentdata.asm"