Merge pull request #312 from JimB16/master

Added comments and changed labels (mainly for BattleTower)
This commit is contained in:
yenatch
2015-09-09 16:02:55 -04:00
21 changed files with 961 additions and 786 deletions

View File

@@ -1,4 +1,4 @@
Function38000: ; 38000
AI_SwitchOrTryItem: ; 38000
and a
ld a, [IsInBattle]
@@ -21,7 +21,7 @@ Function38000: ; 38000
jr nz, DontSwitch
ld hl, TrainerClassAttributes + 5
ld a, [wcfc0]
ld a, [InBattleTowerBattle] ; Load always the first TrainerClass for BattleTower-Trainers
and a
jr nz, .ok
ld a, [TrainerClass]
@@ -73,6 +73,7 @@ SwitchOften: ; 38045
ld a, [wc717]
and $f
inc a
; In register 'a' is the number (1-6) of the Pkmn to switch to
ld [wc718], a
jp AI_TrySwitch
; 38083
@@ -148,7 +149,7 @@ SwitchSometimes: ; 380c1
; 380ff
Function380ff: ; 380ff
CheckSubstatusCantRun: ; 380ff
ld a, [EnemySubStatus5]
bit SUBSTATUS_CANT_RUN, a
ret
@@ -156,7 +157,8 @@ Function380ff: ; 380ff
AI_TryItem: ; 38105
ld a, [wcfc0]
; items are not allowed in the BattleTower
ld a, [InBattleTowerBattle]
and a
ret nz
@@ -565,7 +567,7 @@ Function383a3: ; 383a3 (e:43a3)
call AIUsedItemSound
call AI_HealStatus
ld a, FULL_HEAL
jp Function38568
jp PrintText_UsedItemOn_AND_AIUpdateHUD
Function383ae: ; 383ae (e:43ae)
ld a, MAX_POTION
@@ -658,7 +660,7 @@ Function383f8: ; 383f8
.asm_38436
Function38436: ; 38436
call Function38571
call PrintText_UsedItemOn
hlcoord 2, 2
xor a
ld [wd10a], a
@@ -715,7 +717,7 @@ AI_Switch: ; 3846c
call CopyBytes
pop af
jr c, .asm_384a3
ld hl, UnknownText_0x384d0
ld hl, TextJump_EnemyWithdrew
call PrintText
.asm_384a3
ld a, $1
@@ -735,8 +737,8 @@ AI_Switch: ; 3846c
ret
; 384d0
UnknownText_0x384d0: ; 384d0
text_jump UnknownText_0x1bcf9c
TextJump_EnemyWithdrew: ; 384d0
text_jump Text_EnemyWithdrew
db "@"
; 384d5
@@ -744,7 +746,7 @@ Function384d5: ; 384d5
call AIUsedItemSound
call AI_HealStatus
ld a, FULL_HEAL_RED
jp Function38568
jp PrintText_UsedItemOn_AND_AIUpdateHUD
; 384e0
AI_HealStatus: ; 384e0
@@ -765,7 +767,7 @@ Function384f7: ; 384f7
ld hl, EnemySubStatus4
set SUBSTATUS_X_ACCURACY, [hl]
ld a, X_ACCURACY
jp Function38568
jp PrintText_UsedItemOn_AND_AIUpdateHUD
; 38504
Function38504: ; 38504
@@ -773,7 +775,7 @@ Function38504: ; 38504
ld hl, EnemySubStatus4
set SUBSTATUS_MIST, [hl]
ld a, GUARD_SPEC
jp Function38568
jp PrintText_UsedItemOn_AND_AIUpdateHUD
; 38511
Function38511: ; 38511
@@ -781,7 +783,7 @@ Function38511: ; 38511
ld hl, EnemySubStatus4
set SUBSTATUS_FOCUS_ENERGY, [hl]
ld a, DIRE_HIT
jp Function38568
jp PrintText_UsedItemOn_AND_AIUpdateHUD
; 3851e
Function3851e: ; 3851e
@@ -832,23 +834,29 @@ Function38553: ; 38553
ld b, SP_ATTACK
ld a, X_SPECIAL
; Parameter
; a = ITEM_CONSTANT
; b = BATTLE_CONSTANT (ATTACK, DEFENSE, SPEED, SP_ATTACK, SP_DEFENSE, ACCURACY, EVASION)
Function38557:
ld [wd1f1], a
push bc
call Function38571
call PrintText_UsedItemOn
pop bc
callba Function361ef
jp AIUpdateHUD
; 38568
Function38568: ; 38568
; Parameter
; a = ITEM_CONSTANT
PrintText_UsedItemOn_AND_AIUpdateHUD: ; 38568
ld [wd1f1], a
call Function38571
call PrintText_UsedItemOn
jp AIUpdateHUD
; 38571
Function38571: ; 38571
PrintText_UsedItemOn: ; 38571
ld a, [wd1f1]
ld [wd265], a
call GetItemName
@@ -856,11 +864,11 @@ Function38571: ; 38571
ld de, wd050
ld bc, ITEM_NAME_LENGTH
call CopyBytes
ld hl, UnknownText_0x3858c
ld hl, TextJump_EnemyUsedOn
jp PrintText
; 3858c
UnknownText_0x3858c: ; 3858c
text_jump UnknownText_0x1bcfaf
TextJump_EnemyUsedOn: ; 3858c
text_jump Text_EnemyUsedOn
db "@"
; 38591

File diff suppressed because it is too large Load Diff

View File

@@ -700,7 +700,7 @@ BattleCommand02: ; 343db
and a
ret nz
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a
ret nz
@@ -1458,37 +1458,37 @@ BattleCommand07: ; 346d2
ld [AttackMissed], a
xor a
.asm_34775
ld [$ffb7], a
ld [hMultiplier], a
add b
ld [TypeModifier], a
xor a
ld [$ffb4], a
ld [hMultiplicand + 0], a
ld hl, CurDamage
ld a, [hli]
ld [$ffb5], a
ld [hMultiplicand + 1], a
ld a, [hld]
ld [$ffb6], a
ld [hMultiplicand + 2], a
call Multiply
ld a, [$ffb4]
ld a, [hProduct + 1]
ld b, a
ld a, [$ffb5]
ld a, [hProduct + 2]
or b
ld b, a
ld a, [$ffb6]
ld a, [hProduct + 3]
or b
jr z, .asm_347ab
ld a, $a
ld [$ffb7], a
ld [hDivisor], a
ld b, $4
call Divide
ld a, [$ffb5]
ld a, [hQuotient + 1]
ld b, a
ld a, [$ffb6]
ld a, [hQuotient + 2]
or b
jr nz, .asm_347ab
@@ -1572,11 +1572,11 @@ Function347d3: ; 347d3
jr .asm_347e7
.asm_3480b
xor a
ld [$ffb3], a
ld [$ffb4], a
ld [$ffb5], a
ld [hDividend + 0], a
ld [hMultiplicand + 0], a
ld [hMultiplicand + 1], a
ld a, [hli]
ld [$ffb6], a
ld [hMultiplicand + 2], a
ld a, [wd265]
ld [hMultiplier], a
call Multiply
@@ -1586,7 +1586,7 @@ Function347d3: ; 347d3
ld b, 4
call Divide
pop bc
ld a, [$ffb6]
ld a, [hQuotient + 2]
ld [wd265], a
jr .asm_347e7
@@ -2305,12 +2305,12 @@ BattleCommand08: ; 34cfd
.go
; Start with the maximum damage.
xor a
ld [$ffb4], a
ld [hMultiplicand + 0], a
dec hl
ld a, [hli]
ld [$ffb5], a
ld [hMultiplicand + 1], a
ld a, [hl]
ld [$ffb6], a
ld [hMultiplicand + 2], a
; Multiply by 85-100%...
.loop
@@ -2319,20 +2319,20 @@ BattleCommand08: ; 34cfd
cp $d9 ; 85%
jr c, .loop
ld [$ffb7], a
ld [hMultiplier], a
call Multiply
; ...divide by 100%...
ld a, $ff ; 100%
ld [$ffb7], a
ld [hDivisor], a
ld b, $4
call Divide
; ...to get .85-1.00x damage.
ld a, [$ffb5]
ld a, [hQuotient + 1]
ld hl, CurDamage
ld [hli], a
ld a, [$ffb6]
ld a, [hQuotient + 2]
ld [hl], a
ret
; 34d32
@@ -2594,10 +2594,10 @@ BattleCommand09: ; 34d32
sub c
ld c, a
xor a
ld [$ffb4], a
ld [$ffb5], a
ld [hMultiplicand + 0], a
ld [hMultiplicand + 1], a
ld a, [hl]
ld [$ffb6], a
ld [hMultiplicand + 2], a
push hl
ld d, $2
@@ -2611,15 +2611,15 @@ BattleCommand09: ; 34d32
add hl, bc
pop bc
ld a, [hli]
ld [$ffb7], a
ld [hMultiplier], a
call Multiply
ld a, [hl]
ld [$ffb7], a
ld [hDivisor], a
ld b, $4
call Divide
ld a, [$ffb6]
ld a, [hQuotient + 2]
ld b, a
ld a, [$ffb5]
ld a, [hQuotient + 1]
or b
jr nz, .asm_34ea2
ld [$ffb5], a
@@ -3841,7 +3841,7 @@ BattleCommanda1: ; 35461
and a
jr nz, .asm_35532
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a
jr nz, .asm_35532
@@ -4344,18 +4344,18 @@ BattleCommand3f: ; 35726
.asm_3579d
xor a
ld [$ffb3], a
ld [$ffb4], a
ld [hMultiplicand + 0], a
ld a, [hli]
ld [$ffb5], a
ld [hMultiplicand + 1], a
ld a, [hli]
ld [$ffb6], a
ld [hMultiplicand + 2], a
ld a, $30
ld [$ffb7], a
ld [hMultiplier], a
call Multiply
ld a, [hli]
ld b, a
ld a, [hl]
ld [$ffb7], a
ld [hDivisor], a
ld a, b
and a
jr z, .asm_357d6
@@ -4365,22 +4365,22 @@ BattleCommand3f: ; 35726
rr a
srl b
rr a
ld [$ffb7], a
ld a, [$ffb5]
ld [hDivisor], a
ld a, [hProduct + 2]
ld b, a
srl b
ld a, [$ffb6]
ld a, [hProduct + 3]
rr a
srl b
rr a
ld [$ffb6], a
ld [hDividend + 3], a
ld a, b
ld [$ffb5], a
ld [hDividend + 2], a
.asm_357d6
ld b, $4
call Divide
ld a, [$ffb6]
ld a, [hQuotient + 2]
ld b, a
ld hl, .FlailPower
@@ -5544,7 +5544,7 @@ BattleCommand14: ; 35e5c
call AnimateCurrentMove
ld b, $7
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a
jr z, .asm_35ea4
ld b, $3
@@ -5587,7 +5587,7 @@ Function35ece: ; 35ece
and a
jr nz, .asm_35eec
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a
jr nz, .asm_35eec
@@ -5676,18 +5676,23 @@ BattleCommand2f: ; 35f2c
call GetBattleVar
and a
jr nz, .asm_35fb8
ld a, [hBattleTurn]
and a
jr z, .asm_35f89
ld a, [InLinkBattle]
and a
jr nz, .asm_35f89
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a
jr nz, .asm_35f89
ld a, [PlayerSubStatus5]
bit SUBSTATUS_LOCK_ON, a
jr nz, .asm_35f89
call BattleRandom
cp $40
jr c, .asm_35fb8
@@ -6323,11 +6328,12 @@ BattleCommand1d: ; 362e3
ld a, [hBattleTurn]
and a
jr z, .DidntMiss
ld a, [InLinkBattle]
and a
jr nz, .DidntMiss
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a
jr nz, .DidntMiss
@@ -6868,7 +6874,7 @@ rept 2
endr
xor a
ld [hMultiplicand], a
ld [hMultiplicand + 0], a
ld a, [de]
ld [hMultiplicand + 1], a
inc de
@@ -8168,18 +8174,23 @@ BattleCommand30: ; 36dc7
ld a, [hBattleTurn]
and a
jr z, .asm_36e0e
ld a, [InLinkBattle]
and a
jr nz, .asm_36e0e
ld a, [wcfc0]
ld a, [InBattleTowerBattle]
and a
jr nz, .asm_36e0e
ld a, [PlayerSubStatus5]
bit SUBSTATUS_LOCK_ON, a
jr nz, .asm_36e0e
call BattleRandom
cp $40
jr c, .asm_36e52
.asm_36e0e
ld a, BATTLE_VARS_STATUS_OPP
call GetBattleVarAddr
@@ -9459,7 +9470,7 @@ BattleCommand60: ; 3784b
ld hl, EnemyMonHappiness
.ok
xor a
ld [hMultiplicand], a
ld [hMultiplicand + 0], a
ld [hMultiplicand + 1], a
ld a, [hl]
ld [hMultiplicand + 2], a
@@ -9584,18 +9595,18 @@ BattleCommand63: ; 3790e
.asm_3791a
ld a, $ff
sub [hl]
ld [$ffb6], a
ld [hMultiplicand + 2], a
xor a
ld [$ffb4], a
ld [$ffb5], a
ld [hMultiplicand + 0], a
ld [hMultiplicand + 1], a
ld a, 10
ld [$ffb7], a
ld [hMultiplier], a
call Multiply
ld a, 25
ld [$ffb7], a
ld [hDivisor], a
ld b, 4
call Divide
ld a, [$ffb6]
ld a, [hQuotient + 2]
ld d, a
pop bc
ret

View File

@@ -108,3 +108,8 @@ const_value = 1
const MOM_ITEM
const MOM_DOLL
BATTLETOWER_PKMNSTRUCTLENGTH EQU $30
BATTLETOWER_NROFPKMNS EQU 3
BATTLETOWER_TRAINERDATALENGTH EQU $24
BATTLETOWER_NROFTRAINERS EQU 7

View File

@@ -1,24 +1,31 @@
Function1f8000: ; 1f8000
Function_LoadOpponentTrainerAndPokemons: ; 1f8000
ld a, [rSVBK]
push af
ld a, $3
ld [rSVBK], a
; Fill BT_OTrainer with zeros
xor a
ld hl, w3_d100
ld bc, $00e0
ld hl, BT_OTrainer
ld bc, BT_OTrainerEnd - BT_OTrainer
call ByteFill
; Write $ff into the Item-Slots
ld a, $ff
ld [w3_d100 + $0c], a
ld [w3_d100 + $47], a
ld [w3_d100 + $82], a
ld de, w3_d100
ld [BT_OTPkmn1Item], a
ld [BT_OTPkmn2Item], a
ld [BT_OTPkmn3Item], a
; Set BT_OTTrainer as start address to write the following data to
ld de, BT_OTrainer
ld a, [hRandomAdd]
ld b, a
.asm_1f8022
.asm_1f8022 ; loop to find a random trainer
call Random
ld a, [hRandomAdd]
add b
ld b, a
ld b, a ; b contains the nr of the trainer
IF DEF(CRYSTAL11)
and $7f
cp $46
@@ -28,38 +35,46 @@ ELSE
ENDC
jr nc, .asm_1f8022
ld b, a
ld a, BANK(sbe46)
ld a, BANK(sNrOfBeatenBattleTowerTrainers)
call GetSRAMBank
ld c, $7
ld hl, sbe48
ld c, BATTLETOWER_NROFTRAINERS
ld hl, sBTTrainers
.asm_1f803a
ld a, [hli]
cp b
jr z, .asm_1f8022
dec c
jr nz, .asm_1f803a
ld hl, sbe48
ld a, [sbe46]
jr nz, .asm_1f803a ; c <= 7 initialise all 7 trainers?
ld hl, sBTTrainers
ld a, [sNrOfBeatenBattleTowerTrainers]
ld c, a
ld a, b
ld b, 0
add hl, bc
ld [hl], a
call CloseSRAM
push af
; Copy name (10 bytes) and class (1 byte) of trainer
ld hl, BattleTowerTrainers
ld bc, 11
call AddNTimes
ld bc, 11
call CopyBytes
call Function1f8081
call Function_LoadRandomBattleTowerPkmn
pop af
ld hl, Unknown_1f0000
ld bc, $0024
ld hl, BattleTowerTrainerData
ld bc, BATTLETOWER_TRAINERDATALENGTH
call AddNTimes
ld bc, $0024
ld bc, BATTLETOWER_TRAINERDATALENGTH
.asm_1f8070
ld a, BANK(Unknown_1f0000)
ld a, BANK(BattleTowerTrainerData)
call GetFarByte
ld [de], a
inc hl
@@ -68,20 +83,24 @@ ENDC
ld a, b
or c
jr nz, .asm_1f8070
pop af
ld [rSVBK], a
ret
; 1f8081
Function1f8081: ; 1f8081
ld c, $3
ret
Function_LoadRandomBattleTowerPkmn: ; 1f8081
ld c, BATTLETOWER_NROFPKMNS
.loop
push bc
ld a, BANK(sbe51)
ld a, BANK(sBTPkmnPrevTrainer1)
call GetSRAMBank
.asm_1f8089
ld a, [$d800]
.FindARandomBattleTowerPkmn
; From Which LevelGroup are the Pkmn loaded
; a = 1..10
ld a, [wBTChoiceOfLvlGroup] ; [$d800]
dec a
ld hl, BattleTowerMons
ld bc, BattleTowerMons2 - BattleTowerMons1
@@ -97,60 +116,65 @@ Function1f8081: ; 1f8081
and $1f
cp (BattleTowerMons2 - BattleTowerMons1) / ($3b)
jr nc, .asm_1f8099
; in register 'a' is the chosen Pkmn of the LevelGroup
ld bc, $3b
; Check if Pkmn was already loaded before
; Check current and the 2 previous teams
; includes check if item is double at the current team
ld bc, BATTLETOWER_PKMNSTRUCTLENGTH + $b
call AddNTimes
ld a, [hli]
ld b, a
ld a, [hld]
ld c, a
ld a, [w3_d100 + $0b]
ld a, [BT_OTPkmn1]
cp b
jr z, .asm_1f8089
ld a, [w3_d100 + $0c]
jr z, .FindARandomBattleTowerPkmn
ld a, [BT_OTPkmn1Item]
cp c
jr z, .asm_1f8089
ld a, [w3_d100 + $46]
jr z, .FindARandomBattleTowerPkmn
ld a, [BT_OTPkmn2]
cp b
jr z, .asm_1f8089
ld a, [w3_d100 + $47]
jr z, .FindARandomBattleTowerPkmn
ld a, [BT_OTPkmn2Item]
cp c
jr z, .asm_1f8089
ld a, [w3_d100 + $81]
jr z, .FindARandomBattleTowerPkmn
ld a, [BT_OTPkmn3]
cp b
jr z, .asm_1f8089
ld a, [w3_d100 + $82]
jr z, .FindARandomBattleTowerPkmn
ld a, [BT_OTPkmn3Item]
cp c
jr z, .asm_1f8089
ld a, [sbe51]
jr z, .FindARandomBattleTowerPkmn
ld a, [sBTPkmnPrevTrainer1]
cp b
jr z, .asm_1f8089
ld a, [sbe52]
jr z, .FindARandomBattleTowerPkmn
ld a, [sBTPkmnPrevTrainer2]
cp b
jr z, .asm_1f8089
ld a, [sbe53]
jr z, .FindARandomBattleTowerPkmn
ld a, [sBTPkmnPrevTrainer3]
cp b
jr z, .asm_1f8089
ld a, [sbe54]
jr z, .FindARandomBattleTowerPkmn
ld a, [sBTPkmnPrevPrevTrainer1]
cp b
jr z, .asm_1f8089
ld a, [sbe55]
jr z, .FindARandomBattleTowerPkmn
ld a, [sBTPkmnPrevPrevTrainer2]
cp b
jr z, .asm_1f8089
ld a, [sbe56]
jr z, .FindARandomBattleTowerPkmn
ld a, [sBTPkmnPrevPrevTrainer3]
cp b
jr z, .asm_1f8089
jr z, .FindARandomBattleTowerPkmn
ld bc, $3b
ld bc, BATTLETOWER_PKMNSTRUCTLENGTH + $b
call CopyBytes
ld a, [wd265]
push af
push de
ld hl, -$3b
ld hl, - (BATTLETOWER_PKMNSTRUCTLENGTH + $b)
add hl, de
ld a, [hl]
ld [wd265], a
ld bc, $0030
ld bc, BATTLETOWER_PKMNSTRUCTLENGTH
add hl, bc
push hl
call GetPokemonName
@@ -159,6 +183,7 @@ Function1f8081: ; 1f8081
pop de
ld bc, PKMN_NAME_LENGTH
call CopyBytes
pop de
pop af
ld [wd265], a
@@ -166,18 +191,18 @@ Function1f8081: ; 1f8081
dec c
jp nz, .loop
ld a, [sbe51]
ld [sbe54], a
ld a, [sbe52]
ld [sbe55], a
ld a, [sbe53]
ld [sbe56], a
ld a, [w3_d100 + $0b]
ld [sbe51], a
ld a, [w3_d100 + $46]
ld [sbe52], a
ld a, [w3_d100 + $81]
ld [sbe53], a
ld a, [sBTPkmnPrevTrainer1]
ld [sBTPkmnPrevPrevTrainer1], a
ld a, [sBTPkmnPrevTrainer2]
ld [sBTPkmnPrevPrevTrainer2], a
ld a, [sBTPkmnPrevTrainer3]
ld [sBTPkmnPrevPrevTrainer3], a
ld a, [BT_OTPkmn1]
ld [sBTPkmnPrevTrainer1], a
ld a, [BT_OTPkmn2]
ld [sBTPkmnPrevTrainer2], a
ld a, [BT_OTPkmn3]
ld [sBTPkmnPrevTrainer3], a
call CloseSRAM
ret
; 1f814e

View File

@@ -39,7 +39,7 @@ PredefPointers:: ; 856b
add_predef Functiond88c
add_predef Functionda96
add_predef Functiondb3f ; $8
add_predef Functionde6e
add_predef SentPkmnIntoBox
add_predef GiveEgg
add_predef Functionc6e0
add_predef Functione167

View File

@@ -142,9 +142,9 @@ SpecialsPointers:: ; c029
add_special Function170215
add_special Function1704e1
add_special Function17021d
add_special Function170b44
add_special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
add_special Function11ba38
add_special Function170bd3
add_special SpecialCheckForBattleTowerRules
add_special Function117656
add_special Reset
add_special Function1011f1
@@ -156,7 +156,7 @@ SpecialsPointers:: ; c029
add_special Function11c1ab
add_special Function170687
add_special Special_DisplayUnownWords
add_special Function17d224
add_special Special_Menu_ChallengeExplanationCancel
add_special Function17d2b6
add_special Function17d2ce
add_special Function17f53d

View File

@@ -31,13 +31,16 @@ hConnectedMapWidth EQU $ffb0
hPastLeadingZeroes EQU $ffb3
hDividend EQU $ffb3
hDivisor EQU $ffb7
hQuotient EQU $ffb4
hStringCmpString1 EQU $ffb1
hStringCmpString2 EQU $ffb5
hMultiplicand EQU $ffb4
hMultiplier EQU $ffb7
hProduct EQU $ffb3
hDividend EQU $ffb3 ; length in b register, before 'call Divide' (max 4 bytes)
hDivisor EQU $ffb7 ; 1 byte long
hQuotient EQU $ffb4 ; result (3 bytes long)
hMultiplicand EQU $ffb4 ; 3 bytes long
hMultiplier EQU $ffb7 ; 1 byte long
hProduct EQU $ffb3 ; result (4 bytes long)
hMathBuffer EQU $ffb8

View File

@@ -273,7 +273,7 @@ endr
jp z, .asm_e98e
ld a, b
ld [$ffb6], a
ld [hMultiplicand + 2], a
ld hl, EnemyMonHP
ld b, [hl]
@@ -318,9 +318,9 @@ endr
sub c
ld [hMultiplier], a
xor a
ld [hProduct], a
ld [hMultiplicand], a
ld [$ffb5], a
ld [hDividend + 0], a
ld [hMultiplicand + 0], a
ld [hMultiplicand + 1], a
call Multiply
pop bc
@@ -329,7 +329,7 @@ endr
ld b, $4
call Divide
ld a, [$ffb6]
ld a, [hQuotient + 2]
and a
jr nz, .statuscheck
ld a, 1
@@ -618,7 +618,7 @@ endr
.asm_eb3c
call ClearSprites
predef Functionde6e
predef SentPkmnIntoBox
callba Function4db83

263
main.asm

File diff suppressed because it is too large Load Diff

View File

@@ -41,10 +41,10 @@ UnknownScript_0x9e3d3:
MapBattleTower1FSignpost0Script:
loadfont
writetext UnknownText_0x9ed3c
writetext Text_ReadBattleTowerRules
yesorno
iffalse UnknownScript_0x9e3e0
writetext UnknownText_0x9ed72
writetext Text_BattleTowerRules
closetext
UnknownScript_0x9e3e0:
loadmovesprites
@@ -55,41 +55,41 @@ ReceptionistScript_0x9e3e2:
special Function170687
if_equal $3, BattleTowerBattleRoomScript_0x9f4e4
loadfont
writetext UnknownText_0x9e5ab
writetext Text_BattleTowerWelcomesYou
keeptextopen
writebyte $0
special Function170687
if_not_equal $0, UnknownScript_0x9e3fc
jump UnknownScript_0x9e49e
if_not_equal $0, Script_Menu_ChallengeExplanationCancel
jump Script_BattleTowerIntroductionYesNo
UnknownScript_0x9e3fc:
writetext UnknownText_0x9e5ea
Script_Menu_ChallengeExplanationCancel: ; 0x9e3fc
writetext Text_WantToGoIntoABattleRoom
writebyte $1
special Function17d224
if_equal $1, UnknownScript_0x9e40f
if_equal $2, UnknownScript_0x9e4a5
special Special_Menu_ChallengeExplanationCancel
if_equal $1, Script_ChoseChallenge
if_equal $2, Script_BattleTowerExplanation
jump UnknownScript_0x9e4b0
UnknownScript_0x9e40f:
Script_ChoseChallenge: ; 0x9e40f
writebyte $1a
special Function170687
special Function170bd3
if_not_equal $0, UnknownScript_0x9e4bb
writetext UnknownText_0x9ef1f
special SpecialCheckForBattleTowerRules
if_not_equal $0, Script_CloseText
writetext Text_SaveBeforeEnteringBattleRoom
yesorno
iffalse UnknownScript_0x9e3fc
iffalse Script_Menu_ChallengeExplanationCancel
dotrigger $0
special Special_TryQuickSave
iffalse UnknownScript_0x9e3fc
iffalse Script_Menu_ChallengeExplanationCancel
dotrigger $1
writebyte $1
special Function170687
special Function1700b0
if_equal $a, UnknownScript_0x9e3fc
if_equal $a, Script_Menu_ChallengeExplanationCancel
if_not_equal $0, UnknownScript_0x9e550
writebyte $11
special Function170687
writetext UnknownText_0x9e60a
writetext Text_RightThisWayToYourBattleRoom
closetext
loadmovesprites
writebyte $1e
@@ -116,39 +116,39 @@ UnknownScript_0x9e454:
warpcheck
end
UnknownScript_0x9e47a:
Script_GivePlayerHisPrize: ; 0x9e47a
writebyte $1c
special Function170687
writebyte $1b
special Function170687
if_equal $12, UnknownScript_0x9e498
if_equal $12, Script_YourPackIsStuffedFull
itemtotext $0, $1
giveitem $ff, $5
writetext UnknownText_0x9eb7e
writetext Text_PlayerGotFive
writebyte $1d
special Function170687
loadmovesprites
end
UnknownScript_0x9e498:
writetext UnknownText_0x9eb94
Script_YourPackIsStuffedFull: ; 0x9e498
writetext Text_YourPackIsStuffedFull
closetext
loadmovesprites
end
UnknownScript_0x9e49e:
writetext UnknownText_0x9ec3d
Script_BattleTowerIntroductionYesNo: ; 0x9e49e
writetext Text_WouldYouLikeToHearAboutTheBattleTower
yesorno
iffalse UnknownScript_0x9e4a8
UnknownScript_0x9e4a5:
writetext UnknownText_0x9e886
Script_BattleTowerExplanation: ; 0x9e4a5
writetext Text_BattleTowerIntroduction_2
UnknownScript_0x9e4a8:
writebyte $1
special Function170687
jump UnknownScript_0x9e3fc
jump Script_Menu_ChallengeExplanationCancel
UnknownScript_0x9e4b0:
writetext UnknownText_0x9ec09
writetext Text_WeHopeToServeYouAgain
closetext
loadmovesprites
end
@@ -158,26 +158,26 @@ UnknownScript_0x9e4b6:
loadmovesprites
end
UnknownScript_0x9e4bb:
Script_CloseText: ; 0x9e4bb
closetext
loadmovesprites
end
UnknownScript_0x9e4be:
writetext UnknownText_0x9ef1f
writetext Text_SaveBeforeEnteringBattleRoom
yesorno
iffalse UnknownScript_0x9e3fc
iffalse Script_Menu_ChallengeExplanationCancel
special Special_TryQuickSave
iffalse UnknownScript_0x9e3fc
iffalse Script_Menu_ChallengeExplanationCancel
writebyte $1
special Function170687
special Function1700ba
if_equal $a, UnknownScript_0x9e3fc
if_equal $a, Script_Menu_ChallengeExplanationCancel
if_not_equal $0, UnknownScript_0x9e550
writetext UnknownText_0x9e9eb
writetext Text_ReceivedAListOfLeadersOnTheHonorRoll
spriteface $2, LEFT
writetext UnknownText_0x9ea1b
writetext Text_PleaseConfirmOnThisMonitor
closetext
spriteface $2, DOWN
loadmovesprites
@@ -186,12 +186,12 @@ UnknownScript_0x9e4be:
UnknownScript_0x9e4ea:
writebyte $18
special Function170687
if_not_equal $0, UnknownScript_0x9e542
if_not_equal $0, Script_APkmnLevelExceeds
writebyte $19
special Function170687
if_not_equal $0, UnknownScript_0x9e549
special Function170bd3
if_not_equal $0, UnknownScript_0x9e4bb
if_not_equal $0, Script_MayNotEnterABattleRoomUnderL70
special SpecialCheckForBattleTowerRules
if_not_equal $0, Script_CloseText
writebyte $5
special Function170687
if_equal $0, UnknownScript_0x9e512
@@ -202,19 +202,19 @@ UnknownScript_0x9e512:
writetext UnknownText_0x9ec6d
UnknownScript_0x9e515:
yesorno
iffalse UnknownScript_0x9e3fc
iffalse Script_Menu_ChallengeExplanationCancel
writetext UnknownText_0x9ef79
yesorno
iffalse UnknownScript_0x9e3fc
iffalse Script_Menu_ChallengeExplanationCancel
dotrigger $0
special Special_TryQuickSave
iffalse UnknownScript_0x9e3fc
iffalse Script_Menu_ChallengeExplanationCancel
dotrigger $1
writebyte $6
special Function170687
writebyte $12
special Function170687
writetext UnknownText_0x9e60a
writetext Text_RightThisWayToYourBattleRoom
closetext
jump UnknownScript_0x9e44e
@@ -223,15 +223,15 @@ UnknownScript_0x9e53b:
closetext
jump UnknownScript_0x9e4b0
UnknownScript_0x9e542:
writetext UnknownText_0x9f1e5
Script_APkmnLevelExceeds: ; 0x9e542
writetext Text_APkmnLevelExceeds
closetext
jump UnknownScript_0x9e3fc
jump Script_Menu_ChallengeExplanationCancel
UnknownScript_0x9e549:
writetext UnknownText_0x9f217
Script_MayNotEnterABattleRoomUnderL70: ; 0x9e549
writetext Text_MayNotEnterABattleRoomUnderL70
closetext
jump UnknownScript_0x9e3fc
jump Script_Menu_ChallengeExplanationCancel
UnknownScript_0x9e550:
special Function17f53d
@@ -247,20 +247,20 @@ UnknownScript_0x9e555:
YoungsterScript_0x9e55d:
faceplayer
loadfont
writetext UnknownText_0x9f264
writetext Text_BattleTowerYoungster
closetext
loadmovesprites
spriteface $3, RIGHT
end
CooltrainerFScript_0x9e568:
jumptextfaceplayer UnknownText_0x9f2a4
jumptextfaceplayer Text_BattleTowerCooltrainerF
BugCatcherScript_0x9e56b:
jumptextfaceplayer UnknownText_0x9f35b
jumptextfaceplayer Text_BattleTowerBugCatcher
GrannyScript_0x9e56e:
jumptextfaceplayer UnknownText_0x9f2e3
jumptextfaceplayer Text_BattleTowerGranny
MovementData_0x9e571:
step_up
@@ -346,7 +346,7 @@ MovementData_0x9e5a9:
turn_head_right
step_end
UnknownText_0x9e5ab:
Text_BattleTowerWelcomesYou: ; 0x9e5ab
text "BATTLE TOWER"
line "welcomes you!"
@@ -354,17 +354,17 @@ UnknownText_0x9e5ab:
line "to a BATTLE ROOM."
done
UnknownText_0x9e5ea:
Text_WantToGoIntoABattleRoom: ; 0x9e5ea
text "Want to go into a"
line "BATTLE ROOM?"
done
UnknownText_0x9e60a:
Text_RightThisWayToYourBattleRoom: ; 0x9e60a
text "Right this way to"
line "your BATTLE ROOM."
done
UnknownText_0x9e62f:
Text_BattleTowerIntroduction_1: ; 0x9e62f
text "BATTLE TOWER is a"
line "facility made for"
cont "#MON battles."
@@ -424,7 +424,7 @@ UnknownText_0x9e62f:
para ""
done
UnknownText_0x9e886:
Text_BattleTowerIntroduction_2: ; 0x9e886
text "BATTLE TOWER is a"
line "facility made for"
cont "#MON battles."
@@ -460,7 +460,7 @@ UnknownText_0x9e886:
para ""
done
UnknownText_0x9e9eb:
Text_ReceivedAListOfLeadersOnTheHonorRoll: ; 0x9e9eb
text "Received a list of"
line "LEADERS on the"
cont "HONOR ROLL."
@@ -468,18 +468,18 @@ UnknownText_0x9e9eb:
para ""
done
UnknownText_0x9ea1b:
Text_PleaseConfirmOnThisMonitor: ; 0x9ea1b
text "Please confirm on"
line "this monitor."
done
UnknownText_0x9ea3c:
Text_ThankYou: ; 0x9ea3c
text "Thank you!"
para ""
done
UnknownText_0x9ea49:
Text_ThanksForVisiting: ; 0x9ea49
text "Thanks for"
line "visiting!"
done
@@ -502,7 +502,7 @@ UnknownText_0x9ea5f:
para ""
done
UnknownText_0x9eaef:
Text_CongratulationsYouveBeatenAllTheTrainers: ; 0x9eaef
text "Congratulations!"
para "You've beaten all"
@@ -522,7 +522,7 @@ UnknownText_0x9eb45:
line "CENTER?"
done
UnknownText_0x9eb7e:
Text_PlayerGotFive: ; 0x9eb7e
text "<PLAYER> got five"
line "@"
text_from_ram StringBuffer4
@@ -531,7 +531,7 @@ UnknownText_0x9eb7e:
text_waitbutton
db "@"
UnknownText_0x9eb94:
Text_YourPackIsStuffedFull: ; 0x9eb94
text "Oops, your PACK is"
line "stuffed full."
@@ -539,24 +539,24 @@ UnknownText_0x9eb94:
line "and come back."
done
UnknownText_0x9ebd6:
Text_YourRegistrationIsComplete: ; 0x9ebd6
text "Your registration"
line "is complete."
para "Please come again!"
done
UnknownText_0x9ec09:
Text_WeHopeToServeYouAgain: ; 0x9ec09
text "We hope to serve"
line "you again."
done
UnknownText_0x9ec26:
Text_PleaseStepThisWay: ; 0x9ec26
text "Please step this"
line "way."
done
UnknownText_0x9ec3d:
Text_WouldYouLikeToHearAboutTheBattleTower: ; 0x9ec3d
text "Would you like to"
line "hear about the"
cont "BATTLE TOWER?"
@@ -582,19 +582,19 @@ UnknownText_0x9ecb0:
cont "deleted. OK?"
done
UnknownText_0x9ed1e:
Text_CheckTheLeaderHonorRoll: ; 0x9ed1e
text "Check the LEADER"
line "HONOR ROLL?"
done
UnknownText_0x9ed3c:
Text_ReadBattleTowerRules: ; 0x9ed3c
text "BATTLE TOWER rules"
line "are written here."
para "Read the rules?"
done
UnknownText_0x9ed72:
Text_BattleTowerRules: ; 0x9ed72
text "Three #MON may"
line "enter battles."
@@ -626,13 +626,13 @@ UnknownText_0x9ee18:
line "invalid."
done
UnknownText_0x9ee92:
Text_YourPkmnWillBeHealedToFullHealth: ; 0x9ee92
text "Your #MON will"
line "be healed to full"
cont "health."
done
UnknownText_0x9eebc:
Text_NextUpOpponentNo: ; 0x9eebc
text "Next up, opponent"
line "no.@"
text_from_ram StringBuffer3
@@ -647,7 +647,7 @@ UnknownText_0x9eee0:
line "the CENTER."
done
UnknownText_0x9ef1f:
Text_SaveBeforeEnteringBattleRoom: ; 0x9ef1f
text "Before entering"
line "the BATTLE ROOM,"
@@ -655,7 +655,7 @@ UnknownText_0x9ef1f:
line "be saved."
done
UnknownText_0x9ef5e:
Text_SaveAndEndTheSession: ; 0x9ef5e
text "SAVE and end the"
line "session?"
done
@@ -668,7 +668,7 @@ UnknownText_0x9ef79:
line "the previous ROOM."
done
UnknownText_0x9efbf:
Text_CancelYourBattleRoomChallenge: ; 0x9efbf
text "Cancel your BATTLE"
line "ROOM challenge?"
done
@@ -699,7 +699,7 @@ UnknownText_0x9f076:
line "tomorrow."
done
UnknownText_0x9f0c1:
Text_TooMuchTimeElapsedNoRegister: ; 0x9f0c1
text "Sorry, but it's"
line "not possible to"
@@ -730,7 +730,7 @@ UnknownText_0x9f151:
cont "challenge."
done
UnknownText_0x9f1e5:
Text_APkmnLevelExceeds: ; 0x9f1e5
text "One or more of"
line "your #MON's"
cont "levels exceeds @"
@@ -738,7 +738,7 @@ UnknownText_0x9f1e5:
text "."
done
UnknownText_0x9f217:
Text_MayNotEnterABattleRoomUnderL70: ; 0x9f217
text_from_ram wcd49
text " may not"
line "enter a BATTLE"
@@ -750,7 +750,7 @@ UnknownText_0x9f217:
text "."
done
UnknownText_0x9f264:
Text_BattleTowerYoungster: ; 0x9f264
text "Destroyed by the"
line "first opponent in"
@@ -758,7 +758,7 @@ UnknownText_0x9f264:
line "I'm no good…"
done
UnknownText_0x9f2a4:
Text_BattleTowerCooltrainerF: ; 0x9f2a4
text "There are lots of"
line "BATTLE ROOMS, but"
@@ -766,7 +766,7 @@ UnknownText_0x9f2a4:
line "them all!"
done
UnknownText_0x9f2e3:
Text_BattleTowerGranny: ; 0x9f2e3
text "It's a grueling"
line "task, not being"
@@ -780,7 +780,7 @@ UnknownText_0x9f2e3:
line "winning battles."
done
UnknownText_0x9f35b:
Text_BattleTowerBugCatcher: ; 0x9f35b
text "I'm trying to see"
line "how far I can go"

View File

@@ -3,25 +3,25 @@ BattleTowerBattleRoom_MapScriptHeader:
db 2
; triggers
dw UnknownScript_0x9f419, $0000
dw Script_EnterBattleRoom, $0000
dw UnknownScript_0x9f420, $0000
.MapCallbacks:
db 0
UnknownScript_0x9f419:
Script_EnterBattleRoom: ; 0x9f419
disappear $2
priorityjump UnknownScript_0x9f421
priorityjump Script_BattleRoom
dotrigger $1
UnknownScript_0x9f420:
end
UnknownScript_0x9f421:
Script_BattleRoom: ; 0x9f421
applymovement PLAYER, MovementData_0x9e58c
UnknownScript_0x9f425:
; beat all 7 opponents in a row
Script_BattleRoomLoop: ; 0x9f425
writebyte $2
special Function170b44
special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
appear $2
warpsound
waitbutton
@@ -30,19 +30,19 @@ UnknownScript_0x9f425:
storetext 1
keeptextopen
loadmovesprites
special Function170215
special Function170215 ; calls predef startbattle
special FadeBlackBGMap
reloadmap
if_not_equal $0, UnknownScript_0x9f4c2
copybytetovar wcf64
if_equal $7, UnknownScript_0x9f4d9
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
if_equal BATTLETOWER_NROFTRAINERS, Script_BeatenAllTrainers
applymovement $2, MovementData_0x9e597
warpsound
disappear $2
applymovement $3, MovementData_0x9e59c
applymovement PLAYER, MovementData_0x9e5a7
loadfont
writetext UnknownText_0x9ee92
writetext Text_YourPkmnWillBeHealedToFullHealth
closetext
loadmovesprites
playmusic MUSIC_HEAL
@@ -52,19 +52,19 @@ UnknownScript_0x9f425:
special FadeInBGMap
special RestartMapMusic
loadfont
writetext UnknownText_0x9eebc
writetext Text_NextUpOpponentNo
yesorno
iffalse UnknownScript_0x9f483
UnknownScript_0x9f477:
iffalse Script_DontBattleNextOpponent
Script_ContinueAndBattleNextOpponent: ; 0x9f477
loadmovesprites
applymovement PLAYER, MovementData_0x9e5a9
applymovement $3, MovementData_0x9e5a1
jump UnknownScript_0x9f425
jump Script_BattleRoomLoop
UnknownScript_0x9f483:
writetext UnknownText_0x9ef5e
Script_DontBattleNextOpponent: ; 0x9f483
writetext Text_SaveAndEndTheSession
yesorno
iffalse UnknownScript_0x9f4a3
iffalse Script_DontSaveAndEndTheSession
writebyte $7
special Function170687
writebyte $1f
@@ -75,10 +75,10 @@ UnknownScript_0x9f483:
waitbutton
special FadeBlackBGMap
special Reset
UnknownScript_0x9f4a3:
writetext UnknownText_0x9efbf
Script_DontSaveAndEndTheSession: ; 0x9f4a3
writetext Text_CancelYourBattleRoomChallenge
yesorno
iffalse UnknownScript_0x9f477
iffalse Script_ContinueAndBattleNextOpponent
writebyte $4
special Function170687
writebyte $6
@@ -96,25 +96,25 @@ UnknownScript_0x9f4c2:
writebyte $4
special Function170687
loadfont
writetext UnknownText_0x9ea49
writetext Text_ThanksForVisiting
closetext
loadmovesprites
end
UnknownScript_0x9f4d9:
Script_BeatenAllTrainers: ; 0x9f4d9
pause 60
special Special_BattleTowerFade
warpfacing $1, BATTLE_TOWER_1F, $7, $7
BattleTowerBattleRoomScript_0x9f4e4:
loadfont
writetext UnknownText_0x9eaef
jump UnknownScript_0x9e47a
writetext Text_CongratulationsYouveBeatenAllTheTrainers
jump Script_GivePlayerHisPrize
UnknownScript_0x9f4eb:
writebyte $4
special Function170687
loadfont
writetext UnknownText_0x9f0c1
writetext Text_TooMuchTimeElapsedNoRegister
closetext
loadmovesprites
end
@@ -125,8 +125,8 @@ UnknownScript_0x9f4f7:
writebyte $6
special Function170687
loadfont
writetext UnknownText_0x9ea49
writetext UnknownText_0x9ec09
writetext Text_ThanksForVisiting
writetext Text_WeHopeToServeYouAgain
closetext
loadmovesprites
end

View File

@@ -12,14 +12,13 @@ BattleTowerHallway_MapScriptHeader:
UnknownScript_0x9f5bb:
priorityjump UnknownScript_0x9f5c1
dotrigger $1
UnknownScript_0x9f5c0:
end
UnknownScript_0x9f5c1:
follow $2, PLAYER
callasm Function_0x9f5cb
jump UnknownScript_0x9f5dc
jump Script_WalkToChosenBattleRoom
Function_0x9f5cb:
@@ -28,7 +27,7 @@ Function_0x9f5cb:
ld a, 3
ld [rSVBK], a
ld a, [w3_d800]
ld a, [wBTChoiceOfLvlGroup]
ld [ScriptVar], a
pop af
@@ -36,38 +35,41 @@ Function_0x9f5cb:
ret
UnknownScript_0x9f5dc:
if_equal $3, UnknownScript_0x9f603
if_equal $4, UnknownScript_0x9f603
if_equal $5, UnknownScript_0x9f60a
if_equal $6, UnknownScript_0x9f60a
if_equal $7, UnknownScript_0x9f611
if_equal $8, UnknownScript_0x9f611
if_equal $9, UnknownScript_0x9f618
if_equal $a, UnknownScript_0x9f618
; enter different rooms for different levels to battle against
; at least it should look like that
; because all warps lead to the same room
Script_WalkToChosenBattleRoom: ; 0x9f5dc
if_equal 3, Script_WalkToBattleRoomL30L40
if_equal 4, Script_WalkToBattleRoomL30L40
if_equal 5, Script_WalkToBattleRoomL50L60
if_equal 6, Script_WalkToBattleRoomL50L60
if_equal 7, Script_WalkToBattleRoomL70L80
if_equal 8, Script_WalkToBattleRoomL70L80
if_equal 9, Script_WalkToBattleRoomL90L100
if_equal 10, Script_WalkToBattleRoomL90L100
applymovement $2, MovementData_0x9e57a
jump UnknownScript_0x9f61f
jump Script_PlayerEntersBattleRoom
UnknownScript_0x9f603:
Script_WalkToBattleRoomL30L40: ; 0x9f603
applymovement $2, MovementData_0x9e57c
jump UnknownScript_0x9f61f
jump Script_PlayerEntersBattleRoom
UnknownScript_0x9f60a:
Script_WalkToBattleRoomL50L60: ; 0x9f60a
applymovement $2, MovementData_0x9e586
jump UnknownScript_0x9f61f
jump Script_PlayerEntersBattleRoom
UnknownScript_0x9f611:
Script_WalkToBattleRoomL70L80: ; 0x9f611
applymovement $2, MovementData_0x9e584
jump UnknownScript_0x9f61f
jump Script_PlayerEntersBattleRoom
UnknownScript_0x9f618:
Script_WalkToBattleRoomL90L100: ; 0x9f618
applymovement $2, MovementData_0x9e582
jump UnknownScript_0x9f61f
jump Script_PlayerEntersBattleRoom
UnknownScript_0x9f61f:
Script_PlayerEntersBattleRoom: ; 0x9f61f
faceperson PLAYER, $2
loadfont
writetext UnknownText_0x9ec26
writetext Text_PleaseStepThisWay
closetext
loadmovesprites
stopfollow

File diff suppressed because it is too large Load Diff

View File

@@ -425,19 +425,29 @@ Function17d1f1: ; 17d1f1
ret
; 17d224
Function17d224: ; 17d224
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Parameter: [ScriptVar] = 0..1
;
; if [ScriptVar] == 0
; Show japanese menu options
; - News - News - ??? - Cancel
; if [ScriptVar] == 1
; Show BattleTower-Menu with 3 options in english language
; - Challenge - Explanation - Cancel
Special_Menu_ChallengeExplanationCancel: ; 17d224
ld a, [ScriptVar]
and a
jr nz, .asm_17d234
ld a, $4
ld [ScriptVar], a
ld hl, MenuDataHeader_17d26a
ld hl, MenuDataHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option
jr .asm_17d23c
.asm_17d234
ld a, $4
ld [ScriptVar], a
ld hl, MenuDataHeader_17d28f
ld hl, MenuDataHeader_ChallengeExplanationCancel ; English Menu
.asm_17d23c
call LoadMenuDataHeader
@@ -488,14 +498,14 @@ MenuData2_17d272: ; 17d272
db "やめる@"
; 17d28f
MenuDataHeader_17d28f: ; 17d28f
MenuDataHeader_ChallengeExplanationCancel: ; 17d28f
db $40 ; flags
db 0, 0 ; start coords
db 7, 14 ; end coords
dw MenuData2_17d297
dw MenuData2_ChallengeExplanationCancel
db 1 ; default option
MenuData2_17d297: ; 17d297
MenuData2_ChallengeExplanationCancel: ; 17d297
db $a0 ; flags
db 3
db "Challenge@"
@@ -2388,7 +2398,7 @@ Function17ded9: ; 17ded9
ld a, [hli]
ld b, a
push hl
callba Function4dba3
callba SetPkmnCaughtData
pop hl
pop bc
jr .asm_17df5e
@@ -2534,7 +2544,7 @@ endr
; 17e026
Function17e026: ; 17e026
ld a, $1
ld a, BANK(sBoxCount)
call GetSRAMBank
ld a, [sBoxCount]
call CloseSRAM
@@ -2545,11 +2555,11 @@ Function17e026: ; 17e026
push bc
push hl
callba LoadEnemyMon
callba Functionde6e
callba SentPkmnIntoBox
callba Function4db83
pop hl
pop bc
ld a, $1
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
bit 1, b
jr z, .asm_17e067
@@ -4294,9 +4304,9 @@ Function17f334: ; 17f334
ld a, [wcd55]
bit 7, a
jr nz, .asm_17f355
ld a, $1
ld a, BANK(sCrystalData)
call GetSRAMBank
ld a, [$be3f]
ld a, [sCrystalData + 2]
jr .asm_17f35d
.asm_17f355
@@ -4338,9 +4348,9 @@ Function17f382: ; 17f382
ld a, [wcd55]
bit 7, a
jr nz, .asm_17f3a3
ld a, $1
ld a, BANK(sCrystalData)
call GetSRAMBank
ld de, $be40
ld de, sCrystalData + 3
jr .asm_17f3ab
.asm_17f3a3

View File

@@ -44,7 +44,7 @@ WantsToBattleText:: ; 0x807a9
prompt
; 0x807bd
BattleText_0x807bd: ; 0x807bd
BattleText_WildFled: ; 0x807bd
text "Wild @"
text_from_ram EnemyMonNick
text ""
@@ -52,7 +52,7 @@ BattleText_0x807bd: ; 0x807bd
prompt
; 0x807cf
BattleText_0x807cf: ; 0x807cf
BattleText_EnemyFled: ; 0x807cf
text "Enemy @"
text_from_ram EnemyMonNick
text ""
@@ -113,7 +113,7 @@ BattleText_0x80880: ; 0x80880
prompt
; 0x80899
BattleText_0x80899: ; 0x80899
BattleText_UserRecoveredPPUsing: ; 0x80899
text "<USER>"
line "recovered PP using"
cont "@"
@@ -129,13 +129,13 @@ BattleText_0x808b6: ; 0x808b6
prompt
; 0x808d2
BattleText_0x808d2: ; 0x808d2
BattleText_SafeguardFaded: ; 0x808d2
text "<USER>'s"
line "SAFEGUARD faded!"
prompt
; 0x808e7
BattleText_0x808e7: ; 0x808e7
BattleText_PkmnnLightScreenFell: ; 0x808e7
text_from_ram StringBuffer1
text " #MON's"
line "LIGHT SCREEN fell!"
@@ -149,42 +149,42 @@ BattleText_0x80905: ; 0x80905
prompt
; 0x8091f
BattleText_0x8091f: ; 0x8091f
BattleText_RainContinuesToFall: ; 0x8091f
text "Rain continues to"
line "fall."
prompt
; 0x80938
BattleText_0x80938: ; 0x80938
BattleText_TheSunlightIsStrong: ; 0x80938
text "The sunlight is"
line "strong."
prompt
; 0x80951
BattleText_0x80951: ; 0x80951
BattleText_TheSandstormRages: ; 0x80951
text "The SANDSTORM"
line "rages."
prompt
; 0x80967
BattleText_0x80967: ; 0x80967
BattleText_TheRainStopped: ; 0x80967
text "The rain stopped."
prompt
; 0x8097a
BattleText_0x8097a: ; 0x8097a
BattleText_TheSunlightFaded: ; 0x8097a
text "The sunlight"
line "faded."
prompt
; 0x8098f
BattleText_0x8098f: ; 0x8098f
BattleText_TheSandstormSubsided: ; 0x8098f
text "The SANDSTORM"
line "subsided."
prompt
; 0x809a8
BattleText_0x809a8: ; 0x809a8
BattleText_EnemyPkmnFainted: ; 0x809a8
text "Enemy @"
text_from_ram EnemyMonNick
text ""
@@ -199,7 +199,7 @@ GotMoneyForWinningText:
line "for winning!"
prompt
BattleText_0x809da: ; 0x809da
BattleText_EnemyWasDefeated: ; 0x809da
text "<ENEMY>"
line "was defeated!"
prompt
@@ -234,14 +234,14 @@ BattleText_0x80a4f: ; 0x80a4f
prompt
; 0x80a75
BattleText_0x80a75: ; 0x80a75
BattleText_PkmnFainted: ; 0x80a75
text_from_ram BattleMonNick
text ""
line "fainted!"
prompt
; 0x80a83
BattleText_0x80a83: ; 0x80a83
BattleText_UseNextMon: ; 0x80a83
text "Use next #MON?"
done
; 0x80a93
@@ -259,7 +259,7 @@ LostAgainstText: ; 0x80ab9
prompt
; 0x80aca
BattleText_0x80aca: ; 0x80aca
BattleText_EnemyIsAboutToUseWillPlayerChangePkmn: ; 0x80aca
text "<ENEMY>"
line "is about to use"
cont "@"
@@ -271,7 +271,7 @@ BattleText_0x80aca: ; 0x80aca
done
; 0x80af8
BattleText_0x80af8: ; 0x80af8
BattleText_EnemySentOut: ; 0x80af8
text "<ENEMY>"
line "sent out"
cont "@"
@@ -280,34 +280,32 @@ BattleText_0x80af8: ; 0x80af8
done
; 0x80b0b
BattleText_0x80b0b: ; 0x80b0b
BattleText_TheresNoWillToBattle: ; 0x80b0b
text "There's no will to"
line "battle!"
prompt
; 0x80b26
BattleText_0x80b26: ; 0x80b26
BattleText_AnEGGCantBattle: ; 0x80b26
text "An EGG can't"
line "battle!"
prompt
; 0x80b3b
BattleText_0x80b3b: ; 0x80b3b
BattleText_CantEscape2: ; 0x80b3b
text "Can't escape!"
prompt
; 0x80b49
BattleText_0x80b49: ; 0x80b49
BattleText_TheresNoEscapeFromTrainerBattle: ; 0x80b49
text "No! There's no"
line "running from a"
cont "trainer battle!"
prompt
; 0x80b77
BattleText_0x80b77: ; 0x80b77
BattleText_GotAwaySafely: ; 0x80b77
text "Got away safely!"
prompt
; 0x80b89
BattleText_0x80b89: ; 0x80b89
text "<USER>"
@@ -318,7 +316,7 @@ BattleText_0x80b89: ; 0x80b89
prompt
; 0x80ba0
BattleText_0x80ba0: ; 0x80ba0
BattleText_CantEscape: ; 0x80ba0
text "Can't escape!"
prompt
; 0x80bae
@@ -1282,7 +1280,7 @@ IgnoredOrders2Text: ; 0x81850
prompt
; 0x81863
BattleText_0x81863: ; 0x81863
BattleText_LinkErrorBattleCanceled: ; 0x81863
text "Link error…"
para "The battle has"

View File

@@ -1,5 +1,5 @@
UnknownText_0x1ec000: ; 0x1ec000
BattleTowerText_0x1ec000: ; 0x1ec000
text "Hello, glad to"
line "meet you!"
@@ -8,7 +8,7 @@ UnknownText_0x1ec000: ; 0x1ec000
done
; 0x1ec03b
UnknownText_0x1ec03b: ; 0x1ec03b
BattleTowerText_0x1ec03b: ; 0x1ec03b
text "Thank you! A most"
line "enjoyable battle!"
done
@@ -20,7 +20,7 @@ UnknownText_0x1ec060: ; 0x1ec060
done
; 0x1ec080
UnknownText_0x1ec080: ; 0x1ec080
BattleTowerText_0x1ec080: ; 0x1ec080
text "Work, work, work…"
line "I'm always busy!"
done

View File

@@ -1295,7 +1295,7 @@ UnknownText_0x1bcf99: ; 0x1bcf99
done
; 0x1bcf9c
UnknownText_0x1bcf9c: ; 0x1bcf9c
Text_EnemyWithdrew: ; 0x1bcf9c
text "<ENEMY>"
line "withdrew"
cont "@"
@@ -1304,7 +1304,7 @@ UnknownText_0x1bcf9c: ; 0x1bcf9c
prompt
; 0x1bcfaf
UnknownText_0x1bcfaf: ; 0x1bcfaf
Text_EnemyUsedOn: ; 0x1bcfaf
text "<ENEMY>"
line "used @"
text_from_ram wd050
@@ -1315,19 +1315,19 @@ UnknownText_0x1bcfaf: ; 0x1bcfaf
prompt
; 0x1bcfc7
UnknownText_0x1bcfc7: ; 0x1bcfc7
Text_ThatCantBeUsedRightNow: ; 0x1bcfc7
text "That can't be used"
line "right now."
prompt
; 0x1bcfe5
UnknownText_0x1bcfe5: ; 0x1bcfe5
Text_ThatItemCantBePutInThePack: ; 0x1bcfe5
text "That item can't be"
line "put in the PACK."
done
; 0x1bd009
UnknownText_0x1bd009: ; 0x1bd009
Text_TheItemWasPutInThePack: ; 0x1bd009
text "The @"
text_from_ram StringBuffer1
text ""
@@ -1336,18 +1336,18 @@ UnknownText_0x1bd009: ; 0x1bd009
done
; 0x1bd029
UnknownText_0x1bd029: ; 0x1bd029
Text_RemainingTime: ; 0x1bd029
text "Remaining Time"
done
; 0x1bd039
UnknownText_0x1bd039: ; 0x1bd039
Text_YourPkmnsHPWasHealed: ; 0x1bd039
text "Your #MON's HP"
line "was healed."
prompt
; 0x1bd054
UnknownText_0x1bd054: ; 0x1bd054
Text_Warping: ; 0x1bd054
text "Warping…"
done
; 0x1bd05e
@@ -1372,7 +1372,7 @@ UnknownText_0x1bd09a: ; 0x1bd09a
prompt
; 0x1bd0bd
UnknownText_0x1bd0bd: ; 0x1bd0bd
Text_BreedingIsNotPossible: ; 0x1bd0bd
text "Breeding is not"
line "possible."
prompt

View File

@@ -129,29 +129,29 @@ UnknownText_0x1c02c9: ; 1c02c9
prompt
; 1c02df
UnknownText_0x1c02df: ; 1c02df
Text_GoPkmn: ; 1c02df
text "Go! @"
db "@"
; 1c02e6
UnknownText_0x1c02e6: ; 1c02e6
Text_DoItPkmn: ; 1c02e6
text "Do it! @"
db "@"
; 1c02f0
UnknownText_0x1c02f0: ; 1c02f0
Text_GoForItPkmn: ; 1c02f0
text "Go for it,"
line "@"
db "@"
; 1c02fe
UnknownText_0x1c02fe: ; 1c02fe
Text_YourFoesWeakGetmPkmn: ; 1c02fe
text "Your foe's weak!"
line "Get'm, @"
db "@"
; 1c0317
UnknownText_0x1c0317: ; 1c0317
Text_BattleMonNick01: ; 1c0317
text_from_ram BattleMonNick
text "!"
done
@@ -1074,7 +1074,7 @@ UnknownText_0x1c0fdd: ; 1c0fdd
done
; 1c0feb
UnknownText_0x1c0feb: ; 1c0feb
Text_WasSentToBillsPC: ; 1c0feb
text_from_ram StringBuffer1
text " was"
line "sent to BILL's PC."

View File

@@ -1262,7 +1262,7 @@ UnknownText_0x1c5937: ; 0x1c5937
done
; 0x1c5944
UnknownText_0x1c5944: ; 0x1c5944
Text_ExcuseMeYoureNotReady: ; 0x1c5944
text "Excuse me."
line "You're not ready."
para ""
@@ -1289,14 +1289,14 @@ UnknownText_0x1c59a3: ; 0x1c59a3
done
; 0x1c59c3
UnknownText_0x1c59c3: ; 0x1c59c3
Text_OnlyThreePkmnMayBeEntered: ; 0x1c59c3
text "Only three #MON"
line "may be entered."
para ""
done
; 0x1c59e5
UnknownText_0x1c59e5: ; 0x1c59e5
Text_ThePkmnMustAllBeDifferentKinds: ; 0x1c59e5
text "The @"
text_from_ram StringBuffer2
text " #MON"
@@ -1306,7 +1306,7 @@ UnknownText_0x1c59e5: ; 0x1c59e5
done
; 0x1c5a13
UnknownText_0x1c5a13: ; 0x1c5a13
Text_ThePkmnMustNotHoldTheSameItems: ; 0x1c5a13
text "The @"
text_from_ram StringBuffer2
text " #MON"
@@ -1316,7 +1316,7 @@ UnknownText_0x1c5a13: ; 0x1c5a13
done
; 0x1c5a42
UnknownText_0x1c5a42: ; 0x1c5a42
Text_YouCantTakeAnEgg: ; 0x1c5a42
text "You can't take an"
line "EGG!"
para ""

Some files were not shown because too many files have changed in this diff Show More