Remove all address comments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
AI_SwitchOrTryItem: ; 38000
|
||||
AI_SwitchOrTryItem:
|
||||
and a
|
||||
|
||||
ld a, [wBattleMode]
|
||||
@@ -38,12 +38,11 @@ AI_SwitchOrTryItem: ; 38000
|
||||
jp nz, SwitchSometimes
|
||||
; fallthrough
|
||||
|
||||
DontSwitch: ; 38041
|
||||
DontSwitch:
|
||||
call AI_TryItem
|
||||
ret
|
||||
; 38045
|
||||
|
||||
SwitchOften: ; 38045
|
||||
SwitchOften:
|
||||
callfar CheckAbleToSwitch
|
||||
ld a, [wEnemySwitchMonParam]
|
||||
and $f0
|
||||
@@ -77,9 +76,8 @@ SwitchOften: ; 38045
|
||||
; In register 'a' is the number (1-6) of the mon to switch to
|
||||
ld [wEnemySwitchMonIndex], a
|
||||
jp AI_TrySwitch
|
||||
; 38083
|
||||
|
||||
SwitchRarely: ; 38083
|
||||
SwitchRarely:
|
||||
callfar CheckAbleToSwitch
|
||||
ld a, [wEnemySwitchMonParam]
|
||||
and $f0
|
||||
@@ -112,9 +110,8 @@ SwitchRarely: ; 38083
|
||||
inc a
|
||||
ld [wEnemySwitchMonIndex], a
|
||||
jp AI_TrySwitch
|
||||
; 380c1
|
||||
|
||||
SwitchSometimes: ; 380c1
|
||||
SwitchSometimes:
|
||||
callfar CheckAbleToSwitch
|
||||
ld a, [wEnemySwitchMonParam]
|
||||
and $f0
|
||||
@@ -147,17 +144,15 @@ SwitchSometimes: ; 380c1
|
||||
inc a
|
||||
ld [wEnemySwitchMonIndex], a
|
||||
jp AI_TrySwitch
|
||||
; 380ff
|
||||
|
||||
|
||||
CheckSubstatusCantRun: ; 380ff
|
||||
CheckSubstatusCantRun:
|
||||
ld a, [wEnemySubStatus5]
|
||||
bit SUBSTATUS_CANT_RUN, a
|
||||
ret
|
||||
; 38105
|
||||
|
||||
|
||||
AI_TryItem: ; 38105
|
||||
AI_TryItem:
|
||||
; items are not allowed in the BattleTower
|
||||
ld a, [wInBattleTowerBattle]
|
||||
and a
|
||||
@@ -244,7 +239,7 @@ AI_TryItem: ; 38105
|
||||
ret
|
||||
|
||||
|
||||
.IsHighestLevel: ; 38170
|
||||
.IsHighestLevel:
|
||||
ld a, [wOTPartyCount]
|
||||
ld d, a
|
||||
ld e, 0
|
||||
@@ -274,10 +269,9 @@ AI_TryItem: ; 38105
|
||||
.yes
|
||||
scf
|
||||
ret
|
||||
; 38196
|
||||
|
||||
|
||||
AI_Items: ; 39196
|
||||
AI_Items:
|
||||
dbw FULL_RESTORE, .FullRestore
|
||||
dbw MAX_POTION, .MaxPotion
|
||||
dbw HYPER_POTION, .HyperPotion
|
||||
@@ -292,16 +286,14 @@ AI_Items: ; 39196
|
||||
dbw X_SPEED, .XSpeed
|
||||
dbw X_SPECIAL, .XSpecial
|
||||
db -1 ; end
|
||||
; 381be
|
||||
|
||||
.FullHeal: ; 381be
|
||||
.FullHeal:
|
||||
call .Status
|
||||
jp c, .DontUse
|
||||
call EnemyUsedFullHeal
|
||||
jp .Use
|
||||
; 381ca
|
||||
|
||||
.Status: ; 381ca (e:41ca)
|
||||
.Status:
|
||||
ld a, [wEnemyMonStatus]
|
||||
and a
|
||||
jp z, .DontUse
|
||||
@@ -332,9 +324,8 @@ AI_Items: ; 39196
|
||||
and 1 << FRZ | SLP
|
||||
jp z, .DontUse
|
||||
jp .Use
|
||||
; 38208
|
||||
|
||||
.FullRestore: ; 38208
|
||||
.FullRestore:
|
||||
call .HealItem
|
||||
jp nc, .UseFullRestore
|
||||
ld a, [bc]
|
||||
@@ -346,15 +337,14 @@ AI_Items: ; 39196
|
||||
.UseFullRestore:
|
||||
call EnemyUsedFullRestore
|
||||
jp .Use
|
||||
; 38220
|
||||
|
||||
.MaxPotion: ; 38220
|
||||
.MaxPotion:
|
||||
call .HealItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedMaxPotion
|
||||
jp .Use
|
||||
|
||||
.HealItem: ; 3822c (e:422c)
|
||||
.HealItem:
|
||||
ld a, [bc]
|
||||
bit CONTEXT_USE_F, a
|
||||
jr nz, .CheckHalfOrQuarterHP
|
||||
@@ -370,7 +360,7 @@ AI_Items: ; 39196
|
||||
jp c, .UseHealItem
|
||||
jp .DontUse
|
||||
|
||||
.CheckQuarterHP: ; 38254 (e:4254)
|
||||
.CheckQuarterHP:
|
||||
callfar AICheckEnemyQuarterHP
|
||||
jp c, .DontUse
|
||||
call Random
|
||||
@@ -378,7 +368,7 @@ AI_Items: ; 39196
|
||||
jp c, .DontUse
|
||||
jr .UseHealItem
|
||||
|
||||
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
|
||||
.CheckHalfOrQuarterHP:
|
||||
callfar AICheckEnemyHalfHP
|
||||
jp c, .DontUse
|
||||
callfar AICheckEnemyQuarterHP
|
||||
@@ -387,33 +377,29 @@ AI_Items: ; 39196
|
||||
cp 20 percent - 1
|
||||
jp nc, .DontUse
|
||||
|
||||
.UseHealItem: ; 38281 (e:4281)
|
||||
.UseHealItem:
|
||||
jp .Use
|
||||
; 38284
|
||||
|
||||
.HyperPotion: ; 38284
|
||||
.HyperPotion:
|
||||
call .HealItem
|
||||
jp c, .DontUse
|
||||
ld b, 200
|
||||
call EnemyUsedHyperPotion
|
||||
jp .Use
|
||||
; 38292 (e:4292)
|
||||
|
||||
.SuperPotion: ; 38292
|
||||
.SuperPotion:
|
||||
call .HealItem
|
||||
jp c, .DontUse
|
||||
ld b, 50
|
||||
call EnemyUsedSuperPotion
|
||||
jp .Use
|
||||
; 382a0
|
||||
|
||||
.Potion: ; 382a0
|
||||
.Potion:
|
||||
call .HealItem
|
||||
jp c, .DontUse
|
||||
ld b, 20
|
||||
call EnemyUsedPotion
|
||||
jp .Use
|
||||
; 382ae
|
||||
|
||||
.asm_382ae ; This appears to be unused
|
||||
callfar AICheckEnemyMaxHP
|
||||
@@ -457,58 +443,50 @@ AI_Items: ; 39196
|
||||
cp 39 percent + 1
|
||||
jp c, .Use
|
||||
jp .DontUse
|
||||
; 382f9
|
||||
|
||||
.XAccuracy: ; 382f9
|
||||
.XAccuracy:
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedXAccuracy
|
||||
jp .Use
|
||||
; 38305
|
||||
|
||||
.GuardSpec: ; 38305
|
||||
.GuardSpec:
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedGuardSpec
|
||||
jp .Use
|
||||
; 38311
|
||||
|
||||
.DireHit: ; 38311
|
||||
.DireHit:
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedDireHit
|
||||
jp .Use
|
||||
; 3831d (e:431d)
|
||||
|
||||
.XAttack: ; 3831d
|
||||
.XAttack:
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedXAttack
|
||||
jp .Use
|
||||
; 38329
|
||||
|
||||
.XDefend: ; 38329
|
||||
.XDefend:
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedXDefend
|
||||
jp .Use
|
||||
; 38335
|
||||
|
||||
.XSpeed: ; 38335
|
||||
.XSpeed:
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedXSpeed
|
||||
jp .Use
|
||||
; 38341
|
||||
|
||||
.XSpecial: ; 38341
|
||||
.XSpecial:
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call EnemyUsedXSpecial
|
||||
jp .Use
|
||||
; 3834d
|
||||
|
||||
.XItem: ; 3834d (e:434d)
|
||||
.XItem:
|
||||
ld a, [wEnemyTurnsTaken]
|
||||
and a
|
||||
jr nz, .notfirstturnout
|
||||
@@ -543,7 +521,7 @@ AI_Items: ; 39196
|
||||
ret
|
||||
|
||||
|
||||
AIUpdateHUD: ; 38387
|
||||
AIUpdateHUD:
|
||||
call UpdateEnemyMonInParty
|
||||
farcall UpdateEnemyHUD
|
||||
ld a, $1
|
||||
@@ -552,29 +530,27 @@ AIUpdateHUD: ; 38387
|
||||
dec [hl]
|
||||
scf
|
||||
ret
|
||||
; 3839a
|
||||
|
||||
AIUsedItemSound: ; 3839a
|
||||
AIUsedItemSound:
|
||||
push de
|
||||
ld de, SFX_FULL_HEAL
|
||||
call PlaySFX
|
||||
pop de
|
||||
ret
|
||||
; 383a3
|
||||
|
||||
|
||||
EnemyUsedFullHeal: ; 383a3 (e:43a3)
|
||||
EnemyUsedFullHeal:
|
||||
call AIUsedItemSound
|
||||
call AI_HealStatus
|
||||
ld a, FULL_HEAL
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
|
||||
EnemyUsedMaxPotion: ; 383ae (e:43ae)
|
||||
EnemyUsedMaxPotion:
|
||||
ld a, MAX_POTION
|
||||
ld [wCurEnemyItem], a
|
||||
jr FullRestoreContinue
|
||||
|
||||
EnemyUsedFullRestore: ; 383b5 (e:43b5)
|
||||
EnemyUsedFullRestore:
|
||||
call AI_HealStatus
|
||||
ld a, FULL_RESTORE
|
||||
ld [wCurEnemyItem], a
|
||||
@@ -583,7 +559,7 @@ EnemyUsedFullRestore: ; 383b5 (e:43b5)
|
||||
xor a
|
||||
ld [wEnemyConfuseCount], a
|
||||
|
||||
FullRestoreContinue: ; 383c6
|
||||
FullRestoreContinue:
|
||||
ld de, wCurHPAnimOldHP
|
||||
ld hl, wEnemyMonHP + 1
|
||||
ld a, [hld]
|
||||
@@ -603,23 +579,22 @@ FullRestoreContinue: ; 383c6
|
||||
ld [wCurHPAnimMaxHP + 1], a
|
||||
ld [wEnemyMonHP], a
|
||||
jr EnemyPotionFinish
|
||||
; 383e8 (e:43e8)
|
||||
|
||||
EnemyUsedPotion: ; 383e8
|
||||
EnemyUsedPotion:
|
||||
ld a, POTION
|
||||
ld b, 20
|
||||
jr EnemyPotionContinue
|
||||
|
||||
EnemyUsedSuperPotion: ; 383ee
|
||||
EnemyUsedSuperPotion:
|
||||
ld a, SUPER_POTION
|
||||
ld b, 50
|
||||
jr EnemyPotionContinue
|
||||
|
||||
EnemyUsedHyperPotion: ; 383f4 (e:43f4)
|
||||
EnemyUsedHyperPotion:
|
||||
ld a, HYPER_POTION
|
||||
ld b, 200
|
||||
|
||||
EnemyPotionContinue: ; 383f8
|
||||
EnemyPotionContinue:
|
||||
ld [wCurEnemyItem], a
|
||||
ld hl, wEnemyMonHP + 1
|
||||
ld a, [hl]
|
||||
@@ -658,7 +633,7 @@ EnemyPotionContinue: ; 383f8
|
||||
ld [hl], a
|
||||
ld [wCurHPAnimNewHP + 1], a
|
||||
|
||||
EnemyPotionFinish: ; 38436
|
||||
EnemyPotionFinish:
|
||||
call PrintText_UsedItemOn
|
||||
hlcoord 2, 2
|
||||
xor a
|
||||
@@ -668,7 +643,7 @@ EnemyPotionFinish: ; 38436
|
||||
jp AIUpdateHUD
|
||||
|
||||
|
||||
AI_TrySwitch: ; 3844b
|
||||
AI_TrySwitch:
|
||||
; Determine whether the AI can switch based on how many Pokemon are still alive.
|
||||
; If it can switch, it will.
|
||||
ld a, [wOTPartyCount]
|
||||
@@ -695,9 +670,8 @@ AI_TrySwitch: ; 3844b
|
||||
jp nc, AI_Switch
|
||||
and a
|
||||
ret
|
||||
; 3846c
|
||||
|
||||
AI_Switch: ; 3846c
|
||||
AI_Switch:
|
||||
ld a, $1
|
||||
ld [wEnemyIsSwitching], a
|
||||
ld [wEnemyGoesFirst], a
|
||||
@@ -739,21 +713,18 @@ AI_Switch: ; 3846c
|
||||
ret nz
|
||||
scf
|
||||
ret
|
||||
; 384d0
|
||||
|
||||
TextJump_EnemyWithdrew: ; 384d0
|
||||
TextJump_EnemyWithdrew:
|
||||
text_jump Text_EnemyWithdrew
|
||||
db "@"
|
||||
; 384d5
|
||||
|
||||
Function384d5: ; This appears to be unused
|
||||
call AIUsedItemSound
|
||||
call AI_HealStatus
|
||||
ld a, FULL_HEAL_RED ; X_SPEED
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 384e0
|
||||
|
||||
AI_HealStatus: ; 384e0
|
||||
AI_HealStatus:
|
||||
ld a, [wCurOTMon]
|
||||
ld hl, wOTPartyMon1Status
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
@@ -768,31 +739,27 @@ AI_HealStatus: ; 384e0
|
||||
ld hl, wEnemySubStatus5
|
||||
res SUBSTATUS_TOXIC, [hl]
|
||||
ret
|
||||
; 384f7
|
||||
|
||||
EnemyUsedXAccuracy: ; 384f7
|
||||
EnemyUsedXAccuracy:
|
||||
call AIUsedItemSound
|
||||
ld hl, wEnemySubStatus4
|
||||
set SUBSTATUS_X_ACCURACY, [hl]
|
||||
ld a, X_ACCURACY
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 38504
|
||||
|
||||
EnemyUsedGuardSpec: ; 38504
|
||||
EnemyUsedGuardSpec:
|
||||
call AIUsedItemSound
|
||||
ld hl, wEnemySubStatus4
|
||||
set SUBSTATUS_MIST, [hl]
|
||||
ld a, GUARD_SPEC
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 38511
|
||||
|
||||
EnemyUsedDireHit: ; 38511
|
||||
EnemyUsedDireHit:
|
||||
call AIUsedItemSound
|
||||
ld hl, wEnemySubStatus4
|
||||
set SUBSTATUS_FOCUS_ENERGY, [hl]
|
||||
ld a, DIRE_HIT
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 3851e
|
||||
|
||||
Function3851e: ; This appears to be unused
|
||||
ld [hDivisor], a
|
||||
@@ -818,27 +785,23 @@ Function3851e: ; This appears to be unused
|
||||
ld a, e
|
||||
sub c
|
||||
ret
|
||||
; 38541
|
||||
|
||||
EnemyUsedXAttack: ; 38541
|
||||
EnemyUsedXAttack:
|
||||
ld b, ATTACK
|
||||
ld a, X_ATTACK
|
||||
jr EnemyUsedXItem
|
||||
; 38547
|
||||
|
||||
EnemyUsedXDefend: ; 38547
|
||||
EnemyUsedXDefend:
|
||||
ld b, DEFENSE
|
||||
ld a, X_DEFEND
|
||||
jr EnemyUsedXItem
|
||||
; 3854d
|
||||
|
||||
EnemyUsedXSpeed: ; 3854d
|
||||
EnemyUsedXSpeed:
|
||||
ld b, SPEED
|
||||
ld a, X_SPEED
|
||||
jr EnemyUsedXItem
|
||||
; 38553
|
||||
|
||||
EnemyUsedXSpecial: ; 38553
|
||||
EnemyUsedXSpecial:
|
||||
ld b, SP_ATTACK
|
||||
ld a, X_SPECIAL
|
||||
|
||||
@@ -853,18 +816,16 @@ EnemyUsedXItem:
|
||||
pop bc
|
||||
farcall CheckIfStatCanBeRaised
|
||||
jp AIUpdateHUD
|
||||
; 38568
|
||||
|
||||
|
||||
; Parameter
|
||||
; a = ITEM_CONSTANT
|
||||
PrintText_UsedItemOn_AND_AIUpdateHUD: ; 38568
|
||||
PrintText_UsedItemOn_AND_AIUpdateHUD:
|
||||
ld [wCurEnemyItem], a
|
||||
call PrintText_UsedItemOn
|
||||
jp AIUpdateHUD
|
||||
; 38571
|
||||
|
||||
PrintText_UsedItemOn: ; 38571
|
||||
PrintText_UsedItemOn:
|
||||
ld a, [wCurEnemyItem]
|
||||
ld [wd265], a
|
||||
call GetItemName
|
||||
@@ -874,9 +835,7 @@ PrintText_UsedItemOn: ; 38571
|
||||
call CopyBytes
|
||||
ld hl, TextJump_EnemyUsedOn
|
||||
jp PrintText
|
||||
; 3858c
|
||||
|
||||
TextJump_EnemyUsedOn: ; 3858c
|
||||
TextJump_EnemyUsedOn:
|
||||
text_jump Text_EnemyUsedOn
|
||||
db "@"
|
||||
; 38591
|
||||
|
@@ -1,4 +1,4 @@
|
||||
AIChooseMove: ; 440ce
|
||||
AIChooseMove:
|
||||
; Score each move in wEnemyMonMoves starting from wBuffer1. Lower is better.
|
||||
; Pick the move with the lowest score.
|
||||
|
||||
@@ -198,10 +198,9 @@ AIChooseMove: ; 440ce
|
||||
ld a, c
|
||||
ld [wCurEnemyMoveNum], a
|
||||
ret
|
||||
; 441af
|
||||
|
||||
|
||||
AIScoringPointers: ; 441af
|
||||
AIScoringPointers:
|
||||
; entries correspond to AI_* constants
|
||||
dw AI_Basic
|
||||
dw AI_Setup
|
||||
@@ -219,4 +218,3 @@ AIScoringPointers: ; 441af
|
||||
dw AI_None
|
||||
dw AI_None
|
||||
dw AI_None
|
||||
; 441cf
|
||||
|
@@ -1,4 +1,4 @@
|
||||
AI_Redundant: ; 2c41a
|
||||
AI_Redundant:
|
||||
; Check if move effect c will fail because it's already been used.
|
||||
; Return z if the move is a good choice.
|
||||
; Return nz if the move is a bad choice.
|
||||
@@ -13,7 +13,7 @@ AI_Redundant: ; 2c41a
|
||||
ld l, a
|
||||
jp hl
|
||||
|
||||
.Moves: ; 2c42c
|
||||
.Moves:
|
||||
dbw EFFECT_DREAM_EATER, .DreamEater
|
||||
dbw EFFECT_HEAL, .Heal
|
||||
dbw EFFECT_LIGHT_SCREEN, .LightScreen
|
||||
@@ -46,22 +46,22 @@ AI_Redundant: ; 2c41a
|
||||
dbw EFFECT_FUTURE_SIGHT, .FutureSight
|
||||
db -1
|
||||
|
||||
.LightScreen: ; 2c487
|
||||
.LightScreen:
|
||||
ld a, [wEnemyScreens]
|
||||
bit SCREENS_LIGHT_SCREEN, a
|
||||
ret
|
||||
|
||||
.Mist: ; 2c48d
|
||||
.Mist:
|
||||
ld a, [wEnemySubStatus4]
|
||||
bit SUBSTATUS_MIST, a
|
||||
ret
|
||||
|
||||
.FocusEnergy: ; 2c493
|
||||
.FocusEnergy:
|
||||
ld a, [wEnemySubStatus4]
|
||||
bit SUBSTATUS_FOCUS_ENERGY, a
|
||||
ret
|
||||
|
||||
.Confuse: ; 2c499
|
||||
.Confuse:
|
||||
ld a, [wPlayerSubStatus3]
|
||||
bit SUBSTATUS_CONFUSED, a
|
||||
ret nz
|
||||
@@ -69,49 +69,49 @@ AI_Redundant: ; 2c41a
|
||||
bit SCREENS_SAFEGUARD, a
|
||||
ret
|
||||
|
||||
.Transform: ; 2c4a5
|
||||
.Transform:
|
||||
ld a, [wEnemySubStatus5]
|
||||
bit SUBSTATUS_TRANSFORMED, a
|
||||
ret
|
||||
|
||||
.Reflect: ; 2c4ab
|
||||
.Reflect:
|
||||
ld a, [wEnemyScreens]
|
||||
bit SCREENS_REFLECT, a
|
||||
ret
|
||||
|
||||
.Substitute: ; 2c4b1
|
||||
.Substitute:
|
||||
ld a, [wEnemySubStatus4]
|
||||
bit SUBSTATUS_SUBSTITUTE, a
|
||||
ret
|
||||
|
||||
.LeechSeed: ; 2c4b7
|
||||
.LeechSeed:
|
||||
ld a, [wPlayerSubStatus4]
|
||||
bit SUBSTATUS_LEECH_SEED, a
|
||||
ret
|
||||
|
||||
.Disable: ; 2c4bd
|
||||
.Disable:
|
||||
ld a, [wPlayerDisableCount]
|
||||
and a
|
||||
ret
|
||||
|
||||
.Encore: ; 2c4c2
|
||||
.Encore:
|
||||
ld a, [wPlayerSubStatus5]
|
||||
bit SUBSTATUS_ENCORED, a
|
||||
ret
|
||||
|
||||
.Snore:
|
||||
.SleepTalk: ; 2c4c8
|
||||
.SleepTalk:
|
||||
ld a, [wEnemyMonStatus]
|
||||
and SLP
|
||||
jr z, .Redundant
|
||||
jr .NotRedundant
|
||||
|
||||
.MeanLook: ; 2c4d1
|
||||
.MeanLook:
|
||||
ld a, [wEnemySubStatus5]
|
||||
bit SUBSTATUS_CANT_RUN, a
|
||||
ret
|
||||
|
||||
.Nightmare: ; 2c4d7
|
||||
.Nightmare:
|
||||
ld a, [wBattleMonStatus]
|
||||
and a
|
||||
jr z, .Redundant
|
||||
@@ -119,63 +119,63 @@ AI_Redundant: ; 2c41a
|
||||
bit SUBSTATUS_NIGHTMARE, a
|
||||
ret
|
||||
|
||||
.Spikes: ; 2c4e3
|
||||
.Spikes:
|
||||
ld a, [wPlayerScreens]
|
||||
bit SCREENS_SPIKES, a
|
||||
ret
|
||||
|
||||
.Foresight: ; 2c4e9
|
||||
.Foresight:
|
||||
ld a, [wPlayerSubStatus1]
|
||||
bit SUBSTATUS_IDENTIFIED, a
|
||||
ret
|
||||
|
||||
.PerishSong: ; 2c4ef
|
||||
.PerishSong:
|
||||
ld a, [wPlayerSubStatus1]
|
||||
bit SUBSTATUS_PERISH, a
|
||||
ret
|
||||
|
||||
.Sandstorm: ; 2c4f5
|
||||
.Sandstorm:
|
||||
ld a, [wBattleWeather]
|
||||
cp WEATHER_SANDSTORM
|
||||
jr z, .Redundant
|
||||
jr .NotRedundant
|
||||
|
||||
.Attract: ; 2c4fe
|
||||
.Attract:
|
||||
farcall CheckOppositeGender
|
||||
jr c, .Redundant
|
||||
ld a, [wPlayerSubStatus1]
|
||||
bit SUBSTATUS_IN_LOVE, a
|
||||
ret
|
||||
|
||||
.Safeguard: ; 2c50c
|
||||
.Safeguard:
|
||||
ld a, [wEnemyScreens]
|
||||
bit SCREENS_SAFEGUARD, a
|
||||
ret
|
||||
|
||||
.RainDance: ; 2c512
|
||||
.RainDance:
|
||||
ld a, [wBattleWeather]
|
||||
cp WEATHER_RAIN
|
||||
jr z, .Redundant
|
||||
jr .NotRedundant
|
||||
|
||||
.SunnyDay: ; 2c51b
|
||||
.SunnyDay:
|
||||
ld a, [wBattleWeather]
|
||||
cp WEATHER_SUN
|
||||
jr z, .Redundant
|
||||
jr .NotRedundant
|
||||
|
||||
.DreamEater: ; 2c524
|
||||
.DreamEater:
|
||||
ld a, [wBattleMonStatus]
|
||||
and SLP
|
||||
jr z, .Redundant
|
||||
jr .NotRedundant
|
||||
|
||||
.Swagger: ; 2c52d
|
||||
.Swagger:
|
||||
ld a, [wPlayerSubStatus3]
|
||||
bit SUBSTATUS_CONFUSED, a
|
||||
ret
|
||||
|
||||
.FutureSight: ; 2c533
|
||||
.FutureSight:
|
||||
ld a, [wEnemyScreens]
|
||||
bit 5, a
|
||||
ret
|
||||
@@ -183,16 +183,16 @@ AI_Redundant: ; 2c41a
|
||||
.Heal:
|
||||
.MorningSun:
|
||||
.Synthesis:
|
||||
.Moonlight: ; 2c539
|
||||
.Moonlight:
|
||||
farcall AICheckEnemyMaxHP
|
||||
jr nc, .NotRedundant
|
||||
|
||||
.Teleport:
|
||||
.Redundant: ; 2c541
|
||||
.Redundant:
|
||||
ld a, 1
|
||||
and a
|
||||
ret
|
||||
|
||||
.NotRedundant: ; 2c545
|
||||
.NotRedundant:
|
||||
xor a
|
||||
ret
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
CheckPlayerMoveTypeMatchups: ; 3484e
|
||||
CheckPlayerMoveTypeMatchups:
|
||||
; Check how well the moves you've already used
|
||||
; fare against the enemy's Pokemon. Used to
|
||||
; score a potential switch.
|
||||
@@ -95,10 +95,9 @@ CheckPlayerMoveTypeMatchups: ; 3484e
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 348de
|
||||
|
||||
|
||||
.CheckEnemyMoveMatchups: ; 348de
|
||||
.CheckEnemyMoveMatchups:
|
||||
ld de, wEnemyMonMoves
|
||||
ld b, NUM_MOVES + 1
|
||||
ld c, 0
|
||||
@@ -163,21 +162,19 @@ CheckPlayerMoveTypeMatchups: ; 3484e
|
||||
|
||||
.doubledown
|
||||
call .DecreaseScore
|
||||
.DecreaseScore: ; 34931
|
||||
.DecreaseScore:
|
||||
ld a, [wEnemyAISwitchScore]
|
||||
dec a
|
||||
ld [wEnemyAISwitchScore], a
|
||||
ret
|
||||
; 34939
|
||||
|
||||
.IncreaseScore: ; 34939
|
||||
.IncreaseScore:
|
||||
ld a, [wEnemyAISwitchScore]
|
||||
inc a
|
||||
ld [wEnemyAISwitchScore], a
|
||||
ret
|
||||
; 34941
|
||||
|
||||
CheckAbleToSwitch: ; 34941
|
||||
CheckAbleToSwitch:
|
||||
xor a
|
||||
ld [wEnemySwitchMonParam], a
|
||||
call FindAliveEnemyMons
|
||||
@@ -292,10 +289,9 @@ CheckAbleToSwitch: ; 34941
|
||||
add $10
|
||||
ld [wEnemySwitchMonParam], a
|
||||
ret
|
||||
; 349f4
|
||||
|
||||
|
||||
FindAliveEnemyMons: ; 349f4
|
||||
FindAliveEnemyMons:
|
||||
ld a, [wOTPartyCount]
|
||||
cp 2
|
||||
jr c, .only_one
|
||||
@@ -344,10 +340,9 @@ FindAliveEnemyMons: ; 349f4
|
||||
.more_than_one
|
||||
and a
|
||||
ret
|
||||
; 34a2a
|
||||
|
||||
|
||||
FindEnemyMonsImmuneToLastCounterMove: ; 34a2a
|
||||
FindEnemyMonsImmuneToLastCounterMove:
|
||||
ld hl, wOTPartyMon1
|
||||
ld a, [wOTPartyCount]
|
||||
ld b, a
|
||||
@@ -412,10 +407,9 @@ FindEnemyMonsImmuneToLastCounterMove: ; 34a2a
|
||||
inc d
|
||||
srl c
|
||||
jr .loop
|
||||
; 34a85
|
||||
|
||||
|
||||
FindAliveEnemyMonsWithASuperEffectiveMove: ; 34a85
|
||||
FindAliveEnemyMonsWithASuperEffectiveMove:
|
||||
push bc
|
||||
ld a, [wOTPartyCount]
|
||||
ld e, a
|
||||
@@ -445,7 +439,7 @@ FindAliveEnemyMonsWithASuperEffectiveMove: ; 34a85
|
||||
|
||||
and c
|
||||
ld c, a
|
||||
FindEnemyMonsWithASuperEffectiveMove: ; 34aa7
|
||||
FindEnemyMonsWithASuperEffectiveMove:
|
||||
|
||||
ld a, -1
|
||||
ld [wEnemyAISwitchScore], a
|
||||
@@ -551,10 +545,9 @@ FindEnemyMonsWithASuperEffectiveMove: ; 34aa7
|
||||
ld [wEnemyAISwitchScore], a
|
||||
pop bc
|
||||
ret
|
||||
; 34b20
|
||||
|
||||
|
||||
FindEnemyMonsThatResistPlayer: ; 34b20
|
||||
FindEnemyMonsThatResistPlayer:
|
||||
push bc
|
||||
ld hl, wOTPartySpecies
|
||||
ld b, 1 << (PARTY_LENGTH - 1)
|
||||
@@ -613,10 +606,9 @@ FindEnemyMonsThatResistPlayer: ; 34b20
|
||||
and c
|
||||
ld c, a
|
||||
ret
|
||||
; 34b77
|
||||
|
||||
|
||||
FindEnemyMonsWithAtLeastQuarterMaxHP: ; 34b77
|
||||
FindEnemyMonsWithAtLeastQuarterMaxHP:
|
||||
push bc
|
||||
ld de, wOTPartySpecies
|
||||
ld b, 1 << (PARTY_LENGTH - 1)
|
||||
@@ -669,4 +661,3 @@ FindEnemyMonsWithAtLeastQuarterMaxHP: ; 34b77
|
||||
and c
|
||||
ld c, a
|
||||
ret
|
||||
; 34bb1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
_AnimateHPBar: ; d627
|
||||
_AnimateHPBar:
|
||||
call .IsMaximumMoreThan48Pixels
|
||||
jr c, .MoreThan48Pixels
|
||||
call .ComputePixels
|
||||
@@ -38,9 +38,8 @@ _AnimateHPBar: ; d627
|
||||
pop af
|
||||
jr nc, .LongAnimLoop
|
||||
ret
|
||||
; d65f
|
||||
|
||||
.IsMaximumMoreThan48Pixels: ; d65f
|
||||
.IsMaximumMoreThan48Pixels:
|
||||
ld a, [wCurHPAnimMaxHP + 1]
|
||||
and a
|
||||
jr nz, .player
|
||||
@@ -53,9 +52,8 @@ _AnimateHPBar: ; d627
|
||||
.player
|
||||
scf
|
||||
ret
|
||||
; d670
|
||||
|
||||
.ComputePixels: ; d670
|
||||
.ComputePixels:
|
||||
push hl
|
||||
ld hl, wCurHPAnimMaxHP
|
||||
ld a, [hli]
|
||||
@@ -127,9 +125,8 @@ _AnimateHPBar: ; d627
|
||||
ld a, e
|
||||
ld [wCurHPAnimDeltaHP + 1], a
|
||||
ret
|
||||
; d6e2
|
||||
|
||||
ShortAnim_UpdateVariables: ; d6e2
|
||||
ShortAnim_UpdateVariables:
|
||||
ld hl, wCurHPBarPixels
|
||||
ld a, [wNewHPBarPixels]
|
||||
cp [hl]
|
||||
@@ -144,9 +141,8 @@ ShortAnim_UpdateVariables: ; d6e2
|
||||
call ShortHPBar_CalcPixelFrame
|
||||
and a
|
||||
ret
|
||||
; d6f5
|
||||
|
||||
LongAnim_UpdateVariables: ; d6f5
|
||||
LongAnim_UpdateVariables:
|
||||
.loop
|
||||
ld hl, wCurHPAnimOldHP
|
||||
ld a, [hli]
|
||||
@@ -199,9 +195,8 @@ LongAnim_UpdateVariables: ; d6f5
|
||||
ld [hl], a
|
||||
and a
|
||||
ret
|
||||
; d730
|
||||
|
||||
ShortHPBarAnim_UpdateTiles: ; d730
|
||||
ShortHPBarAnim_UpdateTiles:
|
||||
call HPBarAnim_UpdateHPRemaining
|
||||
ld d, HP_BAR_LENGTH
|
||||
ld a, [wWhichHPBar]
|
||||
@@ -215,9 +210,8 @@ ShortHPBarAnim_UpdateTiles: ; d730
|
||||
pop de
|
||||
call HPBarAnim_PaletteUpdate
|
||||
ret
|
||||
; d749
|
||||
|
||||
LongHPBarAnim_UpdateTiles: ; d749
|
||||
LongHPBarAnim_UpdateTiles:
|
||||
call HPBarAnim_UpdateHPRemaining
|
||||
ld a, [wCurHPAnimOldHP]
|
||||
ld c, a
|
||||
@@ -238,9 +232,8 @@ LongHPBarAnim_UpdateTiles: ; d749
|
||||
pop de
|
||||
call HPBarAnim_PaletteUpdate
|
||||
ret
|
||||
; d771
|
||||
|
||||
HPBarAnim_RedrawHPBar: ; d771
|
||||
HPBarAnim_RedrawHPBar:
|
||||
ld a, [wWhichHPBar]
|
||||
cp $2
|
||||
jr nz, .skip
|
||||
@@ -253,9 +246,8 @@ HPBarAnim_RedrawHPBar: ; d771
|
||||
.skip
|
||||
call DrawBattleHPBar
|
||||
ret
|
||||
; d784
|
||||
|
||||
HPBarAnim_UpdateHPRemaining: ; d784
|
||||
HPBarAnim_UpdateHPRemaining:
|
||||
ld a, [wWhichHPBar]
|
||||
and a
|
||||
ret z
|
||||
@@ -283,9 +275,8 @@ HPBarAnim_UpdateHPRemaining: ; d784
|
||||
call PrintNum
|
||||
pop hl
|
||||
ret
|
||||
; d7b4
|
||||
|
||||
HPBarAnim_PaletteUpdate: ; d7b4
|
||||
HPBarAnim_PaletteUpdate:
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
ret z
|
||||
@@ -295,9 +286,8 @@ HPBarAnim_PaletteUpdate: ; d7b4
|
||||
ld c, a
|
||||
farcall ApplyHPBarPals
|
||||
ret
|
||||
; d7c9
|
||||
|
||||
HPBarAnim_BGMapUpdate: ; d7c9
|
||||
HPBarAnim_BGMapUpdate:
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr nz, .cgb
|
||||
@@ -369,9 +359,8 @@ HPBarAnim_BGMapUpdate: ; d7c9
|
||||
ld [hBGMapThird], a
|
||||
call DelayFrame
|
||||
ret
|
||||
; d839
|
||||
|
||||
ShortHPBar_CalcPixelFrame: ; d839
|
||||
ShortHPBar_CalcPixelFrame:
|
||||
ld a, [wCurHPAnimMaxHP]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
@@ -433,4 +422,3 @@ ShortHPBar_CalcPixelFrame: ; d839
|
||||
ld a, [wCurHPAnimMaxHP]
|
||||
ld [wCurHPAnimOldHP], a
|
||||
ret
|
||||
; d88c
|
||||
|
@@ -6,7 +6,7 @@ BATTLETRANSITION_NO_CAVE_STRONGER EQU $18
|
||||
BATTLETRANSITION_FINISH EQU $20
|
||||
BATTLETRANSITION_END EQU $80
|
||||
|
||||
DoBattleTransition: ; 8c20f
|
||||
DoBattleTransition:
|
||||
call .InitGFX
|
||||
ld a, [rBGP]
|
||||
ld [wBGP], a
|
||||
@@ -58,9 +58,8 @@ DoBattleTransition: ; 8c20f
|
||||
ld [hVBlank], a
|
||||
call DelayFrame
|
||||
ret
|
||||
; 8c26d
|
||||
|
||||
.InitGFX: ; 8c26d
|
||||
.InitGFX:
|
||||
ld a, [wLinkMode]
|
||||
cp LINK_MOBILE
|
||||
jr z, .mobile
|
||||
@@ -87,14 +86,12 @@ DoBattleTransition: ; 8c20f
|
||||
ld [hl], a
|
||||
call WipeLYOverrides
|
||||
ret
|
||||
; 8c2a0
|
||||
|
||||
.NonMobile_LoadPokeballTiles: ; 8c2a0
|
||||
.NonMobile_LoadPokeballTiles:
|
||||
call LoadTrainerBattlePokeballTiles
|
||||
hlbgcoord 0, 0
|
||||
call ConvertTrainerBattlePokeballTilesTo2bpp
|
||||
ret
|
||||
; 8c2aa
|
||||
|
||||
LoadTrainerBattlePokeballTiles:
|
||||
; Load the tiles used in the Pokeball Graphic that fills the screen
|
||||
@@ -119,9 +116,8 @@ LoadTrainerBattlePokeballTiles:
|
||||
pop af
|
||||
ld [rVBK], a
|
||||
ret
|
||||
; 8c2cf
|
||||
|
||||
ConvertTrainerBattlePokeballTilesTo2bpp: ; 8c2cf
|
||||
ConvertTrainerBattlePokeballTilesTo2bpp:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wDecompressScratch)
|
||||
@@ -146,17 +142,15 @@ ConvertTrainerBattlePokeballTilesTo2bpp: ; 8c2cf
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 8c2f4
|
||||
|
||||
TrainerBattlePokeballTiles: ; 8c2f4
|
||||
TrainerBattlePokeballTiles:
|
||||
INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
|
||||
|
||||
|
||||
BattleTransitionJumptable: ; 8c314
|
||||
BattleTransitionJumptable:
|
||||
jumptable .Jumptable, wJumptableIndex
|
||||
; 8c323
|
||||
|
||||
.Jumptable ; 8c323 (23:4323)
|
||||
.Jumptable
|
||||
dw StartTrainerBattle_DetermineWhichAnimation ; 00
|
||||
|
||||
; BATTLETRANSITION_CAVE
|
||||
@@ -213,7 +207,7 @@ BattleTransitionJumptable: ; 8c314
|
||||
TRANS_STRONGER_F EQU 0 ; bit set in TRANS_CAVE_STRONGER and TRANS_NO_CAVE_STRONGER
|
||||
TRANS_NO_CAVE_F EQU 1 ; bit set in TRANS_NO_CAVE and TRANS_NO_CAVE_STRONGER
|
||||
|
||||
StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
|
||||
StartTrainerBattle_DetermineWhichAnimation:
|
||||
; The screen flashes a different number of times depending on the level of
|
||||
; your lead Pokemon relative to the opponent's.
|
||||
; BUG: wBattleMonLevel and wEnemyMonLevel are not set at this point, so whatever
|
||||
@@ -240,41 +234,39 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
|
||||
ld a, [hl]
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; 8c38f (23:438f)
|
||||
|
||||
.StartingPoints: ; 8c38f
|
||||
.StartingPoints:
|
||||
; entries correspond to TRANS_* constants
|
||||
db BATTLETRANSITION_CAVE
|
||||
db BATTLETRANSITION_CAVE_STRONGER
|
||||
db BATTLETRANSITION_NO_CAVE
|
||||
db BATTLETRANSITION_NO_CAVE_STRONGER
|
||||
; 8c393
|
||||
|
||||
StartTrainerBattle_Finish: ; 8c393 (23:4393)
|
||||
StartTrainerBattle_Finish:
|
||||
call ClearSprites
|
||||
ld a, BATTLETRANSITION_END
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
StartTrainerBattle_NextScene: ; 8c39c (23:439c)
|
||||
StartTrainerBattle_NextScene:
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
StartTrainerBattle_SetUpBGMap: ; 8c3a1 (23:43a1)
|
||||
StartTrainerBattle_SetUpBGMap:
|
||||
call StartTrainerBattle_NextScene
|
||||
xor a
|
||||
ld [wcf64], a
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
|
||||
StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
|
||||
StartTrainerBattle_Flash:
|
||||
call .DoFlashAnimation
|
||||
ret nc
|
||||
call StartTrainerBattle_NextScene
|
||||
ret
|
||||
|
||||
.DoFlashAnimation: ; 8c3b3 (23:43b3)
|
||||
.DoFlashAnimation:
|
||||
ld a, [wTimeOfDayPalset]
|
||||
cp %11111111 ; dark cave
|
||||
jr z, .done
|
||||
@@ -299,9 +291,8 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
|
||||
ld [wcf64], a
|
||||
scf
|
||||
ret
|
||||
; 8c3db (23:43db)
|
||||
|
||||
.pals ; 8c3db
|
||||
.pals
|
||||
db %11111001 ; 3321
|
||||
db %11111110 ; 3332
|
||||
db %11111111 ; 3333
|
||||
@@ -315,9 +306,8 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
|
||||
db %10010000 ; 2100
|
||||
db %11100100 ; 3210
|
||||
db %00000001 ; 0001
|
||||
; 8c3e8
|
||||
|
||||
StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
||||
StartTrainerBattle_SetUpForWavyOutro:
|
||||
farcall Function5602
|
||||
ld a, BANK(wLYOverrides)
|
||||
ld [rSVBK], a
|
||||
@@ -335,7 +325,7 @@ StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
||||
ld [wcf65], a
|
||||
ret
|
||||
|
||||
StartTrainerBattle_SineWave: ; 8c408 (23:4408)
|
||||
StartTrainerBattle_SineWave:
|
||||
ld a, [wcf64]
|
||||
cp $60
|
||||
jr nc, .end
|
||||
@@ -347,7 +337,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408)
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
.DoSineWave: ; 8c419 (23:4419)
|
||||
.DoSineWave:
|
||||
ld hl, wcf65
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
@@ -375,7 +365,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408)
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
|
||||
StartTrainerBattle_SetUpForSpinOutro:
|
||||
farcall Function5602
|
||||
ld a, BANK(wLYOverrides)
|
||||
ld [rSVBK], a
|
||||
@@ -384,7 +374,7 @@ StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
|
||||
ld [wcf64], a
|
||||
ret
|
||||
|
||||
StartTrainerBattle_SpinToBlack: ; 8c44f (23:444f)
|
||||
StartTrainerBattle_SpinToBlack:
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld a, [wcf64]
|
||||
@@ -418,7 +408,6 @@ endr
|
||||
ld a, BATTLETRANSITION_FINISH
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; 8c490 (23:4490)
|
||||
|
||||
; quadrants
|
||||
const_def
|
||||
@@ -431,7 +420,7 @@ endr
|
||||
RIGHT_QUADRANT_F EQU 0 ; bit set in UPPER_RIGHT and LOWER_RIGHT
|
||||
LOWER_QUADRANT_F EQU 1 ; bit set in LOWER_LEFT and LOWER_RIGHT
|
||||
|
||||
.spintable ; 8c490
|
||||
.spintable
|
||||
spintable_entry: MACRO
|
||||
db \1
|
||||
dw .wedge\2
|
||||
@@ -458,9 +447,8 @@ ENDM
|
||||
spintable_entry LOWER_LEFT, 2, 0, 14
|
||||
spintable_entry LOWER_LEFT, 1, 1, 11
|
||||
db -1
|
||||
; 8c4f5
|
||||
|
||||
.load ; 8c4f5 (23:44f5)
|
||||
.load
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
@@ -512,16 +500,14 @@ ENDM
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
jr .loop
|
||||
; 8c538 (23:4538)
|
||||
|
||||
.wedge1 db 2, 3, 5, 4, 9, -1
|
||||
.wedge2 db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1
|
||||
.wedge3 db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1
|
||||
.wedge4 db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1
|
||||
.wedge5 db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
|
||||
; 8c578
|
||||
|
||||
StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
|
||||
StartTrainerBattle_SetUpForRandomScatterOutro:
|
||||
farcall Function5602
|
||||
ld a, BANK(wLYOverrides)
|
||||
ld [rSVBK], a
|
||||
@@ -532,7 +518,7 @@ StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
|
||||
StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
|
||||
StartTrainerBattle_SpeckleToBlack:
|
||||
ld hl, wcf64
|
||||
ld a, [hl]
|
||||
and a
|
||||
@@ -559,7 +545,7 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
.BlackOutRandomTile: ; 8c5b8 (23:45b8)
|
||||
.BlackOutRandomTile:
|
||||
.y_loop
|
||||
call Random
|
||||
cp SCREEN_HEIGHT
|
||||
@@ -590,7 +576,7 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
|
||||
ld [hl], $ff
|
||||
ret
|
||||
|
||||
StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
||||
StartTrainerBattle_LoadPokeBallGraphics:
|
||||
ld a, [wOtherTrainerClass]
|
||||
and a
|
||||
jp z, .nextscene ; don't need to be here if wild
|
||||
@@ -690,11 +676,11 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
||||
call DelayFrame
|
||||
call BattleStart_CopyTilemapAtOnce
|
||||
|
||||
.nextscene ; 8c673 (23:4673)
|
||||
.nextscene
|
||||
call StartTrainerBattle_NextScene
|
||||
ret
|
||||
|
||||
.copypals ; 8c677 (23:4677)
|
||||
.copypals
|
||||
ld de, wBGPals1 palette PAL_BG_TEXT
|
||||
call .copy
|
||||
ld de, wBGPals2 palette PAL_BG_TEXT
|
||||
@@ -707,21 +693,18 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
||||
call .copy
|
||||
ld de, wOBPals2 palette PAL_OW_ROCK
|
||||
|
||||
.copy ; 8c698 (23:4698)
|
||||
.copy
|
||||
push hl
|
||||
ld bc, 1 palettes
|
||||
call CopyBytes
|
||||
pop hl
|
||||
ret
|
||||
; 8c6a1 (23:46a1)
|
||||
|
||||
.daypals ; 8c6a1
|
||||
.daypals
|
||||
INCLUDE "gfx/overworld/trainer_battle_day.pal"
|
||||
; 8c6a9
|
||||
|
||||
.nightpals ; 8c6a9
|
||||
.nightpals
|
||||
INCLUDE "gfx/overworld/trainer_battle_nite.pal"
|
||||
; 8c6b1
|
||||
|
||||
.loadpokeballgfx
|
||||
ld a, [wOtherTrainerClass]
|
||||
@@ -746,7 +729,7 @@ PokeBallTransition:
|
||||
db %00001111, %11110000
|
||||
db %00000011, %11000000
|
||||
|
||||
WipeLYOverrides: ; 8c6d8
|
||||
WipeLYOverrides:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wLYOverrides)
|
||||
@@ -760,9 +743,8 @@ WipeLYOverrides: ; 8c6d8
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 8c6ef
|
||||
|
||||
.wipe ; 8c6ef
|
||||
.wipe
|
||||
xor a
|
||||
ld c, SCREEN_HEIGHT_PX
|
||||
.loop
|
||||
@@ -770,14 +752,12 @@ WipeLYOverrides: ; 8c6d8
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 8c6f7
|
||||
|
||||
|
||||
StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
|
||||
StartTrainerBattle_DrawSineWave:
|
||||
calc_sine_wave
|
||||
; 8c768
|
||||
|
||||
StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
|
||||
StartTrainerBattle_ZoomToBlack:
|
||||
farcall Function5602
|
||||
ld de, .boxes
|
||||
|
||||
@@ -806,9 +786,8 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
|
||||
ld a, BATTLETRANSITION_FINISH
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; 8c792 (23:4792)
|
||||
|
||||
.boxes ; 8c792
|
||||
.boxes
|
||||
zoombox: MACRO
|
||||
; width, height, start y, start x
|
||||
db \1, \2
|
||||
@@ -824,9 +803,8 @@ ENDM
|
||||
zoombox 18, 16, 1, 1
|
||||
zoombox 20, 18, 0, 0
|
||||
db -1
|
||||
; 8c7b7
|
||||
|
||||
.Copy: ; 8c7b7 (23:47b7)
|
||||
.Copy:
|
||||
ld a, $ff
|
||||
.row
|
||||
push bc
|
||||
@@ -842,7 +820,6 @@ ENDM
|
||||
dec b
|
||||
jr nz, .row
|
||||
ret
|
||||
; 8c7c9 (23:47c9)
|
||||
|
||||
Unreferenced_Function8c7c9:
|
||||
ld a, $1
|
||||
|
@@ -1,3 +1,3 @@
|
||||
BattleStart_CopyTilemapAtOnce: ; 8cf4f
|
||||
BattleStart_CopyTilemapAtOnce:
|
||||
call CGBOnly_CopyTilemapAtOnce
|
||||
ret
|
||||
|
@@ -1,4 +1,4 @@
|
||||
CheckBattleScene: ; 4ea44
|
||||
CheckBattleScene:
|
||||
; Return carry if battle scene is turned off.
|
||||
|
||||
ld a, BANK(wLinkMode)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
ConsumeHeldItem: ; 27192
|
||||
ConsumeHeldItem:
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
HiddenPowerDamage: ; fbced
|
||||
HiddenPowerDamage:
|
||||
; Override Hidden Power's type and power based on the user's DVs.
|
||||
|
||||
ld hl, wBattleMonDVs
|
||||
@@ -108,4 +108,3 @@ HiddenPowerDamage: ; fbced
|
||||
pop af
|
||||
ld d, a
|
||||
ret
|
||||
; fbd54
|
||||
|
@@ -1,4 +1,4 @@
|
||||
DetermineLinkBattleResult: ; 2b930
|
||||
DetermineLinkBattleResult:
|
||||
farcall UpdateEnemyMonInParty
|
||||
ld hl, wPartyMon1HP
|
||||
call .CountMonsRemaining
|
||||
@@ -58,7 +58,7 @@ DetermineLinkBattleResult: ; 2b930
|
||||
ld [wBattleResult], a
|
||||
ret
|
||||
|
||||
.CountMonsRemaining: ; 2b995
|
||||
.CountMonsRemaining:
|
||||
ld c, 0
|
||||
ld b, 3
|
||||
ld de, PARTYMON_STRUCT_LENGTH - 1
|
||||
@@ -74,7 +74,7 @@ DetermineLinkBattleResult: ; 2b930
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
.CalcPercentHPRemaining: ; 2b9a6
|
||||
.CalcPercentHPRemaining:
|
||||
ld de, 0
|
||||
ld c, $3
|
||||
.loop2
|
||||
@@ -117,7 +117,7 @@ DetermineLinkBattleResult: ; 2b930
|
||||
jr nz, .loop2
|
||||
ret
|
||||
|
||||
.BothSides_CheckNumberMonsAtFullHealth: ; 2b9e1
|
||||
.BothSides_CheckNumberMonsAtFullHealth:
|
||||
ld hl, wPartyMon1HP
|
||||
call .CheckFaintedOrFullHealth
|
||||
jr nz, .finish ; we have a pokemon that's neither fainted nor at full health
|
||||
@@ -136,7 +136,7 @@ DetermineLinkBattleResult: ; 2b930
|
||||
and a
|
||||
ret
|
||||
|
||||
.CheckFaintedOrFullHealth: ; 2ba01
|
||||
.CheckFaintedOrFullHealth:
|
||||
ld d, 3
|
||||
.loop3
|
||||
ld a, [hli]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
LoadBattleMenu: ; 24ef2
|
||||
LoadBattleMenu:
|
||||
ld hl, BattleMenuHeader
|
||||
call LoadMenuHeader
|
||||
ld a, [wBattleMenuCursorBuffer]
|
||||
@@ -8,21 +8,18 @@ LoadBattleMenu: ; 24ef2
|
||||
ld [wBattleMenuCursorBuffer], a
|
||||
call ExitMenu
|
||||
ret
|
||||
; 24f0b
|
||||
|
||||
SafariBattleMenu: ; 24f0b
|
||||
SafariBattleMenu:
|
||||
; untranslated
|
||||
ld hl, MenuHeader_0x24f4e
|
||||
call LoadMenuHeader
|
||||
jr Function24f19
|
||||
; 24f13
|
||||
|
||||
ContestBattleMenu: ; 24f13
|
||||
ContestBattleMenu:
|
||||
ld hl, MenuHeader_0x24f89
|
||||
call LoadMenuHeader
|
||||
; 24f19
|
||||
|
||||
Function24f19: ; 24f19
|
||||
Function24f19:
|
||||
ld a, [wBattleMenuCursorBuffer]
|
||||
ld [wMenuCursorBuffer], a
|
||||
call _2DMenu
|
||||
@@ -30,14 +27,12 @@ Function24f19: ; 24f19
|
||||
ld [wBattleMenuCursorBuffer], a
|
||||
call ExitMenu
|
||||
ret
|
||||
; 24f2c
|
||||
|
||||
BattleMenuHeader: ; 24f2c
|
||||
BattleMenuHeader:
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
menu_coords 8, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
||||
dw MenuData_0x24f34
|
||||
db 1 ; default option
|
||||
; 24f34
|
||||
|
||||
MenuData_0x24f34: ; 0x24f34
|
||||
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
|
||||
@@ -52,64 +47,55 @@ Strings24f3d: ; 0x24f3d
|
||||
db "<PKMN>@"
|
||||
db "PACK@"
|
||||
db "RUN@"
|
||||
; 24f4e
|
||||
|
||||
MenuHeader_0x24f4e: ; 24f4e
|
||||
MenuHeader_0x24f4e:
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
||||
dw MenuData_0x24f56
|
||||
db 1 ; default option
|
||||
; 24f56
|
||||
|
||||
MenuData_0x24f56: ; 24f56
|
||||
MenuData_0x24f56:
|
||||
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
|
||||
dn 2, 2 ; rows, columns
|
||||
db 11 ; spacing
|
||||
dba Strings24f5f
|
||||
dba Function24f7c
|
||||
; 24f5f
|
||||
|
||||
Strings24f5f: ; 24f5f
|
||||
Strings24f5f:
|
||||
db "サファりボール× @" ; "SAFARI BALL× @"
|
||||
db "エサをなげる@" ; "THROW BAIT"
|
||||
db "いしをなげる@" ; "THROW ROCK"
|
||||
db "にげる@" ; "RUN"
|
||||
; 24f7c
|
||||
|
||||
Function24f7c: ; 24f7c
|
||||
Function24f7c:
|
||||
hlcoord 17, 13
|
||||
ld de, wSafariBallsRemaining
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
; 24f89
|
||||
|
||||
MenuHeader_0x24f89: ; 24f89
|
||||
MenuHeader_0x24f89:
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
menu_coords 2, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
||||
dw MenuData_0x24f91
|
||||
db 1 ; default option
|
||||
; 24f91
|
||||
|
||||
MenuData_0x24f91: ; 24f91
|
||||
MenuData_0x24f91:
|
||||
db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags
|
||||
dn 2, 2 ; rows, columns
|
||||
db 12 ; spacing
|
||||
dba Strings24f9a
|
||||
dba Function24fb2
|
||||
; 24f9a
|
||||
|
||||
Strings24f9a: ; 24f9a
|
||||
Strings24f9a:
|
||||
db "FIGHT@"
|
||||
db "<PKMN>", "@"
|
||||
db "PARKBALL× @"
|
||||
db "RUN@"
|
||||
; 24fb2
|
||||
|
||||
Function24fb2: ; 24fb2
|
||||
Function24fb2:
|
||||
hlcoord 13, 16
|
||||
ld de, wParkBallsRemaining
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
; 24fbf
|
||||
|
@@ -1,4 +1,4 @@
|
||||
_DisappearUser: ; fbd54
|
||||
_DisappearUser:
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld a, [hBattleTurn]
|
||||
@@ -12,14 +12,14 @@ _DisappearUser: ; fbd54
|
||||
call ClearBox
|
||||
jr FinishAppearDisappearUser
|
||||
|
||||
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
|
||||
_AppearUserRaiseSub:
|
||||
farcall BattleCommand_RaiseSubNoAnim
|
||||
jr AppearUser
|
||||
|
||||
_AppearUserLowerSub: ; fbd71 (3e:7d71)
|
||||
_AppearUserLowerSub:
|
||||
farcall BattleCommand_LowerSubNoAnim
|
||||
|
||||
AppearUser: ; fbd77 (3e:7d77)
|
||||
AppearUser:
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld a, [hBattleTurn]
|
||||
@@ -34,23 +34,23 @@ AppearUser: ; fbd77 (3e:7d77)
|
||||
.okay
|
||||
ld [hGraphicStartTile], a
|
||||
predef PlaceGraphic
|
||||
FinishAppearDisappearUser: ; fbd91 (3e:7d91)
|
||||
FinishAppearDisappearUser:
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
|
||||
GetEnemyFrontpicCoords: ; fbd96 (3e:7d96)
|
||||
GetEnemyFrontpicCoords:
|
||||
hlcoord 12, 0
|
||||
lb bc, 7, 7
|
||||
ret
|
||||
|
||||
GetPlayerBackpicCoords: ; fbd9d (3e:7d9d)
|
||||
GetPlayerBackpicCoords:
|
||||
hlcoord 2, 6
|
||||
lb bc, 6, 6
|
||||
ret
|
||||
|
||||
|
||||
DoWeatherModifiers: ; fbda4
|
||||
DoWeatherModifiers:
|
||||
|
||||
ld de, WeatherTypeModifiers
|
||||
ld a, [wBattleWeather]
|
||||
@@ -148,7 +148,7 @@ DoWeatherModifiers: ; fbda4
|
||||
INCLUDE "data/battle/weather_modifiers.asm"
|
||||
|
||||
|
||||
DoBadgeTypeBoosts: ; fbe24
|
||||
DoBadgeTypeBoosts:
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
ret nz
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Attract: ; 377ce
|
||||
BattleCommand_Attract:
|
||||
; attract
|
||||
ld a, [wAttackMissed]
|
||||
and a
|
||||
@@ -21,10 +21,9 @@ BattleCommand_Attract: ; 377ce
|
||||
|
||||
.failed
|
||||
jp FailMove
|
||||
; 377f5
|
||||
|
||||
|
||||
CheckOppositeGender: ; 377f5
|
||||
CheckOppositeGender:
|
||||
ld a, MON_SPECIES
|
||||
call BattlePartyAttr
|
||||
ld a, [hl]
|
||||
@@ -76,4 +75,3 @@ CheckOppositeGender: ; 377f5
|
||||
.genderless_samegender
|
||||
scf
|
||||
ret
|
||||
; 3784b
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_BatonPass: ; 379c9
|
||||
BattleCommand_BatonPass:
|
||||
; batonpass
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
@@ -81,10 +81,9 @@ BattleCommand_BatonPass: ; 379c9
|
||||
|
||||
jr ResetBatonPassStatus
|
||||
|
||||
; 37a67
|
||||
|
||||
|
||||
BatonPass_LinkPlayerSwitch: ; 37a67
|
||||
BatonPass_LinkPlayerSwitch:
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
ret z
|
||||
@@ -101,10 +100,9 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
||||
ld [wBattlePlayerAction], a
|
||||
ret
|
||||
|
||||
; 37a82
|
||||
|
||||
|
||||
BatonPass_LinkEnemySwitch: ; 37a82
|
||||
BatonPass_LinkEnemySwitch:
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
ret z
|
||||
@@ -129,17 +127,15 @@ BatonPass_LinkEnemySwitch: ; 37a82
|
||||
.switch
|
||||
jp CloseWindow
|
||||
|
||||
; 37aab
|
||||
|
||||
|
||||
FailedBatonPass: ; 37aab
|
||||
FailedBatonPass:
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
|
||||
; 37ab1
|
||||
|
||||
|
||||
ResetBatonPassStatus: ; 37ab1
|
||||
ResetBatonPassStatus:
|
||||
; Reset status changes that aren't passed by Baton Pass.
|
||||
|
||||
; Nightmare isn't passed.
|
||||
@@ -178,10 +174,9 @@ ResetBatonPassStatus: ; 37ab1
|
||||
ld [wEnemyWrapCount], a
|
||||
ret
|
||||
|
||||
; 37ae9
|
||||
|
||||
|
||||
CheckAnyOtherAlivePartyMons: ; 37ae9
|
||||
CheckAnyOtherAlivePartyMons:
|
||||
ld hl, wPartyMon1HP
|
||||
ld a, [wPartyCount]
|
||||
ld d, a
|
||||
@@ -189,10 +184,9 @@ CheckAnyOtherAlivePartyMons: ; 37ae9
|
||||
ld e, a
|
||||
jr CheckAnyOtherAliveMons
|
||||
|
||||
; 37af6
|
||||
|
||||
|
||||
CheckAnyOtherAliveEnemyMons: ; 37af6
|
||||
CheckAnyOtherAliveEnemyMons:
|
||||
ld hl, wOTPartyMon1HP
|
||||
ld a, [wOTPartyCount]
|
||||
ld d, a
|
||||
@@ -200,9 +194,8 @@ CheckAnyOtherAliveEnemyMons: ; 37af6
|
||||
ld e, a
|
||||
|
||||
; fallthrough
|
||||
; 37b01
|
||||
|
||||
CheckAnyOtherAliveMons: ; 37b01
|
||||
CheckAnyOtherAliveMons:
|
||||
; Check for nonzero HP starting from partymon
|
||||
; HP at hl for d partymons, besides current mon e.
|
||||
|
||||
@@ -238,4 +231,3 @@ CheckAnyOtherAliveMons: ; 37b01
|
||||
and a
|
||||
ret
|
||||
|
||||
; 37b1d
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_BeatUp: ; 35461
|
||||
BattleCommand_BeatUp:
|
||||
; beatup
|
||||
|
||||
call ResetDamage
|
||||
@@ -193,17 +193,15 @@ BattleCommand_BeatUp: ; 35461
|
||||
ld d, a
|
||||
ret
|
||||
|
||||
; 355b0
|
||||
|
||||
|
||||
.beatup_fail ; 355b0
|
||||
.beatup_fail
|
||||
ld b, buildopponentrage_command
|
||||
jp SkipToBattleCommand
|
||||
|
||||
; 355b5
|
||||
|
||||
|
||||
BattleCommand_BeatUpFailText: ; 355b5
|
||||
BattleCommand_BeatUpFailText:
|
||||
; beatupfailtext
|
||||
|
||||
ld a, [wBeatUpHitAtLeastOnce]
|
||||
@@ -212,10 +210,9 @@ BattleCommand_BeatUpFailText: ; 355b5
|
||||
|
||||
jp PrintButItFailed
|
||||
|
||||
; 355bd
|
||||
|
||||
|
||||
GetBeatupMonLocation: ; 355bd
|
||||
GetBeatupMonLocation:
|
||||
push bc
|
||||
ld c, a
|
||||
ld b, 0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_BellyDrum: ; 37c1a
|
||||
BattleCommand_BellyDrum:
|
||||
; bellydrum
|
||||
; This command is buggy because it raises the user's attack
|
||||
; before checking that it has enough HP to use the move.
|
||||
@@ -33,4 +33,3 @@ BattleCommand_BellyDrum: ; 37c1a
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
|
||||
; 37c55
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_StoreEnergy: ; 36671
|
||||
BattleCommand_StoreEnergy:
|
||||
; storeenergy
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS3
|
||||
@@ -69,10 +69,9 @@ BattleCommand_StoreEnergy: ; 36671
|
||||
call StdBattleTextBox
|
||||
jp EndMoveEffect
|
||||
|
||||
; 366e5
|
||||
|
||||
|
||||
BattleCommand_UnleashEnergy: ; 366e5
|
||||
BattleCommand_UnleashEnergy:
|
||||
; unleashenergy
|
||||
|
||||
ld de, wPlayerDamageTaken
|
||||
@@ -102,4 +101,3 @@ BattleCommand_UnleashEnergy: ; 366e5
|
||||
call AnimateCurrentMove
|
||||
jp EndMoveEffect
|
||||
|
||||
; 3671a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Conversion: ; 3707f
|
||||
BattleCommand_Conversion:
|
||||
; conversion
|
||||
|
||||
ld hl, wBattleMonMoves
|
||||
@@ -95,4 +95,3 @@ BattleCommand_Conversion: ; 3707f
|
||||
ld hl, TransformedTypeText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 3710e
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Conversion2: ; 359e6
|
||||
BattleCommand_Conversion2:
|
||||
; conversion2
|
||||
|
||||
ld a, [wAttackMissed]
|
||||
@@ -63,4 +63,3 @@ BattleCommand_Conversion2: ; 359e6
|
||||
.failed
|
||||
jp FailMove
|
||||
|
||||
; 35a53
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Counter: ; 35813
|
||||
BattleCommand_Counter:
|
||||
; counter
|
||||
|
||||
ld a, 1
|
||||
@@ -57,4 +57,3 @@ BattleCommand_Counter: ; 35813
|
||||
ld [wAttackMissed], a
|
||||
ret
|
||||
|
||||
; 35864
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Curse: ; 37588
|
||||
BattleCommand_Curse:
|
||||
; curse
|
||||
|
||||
ld de, wBattleMonType1
|
||||
@@ -94,4 +94,3 @@ BattleCommand_Curse: ; 37588
|
||||
call AnimateFailedMove
|
||||
ld hl, WontRiseAnymoreText
|
||||
jp StdBattleTextBox
|
||||
; 37618
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_DestinyBond: ; 35bff
|
||||
BattleCommand_DestinyBond:
|
||||
; destinybond
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS5
|
||||
@@ -8,4 +8,3 @@ BattleCommand_DestinyBond: ; 35bff
|
||||
ld hl, DestinyBondEffectText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 35c0f
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Disable: ; 36fed
|
||||
BattleCommand_Disable:
|
||||
; disable
|
||||
|
||||
ld a, [wAttackMissed]
|
||||
@@ -71,4 +71,3 @@ BattleCommand_Disable: ; 36fed
|
||||
.failed
|
||||
jp FailMove
|
||||
|
||||
; 3705c
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Encore: ; 35864
|
||||
BattleCommand_Encore:
|
||||
; encore
|
||||
|
||||
ld hl, wEnemyMonMoves
|
||||
@@ -119,4 +119,3 @@ BattleCommand_Encore: ; 35864
|
||||
.failed
|
||||
jp PrintDidntAffect2
|
||||
|
||||
; 35926
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Endure: ; 3766f
|
||||
BattleCommand_Endure:
|
||||
; endure
|
||||
|
||||
; Endure shares code with Protect. See protect.asm.
|
||||
@@ -14,4 +14,3 @@ BattleCommand_Endure: ; 3766f
|
||||
|
||||
ld hl, BracedItselfText
|
||||
jp StdBattleTextBox
|
||||
; 37683
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_FalseSwipe: ; 35c94
|
||||
BattleCommand_FalseSwipe:
|
||||
; falseswipe
|
||||
|
||||
; Makes sure wCurDamage < MonHP
|
||||
@@ -47,4 +47,3 @@ BattleCommand_FalseSwipe: ; 35c94
|
||||
and a
|
||||
ret
|
||||
|
||||
; 35cc9
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_FocusEnergy: ; 36c98
|
||||
BattleCommand_FocusEnergy:
|
||||
; focusenergy
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS4
|
||||
@@ -14,4 +14,3 @@ BattleCommand_FocusEnergy: ; 36c98
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
|
||||
; 36cb2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Foresight: ; 376a0
|
||||
BattleCommand_Foresight:
|
||||
; foresight
|
||||
|
||||
ld a, [wAttackMissed]
|
||||
@@ -20,4 +20,3 @@ BattleCommand_Foresight: ; 376a0
|
||||
|
||||
.failed
|
||||
jp FailMove
|
||||
; 376c2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_FrustrationPower: ; 3790e
|
||||
BattleCommand_FrustrationPower:
|
||||
; frustrationpower
|
||||
|
||||
push bc
|
||||
@@ -26,4 +26,3 @@ BattleCommand_FrustrationPower: ; 3790e
|
||||
pop bc
|
||||
ret
|
||||
|
||||
; 37939
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_FuryCutter: ; 37792
|
||||
BattleCommand_FuryCutter:
|
||||
; furycutter
|
||||
|
||||
ld hl, wPlayerFuryCutterCount
|
||||
@@ -38,10 +38,9 @@ BattleCommand_FuryCutter: ; 37792
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
; 377be
|
||||
|
||||
|
||||
ResetFuryCutterCount: ; 377be
|
||||
ResetFuryCutterCount:
|
||||
|
||||
push hl
|
||||
|
||||
@@ -58,4 +57,3 @@ ResetFuryCutterCount: ; 377be
|
||||
pop hl
|
||||
ret
|
||||
|
||||
; 377ce
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_CheckFutureSight: ; 37d0d
|
||||
BattleCommand_CheckFutureSight:
|
||||
; checkfuturesight
|
||||
|
||||
ld hl, wPlayerFutureSightCount
|
||||
@@ -25,9 +25,8 @@ BattleCommand_CheckFutureSight: ; 37d0d
|
||||
ld b, futuresight_command
|
||||
jp SkipToBattleCommand
|
||||
|
||||
; 37d34
|
||||
|
||||
BattleCommand_FutureSight: ; 37d34
|
||||
BattleCommand_FutureSight:
|
||||
; futuresight
|
||||
|
||||
call CheckUserIsCharging
|
||||
@@ -82,4 +81,3 @@ BattleCommand_FutureSight: ; 37d34
|
||||
call PrintButItFailed
|
||||
jp EndMoveEffect
|
||||
|
||||
; 37d94
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_HealBell: ; 35cc9
|
||||
BattleCommand_HealBell:
|
||||
; healbell
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
@@ -33,4 +33,3 @@ BattleCommand_HealBell: ; 35cc9
|
||||
jp z, CalcPlayerStats
|
||||
jp CalcEnemyStats
|
||||
|
||||
; 35d00
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_HiddenPower: ; 37be8
|
||||
BattleCommand_HiddenPower:
|
||||
; hiddenpower
|
||||
|
||||
ld a, [wAttackMissed]
|
||||
@@ -7,4 +7,3 @@ BattleCommand_HiddenPower: ; 37be8
|
||||
farcall HiddenPowerDamage
|
||||
ret
|
||||
|
||||
; 37bf4
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_LeechSeed: ; 36f9d
|
||||
BattleCommand_LeechSeed:
|
||||
; leechseed
|
||||
ld a, [wAttackMissed]
|
||||
and a
|
||||
@@ -39,4 +39,3 @@ BattleCommand_LeechSeed: ; 36f9d
|
||||
ld hl, EvadedText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 36fe1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_LockOn: ; 35a53
|
||||
BattleCommand_LockOn:
|
||||
; lockon
|
||||
|
||||
call CheckSubstituteOpp
|
||||
@@ -20,4 +20,3 @@ BattleCommand_LockOn: ; 35a53
|
||||
call AnimateFailedMove
|
||||
jp PrintDidntAffect
|
||||
|
||||
; 35a74
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_GetMagnitude: ; 37991
|
||||
BattleCommand_GetMagnitude:
|
||||
; getmagnitude
|
||||
|
||||
push bc
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Metronome: ; 37418
|
||||
BattleCommand_Metronome:
|
||||
; metronome
|
||||
|
||||
call ClearLastMove
|
||||
@@ -40,7 +40,6 @@ BattleCommand_Metronome: ; 37418
|
||||
ld [hl], b
|
||||
call UpdateMoveData
|
||||
jp ResetTurn
|
||||
; 37454
|
||||
|
||||
|
||||
INCLUDE "data/battle/metronome_exception_moves.asm"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Mimic: ; 36f46
|
||||
BattleCommand_Mimic:
|
||||
; mimic
|
||||
|
||||
call ClearLastMove
|
||||
@@ -49,4 +49,3 @@ BattleCommand_Mimic: ; 36f46
|
||||
.fail
|
||||
jp FailMimic
|
||||
|
||||
; 36f9d
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_MirrorCoat: ; 37c95
|
||||
BattleCommand_MirrorCoat:
|
||||
; mirrorcoat
|
||||
|
||||
ld a, 1
|
||||
@@ -58,4 +58,3 @@ BattleCommand_MirrorCoat: ; 37c95
|
||||
ld [wAttackMissed], a
|
||||
ret
|
||||
|
||||
; 37ce6
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_MirrorMove: ; 373c9
|
||||
BattleCommand_MirrorMove:
|
||||
; mirrormove
|
||||
|
||||
call ClearLastMove
|
||||
@@ -49,4 +49,3 @@ BattleCommand_MirrorMove: ; 373c9
|
||||
.done
|
||||
call BattleCommand_MoveDelay
|
||||
jp ResetTurn
|
||||
; 37418
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Mist: ; 36c7e
|
||||
BattleCommand_Mist:
|
||||
; mist
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS4
|
||||
@@ -14,4 +14,3 @@ BattleCommand_Mist: ; 36c7e
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
|
||||
; 36c98
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Nightmare: ; 37536
|
||||
BattleCommand_Nightmare:
|
||||
; nightmare
|
||||
|
||||
; Can't hit an absent opponent.
|
||||
@@ -35,4 +35,3 @@ BattleCommand_Nightmare: ; 37536
|
||||
.failed
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
; 37563
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_PainSplit: ; 35926
|
||||
BattleCommand_PainSplit:
|
||||
; painsplit
|
||||
|
||||
ld a, [wAttackMissed]
|
||||
@@ -65,7 +65,7 @@ BattleCommand_PainSplit: ; 35926
|
||||
inc de
|
||||
inc de
|
||||
|
||||
.EnemyShareHP: ; 359ac
|
||||
.EnemyShareHP:
|
||||
ld c, [hl]
|
||||
dec hl
|
||||
ld a, [wCurDamage + 1]
|
||||
@@ -89,9 +89,7 @@ BattleCommand_PainSplit: ; 35926
|
||||
ld [wBuffer6], a
|
||||
ret
|
||||
|
||||
; 359cd
|
||||
|
||||
.ButItFailed:
|
||||
jp PrintDidntAffect2
|
||||
|
||||
; 359d0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_PayDay: ; 3705c
|
||||
BattleCommand_PayDay:
|
||||
; payday
|
||||
|
||||
xor a
|
||||
@@ -25,4 +25,3 @@ BattleCommand_PayDay: ; 3705c
|
||||
ld hl, CoinsScatteredText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 3707f
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_PerishSong: ; 376c2
|
||||
BattleCommand_PerishSong:
|
||||
; perishsong
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ BattleCommand_PerishSong: ; 376c2
|
||||
.failed
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
; 376f8
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Present: ; 37874
|
||||
BattleCommand_Present:
|
||||
; present
|
||||
|
||||
ld a, [wLinkMode]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Protect: ; 37618
|
||||
BattleCommand_Protect:
|
||||
; protect
|
||||
call ProtectChance
|
||||
ret c
|
||||
@@ -11,10 +11,9 @@ BattleCommand_Protect: ; 37618
|
||||
|
||||
ld hl, ProtectedItselfText
|
||||
jp StdBattleTextBox
|
||||
; 3762c
|
||||
|
||||
|
||||
ProtectChance: ; 3762c
|
||||
ProtectChance:
|
||||
|
||||
ld de, wPlayerProtectCount
|
||||
ld a, [hBattleTurn]
|
||||
@@ -77,4 +76,3 @@ ProtectChance: ; 3762c
|
||||
call PrintButItFailed
|
||||
scf
|
||||
ret
|
||||
; 3766f
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_PsychUp: ; 37c55
|
||||
BattleCommand_PsychUp:
|
||||
; psychup
|
||||
|
||||
ld hl, wEnemyStatLevels
|
||||
@@ -48,4 +48,3 @@ BattleCommand_PsychUp: ; 37c55
|
||||
ld hl, CopiedStatsText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 37c95
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Pursuit: ; 37b1d
|
||||
BattleCommand_Pursuit:
|
||||
; pursuit
|
||||
; Double damage if the opponent is switching.
|
||||
|
||||
@@ -23,4 +23,3 @@ BattleCommand_Pursuit: ; 37b1d
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
; 37b39
|
||||
|
@@ -1,8 +1,7 @@
|
||||
BattleCommand_Rage: ; 36f1d
|
||||
BattleCommand_Rage:
|
||||
; rage
|
||||
ld a, BATTLE_VARS_SUBSTATUS4
|
||||
call GetBattleVarAddr
|
||||
set SUBSTATUS_RAGE, [hl]
|
||||
ret
|
||||
|
||||
; 36f25
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_StartRain: ; 37bf4
|
||||
BattleCommand_StartRain:
|
||||
; startrain
|
||||
ld a, WEATHER_RAIN
|
||||
ld [wBattleWeather], a
|
||||
@@ -8,4 +8,3 @@ BattleCommand_StartRain: ; 37bf4
|
||||
ld hl, DownpourText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 37c07
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_ClearHazards: ; 37b39
|
||||
BattleCommand_ClearHazards:
|
||||
; clearhazards
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS4
|
||||
@@ -35,4 +35,3 @@ BattleCommand_ClearHazards: ; 37b39
|
||||
ld hl, ReleasedByText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 37b74
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_HappinessPower: ; 3784b
|
||||
BattleCommand_HappinessPower:
|
||||
; happinesspower
|
||||
push bc
|
||||
ld hl, wBattleMonHappiness
|
||||
@@ -24,4 +24,3 @@ BattleCommand_HappinessPower: ; 3784b
|
||||
pop bc
|
||||
ret
|
||||
|
||||
; 37874
|
||||
|
@@ -1,7 +1,7 @@
|
||||
MAX_ROLLOUT_COUNT EQU 5
|
||||
|
||||
|
||||
BattleCommand_CheckCurl: ; 37718
|
||||
BattleCommand_CheckCurl:
|
||||
; checkcurl
|
||||
|
||||
ld de, wPlayerRolloutCount
|
||||
@@ -22,10 +22,9 @@ BattleCommand_CheckCurl: ; 37718
|
||||
xor a
|
||||
ld [de], a
|
||||
ret
|
||||
; 37734
|
||||
|
||||
|
||||
BattleCommand_RolloutPower: ; 37734
|
||||
BattleCommand_RolloutPower:
|
||||
; rolloutpower
|
||||
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
@@ -96,4 +95,3 @@ BattleCommand_RolloutPower: ; 37734
|
||||
|
||||
.done_damage
|
||||
ret
|
||||
; 37791
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Safeguard: ; 37939
|
||||
BattleCommand_Safeguard:
|
||||
; safeguard
|
||||
|
||||
ld hl, wPlayerScreens
|
||||
@@ -22,4 +22,3 @@ BattleCommand_Safeguard: ; 37939
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
|
||||
; 37962
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_StartSandstorm: ; 376f8
|
||||
BattleCommand_StartSandstorm:
|
||||
; startsandstorm
|
||||
|
||||
ld a, [wBattleWeather]
|
||||
@@ -16,4 +16,3 @@ BattleCommand_StartSandstorm: ; 376f8
|
||||
.failed
|
||||
call AnimateFailedMove
|
||||
jp PrintButItFailed
|
||||
; 37718
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Selfdestruct: ; 37380
|
||||
BattleCommand_Selfdestruct:
|
||||
farcall StubbedTrainerRankings_Selfdestruct
|
||||
ld a, BATTLEANIM_PLAYER_DAMAGE
|
||||
ld [wNumHits], a
|
||||
@@ -28,4 +28,3 @@ BattleCommand_Selfdestruct: ; 37380
|
||||
call WaitBGMap
|
||||
jp RefreshBattleHuds
|
||||
|
||||
; 373c9
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Sketch: ; 35a74
|
||||
BattleCommand_Sketch:
|
||||
; sketch
|
||||
|
||||
call ClearLastMove
|
||||
@@ -116,4 +116,3 @@ BattleCommand_Sketch: ; 35a74
|
||||
call AnimateFailedMove
|
||||
jp PrintDidntAffect
|
||||
|
||||
; 35b16
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_SleepTalk: ; 35b33
|
||||
BattleCommand_SleepTalk:
|
||||
; sleeptalk
|
||||
|
||||
call ClearLastMove
|
||||
@@ -142,4 +142,3 @@ BattleCommand_SleepTalk: ; 35b33
|
||||
cp EFFECT_BIDE
|
||||
ret
|
||||
|
||||
; 35bff
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Snore: ; 359d0
|
||||
BattleCommand_Snore:
|
||||
; snore
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
@@ -10,4 +10,3 @@ BattleCommand_Snore: ; 359d0
|
||||
call FailMove
|
||||
jp EndMoveEffect
|
||||
|
||||
; 359e6
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Spikes: ; 37683
|
||||
BattleCommand_Spikes:
|
||||
; spikes
|
||||
|
||||
ld hl, wEnemyScreens
|
||||
@@ -24,4 +24,3 @@ BattleCommand_Spikes: ; 37683
|
||||
|
||||
.failed
|
||||
jp FailMove
|
||||
; 376a0
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Spite: ; 35c0f
|
||||
BattleCommand_Spite:
|
||||
; spite
|
||||
|
||||
ld a, [wAttackMissed]
|
||||
@@ -85,4 +85,3 @@ BattleCommand_Spite: ; 35c0f
|
||||
.failed
|
||||
jp PrintDidntAffect2
|
||||
|
||||
; 35c94
|
||||
|
@@ -1,6 +1,5 @@
|
||||
BattleCommand_Splash: ; 36fe1
|
||||
BattleCommand_Splash:
|
||||
call AnimateCurrentMove
|
||||
farcall StubbedTrainerRankings_Splash
|
||||
jp PrintNothingHappened
|
||||
|
||||
; 36fed
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Substitute: ; 36e7c
|
||||
BattleCommand_Substitute:
|
||||
; substitute
|
||||
|
||||
call BattleCommand_MoveDelay
|
||||
@@ -87,4 +87,3 @@ BattleCommand_Substitute: ; 36e7c
|
||||
.jp_stdbattletextbox
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 36f0b
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_StartSun: ; 37c07
|
||||
BattleCommand_StartSun:
|
||||
; startsun
|
||||
ld a, WEATHER_SUN
|
||||
ld [wBattleWeather], a
|
||||
@@ -8,4 +8,3 @@ BattleCommand_StartSun: ; 37c07
|
||||
ld hl, SunGotBrightText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 37c1a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Teleport: ; 36778
|
||||
BattleCommand_Teleport:
|
||||
; teleport
|
||||
|
||||
ld a, [wBattleType]
|
||||
@@ -88,4 +88,3 @@ BattleCommand_Teleport: ; 36778
|
||||
ld hl, FledFromBattleText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 36804
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_Thief: ; 37492
|
||||
BattleCommand_Thief:
|
||||
; thief
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
@@ -113,4 +113,3 @@ BattleCommand_Thief: ; 37492
|
||||
ld e, l
|
||||
ld hl, wEnemyMonItem
|
||||
ret
|
||||
; 37517
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_ThunderAccuracy: ; 37d94
|
||||
BattleCommand_ThunderAccuracy:
|
||||
; thunderaccuracy
|
||||
|
||||
ld a, BATTLE_VARS_MOVE_TYPE
|
||||
@@ -17,4 +17,3 @@ BattleCommand_ThunderAccuracy: ; 37d94
|
||||
ld [hl], 100 percent
|
||||
ret
|
||||
|
||||
; 37daa
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
BattleCommand_Transform: ; 371cd
|
||||
BattleCommand_Transform:
|
||||
; transform
|
||||
|
||||
call ClearLastMove
|
||||
@@ -138,4 +138,3 @@ BattleCommand_Transform: ; 371cd
|
||||
ld hl, TransformedText
|
||||
jp StdBattleTextBox
|
||||
|
||||
; 372c6
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleCommand_TripleKick: ; 346b2
|
||||
BattleCommand_TripleKick:
|
||||
; triplekick
|
||||
|
||||
ld a, [wKickCounter]
|
||||
@@ -26,14 +26,12 @@ BattleCommand_TripleKick: ; 346b2
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
; 346cd
|
||||
|
||||
|
||||
BattleCommand_KickCounter: ; 346cd
|
||||
BattleCommand_KickCounter:
|
||||
; kickcounter
|
||||
|
||||
ld hl, wKickCounter
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
; 346d2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
GetTrainerClassName: ; 3952d
|
||||
GetTrainerClassName:
|
||||
ld hl, wRivalName
|
||||
ld a, c
|
||||
cp RIVAL1
|
||||
@@ -19,7 +19,7 @@ GetTrainerClassName: ; 3952d
|
||||
pop de
|
||||
ret
|
||||
|
||||
GetOTName: ; 39550
|
||||
GetOTName:
|
||||
ld hl, wOTPlayerName
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
@@ -44,7 +44,7 @@ GetOTName: ; 39550
|
||||
pop de
|
||||
ret
|
||||
|
||||
GetTrainerAttributes: ; 3957b
|
||||
GetTrainerAttributes:
|
||||
ld a, [wTrainerClass]
|
||||
ld c, a
|
||||
call GetOTName
|
||||
|
@@ -1,4 +1,4 @@
|
||||
GetTrainerDVs: ; 270c4
|
||||
GetTrainerDVs:
|
||||
; Return the DVs of wOtherTrainerClass in bc
|
||||
|
||||
push hl
|
||||
@@ -17,4 +17,3 @@ GetTrainerDVs: ; 270c4
|
||||
|
||||
pop hl
|
||||
ret
|
||||
; 270d6
|
||||
|
@@ -1,4 +1,4 @@
|
||||
ReadTrainerParty: ; 39771
|
||||
ReadTrainerParty:
|
||||
ld a, [wInBattleTowerBattle]
|
||||
bit 0, a
|
||||
ret nz
|
||||
@@ -79,17 +79,15 @@ ReadTrainerParty: ; 39771
|
||||
call TrainerType2
|
||||
call CloseSRAM
|
||||
jr .done
|
||||
; 397e3
|
||||
|
||||
TrainerTypes: ; 397e3
|
||||
TrainerTypes:
|
||||
; entries correspond to TRAINERTYPE_* constants
|
||||
dw TrainerType1 ; level, species
|
||||
dw TrainerType2 ; level, species, moves
|
||||
dw TrainerType3 ; level, species, item
|
||||
dw TrainerType4 ; level, species, item, moves
|
||||
; 397eb
|
||||
|
||||
TrainerType1: ; 397eb
|
||||
TrainerType1:
|
||||
; normal (level, species)
|
||||
ld h, d
|
||||
ld l, e
|
||||
@@ -107,9 +105,8 @@ TrainerType1: ; 397eb
|
||||
predef TryAddMonToParty
|
||||
pop hl
|
||||
jr .loop
|
||||
; 39806
|
||||
|
||||
TrainerType2: ; 39806
|
||||
TrainerType2:
|
||||
; moves
|
||||
ld h, d
|
||||
ld l, e
|
||||
@@ -184,9 +181,8 @@ TrainerType2: ; 39806
|
||||
|
||||
pop hl
|
||||
jr .loop
|
||||
; 39871
|
||||
|
||||
TrainerType3: ; 39871
|
||||
TrainerType3:
|
||||
; item
|
||||
ld h, d
|
||||
ld l, e
|
||||
@@ -213,9 +209,8 @@ TrainerType3: ; 39871
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
jr .loop
|
||||
; 3989d (e:589d)
|
||||
|
||||
TrainerType4: ; 3989d
|
||||
TrainerType4:
|
||||
; item + moves
|
||||
ld h, d
|
||||
ld l, e
|
||||
@@ -305,9 +300,8 @@ TrainerType4: ; 3989d
|
||||
|
||||
pop hl
|
||||
jr .loop
|
||||
; 3991b
|
||||
|
||||
ComputeTrainerReward: ; 3991b (e:591b)
|
||||
ComputeTrainerReward:
|
||||
ld hl, hProduct
|
||||
xor a
|
||||
ld [hli], a
|
||||
@@ -328,7 +322,7 @@ ComputeTrainerReward: ; 3991b (e:591b)
|
||||
ret
|
||||
|
||||
|
||||
Battle_GetTrainerName:: ; 39939
|
||||
Battle_GetTrainerName::
|
||||
ld a, [wInBattleTowerBattle]
|
||||
bit 0, a
|
||||
ld hl, wOTPlayerName
|
||||
@@ -339,7 +333,7 @@ Battle_GetTrainerName:: ; 39939
|
||||
ld a, [wOtherTrainerClass]
|
||||
ld c, a
|
||||
|
||||
GetTrainerName:: ; 3994c
|
||||
GetTrainerName::
|
||||
ld a, c
|
||||
cp CAL
|
||||
jr nz, .not_cal2
|
||||
@@ -379,20 +373,18 @@ GetTrainerName:: ; 3994c
|
||||
jr nz, .skip
|
||||
jr .loop
|
||||
|
||||
CopyTrainerName: ; 39984
|
||||
CopyTrainerName:
|
||||
ld de, wStringBuffer1
|
||||
push de
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
pop de
|
||||
ret
|
||||
; 39990
|
||||
|
||||
Function39990: ; 39990
|
||||
Function39990:
|
||||
; This function is useless.
|
||||
ld de, wStringBuffer1
|
||||
push de
|
||||
ld bc, NAME_LENGTH
|
||||
pop de
|
||||
ret
|
||||
; 39999
|
||||
|
@@ -1,4 +1,4 @@
|
||||
_ReturnToBattle_UseBall: ; 2715c
|
||||
_ReturnToBattle_UseBall:
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
ld a, [wBattleType]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleIntroSlidingPics: ; 4e980
|
||||
BattleIntroSlidingPics:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wLYOverrides)
|
||||
@@ -12,9 +12,8 @@ BattleIntroSlidingPics: ; 4e980
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 4e998
|
||||
|
||||
.subfunction1 ; 4e998
|
||||
.subfunction1
|
||||
call .subfunction4
|
||||
ld a, $90
|
||||
ld [hSCX], a
|
||||
@@ -23,9 +22,8 @@ BattleIntroSlidingPics: ; 4e980
|
||||
lb de, %11100100, %11100100
|
||||
call DmgToCgbObjPals
|
||||
ret
|
||||
; 4e9ab
|
||||
|
||||
.subfunction2 ; 4e9ab
|
||||
.subfunction2
|
||||
ld d, $90
|
||||
ld e, $72
|
||||
ld a, $48
|
||||
@@ -57,9 +55,8 @@ BattleIntroSlidingPics: ; 4e980
|
||||
dec a
|
||||
jr nz, .loop1
|
||||
ret
|
||||
; 4e9d6
|
||||
|
||||
.subfunction3 ; 4e9d6
|
||||
.subfunction3
|
||||
ld hl, wVirtualOAMSprite00XCoord
|
||||
ld c, $12 ; 18
|
||||
ld de, SPRITEOAMSTRUCT_LENGTH
|
||||
@@ -70,17 +67,15 @@ BattleIntroSlidingPics: ; 4e980
|
||||
dec c
|
||||
jr nz, .loop3
|
||||
ret
|
||||
; 4e9e5
|
||||
|
||||
.subfunction4 ; 4e9e5
|
||||
.subfunction4
|
||||
ld hl, wLYOverrides
|
||||
ld a, $90
|
||||
ld bc, SCREEN_HEIGHT_PX
|
||||
call ByteFill
|
||||
ret
|
||||
; 4e9f1
|
||||
|
||||
.subfunction5 ; 4e9f1
|
||||
.subfunction5
|
||||
ld hl, wLYOverrides
|
||||
ld a, d
|
||||
ld c, $3e ; 62
|
||||
@@ -101,4 +96,3 @@ BattleIntroSlidingPics: ; 4e980
|
||||
dec c
|
||||
jr nz, .loop6
|
||||
ret
|
||||
; 4ea0a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
ShowLinkBattleParticipants: ; 2ee18
|
||||
ShowLinkBattleParticipants:
|
||||
; If we're not in a communications room,
|
||||
; we don't need to be here.
|
||||
ld a, [wLinkMode]
|
||||
@@ -12,7 +12,7 @@ ShowLinkBattleParticipants: ; 2ee18
|
||||
call ClearSprites
|
||||
ret
|
||||
|
||||
FindFirstAliveMonAndStartBattle: ; 2ee2f
|
||||
FindFirstAliveMonAndStartBattle:
|
||||
xor a
|
||||
ld [hMapAnims], a
|
||||
call DelayFrame
|
||||
@@ -46,7 +46,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f
|
||||
ld [hMapAnims], a
|
||||
ret
|
||||
|
||||
PlayBattleMusic: ; 2ee6c
|
||||
PlayBattleMusic:
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -148,7 +148,7 @@ PlayBattleMusic: ; 2ee6c
|
||||
pop hl
|
||||
ret
|
||||
|
||||
ClearBattleRAM: ; 2ef18
|
||||
ClearBattleRAM:
|
||||
xor a
|
||||
ld [wBattlePlayerAction], a
|
||||
ld [wBattleResult], a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleStart_TrainerHuds: ; 2c000
|
||||
BattleStart_TrainerHuds:
|
||||
ld a, $e4
|
||||
ld [rOBP0], a
|
||||
call LoadBallIconGFX
|
||||
@@ -7,16 +7,14 @@ BattleStart_TrainerHuds: ; 2c000
|
||||
dec a
|
||||
ret z
|
||||
jp ShowOTTrainerMonsRemaining
|
||||
; 2c012
|
||||
|
||||
EnemySwitch_TrainerHud: ; 2c012
|
||||
EnemySwitch_TrainerHud:
|
||||
ld a, $e4
|
||||
ld [rOBP0], a
|
||||
call LoadBallIconGFX
|
||||
jp ShowOTTrainerMonsRemaining
|
||||
; 2c01c
|
||||
|
||||
ShowPlayerMonsRemaining: ; 2c01c
|
||||
ShowPlayerMonsRemaining:
|
||||
call DrawPlayerPartyIconHUDBorder
|
||||
ld hl, wPartyMon1HP
|
||||
ld de, wPartyCount
|
||||
@@ -30,9 +28,8 @@ ShowPlayerMonsRemaining: ; 2c01c
|
||||
ld [wPlaceBallsDirection], a
|
||||
ld hl, wVirtualOAMSprite00
|
||||
jp LoadTrainerHudOAM
|
||||
; 2c03a
|
||||
|
||||
ShowOTTrainerMonsRemaining: ; 2c03a
|
||||
ShowOTTrainerMonsRemaining:
|
||||
call DrawEnemyHUDBorder
|
||||
ld hl, wOTPartyMon1HP
|
||||
ld de, wOTPartyCount
|
||||
@@ -46,9 +43,8 @@ ShowOTTrainerMonsRemaining: ; 2c03a
|
||||
ld [wPlaceBallsDirection], a
|
||||
ld hl, wVirtualOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH
|
||||
jp LoadTrainerHudOAM
|
||||
; 2c059
|
||||
|
||||
StageBallTilesData: ; 2c059
|
||||
StageBallTilesData:
|
||||
ld a, [de]
|
||||
push af
|
||||
ld de, wBuffer1
|
||||
@@ -69,9 +65,8 @@ StageBallTilesData: ; 2c059
|
||||
dec a
|
||||
jr nz, .loop2
|
||||
ret
|
||||
; 2c075
|
||||
|
||||
.GetHUDTile: ; 2c075
|
||||
.GetHUDTile:
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr nz, .got_hp
|
||||
@@ -102,9 +97,8 @@ StageBallTilesData: ; 2c059
|
||||
ld bc, PARTYMON_STRUCT_LENGTH + MON_HP - MON_STATUS
|
||||
add hl, bc
|
||||
ret
|
||||
; 2c095
|
||||
|
||||
DrawPlayerHUDBorder: ; 2c095
|
||||
DrawPlayerHUDBorder:
|
||||
ld hl, .tiles
|
||||
ld de, wTrainerHUDTiles
|
||||
ld bc, 4
|
||||
@@ -118,9 +112,8 @@ DrawPlayerHUDBorder: ; 2c095
|
||||
db $77 ; bottom right
|
||||
db $6f ; bottom left
|
||||
db $76 ; bottom side
|
||||
; 2c0ad
|
||||
|
||||
DrawPlayerPartyIconHUDBorder: ; 2c0ad
|
||||
DrawPlayerPartyIconHUDBorder:
|
||||
ld hl, .tiles
|
||||
ld de, wTrainerHUDTiles
|
||||
ld bc, 4
|
||||
@@ -134,9 +127,8 @@ DrawPlayerPartyIconHUDBorder: ; 2c0ad
|
||||
db $5c ; bottom right
|
||||
db $6f ; bottom left
|
||||
db $76 ; bottom side
|
||||
; 2c0c5
|
||||
|
||||
DrawEnemyHUDBorder: ; 2c0c5
|
||||
DrawEnemyHUDBorder:
|
||||
ld hl, .tiles
|
||||
ld de, wTrainerHUDTiles
|
||||
ld bc, 4
|
||||
@@ -160,9 +152,8 @@ DrawEnemyHUDBorder: ; 2c0c5
|
||||
db $74 ; bottom left
|
||||
db $78 ; bottom right
|
||||
db $76 ; bottom side
|
||||
; 2c0f1
|
||||
|
||||
PlaceHUDBorderTiles: ; 2c0f1
|
||||
PlaceHUDBorderTiles:
|
||||
ld a, [wTrainerHUDTiles]
|
||||
ld [hl], a
|
||||
ld bc, SCREEN_WIDTH
|
||||
@@ -180,9 +171,8 @@ PlaceHUDBorderTiles: ; 2c0f1
|
||||
ld a, [wEndFlypoint]
|
||||
ld [hl], a
|
||||
ret
|
||||
; 2c10d
|
||||
|
||||
LinkBattle_TrainerHuds: ; 2c10d
|
||||
LinkBattle_TrainerHuds:
|
||||
call LoadBallIconGFX
|
||||
ld hl, wPartyMon1HP
|
||||
ld de, wPartyCount
|
||||
@@ -205,9 +195,8 @@ LinkBattle_TrainerHuds: ; 2c10d
|
||||
ld [hl], 13 * 8
|
||||
ld hl, wVirtualOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH
|
||||
jp LoadTrainerHudOAM
|
||||
; 2c143
|
||||
|
||||
LoadTrainerHudOAM: ; 2c143
|
||||
LoadTrainerHudOAM:
|
||||
ld de, wBuffer1
|
||||
ld c, PARTY_LENGTH
|
||||
.loop
|
||||
@@ -228,21 +217,18 @@ LoadTrainerHudOAM: ; 2c143
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 2c165
|
||||
|
||||
LoadBallIconGFX: ; 2c165
|
||||
LoadBallIconGFX:
|
||||
ld de, .gfx
|
||||
ld hl, vTiles0 tile $31
|
||||
lb bc, BANK(LoadBallIconGFX), 4
|
||||
call Get2bpp_2
|
||||
ret
|
||||
; 2c172
|
||||
|
||||
.gfx ; 2c172
|
||||
.gfx
|
||||
INCBIN "gfx/battle/balls.2bpp"
|
||||
; 2c1b2
|
||||
|
||||
_ShowLinkBattleParticipants: ; 2c1b2
|
||||
_ShowLinkBattleParticipants:
|
||||
call ClearBGPalettes
|
||||
call LoadFontsExtra
|
||||
hlcoord 2, 3
|
||||
@@ -266,4 +252,3 @@ _ShowLinkBattleParticipants: ; 2c1b2
|
||||
ld a, $e4
|
||||
ld [rOBP0], a
|
||||
ret
|
||||
; 2c1ef
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Unreferenced_GetGen1TrainerClassName: ; 50a28
|
||||
Unreferenced_GetGen1TrainerClassName:
|
||||
ld hl, Gen1TrainerClassNames
|
||||
ld a, [wTrainerClass]
|
||||
dec a
|
||||
|
@@ -1,11 +1,10 @@
|
||||
DisplayUsedMoveText: ; 105db0
|
||||
DisplayUsedMoveText:
|
||||
; battle command 03
|
||||
ld hl, UsedMoveText
|
||||
call BattleTextBox
|
||||
jp WaitBGMap
|
||||
; 105db9
|
||||
|
||||
UsedMoveText: ; 105db9
|
||||
UsedMoveText:
|
||||
; this is a stream of text and asm from 105db9 to 105ef6
|
||||
text_jump _ActorNameText
|
||||
start_asm
|
||||
@@ -58,18 +57,16 @@ UsedMoveText: ; 105db9
|
||||
ret c
|
||||
ld hl, UsedMove1Text
|
||||
ret
|
||||
; 105e04
|
||||
|
||||
UsedMove1Text: ; 105e04
|
||||
UsedMove1Text:
|
||||
text_jump _UsedMove1Text
|
||||
start_asm
|
||||
jr UsedMoveText_CheckObedience
|
||||
; 105e0b
|
||||
|
||||
UsedMove2Text: ; 105e0b
|
||||
UsedMove2Text:
|
||||
text_jump _UsedMove2Text
|
||||
start_asm
|
||||
UsedMoveText_CheckObedience: ; 105e10
|
||||
UsedMoveText_CheckObedience:
|
||||
; check obedience
|
||||
ld a, [wAlreadyDisobeyed]
|
||||
and a
|
||||
@@ -77,7 +74,6 @@ UsedMoveText_CheckObedience: ; 105e10
|
||||
; print "instead,"
|
||||
ld hl, .UsedInsteadText
|
||||
ret
|
||||
; 105e1a
|
||||
|
||||
.UsedInsteadText:
|
||||
text_jump _UsedInsteadText
|
||||
@@ -85,9 +81,8 @@ UsedMoveText_CheckObedience: ; 105e10
|
||||
.GetMoveNameText:
|
||||
ld hl, MoveNameText
|
||||
ret
|
||||
; 105e23
|
||||
|
||||
MoveNameText: ; 105e23
|
||||
MoveNameText:
|
||||
text_jump _MoveNameText
|
||||
start_asm
|
||||
; get start address
|
||||
@@ -111,40 +106,33 @@ MoveNameText: ; 105e23
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ret
|
||||
; 105e39
|
||||
|
||||
.endusedmovetexts ; 105e39
|
||||
.endusedmovetexts
|
||||
; entries correspond to MoveGrammar sets
|
||||
dw EndUsedMove1Text
|
||||
dw EndUsedMove2Text
|
||||
dw EndUsedMove3Text
|
||||
dw EndUsedMove4Text
|
||||
dw EndUsedMove5Text
|
||||
; 105e43
|
||||
|
||||
EndUsedMove1Text: ; 105e43
|
||||
EndUsedMove1Text:
|
||||
text_jump _EndUsedMove1Text
|
||||
db "@"
|
||||
; 105e48
|
||||
EndUsedMove2Text: ; 105e48
|
||||
EndUsedMove2Text:
|
||||
text_jump _EndUsedMove2Text
|
||||
db "@"
|
||||
; 105e4d
|
||||
EndUsedMove3Text: ; 105e4d
|
||||
EndUsedMove3Text:
|
||||
text_jump _EndUsedMove3Text
|
||||
db "@"
|
||||
; 105e52
|
||||
EndUsedMove4Text: ; 105e52
|
||||
EndUsedMove4Text:
|
||||
text_jump _EndUsedMove4Text
|
||||
db "@"
|
||||
; 105e57
|
||||
EndUsedMove5Text: ; 105e57
|
||||
EndUsedMove5Text:
|
||||
text_jump _EndUsedMove5Text
|
||||
db "@"
|
||||
; 105e5c
|
||||
|
||||
|
||||
GetMoveGrammar: ; 105e5c
|
||||
GetMoveGrammar:
|
||||
; store move grammar type in wd265
|
||||
|
||||
push bc
|
||||
@@ -178,12 +166,11 @@ GetMoveGrammar: ; 105e5c
|
||||
; we're done
|
||||
pop bc
|
||||
ret
|
||||
; 105e7a
|
||||
|
||||
INCLUDE "data/moves/grammar.asm"
|
||||
|
||||
|
||||
UpdateUsedMoves: ; 105ed0
|
||||
UpdateUsedMoves:
|
||||
; append move a to wPlayerUsedMoves unless it has already been used
|
||||
|
||||
push bc
|
||||
@@ -237,4 +224,3 @@ UpdateUsedMoves: ; 105ed0
|
||||
; list updated
|
||||
pop bc
|
||||
ret
|
||||
; 105ef6
|
||||
|
@@ -1,6 +1,6 @@
|
||||
; Battle animation command interpreter.
|
||||
|
||||
PlayBattleAnim: ; cc0d6
|
||||
PlayBattleAnim:
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -13,9 +13,8 @@ PlayBattleAnim: ; cc0d6
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; cc0e4
|
||||
|
||||
_PlayBattleAnim: ; cc0e4
|
||||
_PlayBattleAnim:
|
||||
|
||||
ld c, 6
|
||||
.wait
|
||||
@@ -52,9 +51,8 @@ _PlayBattleAnim: ; cc0e4
|
||||
call BattleAnimDelayFrame
|
||||
call WaitSFX
|
||||
ret
|
||||
; cc11c
|
||||
|
||||
BattleAnimRunScript: ; cc11c
|
||||
BattleAnimRunScript:
|
||||
|
||||
ld a, [wFXAnimID + 1]
|
||||
and a
|
||||
@@ -97,9 +95,8 @@ BattleAnimRunScript: ; cc11c
|
||||
.done
|
||||
call BattleAnim_RevertPals
|
||||
ret
|
||||
; cc163
|
||||
|
||||
RunBattleAnimScript: ; cc163
|
||||
RunBattleAnimScript:
|
||||
|
||||
call ClearBattleAnims
|
||||
|
||||
@@ -140,9 +137,8 @@ RunBattleAnimScript: ; cc163
|
||||
|
||||
call BattleAnim_ClearCGB_OAMFlags
|
||||
ret
|
||||
; cc1a1
|
||||
|
||||
BattleAnimClearHud: ; cc1a1
|
||||
BattleAnimClearHud:
|
||||
|
||||
call BattleAnimDelayFrame
|
||||
call WaitTop
|
||||
@@ -154,9 +150,8 @@ BattleAnimClearHud: ; cc1a1
|
||||
call BattleAnimDelayFrame
|
||||
call WaitTop
|
||||
ret
|
||||
; cc1bb
|
||||
|
||||
BattleAnimRestoreHuds: ; cc1bb
|
||||
BattleAnimRestoreHuds:
|
||||
|
||||
call BattleAnimDelayFrame
|
||||
call WaitTop
|
||||
@@ -180,9 +175,8 @@ BattleAnimRestoreHuds: ; cc1bb
|
||||
call BattleAnimDelayFrame
|
||||
call WaitTop
|
||||
ret
|
||||
; cc1e2
|
||||
|
||||
BattleAnimRequestPals: ; cc1e2
|
||||
BattleAnimRequestPals:
|
||||
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
@@ -200,9 +194,8 @@ BattleAnimRequestPals: ; cc1e2
|
||||
cp b
|
||||
call nz, BattleAnim_SetOBPals
|
||||
ret
|
||||
; cc1fb
|
||||
|
||||
BattleAnimDelayFrame: ; cc1fb
|
||||
BattleAnimDelayFrame:
|
||||
; Like DelayFrame but wastes battery life.
|
||||
|
||||
ld a, 1
|
||||
@@ -212,9 +205,8 @@ BattleAnimDelayFrame: ; cc1fb
|
||||
and a
|
||||
jr nz, .wait
|
||||
ret
|
||||
; cc207
|
||||
|
||||
ClearActorHud: ; cc207
|
||||
ClearActorHud:
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
@@ -230,9 +222,8 @@ ClearActorHud: ; cc207
|
||||
lb bc, 5, 11
|
||||
call ClearBox
|
||||
ret
|
||||
; cc220
|
||||
|
||||
Unreferenced_Functioncc220: ; cc220
|
||||
Unreferenced_Functioncc220:
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld a, LOW(vBGMap0 tile $28)
|
||||
@@ -248,10 +239,9 @@ Unreferenced_Functioncc220: ; cc220
|
||||
ld [hBGMapAddress + 1], a
|
||||
call BattleAnimDelayFrame
|
||||
ret
|
||||
; cc23d
|
||||
|
||||
|
||||
BattleAnim_ClearCGB_OAMFlags: ; cc23d
|
||||
BattleAnim_ClearCGB_OAMFlags:
|
||||
|
||||
ld a, [wBattleAnimFlags]
|
||||
bit 3, a
|
||||
@@ -279,16 +269,14 @@ endr
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
ret
|
||||
; cc25f
|
||||
|
||||
RunBattleAnimCommand: ; cc25f
|
||||
RunBattleAnimCommand:
|
||||
call .CheckTimer
|
||||
ret nc
|
||||
call .RunScript
|
||||
ret
|
||||
; cc267
|
||||
|
||||
.CheckTimer: ; cc267
|
||||
.CheckTimer:
|
||||
ld a, [wBattleAnimDuration]
|
||||
and a
|
||||
jr z, .done
|
||||
@@ -301,9 +289,8 @@ RunBattleAnimCommand: ; cc25f
|
||||
.done
|
||||
scf
|
||||
ret
|
||||
; cc275
|
||||
|
||||
.RunScript: ; cc275
|
||||
.RunScript:
|
||||
.loop
|
||||
call GetBattleAnimByte
|
||||
|
||||
@@ -329,9 +316,8 @@ RunBattleAnimCommand: ; cc25f
|
||||
call .DoCommand
|
||||
|
||||
jr .loop
|
||||
; cc293
|
||||
|
||||
.DoCommand: ; cc293
|
||||
.DoCommand:
|
||||
; Execute battle animation command in [wBattleAnimByte].
|
||||
ld a, [wBattleAnimByte]
|
||||
sub $d0
|
||||
@@ -346,10 +332,9 @@ RunBattleAnimCommand: ; cc25f
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
; cc2a4
|
||||
|
||||
|
||||
BattleAnimCommands:: ; cc2a4 (33:42a4)
|
||||
BattleAnimCommands::
|
||||
; entries correspond to macros/scripts/battle_anims.asm enumeration
|
||||
dw BattleAnimCmd_Obj
|
||||
dw BattleAnimCmd_1GFX
|
||||
@@ -404,10 +389,10 @@ BattleAnimCommands:: ; cc2a4 (33:42a4)
|
||||
BattleAnimCmd_EA:
|
||||
BattleAnimCmd_EB:
|
||||
BattleAnimCmd_EC:
|
||||
BattleAnimCmd_ED: ; cc304 (33:4304)
|
||||
BattleAnimCmd_ED:
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Ret: ; cc305 (33:4305)
|
||||
BattleAnimCmd_Ret:
|
||||
ld hl, wBattleAnimFlags
|
||||
res 1, [hl]
|
||||
ld hl, wBattleAnimParent
|
||||
@@ -420,7 +405,7 @@ BattleAnimCmd_Ret: ; cc305 (33:4305)
|
||||
ld [hl], d
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Call: ; cc317 (33:4317)
|
||||
BattleAnimCmd_Call:
|
||||
call GetBattleAnimByte
|
||||
ld e, a
|
||||
call GetBattleAnimByte
|
||||
@@ -443,7 +428,7 @@ BattleAnimCmd_Call: ; cc317 (33:4317)
|
||||
set 1, [hl]
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Jump: ; cc339 (33:4339)
|
||||
BattleAnimCmd_Jump:
|
||||
call GetBattleAnimByte
|
||||
ld e, a
|
||||
call GetBattleAnimByte
|
||||
@@ -454,7 +439,7 @@ BattleAnimCmd_Jump: ; cc339 (33:4339)
|
||||
ld [hl], d
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Loop: ; cc348 (33:4348)
|
||||
BattleAnimCmd_Loop:
|
||||
call GetBattleAnimByte
|
||||
ld hl, wBattleAnimFlags
|
||||
bit 2, [hl]
|
||||
@@ -495,7 +480,7 @@ BattleAnimCmd_Loop: ; cc348 (33:4348)
|
||||
ld [hl], e
|
||||
ret
|
||||
|
||||
BattleAnimCmd_JumpUntil: ; cc383 (33:4383)
|
||||
BattleAnimCmd_JumpUntil:
|
||||
ld hl, wBattleAnimParam
|
||||
ld a, [hl]
|
||||
and a
|
||||
@@ -524,17 +509,17 @@ BattleAnimCmd_JumpUntil: ; cc383 (33:4383)
|
||||
ld [hl], e
|
||||
ret
|
||||
|
||||
BattleAnimCmd_SetVar: ; cc3a6 (33:43a6)
|
||||
BattleAnimCmd_SetVar:
|
||||
call GetBattleAnimByte
|
||||
ld [wBattleAnimVar], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_IncVar: ; cc3ad (33:43ad)
|
||||
BattleAnimCmd_IncVar:
|
||||
ld hl, wBattleAnimVar
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
BattleAnimCmd_IfVarEqual: ; cc3b2 (33:43b2)
|
||||
BattleAnimCmd_IfVarEqual:
|
||||
call GetBattleAnimByte
|
||||
ld hl, wBattleAnimVar
|
||||
cp [hl]
|
||||
@@ -562,7 +547,7 @@ BattleAnimCmd_IfVarEqual: ; cc3b2 (33:43b2)
|
||||
ld [hl], d
|
||||
ret
|
||||
|
||||
BattleAnimCmd_IfParamEqual: ; cc3d6 (33:43d6)
|
||||
BattleAnimCmd_IfParamEqual:
|
||||
call GetBattleAnimByte
|
||||
ld hl, wBattleAnimParam
|
||||
cp [hl]
|
||||
@@ -590,7 +575,7 @@ BattleAnimCmd_IfParamEqual: ; cc3d6 (33:43d6)
|
||||
ld [hl], d
|
||||
ret
|
||||
|
||||
BattleAnimCmd_IfParamAnd: ; cc3fa (33:43fa)
|
||||
BattleAnimCmd_IfParamAnd:
|
||||
call GetBattleAnimByte
|
||||
ld e, a
|
||||
ld a, [wBattleAnimParam]
|
||||
@@ -619,7 +604,7 @@ BattleAnimCmd_IfParamAnd: ; cc3fa (33:43fa)
|
||||
ld [hl], d
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Obj: ; cc41f (33:441f)
|
||||
BattleAnimCmd_Obj:
|
||||
; index, x, y, param
|
||||
call GetBattleAnimByte
|
||||
ld [wBattleAnimTemp0], a
|
||||
@@ -632,7 +617,7 @@ BattleAnimCmd_Obj: ; cc41f (33:441f)
|
||||
call QueueBattleAnimation
|
||||
ret
|
||||
|
||||
BattleAnimCmd_BGEffect: ; cc43b (33:443b)
|
||||
BattleAnimCmd_BGEffect:
|
||||
call GetBattleAnimByte
|
||||
ld [wBattleAnimTemp0], a
|
||||
call GetBattleAnimByte
|
||||
@@ -644,22 +629,22 @@ BattleAnimCmd_BGEffect: ; cc43b (33:443b)
|
||||
call _QueueBGEffect
|
||||
ret
|
||||
|
||||
BattleAnimCmd_BGP: ; cc457 (33:4457)
|
||||
BattleAnimCmd_BGP:
|
||||
call GetBattleAnimByte
|
||||
ld [wBGP], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_OBP0: ; cc45e (33:445e)
|
||||
BattleAnimCmd_OBP0:
|
||||
call GetBattleAnimByte
|
||||
ld [wOBP0], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_OBP1: ; cc465 (33:4465)
|
||||
BattleAnimCmd_OBP1:
|
||||
call GetBattleAnimByte
|
||||
ld [wOBP1], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_ResetObp0: ; cc46c (33:446c)
|
||||
BattleAnimCmd_ResetObp0:
|
||||
ld a, [hSGB]
|
||||
and a
|
||||
ld a, $e0
|
||||
@@ -669,7 +654,7 @@ BattleAnimCmd_ResetObp0: ; cc46c (33:446c)
|
||||
ld [wOBP0], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_ClearObjs: ; cc479 (33:4479)
|
||||
BattleAnimCmd_ClearObjs:
|
||||
ld hl, wActiveAnimObjects
|
||||
ld a, $a0
|
||||
.loop
|
||||
@@ -683,7 +668,7 @@ BattleAnimCmd_1GFX:
|
||||
BattleAnimCmd_2GFX:
|
||||
BattleAnimCmd_3GFX:
|
||||
BattleAnimCmd_4GFX:
|
||||
BattleAnimCmd_5GFX: ; cc485 (33:4485)
|
||||
BattleAnimCmd_5GFX:
|
||||
ld a, [wBattleAnimByte]
|
||||
and $f
|
||||
ld c, a
|
||||
@@ -718,7 +703,7 @@ endr
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
|
||||
BattleAnimCmd_IncObj:
|
||||
call GetBattleAnimByte
|
||||
ld e, 10
|
||||
ld bc, wActiveAnimObjects
|
||||
@@ -743,7 +728,7 @@ BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3)
|
||||
BattleAnimCmd_IncBGEffect:
|
||||
call GetBattleAnimByte
|
||||
ld e, 5
|
||||
ld bc, wActiveBGEffects
|
||||
@@ -768,7 +753,7 @@ BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3)
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
BattleAnimCmd_SetObj: ; cc506 (33:4506)
|
||||
BattleAnimCmd_SetObj:
|
||||
call GetBattleAnimByte
|
||||
ld e, 10
|
||||
ld bc, wActiveAnimObjects
|
||||
@@ -794,7 +779,7 @@ BattleAnimCmd_SetObj: ; cc506 (33:4506)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c)
|
||||
BattleAnimCmd_EnemyFeetObj:
|
||||
|
||||
ld hl, wBattleAnimTileDict
|
||||
.loop
|
||||
@@ -828,7 +813,7 @@ BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c)
|
||||
call .LoadFootprint
|
||||
ret
|
||||
|
||||
.LoadFootprint: ; cc561 (33:4561)
|
||||
.LoadFootprint:
|
||||
push af
|
||||
push hl
|
||||
push de
|
||||
@@ -849,7 +834,7 @@ BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c)
|
||||
jr nz, .LoadFootprint
|
||||
ret
|
||||
|
||||
BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
|
||||
BattleAnimCmd_PlayerHeadObj:
|
||||
|
||||
ld hl, wBattleAnimTileDict
|
||||
.loop
|
||||
@@ -883,7 +868,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
|
||||
call .LoadHead
|
||||
ret
|
||||
|
||||
.LoadHead: ; cc5b3 (33:45b3)
|
||||
.LoadHead:
|
||||
push af
|
||||
push hl
|
||||
push de
|
||||
@@ -904,16 +889,16 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
|
||||
jr nz, .LoadHead
|
||||
ret
|
||||
|
||||
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
|
||||
BattleAnimCmd_CheckPokeball:
|
||||
callfar GetPokeBallWobble
|
||||
ld a, c
|
||||
ld [wBattleAnimVar], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_E7: ; cc5db (33:45db)
|
||||
BattleAnimCmd_E7:
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Transform: ; cc5dc (33:45dc)
|
||||
BattleAnimCmd_Transform:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wCurPartySpecies)
|
||||
@@ -948,7 +933,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_UpdateActorPic: ; cc622 (33:4622)
|
||||
BattleAnimCmd_UpdateActorPic:
|
||||
|
||||
ld de, vTiles0 tile $00
|
||||
ld a, [hBattleTurn]
|
||||
@@ -968,7 +953,7 @@ BattleAnimCmd_UpdateActorPic: ; cc622 (33:4622)
|
||||
call Request2bpp
|
||||
ret
|
||||
|
||||
BattleAnimCmd_RaiseSub: ; cc640 (33:4640)
|
||||
BattleAnimCmd_RaiseSub:
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -1037,13 +1022,13 @@ GetSubstitutePic: ; used only for BANK(GetSubstitutePic)
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
||||
.CopyTile: ; cc6c6 (33:46c6)
|
||||
.CopyTile:
|
||||
ld bc, 1 tiles
|
||||
ld a, BANK(MonsterSpriteGFX)
|
||||
call FarCopyBytes
|
||||
ret
|
||||
|
||||
BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf)
|
||||
BattleAnimCmd_MinimizeOpp:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 1 ; unnecessary bankswitch?
|
||||
@@ -1057,7 +1042,7 @@ BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf)
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
||||
GetMinimizePic: ; cc6e7 (33:46e7)
|
||||
GetMinimizePic:
|
||||
ld hl, sScratch
|
||||
ld bc, $31 tiles
|
||||
.loop
|
||||
@@ -1087,19 +1072,17 @@ GetMinimizePic: ; cc6e7 (33:46e7)
|
||||
lb bc, BANK(GetMinimizePic), 6 * 6
|
||||
ret
|
||||
|
||||
CopyMinimizePic: ; cc719 (33:4719)
|
||||
CopyMinimizePic:
|
||||
ld hl, MinimizePic
|
||||
ld bc, $10
|
||||
ld a, BANK(MinimizePic)
|
||||
call FarCopyBytes
|
||||
ret
|
||||
; cc725 (33:4725)
|
||||
|
||||
MinimizePic: ; cc725
|
||||
MinimizePic:
|
||||
INCBIN "gfx/battle/minimize.2bpp"
|
||||
; cc735
|
||||
|
||||
BattleAnimCmd_Minimize: ; cc735 (33:4735)
|
||||
BattleAnimCmd_Minimize:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, 1 ; unnecessary bankswitch?
|
||||
@@ -1114,7 +1097,7 @@ BattleAnimCmd_Minimize: ; cc735 (33:4735)
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_DropSub: ; cc750 (33:4750)
|
||||
BattleAnimCmd_DropSub:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wCurPartySpecies)
|
||||
@@ -1139,7 +1122,7 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_BeatUp: ; cc776 (33:4776)
|
||||
BattleAnimCmd_BeatUp:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wCurPartySpecies)
|
||||
@@ -1175,31 +1158,31 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_OAMOn: ; cc7bb (33:47bb)
|
||||
BattleAnimCmd_OAMOn:
|
||||
xor a
|
||||
ld [hOAMUpdate], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_OAMOff: ; cc7bf (33:47bf)
|
||||
BattleAnimCmd_OAMOff:
|
||||
ld a, $1
|
||||
ld [hOAMUpdate], a
|
||||
ret
|
||||
|
||||
BattleAnimCmd_ClearSprites: ; cc7c4 (33:47c4)
|
||||
BattleAnimCmd_ClearSprites:
|
||||
ld hl, wBattleAnimFlags
|
||||
set 3, [hl]
|
||||
ret
|
||||
|
||||
BattleAnimCmd_F5: ; cc7ca (33:47ca)
|
||||
BattleAnimCmd_F5:
|
||||
ret
|
||||
|
||||
BattleAnimCmd_F6: ; cc7cb (33:47cb)
|
||||
BattleAnimCmd_F6:
|
||||
ret
|
||||
|
||||
BattleAnimCmd_F7: ; cc7cc (33:47cc)
|
||||
BattleAnimCmd_F7:
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Sound: ; cc7cd (33:47cd)
|
||||
BattleAnimCmd_Sound:
|
||||
call GetBattleAnimByte
|
||||
ld e, a
|
||||
srl a
|
||||
@@ -1222,13 +1205,11 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
|
||||
callfar PlayStereoSFX
|
||||
|
||||
ret
|
||||
; cc7f8 (33:47f8)
|
||||
|
||||
.GetPanning: ; cc7f8
|
||||
.GetPanning:
|
||||
db $f0, $0f, $f0, $0f
|
||||
; cc7fc
|
||||
|
||||
.GetCryTrack: ; cc7fc (33:47fc)
|
||||
.GetCryTrack:
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr nz, .enemy
|
||||
@@ -1241,7 +1222,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
|
||||
xor 1
|
||||
ret
|
||||
|
||||
BattleAnimCmd_Cry: ; cc807 (33:4807)
|
||||
BattleAnimCmd_Cry:
|
||||
call GetBattleAnimByte
|
||||
maskbits NUM_NOISE_CHANS
|
||||
ld e, a
|
||||
@@ -1315,18 +1296,16 @@ endr
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; cc871 (33:4871)
|
||||
|
||||
.CryData: ; cc871
|
||||
.CryData:
|
||||
; +pitch, +length
|
||||
dw $0000, $00c0
|
||||
dw $0000, $0040
|
||||
dw $0000, $0000
|
||||
dw $0000, $0000
|
||||
; cc881
|
||||
|
||||
|
||||
PlayHitSound: ; cc881
|
||||
PlayHitSound:
|
||||
ld a, [wNumHits]
|
||||
cp $1
|
||||
jr z, .okay
|
||||
@@ -1350,9 +1329,8 @@ PlayHitSound: ; cc881
|
||||
.play
|
||||
call PlaySFX
|
||||
ret
|
||||
; cc8a4
|
||||
|
||||
BattleAnimAssignPals: ; cc8a4
|
||||
BattleAnimAssignPals:
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr nz, .cgb
|
||||
@@ -1378,9 +1356,8 @@ BattleAnimAssignPals: ; cc8a4
|
||||
lb de, %11100100, %11100100
|
||||
call DmgToCgbObjPals
|
||||
ret
|
||||
; cc8d3
|
||||
|
||||
ClearBattleAnims: ; cc8d3
|
||||
ClearBattleAnims:
|
||||
; Clear animation block
|
||||
ld hl, wLYOverrides
|
||||
ld bc, wBattleAnimEnd - wLYOverrides
|
||||
@@ -1403,9 +1380,8 @@ ClearBattleAnims: ; cc8d3
|
||||
call BattleAnimAssignPals
|
||||
call BattleAnimDelayFrame
|
||||
ret
|
||||
; cc8f6
|
||||
|
||||
BattleAnim_RevertPals: ; cc8f6
|
||||
BattleAnim_RevertPals:
|
||||
call WaitTop
|
||||
ld a, %11100100
|
||||
ld [wBGP], a
|
||||
@@ -1421,9 +1397,8 @@ BattleAnim_RevertPals: ; cc8f6
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
; cc91a
|
||||
|
||||
BattleAnim_SetBGPals: ; cc91a
|
||||
BattleAnim_SetBGPals:
|
||||
ld [rBGP], a
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
@@ -1449,9 +1424,8 @@ BattleAnim_SetBGPals: ; cc91a
|
||||
ld a, $1
|
||||
ld [hCGBPalUpdate], a
|
||||
ret
|
||||
; cc94b
|
||||
|
||||
BattleAnim_SetOBPals: ; cc94b
|
||||
BattleAnim_SetOBPals:
|
||||
ld [rOBP0], a
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
@@ -1471,9 +1445,8 @@ BattleAnim_SetOBPals: ; cc94b
|
||||
ld a, $1
|
||||
ld [hCGBPalUpdate], a
|
||||
ret
|
||||
; cc96e
|
||||
|
||||
BattleAnim_UpdateOAM_All: ; cc96e
|
||||
BattleAnim_UpdateOAM_All:
|
||||
ld a, $0
|
||||
ld [wBattleAnimOAMPointerLo], a
|
||||
ld hl, wActiveAnimObjects
|
||||
@@ -1510,4 +1483,3 @@ BattleAnim_UpdateOAM_All: ; cc96e
|
||||
|
||||
.done
|
||||
ret
|
||||
; cc9a1
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
; BG effects for use in battle animations.
|
||||
|
||||
ExecuteBGEffects: ; c8000 (32:4000)
|
||||
ExecuteBGEffects:
|
||||
ld hl, wActiveBGEffects
|
||||
ld e, 5
|
||||
.loop
|
||||
@@ -29,7 +29,7 @@ ExecuteBGEffects: ; c8000 (32:4000)
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
QueueBGEffect: ; c801a (32:401a)
|
||||
QueueBGEffect:
|
||||
ld hl, wActiveBGEffects
|
||||
ld e, 5
|
||||
.loop
|
||||
@@ -58,13 +58,13 @@ QueueBGEffect: ; c801a (32:401a)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
EndBattleBGEffect: ; c8043 (32:4043)
|
||||
EndBattleBGEffect:
|
||||
ld hl, BG_EFFECT_STRUCT_FUNCTION
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
ret
|
||||
|
||||
DoBattleBGEffectFunction: ; c804a (32:404a)
|
||||
DoBattleBGEffectFunction:
|
||||
ld hl, BG_EFFECT_STRUCT_FUNCTION
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
@@ -77,7 +77,7 @@ DoBattleBGEffectFunction: ; c804a (32:404a)
|
||||
ld l, a
|
||||
jp hl
|
||||
|
||||
BattleBGEffects: ; c805a (32:405a)
|
||||
BattleBGEffects:
|
||||
; entries correspond to ANIM_BG_* constants
|
||||
dw BattleBGEffect_End
|
||||
dw BattleBGEffect_FlashInverted
|
||||
@@ -135,11 +135,11 @@ BattleBGEffects: ; c805a (32:405a)
|
||||
dw BattleBGEffect_35
|
||||
|
||||
|
||||
BattleBGEffect_End: ; c80c6 (32:40c6)
|
||||
BattleBGEffect_End:
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca)
|
||||
BatttleBGEffects_GetNamedJumptablePointer:
|
||||
ld hl, BG_EFFECT_STRUCT_JT_INDEX
|
||||
add hl, bc
|
||||
ld l, [hl]
|
||||
@@ -151,7 +151,7 @@ BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca)
|
||||
ld l, a
|
||||
ret
|
||||
|
||||
BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7)
|
||||
BattleBGEffects_AnonJumptable:
|
||||
pop de
|
||||
ld hl, BG_EFFECT_STRUCT_JT_INDEX
|
||||
add hl, bc
|
||||
@@ -164,31 +164,29 @@ BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7)
|
||||
ld l, a
|
||||
jp hl
|
||||
|
||||
BattleBGEffects_IncrementJumptable: ; c80e5 (32:40e5)
|
||||
BattleBGEffects_IncrementJumptable:
|
||||
ld hl, BG_EFFECT_STRUCT_JT_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
BattleBGEffect_FlashInverted: ; c80eb (32:40eb)
|
||||
BattleBGEffect_FlashInverted:
|
||||
ld de, .inverted
|
||||
jp BattleBGEffect_FlashContinue
|
||||
|
||||
.inverted
|
||||
db %11100100 ; 3210
|
||||
db %00011011 ; 0123
|
||||
; c80f3
|
||||
|
||||
BattleBGEffect_FlashWhite: ; c80f3 (32:40f3)
|
||||
BattleBGEffect_FlashWhite:
|
||||
ld de, .white
|
||||
jp BattleBGEffect_FlashContinue
|
||||
|
||||
.white
|
||||
db %11100100 ; 3210
|
||||
db %00000000 ; 0000
|
||||
; c80fb
|
||||
|
||||
BattleBGEffect_FlashContinue: ; c80fb (32:40fb)
|
||||
BattleBGEffect_FlashContinue:
|
||||
; current timer, flash duration, number of flashes
|
||||
ld a, $1
|
||||
ld [wBattleAnimTemp0], a
|
||||
@@ -226,7 +224,7 @@ BattleBGEffect_FlashContinue: ; c80fb (32:40fb)
|
||||
ld [wBGP], a
|
||||
ret
|
||||
|
||||
BattleBGEffect_WhiteHues: ; c812d (32:412d)
|
||||
BattleBGEffect_WhiteHues:
|
||||
ld de, .Pals
|
||||
call BattleBGEffect_GetNthDMGPal
|
||||
jr c, .quit
|
||||
@@ -242,9 +240,8 @@ BattleBGEffect_WhiteHues: ; c812d (32:412d)
|
||||
db %11100000
|
||||
db %11010000
|
||||
db -1
|
||||
; c8141
|
||||
|
||||
BattleBGEffect_BlackHues: ; c8141 (32:4141)
|
||||
BattleBGEffect_BlackHues:
|
||||
ld de, .Pals
|
||||
call BattleBGEffect_GetNthDMGPal
|
||||
jr c, .quit
|
||||
@@ -260,9 +257,8 @@ BattleBGEffect_BlackHues: ; c8141 (32:4141)
|
||||
db %11110100
|
||||
db %11111000
|
||||
db -1
|
||||
; c8155
|
||||
|
||||
BattleBGEffect_AlternateHues: ; c8155 (32:4155)
|
||||
BattleBGEffect_AlternateHues:
|
||||
ld de, .Pals
|
||||
call BattleBGEffect_GetNthDMGPal
|
||||
jr c, .quit
|
||||
@@ -284,9 +280,8 @@ BattleBGEffect_AlternateHues: ; c8155 (32:4155)
|
||||
db %01000000
|
||||
db %10010000
|
||||
db -2
|
||||
; c8171
|
||||
|
||||
BattleBGEffect_06: ; c8171 (32:4171)
|
||||
BattleBGEffect_06:
|
||||
call BattleBGEffects_CheckSGB
|
||||
jr nz, .sgb
|
||||
ld de, .PalsCGB
|
||||
@@ -308,9 +303,8 @@ BattleBGEffect_06: ; c8171 (32:4171)
|
||||
db %11110000
|
||||
db %11000000
|
||||
db -2
|
||||
; c818b
|
||||
|
||||
BattleBGEffect_07: ; c818b (32:418b)
|
||||
BattleBGEffect_07:
|
||||
call BattleBGEffects_CheckSGB
|
||||
jr nz, .sgb
|
||||
ld de, .PalsCGB
|
||||
@@ -332,9 +326,8 @@ BattleBGEffect_07: ; c818b (32:418b)
|
||||
db %11110000
|
||||
db %11001100
|
||||
db -2
|
||||
; c81a5
|
||||
|
||||
BattleBGEffect_08: ; c81a5 (32:41a5)
|
||||
BattleBGEffect_08:
|
||||
ld de, .Pals
|
||||
call BattleBGEffect_GetNthDMGPal
|
||||
ld [wBGP], a
|
||||
@@ -345,9 +338,8 @@ BattleBGEffect_08: ; c81a5 (32:41a5)
|
||||
db %01100011
|
||||
db %10000111
|
||||
db -2
|
||||
; c81b3
|
||||
|
||||
BattleBGEffect_HideMon: ; c81b3 (32:41b3)
|
||||
BattleBGEffect_HideMon:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -384,7 +376,7 @@ BattleBGEffect_HideMon: ; c81b3 (32:41b3)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BattleBGEffect_ShowMon: ; c81ea (32:41ea)
|
||||
BattleBGEffect_ShowMon:
|
||||
call BGEffect_CheckFlyDigStatus
|
||||
jr z, .not_flying
|
||||
call EndBattleBGEffect
|
||||
@@ -412,9 +404,8 @@ BattleBGEffect_ShowMon: ; c81ea (32:41ea)
|
||||
.EnemyData:
|
||||
db 3, $00, 3
|
||||
db -1
|
||||
; c8214
|
||||
|
||||
BattleBGEffect_FeetFollow: ; c8214 (32:4214)
|
||||
BattleBGEffect_FeetFollow:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -482,7 +473,7 @@ BattleBGEffect_FeetFollow: ; c8214 (32:4214)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BattleBGEffect_HeadFollow: ; c8281 (32:4281)
|
||||
BattleBGEffect_HeadFollow:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -550,11 +541,11 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
_QueueBattleAnimation: ; c82ee (32:42ee)
|
||||
_QueueBattleAnimation:
|
||||
callfar QueueBattleAnimation
|
||||
ret
|
||||
|
||||
BattleBGEffect_27: ; c82f5 (32:42f5)
|
||||
BattleBGEffect_27:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -655,7 +646,7 @@ BattleBGEffect_27: ; c82f5 (32:42f5)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BattleBGEffect_EnterMon: ; c837b (32:437b)
|
||||
BattleBGEffect_EnterMon:
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn
|
||||
ld de, .EnemyData
|
||||
@@ -681,9 +672,8 @@ BattleBGEffect_EnterMon: ; c837b (32:437b)
|
||||
db 4, $00, 4
|
||||
db 3, $00, 3
|
||||
db -1
|
||||
; c83a8
|
||||
|
||||
BattleBGEffect_ReturnMon: ; c83a8 (32:43a8)
|
||||
BattleBGEffect_ReturnMon:
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn
|
||||
ld de, .EnemyData
|
||||
@@ -717,9 +707,8 @@ BattleBGEffect_ReturnMon: ; c83a8 (32:43a8)
|
||||
db -2, $33, 5
|
||||
db -3, $00, 0
|
||||
db -1
|
||||
; c83ed
|
||||
|
||||
BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed)
|
||||
BattleBGEffect_RunPicResizeScript:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -918,9 +907,8 @@ ENDM
|
||||
db $00, $15, $2a
|
||||
db $03, $18, $2d
|
||||
db $06, $1b, $30
|
||||
; c8545
|
||||
|
||||
BattleBGEffect_Surf: ; c8545 (32:4545)
|
||||
BattleBGEffect_Surf:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -987,7 +975,7 @@ BattleBGEffect_Surf: ; c8545 (32:4545)
|
||||
jr c, .loop2
|
||||
ret
|
||||
|
||||
BattleBGEffect_Whirlpool: ; c8599 (32:4599)
|
||||
BattleBGEffect_Whirlpool:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1016,14 +1004,14 @@ BattleBGEffect_Whirlpool: ; c8599 (32:4599)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_30: ; c85c2 (32:45c2)
|
||||
BattleBGEffect_30:
|
||||
call BattleBGEffects_ClearLYOverrides
|
||||
ld a, rSCY - $ff00
|
||||
call BattleBGEffect_SetLCDStatCustoms1
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BattleBGEffect_31: ; c85ce (32:45ce)
|
||||
BattleBGEffect_31:
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -1057,11 +1045,11 @@ BattleBGEffect_31: ; c85ce (32:45ce)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BattleBGEffect_32: ; c8603 (32:4603)
|
||||
BattleBGEffect_32:
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_Psychic: ; c8607 (32:4607)
|
||||
BattleBGEffect_Psychic:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1099,7 +1087,7 @@ BattleBGEffect_Psychic: ; c8607 (32:4607)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_Teleport: ; c863f (32:463f)
|
||||
BattleBGEffect_Teleport:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1124,7 +1112,7 @@ BattleBGEffect_Teleport: ; c863f (32:463f)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_NightShade: ; c8662 (32:4662)
|
||||
BattleBGEffect_NightShade:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1152,7 +1140,7 @@ BattleBGEffect_NightShade: ; c8662 (32:4662)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
|
||||
BattleBGEffect_DoubleTeam:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1247,7 +1235,7 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_AcidArmor: ; c8709 (32:4709)
|
||||
BattleBGEffect_AcidArmor:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1310,7 +1298,7 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_Withdraw: ; c8761 (32:4761)
|
||||
BattleBGEffect_Withdraw:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1359,7 +1347,7 @@ BattleBGEffect_Withdraw: ; c8761 (32:4761)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_Dig: ; c87a7 (32:47a7)
|
||||
BattleBGEffect_Dig:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1426,7 +1414,7 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_Tackle: ; c8805 (32:4805)
|
||||
BattleBGEffect_Tackle:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1461,7 +1449,7 @@ BattleBGEffect_Tackle: ; c8805 (32:4805)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_25: ; c8837 (32:4837)
|
||||
BattleBGEffect_25:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1537,7 +1525,7 @@ Tackle_BGEffect25_2d_two:
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
Functionc88a5: ; c88a5 (32:48a5)
|
||||
Functionc88a5:
|
||||
push af
|
||||
ld a, [wFXAnimID + 1] ; FXAnimID + 1
|
||||
or a
|
||||
@@ -1589,7 +1577,7 @@ Functionc88a5: ; c88a5 (32:48a5)
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
BattleBGEffect_2d: ; c88e7 (32:48e7)
|
||||
BattleBGEffect_2d:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw BGEffect2d_2f_zero
|
||||
@@ -1624,7 +1612,7 @@ BGEffect2d_2f_zero:
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
BattleBGEffect_2f: ; c8919 (32:4919)
|
||||
BattleBGEffect_2f:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw BGEffect2d_2f_zero
|
||||
@@ -1638,7 +1626,7 @@ BattleBGEffect_2f: ; c8919 (32:4919)
|
||||
.two
|
||||
ret
|
||||
|
||||
BattleBGEffect_26: ; c892a (32:492a)
|
||||
BattleBGEffect_26:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1677,7 +1665,7 @@ BattleBGEffect_26: ; c892a (32:492a)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_2c: ; c8964 (32:4964)
|
||||
BattleBGEffect_2c:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1732,7 +1720,7 @@ BattleBGEffect_2c: ; c8964 (32:4964)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_28: ; c89b5 (32:49b5)
|
||||
BattleBGEffect_28:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1775,7 +1763,7 @@ BattleBGEffect_28: ; c89b5 (32:49b5)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_BounceDown: ; c89ee (32:49ee)
|
||||
BattleBGEffect_BounceDown:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1826,7 +1814,7 @@ BattleBGEffect_BounceDown: ; c89ee (32:49ee)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_2a: ; c8a3a (32:4a3a)
|
||||
BattleBGEffect_2a:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1933,9 +1921,8 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
|
||||
.data
|
||||
db $00, $40, $90, $e4
|
||||
db -1
|
||||
; c8acc
|
||||
|
||||
BattleBGEffect_2b: ; c8acc (32:4acc)
|
||||
BattleBGEffect_2b:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -1972,7 +1959,7 @@ BattleBGEffect_2b: ; c8acc (32:4acc)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_1c: ; c8b00 (32:4b00)
|
||||
BattleBGEffect_1c:
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr nz, .cgb
|
||||
@@ -2130,97 +2117,87 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
|
||||
db $90, $f8
|
||||
db $40, $fc
|
||||
db $90, $f8
|
||||
; c8be8
|
||||
|
||||
BattleBGEffect_RapidFlash: ; c8be8 (32:4be8)
|
||||
BattleBGEffect_RapidFlash:
|
||||
ld de, .FlashPals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.FlashPals:
|
||||
db $e4, $6c, $fe
|
||||
; c8bf2
|
||||
|
||||
BattleBGEffect_16: ; c8bf2 (32:4bf2)
|
||||
BattleBGEffect_16:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $e4, $90, $40, $ff
|
||||
; c8bfd
|
||||
|
||||
BattleBGEffect_17: ; c8bfd (32:4bfd)
|
||||
BattleBGEffect_17:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $e4, $f8, $fc, $ff
|
||||
; c8c08
|
||||
|
||||
BattleBGEffect_18: ; c8c08 (32:4c08)
|
||||
BattleBGEffect_18:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $e4, $90, $40, $90, $fe
|
||||
; c8c14
|
||||
|
||||
BattleBGEffect_19: ; c8c14 (32:4c14)
|
||||
BattleBGEffect_19:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $e4, $f8, $fc, $f8, $fe
|
||||
; c8c20
|
||||
|
||||
BattleBGEffect_1a: ; c8c20 (32:4c20)
|
||||
BattleBGEffect_1a:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $e4, $f8, $fc, $f8, $e4, $90, $40, $90, $fe
|
||||
; c8c30
|
||||
|
||||
BattleBGEffect_1b: ; c8c30 (32:4c30)
|
||||
BattleBGEffect_1b:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $e4, $fc, $e4, $00, $fe
|
||||
; c8c3c
|
||||
|
||||
BattleBGEffect_1d: ; c8c3c (32:4c3c)
|
||||
BattleBGEffect_1d:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $e4, $90, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $90, $e4, $ff
|
||||
; c8c55
|
||||
|
||||
BattleBGEffect_1e: ; c8c55 (32:4c55)
|
||||
BattleBGEffect_1e:
|
||||
ld de, .Pals
|
||||
call BGEffect_RapidCyclePals
|
||||
ret
|
||||
|
||||
.Pals:
|
||||
db $00, $40, $90, $e4, $ff
|
||||
; c8c61
|
||||
|
||||
BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
|
||||
BattleBGEffect_VibrateMon:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
dw .one
|
||||
|
||||
|
||||
.zero ; c8c68 (32:4c68)
|
||||
.zero
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
call BattleBGEffects_ClearLYOverrides
|
||||
ld a, rSCX - $ff00
|
||||
@@ -2236,7 +2213,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
|
||||
ld [hl], $20
|
||||
ret
|
||||
|
||||
.one ; c8c85 (32:4c85)
|
||||
.one
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2258,7 +2235,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
||||
BattleBGEffect_WobbleMon:
|
||||
call BattleBGEffects_AnonJumptable
|
||||
.anon_dw
|
||||
dw .zero
|
||||
@@ -2266,7 +2243,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
||||
dw .two
|
||||
|
||||
|
||||
.zero ; c8cab (32:4cab)
|
||||
.zero
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
call BattleBGEffects_ClearLYOverrides
|
||||
ld a, rSCX - $ff00
|
||||
@@ -2280,7 +2257,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
||||
.one ; c8cc3 (32:4cc3)
|
||||
.one
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2296,11 +2273,11 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.two ; c8cdd (32:4cdd)
|
||||
.two
|
||||
call BattleAnim_ResetLCDStatCustom
|
||||
ret
|
||||
|
||||
BattleBGEffect_2e: ; c8ce1 (32:4ce1)
|
||||
BattleBGEffect_2e:
|
||||
call Functionc8d0b
|
||||
jr c, .xor_a
|
||||
bit 7, a
|
||||
@@ -2317,7 +2294,7 @@ BattleBGEffect_2e: ; c8ce1 (32:4ce1)
|
||||
ld [wAnimObject01YOffset], a
|
||||
ret
|
||||
|
||||
BattleBGEffect_1f: ; c8cf9 (32:4cf9)
|
||||
BattleBGEffect_1f:
|
||||
call Functionc8d0b
|
||||
jr nc, .skip
|
||||
xor a
|
||||
@@ -2325,7 +2302,7 @@ BattleBGEffect_1f: ; c8cf9 (32:4cf9)
|
||||
ld [hSCX], a
|
||||
ret
|
||||
|
||||
BattleBGEffect_20: ; c8d02 (32:4d02)
|
||||
BattleBGEffect_20:
|
||||
call Functionc8d0b
|
||||
jr nc, .skip
|
||||
xor a
|
||||
@@ -2333,7 +2310,7 @@ BattleBGEffect_20: ; c8d02 (32:4d02)
|
||||
ld [hSCY], a
|
||||
ret
|
||||
|
||||
Functionc8d0b: ; c8d0b (32:4d0b)
|
||||
Functionc8d0b:
|
||||
ld hl, BG_EFFECT_STRUCT_JT_INDEX
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2371,7 +2348,7 @@ Functionc8d0b: ; c8d0b (32:4d0b)
|
||||
and a
|
||||
ret
|
||||
|
||||
BattleBGEffect_35: ; c8d3a (32:4d3a)
|
||||
BattleBGEffect_35:
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2392,7 +2369,7 @@ BattleBGEffect_35: ; c8d3a (32:4d3a)
|
||||
ld [hSCX], a
|
||||
ret
|
||||
|
||||
BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57)
|
||||
BattleBGEffect_GetNthDMGPal:
|
||||
ld hl, BG_EFFECT_STRUCT_JT_INDEX
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2415,7 +2392,7 @@ BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57)
|
||||
call BattleBGEffect_GetFirstDMGPal
|
||||
ret
|
||||
|
||||
BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
BGEffect_RapidCyclePals:
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr nz, .cgb
|
||||
@@ -2431,7 +2408,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dw .two_dmg
|
||||
|
||||
|
||||
.zero_dmg ; c8d8b (32:4d8b)
|
||||
.zero_dmg
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
ld a, $e4
|
||||
call BattleBGEffects_SetLYOverrides
|
||||
@@ -2449,7 +2426,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.one_dmg ; c8daa (32:4daa)
|
||||
.one_dmg
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2474,7 +2451,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.two_dmg ; c8dc9 (32:4dc9)
|
||||
.two_dmg
|
||||
call BattleBGEffects_ResetVideoHRAM
|
||||
ld a, %11100100
|
||||
ld [rBGP], a
|
||||
@@ -2488,7 +2465,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
pop de
|
||||
jp hl
|
||||
|
||||
.Jumptable_CGB: ; c8ddd (32:4ddd)
|
||||
.Jumptable_CGB:
|
||||
dw .zero_cgb
|
||||
dw .one_cgb
|
||||
dw .two_cgb
|
||||
@@ -2496,7 +2473,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dw .four_cgb
|
||||
|
||||
|
||||
.zero_cgb ; c8de7 (32:4de7)
|
||||
.zero_cgb
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn_cgb
|
||||
call BattleBGEffects_IncrementJumptable
|
||||
@@ -2512,7 +2489,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.one_cgb ; c8e02 (32:4e02)
|
||||
.one_cgb
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2537,13 +2514,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.two_cgb ; c8e21 (32:4e21)
|
||||
.two_cgb
|
||||
ld a, $e4
|
||||
call BGEffects_LoadBGPal0_OBPal1
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
.three_cgb ; c8e2a (32:4e2a)
|
||||
.three_cgb
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -2568,13 +2545,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.four_cgb ; c8e49 (32:4e49)
|
||||
.four_cgb
|
||||
ld a, $e4
|
||||
call BGEffects_LoadBGPal1_OBPal0
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
|
||||
BGEffects_LoadBGPal0_OBPal1:
|
||||
ld h, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -2601,7 +2578,7 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
|
||||
ld [hCGBPalUpdate], a
|
||||
ret
|
||||
|
||||
BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f)
|
||||
BGEffects_LoadBGPal1_OBPal0:
|
||||
ld h, a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -2628,12 +2605,12 @@ BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f)
|
||||
ld [hCGBPalUpdate], a
|
||||
ret
|
||||
|
||||
BattleBGEffect_GetFirstDMGPal: ; c8eac (32:4eac)
|
||||
BattleBGEffect_GetFirstDMGPal:
|
||||
ld hl, BG_EFFECT_STRUCT_03
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2)
|
||||
BattleBGEffect_GetNextDMGPal:
|
||||
ld l, a
|
||||
ld h, $0
|
||||
add hl, de
|
||||
@@ -2654,9 +2631,9 @@ BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2)
|
||||
scf
|
||||
ret
|
||||
|
||||
BattleBGEffects_ClearLYOverrides: ; c8eca (32:4eca)
|
||||
BattleBGEffects_ClearLYOverrides:
|
||||
xor a
|
||||
BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
|
||||
BattleBGEffects_SetLYOverrides:
|
||||
ld hl, wLYOverrides ; wListPointer
|
||||
ld e, $99
|
||||
.loop1
|
||||
@@ -2671,7 +2648,7 @@ BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
|
||||
jr nz, .loop2
|
||||
ret
|
||||
|
||||
BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
|
||||
BattleBGEffect_SetLCDStatCustoms1:
|
||||
ld [hLCDCPointer], a
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn
|
||||
@@ -2687,7 +2664,7 @@ BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
|
||||
ld [hLYOverrideEnd], a
|
||||
ret
|
||||
|
||||
BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
|
||||
BattleBGEffect_SetLCDStatCustoms2:
|
||||
ld [hLCDCPointer], a
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn
|
||||
@@ -2703,7 +2680,7 @@ BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
|
||||
ld [hLYOverrideEnd], a
|
||||
ret
|
||||
|
||||
BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a)
|
||||
BattleAnim_ResetLCDStatCustom:
|
||||
xor a
|
||||
ld [hLYOverrideStart], a
|
||||
ld [hLYOverrideEnd], a
|
||||
@@ -2713,7 +2690,7 @@ BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a)
|
||||
call EndBattleBGEffect
|
||||
ret
|
||||
|
||||
BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19)
|
||||
BattleBGEffects_ResetVideoHRAM:
|
||||
xor a
|
||||
ld [hLCDCPointer], a
|
||||
ld a, %11100100
|
||||
@@ -2725,7 +2702,7 @@ BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19)
|
||||
call BattleBGEffects_ClearLYOverrides
|
||||
ret
|
||||
|
||||
Functionc8f2e: ; c8f2e (32:4f2e)
|
||||
Functionc8f2e:
|
||||
push bc
|
||||
xor a
|
||||
ld [wBattleAnimTemp0], a
|
||||
@@ -2760,7 +2737,7 @@ Functionc8f2e: ; c8f2e (32:4f2e)
|
||||
pop bc
|
||||
ret
|
||||
|
||||
InitSurfWaves: ; c8f69 (32:4f69)
|
||||
InitSurfWaves:
|
||||
push bc
|
||||
xor a
|
||||
ld [wBattleAnimTemp0], a
|
||||
@@ -2788,7 +2765,7 @@ InitSurfWaves: ; c8f69 (32:4f69)
|
||||
pop bc
|
||||
ret
|
||||
|
||||
Functionc8f9a: ; c8f9a (32:4f9a)
|
||||
Functionc8f9a:
|
||||
push bc
|
||||
ld [wBattleAnimTemp3], a
|
||||
ld a, e
|
||||
@@ -2847,7 +2824,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
|
||||
ld d, $0
|
||||
ret
|
||||
|
||||
BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
|
||||
BattleBGEffect_WavyScreenFX:
|
||||
push bc
|
||||
ld a, [hLYOverrideStart]
|
||||
ld l, a
|
||||
@@ -2874,7 +2851,7 @@ BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
|
||||
pop bc
|
||||
ret
|
||||
|
||||
BGEffect_FillLYOverridesBackup: ; c900b (32:500b)
|
||||
BGEffect_FillLYOverridesBackup:
|
||||
push af
|
||||
ld h, HIGH(wLYOverridesBackup)
|
||||
ld a, [hLYOverrideStart]
|
||||
@@ -2889,7 +2866,7 @@ BGEffect_FillLYOverridesBackup: ; c900b (32:500b)
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b)
|
||||
BGEffect_DisplaceLYOverridesBackup:
|
||||
; e = a; d = [hLYOverrideEnd] - [hLYOverrideStart] - a
|
||||
push af
|
||||
ld e, a
|
||||
@@ -2915,7 +2892,7 @@ BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b)
|
||||
jr nz, .loop2
|
||||
ret
|
||||
|
||||
BGEffect_CheckBattleTurn: ; c9038 (32:5038)
|
||||
BGEffect_CheckBattleTurn:
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hBattleTurn]
|
||||
@@ -2923,7 +2900,7 @@ BGEffect_CheckBattleTurn: ; c9038 (32:5038)
|
||||
xor [hl]
|
||||
ret
|
||||
|
||||
BGEffect_CheckFlyDigStatus: ; c9042 (32:5042)
|
||||
BGEffect_CheckFlyDigStatus:
|
||||
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
|
||||
add hl, bc
|
||||
ld a, [hBattleTurn]
|
||||
@@ -2939,21 +2916,20 @@ BGEffect_CheckFlyDigStatus: ; c9042 (32:5042)
|
||||
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
|
||||
ret
|
||||
|
||||
BattleBGEffects_CheckSGB: ; c9059 (32:5059)
|
||||
BattleBGEffects_CheckSGB:
|
||||
ld a, [hSGB]
|
||||
and a
|
||||
ret
|
||||
|
||||
BattleBGEffects_Sine: ; c905d (32:505d)
|
||||
BattleBGEffects_Sine:
|
||||
ld e, a
|
||||
callfar BattleAnim_Sine_e
|
||||
ld a, e
|
||||
ret
|
||||
|
||||
BattleBGEffects_Cosine: ; c9066 (32:5066)
|
||||
BattleBGEffects_Cosine:
|
||||
ld e, a
|
||||
callfar BattleAnim_Cosine_e
|
||||
ld a, e
|
||||
ret
|
||||
|
||||
; c906f (32:506f)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
QueueBattleAnimation: ; cc9a1 (33:49a1)
|
||||
QueueBattleAnimation:
|
||||
ld hl, wActiveAnimObjects
|
||||
ld e, 10
|
||||
.loop
|
||||
@@ -20,15 +20,14 @@ QueueBattleAnimation: ; cc9a1 (33:49a1)
|
||||
call InitBattleAnimation
|
||||
ret
|
||||
|
||||
DeinitBattleAnimation: ; cc9bd
|
||||
DeinitBattleAnimation:
|
||||
ld hl, BATTLEANIMSTRUCT_INDEX
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
||||
; cc9c4
|
||||
|
||||
InitBattleAnimation: ; cc9c4 (33:49c4)
|
||||
InitBattleAnimation:
|
||||
ld a, [wBattleAnimTemp0]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@@ -79,7 +78,7 @@ endr
|
||||
ld [hl], a ; 10
|
||||
ret
|
||||
|
||||
BattleAnimOAMUpdate: ; cca09
|
||||
BattleAnimOAMUpdate:
|
||||
call InitBattleAnimBuffer
|
||||
call GetBattleAnimFrame
|
||||
cp -3
|
||||
@@ -191,9 +190,8 @@ BattleAnimOAMUpdate: ; cca09
|
||||
scf
|
||||
ret
|
||||
|
||||
; ccaaa
|
||||
|
||||
InitBattleAnimBuffer: ; ccaaa
|
||||
InitBattleAnimBuffer:
|
||||
ld hl, BATTLEANIMSTRUCT_01
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@@ -276,9 +274,8 @@ InitBattleAnimBuffer: ; ccaaa
|
||||
ld [wBattleAnimTempXOffset], a
|
||||
ret
|
||||
|
||||
; ccb31
|
||||
|
||||
GetBattleAnimTileOffset: ; ccb31 (33:4b31)
|
||||
GetBattleAnimTileOffset:
|
||||
push hl
|
||||
push bc
|
||||
ld hl, wBattleAnimTileDict
|
||||
@@ -301,14 +298,12 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31)
|
||||
pop hl
|
||||
ret
|
||||
|
||||
_ExecuteBGEffects: ; ccb48
|
||||
_ExecuteBGEffects:
|
||||
callfar ExecuteBGEffects
|
||||
ret
|
||||
|
||||
; ccb4f
|
||||
|
||||
_QueueBGEffect: ; ccb4f (33:4b4f)
|
||||
_QueueBGEffect:
|
||||
callfar QueueBGEffect
|
||||
ret
|
||||
|
||||
; ccb56 (33:4b56)
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
ReinitBattleAnimFrameset: ; ce7bf (33:67bf)
|
||||
ReinitBattleAnimFrameset:
|
||||
ld hl, BATTLEANIMSTRUCT_FRAMESET_ID
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
@@ -10,7 +10,7 @@ ReinitBattleAnimFrameset: ; ce7bf (33:67bf)
|
||||
ld [hl], -1
|
||||
ret
|
||||
|
||||
GetBattleAnimFrame: ; ce7d1
|
||||
GetBattleAnimFrame:
|
||||
.loop
|
||||
ld hl, BATTLEANIMSTRUCT_DURATION
|
||||
add hl, bc
|
||||
@@ -72,9 +72,8 @@ GetBattleAnimFrame: ; ce7d1
|
||||
ld [hl], a
|
||||
jr .loop
|
||||
|
||||
; ce823
|
||||
|
||||
.GetPointer: ; ce823
|
||||
.GetPointer:
|
||||
ld hl, BATTLEANIMSTRUCT_FRAMESET_ID
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
@@ -93,9 +92,8 @@ GetBattleAnimFrame: ; ce7d1
|
||||
add hl, de
|
||||
ret
|
||||
|
||||
; ce83c
|
||||
|
||||
GetBattleAnimOAMPointer: ; ce83c
|
||||
GetBattleAnimOAMPointer:
|
||||
ld l, a
|
||||
ld h, 0
|
||||
ld de, BattleAnimOAMData
|
||||
@@ -104,9 +102,8 @@ GetBattleAnimOAMPointer: ; ce83c
|
||||
add hl, de
|
||||
ret
|
||||
|
||||
; ce846
|
||||
|
||||
LoadBattleAnimObj: ; ce846 (33:6846)
|
||||
LoadBattleAnimObj:
|
||||
push hl
|
||||
ld l, a
|
||||
ld h, 0
|
||||
@@ -127,4 +124,3 @@ LoadBattleAnimObj: ; ce846 (33:6846)
|
||||
pop bc
|
||||
ret
|
||||
|
||||
; ce85e (33:685e)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
GetPokeBallWobble: ; f971 (3:7971)
|
||||
GetPokeBallWobble:
|
||||
; Returns whether a Poke Ball will wobble in the catch animation.
|
||||
; Whether a Pokemon is caught is determined beforehand.
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
_BasementKey: ; 507b4
|
||||
_BasementKey:
|
||||
; Are we even in the right map to use this?
|
||||
ld a, [wMapGroup]
|
||||
cp GROUP_GOLDENROD_UNDERGROUND
|
||||
@@ -26,7 +26,6 @@ _BasementKey: ; 507b4
|
||||
ld a, FALSE
|
||||
ld [wItemEffectSucceeded], a
|
||||
ret
|
||||
; 507e1
|
||||
|
||||
.BasementKeyScript: ; 0x507e1
|
||||
closetext
|
||||
|
@@ -1,17 +1,15 @@
|
||||
BattleTowerRoomMenu: ; 1700b0
|
||||
BattleTowerRoomMenu:
|
||||
; special
|
||||
call InitBattleTowerChallengeRAM
|
||||
farcall _BattleTowerRoomMenu
|
||||
ret
|
||||
; 1700ba
|
||||
|
||||
Function1700ba: ; 1700ba
|
||||
Function1700ba:
|
||||
call InitBattleTowerChallengeRAM
|
||||
farcall Function11811a
|
||||
ret
|
||||
; 1700c4
|
||||
|
||||
Function1700c4: ; 1700c4
|
||||
Function1700c4:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $3
|
||||
@@ -51,16 +49,14 @@ Function1700c4: ; 1700c4
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 170114
|
||||
|
||||
Function170114: ; 170114
|
||||
Function170114:
|
||||
call InitBattleTowerChallengeRAM
|
||||
call .Function170121
|
||||
farcall Function11805f
|
||||
ret
|
||||
; 170121
|
||||
|
||||
.Function170121: ; 170121
|
||||
.Function170121:
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld hl, $a948
|
||||
@@ -70,9 +66,8 @@ Function170114: ; 170114
|
||||
call CloseSRAM
|
||||
call Function170c8b
|
||||
ret
|
||||
; 170139
|
||||
|
||||
Function170139: ; 170139
|
||||
Function170139:
|
||||
; Convert the 4-digit decimal number at 5:aa41 into binary
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
@@ -167,9 +162,8 @@ Function170139: ; 170139
|
||||
call CopyBytes
|
||||
call CloseSRAM
|
||||
ret
|
||||
; 17020c
|
||||
|
||||
.DecToBin: ; 17020c
|
||||
.DecToBin:
|
||||
ld a, [de]
|
||||
inc de
|
||||
and a
|
||||
@@ -180,29 +174,25 @@ Function170139: ; 170139
|
||||
dec a
|
||||
jr nz, .digit_loop
|
||||
ret
|
||||
; 170215
|
||||
|
||||
BattleTowerBattle: ; 170215
|
||||
BattleTowerBattle:
|
||||
xor a
|
||||
ld [wBattleTowerBattleEnded], a
|
||||
call _BattleTowerBattle
|
||||
ret
|
||||
; 17021d
|
||||
|
||||
DummySpecial_17021d: ; 17021d
|
||||
DummySpecial_17021d:
|
||||
ret
|
||||
; 17021e
|
||||
|
||||
InitBattleTowerChallengeRAM: ; 17021e
|
||||
InitBattleTowerChallengeRAM:
|
||||
xor a
|
||||
ld [wBattleTowerBattleEnded], a
|
||||
ld [wNrOfBeatenBattleTowerTrainers], a
|
||||
ld [wcf65], a
|
||||
ld [wcf66], a
|
||||
ret
|
||||
; 17022c
|
||||
|
||||
_BattleTowerBattle: ; 17022c
|
||||
_BattleTowerBattle:
|
||||
.loop
|
||||
call .do_dw
|
||||
call DelayFrame
|
||||
@@ -210,9 +200,8 @@ _BattleTowerBattle: ; 17022c
|
||||
cp $1
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 17023a
|
||||
|
||||
.do_dw ; 17023a
|
||||
.do_dw
|
||||
ld a, [wBattleTowerBattleEnded]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@@ -223,14 +212,12 @@ _BattleTowerBattle: ; 17022c
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
; 170249
|
||||
|
||||
.dw ; 170249
|
||||
.dw
|
||||
dw RunBattleTowerTrainer
|
||||
dw SkipBattleTowerTrainer
|
||||
; 17024d
|
||||
|
||||
RunBattleTowerTrainer: ; 17024d
|
||||
RunBattleTowerTrainer:
|
||||
ld a, [wOptions]
|
||||
push af
|
||||
ld hl, wOptions
|
||||
@@ -278,7 +265,7 @@ RunBattleTowerTrainer: ; 17024d
|
||||
ret
|
||||
|
||||
|
||||
ReadBTTrainerParty: ; 1702b7
|
||||
ReadBTTrainerParty:
|
||||
; Initialise the BattleTower-Trainer and his mon
|
||||
call CopyBTTrainer_FromBT_OT_TowBT_OTTemp
|
||||
|
||||
@@ -394,9 +381,8 @@ ReadBTTrainerParty: ; 1702b7
|
||||
ld a, -1
|
||||
ld [bc], a
|
||||
ret
|
||||
; 170394
|
||||
|
||||
ValidateBTParty: ; 170394
|
||||
ValidateBTParty:
|
||||
; Check for and fix errors in party data
|
||||
ld hl, wBT_OTTempMon1Species
|
||||
ld d, BATTLETOWER_PARTY_LENGTH
|
||||
@@ -501,13 +487,11 @@ endr
|
||||
dec d
|
||||
jp nz, .pkmn_loop
|
||||
ret
|
||||
; 170426
|
||||
|
||||
BT_ChrisName: ; 170426
|
||||
BT_ChrisName:
|
||||
db "CHRIS@"
|
||||
; 17042c
|
||||
|
||||
Function17042c: ; 17042c
|
||||
Function17042c:
|
||||
ld hl, w3_d202TrainerData
|
||||
ld a, BATTLETOWER_STREAK_LENGTH
|
||||
.loop
|
||||
@@ -568,12 +552,11 @@ Function17042c: ; 17042c
|
||||
dec a
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 170470
|
||||
|
||||
INCLUDE "data/battle_tower/unknown_levels.asm"
|
||||
|
||||
|
||||
CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2
|
||||
CopyBTTrainer_FromBT_OT_TowBT_OTTemp:
|
||||
; copy the BattleTower-Trainer data that lies at 'wBT_OTTrainer' to 'wBT_OTTemp'
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -595,11 +578,10 @@ CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2
|
||||
ld hl, sNrOfBeatenBattleTowerTrainers
|
||||
inc [hl]
|
||||
call CloseSRAM
|
||||
SkipBattleTowerTrainer: ; 1704c9
|
||||
SkipBattleTowerTrainer:
|
||||
ret
|
||||
; 1704ca
|
||||
|
||||
Unreferenced_Function1704ca: ; 1704ca
|
||||
Unreferenced_Function1704ca:
|
||||
ld a, [$be46]
|
||||
cp $7
|
||||
jr c, .asm_1704d3
|
||||
@@ -617,18 +599,16 @@ Unreferenced_Function1704ca: ; 1704ca
|
||||
|
||||
.asm_1704e0
|
||||
ret
|
||||
; 1704e1
|
||||
|
||||
Function1704e1: ; 1704e1
|
||||
Function1704e1:
|
||||
call SpeechTextBox
|
||||
call FadeToMenu
|
||||
call InitBattleTowerChallengeRAM
|
||||
call .JumptableLoop
|
||||
call CloseSubmenu
|
||||
ret
|
||||
; 1704f1
|
||||
|
||||
.JumptableLoop: ; 1704f1
|
||||
.JumptableLoop:
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearScreen
|
||||
@@ -643,9 +623,8 @@ Function1704e1: ; 1704e1
|
||||
|
||||
.done
|
||||
ret
|
||||
; 170510
|
||||
|
||||
.DoJumptable: ; 170510
|
||||
.DoJumptable:
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@@ -656,15 +635,13 @@ Function1704e1: ; 1704e1
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
; 17051f
|
||||
|
||||
.dw ; 17051f
|
||||
.dw
|
||||
dw .Jumptable_0
|
||||
dw .Jumptable_1
|
||||
dw .Jumptable_2
|
||||
; 170525
|
||||
|
||||
.Jumptable_0: ; 170525
|
||||
.Jumptable_0:
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
|
||||
@@ -744,9 +721,8 @@ Function1704e1: ; 1704e1
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
ret
|
||||
; 1705b7
|
||||
|
||||
.DrawBorder: ; 1705b7
|
||||
.DrawBorder:
|
||||
hlcoord 0, 4
|
||||
ld a, "┌"
|
||||
ld [hli], a
|
||||
@@ -786,9 +762,8 @@ Function1704e1: ; 1704e1
|
||||
dec c
|
||||
jr nz, .right_border_loop
|
||||
ret
|
||||
; 1705f0
|
||||
|
||||
.PlaceTextItems: ; 1705f0
|
||||
.PlaceTextItems:
|
||||
call .ClearBox
|
||||
call .PlaceUpDownArrows
|
||||
ld a, $50
|
||||
@@ -855,9 +830,8 @@ Function1704e1: ; 1704e1
|
||||
dec a
|
||||
jr nz, .loop1
|
||||
ret
|
||||
; 17064b
|
||||
|
||||
.ClearBox: ; 17064b
|
||||
.ClearBox:
|
||||
hlcoord 1, 5
|
||||
xor a
|
||||
ld b, 12
|
||||
@@ -872,9 +846,8 @@ Function1704e1: ; 1704e1
|
||||
dec b
|
||||
jr nz, .clearbox_row
|
||||
ret
|
||||
; 17065d
|
||||
|
||||
.PlaceUpDownArrows: ; 17065d
|
||||
.PlaceUpDownArrows:
|
||||
ld a, [wNrOfBeatenBattleTowerTrainers]
|
||||
and a
|
||||
jr z, .nope
|
||||
@@ -890,17 +863,14 @@ Function1704e1: ; 1704e1
|
||||
ld a, "▼"
|
||||
ld [hl], a
|
||||
ret
|
||||
; 170676
|
||||
|
||||
.String_Mail: ; 170676
|
||||
.String_Mail:
|
||||
db "ルーム@"
|
||||
; 17067a
|
||||
|
||||
.String_PastReaders: ; 17067a
|
||||
.String_PastReaders:
|
||||
db "れきだいりーダーいちらん@"
|
||||
; 170687
|
||||
|
||||
BattleTowerAction: ; 170687
|
||||
BattleTowerAction:
|
||||
ld a, [wScriptVar]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@@ -911,10 +881,9 @@ BattleTowerAction: ; 170687
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
; 170696
|
||||
|
||||
|
||||
.dw ; 170696 (5c:4696)
|
||||
.dw
|
||||
dw BattleTowerAction_CheckExplanationRead ; 0x00
|
||||
dw BattleTowerAction_SetExplanationRead ; 0x01
|
||||
dw BattleTowerAction_GetChallengeState ; 0x02
|
||||
@@ -950,7 +919,7 @@ BattleTowerAction: ; 170687
|
||||
|
||||
|
||||
; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes)
|
||||
ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a
|
||||
ResetBattleTowerTrainersSRAM: ; BattleTowerAction $1a
|
||||
ld a, BANK(sBTTrainers)
|
||||
call GetSRAMBank
|
||||
|
||||
@@ -966,7 +935,7 @@ ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a
|
||||
|
||||
ret
|
||||
|
||||
BattleTower_GiveReward: ; 1706ee (5c:46ee) BattleTowerAction $1b
|
||||
BattleTower_GiveReward: ; BattleTowerAction $1b
|
||||
ld a, BANK(sBattleTowerReward)
|
||||
call GetSRAMBank
|
||||
|
||||
@@ -995,7 +964,7 @@ BattleTower_GiveReward: ; 1706ee (5c:46ee) BattleTowerAction $1b
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
Function17071b: ; 17071b (5c:471b) BattleTowerAction $1c
|
||||
Function17071b: ; BattleTowerAction $1c
|
||||
ld a, BANK(sBattleTowerChallengeState)
|
||||
call GetSRAMBank
|
||||
ld a, BATTLETOWER_WON_CHALLENGE
|
||||
@@ -1003,7 +972,7 @@ Function17071b: ; 17071b (5c:471b) BattleTowerAction $1c
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function170729: ; 170729 (5c:4729) BattleTowerAction $1d
|
||||
Function170729: ; BattleTowerAction $1d
|
||||
ld a, BANK(sBattleTowerChallengeState)
|
||||
call GetSRAMBank
|
||||
ld a, BATTLETOWER_RECEIVED_REWARD
|
||||
@@ -1011,11 +980,11 @@ Function170729: ; 170729 (5c:4729) BattleTowerAction $1d
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
BattleTower_SaveOptions: ; 170737 (5c:4737) BattleTowerAction $1f
|
||||
BattleTower_SaveOptions: ; BattleTowerAction $1f
|
||||
farcall SaveOptions
|
||||
ret
|
||||
|
||||
BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e
|
||||
BattleTower_RandomlyChooseReward: ; BattleTowerAction $1e
|
||||
; Generate a random stat boosting item.
|
||||
.loop
|
||||
call Random
|
||||
@@ -1036,7 +1005,7 @@ BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
BattleTowerAction_CheckExplanationRead: ; 17075f (5c:475f) BattleTowerAction $00
|
||||
BattleTowerAction_CheckExplanationRead: ; BattleTowerAction $00
|
||||
call BattleTower_CheckSaveFileExistsAndIsYours
|
||||
ld a, [wScriptVar]
|
||||
and a
|
||||
@@ -1050,7 +1019,7 @@ BattleTowerAction_CheckExplanationRead: ; 17075f (5c:475f) BattleTowerAction $00
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
BattleTowerAction_GetChallengeState: ; 170778 (5c:4778) BattleTowerAction $02
|
||||
BattleTowerAction_GetChallengeState: ; BattleTowerAction $02
|
||||
ld hl, sBattleTowerChallengeState
|
||||
ld a, BANK(sBattleTowerChallengeState)
|
||||
call GetSRAMBank
|
||||
@@ -1059,7 +1028,7 @@ BattleTowerAction_GetChallengeState: ; 170778 (5c:4778) BattleTowerAction $02
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
BattleTowerAction_SetExplanationRead: ; 170788 (5c:4788) BattleTowerAction $01
|
||||
BattleTowerAction_SetExplanationRead: ; BattleTowerAction $01
|
||||
ld a, BANK(sBattleTowerSaveFileFlags)
|
||||
call GetSRAMBank
|
||||
ld a, [sBattleTowerSaveFileFlags]
|
||||
@@ -1068,13 +1037,13 @@ BattleTowerAction_SetExplanationRead: ; 170788 (5c:4788) BattleTowerAction $01
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
BattleTowerAction_SetByteToQuickSaveChallenge: ; 170799 (5c:4799) BattleTowerAction $03
|
||||
BattleTowerAction_SetByteToQuickSaveChallenge: ; BattleTowerAction $03
|
||||
ld c, BATTLETOWER_SAVED_AND_LEFT
|
||||
jr asm_17079f
|
||||
|
||||
BattleTowerAction_SetByteToCancelChallenge: ; 17079d (5c:479d) BattleTowerAction $04
|
||||
BattleTowerAction_SetByteToCancelChallenge: ; BattleTowerAction $04
|
||||
ld c, BATTLETOWER_NO_CHALLENGE
|
||||
asm_17079f: ; 17079f (5c:479f)
|
||||
asm_17079f:
|
||||
ld a, BANK(sBattleTowerChallengeState)
|
||||
call GetSRAMBank
|
||||
ld a, c
|
||||
@@ -1082,7 +1051,7 @@ asm_17079f: ; 17079f (5c:479f)
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function1707ac: ; 1707ac (5c:47ac) BattleTowerAction $05
|
||||
Function1707ac: ; BattleTowerAction $05
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld a, [$aa8c]
|
||||
@@ -1123,7 +1092,7 @@ Function1707ac: ; 1707ac (5c:47ac) BattleTowerAction $05
|
||||
ld a, $8
|
||||
ld [wScriptVar], a
|
||||
|
||||
Function1707f4: ; 1707f4 (5c:47f4) BattleTowerAction $06
|
||||
Function1707f4: ; BattleTowerAction $06
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
xor a
|
||||
@@ -1133,7 +1102,7 @@ Function1707f4: ; 1707f4 (5c:47f4) BattleTowerAction $06
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function170807: ; 170807 (5c:4807) BattleTowerAction $16
|
||||
Function170807: ; BattleTowerAction $16
|
||||
call UpdateTime
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
@@ -1144,7 +1113,7 @@ Function170807: ; 170807 (5c:4807) BattleTowerAction $16
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function17081d: ; 17081d (5c:481d) BattleTowerAction $17
|
||||
Function17081d: ; BattleTowerAction $17
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ld a, $5
|
||||
@@ -1187,7 +1156,7 @@ Function17081d: ; 17081d (5c:481d) BattleTowerAction $17
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
SaveBattleTowerLevelGroup: ; 170868 (5c:4868) BattleTowerAction $07
|
||||
SaveBattleTowerLevelGroup: ; BattleTowerAction $07
|
||||
ld a, BANK(sBTChoiceOfLevelGroup)
|
||||
call GetSRAMBank
|
||||
ld a, [rSVBK]
|
||||
@@ -1201,7 +1170,7 @@ SaveBattleTowerLevelGroup: ; 170868 (5c:4868) BattleTowerAction $07
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
LoadBattleTowerLevelGroup: ; 170881 (5c:4881) BattleTowerAction $08 ; Load level group choice
|
||||
LoadBattleTowerLevelGroup: ; BattleTowerAction $08 ; Load level group choice
|
||||
ld a, BANK(sBTChoiceOfLevelGroup)
|
||||
call GetSRAMBank
|
||||
ld a, [rSVBK]
|
||||
@@ -1215,7 +1184,7 @@ LoadBattleTowerLevelGroup: ; 170881 (5c:4881) BattleTowerAction $08 ; Load level
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
BattleTower_CheckSaveFileExistsAndIsYours: ; 17089a BattleTowerAction $09
|
||||
BattleTower_CheckSaveFileExistsAndIsYours: ; BattleTowerAction $09
|
||||
ld a, [wSaveFileExists]
|
||||
and a
|
||||
jr z, .nope
|
||||
@@ -1230,16 +1199,15 @@ BattleTower_CheckSaveFileExistsAndIsYours: ; 17089a BattleTowerAction $09
|
||||
.nope
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 1708b1
|
||||
|
||||
|
||||
Function1708b1: ; 1708b1 (5c:48b1) BattleTowerAction $0a
|
||||
Function1708b1: ; BattleTowerAction $0a
|
||||
xor a
|
||||
ld [wMusicFade], a
|
||||
call MaxVolume
|
||||
ret
|
||||
|
||||
CheckMobileEventIndex: ; 1708b9 (5c:48b9) BattleTowerAction $0b something to do with GS Ball
|
||||
CheckMobileEventIndex: ; BattleTowerAction $0b something to do with GS Ball
|
||||
ld a, BANK(sMobileEventIndex)
|
||||
call GetSRAMBank
|
||||
ld a, [sMobileEventIndex]
|
||||
@@ -1247,7 +1215,7 @@ CheckMobileEventIndex: ; 1708b9 (5c:48b9) BattleTowerAction $0b something to do
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function1708c8: ; 1708c8 (5c:48c8) BattleTowerAction $0c
|
||||
Function1708c8: ; BattleTowerAction $0c
|
||||
call UpdateTime
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
@@ -1266,7 +1234,7 @@ Function1708c8: ; 1708c8 (5c:48c8) BattleTowerAction $0c
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function1708f0: ; 1708f0 (5c:48f0) BattleTowerAction $0d
|
||||
Function1708f0: ; BattleTowerAction $0d
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
call UpdateTime
|
||||
@@ -1293,7 +1261,7 @@ Function1708f0: ; 1708f0 (5c:48f0) BattleTowerAction $0d
|
||||
ret
|
||||
|
||||
|
||||
Function170923: ; 170923
|
||||
Function170923:
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
xor a
|
||||
@@ -1304,10 +1272,9 @@ Function170923: ; 170923
|
||||
call ByteFill
|
||||
call CloseSRAM
|
||||
ret
|
||||
; 17093c
|
||||
|
||||
|
||||
BattleTowerAction_EggTicket: ; 17093c (5c:493c) BattleTowerAction $0e
|
||||
BattleTowerAction_EggTicket: ; BattleTowerAction $0e
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ld a, EGG_TICKET
|
||||
@@ -1373,12 +1340,11 @@ endr
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 1709a4 (5c:49a4)
|
||||
|
||||
String_MysteryJP: ; 1709a4
|
||||
String_MysteryJP:
|
||||
db "なぞナゾ@@" ; MYSTERY
|
||||
|
||||
Function1709aa: ; 1709aa (5c:49aa) BattleTowerAction $0f
|
||||
Function1709aa: ; BattleTowerAction $0f
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(w3_d090)
|
||||
@@ -1389,7 +1355,7 @@ Function1709aa: ; 1709aa (5c:49aa) BattleTowerAction $0f
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
||||
Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10
|
||||
Function1709bb: ; BattleTowerAction $10
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ld a, $5
|
||||
@@ -1415,29 +1381,26 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10
|
||||
ld [$a800], a
|
||||
call CloseSRAM
|
||||
ret
|
||||
; 1709e7 (5c:49e7)
|
||||
|
||||
.jumptable: ; 1709e7
|
||||
.jumptable:
|
||||
dw .NoAction
|
||||
dw .NoAction
|
||||
dw .DoAction1
|
||||
dw .DoAction1
|
||||
dw .Action4
|
||||
dw .Action5
|
||||
; 1709f3
|
||||
|
||||
.DoAction1: ; 1709f3
|
||||
.DoAction1:
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld a, $1
|
||||
ld [$a800], a
|
||||
call CloseSRAM
|
||||
|
||||
.NoAction: ; 170a00
|
||||
.NoAction:
|
||||
ret
|
||||
; 170a01
|
||||
|
||||
.Action4: ; 170a01
|
||||
.Action4:
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld hl, $b023
|
||||
@@ -1454,9 +1417,8 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10
|
||||
ld a, $1
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 170a33
|
||||
|
||||
.Action5: ; 170a33
|
||||
.Action5:
|
||||
ld a, $0
|
||||
call GetSRAMBank
|
||||
ld hl, wRTC
|
||||
@@ -1516,15 +1478,14 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10
|
||||
|
||||
.no_scene_2
|
||||
ret
|
||||
; 170a9c
|
||||
|
||||
Function170a9c: ; 170a9c (5c:4a9c) BattleTowerAction $11
|
||||
Function170a9c: ; BattleTowerAction $11
|
||||
ld c, FALSE
|
||||
jr asm_170aa2
|
||||
|
||||
Function170aa0: ; 170aa0 (5c:4aa0) BattleTowerAction $12
|
||||
Function170aa0: ; BattleTowerAction $12
|
||||
ld c, TRUE
|
||||
asm_170aa2: ; 170aa2 (5c:4aa2)
|
||||
asm_170aa2:
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld a, c
|
||||
@@ -1532,7 +1493,7 @@ asm_170aa2: ; 170aa2 (5c:4aa2)
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function170aaf: ; 170aaf (5c:4aaf) BattleTowerAction $13
|
||||
Function170aaf: ; BattleTowerAction $13
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld a, [$aa8d]
|
||||
@@ -1540,7 +1501,7 @@ Function170aaf: ; 170aaf (5c:4aaf) BattleTowerAction $13
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function170abe: ; 170abe (5c:4abe) BattleTowerAction $14
|
||||
Function170abe: ; BattleTowerAction $14
|
||||
call BattleTower_CheckSaveFileExistsAndIsYours
|
||||
ld a, [wScriptVar]
|
||||
and a
|
||||
@@ -1554,7 +1515,7 @@ Function170abe: ; 170abe (5c:4abe) BattleTowerAction $14
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
Function170ad7: ; 170ad7 (5c:4ad7) BattleTowerAction $15
|
||||
Function170ad7: ; BattleTowerAction $15
|
||||
ld a, BANK(sBattleTowerSaveFileFlags)
|
||||
call GetSRAMBank
|
||||
ld a, [sBattleTowerSaveFileFlags]
|
||||
@@ -1563,7 +1524,7 @@ Function170ad7: ; 170ad7 (5c:4ad7) BattleTowerAction $15
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
BattleTowerAction_LevelCheck: ; 170ae8 (5c:4ae8) BattleTowerAction $18
|
||||
BattleTowerAction_LevelCheck: ; BattleTowerAction $18
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld a, [$b2fb]
|
||||
@@ -1583,7 +1544,7 @@ BattleTowerAction_LevelCheck: ; 170ae8 (5c:4ae8) BattleTowerAction $18
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19
|
||||
BattleTowerAction_UbersCheck: ; BattleTowerAction $19
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld a, [$b2fb]
|
||||
@@ -1646,15 +1607,13 @@ LoadOpponentTrainerAndPokemonWithOTSprite: ; 0x170b44
|
||||
ld [hUsedSpriteTile], a
|
||||
farcall GetUsedSprite
|
||||
ret
|
||||
; 170b90
|
||||
|
||||
INCLUDE "data/trainers/sprites.asm"
|
||||
|
||||
DummySpecial_170bd2: ; 170bd2
|
||||
DummySpecial_170bd2:
|
||||
ret
|
||||
; 170bd3
|
||||
|
||||
CheckForBattleTowerRules: ; 170bd3
|
||||
CheckForBattleTowerRules:
|
||||
farcall _CheckForBattleTowerRules
|
||||
jr c, .asm_170bde
|
||||
xor a ; FALSE
|
||||
@@ -1666,4 +1625,3 @@ CheckForBattleTowerRules: ; 170bd3
|
||||
.asm_170be0
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 170be4
|
||||
|
@@ -5,7 +5,7 @@ GetMobileOTTrainerClass: ; mobile function
|
||||
ld c, a
|
||||
ret
|
||||
|
||||
.GetMobileOTTrainerClass: ; 4e930
|
||||
.GetMobileOTTrainerClass:
|
||||
ld a, [hli]
|
||||
xor [hl]
|
||||
ld c, a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Function_LoadOpponentTrainerAndPokemons: ; 1f8000
|
||||
Function_LoadOpponentTrainerAndPokemons:
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(wBT_OTTrainer)
|
||||
@@ -92,7 +92,7 @@ endc
|
||||
ret
|
||||
|
||||
|
||||
Function_LoadRandomBattleTowerMon: ; 1f8081
|
||||
Function_LoadRandomBattleTowerMon:
|
||||
ld c, BATTLETOWER_PARTY_LENGTH
|
||||
.loop
|
||||
push bc
|
||||
@@ -207,7 +207,6 @@ Function_LoadRandomBattleTowerMon: ; 1f8081
|
||||
ld [sBTMonPrevTrainer3], a
|
||||
call CloseSRAM
|
||||
ret
|
||||
; 1f814e
|
||||
|
||||
INCLUDE "data/battle_tower/classes.asm"
|
||||
|
||||
|
@@ -1,27 +1,24 @@
|
||||
CheckForMobileBattleRules: ; 8b1e1
|
||||
CheckForMobileBattleRules:
|
||||
ld de, .PointerTables
|
||||
call BattleTower_ExecuteJumptable
|
||||
ret z
|
||||
call BattleTower_PleaseReturnWhenReady
|
||||
scf
|
||||
ret
|
||||
; 8b1ed
|
||||
|
||||
.PointerTables: ; 8b1ed
|
||||
.PointerTables:
|
||||
db 2
|
||||
dw .Functions
|
||||
dw .TextPointers
|
||||
|
||||
.Functions: ; 8b1f2
|
||||
.Functions:
|
||||
dw BattleTower_CheckPartyLengthIs3
|
||||
dw BattleTower_CheckPartyHasThreeMonsThatAreNotEggs
|
||||
; 8b1f6
|
||||
|
||||
.TextPointers: ; 8b1f6
|
||||
.TextPointers:
|
||||
dw .ExcuseMeText
|
||||
dw JumpText_NeedAtLeastThreeMon
|
||||
dw JumpText_EggDoesNotQualify
|
||||
; 8b1fc
|
||||
|
||||
.ExcuseMeText: ; 0x8b1fc
|
||||
; Excuse me!
|
||||
@@ -29,7 +26,7 @@ CheckForMobileBattleRules: ; 8b1e1
|
||||
db "@"
|
||||
; 0x8b201
|
||||
|
||||
_CheckForBattleTowerRules: ; 8b201
|
||||
_CheckForBattleTowerRules:
|
||||
ld hl, wStringBuffer2
|
||||
ld [hl], "3"
|
||||
inc hl
|
||||
@@ -40,27 +37,24 @@ _CheckForBattleTowerRules: ; 8b201
|
||||
call BattleTower_PleaseReturnWhenReady
|
||||
scf
|
||||
ret
|
||||
; 8b215
|
||||
|
||||
.PointerTables: ; 8b215
|
||||
.PointerTables:
|
||||
db 4
|
||||
dw .Functions
|
||||
dw .TextPointers
|
||||
|
||||
.Functions: ; 8b21a
|
||||
.Functions:
|
||||
dw Function_PartyCountEq3
|
||||
dw Function_PartySpeciesAreUnique
|
||||
dw Function_PartyItemsAreUnique
|
||||
dw Function_HasPartyAnEgg
|
||||
; 8b222
|
||||
|
||||
.TextPointers: ; 8b222
|
||||
.TextPointers:
|
||||
dw JumpText_ExcuseMeYoureNotReady
|
||||
dw JumpText_OnlyThreeMonMayBeEntered
|
||||
dw JumpText_TheMonMustAllBeDifferentKinds
|
||||
dw JumpText_TheMonMustNotHoldTheSameItems
|
||||
dw JumpText_YouCantTakeAnEgg
|
||||
; 8b22c
|
||||
|
||||
JumpText_ExcuseMeYoureNotReady: ; 0x8b22c
|
||||
; Excuse me. You're not ready.
|
||||
@@ -68,11 +62,10 @@ JumpText_ExcuseMeYoureNotReady: ; 0x8b22c
|
||||
db "@"
|
||||
; 0x8b231
|
||||
|
||||
BattleTower_PleaseReturnWhenReady: ; 8b231
|
||||
BattleTower_PleaseReturnWhenReady:
|
||||
ld hl, .PleaseReturnWhenReady
|
||||
call PrintText
|
||||
ret
|
||||
; 8b238
|
||||
|
||||
.PleaseReturnWhenReady: ; 0x8b238
|
||||
; Please return when you're ready.
|
||||
@@ -116,7 +109,7 @@ JumpText_YouCantTakeAnEgg: ; 0x8b256
|
||||
db "@"
|
||||
; 0x8b25b
|
||||
|
||||
BattleTower_ExecuteJumptable: ; 8b25b
|
||||
BattleTower_ExecuteJumptable:
|
||||
ld bc, 0
|
||||
.loop
|
||||
call .DoJumptableFunction
|
||||
@@ -126,9 +119,8 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
||||
ld a, b
|
||||
and a
|
||||
ret
|
||||
; 8b26c
|
||||
|
||||
.DoJumptableFunction: ; 8b26c
|
||||
.DoJumptableFunction:
|
||||
push de
|
||||
push bc
|
||||
call .GetFunctionPointer
|
||||
@@ -137,16 +129,14 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
||||
pop bc
|
||||
pop de
|
||||
ret
|
||||
; 8b276
|
||||
|
||||
.Next_CheckReachedEnd: ; 8b276
|
||||
.Next_CheckReachedEnd:
|
||||
inc c
|
||||
ld a, [de]
|
||||
cp c
|
||||
ret
|
||||
; 8b27a
|
||||
|
||||
.GetFunctionPointer: ; 8b27a
|
||||
.GetFunctionPointer:
|
||||
inc de
|
||||
ld a, [de]
|
||||
ld l, a
|
||||
@@ -154,9 +144,8 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
||||
ld a, [de]
|
||||
ld h, a
|
||||
ret
|
||||
; 8b281
|
||||
|
||||
.GetTextPointers: ; 8b281
|
||||
.GetTextPointers:
|
||||
inc de
|
||||
inc de
|
||||
inc de
|
||||
@@ -166,16 +155,14 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
||||
ld a, [de]
|
||||
ld h, a
|
||||
ret
|
||||
; 8b28a
|
||||
|
||||
.LoadTextPointer: ; 8b28a
|
||||
.LoadTextPointer:
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ret
|
||||
; 8b28e
|
||||
|
||||
.PrintFailureText: ; 8b28e
|
||||
.PrintFailureText:
|
||||
push de
|
||||
push bc
|
||||
ld a, b
|
||||
@@ -186,18 +173,16 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
||||
ld b, $1
|
||||
pop de
|
||||
ret
|
||||
; 8b29d
|
||||
|
||||
.PrintFirstText: ; 8b29d
|
||||
.PrintFirstText:
|
||||
push de
|
||||
call .GetTextPointers
|
||||
call .LoadTextPointer
|
||||
call PrintText
|
||||
pop de
|
||||
ret
|
||||
; 8b2a9
|
||||
|
||||
.PrintNthText: ; 8b2a9
|
||||
.PrintNthText:
|
||||
push bc
|
||||
call .GetTextPointers
|
||||
inc hl
|
||||
@@ -209,15 +194,13 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
||||
call PrintText
|
||||
pop bc
|
||||
ret
|
||||
; 8b2bb
|
||||
|
||||
BattleTower_CheckPartyLengthIs3: ; 8b2bb
|
||||
BattleTower_CheckPartyLengthIs3:
|
||||
ld a, [wPartyCount]
|
||||
cp BATTLETOWER_PARTY_LENGTH
|
||||
ret
|
||||
; 8b2c1
|
||||
|
||||
BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
|
||||
BattleTower_CheckPartyHasThreeMonsThatAreNotEggs:
|
||||
ld hl, wPartyCount
|
||||
ld a, [hli]
|
||||
ld b, $0
|
||||
@@ -237,23 +220,20 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
|
||||
ld a, b
|
||||
cp BATTLETOWER_PARTY_LENGTH
|
||||
ret
|
||||
; 8b2da
|
||||
|
||||
Function_PartyCountEq3: ; 8b2da
|
||||
Function_PartyCountEq3:
|
||||
ld a, [wPartyCount]
|
||||
cp BATTLETOWER_PARTY_LENGTH
|
||||
ret z
|
||||
scf
|
||||
ret
|
||||
; 8b2e2
|
||||
|
||||
Function_PartySpeciesAreUnique: ; 8b2e2
|
||||
Function_PartySpeciesAreUnique:
|
||||
ld hl, wPartyMon1Species
|
||||
call VerifyUniqueness
|
||||
ret
|
||||
; 8b2e9
|
||||
|
||||
VerifyUniqueness: ; 8b2e9
|
||||
VerifyUniqueness:
|
||||
ld de, wPartyCount
|
||||
ld a, [de]
|
||||
inc de
|
||||
@@ -296,18 +276,16 @@ VerifyUniqueness: ; 8b2e9
|
||||
pop hl
|
||||
scf
|
||||
ret
|
||||
; 8b31a
|
||||
|
||||
.nextmon ; 8b31a
|
||||
.nextmon
|
||||
push bc
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
add hl, bc
|
||||
inc de
|
||||
pop bc
|
||||
ret
|
||||
; 8b322
|
||||
|
||||
.isegg ; 8b322
|
||||
.isegg
|
||||
push bc
|
||||
ld b, a
|
||||
ld a, [de]
|
||||
@@ -315,15 +293,13 @@ VerifyUniqueness: ; 8b2e9
|
||||
ld a, b
|
||||
pop bc
|
||||
ret
|
||||
; 8b32a
|
||||
|
||||
Function_PartyItemsAreUnique: ; 8b32a
|
||||
Function_PartyItemsAreUnique:
|
||||
ld hl, wPartyMon1Item
|
||||
call VerifyUniqueness
|
||||
ret
|
||||
; 8b331
|
||||
|
||||
Function_HasPartyAnEgg: ; 8b331
|
||||
Function_HasPartyAnEgg:
|
||||
ld hl, wPartyCount
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
@@ -339,4 +315,3 @@ Function_HasPartyAnEgg: ; 8b331
|
||||
.found
|
||||
scf
|
||||
ret
|
||||
; 8b342
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BattleTowerText:: ; 11c000
|
||||
BattleTowerText::
|
||||
; Print text c for trainer [wBT_OTTrainerClass]
|
||||
; 1: Intro text
|
||||
; 2: Player lost
|
||||
@@ -83,19 +83,18 @@ endc
|
||||
ld [rSVBK], a
|
||||
call PlaceHLTextAtBC
|
||||
ret
|
||||
; 11c05d
|
||||
|
||||
INCLUDE "mobile/fixed_words.asm"
|
||||
|
||||
INCLUDE "data/trainers/genders.asm"
|
||||
|
||||
|
||||
BTMaleTrainerTexts: ; 11f332
|
||||
BTMaleTrainerTexts:
|
||||
dw .Greetings
|
||||
dw .PlayerLost
|
||||
dw .PlayerWon
|
||||
|
||||
.Greetings: ; 11f338
|
||||
.Greetings:
|
||||
dw BTGreetingM1
|
||||
dw BTGreetingM2
|
||||
dw BTGreetingM3
|
||||
@@ -122,7 +121,7 @@ BTMaleTrainerTexts: ; 11f332
|
||||
dw BTGreetingM24
|
||||
dw BTGreetingM25
|
||||
|
||||
.PlayerLost: ; 11f36a
|
||||
.PlayerLost:
|
||||
dw BTLossM1
|
||||
dw BTLossM2
|
||||
dw BTLossM3
|
||||
@@ -149,7 +148,7 @@ BTMaleTrainerTexts: ; 11f332
|
||||
dw BTLossM24
|
||||
dw BTLossM25
|
||||
|
||||
.PlayerWon: ; 11f39c
|
||||
.PlayerWon:
|
||||
dw BTWinM1
|
||||
dw BTWinM2
|
||||
dw BTWinM3
|
||||
@@ -182,7 +181,7 @@ BTFemaleTrainerTexts:
|
||||
dw .PlayerLost
|
||||
dw .PlayerWon
|
||||
|
||||
.Greetings: ; 11f3d4
|
||||
.Greetings:
|
||||
dw BTGreetingF1
|
||||
dw BTGreetingF2
|
||||
dw BTGreetingF3
|
||||
@@ -199,7 +198,7 @@ BTFemaleTrainerTexts:
|
||||
dw BTGreetingF14
|
||||
dw BTGreetingF15
|
||||
|
||||
.PlayerLost: ; 11f3f2
|
||||
.PlayerLost:
|
||||
dw BTLossF1
|
||||
dw BTLossF2
|
||||
dw BTLossF3
|
||||
@@ -216,7 +215,7 @@ BTFemaleTrainerTexts:
|
||||
dw BTLossF14
|
||||
dw BTLossF15
|
||||
|
||||
.PlayerWon: ; 11f410
|
||||
.PlayerWon:
|
||||
dw BTWinF1
|
||||
dw BTWinF2
|
||||
dw BTWinF3
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BuenasPassword: ; 8af6b
|
||||
BuenasPassword:
|
||||
xor a
|
||||
ld [wWhichIndexSet], a
|
||||
ld hl, .MenuHeader
|
||||
@@ -26,7 +26,6 @@ BuenasPassword: ; 8af6b
|
||||
ld a, b
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 8afa9
|
||||
|
||||
.MenuHeader: ; 0x8afa9
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
@@ -44,7 +43,7 @@ BuenasPassword: ; 8af6b
|
||||
dw .PlacePasswordChoices
|
||||
; 0x8afb4
|
||||
|
||||
.PasswordIndices: ; 8afb8
|
||||
.PasswordIndices:
|
||||
db NUM_PASSWORDS_PER_CATEGORY
|
||||
x = 0
|
||||
rept NUM_PASSWORDS_PER_CATEGORY
|
||||
@@ -53,7 +52,7 @@ x = x + 1
|
||||
endr
|
||||
db -1
|
||||
|
||||
.PlacePasswordChoices: ; 8afbd
|
||||
.PlacePasswordChoices:
|
||||
push de
|
||||
ld a, [wBuenasPassword]
|
||||
and $f0
|
||||
@@ -65,9 +64,8 @@ endr
|
||||
pop hl
|
||||
call PlaceString
|
||||
ret
|
||||
; 8afd4
|
||||
|
||||
BuenaPrize: ; 8afd4
|
||||
BuenaPrize:
|
||||
xor a
|
||||
ld [wMenuScrollPosition], a
|
||||
ld a, $1
|
||||
@@ -149,7 +147,6 @@ BuenaPrize: ; 8afd4
|
||||
call JoyWaitAorB
|
||||
call PlayClickSFX
|
||||
ret
|
||||
; 8b072
|
||||
|
||||
.Text_AskWhichPrize: ; 0x8b072
|
||||
; Which prize would you like?
|
||||
@@ -186,19 +183,17 @@ BuenaPrize: ; 8afd4
|
||||
db "@"
|
||||
; 0x8b090
|
||||
|
||||
Buena_DisplayBlueCardBalance: ; 8b090
|
||||
Buena_DisplayBlueCardBalance:
|
||||
ld hl, BlueCardBalanceMenuHeader
|
||||
call LoadMenuHeader
|
||||
ret
|
||||
; 8b097
|
||||
|
||||
PrintBlueCardBalance: ; 8b097
|
||||
PrintBlueCardBalance:
|
||||
ld de, wBlueCardBalance
|
||||
call .DrawBox
|
||||
ret
|
||||
; 8b09e
|
||||
|
||||
.DrawBox: ; 8b09e
|
||||
.DrawBox:
|
||||
push de
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
@@ -221,29 +216,24 @@ PrintBlueCardBalance: ; 8b097
|
||||
lb bc, 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
; 8b0ca
|
||||
|
||||
.Points_string:
|
||||
db "Points@"
|
||||
; 8b0d1
|
||||
|
||||
BlueCardBalanceMenuHeader: ; 0x8b0d1
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
menu_coords 0, 11, 11, 13
|
||||
; 8b0d6
|
||||
|
||||
Buena_PlacePrizeMenuBox: ; 8b0d6
|
||||
Buena_PlacePrizeMenuBox:
|
||||
ld hl, .MenuHeader
|
||||
call LoadMenuHeader
|
||||
ret
|
||||
; 8b0dd
|
||||
|
||||
.MenuHeader ; 0x8b0dd
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
menu_coords 0, 0, 17, TEXTBOX_Y - 1
|
||||
; 8b0e2
|
||||
|
||||
Buena_PrizeMenu: ; 8b0e2
|
||||
Buena_PrizeMenu:
|
||||
ld hl, .MenuHeader
|
||||
call CopyMenuHeader
|
||||
ld a, [wMenuSelection]
|
||||
@@ -268,7 +258,6 @@ Buena_PrizeMenu: ; 8b0e2
|
||||
.cancel
|
||||
xor a
|
||||
ret
|
||||
; 8b113
|
||||
|
||||
.MenuHeader: ; 0x8b113
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
@@ -286,11 +275,10 @@ Buena_PrizeMenu: ; 8b0e2
|
||||
dba .indices
|
||||
dba .prizeitem
|
||||
dba .prizepoints
|
||||
; 8b129
|
||||
|
||||
NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItems.End - BuenaPrizeItems) / 2)
|
||||
|
||||
.indices ; 8b129
|
||||
.indices
|
||||
db NUM_BUENA_PRIZES
|
||||
x = 1
|
||||
rept NUM_BUENA_PRIZES
|
||||
@@ -298,9 +286,8 @@ rept NUM_BUENA_PRIZES
|
||||
x = x + 1
|
||||
endr
|
||||
db -1
|
||||
; 8b134
|
||||
|
||||
.prizeitem ; 8b134
|
||||
.prizeitem
|
||||
ld a, [wMenuSelection]
|
||||
call Buena_getprize
|
||||
ld a, [hl]
|
||||
@@ -310,9 +297,8 @@ endr
|
||||
pop hl
|
||||
call PlaceString
|
||||
ret
|
||||
; 8b147
|
||||
|
||||
.prizepoints ; 8b147
|
||||
.prizepoints
|
||||
ld a, [wMenuSelection]
|
||||
call Buena_getprize
|
||||
inc hl
|
||||
@@ -321,9 +307,8 @@ endr
|
||||
add c
|
||||
ld [de], a
|
||||
ret
|
||||
; 8b154
|
||||
|
||||
Buena_getprize: ; 8b154
|
||||
Buena_getprize:
|
||||
dec a
|
||||
ld hl, BuenaPrizeItems
|
||||
ld b, 0
|
||||
@@ -331,6 +316,5 @@ Buena_getprize: ; 8b154
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ret
|
||||
; 8b15e
|
||||
|
||||
INCLUDE "data/items/buena_prizes.asm"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
AskRememberPassword: ; 4ae12
|
||||
AskRememberPassword:
|
||||
call .DoMenu
|
||||
ld a, $0
|
||||
jr c, .okay
|
||||
@@ -8,7 +8,7 @@ AskRememberPassword: ; 4ae12
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
.DoMenu: ; 4ae1f
|
||||
.DoMenu:
|
||||
lb bc, 14, 7
|
||||
push bc
|
||||
ld hl, YesNoMenuHeader
|
||||
@@ -42,7 +42,7 @@ AskRememberPassword: ; 4ae12
|
||||
scf
|
||||
ret
|
||||
|
||||
Buena_ExitMenu: ; 4ae5e
|
||||
Buena_ExitMenu:
|
||||
ld a, [hOAMUpdate]
|
||||
push af
|
||||
call ExitMenu
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BugContest_SetCaughtContestMon: ; e6ce
|
||||
BugContest_SetCaughtContestMon:
|
||||
ld a, [wContestMon]
|
||||
and a
|
||||
jr z, .firstcatch
|
||||
@@ -18,7 +18,7 @@ BugContest_SetCaughtContestMon: ; e6ce
|
||||
call PrintText
|
||||
ret
|
||||
|
||||
.generatestats ; e6fd
|
||||
.generatestats
|
||||
ld a, [wTempEnemyMonSpecies]
|
||||
ld [wCurSpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
|
@@ -1,4 +1,4 @@
|
||||
GiveParkBalls: ; 135db
|
||||
GiveParkBalls:
|
||||
xor a
|
||||
ld [wContestMon], a
|
||||
ld a, 20
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SelectRandomBugContestContestants: ; 139a8
|
||||
SelectRandomBugContestContestants:
|
||||
; Select five random people to participate in the current contest.
|
||||
|
||||
; First we have to make sure that any old data is cleared away.
|
||||
@@ -54,9 +54,8 @@ SelectRandomBugContestContestants: ; 139a8
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
ret
|
||||
; 139ed
|
||||
|
||||
CheckBugContestContestantFlag: ; 139ed
|
||||
CheckBugContestContestantFlag:
|
||||
; Checks the flag of the Bug Catching Contestant whose index is loaded in a.
|
||||
|
||||
; Bug: If a >= NUM_BUG_CONTESTANTS when this is called,
|
||||
@@ -73,11 +72,10 @@ CheckBugContestContestantFlag: ; 139ed
|
||||
ld b, CHECK_FLAG
|
||||
call EventFlagAction
|
||||
ret
|
||||
; 139fe
|
||||
|
||||
INCLUDE "data/events/bug_contest_flags.asm"
|
||||
|
||||
ContestDropOffMons: ; 13a12
|
||||
ContestDropOffMons:
|
||||
ld hl, wPartyMon1HP
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
@@ -100,9 +98,8 @@ ContestDropOffMons: ; 13a12
|
||||
ld a, $1
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 13a31
|
||||
|
||||
ContestReturnMons: ; 13a31
|
||||
ContestReturnMons:
|
||||
; Restore the species of the second mon.
|
||||
ld hl, wPartySpecies + 1
|
||||
ld a, [wBugContestSecondPartySpecies]
|
||||
@@ -120,4 +117,3 @@ ContestReturnMons: ; 13a31
|
||||
ld a, b
|
||||
ld [wPartyCount], a
|
||||
ret
|
||||
; 13a47
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user