diff options
-rw-r--r-- | battle/ai/items.asm | 43 | ||||
-rw-r--r-- | battle/core.asm | 33 | ||||
-rw-r--r-- | data/battle_tower.asm | 121 | ||||
-rw-r--r-- | engine/predef.asm | 2 | ||||
-rw-r--r-- | engine/specials.asm | 6 | ||||
-rw-r--r-- | items/item_effects.asm | 2 | ||||
-rw-r--r-- | main.asm | 137 | ||||
-rw-r--r-- | maps/BattleTower1F.asm | 170 | ||||
-rw-r--r-- | maps/BattleTowerBattleRoom.asm | 54 | ||||
-rw-r--r-- | maps/BattleTowerHallway.asm | 46 | ||||
-rw-r--r-- | misc/mobile_45.asm | 192 | ||||
-rw-r--r-- | misc/mobile_5f.asm | 38 | ||||
-rw-r--r-- | text/battle.asm | 8 | ||||
-rw-r--r-- | text/common_2.asm | 18 | ||||
-rw-r--r-- | text/common_3.asm | 2 | ||||
-rw-r--r-- | text/common_4.asm | 10 | ||||
-rw-r--r-- | wram.asm | 58 |
17 files changed, 515 insertions, 425 deletions
diff --git a/battle/ai/items.asm b/battle/ai/items.asm index 5cd3fd7fc..8898fdff5 100644 --- a/battle/ai/items.asm +++ b/battle/ai/items.asm @@ -1,4 +1,4 @@ -Function38000: ; 38000 +AI_SwitchOrTryItem: ; 38000 and a ld a, [IsInBattle] @@ -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 @@ -565,7 +566,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 +659,7 @@ Function383f8: ; 383f8 .asm_38436 Function38436: ; 38436 - call Function38571 + call PrintText_UsedItemOn hlcoord 2, 2 xor a ld [wd10a], a @@ -715,7 +716,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 +736,8 @@ AI_Switch: ; 3846c ret ; 384d0 -UnknownText_0x384d0: ; 384d0 - text_jump UnknownText_0x1bcf9c +TextJump_EnemyWithdrew: ; 384d0 + text_jump Text_EnemyWithdrew db "@" ; 384d5 @@ -744,7 +745,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 +766,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 +774,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 +782,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 +833,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 +863,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 diff --git a/battle/core.asm b/battle/core.asm index 56587ca75..3696b2bb5 100644 --- a/battle/core.asm +++ b/battle/core.asm @@ -129,18 +129,18 @@ Function3c0e5: ; 3c0e5 ld [wd0ee], a ld a, [InLinkBattle] and a - ld hl, BattleText_0x807bd + ld hl, BattleText_WildFled jr z, .asm_3c115 ld a, [wd0ee] and $c0 ld [wd0ee], a - ld hl, BattleText_0x807cf + ld hl, BattleText_EnemyFled call Function3d2e0 jr nc, .asm_3c115 ld hl, wcd2a bit 4, [hl] jr nz, .asm_3c118 - ld hl, BattleText_0x81863 + ld hl, BattleText_LinkErrorBattleCanceled .asm_3c115 call StdBattleTextBox @@ -160,6 +160,7 @@ Function3c0e5: ; 3c0e5 ret ; 3c12f + Function3c12f: ; 3c12f .loop call Function3c1bf @@ -939,7 +940,7 @@ Function3c5fe: ; 3c5fe call SetEnemyTurn ld a, $1 ld [wc70f], a - callab Function38000 + callab AI_SwitchOrTryItem jr c, .asm_3c62f call Function3c6de call Function3d2e0 @@ -980,7 +981,7 @@ Function3c664: ; 3c664 xor a ld [wc70f], a call SetEnemyTurn - callab Function38000 + callab AI_SwitchOrTryItem push af call Function3c6cf pop bc @@ -3280,7 +3281,7 @@ Function3d4c3: ; 3d4c3 call Function3d7a0 call NewEnemyMonStatus call ResetEnemyStatLevels - call Function3d7c7 + call Function_SetEnemyPkmnAndSendOutAnimation call BreakAttraction call Function3d57a ret @@ -3299,8 +3300,8 @@ Function3d4e1: ; 3d4e1 call Function3d74b push af call Function3d7a0 - call Function3d7b8 - call Function3d7c7 + call Function_BattleTextEnemySentOut + call Function_SetEnemyPkmnAndSendOutAnimation pop af ret c xor a @@ -3323,8 +3324,8 @@ Function3d517: ; 3d517 ld a, 1 ld [wEnemyIsSwitching], a call Function3d7a0 - call Function3d7b8 - jp Function3d7c7 + call Function_BattleTextEnemySentOut + jp Function_SetEnemyPkmnAndSendOutAnimation ; 3d533 Function3d533: ; 3d533 @@ -3697,14 +3698,14 @@ Function3d7a0: ; 3d7a0 jp Function3ee27 ; 3d7b8 -Function3d7b8: ; 3d7b8 +Function_BattleTextEnemySentOut: ; 3d7b8 callab Battle_GetTrainerName - ld hl, BattleText_0x80af8 + ld hl, BattleText_EnemySentOut call StdBattleTextBox jp WaitBGMap ; 3d7c7 -Function3d7c7: ; 3d7c7 +Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7 ld a, [TempEnemyMonSpecies] ld [CurPartySpecies], a ld [CurSpecies], a @@ -4013,7 +4014,7 @@ Function3d8b3: ; 3d8b3 ld hl, wcd2a bit 4, [hl] jr nz, .asm_3da05 - ld hl, BattleText_0x81863 + ld hl, BattleText_LinkErrorBattleCanceled call StdBattleTextBox .asm_3da05 @@ -5160,7 +5161,7 @@ LoadBattleMenu2: ; 3e19b ld hl, wcd2a bit 4, [hl] jr nz, .error - ld hl, BattleText_0x81863 + ld hl, BattleText_LinkErrorBattleCanceled call StdBattleTextBox ld c, 60 call DelayFrames @@ -7327,9 +7328,11 @@ Function3ee3b: ; 3ee3b ld a, [InLinkBattle] and a ret nz + ld a, [wcfc0] bit 0, a ret nz + call Function3f0d4 xor a ld [CurPartyMon], a diff --git a/data/battle_tower.asm b/data/battle_tower.asm index 025807ac8..f6d7b95de 100644 --- a/data/battle_tower.asm +++ b/data/battle_tower.asm @@ -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 @@ -31,14 +38,14 @@ ENDC ld a, BANK(sbe46) call GetSRAMBank ld c, $7 - ld hl, sbe48 + ld hl, sBTTrainers .asm_1f803a ld a, [hli] cp b jr z, .asm_1f8022 dec c - jr nz, .asm_1f803a - ld hl, sbe48 + jr nz, .asm_1f803a ; c <= 7 initialise all 7 trainers? + ld hl, sBTTrainers ld a, [sbe46] ld c, a ld a, b @@ -52,14 +59,14 @@ ENDC call AddNTimes ld bc, 11 call CopyBytes - call Function1f8081 + call Function_LoadRandomBattleTowerPkmn pop af - ld hl, Unknown_1f0000 + ld hl, BattleTowerTrainerData ld bc, $0024 call AddNTimes ld bc, $0024 .asm_1f8070 - ld a, BANK(Unknown_1f0000) + ld a, BANK(BattleTowerTrainerData) call GetFarByte ld [de], a inc hl @@ -73,14 +80,16 @@ ENDC ret ; 1f8081 -Function1f8081: ; 1f8081 +Function_LoadRandomBattleTowerPkmn: ; 1f8081 ld c, $3 .loop push bc - ld a, BANK(sbe51) + ld a, BANK(sBTPkmnPrevTrainer1) call GetSRAMBank -.asm_1f8089 +.FindARandomBattleTowerPkmn + ; From Which LevelGroup are the Pkmn loaded + ; a = 1..10 ld a, [$d800] dec a ld hl, BattleTowerMons @@ -97,49 +106,53 @@ Function1f8081: ; 1f8081 and $1f cp (BattleTowerMons2 - BattleTowerMons1) / ($3b) jr nc, .asm_1f8099 + ; in register 'a' is the chosen Pkmn of the LevelGroup + ; 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, $3b 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 call CopyBytes @@ -166,18 +179,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 diff --git a/engine/predef.asm b/engine/predef.asm index 22e323246..9ee46bf47 100644 --- a/engine/predef.asm +++ b/engine/predef.asm @@ -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 diff --git a/engine/specials.asm b/engine/specials.asm index 409b47434..6139f4b30 100644 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -142,9 +142,9 @@ SpecialsPointers:: ; c029 add_special Function170215 add_special Function1704e1 add_special Function17021d - add_special Function170b44 + add_special Function_LoadOpponentTrainerAndPokemons170b44 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 diff --git a/items/item_effects.asm b/items/item_effects.asm index 8c574da88..27fb17dee 100644 --- a/items/item_effects.asm +++ b/items/item_effects.asm @@ -618,7 +618,7 @@ endr .asm_eb3c call ClearSprites - predef Functionde6e + predef SentPkmnIntoBox callba Function4db83 @@ -2938,7 +2938,7 @@ SpecialGiveShuckle: ; 7305 ; Caught data. ld b, 0 - callba Function4dba3 + callba SetPkmnCaughtData ; Holding a Berry. ld bc, PartyMon2 - PartyMon1 @@ -8340,7 +8340,7 @@ Functionda96: ; da96 ; db3f Functiondb3f: ; db3f - ld a, $1 + ld a, BANK(sBoxCount) call GetSRAMBank ld a, [wd10b] and a @@ -8799,11 +8799,12 @@ Functionde44: ; de44 call AddNTimes ld bc, sBoxMon1End - sBoxMon1 jp CopyBytes -; de6e -Functionde6e: ; de6e - ld a, 1 ; BANK(sBoxCount) +SentPkmnIntoBox: ; de6e +; Sents the Pkmn into one of Bills Boxes +; the data comes mainly from 'EnemyMon:' + ld a, BANK(sBoxCount) call GetSRAMBank ld de, sBoxCount ld a, [de] @@ -8811,6 +8812,7 @@ Functionde6e: ; de6e jp nc, Functiondf42 inc a ld [de], a + ld a, [CurPartySpecies] ld [CurSpecies], a ld c, a @@ -8823,23 +8825,29 @@ Functionde6e: ; de6e ld [de], a inc a jr nz, .asm_de85 + call GetBaseData call ShiftBoxMon + ld hl, PlayerName ld de, sBoxMonOT ld bc, NAME_LENGTH call CopyBytes + ld a, [CurPartySpecies] ld [wd265], a call GetPokemonName + ld de, sBoxMonNicknames ld hl, StringBuffer1 ld bc, PKMN_NAME_LENGTH call CopyBytes + ld hl, EnemyMon ld de, sBoxMon1 ld bc, 1 + 1 + NUM_MOVES ; species + item + moves call CopyBytes + ld hl, PlayerID ld a, [hli] ld [de], a @@ -8861,6 +8869,7 @@ Functionde6e: ; de6e ld a, [$ffb6] ld [de], a inc de + xor a ld b, $a .asm_dee5 @@ -8868,6 +8877,7 @@ Functionde6e: ; de6e inc de dec b jr nz, .asm_dee5 + ld hl, EnemyMonDVs ld b, 2 + NUM_MOVES ; DVs and PP ; EnemyMonHappiness - EnemyMonDVs .asm_deef @@ -8876,6 +8886,7 @@ Functionde6e: ; de6e inc de dec b jr nz, .asm_deef + ld a, BASE_HAPPINESS ld [de], a inc de @@ -8909,6 +8920,7 @@ Functionde6e: ; de6e call CopyBytes ld b, 0 call Functiondcb6 + call CloseSRAM scf ret @@ -9067,7 +9079,7 @@ Functione039: ; e039 and a jr z, .asm_e04a - ld a, 1 ; BANK(sBoxCount) + ld a, BANK(sBoxCount) call GetSRAMBank ld hl, sBoxCount @@ -9482,7 +9494,7 @@ GivePoke:: ; e277 ld a, [CurPartySpecies] ld [TempEnemyMonSpecies], a callab LoadEnemyMon - call Functionde6e + call SentPkmnIntoBox jp nc, Functione3d4 ld a, $2 ld [MonType], a @@ -9562,11 +9574,11 @@ endr ld [hli], a ld [hl], $e9 pop bc - callba Function4dba3 + callba SetPkmnCaughtData jr .asm_e3b2 .asm_e35e - ld a, $1 + ld a, BANK(sBoxMonOT) call GetSRAMBank ld de, sBoxMonOT .asm_e366 @@ -9604,7 +9616,7 @@ endr callba Function4db49 .asm_e3a6 - callba Function4db3b + callba GiveANickname_YesNo pop de jr c, .asm_e3b2 call Functione3de @@ -9615,9 +9627,9 @@ endr ld a, b and a ret z - ld hl, UnknownText_0xe3d9 + ld hl, TextJump_WasSentToBillsPC call PrintText - ld a, $1 + ld a, BANK(sBoxMonNicknames) call GetSRAMBank ld hl, wd050 ld de, sBoxMonNicknames @@ -9635,9 +9647,9 @@ Functione3d4: ; e3d4 ret ; e3d9 -UnknownText_0xe3d9: ; 0xe3d9 +TextJump_WasSentToBillsPC: ; 0xe3d9 ; was sent to BILL's PC. - text_jump UnknownText_0x1c0feb + text_jump Text_WasSentToBillsPC db "@" ; 0xe3de @@ -9945,7 +9957,7 @@ Functione5bb: ; e5bb call AddNTimes ld de, TempMonSpecies ld bc, $0020 - ld a, $1 + ld a, BANK(sBoxMon1Species) call GetSRAMBank call CopyBytes call CloseSRAM @@ -9969,7 +9981,7 @@ Functione5d9: ; e5d9 jr .asm_e5f6 .asm_e5f1 - ld a, $1 + ld a, BANK(sBoxCount) ld hl, sBoxCount .asm_e5f6 @@ -42221,7 +42233,7 @@ CheckOwnMonAnywhere: ; 0x4a721 jr nz, .partymon ; Run CheckOwnMon on each Pokémon in the PC. - ld a, 1 + ld a, BANK(sBoxCount) call GetSRAMBank ld a, [sBoxCount] and a @@ -42443,7 +42455,7 @@ MobileCheckOwnMonAnywhere: ; 4a843 call Function4a91e dec d jr nz, .asm_4a851 - ld a, 1 + ld a, BANK(sBoxCount) call GetSRAMBank ld a, [sBoxCount] and a @@ -44546,7 +44558,7 @@ Function4d87a: ; 4d87a pop bc dec d jr nz, .asm_4d88d - ld a, $1 + ld a, BANK(sBoxMon1ID) call GetSRAMBank ld a, [sBoxCount] and a @@ -44804,7 +44816,7 @@ CheckPartyFullAfterContest: ; 4d9e5 ld de, wd050 ld bc, $000b call CopyBytes - call Function4db3b + call GiveANickname_YesNo jr c, .asm_4da66 ld a, [PartyCount] dec a @@ -44847,7 +44859,7 @@ CheckPartyFullAfterContest: ; 4d9e5 ; 4daa3 Function4daa3: ; 4daa3 - ld a, $1 + ld a, BANK(sBoxCount) call GetSRAMBank ld hl, sBoxCount ld a, [hl] @@ -44868,7 +44880,7 @@ Function4daa3: ; 4daa3 ld a, [CurPartySpecies] ld [wd265], a call GetPokemonName - call Function4db3b + call GiveANickname_YesNo ld hl, StringBuffer1 jr c, .asm_4daf7 ld a, BOXMON @@ -44878,7 +44890,7 @@ Function4daa3: ; 4daa3 ld hl, wd050 .asm_4daf7 - ld a, $1 + ld a, BANK(sBoxMonNicknames) call GetSRAMBank ld de, sBoxMonNicknames ld bc, PKMN_NAME_LENGTH @@ -44886,13 +44898,13 @@ Function4daa3: ; 4daa3 call CloseSRAM .asm_4db08 - ld a, $1 + ld a, BANK(sBoxMon1Level) call GetSRAMBank ld a, [sBoxMon1Level] ld [CurPartyLevel], a call CloseSRAM call Function4db83 - ld a, $1 + ld a, BANK(sBoxMon1CaughtLocation) call GetSRAMBank ld hl, sBoxMon1CaughtLocation ld a, [hl] @@ -44915,13 +44927,13 @@ Function4db35: ; 4db35 ; 4db3b -Function4db3b: ; 4db3b - ld hl, UnknownText_0x4db44 +GiveANickname_YesNo: ; 4db3b + ld hl, TextJump_GiveANickname call PrintText jp YesNoBox ; 4db44 -UnknownText_0x4db44: ; 0x4db44 +TextJump_GiveANickname: ; 0x4db44 ; Give a nickname to the @ you received? text_jump UnknownText_0x1c12fc db "@" @@ -44968,7 +44980,7 @@ Function4db53: ; 4db53 ; 4db83 Function4db83: ; 4db83 - ld a, $1 + ld a, BANK(sBoxMon1CaughtLevel) call GetSRAMBank ld hl, sBoxMon1CaughtLevel call Function4db53 @@ -44978,7 +44990,7 @@ Function4db83: ; 4db83 Function4db92: ; 4db92 push bc - ld a, $1 + ld a, BANK(sBoxMon1CaughtLevel) call GetSRAMBank ld hl, sBoxMon1CaughtLevel pop bc @@ -44987,7 +44999,7 @@ Function4db92: ; 4db92 ret ; 4dba3 -Function4dba3: ; 4dba3 +SetPkmnCaughtData: ; 4dba3 ld a, [PartyCount] dec a ld hl, PartyMon1CaughtLevel @@ -48623,7 +48635,7 @@ Function508d5: ; 508d5 jr .done .boxmon - ld a, 1 ; BANK(sBoxSpecies) + ld a, BANK(sBoxSpecies) call GetSRAMBank ld hl, sBoxSpecies call .done @@ -50156,7 +50168,7 @@ Function512f2: ; 512f2 ; 51322 Function51322: ; 51322 - ld a, $1 + ld a, BANK(sBoxCount) call GetSRAMBank ld hl, sBoxCount call Function513cb @@ -51399,7 +51411,7 @@ Function806ff: ; 806ff Function80715: ; 80715 ; Remaining slots in the current box. - ld a, 1 ; BANK(sBoxCount) + ld a, BANK(sBoxCount) call GetSRAMBank ld hl, sBoxCount ld a, MONS_PER_BOX @@ -60873,12 +60885,12 @@ UnknownText_0x8b1fc: ; 0x8b1fc db "@" ; 0x8b201 -Function8b201: ; 8b201 +CheckForBattleTowerRules: ; 8b201 ld hl, StringBuffer2 ld [hl], "3" inc hl ld [hl], "@" - ld de, Unknown_8b215 + ld de, CheckForBattleTowerRules_FunctionsText call Function8b25b ret z call Function8b231 @@ -60886,29 +60898,29 @@ Function8b201: ; 8b201 ret ; 8b215 -Unknown_8b215: ; 8b215 +CheckForBattleTowerRules_FunctionsText: ; 8b215 db 4 - dw Unknown_8b21a - dw Unknown_8b222 + dw CheckForBattleTowerRules_Functions + dw CheckForBattleTowerRules_Text -Unknown_8b21a: ; 8b21a - dw Function8b2da +CheckForBattleTowerRules_Functions: ; 8b21a + dw Function_PartyCountEq3 dw Function8b2e2 dw Function8b32a - dw Function8b331 + dw Function_HasPartyAnEgg ; 8b222 -Unknown_8b222: ; 8b222 - dw UnknownText_0x8b22c - dw UnknownText_0x8b247 - dw UnknownText_0x8b24c - dw UnknownText_0x8b251 - dw UnknownText_0x8b256 +CheckForBattleTowerRules_Text: ; 8b222 + dw JumpText_ExcuseMeYoureNotReady + dw JumbText_OnlyThreePkmnMayBeEntered + dw JumpText_ThePkmnMustAllBeDifferentKinds + dw JumpText_ThePkmnMustNotHoldTheSameItems + dw JumpText_YouCantTakeAnEgg ; 8b22c -UnknownText_0x8b22c: ; 0x8b22c +JumpText_ExcuseMeYoureNotReady: ; 0x8b22c ; Excuse me. You're not ready. - text_jump UnknownText_0x1c5944 + text_jump Text_ExcuseMeYoureNotReady db "@" ; 0x8b231 @@ -60936,27 +60948,27 @@ UnknownText_0x8b242: ; 0x8b242 db "@" ; 0x8b247 -UnknownText_0x8b247: ; 0x8b247 +JumbText_OnlyThreePkmnMayBeEntered: ; 0x8b247 ; Only three #MON may be entered. - text_jump UnknownText_0x1c59c3 + text_jump Text_OnlyThreePkmnMayBeEntered db "@" ; 0x8b24c -UnknownText_0x8b24c: ; 0x8b24c +JumpText_ThePkmnMustAllBeDifferentKinds: ; 0x8b24c ; The @ #MON must all be different kinds. - text_jump UnknownText_0x1c59e5 + text_jump Text_ThePkmnMustAllBeDifferentKinds db "@" ; 0x8b251 -UnknownText_0x8b251: ; 0x8b251 +JumpText_ThePkmnMustNotHoldTheSameItems: ; 0x8b251 ; The @ #MON must not hold the same items. - text_jump UnknownText_0x1c5a13 + text_jump Text_ThePkmnMustNotHoldTheSameItems db "@" ; 0x8b256 -UnknownText_0x8b256: ; 0x8b256 +JumpText_YouCantTakeAnEgg: ; 0x8b256 ; You can't take an EGG! - text_jump UnknownText_0x1c5a42 + text_jump Text_YouCantTakeAnEgg db "@" ; 0x8b25b @@ -61085,7 +61097,7 @@ Function8b2c1: ; 8b2c1 ret ; 8b2da -Function8b2da: ; 8b2da +Function_PartyCountEq3: ; 8b2da ld a, [PartyCount] cp 3 ret z @@ -61169,7 +61181,7 @@ Function8b32a: ; 8b32a ret ; 8b331 -Function8b331: ; 8b331 +Function_HasPartyAnEgg: ; 8b331 ld hl, PartyCount ld a, [hli] ld c, a @@ -87759,7 +87771,7 @@ Functionfcc63: ; fcc63 jr c, .asm_fcd1c ld b, 1 .asm_fcd1c - callba Function4dba3 + callba SetPkmnCaughtData ld e, TRADE_NICK call GetTradeAttribute @@ -93532,7 +93544,8 @@ INCLUDE "text/battle_tower.asm" SECTION "bank7C", ROMX, BANK[$7C] -Unknown_1f0000:: +BattleTowerTrainerData:: ; What exactly it is, I don't know +; Size is 70 (Nr of Trainers in BattleTower) * 0x24 (Nr of Bytes that are copied) INCBIN "unknown/1f0000.bin" diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm index 31825efaa..2317e8f64 100644 --- a/maps/BattleTower1F.asm +++ b/maps/BattleTower1F.asm @@ -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" diff --git a/maps/BattleTowerBattleRoom.asm b/maps/BattleTowerBattleRoom.asm index 7e6a29e8f..874b5a594 100644 --- a/maps/BattleTowerBattleRoom.asm +++ b/maps/BattleTowerBattleRoom.asm @@ -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_LoadOpponentTrainerAndPokemons170b44 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 + if_equal $7, 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 diff --git a/maps/BattleTowerHallway.asm b/maps/BattleTowerHallway.asm index 9d2d610d1..9da7ccf3f 100644 --- a/maps/BattleTowerHallway.asm +++ b/maps/BattleTowerHallway.asm @@ -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: @@ -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 diff --git a/misc/mobile_45.asm b/misc/mobile_45.asm index fe4729b9c..9f76d36bc 100644 --- a/misc/mobile_45.asm +++ b/misc/mobile_45.asm @@ -9739,11 +9739,11 @@ Function118922: ; 118922 ld a, [wcd38] and a jr nz, .asm_11892d - ld hl, UnknownText_0x11aba5 + ld hl, Text_WhatLevelDoYouWantToChallenge jr .asm_118930 .asm_11892d - ld hl, UnknownText_0x11abcb + ld hl, Text_CheckBattleRoomListByMaxLevel .asm_118930 call Function11a9c0 @@ -9770,13 +9770,13 @@ Function118936: ld a, [StatusFlags] bit 6, a jr nz, .asm_11896b - ld hl, Strings_119d64 - ld a, $5 + ld hl, Strings_Ll0ToL40 ; Address to list of strings with the choosable levels + ld a, 5 ; 4 levels to choose from, including 'Cancel'-option jr .asm_118970 .asm_11896b - ld hl, Strings_119d0c - ld a, $b + ld hl, Strings_L10ToL100 ; Address to list of strings with the choosable levels + ld a, 11 ; 10 levels to choose from, including 'Cancel'-option .asm_118970 ld [wcd4a], a @@ -12537,7 +12537,7 @@ MenuData_119cff: ; 119cff String_119d07: db " ▼@" -Strings_119d0c: +Strings_L10ToL100: ; 119d0c db " L:10 @@" db " L:20 @@" db " L:30 @@" @@ -12550,7 +12550,7 @@ Strings_119d0c: db " L:100@@" db "CANCEL@@" -Strings_119d64: +Strings_Ll0ToL40: ; 119d64 db " L:10 @@" db " L:20 @@" db " L:30 @@" @@ -14274,13 +14274,13 @@ UnknownText_0x11ab8b: ; 0x11ab8b done ; 0x11aba5 -UnknownText_0x11aba5: ; 0x11aba5 +Text_WhatLevelDoYouWantToChallenge: ; 0x11aba5 text "What level do you" line "want to challenge?" done ; 0x11abcb -UnknownText_0x11abcb: ; 0x11abcb +Text_CheckBattleRoomListByMaxLevel: ; 0x11abcb text "Check BATTLE ROOM" line "list by max level?" done @@ -22852,9 +22852,9 @@ Function17024d: ; 17024d ld [ScriptVar], a and a jr nz, .asm_1702a9 - ld a, $1 + ld a, BANK(sbe46) call GetSRAMBank - ld a, [$be46] + ld a, [sbe46] ld [wcf64], a call CloseSRAM ld hl, StringBuffer3 @@ -22874,19 +22874,20 @@ Function17024d: ; 17024d ret ; 1702b7 +; Initialise the BattleTower-Trainer and his Pkmn Function1702b7: ; 1702b7 call Function1704a2 ld de, $c643 ld c, $b callba Function17d073 jr nc, .asm_1702db - ld a, [$c608 + 11] + ld a, [BT_OTTempCopy + 11] ld [wd265], a call GetPokemonName ld l, e ld h, d ld de, $c643 - ld bc, $000b + ld bc, PKMN_NAME_LENGTH call CopyBytes .asm_1702db @@ -22900,7 +22901,7 @@ Function1702b7: ; 1702b7 ld l, e ld h, d ld de, $c67e - ld bc, $000b + ld bc, PKMN_NAME_LENGTH call CopyBytes .asm_1702fc @@ -22914,7 +22915,7 @@ Function1702b7: ; 1702b7 ld l, e ld h, d ld de, $c686 + 51 - ld bc, $000b + ld bc, PKMN_NAME_LENGTH call CopyBytes .asm_17031d @@ -22923,7 +22924,7 @@ Function1702b7: ; 1702b7 ld [$c688], a ld [$c68a + 57], a call Function170c98 - ld de, $c608 + ld de, BT_OTTempCopy ld c, $a callba Function17d073 jr nc, .asm_17033d @@ -22931,7 +22932,7 @@ Function1702b7: ; 1702b7 jr .asm_170340 .asm_17033d - ld hl, $c608 + ld hl, BT_OTTempCopy ; 0xc608 .asm_170340 ld de, wd26b @@ -22939,7 +22940,7 @@ Function1702b7: ; 1702b7 call CopyBytes ld a, $50 ld [de], a - ld hl, $c608 + 10 + ld hl, BT_OTTempCopy + $a ld a, [hli] ld [OtherTrainerClass], a ld a, $ea @@ -22948,9 +22949,11 @@ Function1702b7: ; 1702b7 ld [wcd21], a ld de, OTPartyMon1Species ld bc, OTPartyCount - ld a, $3 + ld a, $3 ; Number of Pkmn the BattleTower-Trainer has ld [bc], a inc bc + + ; Copy Pkmn into Memory from the address in hl .asm_170367 push af ld a, [hl] @@ -23170,17 +23173,17 @@ Function1704a2: ; 1704a2 push af ld a, $3 ld [rSVBK], a - ld hl, LYOverrides + ld hl, $d100 ; this is NOT LYOverrides ld de, $c608 - ld bc, $00e0 + ld bc, BT_OTrainerEnd - BT_OTrainer call CopyBytes pop af ld [rSVBK], a - ld a, $1 + ld a, BANK(s1_be45) call GetSRAMBank ld a, $2 - ld [$be45], a - ld hl, $be46 + ld [s1_be45], a + ld hl, sbe46 inc [hl] call CloseSRAM Function1704c9: @@ -23500,56 +23503,57 @@ endr Jumptable_170696: ; 170696 (5c:4696) - dw Function17075f - dw Function170788 - dw Function170778 - dw Function170799 - dw Function17079d - dw Function1707ac - dw Function1707f4 - dw Function170868 - dw Function170881 - dw Function17089a - dw Function1708b1 - dw Function1708b9 - dw Function1708c8 - dw Function1708f0 - dw Function17093c - dw Function1709aa - dw Function1709bb - dw Function170a9c - dw Function170aa0 - dw Function170aaf - dw Function170abe - dw Function170ad7 - dw Function170807 - dw Function17081d - dw Function170ae8 - dw Function170b16 - dw Function1706d6 - dw Function1706ee - dw Function17071b - dw Function170729 - dw Function17073e - dw Function170737 - - + dw Function17075f ; 0x00 + dw Function170788 ; 0x01 + dw Function170778 ; 0x02 + dw Function170799 ; 0x03 + dw Function17079d ; 0x04 + dw Function1707ac ; 0x05 + dw Function1707f4 ; 0x06 + dw Function170868 ; 0x07 + dw Function170881 ; 0x08 + dw Function17089a ; 0x09 + dw Function1708b1 ; 0x0a + dw Function1708b9 ; 0x0b + dw Function1708c8 ; 0x0c + dw Function1708f0 ; 0x0d + dw Function17093c ; 0x0e + dw Function1709aa ; 0x0f + dw Function1709bb ; 0x10 + dw Function170a9c ; 0x11 + dw Function170aa0 ; 0x12 + dw Function170aaf ; 0x13 + dw Function170abe ; 0x14 + dw Function170ad7 ; 0x15 + dw Function170807 ; 0x16 + dw Function17081d ; 0x17 + dw Function170ae8 ; 0x18 + dw Function170b16 ; 0x19 + dw Function1706d6 ; 0x1a + dw Function1706ee ; 0x1b + dw Function17071b ; 0x1c + dw Function170729 ; 0x1d + dw Function17073e ; 0x1e + dw Function170737 ; 0x1f + + +; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes) Function1706d6: ; 1706d6 (5c:46d6) - ld a, $1 + ld a, BANK(sBTTrainers) call GetSRAMBank ld a, $ff - ld hl, $be48 + ld hl, sBTTrainers ld bc, $7 call ByteFill xor a - ld [$be46], a + ld [sbe46], a call CloseSRAM ret Function1706ee: ; 1706ee (5c:46ee) - ld a, $1 + ld a, BANK(sbe50) call GetSRAMBank - ld a, [$be50] + ld a, [sbe50] call CloseSRAM ld [ScriptVar], a ld hl, NumItems @@ -23575,18 +23579,18 @@ Function1706ee: ; 1706ee (5c:46ee) ret Function17071b: ; 17071b (5c:471b) - ld a, $1 + ld a, BANK(s1_be45) call GetSRAMBank ld a, $3 - ld [$be45], a + ld [s1_be45], a call CloseSRAM ret Function170729: ; 170729 (5c:4729) - ld a, $1 + ld a, BANK(s1_be45) call GetSRAMBank ld a, $4 - ld [$be45], a + ld [s1_be45], a call CloseSRAM ret @@ -23606,10 +23610,10 @@ Function17073e: ; 17073e (5c:473e) cp $1e jr z, Function17073e push af - ld a, $1 + ld a, BANK(sbe50) call GetSRAMBank pop af - ld [$be50], a + ld [sbe50], a call CloseSRAM ret @@ -23618,17 +23622,17 @@ Function17075f: ; 17075f (5c:475f) ld a, [ScriptVar] and a ret z - ld a, $1 + ld a, BANK(sbe4f) call GetSRAMBank - ld a, [$be4f] + ld a, [sbe4f] and $2 ld [ScriptVar], a call CloseSRAM ret Function170778: ; 170778 (5c:4778) - ld hl, $be45 - ld a, $1 + ld hl, s1_be45 + ld a, BANK(s1_be45) call GetSRAMBank ld a, [hl] ld [ScriptVar], a @@ -23636,11 +23640,11 @@ Function170778: ; 170778 (5c:4778) ret Function170788: ; 170788 (5c:4788) - ld a, $1 + ld a, BANK(sbe4f) call GetSRAMBank - ld a, [$be4f] + ld a, [sbe4f] or $2 - ld [$be4f], a + ld [sbe4f], a call CloseSRAM ret @@ -23651,10 +23655,10 @@ Function170799: ; 170799 (5c:4799) Function17079d: ; 17079d (5c:479d) ld c, $0 asm_17079f: ; 17079f (5c:479f) - ld a, $1 + ld a, BANK(s1_be45) call GetSRAMBank ld a, c - ld [$be45], a + ld [s1_be45], a call CloseSRAM ret @@ -23763,27 +23767,27 @@ Function17081d: ; 17081d (5c:481d) ret Function170868: ; 170868 (5c:4868) - ld a, $1 + ld a, BANK(sbe47) call GetSRAMBank ld a, [rSVBK] ; $ff00+$70 push af ld a, $3 ld [rSVBK], a ; $ff00+$70 ld a, [wd000 + $800] - ld [$be47], a + ld [sbe47], a pop af ld [rSVBK], a ; $ff00+$70 call CloseSRAM ret Function170881: ; 170881 (5c:4881) - ld a, $1 + ld a, BANK(sbe47) call GetSRAMBank ld a, [rSVBK] ; $ff00+$70 push af ld a, $3 ld [rSVBK], a ; $ff00+$70 - ld a, [$be47] + ld a, [sbe47] ld [wd000 + $800], a pop af ld [rSVBK], a ; $ff00+$70 @@ -23815,9 +23819,9 @@ Function1708b1: ; 1708b1 (5c:48b1) ret Function1708b9: ; 1708b9 (5c:48b9) - ld a, $1 + ld a, BANK(s1_be3c) call GetSRAMBank - ld a, [$be3c] + ld a, [s1_be3c] ld [ScriptVar], a call CloseSRAM ret @@ -24121,20 +24125,20 @@ Function170abe: ; 170abe (5c:4abe) ld a, [ScriptVar] and a ret z - ld a, $1 + ld a, BANK(sbe4f) call GetSRAMBank - ld a, [$be4f] + ld a, [sbe4f] and $1 ld [ScriptVar], a call CloseSRAM ret Function170ad7: ; 170ad7 (5c:4ad7) - ld a, $1 + ld a, BANK(sbe4f) call GetSRAMBank - ld a, [$be4f] + ld a, [sbe4f] or $1 - ld [$be4f], a + ld [sbe4f], a call CloseSRAM ret @@ -24178,8 +24182,8 @@ Function170b16: ; 170b16 (5c:4b16) ld [ScriptVar], a ret -Function170b44: ; 170b44 - callba Function1f8000 +Function_LoadOpponentTrainerAndPokemons170b44: ; 0x170b44 + callba Function_LoadOpponentTrainerAndPokemons ld a, [rSVBK] push af ld a, $3 @@ -24237,8 +24241,8 @@ Function170bd2: ; 170bd2 ret ; 170bd3 -Function170bd3: ; 170bd3 - callba Function8b201 +SpecialCheckForBattleTowerRules: ; 170bd3 + callba CheckForBattleTowerRules jr c, .asm_170bde xor a jr .asm_170be0 diff --git a/misc/mobile_5f.asm b/misc/mobile_5f.asm index 8e675e0d3..9c38fbb27 100644 --- a/misc/mobile_5f.asm +++ b/misc/mobile_5f.asm @@ -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 diff --git a/text/battle.asm b/text/battle.asm index 3f29835aa..a05159568 100644 --- a/text/battle.asm +++ b/text/battle.asm @@ -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 "" @@ -271,7 +271,7 @@ BattleText_0x80aca: ; 0x80aca done ; 0x80af8 -BattleText_0x80af8: ; 0x80af8 +BattleText_EnemySentOut: ; 0x80af8 text "<ENEMY>" line "sent out" cont "@" @@ -1282,7 +1282,7 @@ IgnoredOrders2Text: ; 0x81850 prompt ; 0x81863 -BattleText_0x81863: ; 0x81863 +BattleText_LinkErrorBattleCanceled: ; 0x81863 text "Link error…" para "The battle has" diff --git a/text/common_2.asm b/text/common_2.asm index 60a92f0c3..5e0665bd4 100644 --- a/text/common_2.asm +++ b/text/common_2.asm @@ -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 diff --git a/text/common_3.asm b/text/common_3.asm index c73e91d74..e010d1fec 100644 --- a/text/common_3.asm +++ b/text/common_3.asm @@ -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." diff --git a/text/common_4.asm b/text/common_4.asm index 09bfff312..c96d032f8 100644 --- a/text/common_4.asm +++ b/text/common_4.asm @@ -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 "" @@ -884,6 +884,16 @@ wMiscEnd:: wc7e8:: ds 24 +RSSET $c608 ;$c000+(wc608-wc000) ; compute the address through doesn't seem to work +BT_OTTempCopy RW 1 +str_tData RB 256 +str_bCount RB 1 +str_SIZEOF RB 0 + +GLOBAL BT_OTTempCopy + + + SECTION "Overworld Map", WRAM0 [$c800] wc800:: @@ -1818,6 +1828,7 @@ wd25e:: ds 4 wd262:: ds 1 wd263:: ds 1 wd264:: ds 1 +GetPokemonName_Parameter:: wd265:: ds 1 wd266:: ds 1 wd267:: ds 1 @@ -2600,8 +2611,27 @@ SECTION "WRAM 3", WRAMX, BANK [3] ds $100 -w3_d100:: - ds $700 +BT_OTrainer:: +w3_d100:: ; BattleTower OpponentTrainer-Data (lengt = 0xe0) + ds $6 + ds $5 +BT_OTPkmn1:: ; w3_d10b + ds $1 +BT_OTPkmn1Item:: + ds $3b-1 +BT_OTPkmn2:: ; w3_d146 + ds $1 +BT_OTPkmn2Item:: + ds $3b-1 +BT_OTPkmn3:: ; w3_d181 + ds $1 +BT_OTPkmn3Item:: + ds $3b-1 + + ds $24 +BT_OTrainerEnd:: + + ds $620 w3_d800:: ds 1 @@ -2772,17 +2802,25 @@ sCrystalData:: s1_be44:: ds 1 s1_be45:: ds 1 +; data of the BattleTower must be in SRAM because you can save and leave between battles sBattleTower:: ; be46 sbe46:: ds 1 sbe47:: ds 1 -sbe48:: ds 7 -sbe4f:: ds 2 -sbe51:: ds 1 -sbe52:: ds 1 -sbe53:: ds 1 -sbe54:: ds 1 -sbe55:: ds 1 -sbe56:: ds 1 +; The 7 trainers of the BattleTower are saved here, so nobody appears more than once +sBTTrainers:: ; sbe48 + ds 7 +sbe4f:: ds 1 +sbe50:: ds 1 +; Pkmn of previous trainer +sBTPkmnOfTrainers:: ; 0xbe51 +sBTPkmnPrevTrainer1:: + ds 1 +sBTPkmnPrevTrainer2:: ds 1 +sBTPkmnPrevTrainer3:: ds 1 +; Pkmn of preprevious trainer +sBTPkmnPrevPrevTrainer1:: ds 1 +sBTPkmnPrevPrevTrainer2:: ds 1 +sBTPkmnPrevPrevTrainer3:: ds 1 SECTION "Boxes 1-7", SRAM, BANK [2] |