@@ -2,7 +2,8 @@
; which were used for Trainer Rankings in Pokémon News.
; Copies certain values at the time the player enters the Hall of Fame.
TrainerRankings_HallOfFame2: : mobile ; 0x105ef6
Stubbed TrainerRankings_HallOfFame2:: ; 0x105ef6
ret
ld a , BANK ( sTrainerRankingGameTimeHOF )
call GetSRAMBank
@@ -33,7 +34,8 @@ TrainerRankings_HallOfFame2:: mobile ; 0x105ef6
ret
; 105f33
TrainerRankings_MagikarpLength: mobile ; 105f33
Stubbed TrainerRankings_MagikarpLength: ; 105f33
ret
ld a , BANK ( sTrainerRankingLongestMagikarp )
call GetSRAMBank
ld de , Buffer1
@@ -101,7 +103,8 @@ TrainerRankings_MagikarpLength: mobile ; 105f33
ret
; 105f79
TrainerRankings_BugContestScore: mobile ; 105f79
Stubbed TrainerRankings_BugContestScore: ; 105f79
ret
ld a , BANK ( sTrainerRankingBugContestScore )
call GetSRAMBank
ld a , [ hProduct ]
@@ -130,7 +133,8 @@ TrainerRankings_BugContestScore: mobile ; 105f79
ret
; 105f9f
TrainerRankings_AddToSlotsWinStreak: mobile ; 105f9f
Stubbed TrainerRankings_AddToSlotsWinStreak: ; 105f9f
ret
ld a , BANK ( sTrainerRankingCurrentSlotsStreak )
call GetSRAMBank
@@ -170,7 +174,8 @@ TrainerRankings_AddToSlotsWinStreak: mobile ; 105f9f
ret
; 105fd0
TrainerRankings_EndSlotsWinStreak: mobile ; 105fd0
Stubbed TrainerRankings_EndSlotsWinStreak: ; 105fd0
ret
ld a , BANK ( sTrainerRankingCurrentSlotsStreak )
call GetSRAMBank
ld hl , sTrainerRankingCurrentSlotsStreak
@@ -182,7 +187,8 @@ TrainerRankings_EndSlotsWinStreak: mobile ; 105fd0
ret
; 105fe3
TrainerRankings_AddToSlotsPayouts: mobile ; 105fe3
Stubbed TrainerRankings_AddToSlotsPayouts: ; 105fe3
ret
ld a , BANK ( sTrainerRankingTotalSlotsPayouts )
call GetSRAMBank
ld hl , sTrainerRankingTotalSlotsPayouts + 3
@@ -210,7 +216,8 @@ TrainerRankings_AddToSlotsPayouts: mobile ; 105fe3
ret
; 106008
TrainerRankings_AddToBattlePayouts: mobile ; 106008
Stubbed TrainerRankings_AddToBattlePayouts: ; 106008
ret
ld a , BANK ( sTrainerRankingTotalBattlePayouts )
call GetSRAMBank
ld hl , sTrainerRankingTotalBattlePayouts + 3
@@ -240,11 +247,13 @@ TrainerRankings_AddToBattlePayouts: mobile ; 106008
ret
; 10602e
TrainerRankings_StepCount: mobile ; 10602e (41:602e)
Stubbed TrainerRankings_StepCount: ; 10602e (41:602e)
ret
ld hl , sTrainerRankingStepCount
jp TrainerRankings_Increment4Byte
jp Stubbed TrainerRankings_Increment4Byte
Unreferenced_TrainerRankings_BattleTowerWins: mobile ; 106035
Unreferenced_Stubbed TrainerRankings_BattleTowerWins: ; 106035
ret
ld a , $ 5
call GetSRAMBank
ld a , [ $ aa8d ]
@@ -252,167 +261,196 @@ Unreferenced_TrainerRankings_BattleTowerWins: mobile ; 106035
call Cl oseSRAM
ret nz
ld hl , sTrainerRankingBattleTowerWins
jp TrainerRankings_Increment2Byte
jp Stubbed TrainerRankings_Increment2Byte
TrainerRankings_TMsHMsTaught: mobile ; 106049
Stubbed TrainerRankings_TMsHMsTaught: ; 106049
ret
ld hl , sTrainerRankingTMsHMsTaught
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Battles: mobile ; 106050
Stubbed TrainerRankings_Battles: ; 106050
ret
ld a , [ BattleType ]
cp BATTLETYPE_TUTORIAL ; Exclude the Dude’ s tutorial battle
ret z
ld hl , sTrainerRankingBattles
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_WildBattles: mobile ; 10605d
Stubbed TrainerRankings_WildBattles: ; 10605d
ret
ld a , [ BattleType ]
cp BATTLETYPE_TUTORIAL ; Exclude the Dude’ s tutorial battle
ret z
ld hl , sTrainerRankingWildBattles
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_TrainerBattles: mobile ; 10606a
Stubbed TrainerRankings_TrainerBattles: ; 10606a
ret
ld hl , sTrainerRankingTrainerBattles
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Unused1: mobile ; 106071
Stubbed TrainerRankings_Unused1: ; 106071
ret
ld hl , sTrainerRankingUnused1
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_HallOfFame: : mobile ; 0x106078
Stubbed TrainerRankings_HallOfFame:: ; 0x106078
ret
ld hl , sTrainerRankingHOFEntries
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_WildMonsCaught: mobile ; 10607f (41:607f)
Stubbed TrainerRankings_WildMonsCaught: ; 10607f (41:607f)
ret
ld hl , sTrainerRankingWildMonsCaught
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_HookedEncounters: mobile ; 106086
Stubbed TrainerRankings_HookedEncounters: ; 106086
ret
ld hl , sTrainerRankingHookedEncounters
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_EggsHatched: mobile ; 10608d (41:608d)
Stubbed TrainerRankings_EggsHatched: ; 10608d (41:608d)
ret
ld hl , sTrainerRankingEggsHatched
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_MonsEvolved: mobile ; 106094
Stubbed TrainerRankings_MonsEvolved: ; 106094
ret
ld hl , sTrainerRankingMonsEvolved
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_FruitPicked: mobile ; 10609b
Stubbed TrainerRankings_FruitPicked: ; 10609b
ret
ld hl , sTrainerRankingFruitPicked
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
Special_TrainerRankings_Healings: mobile ; 1060a2
Special_Stubbed TrainerRankings_Healings: ; 1060a2
ret
ld hl , sTrainerRankingHealings
jp TrainerRankings_Increment3Byte
jp Stubbed TrainerRankings_Increment3Byte
TrainerRankings_MysteryGift: mobile ; 1060a9 (41:60a9)
Stubbed TrainerRankings_MysteryGift: ; 1060a9 (41:60a9)
ret
ld hl , sTrainerRankingMysteryGift
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Trades: mobile ; 1060af
Stubbed TrainerRankings_Trades: ; 1060af
ret
ld hl , sTrainerRankingTrades
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Fly: mobile ; 1060b5
Stubbed TrainerRankings_Fly: ; 1060b5
ret
ld hl , sTrainerRankingFly
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Surf: mobile ; 1060bb
Stubbed TrainerRankings_Surf: ; 1060bb
ret
ld hl , sTrainerRankingSurf
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Waterfall: mobile ; 1060c1
Stubbed TrainerRankings_Waterfall: ; 1060c1
ret
ld hl , sTrainerRankingWaterfall
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_WhiteOuts: mobile ; 1060c7
Stubbed TrainerRankings_WhiteOuts: ; 1060c7
ret
ld hl , sTrainerRankingWhiteOuts
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_LuckyNumberShow: mobile ; 1060cd
Stubbed TrainerRankings_LuckyNumberShow: ; 1060cd
ret
ld hl , sTrainerRankingLuckyNumberShow
jr TrainerRankings_Increment2Byte
jr Stubbed TrainerRankings_Increment2Byte
TrainerRankings_PhoneCalls: mobile ; 1060d3
Stubbed TrainerRankings_PhoneCalls: ; 1060d3
ret
ld hl , sTrainerRankingPhoneCalls
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Unused2: mobile ; 1060df
Stubbed TrainerRankings_Unused2: ; 1060df
ret
ld hl , sTrainerRankingUnused2
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_LinkBattles: mobile ; 1060df
Stubbed TrainerRankings_LinkBattles: ; 1060df
ret
ld hl , sTrainerRankingLinkBattles
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Splash: mobile ; 1060e5
Stubbed TrainerRankings_Splash: ; 1060e5
ret
; Only counts if it’ s the player’ s turn
ld a , [ hBattleTurn ]
and a
ret nz
ld hl , sTrainerRankingSplash
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_TreeEncounters: mobile ; 1060ef
Stubbed TrainerRankings_TreeEncounters: ; 1060ef
ret
ld hl , sTrainerRankingTreeEncounters
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_Unused3: mobile ; 1060f5
Stubbed TrainerRankings_Unused3: ; 1060f5
ret
ld hl , sTrainerRankingUnused3
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_ColosseumWins: mobile ; win
Stubbed TrainerRankings_ColosseumWins: ; win
ret
ld hl , sTrainerRankingColosseumWins
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
TrainerRankings_ColosseumLosses: mobile ; lose
Stubbed TrainerRankings_ColosseumLosses: ; lose
ret
ld hl , sTrainerRankingColosseumLosses
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
; 106107
TrainerRankings_ColosseumDraws: mobile ; draw
Stubbed TrainerRankings_ColosseumDraws: ; draw
ret
ld hl , sTrainerRankingColosseumDraws
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
; 10610d
; Counts uses of both Selfdestruct and Explosion.
TrainerRankings_Selfdestruct: mobile ; 10610d
Stubbed TrainerRankings_Selfdestruct: ; 10610d
ret
; Only counts if it’ s the player’ s turn
ld a , [ hBattleTurn ]
and a
ret nz
ld hl , sTrainerRankingSelfdestruct
jr TrainerRankings_Increment3Byte
jr Stubbed TrainerRankings_Increment3Byte
; 106117
TrainerRankings_Increment4Byte: ; 106117
Stubbed TrainerRankings_Increment4Byte: ; 106117
push bc
ld bc , 3
jr TrainerRankings_Increment
jr Stubbed TrainerRankings_Increment
; 10611d
TrainerRankings_Increment3Byte: ; 10611d
Stubbed TrainerRankings_Increment3Byte: ; 10611d
push bc
ld bc , 2
jr TrainerRankings_Increment
jr Stubbed TrainerRankings_Increment
; 106123
TrainerRankings_Increment2Byte: ; 106123
Stubbed TrainerRankings_Increment2Byte: ; 106123
push bc
ld bc , 1
jr TrainerRankings_Increment
jr Stubbed TrainerRankings_Increment
; 106129
; unused
TrainerRankings_Increment1Byte: ; 106129
Stubbed TrainerRankings_Increment1Byte: ; 106129
push bc
ld bc , 0
; Increments a big-endian value of bc + 1 bytes at hl
TrainerRankings_Increment: ; 10612d
Stubbed TrainerRankings_Increment: ; 10612d
ld a , BANK ( sTrainerRankings )
call GetSRAMBank
push hl
@@ -449,7 +487,8 @@ TrainerRankings_Increment: ; 10612d
; 106155
; Used when SRAM bank 5 isn’ t already loaded — what’ s the point of this?
UpdateTrainerRankingsChecksum2: mobile ; 106155
UpdateTrainerRankingsChecksum2: ; 106155
ret
ld a , BANK ( sTrainerRankings )
call GetSRAMBank
call UpdateTrainerRankingsChecksum
@@ -771,7 +810,7 @@ endr
ret
; 10630f
; functions related to the cable club and various NPC scripts referencing mobile communications
; functions related to the cable club and various NPC scripts referencing communications
Special_Mobile_DummyReturnFalse: ; 10630f
xor a
@@ -779,7 +818,8 @@ Special_Mobile_DummyReturnFalse: ; 10630f
ret
; 106314
MobileFn_106314: mobile ; 106314
Stubbed_Function106314: ; 106314
ret
ld a , $ 4
call GetSRAMBank
ld a , c
@@ -958,7 +998,7 @@ Function106403: ; 106403
or c
inc a
ld c , a
call MobileFn_ 106314
call Stubbed_Function 106314
ld a , [ wMobileCommsJumptableIndex ]
inc a
ld [ wMobileCommsJumptableIndex ], a
@@ -976,7 +1016,7 @@ Function106403: ; 106403
.asm_106435
ld c , $ 0
call MobileFn_ 106314
call Stubbed_Function 106314
ld a , [ wMobileCommsJumptableIndex ]
inc a
ld [ wMobileCommsJumptableIndex ], a
@@ -1003,7 +1043,8 @@ Function106453: ; 106453
ret
; 106462
MobileFunc_106462: mobile
Stubbed_Function106462:
ret
ret
; 106464