more battle core labels

This commit is contained in:
PikalaxALT 2015-11-07 21:04:54 -05:00
parent 09603bf031
commit 6a570ebb8e
23 changed files with 515 additions and 474 deletions

View File

@ -731,8 +731,8 @@ AI_Switch: ; 3846c
callab ResetEnemyStatLevels
ld hl, PlayerSubStatus1
res SUBSTATUS_IN_LOVE, [hl]
callba Function3d4e1
callba Function3d57a
callba EnemySwitch
callba ResetBattleParticipants
xor a
ld [wd264], a
ld a, [wLinkMode]

File diff suppressed because it is too large Load Diff

View File

@ -723,22 +723,22 @@ BattleCommand_CheckObedience: ; 343db
ld hl, JohtoBadges
; risingbadge
bit 7, [hl]
bit RISINGBADGE, [hl]
ld a, MAX_LEVEL + 1
jr nz, .getlevel
; stormbadge
bit 5, [hl]
bit STORMBADGE, [hl]
ld a, 70
jr nz, .getlevel
; fogbadge
bit 3, [hl]
bit FOGBADGE, [hl]
ld a, 50
jr nz, .getlevel
; hivebadge
bit 1, [hl]
bit HIVEBADGE, [hl]
ld a, 30
jr nz, .getlevel
@ -1017,9 +1017,9 @@ Function34548: ; 34548
ld a, [hBattleTurn]
and a
ld a, [wc732] ; player
ld a, [wPlayerCharging] ; player
jr z, .end
ld a, [wc733] ; enemy
ld a, [wEnemyCharging] ; enemy
.end
and a
ret
@ -2129,13 +2129,13 @@ BattleCommand_HitTargetNoSub: ; 34f60
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
cp EFFECT_MULTI_HIT
jr z, .multihit_conversion_doublehit_twineedle
jr z, .multihit
cp EFFECT_CONVERSION
jr z, .multihit_conversion_doublehit_twineedle
jr z, .conversion
cp EFFECT_DOUBLE_HIT
jr z, .multihit_conversion_doublehit_twineedle
jr z, .doublehit
cp EFFECT_TWINEEDLE
jr z, .multihit_conversion_doublehit_twineedle
jr z, .twineedle
cp EFFECT_TRIPLE_KICK
jr z, .triplekick
xor a
@ -2159,7 +2159,10 @@ BattleCommand_HitTargetNoSub: ; 34f60
.fly_dig
; clear sprite
jp Function37ec7
.multihit_conversion_doublehit_twineedle
.multihit
.conversion
.doublehit
.twineedle
ld a, [wKickCounter]
and 1
xor 1
@ -6307,12 +6310,12 @@ BattleCommand_StoreEnergy: ; 36671
ld a, 1
ld [hl], a
ld hl, PlayerDamageTaken + 1
ld de, wc732 ; player
ld de, wPlayerCharging ; player
ld a, [hBattleTurn]
and a
jr z, .player
ld hl, EnemyDamageTaken + 1
ld de, wc733 ; enemy
ld de, wEnemyCharging ; enemy
.player
ld a, [hld]
add a
@ -8575,11 +8578,11 @@ CheckUserMove: ; 37462
ResetTurn: ; 3747b
ld hl, wc732
ld hl, wPlayerCharging
ld a, [hBattleTurn]
and a
jr z, .player
ld hl, wc733
ld hl, wEnemyCharging
.player
ld [hl], 1
@ -8921,7 +8924,7 @@ BattleCommand_BatonPass: ; 379c9
call DelayFrames
; Transition into switchmon menu
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Function3d2f7
callba ForcePickSwitchMonInBattle
@ -8971,9 +8974,9 @@ BattleCommand_BatonPass: ; 379c9
; Passed enemy PartyMon entrance
xor a
ld [wc718], a
ld hl, Function3d517
ld hl, EnemySwitch_SetMode
call CallBattleCore
ld hl, Function3d57a
ld hl, ResetBattleParticipants
call CallBattleCore
ld a, 1
ld [wTypeMatchup], a
@ -8995,7 +8998,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
ld a, 1
ld [wd0ec], a
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, Function3e8e4
call CallBattleCore
call WriteBackup
@ -9011,7 +9014,7 @@ BatonPass_LinkEnemySwitch: ; 37a82
and a
ret z
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, Function3e8e4
call CallBattleCore

View File

@ -191,69 +191,69 @@
const MIRAGE_MAIL ; $BD
const ITEM_BE ; $BE
add_tm DYNAMICPUNCH
add_tm HEADBUTT
add_tm CURSE
add_tm ROLLOUT
const ITEM_C3
add_tm ROAR
add_tm TOXIC
add_tm ZAP_CANNON
add_tm ROCK_SMASH
add_tm PSYCH_UP
add_tm HIDDEN_POWER
add_tm SUNNY_DAY
add_tm SWEET_SCENT
add_tm SNORE
add_tm BLIZZARD
add_tm HYPER_BEAM
add_tm ICY_WIND
add_tm PROTECT
add_tm RAIN_DANCE
add_tm GIGA_DRAIN
add_tm ENDURE
add_tm FRUSTRATION
add_tm SOLARBEAM
add_tm IRON_TAIL
add_tm DRAGONBREATH
add_tm THUNDER
add_tm EARTHQUAKE
add_tm RETURN
add_tm DIG
const ITEM_DC
add_tm PSYCHIC
add_tm SHADOW_BALL
add_tm MUD_SLAP
add_tm DOUBLE_TEAM
add_tm ICE_PUNCH
add_tm SWAGGER
add_tm SLEEP_TALK
add_tm SLUDGE_BOMB
add_tm SANDSTORM
add_tm FIRE_BLAST
add_tm SWIFT
add_tm DEFENSE_CURL
add_tm THUNDERPUNCH
add_tm DREAM_EATER
add_tm DETECT
add_tm REST
add_tm ATTRACT
add_tm THIEF
add_tm STEEL_WING
add_tm FIRE_PUNCH
add_tm FURY_CUTTER
add_tm NIGHTMARE
add_tm DYNAMICPUNCH ; $BF
add_tm HEADBUTT ; $C0
add_tm CURSE ; $C1
add_tm ROLLOUT ; $C2
const ITEM_C3 ; $C3
add_tm ROAR ; $C4
add_tm TOXIC ; $C5
add_tm ZAP_CANNON ; $C6
add_tm ROCK_SMASH ; $C7
add_tm PSYCH_UP ; $C8
add_tm HIDDEN_POWER ; $C9
add_tm SUNNY_DAY ; $CA
add_tm SWEET_SCENT ; $CB
add_tm SNORE ; $CC
add_tm BLIZZARD ; $CD
add_tm HYPER_BEAM ; $CE
add_tm ICY_WIND ; $CF
add_tm PROTECT ; $D0
add_tm RAIN_DANCE ; $D1
add_tm GIGA_DRAIN ; $D2
add_tm ENDURE ; $D3
add_tm FRUSTRATION ; $D4
add_tm SOLARBEAM ; $D5
add_tm IRON_TAIL ; $D6
add_tm DRAGONBREATH ; $D7
add_tm THUNDER ; $D8
add_tm EARTHQUAKE ; $D9
add_tm RETURN ; $DA
add_tm DIG ; $DB
const ITEM_DC ; $DC
add_tm PSYCHIC ; $DD
add_tm SHADOW_BALL ; $DE
add_tm MUD_SLAP ; $DF
add_tm DOUBLE_TEAM ; $E0
add_tm ICE_PUNCH ; $E1
add_tm SWAGGER ; $E2
add_tm SLEEP_TALK ; $E3
add_tm SLUDGE_BOMB ; $E4
add_tm SANDSTORM ; $E5
add_tm FIRE_BLAST ; $E6
add_tm SWIFT ; $E7
add_tm DEFENSE_CURL ; $E8
add_tm THUNDERPUNCH ; $E9
add_tm DREAM_EATER ; $EA
add_tm DETECT ; $EB
add_tm REST ; $EC
add_tm ATTRACT ; $ED
add_tm THIEF ; $EE
add_tm STEEL_WING ; $EF
add_tm FIRE_PUNCH ; $F0
add_tm FURY_CUTTER ; $F1
add_tm NIGHTMARE ; $F2
NUM_TMS = const_value - TM01 - 2
add_hm CUT
add_hm FLY
add_hm SURF
add_hm STRENGTH
add_hm FLASH
add_hm WHIRLPOOL
add_hm WATERFALL
add_hm CUT ; $F3
add_hm FLY ; $F4
add_hm SURF ; $F5
add_hm STRENGTH ; $F6
add_hm FLASH ; $F7
add_hm WHIRLPOOL ; $F8
add_hm WATERFALL ; $F9
NUM_HMS = const_value - HM01
const HM_08
const HM_08 ; $FA
add_mt FLAMETHROWER
add_mt THUNDERBOLT

View File

@ -165,3 +165,25 @@ HMENURETURN_SCRIPT EQU %10000000
HMENURETURN_ASM EQU %11111111
NUM_MON_SUBMENU_ITEMS EQU 8
const_def
const ZEPHYRBADGE
const HIVEBADGE
const PLAINBADGE
const FOGBADGE
const MINERALBADGE
const STORMBADGE
const GLACIERBADGE
const RISINGBADGE
NUM_JOHTO_BADGES EQU const_value
const_def
const BOULDERBADGE
const CASCADEBADGE
const THUNDERBADGE
const RAINBOWBADGE
const SOULBADGE
const MARSHBADGE
const VOLCANOBADGE
const EARTHBADGE
NUM_KANTO_BADGES EQU const_value
NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES

View File

@ -1,5 +1,5 @@
Function14a1a: ; 14a1a
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Function5e9a
call SpeechTextBox
call UpdateSprites

View File

@ -23,7 +23,7 @@ UnknownText_0x88013: ; 0x88013
; 0x88018
Special_SelectApricornForKurt: ; 88018
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld c, $1
xor a
ld [wd0e4], a

View File

@ -103,7 +103,7 @@ endr
.AccessBankOfMom: ; 162a8
ld hl, UnknownText_0x1665d
call PrintText
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, MenuDataHeader_0x166b5
call CopyMenuDataHeader
call InterpretMenu2
@ -148,7 +148,7 @@ endr
ld [hl], a
ld a, $5
ld [wcf64], a
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function16517
call Function1656b
call Function16571
@ -216,7 +216,7 @@ endr
ld [hl], a
ld a, $5
ld [wcf64], a
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function16512
call Function1656b
call Function16571

View File

@ -19,7 +19,7 @@ MoveDeletion:
jr z, .asm_2c5ca
ld hl, UnknownText_0x2c5ea
call PrintText
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Function12f5b
push af
call Function2b74

View File

@ -1961,7 +1961,7 @@ CheckStandingOnXYTrigger:: ; 2ae7
FadeToMenu:: ; 2b29
xor a
ld [hBGMapMode], a
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba FadeBlackBGMap
call ClearSprites
call DisableSpriteUpdates

View File

@ -52,7 +52,7 @@ MenuTextBoxBackup:: ; 1d67
ret
; 1d6e
LoadMenuDataHeader_0x1d75:: ; 1d6e
LoadPartyMenuDataHeader:: ; 1d6e
ld hl, MenuDataHeader_0x1d75
call LoadMenuDataHeader
ret

View File

@ -1673,7 +1673,7 @@ Functionf0d6: ; f0d6
ld a, [CurPartyMon]
ld c, a
ld hl, wc664
ld hl, wBattleParticipantsNotFainted
ld b, SET_FLAG
predef FlagPredef

View File

@ -415,7 +415,7 @@ Continue: ; 5d65
callba TryLoadSaveFile
jr c, .FailToLoad
callba Function150b9
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function5e85
ld a, $1
ld [hBGMapMode], a
@ -5197,7 +5197,7 @@ FlyFunction: ; ca3b
.outdoors
xor a
ld [hMapAnims], a
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call ClearSprites
callba _FlyMap
ld a, e
@ -9707,7 +9707,7 @@ TextJump_WasSentToBillsPC: ; 0xe3d9
InitNickname: ; e3de
push de
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call DisableSpriteUpdates
pop de
push de
@ -9748,7 +9748,7 @@ UnknownText_0xe417: ; 0xe417
Functione41c: ; e41c (3:641c)
xor a
ld [hBGMapMode], a ; $ff00+$d4
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call ClearPCItemScreen
ld hl, Options
ld a, [hl]
@ -9844,7 +9844,7 @@ Functione4cb: ; e4cb
; e4cd
Functione4cd: ; e4cd
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Function44781
jr nc, .asm_e4e0
ld hl, UnknownText_0xe4f9
@ -9871,7 +9871,7 @@ UnknownText_0xe4f9: ; 0xe4f9
; 0xe4fe
Functione4fe: ; e4fe (3:64fe)
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Functione2391
call Function222a
call ClearPCItemScreen
@ -9947,7 +9947,7 @@ CheckCurPartyMonFainted: ; e538
Functione559: ; e559 (3:6559)
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Functione2583
call Function222a
call ClearPCItemScreen
@ -13264,7 +13264,7 @@ GiveTakePartyMonItem: ; 12b60
cp 1
jr nz, .asm_12ba0
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call ClearPalettes
call Function12ba9
call ClearPalettes
@ -13677,7 +13677,7 @@ MonMailAction: ; 12d45
OpenPartyStats: ; 12e00
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call ClearSprites
; PartyMon
xor a
@ -14739,7 +14739,7 @@ Function134c0: ; 134c0
; 134dd
Function134dd: ; 134dd
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, Elevator_WhichFloorText
call PrintText
call Elevator_GetCurrentFloorText
@ -16613,7 +16613,7 @@ UnknownText_0x157cc: ; 0x157cc
; 0x157d1
KrisWithdrawItemMenu: ; 0x157d1
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba ClearPCItemScreen
.asm_157da
call Function15985
@ -16692,7 +16692,7 @@ Function157e9: ; 0x157e9
KrisTossItemMenu: ; 0x1585f
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba ClearPCItemScreen
.asm_15868
call Function15985
@ -16729,7 +16729,7 @@ KrisDepositItemMenu: ; 0x1588b
call Function158b8
jr c, .asm_158b6
call DisableSpriteUpdates
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Function106a5
.asm_1589c
callba Function106be
@ -17034,7 +17034,7 @@ MartDialog: ; 15a61
HerbShop: ; 15a6e
call ReadMart
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, UnknownText_0x15e4a
call Function15fcd
call Function15c62
@ -17048,7 +17048,7 @@ BargainShop: ; 15a84
ld de, BargainShopData
call LoadMartPointer
call Function15c25
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, UnknownText_0x15e6d
call Function15fcd
call Function15c62
@ -17067,7 +17067,7 @@ BargainShop: ; 15a84
Pharmacist: ; 15aae
call ReadMart
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, UnknownText_0x15e90
call Function15fcd
call Function15c62
@ -17088,7 +17088,7 @@ RooftopSale: ; 15ac4
.ok
call LoadMartPointer
call Function15c25
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, UnknownText_0x15f83
call Function15fcd
call Function15c62
@ -17173,7 +17173,7 @@ StandardMart: ; 15b47
; 15b62
.HowMayIHelpYou: ; 15b62
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, UnknownText_0x15f83
call PrintText
ld a, $1
@ -17226,7 +17226,7 @@ StandardMart: ; 15b47
; 15baf
.AnythingElse: ; 15baf
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, UnknownText_0x15fb9
call PrintText
ld a, $1
@ -19462,7 +19462,7 @@ DoEggStep:: ; 16f3e
OverworldHatchEgg:: ; 16f5e
call ResetWindow
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function16f70
call Function2b4d
call RestartMapMusic
@ -20304,7 +20304,7 @@ Function20021: ; 20021 (8:4021)
ld a, [hl]
push af
set 4, [hl]
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call ClearTileMap
ld hl, UnknownText_0x2004c
call PrintText
@ -23968,7 +23968,7 @@ Function2695b: ; 2695b
ld d, 0
add hl, de
ld [hl], -1
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, MenuDataHeader_0x269c5
call CopyMenuDataHeader
xor a
@ -25065,7 +25065,7 @@ Function2715c: ; 2715c
callba Function3ed9f
call ClearSGB
call WriteBackup
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call WaitBGMap
jp SetPalettes
; 27192
@ -26846,7 +26846,7 @@ Function28b87: ; 28b87
ld hl, UnknownText_0x28eb8
bccoord 1, 14
call PlaceWholeStringInBoxAtOnce
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
hlcoord 10, 7
ld b, $3
ld c, $7
@ -27015,7 +27015,7 @@ Function28b87: ; 28b87
ld a, [hli]
ld [wc731], a
ld a, [hl]
ld [wc732], a
ld [wPlayerCharging], a
ld hl, OTPartyMon1DVs
ld a, [wd003]
call GetPartyLocation
@ -27030,7 +27030,7 @@ Function28b87: ; 28b87
ld c, l
callba GetCaughtGender
ld a, c
ld [wc733], a
ld [wEnemyCharging], a
ld a, [DefaultFlypoint]
ld [CurPartyMon], a
ld hl, PartySpecies
@ -28143,7 +28143,7 @@ Function29549: ; 29549
call Function295e3
ld de, wc703
call Function295ef
ld a, [wc733]
ld a, [wEnemyCharging]
ld de, wc724
call Function295f6
ld de, wc731
@ -32241,7 +32241,7 @@ endr
ld [wd0e4], a
ld [CriticalHit], a
ld [BattleMonSpecies], a
ld [wc664], a
ld [wBattleParticipantsNotFainted], a
ld [CurBattleMon], a
ld [wd232], a
ld [TimeOfDayPal], a
@ -34427,7 +34427,7 @@ Function44781: ; 44781
_KrisMailBoxMenu: ; 0x447a0
call InitMail
jr z, .nomail
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function44806
jp WriteBackup
@ -38301,7 +38301,7 @@ Function4a098: ; 4a098 (12:6098)
call Function1ff8
call Function1bee
call WaitBGMap
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Function89de0
call Call_ExitMenu
call Function49351
@ -38520,7 +38520,7 @@ Function4a28a: ; 4a28a (12:628a)
call Function4a6d8
call Function1bee
call WaitBGMap
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld a, $5
call GetSRAMBank
ld a, [$aa4b]
@ -56925,7 +56925,7 @@ Special_SetDayOfWeek: ; 90913
hlcoord 0, 12
lb bc, 4, 18
call TextBox
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld hl, UnknownText_0x90a3f
call PrintText
hlcoord 9, 3
@ -67846,7 +67846,7 @@ BillsPCDepositFuncDeposit: ; e24a9 (38:64a9)
ret
BillsPCDepositFuncStats: ; e24c8 (38:64c8)
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Functione2f7e
call ExitMenu
call PCMonInfo
@ -67865,7 +67865,7 @@ BillsPCDepositFuncRelease: ; e24e0 (38:64e0)
push af
ld de, PCString_ReleasePKMN
call Functione2a6e
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
lb bc, 14, 11
call PlaceYesNoBox
ld a, [MenuSelection2]
@ -68111,7 +68111,7 @@ endr
ret
.stats: ; e26c0 (38:66c0)
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Functione2f7e
call ExitMenu
call PCMonInfo
@ -68128,7 +68128,7 @@ endr
jr c, .FailedRelease
ld de, PCString_ReleasePKMN
call Functione2a6e
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
lb bc, 14, 11
call PlaceYesNoBox
ld a, [MenuSelection2]
@ -68371,7 +68371,7 @@ Functione2887: ; e2887
; e28a5
Functione28a5: ; e28a5
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Functione2f7e
call ExitMenu
call PCMonInfo
@ -70009,7 +70009,7 @@ PCString_NoReleasingEGGS: db "No releasing EGGS!@"
; e35aa
Functione35aa: ; e35aa (38:75aa)
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Functione35e2
.loop
xor a
@ -74686,7 +74686,7 @@ Functionfcc63: ; fcc63
jr c, .asm_fcce6
ld a, 2
.asm_fcce6
ld [wc733], a
ld [wEnemyCharging], a
ld hl, PartyMon1Level
ld bc, PARTYMON_STRUCT_LENGTH
@ -74750,7 +74750,7 @@ Functionfcc63: ; fcc63
ld e, TRADE_OT_ID
call GetTradeAttribute
ld de, wc732
ld de, wPlayerCharging
call Functionfce15
ld hl, PartyMon1ID

View File

@ -211,94 +211,93 @@ ReadBTTrainerParty: ; 1702b7
ret
; 170394
Function170394: ; 170394
ld hl, $c608 + 11
ld d, $3
.asm_170399
ValidateBTParty: ; 170394
; Check for and fix errors in party data
ld hl, wBT_OTTempPkmn1Species
ld d, BATTLETOWER_NROFPKMNS
.pkmn_loop
push de
push hl
ld b, h
ld c, l
ld a, [hl]
and a
jr z, .asm_1703b1
cp $ff
jr z, .asm_1703b1
cp $fe
jr z, .asm_1703b1
cp $fd
jr z, .asm_1703b1
cp $fc
jr nz, .asm_1703b4
idx = $ff
rept ($ff +- NUM_POKEMON)
jr z, .invalid
cp idx
idx = idx +- 1
endr
jr nz, .valid
.asm_1703b1
ld a, $eb
.invalid
ld a, SMEARGLE
ld [hl], a
.asm_1703b4
.valid
ld [CurSpecies], a
call GetBaseData
ld a, $5
call GetSRAMBank
ld a, [$b2fb]
ld a, [$b2fb] ; s5_b2fb ; max level?
call CloseSRAM
ld e, a
ld hl, $001f
ld hl, MON_LEVEL
add hl, bc
ld a, [hl]
cp $2
ld a, $2
jr c, .asm_1703d6
cp MIN_LEVEL
ld a, MIN_LEVEL
jr c, .load
ld a, [hl]
cp e
jr c, .asm_1703d7
jr c, .dont_load
ld a, e
.asm_1703d6
.load
ld [hl], a
.asm_1703d7
.dont_load
ld [CurPartyLevel], a
ld hl, $0002
ld hl, MON_MOVES
add hl, bc
ld d, $3
ld d, NUM_MOVES - 1
ld a, [hli]
and a
jr z, .asm_1703ea
cp $fc
jr nc, .asm_1703ea
jr .asm_1703f4
jr z, .not_move
cp NUM_ATTACKS + 1
jr nc, .not_move
jr .valid_move
.asm_1703ea
.not_move
dec hl
ld a, $1
ld a, POUND
ld [hli], a
xor a
rept 2
ld [hli], a
endr
ld [hl], a
jr .asm_1703ff
jr .done_moves
.asm_1703f4
.valid_move
ld a, [hl]
cp $fc
jr c, .asm_1703fb
cp NUM_ATTACKS + 1
jr c, .next
ld [hl], $0
.asm_1703fb
.next
inc hl
dec d
jr nz, .asm_1703f4
jr nz, .valid_move
.asm_1703ff
ld hl, $0024
.done_moves
ld hl, MON_MAXHP
add hl, bc
ld d, h
ld e, l
push hl
push de
ld hl, $000a
ld hl, MON_EXP + 2
add hl, bc
ld b, $1
predef CalcPkmnStats
@ -317,7 +316,7 @@ endr
add hl, bc
pop de
dec d
jp nz, .asm_170399
jp nz, .pkmn_loop
ret
; 170426
@ -326,20 +325,20 @@ BT_ChrisName: ; 170426
; 17042c
Function17042c: ; 17042c
ld hl, OTPartyMon2ID
ld a, $7
.asm_170431
ld hl, BT_TrainerTextIndex + $be
ld a, 7
.loop
push af
push hl
ld c, $12
.asm_170435
ld c, 18
.loop2
ld a, [hli]
ld b, a
ld a, [hli]
and a
jr z, .asm_170451
jr z, .skip
cp $f
jr nc, .asm_17045b
jr nc, .exit_inner_loop
push hl
ld hl, Unknown_170470
dec a
@ -349,34 +348,34 @@ Function17042c: ; 17042c
ld a, [hl]
pop hl
cp b
jr c, .asm_17045b
jr z, .asm_17045b
jr c, .exit_inner_loop
jr z, .exit_inner_loop
jr .asm_170456
.asm_170451
.skip
ld a, b
cp $fc
jr nc, .asm_17045b
jr nc, .exit_inner_loop
.asm_170456
dec c
jr nz, .asm_170435
jr .asm_170466
jr nz, .loop2
jr .dont_copy
.asm_17045b
.exit_inner_loop
pop de
push de
ld hl, Unknown_17047e
ld bc, BATTLETOWER_TRAINERDATALENGTH
call CopyBytes
.asm_170466
.dont_copy
pop hl
ld de, $00e0
add hl, de
pop af
dec a
jr nz, .asm_170431
jr nz, .loop
ret
; 170470

View File

@ -430,7 +430,7 @@ Function17a91e: ; 17a91e (5e:691e)
ret
.asm_17a92c
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function17a99e
ld hl, $d088
set 7, [hl]

View File

@ -2927,7 +2927,7 @@ UnknownText_0x8a23c: ; 0x8a23c
; 0x8a241
Function8a241: ; 8a241 (22:6241)
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function891fe
call Function8a262
jr nc, .asm_8a254
@ -3455,7 +3455,7 @@ Palette_8a624: ; 8a624
; 8a62c
Function8a62c: ; 8a62c (22:662c)
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function891fe
xor a
call Function8b94a
@ -3885,7 +3885,7 @@ Function8a999: ; 8a999 (22:6999)
jr c, .asm_8a9bb
push bc
push de
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
pop de
dec e
ld a, e
@ -4141,7 +4141,7 @@ Function8ab77: ; 8ab77 (22:6b77)
Function8ab93: ; 8ab93 (22:6b93)
call WhiteBGMap
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
callba Function105688
call ClearSprites
call Function891fe

View File

@ -242,7 +242,7 @@ Function10016f: ; 10016f
jr z, .asm_1001af
cp $f8
ret z
ret
ret ; ????????????????????????????
.asm_1001af
ld a, $d7
@ -4483,7 +4483,7 @@ Unknown_101d8d: ; 101d8d
Function101d95: ; 101d95
call Function101ee2
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
ld e, $e
call Function101ee4
ld hl, wcd29
@ -6256,7 +6256,7 @@ Jumptable_1029cb: ; 1029cb
; 1029cf
Function1029cf: ; 1029cf
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
hlcoord 10, 7
ld b, $3
ld c, $8
@ -6384,7 +6384,7 @@ Function102a3b: ; 102a3b
ld a, [hli]
ld [wc731], a
ld a, [hl]
ld [wc732], a
ld [wPlayerCharging], a
ld a, [wcd4d]
dec a
ld hl, OTPartyMon1DVs
@ -6401,7 +6401,7 @@ Function102a3b: ; 102a3b
ld c, l
callba GetCaughtGender
ld a, c
ld [wc733], a
ld [wEnemyCharging], a
ret
; 102b12

View File

@ -1259,7 +1259,7 @@ Function1089d2:
call Function108a92
ld de, wc703
call Function108a9c
ld a, [wc733]
ld a, [wEnemyCharging]
ld de, wc724
call Function108aa3
ld de, wc731

View File

@ -7658,7 +7658,7 @@ Function11b7e5: ; 11b7e5
ld a, [$c608 + 11]
ld [wc731], a
ld a, [$c608 + 12]
ld [wc732], a
ld [wPlayerCharging], a
ld hl, $c608 + 26
ld a, [hli]
ld [wc72f], a
@ -7667,7 +7667,7 @@ Function11b7e5: ; 11b7e5
ld bc, $c608 + 5
callba GetCaughtGender
ld a, c
ld [wc733], a
ld [wEnemyCharging], a
call SpeechTextBox
call FadeToMenu
callba Function108016

View File

@ -884,7 +884,7 @@ Function16d42e: ; 16d42e
; 16d43b
Function16d43b: ; 16d43b
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call WhiteBGMap
call ClearTileMap
call ClearSprites
@ -1034,7 +1034,7 @@ Function16d6ca: ; 16d6ca
; 16d6ce
Function16d6ce: ; 16d6ce
call LoadMenuDataHeader_0x1d75
call LoadPartyMenuDataHeader
call Function16d6e1
callba Function87d
call Call_ExitMenu

View File

@ -62,11 +62,11 @@ Function17005a: ; 17005a
ld a, [hli]
ld [wc731], a
ld a, [hl]
ld [wc732], a
ld [wPlayerCharging], a
ld bc, $a82c
callba GetCaughtGender
ld a, c
ld [wc733], a
ld [wEnemyCharging], a
ld a, [wcd81]
ld [wc74e], a
call CloseSRAM

View File

@ -285,7 +285,7 @@ Function17d0f3: ; 17d0f3
ld a, [$c608 + 11]
ld [wc731], a
ld a, [$c608 + 12]
ld [wc732], a
ld [wPlayerCharging], a
ld hl, $c608 + 26
ld a, [hli]
ld [wc72f], a
@ -294,7 +294,7 @@ Function17d0f3: ; 17d0f3
ld bc, $c608 + 5
callba GetCaughtGender
ld a, c
ld [wc733], a
ld [wEnemyCharging], a
call SpeechTextBox
call FadeToMenu
callba Function10804d

View File

@ -488,7 +488,14 @@ wc663::
CurOTMon:: ; c663
ds 1
wc664:: ds 1
wBattleParticipantsNotFainted::
; Bit array. Bits 0 - 5 correspond to party members 1 - 6.
; Bit set if the mon appears in battle.
; Bit cleared if the mon faints.
; Backed up if the enemy switches.
; All bits cleared if the enemy faints.
ds 1
TypeModifier:: ; c665
; >10: super-effective
; 10: normal
@ -848,8 +855,8 @@ wc72e:: ds 1
wc72f:: ds 1
wc730:: ds 1
wc731:: ds 1
wc732:: ds 1
wc733:: ds 1
wPlayerCharging:: ds 1
wEnemyCharging:: ds 1
wc734::
BattleEnded:: ; c734
ds 1