mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Merge pull request #312 from JimB16/master
Added comments and changed labels (mainly for BattleTower)
This commit is contained in:
commit
cc0d5d4c8b
@ -1,4 +1,4 @@
|
|||||||
Function38000: ; 38000
|
AI_SwitchOrTryItem: ; 38000
|
||||||
and a
|
and a
|
||||||
|
|
||||||
ld a, [IsInBattle]
|
ld a, [IsInBattle]
|
||||||
@ -21,7 +21,7 @@ Function38000: ; 38000
|
|||||||
jr nz, DontSwitch
|
jr nz, DontSwitch
|
||||||
|
|
||||||
ld hl, TrainerClassAttributes + 5
|
ld hl, TrainerClassAttributes + 5
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle] ; Load always the first TrainerClass for BattleTower-Trainers
|
||||||
and a
|
and a
|
||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
ld a, [TrainerClass]
|
ld a, [TrainerClass]
|
||||||
@ -73,6 +73,7 @@ SwitchOften: ; 38045
|
|||||||
ld a, [wc717]
|
ld a, [wc717]
|
||||||
and $f
|
and $f
|
||||||
inc a
|
inc a
|
||||||
|
; In register 'a' is the number (1-6) of the Pkmn to switch to
|
||||||
ld [wc718], a
|
ld [wc718], a
|
||||||
jp AI_TrySwitch
|
jp AI_TrySwitch
|
||||||
; 38083
|
; 38083
|
||||||
@ -148,7 +149,7 @@ SwitchSometimes: ; 380c1
|
|||||||
; 380ff
|
; 380ff
|
||||||
|
|
||||||
|
|
||||||
Function380ff: ; 380ff
|
CheckSubstatusCantRun: ; 380ff
|
||||||
ld a, [EnemySubStatus5]
|
ld a, [EnemySubStatus5]
|
||||||
bit SUBSTATUS_CANT_RUN, a
|
bit SUBSTATUS_CANT_RUN, a
|
||||||
ret
|
ret
|
||||||
@ -156,7 +157,8 @@ Function380ff: ; 380ff
|
|||||||
|
|
||||||
|
|
||||||
AI_TryItem: ; 38105
|
AI_TryItem: ; 38105
|
||||||
ld a, [wcfc0]
|
; items are not allowed in the BattleTower
|
||||||
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -565,7 +567,7 @@ Function383a3: ; 383a3 (e:43a3)
|
|||||||
call AIUsedItemSound
|
call AIUsedItemSound
|
||||||
call AI_HealStatus
|
call AI_HealStatus
|
||||||
ld a, FULL_HEAL
|
ld a, FULL_HEAL
|
||||||
jp Function38568
|
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||||
|
|
||||||
Function383ae: ; 383ae (e:43ae)
|
Function383ae: ; 383ae (e:43ae)
|
||||||
ld a, MAX_POTION
|
ld a, MAX_POTION
|
||||||
@ -658,7 +660,7 @@ Function383f8: ; 383f8
|
|||||||
.asm_38436
|
.asm_38436
|
||||||
|
|
||||||
Function38436: ; 38436
|
Function38436: ; 38436
|
||||||
call Function38571
|
call PrintText_UsedItemOn
|
||||||
hlcoord 2, 2
|
hlcoord 2, 2
|
||||||
xor a
|
xor a
|
||||||
ld [wd10a], a
|
ld [wd10a], a
|
||||||
@ -715,7 +717,7 @@ AI_Switch: ; 3846c
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
jr c, .asm_384a3
|
jr c, .asm_384a3
|
||||||
ld hl, UnknownText_0x384d0
|
ld hl, TextJump_EnemyWithdrew
|
||||||
call PrintText
|
call PrintText
|
||||||
.asm_384a3
|
.asm_384a3
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -735,8 +737,8 @@ AI_Switch: ; 3846c
|
|||||||
ret
|
ret
|
||||||
; 384d0
|
; 384d0
|
||||||
|
|
||||||
UnknownText_0x384d0: ; 384d0
|
TextJump_EnemyWithdrew: ; 384d0
|
||||||
text_jump UnknownText_0x1bcf9c
|
text_jump Text_EnemyWithdrew
|
||||||
db "@"
|
db "@"
|
||||||
; 384d5
|
; 384d5
|
||||||
|
|
||||||
@ -744,7 +746,7 @@ Function384d5: ; 384d5
|
|||||||
call AIUsedItemSound
|
call AIUsedItemSound
|
||||||
call AI_HealStatus
|
call AI_HealStatus
|
||||||
ld a, FULL_HEAL_RED
|
ld a, FULL_HEAL_RED
|
||||||
jp Function38568
|
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||||
; 384e0
|
; 384e0
|
||||||
|
|
||||||
AI_HealStatus: ; 384e0
|
AI_HealStatus: ; 384e0
|
||||||
@ -765,7 +767,7 @@ Function384f7: ; 384f7
|
|||||||
ld hl, EnemySubStatus4
|
ld hl, EnemySubStatus4
|
||||||
set SUBSTATUS_X_ACCURACY, [hl]
|
set SUBSTATUS_X_ACCURACY, [hl]
|
||||||
ld a, X_ACCURACY
|
ld a, X_ACCURACY
|
||||||
jp Function38568
|
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||||
; 38504
|
; 38504
|
||||||
|
|
||||||
Function38504: ; 38504
|
Function38504: ; 38504
|
||||||
@ -773,7 +775,7 @@ Function38504: ; 38504
|
|||||||
ld hl, EnemySubStatus4
|
ld hl, EnemySubStatus4
|
||||||
set SUBSTATUS_MIST, [hl]
|
set SUBSTATUS_MIST, [hl]
|
||||||
ld a, GUARD_SPEC
|
ld a, GUARD_SPEC
|
||||||
jp Function38568
|
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||||
; 38511
|
; 38511
|
||||||
|
|
||||||
Function38511: ; 38511
|
Function38511: ; 38511
|
||||||
@ -781,7 +783,7 @@ Function38511: ; 38511
|
|||||||
ld hl, EnemySubStatus4
|
ld hl, EnemySubStatus4
|
||||||
set SUBSTATUS_FOCUS_ENERGY, [hl]
|
set SUBSTATUS_FOCUS_ENERGY, [hl]
|
||||||
ld a, DIRE_HIT
|
ld a, DIRE_HIT
|
||||||
jp Function38568
|
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||||
; 3851e
|
; 3851e
|
||||||
|
|
||||||
Function3851e: ; 3851e
|
Function3851e: ; 3851e
|
||||||
@ -832,23 +834,29 @@ Function38553: ; 38553
|
|||||||
ld b, SP_ATTACK
|
ld b, SP_ATTACK
|
||||||
ld a, X_SPECIAL
|
ld a, X_SPECIAL
|
||||||
|
|
||||||
|
|
||||||
|
; Parameter
|
||||||
|
; a = ITEM_CONSTANT
|
||||||
|
; b = BATTLE_CONSTANT (ATTACK, DEFENSE, SPEED, SP_ATTACK, SP_DEFENSE, ACCURACY, EVASION)
|
||||||
Function38557:
|
Function38557:
|
||||||
ld [wd1f1], a
|
ld [wd1f1], a
|
||||||
push bc
|
push bc
|
||||||
call Function38571
|
call PrintText_UsedItemOn
|
||||||
pop bc
|
pop bc
|
||||||
callba Function361ef
|
callba Function361ef
|
||||||
jp AIUpdateHUD
|
jp AIUpdateHUD
|
||||||
; 38568
|
; 38568
|
||||||
|
|
||||||
|
|
||||||
Function38568: ; 38568
|
; Parameter
|
||||||
|
; a = ITEM_CONSTANT
|
||||||
|
PrintText_UsedItemOn_AND_AIUpdateHUD: ; 38568
|
||||||
ld [wd1f1], a
|
ld [wd1f1], a
|
||||||
call Function38571
|
call PrintText_UsedItemOn
|
||||||
jp AIUpdateHUD
|
jp AIUpdateHUD
|
||||||
; 38571
|
; 38571
|
||||||
|
|
||||||
Function38571: ; 38571
|
PrintText_UsedItemOn: ; 38571
|
||||||
ld a, [wd1f1]
|
ld a, [wd1f1]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
@ -856,11 +864,11 @@ Function38571: ; 38571
|
|||||||
ld de, wd050
|
ld de, wd050
|
||||||
ld bc, ITEM_NAME_LENGTH
|
ld bc, ITEM_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, UnknownText_0x3858c
|
ld hl, TextJump_EnemyUsedOn
|
||||||
jp PrintText
|
jp PrintText
|
||||||
; 3858c
|
; 3858c
|
||||||
|
|
||||||
UnknownText_0x3858c: ; 3858c
|
TextJump_EnemyUsedOn: ; 3858c
|
||||||
text_jump UnknownText_0x1bcfaf
|
text_jump Text_EnemyUsedOn
|
||||||
db "@"
|
db "@"
|
||||||
; 38591
|
; 38591
|
||||||
|
310
battle/core.asm
310
battle/core.asm
@ -63,7 +63,7 @@ Function3c000: ; 3c000
|
|||||||
xor a
|
xor a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
.asm_3c06b
|
.asm_3c06b
|
||||||
call Function3d887
|
call CheckIfPartyHasPkmnToBattleWith
|
||||||
jr nz, .asm_3c076
|
jr nz, .asm_3c076
|
||||||
ld hl, CurPartyMon
|
ld hl, CurPartyMon
|
||||||
inc [hl]
|
inc [hl]
|
||||||
@ -71,7 +71,7 @@ Function3c000: ; 3c000
|
|||||||
|
|
||||||
.asm_3c076
|
.asm_3c076
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [wc71a], a
|
ld [LastPlayerMon], a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld [CurBattleMon], a
|
ld [CurBattleMon], a
|
||||||
inc a
|
inc a
|
||||||
@ -89,7 +89,7 @@ Function3c000: ; 3c000
|
|||||||
call Function3d57a
|
call Function3d57a
|
||||||
call Function3da0d
|
call Function3da0d
|
||||||
call ResetPlayerStatLevels
|
call ResetPlayerStatLevels
|
||||||
call Function3f26d
|
call SendOutPkmnText
|
||||||
call NewBattleMonStatus
|
call NewBattleMonStatus
|
||||||
call BreakAttraction
|
call BreakAttraction
|
||||||
call Function3db5f
|
call Function3db5f
|
||||||
@ -121,7 +121,7 @@ Function3c000: ; 3c000
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function3c0e5: ; 3c0e5
|
WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
|
||||||
call Function30b4
|
call Function30b4
|
||||||
ld a, [wd0ee]
|
ld a, [wd0ee]
|
||||||
and $c0
|
and $c0
|
||||||
@ -129,18 +129,21 @@ Function3c0e5: ; 3c0e5
|
|||||||
ld [wd0ee], a
|
ld [wd0ee], a
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
ld hl, BattleText_0x807bd
|
ld hl, BattleText_WildFled
|
||||||
jr z, .asm_3c115
|
jr z, .asm_3c115
|
||||||
|
|
||||||
ld a, [wd0ee]
|
ld a, [wd0ee]
|
||||||
and $c0
|
and $c0
|
||||||
ld [wd0ee], a
|
ld [wd0ee], a
|
||||||
ld hl, BattleText_0x807cf
|
ld hl, BattleText_EnemyFled
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
jr nc, .asm_3c115
|
jr nc, .asm_3c115
|
||||||
|
|
||||||
ld hl, wcd2a
|
ld hl, wcd2a
|
||||||
bit 4, [hl]
|
bit 4, [hl]
|
||||||
jr nz, .asm_3c118
|
jr nz, .asm_3c118
|
||||||
ld hl, BattleText_0x81863
|
|
||||||
|
ld hl, BattleText_LinkErrorBattleCanceled
|
||||||
|
|
||||||
.asm_3c115
|
.asm_3c115
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@ -160,6 +163,7 @@ Function3c0e5: ; 3c0e5
|
|||||||
ret
|
ret
|
||||||
; 3c12f
|
; 3c12f
|
||||||
|
|
||||||
|
|
||||||
Function3c12f: ; 3c12f
|
Function3c12f: ; 3c12f
|
||||||
.loop
|
.loop
|
||||||
call Function3c1bf
|
call Function3c1bf
|
||||||
@ -296,9 +300,9 @@ Function3c1d6: ; 3c1d6
|
|||||||
.asm_3c21e
|
.asm_3c21e
|
||||||
call Function3c8eb
|
call Function3c8eb
|
||||||
call Function3c93c
|
call Function3c93c
|
||||||
call Function3ca8f
|
call HanleDefrost
|
||||||
call Function3cafb
|
call HandleSafeguard
|
||||||
call Function3cb36
|
call HandleScreens
|
||||||
call Function3de97
|
call Function3de97
|
||||||
call Function3dcf9
|
call Function3dcf9
|
||||||
call UpdateBattleMonInParty
|
call UpdateBattleMonInParty
|
||||||
@ -446,7 +450,7 @@ Function3c300: ; 3c300
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3c30f
|
.asm_3c30f
|
||||||
call Function3c0e5
|
call WildFled_EnemyFled_LinkBattleCanceled
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 3c314
|
; 3c314
|
||||||
@ -935,11 +939,11 @@ GetMoveEffect: ; 3c5ec
|
|||||||
Function3c5fe: ; 3c5fe
|
Function3c5fe: ; 3c5fe
|
||||||
call Function309d
|
call Function309d
|
||||||
call Function3c543
|
call Function3c543
|
||||||
jp c, Function3c0e5
|
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc70f], a
|
ld [wc70f], a
|
||||||
callab Function38000
|
callab AI_SwitchOrTryItem
|
||||||
jr c, .asm_3c62f
|
jr c, .asm_3c62f
|
||||||
call Function3c6de
|
call Function3c6de
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
@ -980,7 +984,7 @@ Function3c664: ; 3c664
|
|||||||
xor a
|
xor a
|
||||||
ld [wc70f], a
|
ld [wc70f], a
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
callab Function38000
|
callab AI_SwitchOrTryItem
|
||||||
push af
|
push af
|
||||||
call Function3c6cf
|
call Function3c6cf
|
||||||
pop bc
|
pop bc
|
||||||
@ -1004,7 +1008,7 @@ Function3c664: ; 3c664
|
|||||||
jr c, .asm_3c6be
|
jr c, .asm_3c6be
|
||||||
call Function309d
|
call Function309d
|
||||||
call Function3c543
|
call Function3c543
|
||||||
jp c, Function3c0e5
|
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
call Function3c6de
|
call Function3c6de
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
ret c
|
ret c
|
||||||
@ -1528,7 +1532,7 @@ Function3c93c: ; 3c93c
|
|||||||
call SwitchTurnCore
|
call SwitchTurnCore
|
||||||
call Function3ddc8
|
call Function3ddc8
|
||||||
call SwitchTurnCore
|
call SwitchTurnCore
|
||||||
ld hl, BattleText_0x80899
|
ld hl, BattleText_UserRecoveredPPUsing
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3ca26
|
; 3ca26
|
||||||
|
|
||||||
@ -1590,7 +1594,7 @@ Function3ca26: ; 3ca26
|
|||||||
jp UpdateEnemyMonInParty
|
jp UpdateEnemyMonInParty
|
||||||
; 3ca8f
|
; 3ca8f
|
||||||
|
|
||||||
Function3ca8f: ; 3ca8f
|
HanleDefrost: ; 3ca8f
|
||||||
ld a, [$ffcb]
|
ld a, [$ffcb]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_3ca9a
|
jr z, .asm_3ca9a
|
||||||
@ -1648,7 +1652,7 @@ Function3ca8f: ; 3ca8f
|
|||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3cafb
|
; 3cafb
|
||||||
|
|
||||||
Function3cafb: ; 3cafb
|
HandleSafeguard: ; 3cafb
|
||||||
ld a, [$ffcb]
|
ld a, [$ffcb]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_3cb06
|
jr z, .asm_3cb06
|
||||||
@ -1682,12 +1686,11 @@ Function3cafb: ; 3cafb
|
|||||||
|
|
||||||
.asm_3cb2e
|
.asm_3cb2e
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
ld hl, BattleText_0x808d2
|
ld hl, BattleText_SafeguardFaded
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3cb36
|
|
||||||
|
|
||||||
|
|
||||||
Function3cb36: ; 3cb36
|
HandleScreens: ; 3cb36
|
||||||
ld a, [$ffcb]
|
ld a, [$ffcb]
|
||||||
cp 1
|
cp 1
|
||||||
jr z, .Both
|
jr z, .Both
|
||||||
@ -1739,7 +1742,7 @@ FadeLightScreen: ; 3cb80
|
|||||||
res SCREENS_LIGHT_SCREEN, [hl]
|
res SCREENS_LIGHT_SCREEN, [hl]
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld hl, BattleText_0x808e7
|
ld hl, BattleText_PkmnnLightScreenFell
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@ -1850,13 +1853,13 @@ endr
|
|||||||
; 3cc2d
|
; 3cc2d
|
||||||
|
|
||||||
.WeatherMessages
|
.WeatherMessages
|
||||||
dw BattleText_0x8091f
|
dw BattleText_RainContinuesToFall
|
||||||
dw BattleText_0x80938
|
dw BattleText_TheSunlightIsStrong
|
||||||
dw BattleText_0x80951
|
dw BattleText_TheSandstormRages
|
||||||
.WeatherEndedMessages
|
.WeatherEndedMessages
|
||||||
dw BattleText_0x80967
|
dw BattleText_TheRainStopped
|
||||||
dw BattleText_0x8097a
|
dw BattleText_TheSunlightFaded
|
||||||
dw BattleText_0x8098f
|
dw BattleText_TheSandstormSubsided
|
||||||
; 3cc39
|
; 3cc39
|
||||||
|
|
||||||
Function3cc39: ; 3cc39
|
Function3cc39: ; 3cc39
|
||||||
@ -2143,19 +2146,19 @@ Function3cd55: ; 3cd55
|
|||||||
.asm_3cda4
|
.asm_3cda4
|
||||||
call Function3d227
|
call Function3d227
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
jp c, Function3c0e5
|
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
call Function3cf4a
|
call Function3cf4a
|
||||||
jp z, Function3c0e5
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
jr Function3cdca
|
jr Function3cdca
|
||||||
|
|
||||||
.asm_3cdba
|
.asm_3cdba
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
call Function3cf4a
|
call Function3cf4a
|
||||||
jp z, Function3c0e5
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
xor a
|
xor a
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
ret
|
ret
|
||||||
@ -2356,7 +2359,7 @@ Function3cef1: ; 3cef1
|
|||||||
hlcoord 9, 7
|
hlcoord 9, 7
|
||||||
lb bc, 5, 11
|
lb bc, 5, 11
|
||||||
call ClearBox
|
call ClearBox
|
||||||
ld hl, BattleText_0x80a75
|
ld hl, BattleText_PkmnFainted
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3cf14
|
; 3cf14
|
||||||
|
|
||||||
@ -2370,7 +2373,7 @@ Function3cf14: ; 3cf14
|
|||||||
hlcoord 1, 0
|
hlcoord 1, 0
|
||||||
lb bc, 4, 10
|
lb bc, 4, 10
|
||||||
call ClearBox
|
call ClearBox
|
||||||
ld hl, BattleText_0x809a8
|
ld hl, BattleText_EnemyPkmnFainted
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3cf35
|
; 3cf35
|
||||||
|
|
||||||
@ -2454,16 +2457,18 @@ Function3cfa4: ; 3cfa4
|
|||||||
ld a, b
|
ld a, b
|
||||||
call z, Function3d0ea
|
call z, Function3d0ea
|
||||||
callab Battle_GetTrainerName
|
callab Battle_GetTrainerName
|
||||||
ld hl, BattleText_0x809da
|
ld hl, BattleText_EnemyWasDefeated
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
call IsMobileBattle
|
call IsMobileBattle
|
||||||
jr z, .asm_3cff5
|
jr z, .asm_3cff5
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [wcfc0]
|
|
||||||
|
ld a, [InBattleTowerBattle]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr nz, .asm_3d006
|
jr nz, .asm_3d006
|
||||||
|
|
||||||
call Function3ebd8
|
call Function3ebd8
|
||||||
ld c, $28
|
ld c, $28
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
@ -2784,14 +2789,14 @@ Function3d14e: ; 3d14e
|
|||||||
.asm_3d190
|
.asm_3d190
|
||||||
call Function3d227
|
call Function3d227
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
jp c, Function3c0e5
|
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
call Function3cf4a
|
call Function3cf4a
|
||||||
jp z, Function3c0e5
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
jp Function3cdca
|
jp Function3cdca
|
||||||
; 3d1aa
|
; 3d1aa
|
||||||
|
|
||||||
@ -2840,7 +2845,7 @@ Function3d1f8: ; 3d1f8
|
|||||||
and a
|
and a
|
||||||
dec a
|
dec a
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, BattleText_0x80a83
|
ld hl, BattleText_UseNextMon
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
.asm_3d20a
|
.asm_3d20a
|
||||||
lb bc, 1, 7
|
lb bc, 1, 7
|
||||||
@ -2897,7 +2902,7 @@ Function3d227: ; 3d227
|
|||||||
.asm_3d26c
|
.asm_3d26c
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [wc71a], a
|
ld [LastPlayerMon], a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld [CurBattleMon], a
|
ld [CurBattleMon], a
|
||||||
call Function3d581
|
call Function3d581
|
||||||
@ -2909,7 +2914,7 @@ Function3d227: ; 3d227
|
|||||||
call WriteBackup
|
call WriteBackup
|
||||||
call ClearSGB
|
call ClearSGB
|
||||||
call Function32f9
|
call Function32f9
|
||||||
call Function3f26d
|
call SendOutPkmnText
|
||||||
call NewBattleMonStatus
|
call NewBattleMonStatus
|
||||||
call BreakAttraction
|
call BreakAttraction
|
||||||
call Function3db5f
|
call Function3db5f
|
||||||
@ -2925,13 +2930,13 @@ Function3d227: ; 3d227
|
|||||||
|
|
||||||
Function3d2b3: ; 3d2b3
|
Function3d2b3: ; 3d2b3
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [wc71a], a
|
ld [LastPlayerMon], a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld [CurBattleMon], a
|
ld [CurBattleMon], a
|
||||||
call Function3d581
|
call Function3d581
|
||||||
call Function3da0d
|
call Function3da0d
|
||||||
call ResetPlayerStatLevels
|
call ResetPlayerStatLevels
|
||||||
call Function3f26d
|
call SendOutPkmnText
|
||||||
call NewBattleMonStatus
|
call NewBattleMonStatus
|
||||||
call BreakAttraction
|
call BreakAttraction
|
||||||
call Function3db5f
|
call Function3db5f
|
||||||
@ -2945,10 +2950,13 @@ Function3d2b3: ; 3d2b3
|
|||||||
Function3d2e0: ; 3d2e0
|
Function3d2e0: ; 3d2e0
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
cp $4
|
cp $4
|
||||||
jr nz, .asm_3d2ef
|
jr nz, .asm_3d2ef ; It's not a mobile battle
|
||||||
|
|
||||||
ld a, [wcd2b]
|
ld a, [wcd2b]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3d2ef
|
jr z, .asm_3d2ef
|
||||||
|
|
||||||
|
; We have a mobile battle and something else happened
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -3000,7 +3008,7 @@ PickPartyMonInBattle: ; 3d33c
|
|||||||
call Function3d313
|
call Function3d313
|
||||||
call Function3d329
|
call Function3d329
|
||||||
ret c
|
ret c
|
||||||
call Function3d887
|
call CheckIfPartyHasPkmnToBattleWith
|
||||||
jr z, .loop
|
jr z, .loop
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
@ -3067,7 +3075,7 @@ LostBattle: ; 3d38e
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [BattleEnded], a
|
ld [BattleEnded], a
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr nz, .asm_3d3bd
|
jr nz, .asm_3d3bd
|
||||||
|
|
||||||
@ -3280,7 +3288,7 @@ Function3d4c3: ; 3d4c3
|
|||||||
call Function3d7a0
|
call Function3d7a0
|
||||||
call NewEnemyMonStatus
|
call NewEnemyMonStatus
|
||||||
call ResetEnemyStatLevels
|
call ResetEnemyStatLevels
|
||||||
call Function3d7c7
|
call Function_SetEnemyPkmnAndSendOutAnimation
|
||||||
call BreakAttraction
|
call BreakAttraction
|
||||||
call Function3d57a
|
call Function3d57a
|
||||||
ret
|
ret
|
||||||
@ -3299,8 +3307,8 @@ Function3d4e1: ; 3d4e1
|
|||||||
call Function3d74b
|
call Function3d74b
|
||||||
push af
|
push af
|
||||||
call Function3d7a0
|
call Function3d7a0
|
||||||
call Function3d7b8
|
call Function_BattleTextEnemySentOut
|
||||||
call Function3d7c7
|
call Function_SetEnemyPkmnAndSendOutAnimation
|
||||||
pop af
|
pop af
|
||||||
ret c
|
ret c
|
||||||
xor a
|
xor a
|
||||||
@ -3323,8 +3331,8 @@ Function3d517: ; 3d517
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wEnemyIsSwitching], a
|
ld [wEnemyIsSwitching], a
|
||||||
call Function3d7a0
|
call Function3d7a0
|
||||||
call Function3d7b8
|
call Function_BattleTextEnemySentOut
|
||||||
jp Function3d7c7
|
jp Function_SetEnemyPkmnAndSendOutAnimation
|
||||||
; 3d533
|
; 3d533
|
||||||
|
|
||||||
Function3d533: ; 3d533
|
Function3d533: ; 3d533
|
||||||
@ -3648,7 +3656,7 @@ Function3d74b: ; 3d74b
|
|||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
push af
|
push af
|
||||||
callab Battle_GetTrainerName
|
callab Battle_GetTrainerName
|
||||||
ld hl, BattleText_0x80aca
|
ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangePkmn
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
lb bc, 1, 7
|
lb bc, 1, 7
|
||||||
call PlaceYesNoBox
|
call PlaceYesNoBox
|
||||||
@ -3659,7 +3667,7 @@ Function3d74b: ; 3d74b
|
|||||||
call PickSwitchMonInBattle
|
call PickSwitchMonInBattle
|
||||||
jr c, .asm_3d791
|
jr c, .asm_3d791
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [wc71a], a
|
ld [LastPlayerMon], a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld [CurBattleMon], a
|
ld [CurBattleMon], a
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
@ -3697,14 +3705,14 @@ Function3d7a0: ; 3d7a0
|
|||||||
jp Function3ee27
|
jp Function3ee27
|
||||||
; 3d7b8
|
; 3d7b8
|
||||||
|
|
||||||
Function3d7b8: ; 3d7b8
|
Function_BattleTextEnemySentOut: ; 3d7b8
|
||||||
callab Battle_GetTrainerName
|
callab Battle_GetTrainerName
|
||||||
ld hl, BattleText_0x80af8
|
ld hl, BattleText_EnemySentOut
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
jp WaitBGMap
|
jp WaitBGMap
|
||||||
; 3d7c7
|
; 3d7c7
|
||||||
|
|
||||||
Function3d7c7: ; 3d7c7
|
Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
|
||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
@ -3806,13 +3814,14 @@ Function3d873: ; 3d873
|
|||||||
; 3d887
|
; 3d887
|
||||||
|
|
||||||
|
|
||||||
Function3d887: ; 3d887
|
CheckIfPartyHasPkmnToBattleWith: ; 3d887
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, PartyMon1HP
|
ld hl, PartyMon1HP
|
||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [wd264]
|
ld a, [wd264]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3d8b1
|
jr nz, .asm_3d8b1
|
||||||
@ -3823,9 +3832,10 @@ Function3d887: ; 3d887
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp EGG
|
cp EGG
|
||||||
ld hl, BattleText_0x80b26
|
ld hl, BattleText_AnEGGCantBattle
|
||||||
jr z, .asm_3d8ae
|
jr z, .asm_3d8ae
|
||||||
ld hl, BattleText_0x80b0b
|
|
||||||
|
ld hl, BattleText_TheresNoWillToBattle
|
||||||
|
|
||||||
.asm_3d8ae
|
.asm_3d8ae
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@ -3890,29 +3900,30 @@ Function3d8b3: ; 3d8b3
|
|||||||
inc a
|
inc a
|
||||||
ld [wd267], a
|
ld [wd267], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb5], a
|
ld [hStringCmpString2 + 0], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$ffb6], a
|
ld [hStringCmpString2 + 1], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld [$ffb1], a
|
ld [hStringCmpString1 + 0], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [$ffb2], a
|
ld [hStringCmpString1 + 1], a
|
||||||
call Function30b4
|
call Function30b4
|
||||||
ld de, $ffb5
|
ld de, hStringCmpString2
|
||||||
ld hl, $ffb1
|
ld hl, hStringCmpString1
|
||||||
ld c, $2
|
ld c, $2
|
||||||
call StringCmp
|
call StringCmp
|
||||||
jr nc, .asm_3d9a2
|
jr nc, .asm_3d9a2
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
ld [hProduct], a
|
ld [hDividend + 0], a
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
ld [hMultiplicand], a
|
ld [hDividend + 1], a
|
||||||
ld a, [$ffb1]
|
ld a, [$ffb1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb2]
|
ld a, [$ffb2]
|
||||||
@ -3922,10 +3933,10 @@ Function3d8b3: ; 3d8b3
|
|||||||
rr a
|
rr a
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3d9a2
|
jr z, .asm_3d9a2
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld b, $2
|
ld b, $2
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb5]
|
ld a, [hQuotient + 1]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3d9a2
|
jr nz, .asm_3d9a2
|
||||||
ld a, [wd267]
|
ld a, [wd267]
|
||||||
@ -3934,7 +3945,7 @@ Function3d8b3: ; 3d8b3
|
|||||||
dec c
|
dec c
|
||||||
jr z, .asm_3d97a
|
jr z, .asm_3d97a
|
||||||
ld b, $1e
|
ld b, $1e
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
add b
|
add b
|
||||||
ld [$ffb6], a
|
ld [$ffb6], a
|
||||||
jr c, .asm_3d9a2
|
jr c, .asm_3d9a2
|
||||||
@ -3948,15 +3959,15 @@ Function3d8b3: ; 3d8b3
|
|||||||
jr nc, .asm_3d9a2
|
jr nc, .asm_3d9a2
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
ld hl, BattleText_0x80b3b
|
ld hl, BattleText_CantEscape2
|
||||||
jr .asm_3d995
|
jr .asm_3d995
|
||||||
|
|
||||||
.asm_3d98d
|
.asm_3d98d
|
||||||
ld hl, BattleText_0x80ba0
|
ld hl, BattleText_CantEscape
|
||||||
jr .asm_3d995
|
jr .asm_3d995
|
||||||
|
|
||||||
.asm_3d992
|
.asm_3d992
|
||||||
ld hl, BattleText_0x80b49
|
ld hl, BattleText_TheresNoEscapeFromTrainerBattle
|
||||||
|
|
||||||
.asm_3d995
|
.asm_3d995
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@ -4001,7 +4012,7 @@ Function3d8b3: ; 3d8b3
|
|||||||
call WaitPlaySFX
|
call WaitPlaySFX
|
||||||
pop de
|
pop de
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld hl, BattleText_0x80b77
|
ld hl, BattleText_GotAwaySafely
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
call Function309d
|
call Function309d
|
||||||
@ -4013,7 +4024,7 @@ Function3d8b3: ; 3d8b3
|
|||||||
ld hl, wcd2a
|
ld hl, wcd2a
|
||||||
bit 4, [hl]
|
bit 4, [hl]
|
||||||
jr nz, .asm_3da05
|
jr nz, .asm_3da05
|
||||||
ld hl, BattleText_0x81863
|
ld hl, BattleText_LinkErrorBattleCanceled
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
.asm_3da05
|
.asm_3da05
|
||||||
@ -4172,7 +4183,7 @@ endr
|
|||||||
Function3db32: ; 3db32
|
Function3db32: ; 3db32
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [wc71a], a
|
ld [LastPlayerMon], a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld [CurBattleMon], a
|
ld [CurBattleMon], a
|
||||||
call Function3d581
|
call Function3d581
|
||||||
@ -4341,7 +4352,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_3dc7e
|
jr z, .asm_3dc7e
|
||||||
ld hl, DoEnemyTurn
|
ld hl, DoEnemyTurn
|
||||||
ld a, [wc71a]
|
ld a, [LastPlayerMon]
|
||||||
ld [CurBattleMon], a
|
ld [CurBattleMon], a
|
||||||
.asm_3dc7e
|
.asm_3dc7e
|
||||||
ld a, BANK(DoPlayerTurn)
|
ld a, BANK(DoPlayerTurn)
|
||||||
@ -4359,7 +4370,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_3dcc0
|
jr z, .asm_3dcc0
|
||||||
|
|
||||||
ld a, [wc71a]
|
ld a, [LastPlayerMon]
|
||||||
call UpdateBattleMon
|
call UpdateBattleMon
|
||||||
ld hl, BattleMonHP
|
ld hl, BattleMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -4376,7 +4387,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
ld b, $0
|
ld b, $0
|
||||||
predef FlagPredef
|
predef FlagPredef
|
||||||
call Function3d43b
|
call Function3d43b
|
||||||
ld hl, BattleText_0x80a75
|
ld hl, BattleText_PkmnFainted
|
||||||
jr .asm_3dcdf
|
jr .asm_3dcdf
|
||||||
|
|
||||||
.asm_3dcc0
|
.asm_3dcc0
|
||||||
@ -4392,7 +4403,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
call PlaySFX
|
call PlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
call Function3d432
|
call Function3d432
|
||||||
ld hl, BattleText_0x809a8
|
ld hl, BattleText_EnemyPkmnFainted
|
||||||
|
|
||||||
.asm_3dcdf
|
.asm_3dcdf
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@ -5003,17 +5014,18 @@ DrawEnemyHUD: ; 3e043
|
|||||||
|
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
or [hl]
|
or [hl]
|
||||||
jr nz, .asm_3e0d1
|
jr nz, .asm_3e0d1
|
||||||
|
|
||||||
ld c, a
|
ld c, a
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, HP_BAR_LENGTH
|
ld d, HP_BAR_LENGTH
|
||||||
jp .asm_3e11a
|
jp .asm_3e11a
|
||||||
.asm_3e0d1
|
|
||||||
|
|
||||||
|
.asm_3e0d1
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand], a
|
||||||
ld a, HP_BAR_LENGTH_PX
|
ld a, HP_BAR_LENGTH_PX
|
||||||
@ -5032,11 +5044,11 @@ DrawEnemyHUD: ; 3e043
|
|||||||
rr a
|
rr a
|
||||||
srl b
|
srl b
|
||||||
rr a
|
rr a
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
srl b
|
srl b
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
rr a
|
rr a
|
||||||
srl b
|
srl b
|
||||||
rr a
|
rr a
|
||||||
@ -5046,13 +5058,13 @@ DrawEnemyHUD: ; 3e043
|
|||||||
|
|
||||||
.asm_3e105
|
.asm_3e105
|
||||||
ld a, [$ffb5]
|
ld a, [$ffb5]
|
||||||
ld [hProduct], a
|
ld [hDividend + 0], a
|
||||||
ld a, [$ffb6]
|
ld a, [$ffb6]
|
||||||
ld [hMultiplicand], a
|
ld [hDividend + 1], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld b, a
|
ld b, a
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, HP_BAR_LENGTH
|
ld a, HP_BAR_LENGTH
|
||||||
ld d, a
|
ld d, a
|
||||||
@ -5160,7 +5172,7 @@ LoadBattleMenu2: ; 3e19b
|
|||||||
ld hl, wcd2a
|
ld hl, wcd2a
|
||||||
bit 4, [hl]
|
bit 4, [hl]
|
||||||
jr nz, .error
|
jr nz, .error
|
||||||
ld hl, BattleText_0x81863
|
ld hl, BattleText_LinkErrorBattleCanceled
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
ld c, 60
|
ld c, 60
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
@ -5174,7 +5186,7 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
and a
|
and a
|
||||||
jp nz, ItemsCantBeUsed
|
jp nz, ItemsCantBeUsed
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jp nz, ItemsCantBeUsed
|
jp nz, ItemsCantBeUsed
|
||||||
|
|
||||||
@ -5388,10 +5400,10 @@ Function3e358: ; 3e358
|
|||||||
jp Function3e299
|
jp Function3e299
|
||||||
|
|
||||||
.asm_3e381
|
.asm_3e381
|
||||||
call Function3d887
|
call CheckIfPartyHasPkmnToBattleWith
|
||||||
jp z, Function3e299
|
jp z, Function3e299
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [wc71a], a
|
ld [LastPlayerMon], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
@ -5437,7 +5449,7 @@ Function3e3ad: ; 3e3ad
|
|||||||
jp c, .asm_3e3ca
|
jp c, .asm_3e3ca
|
||||||
cp $f
|
cp $f
|
||||||
jr nz, .asm_3e3e9
|
jr nz, .asm_3e3e9
|
||||||
call Function3c0e5
|
call WildFled_EnemyFled_LinkBattleCanceled
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3e3e9
|
.asm_3e3e9
|
||||||
@ -5486,7 +5498,7 @@ BattleMonEntrance: ; 3e40b
|
|||||||
call Function3d581
|
call Function3d581
|
||||||
call Function3da0d
|
call Function3da0d
|
||||||
call ResetPlayerStatLevels
|
call ResetPlayerStatLevels
|
||||||
call Function3f26d
|
call SendOutPkmnText
|
||||||
call NewBattleMonStatus
|
call NewBattleMonStatus
|
||||||
call BreakAttraction
|
call BreakAttraction
|
||||||
call Function3db5f
|
call Function3db5f
|
||||||
@ -6213,7 +6225,8 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
and a
|
and a
|
||||||
jp nz, Function3dabd
|
jp nz, Function3dabd
|
||||||
|
|
||||||
ld a, [wcfc0] ; ????
|
; and also not in a BattleTower-Battle
|
||||||
|
ld a, [InBattleTowerBattle] ; ????
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jp nz, Function3dabd
|
jp nz, Function3dabd
|
||||||
|
|
||||||
@ -7027,25 +7040,25 @@ Function3ecb7: ; 3ecb7
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
inc de
|
inc de
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
; Cap at 999.
|
; Cap at 999.
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
sub 999 % $100
|
sub 999 % $100
|
||||||
ld a, [$ffb5]
|
ld a, [hQuotient + 1]
|
||||||
sbc 999 / $100
|
sbc 999 / $100
|
||||||
jp c, .asm_3ed1e
|
jp c, .asm_3ed1e
|
||||||
|
|
||||||
@ -7106,7 +7119,7 @@ BadgeStatBoosts: ; 3ed45
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -7327,9 +7340,11 @@ Function3ee3b: ; 3ee3b
|
|||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [wcfc0]
|
|
||||||
|
ld a, [InBattleTowerBattle]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
call Function3f0d4
|
call Function3f0d4
|
||||||
xor a
|
xor a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
@ -7407,15 +7422,15 @@ endr
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .asm_3ee7c
|
jr nz, .asm_3ee7c
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [EnemyMonBaseExp]
|
ld a, [EnemyMonBaseExp]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, [EnemyMonLevel]
|
ld a, [EnemyMonLevel]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
pop bc
|
pop bc
|
||||||
@ -7957,36 +7972,37 @@ Function3f22c: ; 3f22c
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
; 3f26d
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function3f26d: ; 3f26d
|
SendOutPkmnText: ; 3f26d
|
||||||
; SendOutMonText?
|
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3f27c
|
jr z, .asm_3f27c
|
||||||
ld hl, UnknownText_0x3f2d1
|
|
||||||
ld a, [wd264]
|
ld hl, JumpText_GoPkmn ; If we're in a LinkBattle print just "Go <PlayerMon>"
|
||||||
|
|
||||||
|
ld a, [wd264] ; besides this variable is set. which stands for ???
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3f2ce
|
jr nz, .asm_3f2ce
|
||||||
|
|
||||||
.asm_3f27c
|
.asm_3f27c
|
||||||
|
; Depending on the HP of the enemy Pkmn, the game prints a different text
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
ld hl, UnknownText_0x3f2d1
|
ld hl, JumpText_GoPkmn
|
||||||
jr z, .asm_3f2ce
|
jr z, .asm_3f2ce
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wc6ea], a
|
ld [wc6ea], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wc6eb], a
|
ld [wc6eb], a
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, $19
|
ld a, $19
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
@ -7999,55 +8015,55 @@ Function3f26d: ; 3f26d
|
|||||||
rr b
|
rr b
|
||||||
ld a, b
|
ld a, b
|
||||||
ld b, $4
|
ld b, $4
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld hl, UnknownText_0x3f2d1
|
ld hl, JumpText_GoPkmn
|
||||||
cp $46
|
cp $46
|
||||||
jr nc, .asm_3f2ce
|
jr nc, .asm_3f2ce
|
||||||
ld hl, UnknownText_0x3f2d8
|
ld hl, JumpText_DoItPkmn
|
||||||
cp $28
|
cp $28
|
||||||
jr nc, .asm_3f2ce
|
jr nc, .asm_3f2ce
|
||||||
ld hl, UnknownText_0x3f2df
|
ld hl, JumpText_GoForItPkmn
|
||||||
cp $a
|
cp $a
|
||||||
jr nc, .asm_3f2ce
|
jr nc, .asm_3f2ce
|
||||||
ld hl, UnknownText_0x3f2e6
|
ld hl, JumpText_YourFoesWeakGetmPkmn
|
||||||
|
|
||||||
.asm_3f2ce
|
.asm_3f2ce
|
||||||
jp BattleTextBox
|
jp BattleTextBox
|
||||||
; 3f2d1
|
; 3f2d1
|
||||||
|
|
||||||
|
|
||||||
UnknownText_0x3f2d1: ; 3f2d1
|
JumpText_GoPkmn: ; 3f2d1
|
||||||
text_jump UnknownText_0x1c02df
|
text_jump Text_GoPkmn
|
||||||
start_asm
|
start_asm
|
||||||
jr Function3f2eb
|
jr Function_TextJump_BattleMonNick01
|
||||||
; 3f2d6
|
; 3f2d6
|
||||||
|
|
||||||
UnknownText_0x3f2d8: ; 3f2d8
|
JumpText_DoItPkmn: ; 3f2d8
|
||||||
text_jump UnknownText_0x1c02e6
|
text_jump Text_DoItPkmn
|
||||||
start_asm
|
start_asm
|
||||||
jr Function3f2eb
|
jr Function_TextJump_BattleMonNick01
|
||||||
; 3f2dd
|
; 3f2dd
|
||||||
|
|
||||||
UnknownText_0x3f2df: ; 3f2df
|
JumpText_GoForItPkmn: ; 3f2df
|
||||||
text_jump UnknownText_0x1c02f0
|
text_jump Text_GoForItPkmn
|
||||||
start_asm
|
start_asm
|
||||||
jr Function3f2eb
|
jr Function_TextJump_BattleMonNick01
|
||||||
; 3f2e4
|
; 3f2e4
|
||||||
|
|
||||||
UnknownText_0x3f2e6: ; 3f2e6
|
JumpText_YourFoesWeakGetmPkmn: ; 3f2e6
|
||||||
text_jump UnknownText_0x1c02fe
|
text_jump Text_YourFoesWeakGetmPkmn
|
||||||
start_asm
|
start_asm
|
||||||
; 3f2eb
|
; 3f2eb
|
||||||
|
|
||||||
Function3f2eb: ; 3f2eb
|
Function_TextJump_BattleMonNick01: ; 3f2eb
|
||||||
ld hl, UnknownText_0x3f2ef
|
ld hl, TextJump_BattleMonNick01
|
||||||
ret
|
ret
|
||||||
; 3f2ef
|
; 3f2ef
|
||||||
|
|
||||||
UnknownText_0x3f2ef: ; 3f2ef
|
TextJump_BattleMonNick01: ; 3f2ef
|
||||||
text_jump UnknownText_0x1c0317
|
text_jump Text_BattleMonNick01
|
||||||
db "@"
|
db "@"
|
||||||
; 3f2f4
|
; 3f2f4
|
||||||
|
|
||||||
@ -8071,12 +8087,12 @@ Function3f2ff: ; 3f2ff
|
|||||||
dec hl
|
dec hl
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
sub b
|
sub b
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
dec de
|
dec de
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
sbc b
|
sbc b
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, $19
|
ld a, $19
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
@ -8089,11 +8105,11 @@ Function3f2ff: ; 3f2ff
|
|||||||
rr b
|
rr b
|
||||||
ld a, b
|
ld a, b
|
||||||
ld b, $4
|
ld b, $4
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
call Divide
|
call Divide
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld hl, UnknownText_0x3f348
|
ld hl, UnknownText_0x3f348
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
@ -8256,10 +8272,10 @@ Function3f39c: ; 3f39c
|
|||||||
|
|
||||||
.asm_3f40c
|
.asm_3f40c
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, $40
|
ld a, $40
|
||||||
sub b
|
sub b
|
||||||
@ -8713,7 +8729,7 @@ endr
|
|||||||
call Function3d0be
|
call Function3d0be
|
||||||
ld hl, BattleText_0x80730
|
ld hl, BattleText_0x80730
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
ret z
|
ret z
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
|
@ -700,7 +700,7 @@ BattleCommand02: ; 343db
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -1458,37 +1458,37 @@ BattleCommand07: ; 346d2
|
|||||||
ld [AttackMissed], a
|
ld [AttackMissed], a
|
||||||
xor a
|
xor a
|
||||||
.asm_34775
|
.asm_34775
|
||||||
ld [$ffb7], a
|
ld [hMultiplier], a
|
||||||
add b
|
add b
|
||||||
ld [TypeModifier], a
|
ld [TypeModifier], a
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [$ffb4], a
|
ld [hMultiplicand + 0], a
|
||||||
|
|
||||||
ld hl, CurDamage
|
ld hl, CurDamage
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
|
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld a, [$ffb4]
|
ld a, [hProduct + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
or b
|
or b
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
or b
|
or b
|
||||||
jr z, .asm_347ab
|
jr z, .asm_347ab
|
||||||
|
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [$ffb7], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb5]
|
ld a, [hQuotient + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
or b
|
or b
|
||||||
jr nz, .asm_347ab
|
jr nz, .asm_347ab
|
||||||
|
|
||||||
@ -1572,11 +1572,11 @@ Function347d3: ; 347d3
|
|||||||
jr .asm_347e7
|
jr .asm_347e7
|
||||||
.asm_3480b
|
.asm_3480b
|
||||||
xor a
|
xor a
|
||||||
ld [$ffb3], a
|
ld [hDividend + 0], a
|
||||||
ld [$ffb4], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
@ -1586,7 +1586,7 @@ Function347d3: ; 347d3
|
|||||||
ld b, 4
|
ld b, 4
|
||||||
call Divide
|
call Divide
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
jr .asm_347e7
|
jr .asm_347e7
|
||||||
|
|
||||||
@ -2305,12 +2305,12 @@ BattleCommand08: ; 34cfd
|
|||||||
.go
|
.go
|
||||||
; Start with the maximum damage.
|
; Start with the maximum damage.
|
||||||
xor a
|
xor a
|
||||||
ld [$ffb4], a
|
ld [hMultiplicand + 0], a
|
||||||
dec hl
|
dec hl
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
|
|
||||||
; Multiply by 85-100%...
|
; Multiply by 85-100%...
|
||||||
.loop
|
.loop
|
||||||
@ -2319,20 +2319,20 @@ BattleCommand08: ; 34cfd
|
|||||||
cp $d9 ; 85%
|
cp $d9 ; 85%
|
||||||
jr c, .loop
|
jr c, .loop
|
||||||
|
|
||||||
ld [$ffb7], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
; ...divide by 100%...
|
; ...divide by 100%...
|
||||||
ld a, $ff ; 100%
|
ld a, $ff ; 100%
|
||||||
ld [$ffb7], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
|
|
||||||
; ...to get .85-1.00x damage.
|
; ...to get .85-1.00x damage.
|
||||||
ld a, [$ffb5]
|
ld a, [hQuotient + 1]
|
||||||
ld hl, CurDamage
|
ld hl, CurDamage
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
; 34d32
|
; 34d32
|
||||||
@ -2594,10 +2594,10 @@ BattleCommand09: ; 34d32
|
|||||||
sub c
|
sub c
|
||||||
ld c, a
|
ld c, a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffb4], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
push hl
|
push hl
|
||||||
ld d, $2
|
ld d, $2
|
||||||
|
|
||||||
@ -2611,15 +2611,15 @@ BattleCommand09: ; 34d32
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb7], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$ffb7], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb5]
|
ld a, [hQuotient + 1]
|
||||||
or b
|
or b
|
||||||
jr nz, .asm_34ea2
|
jr nz, .asm_34ea2
|
||||||
ld [$ffb5], a
|
ld [$ffb5], a
|
||||||
@ -3841,7 +3841,7 @@ BattleCommanda1: ; 35461
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_35532
|
jr nz, .asm_35532
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35532
|
jr nz, .asm_35532
|
||||||
|
|
||||||
@ -4344,18 +4344,18 @@ BattleCommand3f: ; 35726
|
|||||||
.asm_3579d
|
.asm_3579d
|
||||||
xor a
|
xor a
|
||||||
ld [$ffb3], a
|
ld [$ffb3], a
|
||||||
ld [$ffb4], a
|
ld [hMultiplicand + 0], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, $30
|
ld a, $30
|
||||||
ld [$ffb7], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$ffb7], a
|
ld [hDivisor], a
|
||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
jr z, .asm_357d6
|
jr z, .asm_357d6
|
||||||
@ -4365,22 +4365,22 @@ BattleCommand3f: ; 35726
|
|||||||
rr a
|
rr a
|
||||||
srl b
|
srl b
|
||||||
rr a
|
rr a
|
||||||
ld [$ffb7], a
|
ld [hDivisor], a
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
srl b
|
srl b
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
rr a
|
rr a
|
||||||
srl b
|
srl b
|
||||||
rr a
|
rr a
|
||||||
ld [$ffb6], a
|
ld [hDividend + 3], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [$ffb5], a
|
ld [hDividend + 2], a
|
||||||
|
|
||||||
.asm_357d6
|
.asm_357d6
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld hl, .FlailPower
|
ld hl, .FlailPower
|
||||||
|
|
||||||
@ -5544,7 +5544,7 @@ BattleCommand14: ; 35e5c
|
|||||||
|
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
ld b, $7
|
ld b, $7
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_35ea4
|
jr z, .asm_35ea4
|
||||||
ld b, $3
|
ld b, $3
|
||||||
@ -5587,7 +5587,7 @@ Function35ece: ; 35ece
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_35eec
|
jr nz, .asm_35eec
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35eec
|
jr nz, .asm_35eec
|
||||||
|
|
||||||
@ -5676,18 +5676,23 @@ BattleCommand2f: ; 35f2c
|
|||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35fb8
|
jr nz, .asm_35fb8
|
||||||
|
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_35f89
|
jr z, .asm_35f89
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35f89
|
jr nz, .asm_35f89
|
||||||
ld a, [wcfc0]
|
|
||||||
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_35f89
|
jr nz, .asm_35f89
|
||||||
|
|
||||||
ld a, [PlayerSubStatus5]
|
ld a, [PlayerSubStatus5]
|
||||||
bit SUBSTATUS_LOCK_ON, a
|
bit SUBSTATUS_LOCK_ON, a
|
||||||
jr nz, .asm_35f89
|
jr nz, .asm_35f89
|
||||||
|
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp $40
|
cp $40
|
||||||
jr c, .asm_35fb8
|
jr c, .asm_35fb8
|
||||||
@ -6323,11 +6328,12 @@ BattleCommand1d: ; 362e3
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .DidntMiss
|
jr z, .DidntMiss
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .DidntMiss
|
jr nz, .DidntMiss
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .DidntMiss
|
jr nz, .DidntMiss
|
||||||
|
|
||||||
@ -6868,7 +6874,7 @@ rept 2
|
|||||||
endr
|
endr
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hMultiplicand + 1], a
|
ld [hMultiplicand + 1], a
|
||||||
inc de
|
inc de
|
||||||
@ -8168,18 +8174,23 @@ BattleCommand30: ; 36dc7
|
|||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_36e0e
|
jr z, .asm_36e0e
|
||||||
|
|
||||||
ld a, [InLinkBattle]
|
ld a, [InLinkBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_36e0e
|
jr nz, .asm_36e0e
|
||||||
ld a, [wcfc0]
|
|
||||||
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_36e0e
|
jr nz, .asm_36e0e
|
||||||
|
|
||||||
ld a, [PlayerSubStatus5]
|
ld a, [PlayerSubStatus5]
|
||||||
bit SUBSTATUS_LOCK_ON, a
|
bit SUBSTATUS_LOCK_ON, a
|
||||||
jr nz, .asm_36e0e
|
jr nz, .asm_36e0e
|
||||||
|
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp $40
|
cp $40
|
||||||
jr c, .asm_36e52
|
jr c, .asm_36e52
|
||||||
|
|
||||||
.asm_36e0e
|
.asm_36e0e
|
||||||
ld a, BATTLE_VARS_STATUS_OPP
|
ld a, BATTLE_VARS_STATUS_OPP
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
@ -9459,7 +9470,7 @@ BattleCommand60: ; 3784b
|
|||||||
ld hl, EnemyMonHappiness
|
ld hl, EnemyMonHappiness
|
||||||
.ok
|
.ok
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [hMultiplicand + 1], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hMultiplicand + 2], a
|
ld [hMultiplicand + 2], a
|
||||||
@ -9584,18 +9595,18 @@ BattleCommand63: ; 3790e
|
|||||||
.asm_3791a
|
.asm_3791a
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffb4], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, 10
|
ld a, 10
|
||||||
ld [$ffb7], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, 25
|
ld a, 25
|
||||||
ld [$ffb7], a
|
ld [hDivisor], a
|
||||||
ld b, 4
|
ld b, 4
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld d, a
|
ld d, a
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
@ -108,3 +108,8 @@ const_value = 1
|
|||||||
const MOM_ITEM
|
const MOM_ITEM
|
||||||
const MOM_DOLL
|
const MOM_DOLL
|
||||||
|
|
||||||
|
BATTLETOWER_PKMNSTRUCTLENGTH EQU $30
|
||||||
|
BATTLETOWER_NROFPKMNS EQU 3
|
||||||
|
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
||||||
|
BATTLETOWER_NROFTRAINERS EQU 7
|
||||||
|
|
||||||
|
@ -1,24 +1,31 @@
|
|||||||
Function1f8000: ; 1f8000
|
Function_LoadOpponentTrainerAndPokemons: ; 1f8000
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
|
; Fill BT_OTrainer with zeros
|
||||||
xor a
|
xor a
|
||||||
ld hl, w3_d100
|
ld hl, BT_OTrainer
|
||||||
ld bc, $00e0
|
ld bc, BT_OTrainerEnd - BT_OTrainer
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
|
; Write $ff into the Item-Slots
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [w3_d100 + $0c], a
|
ld [BT_OTPkmn1Item], a
|
||||||
ld [w3_d100 + $47], a
|
ld [BT_OTPkmn2Item], a
|
||||||
ld [w3_d100 + $82], a
|
ld [BT_OTPkmn3Item], a
|
||||||
ld de, w3_d100
|
|
||||||
|
; Set BT_OTTrainer as start address to write the following data to
|
||||||
|
ld de, BT_OTrainer
|
||||||
|
|
||||||
ld a, [hRandomAdd]
|
ld a, [hRandomAdd]
|
||||||
ld b, a
|
ld b, a
|
||||||
.asm_1f8022
|
.asm_1f8022 ; loop to find a random trainer
|
||||||
call Random
|
call Random
|
||||||
ld a, [hRandomAdd]
|
ld a, [hRandomAdd]
|
||||||
add b
|
add b
|
||||||
ld b, a
|
ld b, a ; b contains the nr of the trainer
|
||||||
IF DEF(CRYSTAL11)
|
IF DEF(CRYSTAL11)
|
||||||
and $7f
|
and $7f
|
||||||
cp $46
|
cp $46
|
||||||
@ -28,38 +35,46 @@ ELSE
|
|||||||
ENDC
|
ENDC
|
||||||
jr nc, .asm_1f8022
|
jr nc, .asm_1f8022
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, BANK(sbe46)
|
|
||||||
|
ld a, BANK(sNrOfBeatenBattleTowerTrainers)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld c, $7
|
|
||||||
ld hl, sbe48
|
ld c, BATTLETOWER_NROFTRAINERS
|
||||||
|
ld hl, sBTTrainers
|
||||||
.asm_1f803a
|
.asm_1f803a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8022
|
jr z, .asm_1f8022
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_1f803a
|
jr nz, .asm_1f803a ; c <= 7 initialise all 7 trainers?
|
||||||
ld hl, sbe48
|
|
||||||
ld a, [sbe46]
|
ld hl, sBTTrainers
|
||||||
|
ld a, [sNrOfBeatenBattleTowerTrainers]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
push af
|
push af
|
||||||
|
; Copy name (10 bytes) and class (1 byte) of trainer
|
||||||
ld hl, BattleTowerTrainers
|
ld hl, BattleTowerTrainers
|
||||||
ld bc, 11
|
ld bc, 11
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld bc, 11
|
ld bc, 11
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call Function1f8081
|
|
||||||
|
call Function_LoadRandomBattleTowerPkmn
|
||||||
pop af
|
pop af
|
||||||
ld hl, Unknown_1f0000
|
|
||||||
ld bc, $0024
|
ld hl, BattleTowerTrainerData
|
||||||
|
ld bc, BATTLETOWER_TRAINERDATALENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld bc, $0024
|
ld bc, BATTLETOWER_TRAINERDATALENGTH
|
||||||
.asm_1f8070
|
.asm_1f8070
|
||||||
ld a, BANK(Unknown_1f0000)
|
ld a, BANK(BattleTowerTrainerData)
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc hl
|
inc hl
|
||||||
@ -68,20 +83,24 @@ ENDC
|
|||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
jr nz, .asm_1f8070
|
jr nz, .asm_1f8070
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
|
||||||
; 1f8081
|
|
||||||
|
|
||||||
Function1f8081: ; 1f8081
|
ret
|
||||||
ld c, $3
|
|
||||||
|
|
||||||
|
Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
||||||
|
ld c, BATTLETOWER_NROFPKMNS
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
ld a, BANK(sbe51)
|
ld a, BANK(sBTPkmnPrevTrainer1)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
|
|
||||||
.asm_1f8089
|
.FindARandomBattleTowerPkmn
|
||||||
ld a, [$d800]
|
; From Which LevelGroup are the Pkmn loaded
|
||||||
|
; a = 1..10
|
||||||
|
ld a, [wBTChoiceOfLvlGroup] ; [$d800]
|
||||||
dec a
|
dec a
|
||||||
ld hl, BattleTowerMons
|
ld hl, BattleTowerMons
|
||||||
ld bc, BattleTowerMons2 - BattleTowerMons1
|
ld bc, BattleTowerMons2 - BattleTowerMons1
|
||||||
@ -97,60 +116,65 @@ Function1f8081: ; 1f8081
|
|||||||
and $1f
|
and $1f
|
||||||
cp (BattleTowerMons2 - BattleTowerMons1) / ($3b)
|
cp (BattleTowerMons2 - BattleTowerMons1) / ($3b)
|
||||||
jr nc, .asm_1f8099
|
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
|
call AddNTimes
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [w3_d100 + $0b]
|
ld a, [BT_OTPkmn1]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [w3_d100 + $0c]
|
ld a, [BT_OTPkmn1Item]
|
||||||
cp c
|
cp c
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [w3_d100 + $46]
|
ld a, [BT_OTPkmn2]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [w3_d100 + $47]
|
ld a, [BT_OTPkmn2Item]
|
||||||
cp c
|
cp c
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [w3_d100 + $81]
|
ld a, [BT_OTPkmn3]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [w3_d100 + $82]
|
ld a, [BT_OTPkmn3Item]
|
||||||
cp c
|
cp c
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [sbe51]
|
ld a, [sBTPkmnPrevTrainer1]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [sbe52]
|
ld a, [sBTPkmnPrevTrainer2]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [sbe53]
|
ld a, [sBTPkmnPrevTrainer3]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [sbe54]
|
ld a, [sBTPkmnPrevPrevTrainer1]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [sbe55]
|
ld a, [sBTPkmnPrevPrevTrainer2]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
ld a, [sbe56]
|
ld a, [sBTPkmnPrevPrevTrainer3]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_1f8089
|
jr z, .FindARandomBattleTowerPkmn
|
||||||
|
|
||||||
ld bc, $3b
|
ld bc, BATTLETOWER_PKMNSTRUCTLENGTH + $b
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
push af
|
push af
|
||||||
push de
|
push de
|
||||||
ld hl, -$3b
|
ld hl, - (BATTLETOWER_PKMNSTRUCTLENGTH + $b)
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld bc, $0030
|
ld bc, BATTLETOWER_PKMNSTRUCTLENGTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
push hl
|
push hl
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
@ -159,6 +183,7 @@ Function1f8081: ; 1f8081
|
|||||||
pop de
|
pop de
|
||||||
ld bc, PKMN_NAME_LENGTH
|
ld bc, PKMN_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
pop de
|
pop de
|
||||||
pop af
|
pop af
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
@ -166,18 +191,18 @@ Function1f8081: ; 1f8081
|
|||||||
dec c
|
dec c
|
||||||
jp nz, .loop
|
jp nz, .loop
|
||||||
|
|
||||||
ld a, [sbe51]
|
ld a, [sBTPkmnPrevTrainer1]
|
||||||
ld [sbe54], a
|
ld [sBTPkmnPrevPrevTrainer1], a
|
||||||
ld a, [sbe52]
|
ld a, [sBTPkmnPrevTrainer2]
|
||||||
ld [sbe55], a
|
ld [sBTPkmnPrevPrevTrainer2], a
|
||||||
ld a, [sbe53]
|
ld a, [sBTPkmnPrevTrainer3]
|
||||||
ld [sbe56], a
|
ld [sBTPkmnPrevPrevTrainer3], a
|
||||||
ld a, [w3_d100 + $0b]
|
ld a, [BT_OTPkmn1]
|
||||||
ld [sbe51], a
|
ld [sBTPkmnPrevTrainer1], a
|
||||||
ld a, [w3_d100 + $46]
|
ld a, [BT_OTPkmn2]
|
||||||
ld [sbe52], a
|
ld [sBTPkmnPrevTrainer2], a
|
||||||
ld a, [w3_d100 + $81]
|
ld a, [BT_OTPkmn3]
|
||||||
ld [sbe53], a
|
ld [sBTPkmnPrevTrainer3], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
; 1f814e
|
; 1f814e
|
||||||
|
@ -39,7 +39,7 @@ PredefPointers:: ; 856b
|
|||||||
add_predef Functiond88c
|
add_predef Functiond88c
|
||||||
add_predef Functionda96
|
add_predef Functionda96
|
||||||
add_predef Functiondb3f ; $8
|
add_predef Functiondb3f ; $8
|
||||||
add_predef Functionde6e
|
add_predef SentPkmnIntoBox
|
||||||
add_predef GiveEgg
|
add_predef GiveEgg
|
||||||
add_predef Functionc6e0
|
add_predef Functionc6e0
|
||||||
add_predef Functione167
|
add_predef Functione167
|
||||||
|
@ -142,9 +142,9 @@ SpecialsPointers:: ; c029
|
|||||||
add_special Function170215
|
add_special Function170215
|
||||||
add_special Function1704e1
|
add_special Function1704e1
|
||||||
add_special Function17021d
|
add_special Function17021d
|
||||||
add_special Function170b44
|
add_special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
|
||||||
add_special Function11ba38
|
add_special Function11ba38
|
||||||
add_special Function170bd3
|
add_special SpecialCheckForBattleTowerRules
|
||||||
add_special Function117656
|
add_special Function117656
|
||||||
add_special Reset
|
add_special Reset
|
||||||
add_special Function1011f1
|
add_special Function1011f1
|
||||||
@ -156,7 +156,7 @@ SpecialsPointers:: ; c029
|
|||||||
add_special Function11c1ab
|
add_special Function11c1ab
|
||||||
add_special Function170687
|
add_special Function170687
|
||||||
add_special Special_DisplayUnownWords
|
add_special Special_DisplayUnownWords
|
||||||
add_special Function17d224
|
add_special Special_Menu_ChallengeExplanationCancel
|
||||||
add_special Function17d2b6
|
add_special Function17d2b6
|
||||||
add_special Function17d2ce
|
add_special Function17d2ce
|
||||||
add_special Function17f53d
|
add_special Function17f53d
|
||||||
|
15
hram.asm
15
hram.asm
@ -31,13 +31,16 @@ hConnectedMapWidth EQU $ffb0
|
|||||||
|
|
||||||
hPastLeadingZeroes EQU $ffb3
|
hPastLeadingZeroes EQU $ffb3
|
||||||
|
|
||||||
hDividend EQU $ffb3
|
hStringCmpString1 EQU $ffb1
|
||||||
hDivisor EQU $ffb7
|
hStringCmpString2 EQU $ffb5
|
||||||
hQuotient EQU $ffb4
|
|
||||||
|
|
||||||
hMultiplicand EQU $ffb4
|
hDividend EQU $ffb3 ; length in b register, before 'call Divide' (max 4 bytes)
|
||||||
hMultiplier EQU $ffb7
|
hDivisor EQU $ffb7 ; 1 byte long
|
||||||
hProduct EQU $ffb3
|
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
|
hMathBuffer EQU $ffb8
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ endr
|
|||||||
jp z, .asm_e98e
|
jp z, .asm_e98e
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
|
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
@ -318,9 +318,9 @@ endr
|
|||||||
sub c
|
sub c
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
xor a
|
xor a
|
||||||
ld [hProduct], a
|
ld [hDividend + 0], a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
call Multiply
|
call Multiply
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ endr
|
|||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
|
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
and a
|
and a
|
||||||
jr nz, .statuscheck
|
jr nz, .statuscheck
|
||||||
ld a, 1
|
ld a, 1
|
||||||
@ -618,7 +618,7 @@ endr
|
|||||||
.asm_eb3c
|
.asm_eb3c
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
|
|
||||||
predef Functionde6e
|
predef SentPkmnIntoBox
|
||||||
|
|
||||||
callba Function4db83
|
callba Function4db83
|
||||||
|
|
||||||
|
263
main.asm
263
main.asm
@ -2938,7 +2938,7 @@ SpecialGiveShuckle: ; 7305
|
|||||||
|
|
||||||
; Caught data.
|
; Caught data.
|
||||||
ld b, 0
|
ld b, 0
|
||||||
callba Function4dba3
|
callba SetPkmnCaughtData
|
||||||
|
|
||||||
; Holding a Berry.
|
; Holding a Berry.
|
||||||
ld bc, PartyMon2 - PartyMon1
|
ld bc, PartyMon2 - PartyMon1
|
||||||
@ -4464,11 +4464,11 @@ Functionc699: ; c699
|
|||||||
jr z, .zero
|
jr z, .zero
|
||||||
push hl
|
push hl
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, $30
|
ld a, $30
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
@ -4479,23 +4479,23 @@ Functionc699: ; c699
|
|||||||
rr e
|
rr e
|
||||||
srl d
|
srl d
|
||||||
rr e
|
rr e
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
srl b
|
srl b
|
||||||
rr a
|
rr a
|
||||||
srl b
|
srl b
|
||||||
rr a
|
rr a
|
||||||
ld [$ffb6], a
|
ld [hDividend + 3], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [$ffb5], a
|
ld [hDividend + 2], a
|
||||||
|
|
||||||
.divide
|
.divide
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld e, a
|
ld e, a
|
||||||
pop hl
|
pop hl
|
||||||
and a
|
and a
|
||||||
@ -8340,7 +8340,7 @@ Functionda96: ; da96
|
|||||||
; db3f
|
; db3f
|
||||||
|
|
||||||
Functiondb3f: ; db3f
|
Functiondb3f: ; db3f
|
||||||
ld a, $1
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [wd10b]
|
ld a, [wd10b]
|
||||||
and a
|
and a
|
||||||
@ -8799,11 +8799,12 @@ Functionde44: ; de44
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld bc, sBoxMon1End - sBoxMon1
|
ld bc, sBoxMon1End - sBoxMon1
|
||||||
jp CopyBytes
|
jp CopyBytes
|
||||||
; de6e
|
|
||||||
|
|
||||||
|
|
||||||
Functionde6e: ; de6e
|
SentPkmnIntoBox: ; de6e
|
||||||
ld a, 1 ; BANK(sBoxCount)
|
; Sents the Pkmn into one of Bills Boxes
|
||||||
|
; the data comes mainly from 'EnemyMon:'
|
||||||
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld de, sBoxCount
|
ld de, sBoxCount
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -8811,6 +8812,7 @@ Functionde6e: ; de6e
|
|||||||
jp nc, Functiondf42
|
jp nc, Functiondf42
|
||||||
inc a
|
inc a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -8823,23 +8825,29 @@ Functionde6e: ; de6e
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
inc a
|
inc a
|
||||||
jr nz, .asm_de85
|
jr nz, .asm_de85
|
||||||
|
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
call ShiftBoxMon
|
call ShiftBoxMon
|
||||||
|
|
||||||
ld hl, PlayerName
|
ld hl, PlayerName
|
||||||
ld de, sBoxMonOT
|
ld de, sBoxMonOT
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
ld hl, StringBuffer1
|
ld hl, StringBuffer1
|
||||||
ld bc, PKMN_NAME_LENGTH
|
ld bc, PKMN_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, EnemyMon
|
ld hl, EnemyMon
|
||||||
ld de, sBoxMon1
|
ld de, sBoxMon1
|
||||||
ld bc, 1 + 1 + NUM_MOVES ; species + item + moves
|
ld bc, 1 + 1 + NUM_MOVES ; species + item + moves
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, PlayerID
|
ld hl, PlayerID
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -8861,6 +8869,7 @@ Functionde6e: ; de6e
|
|||||||
ld a, [$ffb6]
|
ld a, [$ffb6]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld b, $a
|
ld b, $a
|
||||||
.asm_dee5
|
.asm_dee5
|
||||||
@ -8868,6 +8877,7 @@ Functionde6e: ; de6e
|
|||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_dee5
|
jr nz, .asm_dee5
|
||||||
|
|
||||||
ld hl, EnemyMonDVs
|
ld hl, EnemyMonDVs
|
||||||
ld b, 2 + NUM_MOVES ; DVs and PP ; EnemyMonHappiness - EnemyMonDVs
|
ld b, 2 + NUM_MOVES ; DVs and PP ; EnemyMonHappiness - EnemyMonDVs
|
||||||
.asm_deef
|
.asm_deef
|
||||||
@ -8876,6 +8886,7 @@ Functionde6e: ; de6e
|
|||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_deef
|
jr nz, .asm_deef
|
||||||
|
|
||||||
ld a, BASE_HAPPINESS
|
ld a, BASE_HAPPINESS
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
@ -8909,6 +8920,7 @@ Functionde6e: ; de6e
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld b, 0
|
ld b, 0
|
||||||
call Functiondcb6
|
call Functiondcb6
|
||||||
|
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -9067,7 +9079,7 @@ Functione039: ; e039
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_e04a
|
jr z, .asm_e04a
|
||||||
|
|
||||||
ld a, 1 ; BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
|
|
||||||
@ -9378,22 +9390,22 @@ endr
|
|||||||
inc d
|
inc d
|
||||||
|
|
||||||
.asm_e20f
|
.asm_e20f
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, [hMultiplicand]
|
ld a, [hProduct + 1]
|
||||||
ld [hProduct], a
|
ld [hDividend + 0], a
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
ld [hMultiplicand], a
|
ld [hDividend + 1], a
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
ld [$ffb5], a
|
ld [hDividend + 2], a
|
||||||
ld a, $64
|
ld a, $64
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld b, a
|
ld b, a
|
||||||
call Divide
|
call Divide
|
||||||
@ -9403,11 +9415,11 @@ endr
|
|||||||
jr nz, .asm_e24e
|
jr nz, .asm_e24e
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
add b
|
add b
|
||||||
ld [$ffb6], a
|
ld [$ffb6], a
|
||||||
jr nc, .asm_e24c
|
jr nc, .asm_e24c
|
||||||
ld a, [$ffb5]
|
ld a, [hQuotient + 1]
|
||||||
inc a
|
inc a
|
||||||
ld [$ffb5], a
|
ld [$ffb5], a
|
||||||
|
|
||||||
@ -9482,7 +9494,7 @@ GivePoke:: ; e277
|
|||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
callab LoadEnemyMon
|
callab LoadEnemyMon
|
||||||
call Functionde6e
|
call SentPkmnIntoBox
|
||||||
jp nc, Functione3d4
|
jp nc, Functione3d4
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
@ -9562,11 +9574,11 @@ endr
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], $e9
|
ld [hl], $e9
|
||||||
pop bc
|
pop bc
|
||||||
callba Function4dba3
|
callba SetPkmnCaughtData
|
||||||
jr .asm_e3b2
|
jr .asm_e3b2
|
||||||
|
|
||||||
.asm_e35e
|
.asm_e35e
|
||||||
ld a, $1
|
ld a, BANK(sBoxMonOT)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld de, sBoxMonOT
|
ld de, sBoxMonOT
|
||||||
.asm_e366
|
.asm_e366
|
||||||
@ -9604,7 +9616,7 @@ endr
|
|||||||
callba Function4db49
|
callba Function4db49
|
||||||
|
|
||||||
.asm_e3a6
|
.asm_e3a6
|
||||||
callba Function4db3b
|
callba GiveANickname_YesNo
|
||||||
pop de
|
pop de
|
||||||
jr c, .asm_e3b2
|
jr c, .asm_e3b2
|
||||||
call Functione3de
|
call Functione3de
|
||||||
@ -9615,9 +9627,9 @@ endr
|
|||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld hl, UnknownText_0xe3d9
|
ld hl, TextJump_WasSentToBillsPC
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $1
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, wd050
|
ld hl, wd050
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
@ -9635,9 +9647,9 @@ Functione3d4: ; e3d4
|
|||||||
ret
|
ret
|
||||||
; e3d9
|
; e3d9
|
||||||
|
|
||||||
UnknownText_0xe3d9: ; 0xe3d9
|
TextJump_WasSentToBillsPC: ; 0xe3d9
|
||||||
; was sent to BILL's PC.
|
; was sent to BILL's PC.
|
||||||
text_jump UnknownText_0x1c0feb
|
text_jump Text_WasSentToBillsPC
|
||||||
db "@"
|
db "@"
|
||||||
; 0xe3de
|
; 0xe3de
|
||||||
|
|
||||||
@ -9945,7 +9957,7 @@ Functione5bb: ; e5bb
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld de, TempMonSpecies
|
ld de, TempMonSpecies
|
||||||
ld bc, $0020
|
ld bc, $0020
|
||||||
ld a, $1
|
ld a, BANK(sBoxMon1Species)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -9969,7 +9981,7 @@ Functione5d9: ; e5d9
|
|||||||
jr .asm_e5f6
|
jr .asm_e5f6
|
||||||
|
|
||||||
.asm_e5f1
|
.asm_e5f1
|
||||||
ld a, $1
|
ld a, BANK(sBoxCount)
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
|
|
||||||
.asm_e5f6
|
.asm_e5f6
|
||||||
@ -25865,11 +25877,11 @@ Function2509f: ; 2509f
|
|||||||
|
|
||||||
Function250a9: ; 250a9
|
Function250a9: ; 250a9
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld a, [Buffer1]
|
ld a, [Buffer1]
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [Buffer2]
|
ld a, [Buffer2]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, [wd10c]
|
ld a, [wd10c]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
push hl
|
push hl
|
||||||
@ -35563,7 +35575,7 @@ INCLUDE "trainers/attributes.asm"
|
|||||||
|
|
||||||
|
|
||||||
ReadTrainerParty: ; 39771
|
ReadTrainerParty: ; 39771
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -35873,7 +35885,7 @@ TrainerType4: ; 3989d
|
|||||||
; 3991b
|
; 3991b
|
||||||
|
|
||||||
Function3991b: ; 3991b (e:591b)
|
Function3991b: ; 3991b (e:591b)
|
||||||
ld hl, $ffb3
|
ld hl, hMultiplicand - 1
|
||||||
xor a
|
xor a
|
||||||
rept 3
|
rept 3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -35886,15 +35898,15 @@ endr
|
|||||||
ld hl, wc686
|
ld hl, wc686
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
Battle_GetTrainerName:: ; 39939
|
Battle_GetTrainerName:: ; 39939
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
ld hl, wd26b
|
ld hl, wd26b
|
||||||
jp nz, CopyTrainerName
|
jp nz, CopyTrainerName
|
||||||
@ -36806,7 +36818,9 @@ endr
|
|||||||
.ApplyLayers
|
.ApplyLayers
|
||||||
ld hl, TrainerClassAttributes + 3
|
ld hl, TrainerClassAttributes + 3
|
||||||
|
|
||||||
ld a, [wcfc0]
|
; If we have a battle in BattleTower just load the Attributes of the first TrainerClass (Falkner)
|
||||||
|
; so we have always the same AI, regardless of the loaded cass of trainer
|
||||||
|
ld a, [InBattleTowerBattle]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr nz, .asm_4412f
|
jr nz, .asm_4412f
|
||||||
|
|
||||||
@ -39624,8 +39638,8 @@ Function48d4a: ; 48d4a (12:4d4a)
|
|||||||
add c
|
add c
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
xor a
|
xor a
|
||||||
ld [hQuotient], a ; $ff00+$b4 (aliases: hMultiplicand)
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
srl a
|
srl a
|
||||||
srl a
|
srl a
|
||||||
@ -39637,13 +39651,13 @@ Function48d4a: ; 48d4a (12:4d4a)
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and $f
|
and $f
|
||||||
add b
|
add b
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, 100
|
ld a, 100
|
||||||
ld [hDivisor], a ; $ff00+$b7 (aliases: hMultiplier)
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
add e
|
add e
|
||||||
@ -39658,10 +39672,10 @@ Function48d4a: ; 48d4a (12:4d4a)
|
|||||||
|
|
||||||
Function48d94: ; 48d94 (12:4d94)
|
Function48d94: ; 48d94 (12:4d94)
|
||||||
xor a
|
xor a
|
||||||
ld [$ffb3], a
|
ld [hDividend + 0], a
|
||||||
ld [hQuotient], a ; $ff00+$b4 (aliases: hMultiplicand)
|
ld [hQuotient], a ; $ff00+$b4 (aliases: hMultiplicand)
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb3], a
|
ld [hDividend + 0], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hQuotient], a ; $ff00+$b4 (aliases: hMultiplicand)
|
ld [hQuotient], a ; $ff00+$b4 (aliases: hMultiplicand)
|
||||||
ld a, 100
|
ld a, 100
|
||||||
@ -39677,7 +39691,7 @@ Function48d94: ; 48d94 (12:4d94)
|
|||||||
sla b
|
sla b
|
||||||
or b
|
or b
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld c, 10
|
ld c, 10
|
||||||
call SimpleDivide
|
call SimpleDivide
|
||||||
sla b
|
sla b
|
||||||
@ -42221,7 +42235,7 @@ CheckOwnMonAnywhere: ; 0x4a721
|
|||||||
jr nz, .partymon
|
jr nz, .partymon
|
||||||
|
|
||||||
; Run CheckOwnMon on each Pokémon in the PC.
|
; Run CheckOwnMon on each Pokémon in the PC.
|
||||||
ld a, 1
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
and a
|
and a
|
||||||
@ -42443,7 +42457,7 @@ MobileCheckOwnMonAnywhere: ; 4a843
|
|||||||
call Function4a91e
|
call Function4a91e
|
||||||
dec d
|
dec d
|
||||||
jr nz, .asm_4a851
|
jr nz, .asm_4a851
|
||||||
ld a, 1
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
and a
|
and a
|
||||||
@ -44546,7 +44560,7 @@ Function4d87a: ; 4d87a
|
|||||||
pop bc
|
pop bc
|
||||||
dec d
|
dec d
|
||||||
jr nz, .asm_4d88d
|
jr nz, .asm_4d88d
|
||||||
ld a, $1
|
ld a, BANK(sBoxMon1ID)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
and a
|
and a
|
||||||
@ -44804,7 +44818,7 @@ CheckPartyFullAfterContest: ; 4d9e5
|
|||||||
ld de, wd050
|
ld de, wd050
|
||||||
ld bc, $000b
|
ld bc, $000b
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call Function4db3b
|
call GiveANickname_YesNo
|
||||||
jr c, .asm_4da66
|
jr c, .asm_4da66
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
@ -44847,7 +44861,7 @@ CheckPartyFullAfterContest: ; 4d9e5
|
|||||||
; 4daa3
|
; 4daa3
|
||||||
|
|
||||||
Function4daa3: ; 4daa3
|
Function4daa3: ; 4daa3
|
||||||
ld a, $1
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -44868,7 +44882,7 @@ Function4daa3: ; 4daa3
|
|||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
call Function4db3b
|
call GiveANickname_YesNo
|
||||||
ld hl, StringBuffer1
|
ld hl, StringBuffer1
|
||||||
jr c, .asm_4daf7
|
jr c, .asm_4daf7
|
||||||
ld a, BOXMON
|
ld a, BOXMON
|
||||||
@ -44878,7 +44892,7 @@ Function4daa3: ; 4daa3
|
|||||||
ld hl, wd050
|
ld hl, wd050
|
||||||
|
|
||||||
.asm_4daf7
|
.asm_4daf7
|
||||||
ld a, $1
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
ld bc, PKMN_NAME_LENGTH
|
ld bc, PKMN_NAME_LENGTH
|
||||||
@ -44886,13 +44900,13 @@ Function4daa3: ; 4daa3
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
.asm_4db08
|
.asm_4db08
|
||||||
ld a, $1
|
ld a, BANK(sBoxMon1Level)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [sBoxMon1Level]
|
ld a, [sBoxMon1Level]
|
||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
call Function4db83
|
call Function4db83
|
||||||
ld a, $1
|
ld a, BANK(sBoxMon1CaughtLocation)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxMon1CaughtLocation
|
ld hl, sBoxMon1CaughtLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -44915,13 +44929,13 @@ Function4db35: ; 4db35
|
|||||||
; 4db3b
|
; 4db3b
|
||||||
|
|
||||||
|
|
||||||
Function4db3b: ; 4db3b
|
GiveANickname_YesNo: ; 4db3b
|
||||||
ld hl, UnknownText_0x4db44
|
ld hl, TextJump_GiveANickname
|
||||||
call PrintText
|
call PrintText
|
||||||
jp YesNoBox
|
jp YesNoBox
|
||||||
; 4db44
|
; 4db44
|
||||||
|
|
||||||
UnknownText_0x4db44: ; 0x4db44
|
TextJump_GiveANickname: ; 0x4db44
|
||||||
; Give a nickname to the @ you received?
|
; Give a nickname to the @ you received?
|
||||||
text_jump UnknownText_0x1c12fc
|
text_jump UnknownText_0x1c12fc
|
||||||
db "@"
|
db "@"
|
||||||
@ -44968,7 +44982,7 @@ Function4db53: ; 4db53
|
|||||||
; 4db83
|
; 4db83
|
||||||
|
|
||||||
Function4db83: ; 4db83
|
Function4db83: ; 4db83
|
||||||
ld a, $1
|
ld a, BANK(sBoxMon1CaughtLevel)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxMon1CaughtLevel
|
ld hl, sBoxMon1CaughtLevel
|
||||||
call Function4db53
|
call Function4db53
|
||||||
@ -44978,7 +44992,7 @@ Function4db83: ; 4db83
|
|||||||
|
|
||||||
Function4db92: ; 4db92
|
Function4db92: ; 4db92
|
||||||
push bc
|
push bc
|
||||||
ld a, $1
|
ld a, BANK(sBoxMon1CaughtLevel)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxMon1CaughtLevel
|
ld hl, sBoxMon1CaughtLevel
|
||||||
pop bc
|
pop bc
|
||||||
@ -44987,7 +45001,7 @@ Function4db92: ; 4db92
|
|||||||
ret
|
ret
|
||||||
; 4dba3
|
; 4dba3
|
||||||
|
|
||||||
Function4dba3: ; 4dba3
|
SetPkmnCaughtData: ; 4dba3
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld hl, PartyMon1CaughtLevel
|
ld hl, PartyMon1CaughtLevel
|
||||||
@ -48623,7 +48637,7 @@ Function508d5: ; 508d5
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.boxmon
|
.boxmon
|
||||||
ld a, 1 ; BANK(sBoxSpecies)
|
ld a, BANK(sBoxSpecies)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxSpecies
|
ld hl, sBoxSpecies
|
||||||
call .done
|
call .done
|
||||||
@ -49375,11 +49389,11 @@ endr
|
|||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
|
|
||||||
ld a, [hMultiplicand]
|
ld a, [hMultiplicand + 0]
|
||||||
push af
|
push af
|
||||||
ld a, [$ffb5]
|
ld a, [hMultiplicand + 1]
|
||||||
push af
|
push af
|
||||||
ld a, [$ffb6]
|
ld a, [hMultiplicand + 2]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
call Function50eed
|
call Function50eed
|
||||||
@ -49388,33 +49402,33 @@ endr
|
|||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld a, [hMultiplicand]
|
ld a, [hProduct + 1]
|
||||||
push af
|
push af
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
push af
|
push af
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
push af
|
push af
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
ld a, [$ffb6]
|
ld a, [hProduct + 3]
|
||||||
sub b
|
sub b
|
||||||
ld [$ffb6], a
|
ld [$ffb6], a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld a, [$ffb5]
|
ld a, [hProduct + 2]
|
||||||
sbc b
|
sbc b
|
||||||
ld [$ffb5], a
|
ld [$ffb5], a
|
||||||
ld a, [hMultiplicand]
|
ld a, [hProduct + 1]
|
||||||
sbc b
|
sbc b
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand], a
|
||||||
|
|
||||||
@ -49468,10 +49482,10 @@ endr
|
|||||||
|
|
||||||
Function50eed: ; 50eed
|
Function50eed: ; 50eed
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
jp Multiply
|
jp Multiply
|
||||||
; 50efa
|
; 50efa
|
||||||
@ -50156,7 +50170,7 @@ Function512f2: ; 512f2
|
|||||||
; 51322
|
; 51322
|
||||||
|
|
||||||
Function51322: ; 51322
|
Function51322: ; 51322
|
||||||
ld a, $1
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
call Function513cb
|
call Function513cb
|
||||||
@ -51399,7 +51413,7 @@ Function806ff: ; 806ff
|
|||||||
|
|
||||||
Function80715: ; 80715
|
Function80715: ; 80715
|
||||||
; Remaining slots in the current box.
|
; Remaining slots in the current box.
|
||||||
ld a, 1 ; BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sBoxCount
|
ld hl, sBoxCount
|
||||||
ld a, MONS_PER_BOX
|
ld a, MONS_PER_BOX
|
||||||
@ -60873,12 +60887,12 @@ UnknownText_0x8b1fc: ; 0x8b1fc
|
|||||||
db "@"
|
db "@"
|
||||||
; 0x8b201
|
; 0x8b201
|
||||||
|
|
||||||
Function8b201: ; 8b201
|
CheckForBattleTowerRules: ; 8b201
|
||||||
ld hl, StringBuffer2
|
ld hl, StringBuffer2
|
||||||
ld [hl], "3"
|
ld [hl], "3"
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], "@"
|
ld [hl], "@"
|
||||||
ld de, Unknown_8b215
|
ld de, CheckForBattleTowerRules_FunctionsText
|
||||||
call Function8b25b
|
call Function8b25b
|
||||||
ret z
|
ret z
|
||||||
call Function8b231
|
call Function8b231
|
||||||
@ -60886,29 +60900,29 @@ Function8b201: ; 8b201
|
|||||||
ret
|
ret
|
||||||
; 8b215
|
; 8b215
|
||||||
|
|
||||||
Unknown_8b215: ; 8b215
|
CheckForBattleTowerRules_FunctionsText: ; 8b215
|
||||||
db 4
|
db 4
|
||||||
dw Unknown_8b21a
|
dw CheckForBattleTowerRules_Functions
|
||||||
dw Unknown_8b222
|
dw CheckForBattleTowerRules_Text
|
||||||
|
|
||||||
Unknown_8b21a: ; 8b21a
|
CheckForBattleTowerRules_Functions: ; 8b21a
|
||||||
dw Function8b2da
|
dw Function_PartyCountEq3
|
||||||
dw Function8b2e2
|
dw Function8b2e2
|
||||||
dw Function8b32a
|
dw Function8b32a
|
||||||
dw Function8b331
|
dw Function_HasPartyAnEgg
|
||||||
; 8b222
|
; 8b222
|
||||||
|
|
||||||
Unknown_8b222: ; 8b222
|
CheckForBattleTowerRules_Text: ; 8b222
|
||||||
dw UnknownText_0x8b22c
|
dw JumpText_ExcuseMeYoureNotReady
|
||||||
dw UnknownText_0x8b247
|
dw JumbText_OnlyThreePkmnMayBeEntered
|
||||||
dw UnknownText_0x8b24c
|
dw JumpText_ThePkmnMustAllBeDifferentKinds
|
||||||
dw UnknownText_0x8b251
|
dw JumpText_ThePkmnMustNotHoldTheSameItems
|
||||||
dw UnknownText_0x8b256
|
dw JumpText_YouCantTakeAnEgg
|
||||||
; 8b22c
|
; 8b22c
|
||||||
|
|
||||||
UnknownText_0x8b22c: ; 0x8b22c
|
JumpText_ExcuseMeYoureNotReady: ; 0x8b22c
|
||||||
; Excuse me. You're not ready.
|
; Excuse me. You're not ready.
|
||||||
text_jump UnknownText_0x1c5944
|
text_jump Text_ExcuseMeYoureNotReady
|
||||||
db "@"
|
db "@"
|
||||||
; 0x8b231
|
; 0x8b231
|
||||||
|
|
||||||
@ -60936,27 +60950,27 @@ UnknownText_0x8b242: ; 0x8b242
|
|||||||
db "@"
|
db "@"
|
||||||
; 0x8b247
|
; 0x8b247
|
||||||
|
|
||||||
UnknownText_0x8b247: ; 0x8b247
|
JumbText_OnlyThreePkmnMayBeEntered: ; 0x8b247
|
||||||
; Only three #MON may be entered.
|
; Only three #MON may be entered.
|
||||||
text_jump UnknownText_0x1c59c3
|
text_jump Text_OnlyThreePkmnMayBeEntered
|
||||||
db "@"
|
db "@"
|
||||||
; 0x8b24c
|
; 0x8b24c
|
||||||
|
|
||||||
UnknownText_0x8b24c: ; 0x8b24c
|
JumpText_ThePkmnMustAllBeDifferentKinds: ; 0x8b24c
|
||||||
; The @ #MON must all be different kinds.
|
; The @ #MON must all be different kinds.
|
||||||
text_jump UnknownText_0x1c59e5
|
text_jump Text_ThePkmnMustAllBeDifferentKinds
|
||||||
db "@"
|
db "@"
|
||||||
; 0x8b251
|
; 0x8b251
|
||||||
|
|
||||||
UnknownText_0x8b251: ; 0x8b251
|
JumpText_ThePkmnMustNotHoldTheSameItems: ; 0x8b251
|
||||||
; The @ #MON must not hold the same items.
|
; The @ #MON must not hold the same items.
|
||||||
text_jump UnknownText_0x1c5a13
|
text_jump Text_ThePkmnMustNotHoldTheSameItems
|
||||||
db "@"
|
db "@"
|
||||||
; 0x8b256
|
; 0x8b256
|
||||||
|
|
||||||
UnknownText_0x8b256: ; 0x8b256
|
JumpText_YouCantTakeAnEgg: ; 0x8b256
|
||||||
; You can't take an EGG!
|
; You can't take an EGG!
|
||||||
text_jump UnknownText_0x1c5a42
|
text_jump Text_YouCantTakeAnEgg
|
||||||
db "@"
|
db "@"
|
||||||
; 0x8b25b
|
; 0x8b25b
|
||||||
|
|
||||||
@ -61085,7 +61099,7 @@ Function8b2c1: ; 8b2c1
|
|||||||
ret
|
ret
|
||||||
; 8b2da
|
; 8b2da
|
||||||
|
|
||||||
Function8b2da: ; 8b2da
|
Function_PartyCountEq3: ; 8b2da
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
cp 3
|
cp 3
|
||||||
ret z
|
ret z
|
||||||
@ -61169,7 +61183,7 @@ Function8b32a: ; 8b32a
|
|||||||
ret
|
ret
|
||||||
; 8b331
|
; 8b331
|
||||||
|
|
||||||
Function8b331: ; 8b331
|
Function_HasPartyAnEgg: ; 8b331
|
||||||
ld hl, PartyCount
|
ld hl, PartyCount
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -87382,12 +87396,12 @@ endr
|
|||||||
|
|
||||||
.ApplyModifier
|
.ApplyModifier
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand + 0], a
|
||||||
ld hl, CurDamage
|
ld hl, CurDamage
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [$ffb5], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [$ffb6], a
|
ld [hMultiplicand + 2], a
|
||||||
|
|
||||||
inc de
|
inc de
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -87396,18 +87410,18 @@ endr
|
|||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld a, 10
|
ld a, 10
|
||||||
ld [hMultiplier], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
|
|
||||||
ld a, [hMultiplicand]
|
ld a, [hQuotient + 0]
|
||||||
and a
|
and a
|
||||||
ld bc, $ffff
|
ld bc, $ffff
|
||||||
jr nz, .Update
|
jr nz, .Update
|
||||||
|
|
||||||
ld a, [$ffb5]
|
ld a, [hQuotient + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffb6]
|
ld a, [hQuotient + 2]
|
||||||
ld c, a
|
ld c, a
|
||||||
or b
|
or b
|
||||||
jr nz, .Update
|
jr nz, .Update
|
||||||
@ -87441,7 +87455,7 @@ DoBadgeTypeBoosts: ; fbe24
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -87759,7 +87773,7 @@ Functionfcc63: ; fcc63
|
|||||||
jr c, .asm_fcd1c
|
jr c, .asm_fcd1c
|
||||||
ld b, 1
|
ld b, 1
|
||||||
.asm_fcd1c
|
.asm_fcd1c
|
||||||
callba Function4dba3
|
callba SetPkmnCaughtData
|
||||||
|
|
||||||
ld e, TRADE_NICK
|
ld e, TRADE_NICK
|
||||||
call GetTradeAttribute
|
call GetTradeAttribute
|
||||||
@ -93532,7 +93546,8 @@ INCLUDE "text/battle_tower.asm"
|
|||||||
|
|
||||||
SECTION "bank7C", ROMX, BANK[$7C]
|
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"
|
INCBIN "unknown/1f0000.bin"
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@ UnknownScript_0x9e3d3:
|
|||||||
|
|
||||||
MapBattleTower1FSignpost0Script:
|
MapBattleTower1FSignpost0Script:
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9ed3c
|
writetext Text_ReadBattleTowerRules
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9e3e0
|
iffalse UnknownScript_0x9e3e0
|
||||||
writetext UnknownText_0x9ed72
|
writetext Text_BattleTowerRules
|
||||||
closetext
|
closetext
|
||||||
UnknownScript_0x9e3e0:
|
UnknownScript_0x9e3e0:
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
@ -55,41 +55,41 @@ ReceptionistScript_0x9e3e2:
|
|||||||
special Function170687
|
special Function170687
|
||||||
if_equal $3, BattleTowerBattleRoomScript_0x9f4e4
|
if_equal $3, BattleTowerBattleRoomScript_0x9f4e4
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9e5ab
|
writetext Text_BattleTowerWelcomesYou
|
||||||
keeptextopen
|
keeptextopen
|
||||||
writebyte $0
|
writebyte $0
|
||||||
special Function170687
|
special Function170687
|
||||||
if_not_equal $0, UnknownScript_0x9e3fc
|
if_not_equal $0, Script_Menu_ChallengeExplanationCancel
|
||||||
jump UnknownScript_0x9e49e
|
jump Script_BattleTowerIntroductionYesNo
|
||||||
|
|
||||||
UnknownScript_0x9e3fc:
|
Script_Menu_ChallengeExplanationCancel: ; 0x9e3fc
|
||||||
writetext UnknownText_0x9e5ea
|
writetext Text_WantToGoIntoABattleRoom
|
||||||
writebyte $1
|
writebyte $1
|
||||||
special Function17d224
|
special Special_Menu_ChallengeExplanationCancel
|
||||||
if_equal $1, UnknownScript_0x9e40f
|
if_equal $1, Script_ChoseChallenge
|
||||||
if_equal $2, UnknownScript_0x9e4a5
|
if_equal $2, Script_BattleTowerExplanation
|
||||||
jump UnknownScript_0x9e4b0
|
jump UnknownScript_0x9e4b0
|
||||||
|
|
||||||
UnknownScript_0x9e40f:
|
Script_ChoseChallenge: ; 0x9e40f
|
||||||
writebyte $1a
|
writebyte $1a
|
||||||
special Function170687
|
special Function170687
|
||||||
special Function170bd3
|
special SpecialCheckForBattleTowerRules
|
||||||
if_not_equal $0, UnknownScript_0x9e4bb
|
if_not_equal $0, Script_CloseText
|
||||||
writetext UnknownText_0x9ef1f
|
writetext Text_SaveBeforeEnteringBattleRoom
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9e3fc
|
iffalse Script_Menu_ChallengeExplanationCancel
|
||||||
dotrigger $0
|
dotrigger $0
|
||||||
special Special_TryQuickSave
|
special Special_TryQuickSave
|
||||||
iffalse UnknownScript_0x9e3fc
|
iffalse Script_Menu_ChallengeExplanationCancel
|
||||||
dotrigger $1
|
dotrigger $1
|
||||||
writebyte $1
|
writebyte $1
|
||||||
special Function170687
|
special Function170687
|
||||||
special Function1700b0
|
special Function1700b0
|
||||||
if_equal $a, UnknownScript_0x9e3fc
|
if_equal $a, Script_Menu_ChallengeExplanationCancel
|
||||||
if_not_equal $0, UnknownScript_0x9e550
|
if_not_equal $0, UnknownScript_0x9e550
|
||||||
writebyte $11
|
writebyte $11
|
||||||
special Function170687
|
special Function170687
|
||||||
writetext UnknownText_0x9e60a
|
writetext Text_RightThisWayToYourBattleRoom
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
writebyte $1e
|
writebyte $1e
|
||||||
@ -116,39 +116,39 @@ UnknownScript_0x9e454:
|
|||||||
warpcheck
|
warpcheck
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x9e47a:
|
Script_GivePlayerHisPrize: ; 0x9e47a
|
||||||
writebyte $1c
|
writebyte $1c
|
||||||
special Function170687
|
special Function170687
|
||||||
writebyte $1b
|
writebyte $1b
|
||||||
special Function170687
|
special Function170687
|
||||||
if_equal $12, UnknownScript_0x9e498
|
if_equal $12, Script_YourPackIsStuffedFull
|
||||||
itemtotext $0, $1
|
itemtotext $0, $1
|
||||||
giveitem $ff, $5
|
giveitem $ff, $5
|
||||||
writetext UnknownText_0x9eb7e
|
writetext Text_PlayerGotFive
|
||||||
writebyte $1d
|
writebyte $1d
|
||||||
special Function170687
|
special Function170687
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x9e498:
|
Script_YourPackIsStuffedFull: ; 0x9e498
|
||||||
writetext UnknownText_0x9eb94
|
writetext Text_YourPackIsStuffedFull
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x9e49e:
|
Script_BattleTowerIntroductionYesNo: ; 0x9e49e
|
||||||
writetext UnknownText_0x9ec3d
|
writetext Text_WouldYouLikeToHearAboutTheBattleTower
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9e4a8
|
iffalse UnknownScript_0x9e4a8
|
||||||
UnknownScript_0x9e4a5:
|
Script_BattleTowerExplanation: ; 0x9e4a5
|
||||||
writetext UnknownText_0x9e886
|
writetext Text_BattleTowerIntroduction_2
|
||||||
UnknownScript_0x9e4a8:
|
UnknownScript_0x9e4a8:
|
||||||
writebyte $1
|
writebyte $1
|
||||||
special Function170687
|
special Function170687
|
||||||
jump UnknownScript_0x9e3fc
|
jump Script_Menu_ChallengeExplanationCancel
|
||||||
|
|
||||||
UnknownScript_0x9e4b0:
|
UnknownScript_0x9e4b0:
|
||||||
writetext UnknownText_0x9ec09
|
writetext Text_WeHopeToServeYouAgain
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
@ -158,26 +158,26 @@ UnknownScript_0x9e4b6:
|
|||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x9e4bb:
|
Script_CloseText: ; 0x9e4bb
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
UnknownScript_0x9e4be:
|
UnknownScript_0x9e4be:
|
||||||
writetext UnknownText_0x9ef1f
|
writetext Text_SaveBeforeEnteringBattleRoom
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9e3fc
|
iffalse Script_Menu_ChallengeExplanationCancel
|
||||||
special Special_TryQuickSave
|
special Special_TryQuickSave
|
||||||
iffalse UnknownScript_0x9e3fc
|
iffalse Script_Menu_ChallengeExplanationCancel
|
||||||
writebyte $1
|
writebyte $1
|
||||||
special Function170687
|
special Function170687
|
||||||
special Function1700ba
|
special Function1700ba
|
||||||
if_equal $a, UnknownScript_0x9e3fc
|
if_equal $a, Script_Menu_ChallengeExplanationCancel
|
||||||
if_not_equal $0, UnknownScript_0x9e550
|
if_not_equal $0, UnknownScript_0x9e550
|
||||||
writetext UnknownText_0x9e9eb
|
writetext Text_ReceivedAListOfLeadersOnTheHonorRoll
|
||||||
spriteface $2, LEFT
|
spriteface $2, LEFT
|
||||||
writetext UnknownText_0x9ea1b
|
writetext Text_PleaseConfirmOnThisMonitor
|
||||||
closetext
|
closetext
|
||||||
spriteface $2, DOWN
|
spriteface $2, DOWN
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
@ -186,12 +186,12 @@ UnknownScript_0x9e4be:
|
|||||||
UnknownScript_0x9e4ea:
|
UnknownScript_0x9e4ea:
|
||||||
writebyte $18
|
writebyte $18
|
||||||
special Function170687
|
special Function170687
|
||||||
if_not_equal $0, UnknownScript_0x9e542
|
if_not_equal $0, Script_APkmnLevelExceeds
|
||||||
writebyte $19
|
writebyte $19
|
||||||
special Function170687
|
special Function170687
|
||||||
if_not_equal $0, UnknownScript_0x9e549
|
if_not_equal $0, Script_MayNotEnterABattleRoomUnderL70
|
||||||
special Function170bd3
|
special SpecialCheckForBattleTowerRules
|
||||||
if_not_equal $0, UnknownScript_0x9e4bb
|
if_not_equal $0, Script_CloseText
|
||||||
writebyte $5
|
writebyte $5
|
||||||
special Function170687
|
special Function170687
|
||||||
if_equal $0, UnknownScript_0x9e512
|
if_equal $0, UnknownScript_0x9e512
|
||||||
@ -202,19 +202,19 @@ UnknownScript_0x9e512:
|
|||||||
writetext UnknownText_0x9ec6d
|
writetext UnknownText_0x9ec6d
|
||||||
UnknownScript_0x9e515:
|
UnknownScript_0x9e515:
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9e3fc
|
iffalse Script_Menu_ChallengeExplanationCancel
|
||||||
writetext UnknownText_0x9ef79
|
writetext UnknownText_0x9ef79
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9e3fc
|
iffalse Script_Menu_ChallengeExplanationCancel
|
||||||
dotrigger $0
|
dotrigger $0
|
||||||
special Special_TryQuickSave
|
special Special_TryQuickSave
|
||||||
iffalse UnknownScript_0x9e3fc
|
iffalse Script_Menu_ChallengeExplanationCancel
|
||||||
dotrigger $1
|
dotrigger $1
|
||||||
writebyte $6
|
writebyte $6
|
||||||
special Function170687
|
special Function170687
|
||||||
writebyte $12
|
writebyte $12
|
||||||
special Function170687
|
special Function170687
|
||||||
writetext UnknownText_0x9e60a
|
writetext Text_RightThisWayToYourBattleRoom
|
||||||
closetext
|
closetext
|
||||||
jump UnknownScript_0x9e44e
|
jump UnknownScript_0x9e44e
|
||||||
|
|
||||||
@ -223,15 +223,15 @@ UnknownScript_0x9e53b:
|
|||||||
closetext
|
closetext
|
||||||
jump UnknownScript_0x9e4b0
|
jump UnknownScript_0x9e4b0
|
||||||
|
|
||||||
UnknownScript_0x9e542:
|
Script_APkmnLevelExceeds: ; 0x9e542
|
||||||
writetext UnknownText_0x9f1e5
|
writetext Text_APkmnLevelExceeds
|
||||||
closetext
|
closetext
|
||||||
jump UnknownScript_0x9e3fc
|
jump Script_Menu_ChallengeExplanationCancel
|
||||||
|
|
||||||
UnknownScript_0x9e549:
|
Script_MayNotEnterABattleRoomUnderL70: ; 0x9e549
|
||||||
writetext UnknownText_0x9f217
|
writetext Text_MayNotEnterABattleRoomUnderL70
|
||||||
closetext
|
closetext
|
||||||
jump UnknownScript_0x9e3fc
|
jump Script_Menu_ChallengeExplanationCancel
|
||||||
|
|
||||||
UnknownScript_0x9e550:
|
UnknownScript_0x9e550:
|
||||||
special Function17f53d
|
special Function17f53d
|
||||||
@ -247,20 +247,20 @@ UnknownScript_0x9e555:
|
|||||||
YoungsterScript_0x9e55d:
|
YoungsterScript_0x9e55d:
|
||||||
faceplayer
|
faceplayer
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9f264
|
writetext Text_BattleTowerYoungster
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
spriteface $3, RIGHT
|
spriteface $3, RIGHT
|
||||||
end
|
end
|
||||||
|
|
||||||
CooltrainerFScript_0x9e568:
|
CooltrainerFScript_0x9e568:
|
||||||
jumptextfaceplayer UnknownText_0x9f2a4
|
jumptextfaceplayer Text_BattleTowerCooltrainerF
|
||||||
|
|
||||||
BugCatcherScript_0x9e56b:
|
BugCatcherScript_0x9e56b:
|
||||||
jumptextfaceplayer UnknownText_0x9f35b
|
jumptextfaceplayer Text_BattleTowerBugCatcher
|
||||||
|
|
||||||
GrannyScript_0x9e56e:
|
GrannyScript_0x9e56e:
|
||||||
jumptextfaceplayer UnknownText_0x9f2e3
|
jumptextfaceplayer Text_BattleTowerGranny
|
||||||
|
|
||||||
MovementData_0x9e571:
|
MovementData_0x9e571:
|
||||||
step_up
|
step_up
|
||||||
@ -346,7 +346,7 @@ MovementData_0x9e5a9:
|
|||||||
turn_head_right
|
turn_head_right
|
||||||
step_end
|
step_end
|
||||||
|
|
||||||
UnknownText_0x9e5ab:
|
Text_BattleTowerWelcomesYou: ; 0x9e5ab
|
||||||
text "BATTLE TOWER"
|
text "BATTLE TOWER"
|
||||||
line "welcomes you!"
|
line "welcomes you!"
|
||||||
|
|
||||||
@ -354,17 +354,17 @@ UnknownText_0x9e5ab:
|
|||||||
line "to a BATTLE ROOM."
|
line "to a BATTLE ROOM."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9e5ea:
|
Text_WantToGoIntoABattleRoom: ; 0x9e5ea
|
||||||
text "Want to go into a"
|
text "Want to go into a"
|
||||||
line "BATTLE ROOM?"
|
line "BATTLE ROOM?"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9e60a:
|
Text_RightThisWayToYourBattleRoom: ; 0x9e60a
|
||||||
text "Right this way to"
|
text "Right this way to"
|
||||||
line "your BATTLE ROOM."
|
line "your BATTLE ROOM."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9e62f:
|
Text_BattleTowerIntroduction_1: ; 0x9e62f
|
||||||
text "BATTLE TOWER is a"
|
text "BATTLE TOWER is a"
|
||||||
line "facility made for"
|
line "facility made for"
|
||||||
cont "#MON battles."
|
cont "#MON battles."
|
||||||
@ -424,7 +424,7 @@ UnknownText_0x9e62f:
|
|||||||
para ""
|
para ""
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9e886:
|
Text_BattleTowerIntroduction_2: ; 0x9e886
|
||||||
text "BATTLE TOWER is a"
|
text "BATTLE TOWER is a"
|
||||||
line "facility made for"
|
line "facility made for"
|
||||||
cont "#MON battles."
|
cont "#MON battles."
|
||||||
@ -460,7 +460,7 @@ UnknownText_0x9e886:
|
|||||||
para ""
|
para ""
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9e9eb:
|
Text_ReceivedAListOfLeadersOnTheHonorRoll: ; 0x9e9eb
|
||||||
text "Received a list of"
|
text "Received a list of"
|
||||||
line "LEADERS on the"
|
line "LEADERS on the"
|
||||||
cont "HONOR ROLL."
|
cont "HONOR ROLL."
|
||||||
@ -468,18 +468,18 @@ UnknownText_0x9e9eb:
|
|||||||
para ""
|
para ""
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ea1b:
|
Text_PleaseConfirmOnThisMonitor: ; 0x9ea1b
|
||||||
text "Please confirm on"
|
text "Please confirm on"
|
||||||
line "this monitor."
|
line "this monitor."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ea3c:
|
Text_ThankYou: ; 0x9ea3c
|
||||||
text "Thank you!"
|
text "Thank you!"
|
||||||
|
|
||||||
para ""
|
para ""
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ea49:
|
Text_ThanksForVisiting: ; 0x9ea49
|
||||||
text "Thanks for"
|
text "Thanks for"
|
||||||
line "visiting!"
|
line "visiting!"
|
||||||
done
|
done
|
||||||
@ -502,7 +502,7 @@ UnknownText_0x9ea5f:
|
|||||||
para ""
|
para ""
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9eaef:
|
Text_CongratulationsYouveBeatenAllTheTrainers: ; 0x9eaef
|
||||||
text "Congratulations!"
|
text "Congratulations!"
|
||||||
|
|
||||||
para "You've beaten all"
|
para "You've beaten all"
|
||||||
@ -522,7 +522,7 @@ UnknownText_0x9eb45:
|
|||||||
line "CENTER?"
|
line "CENTER?"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9eb7e:
|
Text_PlayerGotFive: ; 0x9eb7e
|
||||||
text "<PLAYER> got five"
|
text "<PLAYER> got five"
|
||||||
line "@"
|
line "@"
|
||||||
text_from_ram StringBuffer4
|
text_from_ram StringBuffer4
|
||||||
@ -531,7 +531,7 @@ UnknownText_0x9eb7e:
|
|||||||
text_waitbutton
|
text_waitbutton
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
UnknownText_0x9eb94:
|
Text_YourPackIsStuffedFull: ; 0x9eb94
|
||||||
text "Oops, your PACK is"
|
text "Oops, your PACK is"
|
||||||
line "stuffed full."
|
line "stuffed full."
|
||||||
|
|
||||||
@ -539,24 +539,24 @@ UnknownText_0x9eb94:
|
|||||||
line "and come back."
|
line "and come back."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ebd6:
|
Text_YourRegistrationIsComplete: ; 0x9ebd6
|
||||||
text "Your registration"
|
text "Your registration"
|
||||||
line "is complete."
|
line "is complete."
|
||||||
|
|
||||||
para "Please come again!"
|
para "Please come again!"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ec09:
|
Text_WeHopeToServeYouAgain: ; 0x9ec09
|
||||||
text "We hope to serve"
|
text "We hope to serve"
|
||||||
line "you again."
|
line "you again."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ec26:
|
Text_PleaseStepThisWay: ; 0x9ec26
|
||||||
text "Please step this"
|
text "Please step this"
|
||||||
line "way."
|
line "way."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ec3d:
|
Text_WouldYouLikeToHearAboutTheBattleTower: ; 0x9ec3d
|
||||||
text "Would you like to"
|
text "Would you like to"
|
||||||
line "hear about the"
|
line "hear about the"
|
||||||
cont "BATTLE TOWER?"
|
cont "BATTLE TOWER?"
|
||||||
@ -582,19 +582,19 @@ UnknownText_0x9ecb0:
|
|||||||
cont "deleted. OK?"
|
cont "deleted. OK?"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ed1e:
|
Text_CheckTheLeaderHonorRoll: ; 0x9ed1e
|
||||||
text "Check the LEADER"
|
text "Check the LEADER"
|
||||||
line "HONOR ROLL?"
|
line "HONOR ROLL?"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ed3c:
|
Text_ReadBattleTowerRules: ; 0x9ed3c
|
||||||
text "BATTLE TOWER rules"
|
text "BATTLE TOWER rules"
|
||||||
line "are written here."
|
line "are written here."
|
||||||
|
|
||||||
para "Read the rules?"
|
para "Read the rules?"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ed72:
|
Text_BattleTowerRules: ; 0x9ed72
|
||||||
text "Three #MON may"
|
text "Three #MON may"
|
||||||
line "enter battles."
|
line "enter battles."
|
||||||
|
|
||||||
@ -626,13 +626,13 @@ UnknownText_0x9ee18:
|
|||||||
line "invalid."
|
line "invalid."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ee92:
|
Text_YourPkmnWillBeHealedToFullHealth: ; 0x9ee92
|
||||||
text "Your #MON will"
|
text "Your #MON will"
|
||||||
line "be healed to full"
|
line "be healed to full"
|
||||||
cont "health."
|
cont "health."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9eebc:
|
Text_NextUpOpponentNo: ; 0x9eebc
|
||||||
text "Next up, opponent"
|
text "Next up, opponent"
|
||||||
line "no.@"
|
line "no.@"
|
||||||
text_from_ram StringBuffer3
|
text_from_ram StringBuffer3
|
||||||
@ -647,7 +647,7 @@ UnknownText_0x9eee0:
|
|||||||
line "the CENTER."
|
line "the CENTER."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ef1f:
|
Text_SaveBeforeEnteringBattleRoom: ; 0x9ef1f
|
||||||
text "Before entering"
|
text "Before entering"
|
||||||
line "the BATTLE ROOM,"
|
line "the BATTLE ROOM,"
|
||||||
|
|
||||||
@ -655,7 +655,7 @@ UnknownText_0x9ef1f:
|
|||||||
line "be saved."
|
line "be saved."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9ef5e:
|
Text_SaveAndEndTheSession: ; 0x9ef5e
|
||||||
text "SAVE and end the"
|
text "SAVE and end the"
|
||||||
line "session?"
|
line "session?"
|
||||||
done
|
done
|
||||||
@ -668,7 +668,7 @@ UnknownText_0x9ef79:
|
|||||||
line "the previous ROOM."
|
line "the previous ROOM."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9efbf:
|
Text_CancelYourBattleRoomChallenge: ; 0x9efbf
|
||||||
text "Cancel your BATTLE"
|
text "Cancel your BATTLE"
|
||||||
line "ROOM challenge?"
|
line "ROOM challenge?"
|
||||||
done
|
done
|
||||||
@ -699,7 +699,7 @@ UnknownText_0x9f076:
|
|||||||
line "tomorrow."
|
line "tomorrow."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9f0c1:
|
Text_TooMuchTimeElapsedNoRegister: ; 0x9f0c1
|
||||||
text "Sorry, but it's"
|
text "Sorry, but it's"
|
||||||
line "not possible to"
|
line "not possible to"
|
||||||
|
|
||||||
@ -730,7 +730,7 @@ UnknownText_0x9f151:
|
|||||||
cont "challenge."
|
cont "challenge."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9f1e5:
|
Text_APkmnLevelExceeds: ; 0x9f1e5
|
||||||
text "One or more of"
|
text "One or more of"
|
||||||
line "your #MON's"
|
line "your #MON's"
|
||||||
cont "levels exceeds @"
|
cont "levels exceeds @"
|
||||||
@ -738,7 +738,7 @@ UnknownText_0x9f1e5:
|
|||||||
text "."
|
text "."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9f217:
|
Text_MayNotEnterABattleRoomUnderL70: ; 0x9f217
|
||||||
text_from_ram wcd49
|
text_from_ram wcd49
|
||||||
text " may not"
|
text " may not"
|
||||||
line "enter a BATTLE"
|
line "enter a BATTLE"
|
||||||
@ -750,7 +750,7 @@ UnknownText_0x9f217:
|
|||||||
text "."
|
text "."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9f264:
|
Text_BattleTowerYoungster: ; 0x9f264
|
||||||
text "Destroyed by the"
|
text "Destroyed by the"
|
||||||
line "first opponent in"
|
line "first opponent in"
|
||||||
|
|
||||||
@ -758,7 +758,7 @@ UnknownText_0x9f264:
|
|||||||
line "I'm no good…"
|
line "I'm no good…"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9f2a4:
|
Text_BattleTowerCooltrainerF: ; 0x9f2a4
|
||||||
text "There are lots of"
|
text "There are lots of"
|
||||||
line "BATTLE ROOMS, but"
|
line "BATTLE ROOMS, but"
|
||||||
|
|
||||||
@ -766,7 +766,7 @@ UnknownText_0x9f2a4:
|
|||||||
line "them all!"
|
line "them all!"
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9f2e3:
|
Text_BattleTowerGranny: ; 0x9f2e3
|
||||||
text "It's a grueling"
|
text "It's a grueling"
|
||||||
line "task, not being"
|
line "task, not being"
|
||||||
|
|
||||||
@ -780,7 +780,7 @@ UnknownText_0x9f2e3:
|
|||||||
line "winning battles."
|
line "winning battles."
|
||||||
done
|
done
|
||||||
|
|
||||||
UnknownText_0x9f35b:
|
Text_BattleTowerBugCatcher: ; 0x9f35b
|
||||||
text "I'm trying to see"
|
text "I'm trying to see"
|
||||||
line "how far I can go"
|
line "how far I can go"
|
||||||
|
|
||||||
|
@ -3,25 +3,25 @@ BattleTowerBattleRoom_MapScriptHeader:
|
|||||||
db 2
|
db 2
|
||||||
|
|
||||||
; triggers
|
; triggers
|
||||||
dw UnknownScript_0x9f419, $0000
|
dw Script_EnterBattleRoom, $0000
|
||||||
dw UnknownScript_0x9f420, $0000
|
dw UnknownScript_0x9f420, $0000
|
||||||
|
|
||||||
.MapCallbacks:
|
.MapCallbacks:
|
||||||
db 0
|
db 0
|
||||||
|
|
||||||
UnknownScript_0x9f419:
|
Script_EnterBattleRoom: ; 0x9f419
|
||||||
disappear $2
|
disappear $2
|
||||||
priorityjump UnknownScript_0x9f421
|
priorityjump Script_BattleRoom
|
||||||
dotrigger $1
|
dotrigger $1
|
||||||
|
|
||||||
UnknownScript_0x9f420:
|
UnknownScript_0x9f420:
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x9f421:
|
Script_BattleRoom: ; 0x9f421
|
||||||
applymovement PLAYER, MovementData_0x9e58c
|
applymovement PLAYER, MovementData_0x9e58c
|
||||||
UnknownScript_0x9f425:
|
; beat all 7 opponents in a row
|
||||||
|
Script_BattleRoomLoop: ; 0x9f425
|
||||||
writebyte $2
|
writebyte $2
|
||||||
special Function170b44
|
special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
|
||||||
appear $2
|
appear $2
|
||||||
warpsound
|
warpsound
|
||||||
waitbutton
|
waitbutton
|
||||||
@ -30,19 +30,19 @@ UnknownScript_0x9f425:
|
|||||||
storetext 1
|
storetext 1
|
||||||
keeptextopen
|
keeptextopen
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
special Function170215
|
special Function170215 ; calls predef startbattle
|
||||||
special FadeBlackBGMap
|
special FadeBlackBGMap
|
||||||
reloadmap
|
reloadmap
|
||||||
if_not_equal $0, UnknownScript_0x9f4c2
|
if_not_equal $0, UnknownScript_0x9f4c2
|
||||||
copybytetovar wcf64
|
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
|
||||||
if_equal $7, UnknownScript_0x9f4d9
|
if_equal BATTLETOWER_NROFTRAINERS, Script_BeatenAllTrainers
|
||||||
applymovement $2, MovementData_0x9e597
|
applymovement $2, MovementData_0x9e597
|
||||||
warpsound
|
warpsound
|
||||||
disappear $2
|
disappear $2
|
||||||
applymovement $3, MovementData_0x9e59c
|
applymovement $3, MovementData_0x9e59c
|
||||||
applymovement PLAYER, MovementData_0x9e5a7
|
applymovement PLAYER, MovementData_0x9e5a7
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9ee92
|
writetext Text_YourPkmnWillBeHealedToFullHealth
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
playmusic MUSIC_HEAL
|
playmusic MUSIC_HEAL
|
||||||
@ -52,19 +52,19 @@ UnknownScript_0x9f425:
|
|||||||
special FadeInBGMap
|
special FadeInBGMap
|
||||||
special RestartMapMusic
|
special RestartMapMusic
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9eebc
|
writetext Text_NextUpOpponentNo
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9f483
|
iffalse Script_DontBattleNextOpponent
|
||||||
UnknownScript_0x9f477:
|
Script_ContinueAndBattleNextOpponent: ; 0x9f477
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
applymovement PLAYER, MovementData_0x9e5a9
|
applymovement PLAYER, MovementData_0x9e5a9
|
||||||
applymovement $3, MovementData_0x9e5a1
|
applymovement $3, MovementData_0x9e5a1
|
||||||
jump UnknownScript_0x9f425
|
jump Script_BattleRoomLoop
|
||||||
|
|
||||||
UnknownScript_0x9f483:
|
Script_DontBattleNextOpponent: ; 0x9f483
|
||||||
writetext UnknownText_0x9ef5e
|
writetext Text_SaveAndEndTheSession
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9f4a3
|
iffalse Script_DontSaveAndEndTheSession
|
||||||
writebyte $7
|
writebyte $7
|
||||||
special Function170687
|
special Function170687
|
||||||
writebyte $1f
|
writebyte $1f
|
||||||
@ -75,10 +75,10 @@ UnknownScript_0x9f483:
|
|||||||
waitbutton
|
waitbutton
|
||||||
special FadeBlackBGMap
|
special FadeBlackBGMap
|
||||||
special Reset
|
special Reset
|
||||||
UnknownScript_0x9f4a3:
|
Script_DontSaveAndEndTheSession: ; 0x9f4a3
|
||||||
writetext UnknownText_0x9efbf
|
writetext Text_CancelYourBattleRoomChallenge
|
||||||
yesorno
|
yesorno
|
||||||
iffalse UnknownScript_0x9f477
|
iffalse Script_ContinueAndBattleNextOpponent
|
||||||
writebyte $4
|
writebyte $4
|
||||||
special Function170687
|
special Function170687
|
||||||
writebyte $6
|
writebyte $6
|
||||||
@ -96,25 +96,25 @@ UnknownScript_0x9f4c2:
|
|||||||
writebyte $4
|
writebyte $4
|
||||||
special Function170687
|
special Function170687
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9ea49
|
writetext Text_ThanksForVisiting
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x9f4d9:
|
Script_BeatenAllTrainers: ; 0x9f4d9
|
||||||
pause 60
|
pause 60
|
||||||
special Special_BattleTowerFade
|
special Special_BattleTowerFade
|
||||||
warpfacing $1, BATTLE_TOWER_1F, $7, $7
|
warpfacing $1, BATTLE_TOWER_1F, $7, $7
|
||||||
BattleTowerBattleRoomScript_0x9f4e4:
|
BattleTowerBattleRoomScript_0x9f4e4:
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9eaef
|
writetext Text_CongratulationsYouveBeatenAllTheTrainers
|
||||||
jump UnknownScript_0x9e47a
|
jump Script_GivePlayerHisPrize
|
||||||
|
|
||||||
UnknownScript_0x9f4eb:
|
UnknownScript_0x9f4eb:
|
||||||
writebyte $4
|
writebyte $4
|
||||||
special Function170687
|
special Function170687
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9f0c1
|
writetext Text_TooMuchTimeElapsedNoRegister
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
@ -125,8 +125,8 @@ UnknownScript_0x9f4f7:
|
|||||||
writebyte $6
|
writebyte $6
|
||||||
special Function170687
|
special Function170687
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9ea49
|
writetext Text_ThanksForVisiting
|
||||||
writetext UnknownText_0x9ec09
|
writetext Text_WeHopeToServeYouAgain
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
@ -12,14 +12,13 @@ BattleTowerHallway_MapScriptHeader:
|
|||||||
UnknownScript_0x9f5bb:
|
UnknownScript_0x9f5bb:
|
||||||
priorityjump UnknownScript_0x9f5c1
|
priorityjump UnknownScript_0x9f5c1
|
||||||
dotrigger $1
|
dotrigger $1
|
||||||
|
|
||||||
UnknownScript_0x9f5c0:
|
UnknownScript_0x9f5c0:
|
||||||
end
|
end
|
||||||
|
|
||||||
UnknownScript_0x9f5c1:
|
UnknownScript_0x9f5c1:
|
||||||
follow $2, PLAYER
|
follow $2, PLAYER
|
||||||
callasm Function_0x9f5cb
|
callasm Function_0x9f5cb
|
||||||
jump UnknownScript_0x9f5dc
|
jump Script_WalkToChosenBattleRoom
|
||||||
|
|
||||||
|
|
||||||
Function_0x9f5cb:
|
Function_0x9f5cb:
|
||||||
@ -28,7 +27,7 @@ Function_0x9f5cb:
|
|||||||
|
|
||||||
ld a, 3
|
ld a, 3
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld a, [w3_d800]
|
ld a, [wBTChoiceOfLvlGroup]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
@ -36,38 +35,41 @@ Function_0x9f5cb:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
UnknownScript_0x9f5dc:
|
; enter different rooms for different levels to battle against
|
||||||
if_equal $3, UnknownScript_0x9f603
|
; at least it should look like that
|
||||||
if_equal $4, UnknownScript_0x9f603
|
; because all warps lead to the same room
|
||||||
if_equal $5, UnknownScript_0x9f60a
|
Script_WalkToChosenBattleRoom: ; 0x9f5dc
|
||||||
if_equal $6, UnknownScript_0x9f60a
|
if_equal 3, Script_WalkToBattleRoomL30L40
|
||||||
if_equal $7, UnknownScript_0x9f611
|
if_equal 4, Script_WalkToBattleRoomL30L40
|
||||||
if_equal $8, UnknownScript_0x9f611
|
if_equal 5, Script_WalkToBattleRoomL50L60
|
||||||
if_equal $9, UnknownScript_0x9f618
|
if_equal 6, Script_WalkToBattleRoomL50L60
|
||||||
if_equal $a, UnknownScript_0x9f618
|
if_equal 7, Script_WalkToBattleRoomL70L80
|
||||||
|
if_equal 8, Script_WalkToBattleRoomL70L80
|
||||||
|
if_equal 9, Script_WalkToBattleRoomL90L100
|
||||||
|
if_equal 10, Script_WalkToBattleRoomL90L100
|
||||||
applymovement $2, MovementData_0x9e57a
|
applymovement $2, MovementData_0x9e57a
|
||||||
jump UnknownScript_0x9f61f
|
jump Script_PlayerEntersBattleRoom
|
||||||
|
|
||||||
UnknownScript_0x9f603:
|
Script_WalkToBattleRoomL30L40: ; 0x9f603
|
||||||
applymovement $2, MovementData_0x9e57c
|
applymovement $2, MovementData_0x9e57c
|
||||||
jump UnknownScript_0x9f61f
|
jump Script_PlayerEntersBattleRoom
|
||||||
|
|
||||||
UnknownScript_0x9f60a:
|
Script_WalkToBattleRoomL50L60: ; 0x9f60a
|
||||||
applymovement $2, MovementData_0x9e586
|
applymovement $2, MovementData_0x9e586
|
||||||
jump UnknownScript_0x9f61f
|
jump Script_PlayerEntersBattleRoom
|
||||||
|
|
||||||
UnknownScript_0x9f611:
|
Script_WalkToBattleRoomL70L80: ; 0x9f611
|
||||||
applymovement $2, MovementData_0x9e584
|
applymovement $2, MovementData_0x9e584
|
||||||
jump UnknownScript_0x9f61f
|
jump Script_PlayerEntersBattleRoom
|
||||||
|
|
||||||
UnknownScript_0x9f618:
|
Script_WalkToBattleRoomL90L100: ; 0x9f618
|
||||||
applymovement $2, MovementData_0x9e582
|
applymovement $2, MovementData_0x9e582
|
||||||
jump UnknownScript_0x9f61f
|
jump Script_PlayerEntersBattleRoom
|
||||||
|
|
||||||
UnknownScript_0x9f61f:
|
Script_PlayerEntersBattleRoom: ; 0x9f61f
|
||||||
faceperson PLAYER, $2
|
faceperson PLAYER, $2
|
||||||
loadfont
|
loadfont
|
||||||
writetext UnknownText_0x9ec26
|
writetext Text_PleaseStepThisWay
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
stopfollow
|
stopfollow
|
||||||
|
@ -9728,22 +9728,22 @@ Function118903: ; 118903 (46:4903)
|
|||||||
ld [wcd3c], a
|
ld [wcd3c], a
|
||||||
call Function119ed8
|
call Function119ed8
|
||||||
jp Function119e2e
|
jp Function119e2e
|
||||||
; 11891c (46:491c)
|
|
||||||
|
|
||||||
Function11891c: ; 11891c
|
Function11891c: ; 11891c
|
||||||
call Function118b42
|
call Function118b42
|
||||||
jp Function119e2e
|
jp Function119e2e
|
||||||
; 118922
|
|
||||||
|
|
||||||
Function118922: ; 118922
|
Function118922: ; 118922
|
||||||
ld a, [wcd38]
|
ld a, [wcd38]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_11892d
|
jr nz, .asm_11892d
|
||||||
ld hl, UnknownText_0x11aba5
|
ld hl, Text_WhatLevelDoYouWantToChallenge
|
||||||
jr .asm_118930
|
jr .asm_118930
|
||||||
|
|
||||||
.asm_11892d
|
.asm_11892d
|
||||||
ld hl, UnknownText_0x11abcb
|
ld hl, Text_CheckBattleRoomListByMaxLevel
|
||||||
|
|
||||||
.asm_118930
|
.asm_118930
|
||||||
call Function11a9c0
|
call Function11a9c0
|
||||||
@ -9770,13 +9770,13 @@ Function118936:
|
|||||||
ld a, [StatusFlags]
|
ld a, [StatusFlags]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr nz, .asm_11896b
|
jr nz, .asm_11896b
|
||||||
ld hl, Strings_119d64
|
ld hl, Strings_Ll0ToL40 ; Address to list of strings with the choosable levels
|
||||||
ld a, $5
|
ld a, 5 ; 4 levels to choose from, including 'Cancel'-option
|
||||||
jr .asm_118970
|
jr .asm_118970
|
||||||
|
|
||||||
.asm_11896b
|
.asm_11896b
|
||||||
ld hl, Strings_119d0c
|
ld hl, Strings_L10ToL100 ; Address to list of strings with the choosable levels
|
||||||
ld a, $b
|
ld a, 11 ; 10 levels to choose from, including 'Cancel'-option
|
||||||
|
|
||||||
.asm_118970
|
.asm_118970
|
||||||
ld [wcd4a], a
|
ld [wcd4a], a
|
||||||
@ -9915,7 +9915,8 @@ Function118982:
|
|||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wcd46], a
|
ld [wcd46], a
|
||||||
ret
|
ret
|
||||||
; 118a54
|
|
||||||
|
|
||||||
|
|
||||||
Function118a54: ; 118a54
|
Function118a54: ; 118a54
|
||||||
ld a, [wcd55]
|
ld a, [wcd55]
|
||||||
@ -12537,7 +12538,7 @@ MenuData_119cff: ; 119cff
|
|||||||
String_119d07:
|
String_119d07:
|
||||||
db " ▼@"
|
db " ▼@"
|
||||||
|
|
||||||
Strings_119d0c:
|
Strings_L10ToL100: ; 119d0c
|
||||||
db " L:10 @@"
|
db " L:10 @@"
|
||||||
db " L:20 @@"
|
db " L:20 @@"
|
||||||
db " L:30 @@"
|
db " L:30 @@"
|
||||||
@ -12550,7 +12551,7 @@ Strings_119d0c:
|
|||||||
db " L:100@@"
|
db " L:100@@"
|
||||||
db "CANCEL@@"
|
db "CANCEL@@"
|
||||||
|
|
||||||
Strings_119d64:
|
Strings_Ll0ToL40: ; 119d64
|
||||||
db " L:10 @@"
|
db " L:10 @@"
|
||||||
db " L:20 @@"
|
db " L:20 @@"
|
||||||
db " L:30 @@"
|
db " L:30 @@"
|
||||||
@ -14274,13 +14275,13 @@ UnknownText_0x11ab8b: ; 0x11ab8b
|
|||||||
done
|
done
|
||||||
; 0x11aba5
|
; 0x11aba5
|
||||||
|
|
||||||
UnknownText_0x11aba5: ; 0x11aba5
|
Text_WhatLevelDoYouWantToChallenge: ; 0x11aba5
|
||||||
text "What level do you"
|
text "What level do you"
|
||||||
line "want to challenge?"
|
line "want to challenge?"
|
||||||
done
|
done
|
||||||
; 0x11abcb
|
; 0x11abcb
|
||||||
|
|
||||||
UnknownText_0x11abcb: ; 0x11abcb
|
Text_CheckBattleRoomListByMaxLevel: ; 0x11abcb
|
||||||
text "Check BATTLE ROOM"
|
text "Check BATTLE ROOM"
|
||||||
line "list by max level?"
|
line "list by max level?"
|
||||||
done
|
done
|
||||||
@ -16529,7 +16530,7 @@ ENDC
|
|||||||
sub $19
|
sub $19
|
||||||
|
|
||||||
.asm_11c021
|
.asm_11c021
|
||||||
ld hl, Unknown_11f332
|
ld hl, BTTrainerTexts
|
||||||
jr .asm_11c033
|
jr .asm_11c033
|
||||||
|
|
||||||
.asm_11c026
|
.asm_11c026
|
||||||
@ -20671,14 +20672,14 @@ Unknown_11f2f0:
|
|||||||
db $01, $01, $00, $00, $00, $01
|
db $01, $01, $00, $00, $00, $01
|
||||||
|
|
||||||
|
|
||||||
Unknown_11f332:
|
BTTrainerTexts: ; 11f332
|
||||||
dw Unknown_11f338
|
dw BTTrainerGreetings
|
||||||
dw Unknown_11f36a
|
dw BTTrainerPlayerLostTexts
|
||||||
dw Unknown_11f39c
|
dw BTTrainerPlayerWonTexts
|
||||||
|
|
||||||
Unknown_11f338: ; 11f338
|
BTTrainerGreetings: ; 11f338
|
||||||
dw UnknownText_0x11f42e
|
dw BattleTowerTextJump_0x11f42e
|
||||||
dw UnknownText_0x11f43d
|
dw BattleTowerTextJump_0x11f43d
|
||||||
dw UnknownText_0x11f44c
|
dw UnknownText_0x11f44c
|
||||||
dw UnknownText_0x11f45b
|
dw UnknownText_0x11f45b
|
||||||
dw UnknownText_0x11f46a
|
dw UnknownText_0x11f46a
|
||||||
@ -20703,8 +20704,8 @@ Unknown_11f338: ; 11f338
|
|||||||
dw UnknownText_0x11f587
|
dw UnknownText_0x11f587
|
||||||
dw UnknownText_0x11f596
|
dw UnknownText_0x11f596
|
||||||
|
|
||||||
Unknown_11f36a: ; 11f36a
|
BTTrainerPlayerLostTexts: ; 11f36a
|
||||||
dw UnknownText_0x11f433
|
dw BattleTowerTextJump_0x11f433
|
||||||
dw UnknownText_0x11f442
|
dw UnknownText_0x11f442
|
||||||
dw UnknownText_0x11f451
|
dw UnknownText_0x11f451
|
||||||
dw UnknownText_0x11f460
|
dw UnknownText_0x11f460
|
||||||
@ -20730,7 +20731,7 @@ Unknown_11f36a: ; 11f36a
|
|||||||
dw UnknownText_0x11f58c
|
dw UnknownText_0x11f58c
|
||||||
dw UnknownText_0x11f59b
|
dw UnknownText_0x11f59b
|
||||||
|
|
||||||
Unknown_11f39c: ; 11f39c
|
BTTrainerPlayerWonTexts: ; 11f39c
|
||||||
dw UnknownText_0x11f438
|
dw UnknownText_0x11f438
|
||||||
dw UnknownText_0x11f447
|
dw UnknownText_0x11f447
|
||||||
dw UnknownText_0x11f456
|
dw UnknownText_0x11f456
|
||||||
@ -20815,20 +20816,20 @@ Unknown_11f410: ; 11f410
|
|||||||
dw UnknownText_0x11f681
|
dw UnknownText_0x11f681
|
||||||
|
|
||||||
|
|
||||||
UnknownText_0x11f42e: ; 0x11f42e
|
BattleTowerTextJump_0x11f42e: ; 0x11f42e
|
||||||
text_jump UnknownText_0x1ec000
|
text_jump BattleTowerText_0x1ec000
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
UnknownText_0x11f433: ; 0x11f433
|
BattleTowerTextJump_0x11f433: ; 0x11f433
|
||||||
text_jump UnknownText_0x1ec03b
|
text_jump BattleTowerText_0x1ec03b
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
UnknownText_0x11f438: ; 0x11f438
|
UnknownText_0x11f438: ; 0x11f438
|
||||||
text_jump UnknownText_0x1ec060
|
text_jump UnknownText_0x1ec060
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
UnknownText_0x11f43d: ; 0x11f43d
|
BattleTowerTextJump_0x11f43d: ; 0x11f43d
|
||||||
text_jump UnknownText_0x1ec080
|
text_jump BattleTowerText_0x1ec080
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
UnknownText_0x11f442: ; 0x11f442
|
UnknownText_0x11f442: ; 0x11f442
|
||||||
@ -22803,7 +22804,7 @@ Function17021e: ; 17021e
|
|||||||
|
|
||||||
Function17022c: ; 17022c
|
Function17022c: ; 17022c
|
||||||
.asm_17022c
|
.asm_17022c
|
||||||
call Function17023a
|
call Jumpto_BattleTowerBattleFunction
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, [wcf63]
|
ld a, [wcf63]
|
||||||
cp $1
|
cp $1
|
||||||
@ -22811,11 +22812,11 @@ Function17022c: ; 17022c
|
|||||||
ret
|
ret
|
||||||
; 17023a
|
; 17023a
|
||||||
|
|
||||||
Function17023a: ; 17023a
|
Jumpto_BattleTowerBattleFunction: ; 17023a
|
||||||
ld a, [wcf63]
|
ld a, [wcf63]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_170249
|
ld hl, Jumptable_BattleTowerBattleFunctions
|
||||||
rept 2
|
rept 2
|
||||||
add hl, de
|
add hl, de
|
||||||
endr
|
endr
|
||||||
@ -22825,20 +22826,20 @@ endr
|
|||||||
jp [hl]
|
jp [hl]
|
||||||
; 170249
|
; 170249
|
||||||
|
|
||||||
Jumptable_170249: ; 170249
|
Jumptable_BattleTowerBattleFunctions: ; 170249
|
||||||
dw Function17024d
|
dw RunBattleTowerBattle
|
||||||
dw Function1704c9
|
dw SkipBattleTowerBattle
|
||||||
; 17024d
|
; 17024d
|
||||||
|
|
||||||
Function17024d: ; 17024d
|
RunBattleTowerBattle: ; 17024d
|
||||||
ld a, [Options]
|
ld a, [Options]
|
||||||
push af
|
push af
|
||||||
ld hl, Options
|
ld hl, Options
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
ld a, [wcfc0]
|
ld a, [InBattleTowerBattle]
|
||||||
push af
|
push af
|
||||||
or $1
|
or $1
|
||||||
ld [wcfc0], a
|
ld [InBattleTowerBattle], a
|
||||||
xor a
|
xor a
|
||||||
ld [InLinkBattle], a
|
ld [InLinkBattle], a
|
||||||
callba Mobile_HealParty
|
callba Mobile_HealParty
|
||||||
@ -22852,13 +22853,13 @@ Function17024d: ; 17024d
|
|||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_1702a9
|
jr nz, .asm_1702a9
|
||||||
ld a, $1
|
ld a, BANK(sNrOfBeatenBattleTowerTrainers)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be46]
|
ld a, [sNrOfBeatenBattleTowerTrainers]
|
||||||
ld [wcf64], a
|
ld [wNrOfBeatenBattleTowerTrainers], a ; wcf64
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld hl, StringBuffer3
|
ld hl, StringBuffer3
|
||||||
ld a, [wcf64]
|
ld a, [wNrOfBeatenBattleTowerTrainers] ; wcf64
|
||||||
add $f7
|
add $f7
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $50
|
ld a, $50
|
||||||
@ -22866,64 +22867,66 @@ Function17024d: ; 17024d
|
|||||||
|
|
||||||
.asm_1702a9
|
.asm_1702a9
|
||||||
pop af
|
pop af
|
||||||
ld [wcfc0], a
|
ld [InBattleTowerBattle], a
|
||||||
pop af
|
pop af
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcf63], a
|
ld [wcf63], a
|
||||||
ret
|
ret
|
||||||
; 1702b7
|
|
||||||
|
|
||||||
Function1702b7: ; 1702b7
|
Function1702b7: ; 1702b7
|
||||||
call Function1704a2
|
; Initialise the BattleTower-Trainer and his Pkmn
|
||||||
ld de, $c643
|
call CopyBTTrainer_FromBT_OTrainer_TowBT_OTTempCopy
|
||||||
ld c, $b
|
ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn1Name ; $c643
|
||||||
|
ld c, PKMN_NAME_LENGTH
|
||||||
callba Function17d073
|
callba Function17d073
|
||||||
jr nc, .asm_1702db
|
jr nc, .asm_1702db
|
||||||
ld a, [$c608 + 11]
|
|
||||||
|
ld a, [wBT_OTTempCopy + wBT_OTTempCopy_Pkmn1]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
ld de, $c643
|
ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn1Name ; $c643
|
||||||
ld bc, $000b
|
ld bc, PKMN_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
.asm_1702db
|
.asm_1702db
|
||||||
ld de, $c67e
|
ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn2Name ; $c67e
|
||||||
ld c, $b
|
ld c, PKMN_NAME_LENGTH
|
||||||
callba Function17d073
|
callba Function17d073
|
||||||
jr nc, .asm_1702fc
|
jr nc, .asm_1702fc
|
||||||
ld a, [$c64e]
|
ld a, [wBT_OTTempCopy + wBT_OTTempCopy_Pkmn2] ; [$c64e]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
ld de, $c67e
|
ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn2Name ; $c67e
|
||||||
ld bc, $000b
|
ld bc, PKMN_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
.asm_1702fc
|
.asm_1702fc
|
||||||
ld de, $c686 + 51
|
ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn3Name ; $c686 + 51 = $c6b9
|
||||||
ld c, $b
|
ld c, PKMN_NAME_LENGTH
|
||||||
callba Function17d073
|
callba Function17d073
|
||||||
jr nc, .asm_17031d
|
jr nc, .asm_17031d
|
||||||
ld a, [$c689]
|
ld a, [wBT_OTTempCopy + wBT_OTTempCopy_Pkmn3] ; [$c689]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
ld de, $c686 + 51
|
ld de, wBT_OTTempCopy + wBT_OTTempCopy_Pkmn3Name ; $c686 + 51 = $c6b9
|
||||||
ld bc, $000b
|
ld bc, PKMN_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
.asm_17031d
|
.asm_17031d
|
||||||
ld a, $50
|
ld a, $50
|
||||||
ld [$c64d], a
|
ld [wBT_OTTempCopy + wBT_OTTempCopy_45], a ; $c64d
|
||||||
ld [$c688], a
|
ld [wBT_OTTempCopy + wBT_OTTempCopy_80], a ; $c688
|
||||||
ld [$c68a + 57], a
|
ld [wBT_OTTempCopy + wBT_OTTempCopy_BB], a ; $c68a + 57 = $c6c3
|
||||||
call Function170c98
|
call Function170c98
|
||||||
ld de, $c608
|
ld de, wBT_OTTempCopy
|
||||||
ld c, $a
|
ld c, $a
|
||||||
callba Function17d073
|
callba Function17d073
|
||||||
jr nc, .asm_17033d
|
jr nc, .asm_17033d
|
||||||
@ -22931,7 +22934,7 @@ Function1702b7: ; 1702b7
|
|||||||
jr .asm_170340
|
jr .asm_170340
|
||||||
|
|
||||||
.asm_17033d
|
.asm_17033d
|
||||||
ld hl, $c608
|
ld hl, wBT_OTTempCopy ; 0xc608
|
||||||
|
|
||||||
.asm_170340
|
.asm_170340
|
||||||
ld de, wd26b
|
ld de, wd26b
|
||||||
@ -22939,16 +22942,18 @@ Function1702b7: ; 1702b7
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, $50
|
ld a, $50
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, $c608 + 10
|
ld hl, wBT_OTTempCopy + wBT_OTTempCopy_TrainerClass
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [OtherTrainerClass], a
|
ld [OtherTrainerClass], a
|
||||||
ld a, $ea
|
ld a, $ea
|
||||||
ld [BGMapBuffer], a
|
ld [BGMapBuffer], a
|
||||||
ld a, $d3
|
ld a, $d3
|
||||||
ld [wcd21], a
|
ld [wcd21], a
|
||||||
|
|
||||||
|
; Copy Pkmn into Memory from the address in hl
|
||||||
ld de, OTPartyMon1Species
|
ld de, OTPartyMon1Species
|
||||||
ld bc, OTPartyCount
|
ld bc, OTPartyCount
|
||||||
ld a, $3
|
ld a, BATTLETOWER_NROFPKMNS ; Number of Pkmn the BattleTower-Trainer has
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
.asm_170367
|
.asm_170367
|
||||||
@ -22957,7 +22962,7 @@ Function1702b7: ; 1702b7
|
|||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
push bc
|
push bc
|
||||||
ld bc, $0030
|
ld bc, BATTLETOWER_PKMNSTRUCTLENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
push de
|
push de
|
||||||
ld a, [BGMapBuffer]
|
ld a, [BGMapBuffer]
|
||||||
@ -23163,27 +23168,29 @@ Unknown_17047e:
|
|||||||
db $0f, $05, $14, $07
|
db $0f, $05, $14, $07
|
||||||
db $05, $05, $11, $0c
|
db $05, $05, $11, $0c
|
||||||
db $0c, $06, $06, $04
|
db $0c, $06, $06, $04
|
||||||
; 1704a2
|
|
||||||
|
|
||||||
Function1704a2: ; 1704a2
|
|
||||||
|
CopyBTTrainer_FromBT_OTrainer_TowBT_OTTempCopy: ; 1704a2
|
||||||
|
; copy the BattleTower-Trainer data that lies at 'BT_OTrainer' to 'wBT_OTTempCopy'
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld hl, LYOverrides
|
ld hl, BT_OTrainer ; $d100
|
||||||
ld de, $c608
|
ld de, wBT_OTTempCopy ; $c608
|
||||||
ld bc, $00e0
|
ld bc, BT_OTrainerEnd - BT_OTrainer ; $e0 = $a + $1 + 3*$3b + $24
|
||||||
|
; = $a + $1 + BATTLETOWER_NROFPKMNS * (BATTLETOWER_PKMNSTRUCTLENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld a, $1
|
ld a, BANK(s1_be45)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [$be45], a
|
ld [s1_be45], a
|
||||||
ld hl, $be46
|
ld hl, sNrOfBeatenBattleTowerTrainers
|
||||||
inc [hl]
|
inc [hl]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
Function1704c9:
|
SkipBattleTowerBattle: ; 1704c9
|
||||||
ret
|
ret
|
||||||
; 1704ca
|
; 1704ca
|
||||||
|
|
||||||
@ -23256,14 +23263,17 @@ Jumptable_17051f: ; 17051f
|
|||||||
Function170525: ; 170525
|
Function170525: ; 170525
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
|
|
||||||
ld hl, $a89c
|
ld hl, $a89c
|
||||||
ld de, StringBuffer3
|
ld de, StringBuffer3
|
||||||
ld bc, $0016
|
ld bc, $0016
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, $a8b2
|
ld hl, $a8b2
|
||||||
ld de, $c608
|
ld de, $c608
|
||||||
ld bc, $0096
|
ld bc, $0096
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
hlcoord 1, 1
|
hlcoord 1, 1
|
||||||
ld de, StringBuffer3
|
ld de, StringBuffer3
|
||||||
@ -23281,10 +23291,12 @@ Function170525: ; 170525
|
|||||||
call Function1705f0
|
call Function1705f0
|
||||||
jr Function1705b2
|
jr Function1705b2
|
||||||
|
|
||||||
|
|
||||||
Function170571:
|
Function170571:
|
||||||
call Function32f9
|
call Function32f9
|
||||||
call Function1705b2
|
call Function1705b2
|
||||||
|
|
||||||
|
|
||||||
Function170577:
|
Function170577:
|
||||||
ld hl, hJoyPressed
|
ld hl, hJoyPressed
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -23500,56 +23512,62 @@ endr
|
|||||||
|
|
||||||
|
|
||||||
Jumptable_170696: ; 170696 (5c:4696)
|
Jumptable_170696: ; 170696 (5c:4696)
|
||||||
dw Function17075f
|
dw Function17075f ; 0x00
|
||||||
dw Function170788
|
dw Function170788 ; 0x01
|
||||||
dw Function170778
|
dw Function170778 ; 0x02
|
||||||
dw Function170799
|
dw Function170799 ; 0x03
|
||||||
dw Function17079d
|
dw Function17079d ; 0x04
|
||||||
dw Function1707ac
|
dw Function1707ac ; 0x05
|
||||||
dw Function1707f4
|
dw Function1707f4 ; 0x06
|
||||||
dw Function170868
|
dw Function170868 ; 0x07
|
||||||
dw Function170881
|
dw Function170881 ; 0x08
|
||||||
dw Function17089a
|
dw Function17089a ; 0x09
|
||||||
dw Function1708b1
|
dw Function1708b1 ; 0x0a
|
||||||
dw Function1708b9
|
dw Function1708b9 ; 0x0b
|
||||||
dw Function1708c8
|
dw Function1708c8 ; 0x0c
|
||||||
dw Function1708f0
|
dw Function1708f0 ; 0x0d
|
||||||
dw Function17093c
|
dw Function17093c ; 0x0e
|
||||||
dw Function1709aa
|
dw Function1709aa ; 0x0f
|
||||||
dw Function1709bb
|
dw Function1709bb ; 0x10
|
||||||
dw Function170a9c
|
dw Function170a9c ; 0x11
|
||||||
dw Function170aa0
|
dw Function170aa0 ; 0x12
|
||||||
dw Function170aaf
|
dw Function170aaf ; 0x13
|
||||||
dw Function170abe
|
dw Function170abe ; 0x14
|
||||||
dw Function170ad7
|
dw Function170ad7 ; 0x15
|
||||||
dw Function170807
|
dw Function170807 ; 0x16
|
||||||
dw Function17081d
|
dw Function17081d ; 0x17
|
||||||
dw Function170ae8
|
dw Function170ae8 ; 0x18
|
||||||
dw Function170b16
|
dw Function170b16 ; 0x19
|
||||||
dw Function1706d6
|
dw ResetBattleTowerTrainersSRAM ; 0x1a
|
||||||
dw Function1706ee
|
dw Function1706ee ; 0x1b
|
||||||
dw Function17071b
|
dw Function17071b ; 0x1c
|
||||||
dw Function170729
|
dw Function170729 ; 0x1d
|
||||||
dw Function17073e
|
dw Function17073e ; 0x1e
|
||||||
dw Function170737
|
dw Function170737 ; 0x1f
|
||||||
|
|
||||||
|
|
||||||
Function1706d6: ; 1706d6 (5c:46d6)
|
; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes)
|
||||||
ld a, $1
|
ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6)
|
||||||
|
ld a, BANK(sBTTrainers)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
|
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld hl, $be48
|
ld hl, sBTTrainers
|
||||||
ld bc, $7
|
ld bc, BATTLETOWER_NROFTRAINERS
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [$be46], a
|
ld [sNrOfBeatenBattleTowerTrainers], a
|
||||||
|
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1706ee: ; 1706ee (5c:46ee)
|
Function1706ee: ; 1706ee (5c:46ee)
|
||||||
ld a, $1
|
ld a, BANK(sbe50)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be50]
|
|
||||||
|
ld a, [sbe50]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ld hl, NumItems
|
ld hl, NumItems
|
||||||
@ -23575,18 +23593,18 @@ Function1706ee: ; 1706ee (5c:46ee)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function17071b: ; 17071b (5c:471b)
|
Function17071b: ; 17071b (5c:471b)
|
||||||
ld a, $1
|
ld a, BANK(s1_be45)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [$be45], a
|
ld [s1_be45], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170729: ; 170729 (5c:4729)
|
Function170729: ; 170729 (5c:4729)
|
||||||
ld a, $1
|
ld a, BANK(s1_be45)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [$be45], a
|
ld [s1_be45], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -23606,10 +23624,10 @@ Function17073e: ; 17073e (5c:473e)
|
|||||||
cp $1e
|
cp $1e
|
||||||
jr z, Function17073e
|
jr z, Function17073e
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, BANK(sbe50)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
pop af
|
pop af
|
||||||
ld [$be50], a
|
ld [sbe50], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -23618,17 +23636,17 @@ Function17075f: ; 17075f (5c:475f)
|
|||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, $1
|
ld a, BANK(sbe4f)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be4f]
|
ld a, [sbe4f]
|
||||||
and $2
|
and $2
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170778: ; 170778 (5c:4778)
|
Function170778: ; 170778 (5c:4778)
|
||||||
ld hl, $be45
|
ld hl, s1_be45
|
||||||
ld a, $1
|
ld a, BANK(s1_be45)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
@ -23636,11 +23654,11 @@ Function170778: ; 170778 (5c:4778)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function170788: ; 170788 (5c:4788)
|
Function170788: ; 170788 (5c:4788)
|
||||||
ld a, $1
|
ld a, BANK(sbe4f)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be4f]
|
ld a, [sbe4f]
|
||||||
or $2
|
or $2
|
||||||
ld [$be4f], a
|
ld [sbe4f], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -23651,10 +23669,10 @@ Function170799: ; 170799 (5c:4799)
|
|||||||
Function17079d: ; 17079d (5c:479d)
|
Function17079d: ; 17079d (5c:479d)
|
||||||
ld c, $0
|
ld c, $0
|
||||||
asm_17079f: ; 17079f (5c:479f)
|
asm_17079f: ; 17079f (5c:479f)
|
||||||
ld a, $1
|
ld a, BANK(s1_be45)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [$be45], a
|
ld [s1_be45], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -23763,27 +23781,27 @@ Function17081d: ; 17081d (5c:481d)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function170868: ; 170868 (5c:4868)
|
Function170868: ; 170868 (5c:4868)
|
||||||
ld a, $1
|
ld a, BANK(sbe47)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK] ; $ff00+$70
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a ; $ff00+$70
|
||||||
ld a, [wd000 + $800]
|
ld a, [wd000 + $800]
|
||||||
ld [$be47], a
|
ld [sbe47], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a ; $ff00+$70
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170881: ; 170881 (5c:4881)
|
Function170881: ; 170881 (5c:4881)
|
||||||
ld a, $1
|
ld a, BANK(sbe47)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK] ; $ff00+$70
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a ; $ff00+$70
|
||||||
ld a, [$be47]
|
ld a, [sbe47]
|
||||||
ld [wd000 + $800], a
|
ld [wd000 + $800], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a ; $ff00+$70
|
||||||
@ -23815,9 +23833,9 @@ Function1708b1: ; 1708b1 (5c:48b1)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function1708b9: ; 1708b9 (5c:48b9)
|
Function1708b9: ; 1708b9 (5c:48b9)
|
||||||
ld a, $1
|
ld a, BANK(s1_be3c)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be3c]
|
ld a, [s1_be3c]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
@ -24121,20 +24139,20 @@ Function170abe: ; 170abe (5c:4abe)
|
|||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, $1
|
ld a, BANK(sbe4f)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be4f]
|
ld a, [sbe4f]
|
||||||
and $1
|
and $1
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170ad7: ; 170ad7 (5c:4ad7)
|
Function170ad7: ; 170ad7 (5c:4ad7)
|
||||||
ld a, $1
|
ld a, BANK(sbe4f)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be4f]
|
ld a, [sbe4f]
|
||||||
or $1
|
or $1
|
||||||
ld [$be4f], a
|
ld [sbe4f], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -24178,8 +24196,8 @@ Function170b16: ; 170b16 (5c:4b16)
|
|||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170b44: ; 170b44
|
Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
|
||||||
callba Function1f8000
|
callba Function_LoadOpponentTrainerAndPokemons
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
@ -24195,6 +24213,9 @@ Function170b44: ; 170b44
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wcd49], a
|
ld [wcd49], a
|
||||||
|
|
||||||
|
; Load sprite of the opponent trainer
|
||||||
|
; because s/he is chosen randomly and appears out of nowhere
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
dec a
|
dec a
|
||||||
sla a
|
sla a
|
||||||
@ -24237,8 +24258,8 @@ Function170bd2: ; 170bd2
|
|||||||
ret
|
ret
|
||||||
; 170bd3
|
; 170bd3
|
||||||
|
|
||||||
Function170bd3: ; 170bd3
|
SpecialCheckForBattleTowerRules: ; 170bd3
|
||||||
callba Function8b201
|
callba CheckForBattleTowerRules
|
||||||
jr c, .asm_170bde
|
jr c, .asm_170bde
|
||||||
xor a
|
xor a
|
||||||
jr .asm_170be0
|
jr .asm_170be0
|
||||||
|
@ -425,19 +425,29 @@ Function17d1f1: ; 17d1f1
|
|||||||
ret
|
ret
|
||||||
; 17d224
|
; 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]
|
ld a, [ScriptVar]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_17d234
|
jr nz, .asm_17d234
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ld hl, MenuDataHeader_17d26a
|
ld hl, MenuDataHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option
|
||||||
jr .asm_17d23c
|
jr .asm_17d23c
|
||||||
|
|
||||||
.asm_17d234
|
.asm_17d234
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ld hl, MenuDataHeader_17d28f
|
ld hl, MenuDataHeader_ChallengeExplanationCancel ; English Menu
|
||||||
|
|
||||||
.asm_17d23c
|
.asm_17d23c
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
@ -488,14 +498,14 @@ MenuData2_17d272: ; 17d272
|
|||||||
db "やめる@"
|
db "やめる@"
|
||||||
; 17d28f
|
; 17d28f
|
||||||
|
|
||||||
MenuDataHeader_17d28f: ; 17d28f
|
MenuDataHeader_ChallengeExplanationCancel: ; 17d28f
|
||||||
db $40 ; flags
|
db $40 ; flags
|
||||||
db 0, 0 ; start coords
|
db 0, 0 ; start coords
|
||||||
db 7, 14 ; end coords
|
db 7, 14 ; end coords
|
||||||
dw MenuData2_17d297
|
dw MenuData2_ChallengeExplanationCancel
|
||||||
db 1 ; default option
|
db 1 ; default option
|
||||||
|
|
||||||
MenuData2_17d297: ; 17d297
|
MenuData2_ChallengeExplanationCancel: ; 17d297
|
||||||
db $a0 ; flags
|
db $a0 ; flags
|
||||||
db 3
|
db 3
|
||||||
db "Challenge@"
|
db "Challenge@"
|
||||||
@ -2388,7 +2398,7 @@ Function17ded9: ; 17ded9
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
push hl
|
push hl
|
||||||
callba Function4dba3
|
callba SetPkmnCaughtData
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
jr .asm_17df5e
|
jr .asm_17df5e
|
||||||
@ -2534,7 +2544,7 @@ endr
|
|||||||
; 17e026
|
; 17e026
|
||||||
|
|
||||||
Function17e026: ; 17e026
|
Function17e026: ; 17e026
|
||||||
ld a, $1
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -2545,11 +2555,11 @@ Function17e026: ; 17e026
|
|||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
callba LoadEnemyMon
|
callba LoadEnemyMon
|
||||||
callba Functionde6e
|
callba SentPkmnIntoBox
|
||||||
callba Function4db83
|
callba Function4db83
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
ld a, $1
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
bit 1, b
|
bit 1, b
|
||||||
jr z, .asm_17e067
|
jr z, .asm_17e067
|
||||||
@ -4294,9 +4304,9 @@ Function17f334: ; 17f334
|
|||||||
ld a, [wcd55]
|
ld a, [wcd55]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_17f355
|
jr nz, .asm_17f355
|
||||||
ld a, $1
|
ld a, BANK(sCrystalData)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [$be3f]
|
ld a, [sCrystalData + 2]
|
||||||
jr .asm_17f35d
|
jr .asm_17f35d
|
||||||
|
|
||||||
.asm_17f355
|
.asm_17f355
|
||||||
@ -4338,9 +4348,9 @@ Function17f382: ; 17f382
|
|||||||
ld a, [wcd55]
|
ld a, [wcd55]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_17f3a3
|
jr nz, .asm_17f3a3
|
||||||
ld a, $1
|
ld a, BANK(sCrystalData)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld de, $be40
|
ld de, sCrystalData + 3
|
||||||
jr .asm_17f3ab
|
jr .asm_17f3ab
|
||||||
|
|
||||||
.asm_17f3a3
|
.asm_17f3a3
|
||||||
|
@ -44,7 +44,7 @@ WantsToBattleText:: ; 0x807a9
|
|||||||
prompt
|
prompt
|
||||||
; 0x807bd
|
; 0x807bd
|
||||||
|
|
||||||
BattleText_0x807bd: ; 0x807bd
|
BattleText_WildFled: ; 0x807bd
|
||||||
text "Wild @"
|
text "Wild @"
|
||||||
text_from_ram EnemyMonNick
|
text_from_ram EnemyMonNick
|
||||||
text ""
|
text ""
|
||||||
@ -52,7 +52,7 @@ BattleText_0x807bd: ; 0x807bd
|
|||||||
prompt
|
prompt
|
||||||
; 0x807cf
|
; 0x807cf
|
||||||
|
|
||||||
BattleText_0x807cf: ; 0x807cf
|
BattleText_EnemyFled: ; 0x807cf
|
||||||
text "Enemy @"
|
text "Enemy @"
|
||||||
text_from_ram EnemyMonNick
|
text_from_ram EnemyMonNick
|
||||||
text ""
|
text ""
|
||||||
@ -113,7 +113,7 @@ BattleText_0x80880: ; 0x80880
|
|||||||
prompt
|
prompt
|
||||||
; 0x80899
|
; 0x80899
|
||||||
|
|
||||||
BattleText_0x80899: ; 0x80899
|
BattleText_UserRecoveredPPUsing: ; 0x80899
|
||||||
text "<USER>"
|
text "<USER>"
|
||||||
line "recovered PP using"
|
line "recovered PP using"
|
||||||
cont "@"
|
cont "@"
|
||||||
@ -129,13 +129,13 @@ BattleText_0x808b6: ; 0x808b6
|
|||||||
prompt
|
prompt
|
||||||
; 0x808d2
|
; 0x808d2
|
||||||
|
|
||||||
BattleText_0x808d2: ; 0x808d2
|
BattleText_SafeguardFaded: ; 0x808d2
|
||||||
text "<USER>'s"
|
text "<USER>'s"
|
||||||
line "SAFEGUARD faded!"
|
line "SAFEGUARD faded!"
|
||||||
prompt
|
prompt
|
||||||
; 0x808e7
|
; 0x808e7
|
||||||
|
|
||||||
BattleText_0x808e7: ; 0x808e7
|
BattleText_PkmnnLightScreenFell: ; 0x808e7
|
||||||
text_from_ram StringBuffer1
|
text_from_ram StringBuffer1
|
||||||
text " #MON's"
|
text " #MON's"
|
||||||
line "LIGHT SCREEN fell!"
|
line "LIGHT SCREEN fell!"
|
||||||
@ -149,42 +149,42 @@ BattleText_0x80905: ; 0x80905
|
|||||||
prompt
|
prompt
|
||||||
; 0x8091f
|
; 0x8091f
|
||||||
|
|
||||||
BattleText_0x8091f: ; 0x8091f
|
BattleText_RainContinuesToFall: ; 0x8091f
|
||||||
text "Rain continues to"
|
text "Rain continues to"
|
||||||
line "fall."
|
line "fall."
|
||||||
prompt
|
prompt
|
||||||
; 0x80938
|
; 0x80938
|
||||||
|
|
||||||
BattleText_0x80938: ; 0x80938
|
BattleText_TheSunlightIsStrong: ; 0x80938
|
||||||
text "The sunlight is"
|
text "The sunlight is"
|
||||||
line "strong."
|
line "strong."
|
||||||
prompt
|
prompt
|
||||||
; 0x80951
|
; 0x80951
|
||||||
|
|
||||||
BattleText_0x80951: ; 0x80951
|
BattleText_TheSandstormRages: ; 0x80951
|
||||||
text "The SANDSTORM"
|
text "The SANDSTORM"
|
||||||
line "rages."
|
line "rages."
|
||||||
prompt
|
prompt
|
||||||
; 0x80967
|
; 0x80967
|
||||||
|
|
||||||
BattleText_0x80967: ; 0x80967
|
BattleText_TheRainStopped: ; 0x80967
|
||||||
text "The rain stopped."
|
text "The rain stopped."
|
||||||
prompt
|
prompt
|
||||||
; 0x8097a
|
; 0x8097a
|
||||||
|
|
||||||
BattleText_0x8097a: ; 0x8097a
|
BattleText_TheSunlightFaded: ; 0x8097a
|
||||||
text "The sunlight"
|
text "The sunlight"
|
||||||
line "faded."
|
line "faded."
|
||||||
prompt
|
prompt
|
||||||
; 0x8098f
|
; 0x8098f
|
||||||
|
|
||||||
BattleText_0x8098f: ; 0x8098f
|
BattleText_TheSandstormSubsided: ; 0x8098f
|
||||||
text "The SANDSTORM"
|
text "The SANDSTORM"
|
||||||
line "subsided."
|
line "subsided."
|
||||||
prompt
|
prompt
|
||||||
; 0x809a8
|
; 0x809a8
|
||||||
|
|
||||||
BattleText_0x809a8: ; 0x809a8
|
BattleText_EnemyPkmnFainted: ; 0x809a8
|
||||||
text "Enemy @"
|
text "Enemy @"
|
||||||
text_from_ram EnemyMonNick
|
text_from_ram EnemyMonNick
|
||||||
text ""
|
text ""
|
||||||
@ -199,7 +199,7 @@ GotMoneyForWinningText:
|
|||||||
line "for winning!"
|
line "for winning!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
BattleText_0x809da: ; 0x809da
|
BattleText_EnemyWasDefeated: ; 0x809da
|
||||||
text "<ENEMY>"
|
text "<ENEMY>"
|
||||||
line "was defeated!"
|
line "was defeated!"
|
||||||
prompt
|
prompt
|
||||||
@ -234,14 +234,14 @@ BattleText_0x80a4f: ; 0x80a4f
|
|||||||
prompt
|
prompt
|
||||||
; 0x80a75
|
; 0x80a75
|
||||||
|
|
||||||
BattleText_0x80a75: ; 0x80a75
|
BattleText_PkmnFainted: ; 0x80a75
|
||||||
text_from_ram BattleMonNick
|
text_from_ram BattleMonNick
|
||||||
text ""
|
text ""
|
||||||
line "fainted!"
|
line "fainted!"
|
||||||
prompt
|
prompt
|
||||||
; 0x80a83
|
; 0x80a83
|
||||||
|
|
||||||
BattleText_0x80a83: ; 0x80a83
|
BattleText_UseNextMon: ; 0x80a83
|
||||||
text "Use next #MON?"
|
text "Use next #MON?"
|
||||||
done
|
done
|
||||||
; 0x80a93
|
; 0x80a93
|
||||||
@ -259,7 +259,7 @@ LostAgainstText: ; 0x80ab9
|
|||||||
prompt
|
prompt
|
||||||
; 0x80aca
|
; 0x80aca
|
||||||
|
|
||||||
BattleText_0x80aca: ; 0x80aca
|
BattleText_EnemyIsAboutToUseWillPlayerChangePkmn: ; 0x80aca
|
||||||
text "<ENEMY>"
|
text "<ENEMY>"
|
||||||
line "is about to use"
|
line "is about to use"
|
||||||
cont "@"
|
cont "@"
|
||||||
@ -271,7 +271,7 @@ BattleText_0x80aca: ; 0x80aca
|
|||||||
done
|
done
|
||||||
; 0x80af8
|
; 0x80af8
|
||||||
|
|
||||||
BattleText_0x80af8: ; 0x80af8
|
BattleText_EnemySentOut: ; 0x80af8
|
||||||
text "<ENEMY>"
|
text "<ENEMY>"
|
||||||
line "sent out"
|
line "sent out"
|
||||||
cont "@"
|
cont "@"
|
||||||
@ -280,34 +280,32 @@ BattleText_0x80af8: ; 0x80af8
|
|||||||
done
|
done
|
||||||
; 0x80b0b
|
; 0x80b0b
|
||||||
|
|
||||||
BattleText_0x80b0b: ; 0x80b0b
|
BattleText_TheresNoWillToBattle: ; 0x80b0b
|
||||||
text "There's no will to"
|
text "There's no will to"
|
||||||
line "battle!"
|
line "battle!"
|
||||||
prompt
|
prompt
|
||||||
; 0x80b26
|
; 0x80b26
|
||||||
|
|
||||||
BattleText_0x80b26: ; 0x80b26
|
BattleText_AnEGGCantBattle: ; 0x80b26
|
||||||
text "An EGG can't"
|
text "An EGG can't"
|
||||||
line "battle!"
|
line "battle!"
|
||||||
prompt
|
prompt
|
||||||
; 0x80b3b
|
; 0x80b3b
|
||||||
|
|
||||||
BattleText_0x80b3b: ; 0x80b3b
|
BattleText_CantEscape2: ; 0x80b3b
|
||||||
text "Can't escape!"
|
text "Can't escape!"
|
||||||
prompt
|
prompt
|
||||||
; 0x80b49
|
; 0x80b49
|
||||||
|
|
||||||
BattleText_0x80b49: ; 0x80b49
|
BattleText_TheresNoEscapeFromTrainerBattle: ; 0x80b49
|
||||||
text "No! There's no"
|
text "No! There's no"
|
||||||
line "running from a"
|
line "running from a"
|
||||||
cont "trainer battle!"
|
cont "trainer battle!"
|
||||||
prompt
|
prompt
|
||||||
; 0x80b77
|
|
||||||
|
|
||||||
BattleText_0x80b77: ; 0x80b77
|
BattleText_GotAwaySafely: ; 0x80b77
|
||||||
text "Got away safely!"
|
text "Got away safely!"
|
||||||
prompt
|
prompt
|
||||||
; 0x80b89
|
|
||||||
|
|
||||||
BattleText_0x80b89: ; 0x80b89
|
BattleText_0x80b89: ; 0x80b89
|
||||||
text "<USER>"
|
text "<USER>"
|
||||||
@ -318,7 +316,7 @@ BattleText_0x80b89: ; 0x80b89
|
|||||||
prompt
|
prompt
|
||||||
; 0x80ba0
|
; 0x80ba0
|
||||||
|
|
||||||
BattleText_0x80ba0: ; 0x80ba0
|
BattleText_CantEscape: ; 0x80ba0
|
||||||
text "Can't escape!"
|
text "Can't escape!"
|
||||||
prompt
|
prompt
|
||||||
; 0x80bae
|
; 0x80bae
|
||||||
@ -1282,7 +1280,7 @@ IgnoredOrders2Text: ; 0x81850
|
|||||||
prompt
|
prompt
|
||||||
; 0x81863
|
; 0x81863
|
||||||
|
|
||||||
BattleText_0x81863: ; 0x81863
|
BattleText_LinkErrorBattleCanceled: ; 0x81863
|
||||||
text "Link error…"
|
text "Link error…"
|
||||||
|
|
||||||
para "The battle has"
|
para "The battle has"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
UnknownText_0x1ec000: ; 0x1ec000
|
BattleTowerText_0x1ec000: ; 0x1ec000
|
||||||
text "Hello, glad to"
|
text "Hello, glad to"
|
||||||
line "meet you!"
|
line "meet you!"
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ UnknownText_0x1ec000: ; 0x1ec000
|
|||||||
done
|
done
|
||||||
; 0x1ec03b
|
; 0x1ec03b
|
||||||
|
|
||||||
UnknownText_0x1ec03b: ; 0x1ec03b
|
BattleTowerText_0x1ec03b: ; 0x1ec03b
|
||||||
text "Thank you! A most"
|
text "Thank you! A most"
|
||||||
line "enjoyable battle!"
|
line "enjoyable battle!"
|
||||||
done
|
done
|
||||||
@ -20,7 +20,7 @@ UnknownText_0x1ec060: ; 0x1ec060
|
|||||||
done
|
done
|
||||||
; 0x1ec080
|
; 0x1ec080
|
||||||
|
|
||||||
UnknownText_0x1ec080: ; 0x1ec080
|
BattleTowerText_0x1ec080: ; 0x1ec080
|
||||||
text "Work, work, work…"
|
text "Work, work, work…"
|
||||||
line "I'm always busy!"
|
line "I'm always busy!"
|
||||||
done
|
done
|
||||||
|
@ -1295,7 +1295,7 @@ UnknownText_0x1bcf99: ; 0x1bcf99
|
|||||||
done
|
done
|
||||||
; 0x1bcf9c
|
; 0x1bcf9c
|
||||||
|
|
||||||
UnknownText_0x1bcf9c: ; 0x1bcf9c
|
Text_EnemyWithdrew: ; 0x1bcf9c
|
||||||
text "<ENEMY>"
|
text "<ENEMY>"
|
||||||
line "withdrew"
|
line "withdrew"
|
||||||
cont "@"
|
cont "@"
|
||||||
@ -1304,7 +1304,7 @@ UnknownText_0x1bcf9c: ; 0x1bcf9c
|
|||||||
prompt
|
prompt
|
||||||
; 0x1bcfaf
|
; 0x1bcfaf
|
||||||
|
|
||||||
UnknownText_0x1bcfaf: ; 0x1bcfaf
|
Text_EnemyUsedOn: ; 0x1bcfaf
|
||||||
text "<ENEMY>"
|
text "<ENEMY>"
|
||||||
line "used @"
|
line "used @"
|
||||||
text_from_ram wd050
|
text_from_ram wd050
|
||||||
@ -1315,19 +1315,19 @@ UnknownText_0x1bcfaf: ; 0x1bcfaf
|
|||||||
prompt
|
prompt
|
||||||
; 0x1bcfc7
|
; 0x1bcfc7
|
||||||
|
|
||||||
UnknownText_0x1bcfc7: ; 0x1bcfc7
|
Text_ThatCantBeUsedRightNow: ; 0x1bcfc7
|
||||||
text "That can't be used"
|
text "That can't be used"
|
||||||
line "right now."
|
line "right now."
|
||||||
prompt
|
prompt
|
||||||
; 0x1bcfe5
|
; 0x1bcfe5
|
||||||
|
|
||||||
UnknownText_0x1bcfe5: ; 0x1bcfe5
|
Text_ThatItemCantBePutInThePack: ; 0x1bcfe5
|
||||||
text "That item can't be"
|
text "That item can't be"
|
||||||
line "put in the PACK."
|
line "put in the PACK."
|
||||||
done
|
done
|
||||||
; 0x1bd009
|
; 0x1bd009
|
||||||
|
|
||||||
UnknownText_0x1bd009: ; 0x1bd009
|
Text_TheItemWasPutInThePack: ; 0x1bd009
|
||||||
text "The @"
|
text "The @"
|
||||||
text_from_ram StringBuffer1
|
text_from_ram StringBuffer1
|
||||||
text ""
|
text ""
|
||||||
@ -1336,18 +1336,18 @@ UnknownText_0x1bd009: ; 0x1bd009
|
|||||||
done
|
done
|
||||||
; 0x1bd029
|
; 0x1bd029
|
||||||
|
|
||||||
UnknownText_0x1bd029: ; 0x1bd029
|
Text_RemainingTime: ; 0x1bd029
|
||||||
text "Remaining Time"
|
text "Remaining Time"
|
||||||
done
|
done
|
||||||
; 0x1bd039
|
; 0x1bd039
|
||||||
|
|
||||||
UnknownText_0x1bd039: ; 0x1bd039
|
Text_YourPkmnsHPWasHealed: ; 0x1bd039
|
||||||
text "Your #MON's HP"
|
text "Your #MON's HP"
|
||||||
line "was healed."
|
line "was healed."
|
||||||
prompt
|
prompt
|
||||||
; 0x1bd054
|
; 0x1bd054
|
||||||
|
|
||||||
UnknownText_0x1bd054: ; 0x1bd054
|
Text_Warping: ; 0x1bd054
|
||||||
text "Warping…"
|
text "Warping…"
|
||||||
done
|
done
|
||||||
; 0x1bd05e
|
; 0x1bd05e
|
||||||
@ -1372,7 +1372,7 @@ UnknownText_0x1bd09a: ; 0x1bd09a
|
|||||||
prompt
|
prompt
|
||||||
; 0x1bd0bd
|
; 0x1bd0bd
|
||||||
|
|
||||||
UnknownText_0x1bd0bd: ; 0x1bd0bd
|
Text_BreedingIsNotPossible: ; 0x1bd0bd
|
||||||
text "Breeding is not"
|
text "Breeding is not"
|
||||||
line "possible."
|
line "possible."
|
||||||
prompt
|
prompt
|
||||||
|
@ -129,29 +129,29 @@ UnknownText_0x1c02c9: ; 1c02c9
|
|||||||
prompt
|
prompt
|
||||||
; 1c02df
|
; 1c02df
|
||||||
|
|
||||||
UnknownText_0x1c02df: ; 1c02df
|
Text_GoPkmn: ; 1c02df
|
||||||
text "Go! @"
|
text "Go! @"
|
||||||
db "@"
|
db "@"
|
||||||
; 1c02e6
|
; 1c02e6
|
||||||
|
|
||||||
UnknownText_0x1c02e6: ; 1c02e6
|
Text_DoItPkmn: ; 1c02e6
|
||||||
text "Do it! @"
|
text "Do it! @"
|
||||||
db "@"
|
db "@"
|
||||||
; 1c02f0
|
; 1c02f0
|
||||||
|
|
||||||
UnknownText_0x1c02f0: ; 1c02f0
|
Text_GoForItPkmn: ; 1c02f0
|
||||||
text "Go for it,"
|
text "Go for it,"
|
||||||
line "@"
|
line "@"
|
||||||
db "@"
|
db "@"
|
||||||
; 1c02fe
|
; 1c02fe
|
||||||
|
|
||||||
UnknownText_0x1c02fe: ; 1c02fe
|
Text_YourFoesWeakGetmPkmn: ; 1c02fe
|
||||||
text "Your foe's weak!"
|
text "Your foe's weak!"
|
||||||
line "Get'm, @"
|
line "Get'm, @"
|
||||||
db "@"
|
db "@"
|
||||||
; 1c0317
|
; 1c0317
|
||||||
|
|
||||||
UnknownText_0x1c0317: ; 1c0317
|
Text_BattleMonNick01: ; 1c0317
|
||||||
text_from_ram BattleMonNick
|
text_from_ram BattleMonNick
|
||||||
text "!"
|
text "!"
|
||||||
done
|
done
|
||||||
@ -1074,7 +1074,7 @@ UnknownText_0x1c0fdd: ; 1c0fdd
|
|||||||
done
|
done
|
||||||
; 1c0feb
|
; 1c0feb
|
||||||
|
|
||||||
UnknownText_0x1c0feb: ; 1c0feb
|
Text_WasSentToBillsPC: ; 1c0feb
|
||||||
text_from_ram StringBuffer1
|
text_from_ram StringBuffer1
|
||||||
text " was"
|
text " was"
|
||||||
line "sent to BILL's PC."
|
line "sent to BILL's PC."
|
||||||
|
@ -1262,7 +1262,7 @@ UnknownText_0x1c5937: ; 0x1c5937
|
|||||||
done
|
done
|
||||||
; 0x1c5944
|
; 0x1c5944
|
||||||
|
|
||||||
UnknownText_0x1c5944: ; 0x1c5944
|
Text_ExcuseMeYoureNotReady: ; 0x1c5944
|
||||||
text "Excuse me."
|
text "Excuse me."
|
||||||
line "You're not ready."
|
line "You're not ready."
|
||||||
para ""
|
para ""
|
||||||
@ -1289,14 +1289,14 @@ UnknownText_0x1c59a3: ; 0x1c59a3
|
|||||||
done
|
done
|
||||||
; 0x1c59c3
|
; 0x1c59c3
|
||||||
|
|
||||||
UnknownText_0x1c59c3: ; 0x1c59c3
|
Text_OnlyThreePkmnMayBeEntered: ; 0x1c59c3
|
||||||
text "Only three #MON"
|
text "Only three #MON"
|
||||||
line "may be entered."
|
line "may be entered."
|
||||||
para ""
|
para ""
|
||||||
done
|
done
|
||||||
; 0x1c59e5
|
; 0x1c59e5
|
||||||
|
|
||||||
UnknownText_0x1c59e5: ; 0x1c59e5
|
Text_ThePkmnMustAllBeDifferentKinds: ; 0x1c59e5
|
||||||
text "The @"
|
text "The @"
|
||||||
text_from_ram StringBuffer2
|
text_from_ram StringBuffer2
|
||||||
text " #MON"
|
text " #MON"
|
||||||
@ -1306,7 +1306,7 @@ UnknownText_0x1c59e5: ; 0x1c59e5
|
|||||||
done
|
done
|
||||||
; 0x1c5a13
|
; 0x1c5a13
|
||||||
|
|
||||||
UnknownText_0x1c5a13: ; 0x1c5a13
|
Text_ThePkmnMustNotHoldTheSameItems: ; 0x1c5a13
|
||||||
text "The @"
|
text "The @"
|
||||||
text_from_ram StringBuffer2
|
text_from_ram StringBuffer2
|
||||||
text " #MON"
|
text " #MON"
|
||||||
@ -1316,7 +1316,7 @@ UnknownText_0x1c5a13: ; 0x1c5a13
|
|||||||
done
|
done
|
||||||
; 0x1c5a42
|
; 0x1c5a42
|
||||||
|
|
||||||
UnknownText_0x1c5a42: ; 0x1c5a42
|
Text_YouCantTakeAnEgg: ; 0x1c5a42
|
||||||
text "You can't take an"
|
text "You can't take an"
|
||||||
line "EGG!"
|
line "EGG!"
|
||||||
para ""
|
para ""
|
||||||
|
83
wram.asm
83
wram.asm
@ -443,6 +443,7 @@ SECTION "Battle", WRAM0
|
|||||||
|
|
||||||
wMisc::
|
wMisc::
|
||||||
wBattle::
|
wBattle::
|
||||||
|
wBT_OTTempCopy:: ; used to copy the data of the BattleTower-Trainer and the 3 Pkmn
|
||||||
|
|
||||||
wc608::
|
wc608::
|
||||||
wEnemyMoveStruct:: ds MOVE_LENGTH ; c608
|
wEnemyMoveStruct:: ds MOVE_LENGTH ; c608
|
||||||
@ -808,6 +809,7 @@ wc716:: ds 1
|
|||||||
wc717:: ds 1
|
wc717:: ds 1
|
||||||
wc718:: ds 1
|
wc718:: ds 1
|
||||||
wc719:: ds 1
|
wc719:: ds 1
|
||||||
|
LastPlayerMon:: ; c71a
|
||||||
wc71a:: ds 1
|
wc71a:: ds 1
|
||||||
LastPlayerMove:: ; c71b
|
LastPlayerMove:: ; c71b
|
||||||
ds 1
|
ds 1
|
||||||
@ -884,6 +886,23 @@ wMiscEnd::
|
|||||||
wc7e8:: ds 24
|
wc7e8:: ds 24
|
||||||
|
|
||||||
|
|
||||||
|
RSSET 0 ; Offsets for wBT_OTTempCopy:: @ $c608
|
||||||
|
wBT_OTTempCopy_0 RB $A ; $c608
|
||||||
|
wBT_OTTempCopy_TrainerClass RB $1 ; $c608 + $a = $c612
|
||||||
|
wBT_OTTempCopy_Pkmn1 RB $30 ; $c608 + $b = $c613
|
||||||
|
wBT_OTTempCopy_Pkmn1Name RB $A ; $c608 + $3b = $c643
|
||||||
|
wBT_OTTempCopy_45 RB $1 ; $c608 + $45 = $c64d
|
||||||
|
wBT_OTTempCopy_Pkmn2 RB $30 ; $c608 + $46 = $c64e
|
||||||
|
wBT_OTTempCopy_Pkmn2Name RB $A ; $c608 + $76 = $c67e
|
||||||
|
wBT_OTTempCopy_80 RB $1 ; $c608 + $80 = $c688
|
||||||
|
wBT_OTTempCopy_Pkmn3 RB $30 ; $c608 + $81 = $c689
|
||||||
|
wBT_OTTempCopy_Pkmn3Name RB $A ; $c608 + $b1 = $c6b9
|
||||||
|
wBT_OTTempCopy_BB RB $1 ; $c608 + $bb = $c6c3
|
||||||
|
|
||||||
|
GLOBAL wBT_OTTempCopy_TrainerClass, wBT_OTTempCopy_Pkmn1, wBT_OTTempCopy_Pkmn1Name, wBT_OTTempCopy_45, wBT_OTTempCopy_Pkmn2, wBT_OTTempCopy_Pkmn2Name, wBT_OTTempCopy_80, wBT_OTTempCopy_Pkmn3, wBT_OTTempCopy_Pkmn3Name, wBT_OTTempCopy_BB
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SECTION "Overworld Map", WRAM0 [$c800]
|
SECTION "Overworld Map", WRAM0 [$c800]
|
||||||
|
|
||||||
wc800::
|
wc800::
|
||||||
@ -1172,6 +1191,7 @@ CurSpecies:: ; cf60
|
|||||||
|
|
||||||
wcf61:: ds 2
|
wcf61:: ds 2
|
||||||
wcf63:: ds 1
|
wcf63:: ds 1
|
||||||
|
wNrOfBeatenBattleTowerTrainers::
|
||||||
wcf64:: ds 1
|
wcf64:: ds 1
|
||||||
IF !DEF(CRYSTAL11)
|
IF !DEF(CRYSTAL11)
|
||||||
wPokedexStatus::
|
wPokedexStatus::
|
||||||
@ -1260,7 +1280,13 @@ GameTimerPause:: ; cfbc
|
|||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wcfbe:: ds 2
|
wcfbe:: ds 2
|
||||||
wcfc0:: ds 2
|
|
||||||
|
InBattleTowerBattle:: ; cfc0
|
||||||
|
; 0 not in BattleTower-Battle
|
||||||
|
; 1 BattleTower-Battle
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
ds 1
|
||||||
|
|
||||||
FXAnimID::
|
FXAnimID::
|
||||||
FXAnimIDLo:: ; cfc2
|
FXAnimIDLo:: ; cfc2
|
||||||
@ -1818,6 +1844,7 @@ wd25e:: ds 4
|
|||||||
wd262:: ds 1
|
wd262:: ds 1
|
||||||
wd263:: ds 1
|
wd263:: ds 1
|
||||||
wd264:: ds 1
|
wd264:: ds 1
|
||||||
|
GetPokemonName_Parameter::
|
||||||
wd265:: ds 1
|
wd265:: ds 1
|
||||||
wd266:: ds 1
|
wd266:: ds 1
|
||||||
wd267:: ds 1
|
wd267:: ds 1
|
||||||
@ -2598,11 +2625,36 @@ w2_d188:: ds 1
|
|||||||
|
|
||||||
SECTION "WRAM 3", WRAMX, BANK [3]
|
SECTION "WRAM 3", WRAMX, BANK [3]
|
||||||
|
|
||||||
|
w3_d000:: ; d000
|
||||||
ds $100
|
ds $100
|
||||||
|
|
||||||
w3_d100::
|
BT_OTrainer::
|
||||||
ds $700
|
w3_d100:: ; BattleTower OpponentTrainer-Data (length = 0xe0 = $a + $1 + 3*$3b + $24)
|
||||||
|
BT_OTrainer_Name::
|
||||||
|
ds $A
|
||||||
|
BT_OTrainer_TrainerClass::
|
||||||
|
ds $1
|
||||||
|
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:: ; we_d1e0
|
||||||
|
|
||||||
|
ds $20
|
||||||
|
|
||||||
|
ds $600
|
||||||
|
|
||||||
|
wBTChoiceOfLvlGroup::
|
||||||
w3_d800:: ds 1
|
w3_d800:: ds 1
|
||||||
|
|
||||||
|
|
||||||
@ -2772,17 +2824,26 @@ sCrystalData::
|
|||||||
s1_be44:: ds 1
|
s1_be44:: ds 1
|
||||||
s1_be45:: ds 1
|
s1_be45:: ds 1
|
||||||
|
|
||||||
|
; data of the BattleTower must be in SRAM because you can save and leave between battles
|
||||||
sBattleTower:: ; be46
|
sBattleTower:: ; be46
|
||||||
|
sNrOfBeatenBattleTowerTrainers::
|
||||||
sbe46:: ds 1
|
sbe46:: ds 1
|
||||||
sbe47:: ds 1
|
sbe47:: ds 1
|
||||||
sbe48:: ds 7
|
; The 7 trainers of the BattleTower are saved here, so nobody appears more than once
|
||||||
sbe4f:: ds 2
|
sBTTrainers:: ; sbe48
|
||||||
sbe51:: ds 1
|
ds 7
|
||||||
sbe52:: ds 1
|
sbe4f:: ds 1
|
||||||
sbe53:: ds 1
|
sbe50:: ds 1
|
||||||
sbe54:: ds 1
|
; Pkmn of previous trainer
|
||||||
sbe55:: ds 1
|
sBTPkmnOfTrainers:: ; 0xbe51
|
||||||
sbe56:: ds 1
|
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]
|
SECTION "Boxes 1-7", SRAM, BANK [2]
|
||||||
|
Loading…
Reference in New Issue
Block a user