mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Add meaningful aliases for wd265
Introduce MONICON_* constants Introduce BATTLEPLAYERACTION_* constants
This commit is contained in:
parent
2ec900d96c
commit
9dec80b07e
@ -63,8 +63,8 @@ MOVE_LENGTH EQU const_value
|
|||||||
const STAT_SATK
|
const STAT_SATK
|
||||||
NUM_EXP_STATS EQU const_value + -1
|
NUM_EXP_STATS EQU const_value + -1
|
||||||
const STAT_SDEF
|
const STAT_SDEF
|
||||||
NUM_STATS EQU const_value +- 1
|
NUM_STATS EQU const_value + -1
|
||||||
STAT_SPC EQU STAT_SATK
|
NUM_BATTLE_STATS EQU NUM_STATS + -1 ; don't count HP
|
||||||
|
|
||||||
; stat formula constants
|
; stat formula constants
|
||||||
STAT_MIN_NORMAL EQU 5
|
STAT_MIN_NORMAL EQU 5
|
||||||
@ -244,6 +244,12 @@ SUBSTATUS_CURLED EQU 0
|
|||||||
const BATTLEACTION_E
|
const BATTLEACTION_E
|
||||||
const BATTLEACTION_FORFEIT
|
const BATTLEACTION_FORFEIT
|
||||||
|
|
||||||
|
; wBattlePlayerAction
|
||||||
|
const_def
|
||||||
|
const BATTLEPLAYERACTION_USEMOVE
|
||||||
|
const BATTLEPLAYERACTION_USEITEM
|
||||||
|
const BATTLEPLAYERACTION_SWITCH
|
||||||
|
|
||||||
; wBattleResult
|
; wBattleResult
|
||||||
const_def
|
const_def
|
||||||
const WIN
|
const WIN
|
||||||
|
@ -39,3 +39,13 @@
|
|||||||
const ICON_SLOWPOKE
|
const ICON_SLOWPOKE
|
||||||
const ICON_SUDOWOODO
|
const ICON_SUDOWOODO
|
||||||
const ICON_BIGMON
|
const ICON_BIGMON
|
||||||
|
|
||||||
|
; LoadMenuMonIcon.Jumptable indexes (see engine/gfx/mon_icons.asm)
|
||||||
|
const_def
|
||||||
|
const MONICON_PARTYMENU
|
||||||
|
const MONICON_NAMINGSCREEN
|
||||||
|
const MONICON_MOVES
|
||||||
|
const MONICON_TRADE
|
||||||
|
const MONICON_MOBILE1
|
||||||
|
const MONICON_MOBILE2
|
||||||
|
const MONICON_UNUSED
|
||||||
|
@ -87,7 +87,7 @@ SandstormHitsText:
|
|||||||
PerishCountText:
|
PerishCountText:
|
||||||
text "<USER>'s"
|
text "<USER>'s"
|
||||||
line "PERISH count is @"
|
line "PERISH count is @"
|
||||||
deciram wd265, 1, 1
|
deciram wDeciramBuffer, 1, 1
|
||||||
text "!"
|
text "!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
@ -669,7 +669,7 @@ SpiteEffectText:
|
|||||||
text_from_ram wStringBuffer1
|
text_from_ram wStringBuffer1
|
||||||
text " was"
|
text " was"
|
||||||
cont "reduced by @"
|
cont "reduced by @"
|
||||||
deciram wd265, 1, 1
|
deciram wDeciramBuffer, 1, 1
|
||||||
text "!"
|
text "!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
@ -1029,7 +1029,7 @@ SafeguardProtectText:
|
|||||||
|
|
||||||
MagnitudeText:
|
MagnitudeText:
|
||||||
text "Magnitude @"
|
text "Magnitude @"
|
||||||
deciram wd265, 1, 1
|
deciram wDeciramBuffer, 1, 1
|
||||||
text "!"
|
text "!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ UnknownText_0x1bc0a2::
|
|||||||
text_from_ram wStringBuffer1
|
text_from_ram wStringBuffer1
|
||||||
text_start
|
text_start
|
||||||
line "recovered @"
|
line "recovered @"
|
||||||
deciram wd1f3, 2, 3
|
deciram wCurHPAnimDeltaHP, 2, 3
|
||||||
text "HP!"
|
text "HP!"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -1155,7 +1155,7 @@ Text_BreedingIsNotPossible::
|
|||||||
UnknownText_0x1bd0d8::
|
UnknownText_0x1bd0d8::
|
||||||
text "The compatibility"
|
text "The compatibility"
|
||||||
line "is @"
|
line "is @"
|
||||||
deciram wd265, 1, 3
|
deciram wDeciramBuffer, 1, 3
|
||||||
text "."
|
text "."
|
||||||
cont "Should they breed?"
|
cont "Should they breed?"
|
||||||
done
|
done
|
||||||
|
@ -262,7 +262,7 @@ UnknownText_0x1c0531::
|
|||||||
text_from_ram wc850
|
text_from_ram wc850
|
||||||
text "'s CARD was"
|
text "'s CARD was"
|
||||||
line "listed as no.@"
|
line "listed as no.@"
|
||||||
deciram wd265, 1, 2
|
deciram wDeciramBuffer, 1, 2
|
||||||
text "."
|
text "."
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
|
@ -818,7 +818,7 @@ PrintText_UsedItemOn_AND_AIUpdateHUD:
|
|||||||
|
|
||||||
PrintText_UsedItemOn:
|
PrintText_UsedItemOn:
|
||||||
ld a, [wCurEnemyItem]
|
ld a, [wCurEnemyItem]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
|
@ -171,10 +171,10 @@ AI_Types:
|
|||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
and a
|
and a
|
||||||
jr z, .immune
|
jr z, .immune
|
||||||
cp 10 ; 1.0
|
cp EFFECTIVE
|
||||||
jr z, .checkmove
|
jr z, .checkmove
|
||||||
jr c, .noteffective
|
jr c, .noteffective
|
||||||
|
|
||||||
@ -415,8 +415,8 @@ AI_Smart_LeechHit:
|
|||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
; 60% chance to discourage this move if not very effective.
|
; 60% chance to discourage this move if not very effective.
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp 10 ; 1.0
|
cp EFFECTIVE
|
||||||
jr c, .asm_38815
|
jr c, .asm_38815
|
||||||
|
|
||||||
; Do nothing if effectiveness is neutral.
|
; Do nothing if effectiveness is neutral.
|
||||||
@ -491,8 +491,8 @@ AI_Smart_LockOn:
|
|||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
farcall BattleCheckTypeMatchup
|
farcall BattleCheckTypeMatchup
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp $a
|
cp EFFECTIVE
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .asm_3884f
|
jr c, .asm_3884f
|
||||||
@ -1292,8 +1292,8 @@ AI_Smart_Mimic:
|
|||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callfar BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp $a
|
cp EFFECTIVE
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .asm_38bef
|
jr c, .asm_38bef
|
||||||
jr z, .asm_38bd4
|
jr z, .asm_38bd4
|
||||||
@ -1408,8 +1408,8 @@ AI_Smart_Encore:
|
|||||||
predef CheckTypeMatchup
|
predef CheckTypeMatchup
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp $a
|
cp EFFECTIVE
|
||||||
jr nc, .asm_38c68
|
jr nc, .asm_38c68
|
||||||
|
|
||||||
and a
|
and a
|
||||||
@ -1679,8 +1679,8 @@ AI_Smart_Conversion2:
|
|||||||
|
|
||||||
callfar BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp $a
|
cp EFFECTIVE
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .asm_38dc9
|
jr c, .asm_38dc9
|
||||||
ret z
|
ret z
|
||||||
@ -2293,8 +2293,8 @@ AI_Smart_HiddenPower:
|
|||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
; Discourage Hidden Power if not very effective.
|
; Discourage Hidden Power if not very effective.
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp 10
|
cp EFFECTIVE
|
||||||
jr c, .bad
|
jr c, .bad
|
||||||
|
|
||||||
; Discourage Hidden Power if its base power is lower than 50.
|
; Discourage Hidden Power if its base power is lower than 50.
|
||||||
@ -2303,8 +2303,8 @@ AI_Smart_HiddenPower:
|
|||||||
jr c, .bad
|
jr c, .bad
|
||||||
|
|
||||||
; Encourage Hidden Power if super-effective.
|
; Encourage Hidden Power if super-effective.
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp 11
|
cp EFFECTIVE + 1
|
||||||
jr nc, .good
|
jr nc, .good
|
||||||
|
|
||||||
; Encourage Hidden Power if its base power is 70.
|
; Encourage Hidden Power if its base power is 70.
|
||||||
@ -3125,7 +3125,7 @@ AI_Status:
|
|||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
and a
|
and a
|
||||||
jr nz, .checkmove
|
jr nz, .checkmove
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ HandleBerserkGene:
|
|||||||
push bc
|
push bc
|
||||||
callfar GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
sub BERSERK_GENE
|
sub BERSERK_GENE
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
@ -447,7 +447,7 @@ DetermineMoveOrder:
|
|||||||
sub BATTLEACTION_SWITCH1
|
sub BATTLEACTION_SWITCH1
|
||||||
jr c, .use_move
|
jr c, .use_move
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
cp $2
|
cp BATTLEPLAYERACTION_SWITCH
|
||||||
jr nz, .switch
|
jr nz, .switch
|
||||||
ld a, [hSerialConnectionStatus]
|
ld a, [hSerialConnectionStatus]
|
||||||
cp USING_INTERNAL_CLOCK
|
cp USING_INTERNAL_CLOCK
|
||||||
@ -472,7 +472,7 @@ DetermineMoveOrder:
|
|||||||
|
|
||||||
.use_move
|
.use_move
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a ; BATTLEPLAYERACTION_USEMOVE?
|
||||||
jp nz, .player_first
|
jp nz, .player_first
|
||||||
call CompareMovePriority
|
call CompareMovePriority
|
||||||
jr z, .equal_priority
|
jr z, .equal_priority
|
||||||
@ -611,7 +611,7 @@ ParsePlayerAction:
|
|||||||
|
|
||||||
.not_encored
|
.not_encored
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
cp $2
|
cp BATTLEPLAYERACTION_SWITCH
|
||||||
jr z, .reset_rage
|
jr z, .reset_rage
|
||||||
and a
|
and a
|
||||||
jr nz, .reset_bide
|
jr nz, .reset_bide
|
||||||
@ -900,7 +900,7 @@ Battle_EnemyFirst:
|
|||||||
call ResidualDamage
|
call ResidualDamage
|
||||||
jp z, HandlePlayerMonFaint
|
jp z, HandlePlayerMonFaint
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
xor a
|
xor a ; BATTLEPLAYERACTION_USEMOVE
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -949,7 +949,7 @@ Battle_PlayerFirst:
|
|||||||
call ResidualDamage
|
call ResidualDamage
|
||||||
jp z, HandleEnemyMonFaint
|
jp z, HandleEnemyMonFaint
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
xor a
|
xor a ; BATTLEPLAYERACTION_USEMOVE
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1161,7 +1161,7 @@ HandlePerishSong:
|
|||||||
ret z
|
ret z
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
push af
|
push af
|
||||||
ld hl, PerishCountText
|
ld hl, PerishCountText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@ -1235,7 +1235,7 @@ HandleWrap:
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [wFXAnimID], a
|
ld [wFXAnimID], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -1288,7 +1288,7 @@ HandleLeftovers:
|
|||||||
|
|
||||||
callfar GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_LEFTOVERS
|
cp HELD_LEFTOVERS
|
||||||
@ -1397,7 +1397,7 @@ HandleMysteryberry:
|
|||||||
push bc
|
push bc
|
||||||
push bc
|
push bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
ld de, wBattleMonMoves - 1
|
ld de, wBattleMonMoves - 1
|
||||||
ld hl, wBattleMonPP
|
ld hl, wBattleMonPP
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
@ -1417,7 +1417,7 @@ HandleMysteryberry:
|
|||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wTempByteValue]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .skip_checks
|
jr nz, .skip_checks
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
@ -1434,7 +1434,7 @@ HandleMysteryberry:
|
|||||||
.skip_checks
|
.skip_checks
|
||||||
callfar GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call GetPartymonItem
|
call GetPartymonItem
|
||||||
@ -2048,18 +2048,18 @@ HandleEnemyMonFaint:
|
|||||||
call CheckMobileBattleError
|
call CheckMobileBattleError
|
||||||
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
|
|
||||||
ld a, $1
|
ld a, BATTLEPLAYERACTION_USEITEM
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call HandleEnemySwitch
|
call HandleEnemySwitch
|
||||||
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
jr DoubleSwitch
|
jr DoubleSwitch
|
||||||
|
|
||||||
.player_mon_not_fainted
|
.player_mon_not_fainted
|
||||||
ld a, $1
|
ld a, BATTLEPLAYERACTION_USEITEM
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call HandleEnemySwitch
|
call HandleEnemySwitch
|
||||||
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
xor a
|
xor a ; BATTLEPLAYERACTION_USEMOVE
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2088,7 +2088,7 @@ DoubleSwitch:
|
|||||||
call PlayerPartyMonEntrance
|
call PlayerPartyMonEntrance
|
||||||
|
|
||||||
.done
|
.done
|
||||||
xor a
|
xor a ; BATTLEPLAYERACTION_USEMOVE
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2636,7 +2636,7 @@ HandlePlayerMonFaint:
|
|||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $1
|
ld a, BATTLEPLAYERACTION_USEITEM
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call HandleEnemySwitch
|
call HandleEnemySwitch
|
||||||
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
@ -2716,12 +2716,12 @@ ForcePlayerMonChoice:
|
|||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .skip_link
|
jr z, .skip_link
|
||||||
ld a, $1
|
ld a, BATTLEPLAYERACTION_USEITEM
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call LinkBattleSendReceiveAction
|
call LinkBattleSendReceiveAction
|
||||||
|
|
||||||
.skip_link
|
.skip_link
|
||||||
xor a
|
xor a ; BATTLEPLAYERACTION_USEMOVE
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call CheckMobileBattleError
|
call CheckMobileBattleError
|
||||||
jr c, .enemy_fainted_mobile_error
|
jr c, .enemy_fainted_mobile_error
|
||||||
@ -3287,8 +3287,8 @@ LookUpTheEffectivenessOfEveryMove:
|
|||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265] ; Get The Effectiveness Modifier
|
ld a, [wTypeMatchup]
|
||||||
cp 10 + 1 ; 1.0 + 0.1
|
cp EFFECTIVE + 1
|
||||||
jr c, .loop
|
jr c, .loop
|
||||||
ld hl, wBuffer1
|
ld hl, wBuffer1
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
@ -3319,14 +3319,14 @@ IsThePlayerMonTypesEffectiveAgainstOTMon:
|
|||||||
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
callfar BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp 10 + 1 ; 1.0 + 0.1
|
cp EFFECTIVE + 1
|
||||||
jr nc, .super_effective
|
jr nc, .super_effective
|
||||||
ld a, [wBattleMonType2]
|
ld a, [wBattleMonType2]
|
||||||
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
||||||
callfar BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
ld a, [wd265]
|
ld a, [wTypeMatchup]
|
||||||
cp 10 + 1 ; 1.0 + 0.1
|
cp EFFECTIVE + 1
|
||||||
jr nc, .super_effective
|
jr nc, .super_effective
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
@ -3695,7 +3695,7 @@ TryToRunAwayFromBattle:
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld a, [wBattleMonItem]
|
ld a, [wBattleMonItem]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld b, a
|
ld b, a
|
||||||
callfar GetItemHeldEffect
|
callfar GetItemHeldEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -3732,7 +3732,7 @@ TryToRunAwayFromBattle:
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand], a
|
||||||
ld a, $20
|
ld a, 32
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld a, [hProduct + 2]
|
ld a, [hProduct + 2]
|
||||||
@ -3772,7 +3772,7 @@ TryToRunAwayFromBattle:
|
|||||||
ld a, [hQuotient + 2]
|
ld a, [hQuotient + 2]
|
||||||
cp b
|
cp b
|
||||||
jr nc, .can_escape
|
jr nc, .can_escape
|
||||||
ld a, $1
|
ld a, BATTLEPLAYERACTION_USEITEM
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ld hl, BattleText_CantEscape2
|
ld hl, BattleText_CantEscape2
|
||||||
jr .print_inescapable_text
|
jr .print_inescapable_text
|
||||||
@ -3786,7 +3786,7 @@ TryToRunAwayFromBattle:
|
|||||||
|
|
||||||
.print_inescapable_text
|
.print_inescapable_text
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
ld a, $1
|
ld a, TRUE
|
||||||
ld [wFailedToFlee], a
|
ld [wFailedToFlee], a
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
and a
|
and a
|
||||||
@ -3798,7 +3798,7 @@ TryToRunAwayFromBattle:
|
|||||||
ld a, DRAW
|
ld a, DRAW
|
||||||
jr z, .fled
|
jr z, .fled
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
xor a
|
xor a ; BATTLEPLAYERACTION_USEMOVE
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ld a, $f
|
ld a, $f
|
||||||
ld [wCurMoveNum], a
|
ld [wCurMoveNum], a
|
||||||
@ -4429,7 +4429,7 @@ UseConfusionHealingItem:
|
|||||||
|
|
||||||
.heal_status
|
.heal_status
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_CONFUSED, [hl]
|
res SUBSTATUS_CONFUSED, [hl]
|
||||||
@ -4496,7 +4496,7 @@ HandleStatBoostingHeldItems:
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
push bc
|
push bc
|
||||||
dec hl
|
dec hl
|
||||||
dec hl
|
dec hl
|
||||||
@ -4952,7 +4952,7 @@ BattleMenu_Pack:
|
|||||||
|
|
||||||
farcall BattlePack
|
farcall BattlePack
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a ; BATTLEPLAYERACTION_USEMOVE?
|
||||||
jr z, .didnt_use_item
|
jr z, .didnt_use_item
|
||||||
jr .got_item
|
jr .got_item
|
||||||
|
|
||||||
@ -5157,7 +5157,7 @@ TryPlayerSwitch:
|
|||||||
jp z, BattleMenuPKMN_Loop
|
jp z, BattleMenuPKMN_Loop
|
||||||
ld a, [wCurBattleMon]
|
ld a, [wCurBattleMon]
|
||||||
ld [wLastPlayerMon], a
|
ld [wLastPlayerMon], a
|
||||||
ld a, $2
|
ld a, BATTLEPLAYERACTION_SWITCH
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -5270,8 +5270,8 @@ PassedBattleMonEntrance:
|
|||||||
ld [wCurBattleMon], a
|
ld [wCurBattleMon], a
|
||||||
call AddBattleParticipant
|
call AddBattleParticipant
|
||||||
call InitBattleMon
|
call InitBattleMon
|
||||||
xor a
|
xor a ; FALSE
|
||||||
ld [wd265], a
|
ld [wApplyStatLevelMultipliersToEnemy], a
|
||||||
call ApplyStatLevelMultiplierOnAllStats
|
call ApplyStatLevelMultiplierOnAllStats
|
||||||
call SendOutPlayerMon
|
call SendOutPlayerMon
|
||||||
call EmptyBattleTextBox
|
call EmptyBattleTextBox
|
||||||
@ -5286,11 +5286,11 @@ BattleMenu_Run:
|
|||||||
ld hl, wBattleMonSpeed
|
ld hl, wBattleMonSpeed
|
||||||
ld de, wEnemyMonSpeed
|
ld de, wEnemyMonSpeed
|
||||||
call TryToRunAwayFromBattle
|
call TryToRunAwayFromBattle
|
||||||
ld a, $0
|
ld a, FALSE
|
||||||
ld [wFailedToFlee], a
|
ld [wFailedToFlee], a
|
||||||
ret c
|
ret c
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a ; BATTLEPLAYERACTION_USEMOVE?
|
||||||
ret nz
|
ret nz
|
||||||
jp BattleMenu
|
jp BattleMenu
|
||||||
|
|
||||||
@ -5770,7 +5770,7 @@ ParseEnemyAction:
|
|||||||
call EmptyBattleTextBox
|
call EmptyBattleTextBox
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a ; BATTLEPLAYERACTION_USEMOVE?
|
||||||
call z, LinkBattleSendReceiveAction
|
call z, LinkBattleSendReceiveAction
|
||||||
call Call_LoadTempTileMapToTileMap
|
call Call_LoadTempTileMapToTileMap
|
||||||
ld a, [wBattleAction]
|
ld a, [wBattleAction]
|
||||||
@ -6375,7 +6375,7 @@ LoadEnemyMon:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
ld a, [wTempEnemyMonSpecies]
|
ld a, [wTempEnemyMonSpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
|
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
@ -6661,14 +6661,14 @@ ApplyStatLevelMultiplierOnAllStats:
|
|||||||
call ApplyStatLevelMultiplier
|
call ApplyStatLevelMultiplier
|
||||||
inc c
|
inc c
|
||||||
ld a, c
|
ld a, c
|
||||||
cp 5
|
cp NUM_BATTLE_STATS
|
||||||
jr nz, .stat_loop
|
jr nz, .stat_loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ApplyStatLevelMultiplier:
|
ApplyStatLevelMultiplier:
|
||||||
push bc
|
push bc
|
||||||
push bc
|
push bc
|
||||||
ld a, [wd265]
|
ld a, [wApplyStatLevelMultipliersToEnemy]
|
||||||
and a
|
and a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, wBattleMonAttack
|
ld hl, wBattleMonAttack
|
||||||
@ -6718,7 +6718,7 @@ ApplyStatLevelMultiplier:
|
|||||||
call Multiply
|
call Multiply
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hDivisor], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, 4
|
||||||
call Divide
|
call Divide
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
@ -7192,7 +7192,7 @@ GiveExperiencePoints:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a ; unused?
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
ld hl, MON_MAXHP + 1
|
ld hl, MON_MAXHP + 1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -7256,8 +7256,8 @@ GiveExperiencePoints:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
.transformed
|
.transformed
|
||||||
xor a
|
xor a ; FALSE
|
||||||
ld [wd265], a
|
ld [wApplyStatLevelMultipliersToEnemy], a
|
||||||
call ApplyStatLevelMultiplierOnAllStats
|
call ApplyStatLevelMultiplierOnAllStats
|
||||||
callfar ApplyStatusEffectOnPlayerStats
|
callfar ApplyStatusEffectOnPlayerStats
|
||||||
callfar BadgeStatBoosts
|
callfar BadgeStatBoosts
|
||||||
@ -7299,7 +7299,7 @@ GiveExperiencePoints:
|
|||||||
xor a ; PARTYMON
|
xor a ; PARTYMON
|
||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a ; unused?
|
||||||
ld a, [wCurPartyLevel]
|
ld a, [wCurPartyLevel]
|
||||||
push af
|
push af
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -7359,7 +7359,7 @@ GiveExperiencePoints:
|
|||||||
cp 2
|
cp 2
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
ld hl, wEnemyMonBaseStats
|
ld hl, wEnemyMonBaseStats
|
||||||
ld c, wEnemyMonEnd - wEnemyMonBaseStats
|
ld c, wEnemyMonEnd - wEnemyMonBaseStats
|
||||||
.count_loop2
|
.count_loop2
|
||||||
@ -7367,7 +7367,7 @@ GiveExperiencePoints:
|
|||||||
ld [hDividend + 0], a
|
ld [hDividend + 0], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hDividend + 1], a
|
ld [hDividend + 1], a
|
||||||
ld a, [wd265]
|
ld a, [wTempByteValue]
|
||||||
ld [hDivisor], a
|
ld [hDivisor], a
|
||||||
ld b, 2
|
ld b, 2
|
||||||
call Divide
|
call Divide
|
||||||
|
@ -2,7 +2,7 @@ DoPlayerTurn:
|
|||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
|
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a ; BATTLEPLAYERACTION_USEMOVE?
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
jr DoTurn
|
jr DoTurn
|
||||||
@ -1248,7 +1248,7 @@ BattleCommand_Stab:
|
|||||||
.go
|
.go
|
||||||
ld a, BATTLE_VARS_MOVE_TYPE
|
ld a, BATTLE_VARS_MOVE_TYPE
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
ld [wTypeMatchup], a
|
ld [wCurType], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
@ -1264,7 +1264,7 @@ BattleCommand_Stab:
|
|||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
|
|
||||||
ld a, [wTypeMatchup]
|
ld a, [wCurType]
|
||||||
cp b
|
cp b
|
||||||
jr z, .stab
|
jr z, .stab
|
||||||
cp c
|
cp c
|
||||||
|
@ -53,13 +53,13 @@ DoWeatherModifiers:
|
|||||||
ld de, WeatherTypeModifiers
|
ld de, WeatherTypeModifiers
|
||||||
ld a, [wBattleWeather]
|
ld a, [wBattleWeather]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd265] ; move type
|
ld a, [wCurType]
|
||||||
ld c, a
|
ld c, a
|
||||||
|
|
||||||
.CheckWeatherType:
|
.CheckWeatherType:
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
cp $ff
|
cp -1
|
||||||
jr z, .done_weather_types
|
jr z, .done_weather_types
|
||||||
|
|
||||||
cp b
|
cp b
|
||||||
@ -84,7 +84,7 @@ DoWeatherModifiers:
|
|||||||
.CheckWeatherMove:
|
.CheckWeatherMove:
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
cp $ff
|
cp -1
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
cp b
|
cp b
|
||||||
@ -116,7 +116,7 @@ DoWeatherModifiers:
|
|||||||
|
|
||||||
ld a, 10
|
ld a, 10
|
||||||
ld [hDivisor], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, 4
|
||||||
call Divide
|
call Divide
|
||||||
|
|
||||||
ld a, [hQuotient + 0]
|
ld a, [hQuotient + 0]
|
||||||
@ -176,7 +176,7 @@ DoBadgeTypeBoosts:
|
|||||||
rr c
|
rr c
|
||||||
jr nc, .NextBadge
|
jr nc, .NextBadge
|
||||||
|
|
||||||
ld a, [wd265] ; move type
|
ld a, [wCurType]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .ApplyBoost
|
jr z, .ApplyBoost
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ BattleCommand_BatonPass:
|
|||||||
call CallBattleCore
|
call CallBattleCore
|
||||||
ld hl, ResetBattleParticipants
|
ld hl, ResetBattleParticipants
|
||||||
call CallBattleCore
|
call CallBattleCore
|
||||||
ld a, 1
|
ld a, TRUE
|
||||||
ld [wTypeMatchup], a
|
ld [wApplyStatLevelMultipliersToEnemy], a
|
||||||
ld hl, ApplyStatLevelMultiplierOnAllStats
|
ld hl, ApplyStatLevelMultiplierOnAllStats
|
||||||
call CallBattleCore
|
call CallBattleCore
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ BatonPass_LinkPlayerSwitch:
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, 1
|
ld a, BATTLEPLAYERACTION_USEITEM
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
|
|
||||||
call LoadStandardMenuHeader
|
call LoadStandardMenuHeader
|
||||||
@ -91,7 +91,7 @@ BatonPass_LinkPlayerSwitch:
|
|||||||
call CallBattleCore
|
call CallBattleCore
|
||||||
call CloseWindow
|
call CloseWindow
|
||||||
|
|
||||||
xor a
|
xor a ; BATTLEPLAYERACTION_USEMOVE
|
||||||
ld [wBattlePlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ BattleCommand_GetMagnitude:
|
|||||||
push de
|
push de
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wTypeMatchup], a
|
ld [wDeciramBuffer], a
|
||||||
call BattleCommand_MoveDelay
|
call BattleCommand_MoveDelay
|
||||||
ld hl, MagnitudeText
|
ld hl, MagnitudeText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
@ -24,7 +24,7 @@ BattleCommand_MirrorMove:
|
|||||||
.use
|
.use
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
|
|
||||||
push af
|
push af
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
|
@ -34,7 +34,7 @@ BattleCommand_Sketch:
|
|||||||
.get_last_move
|
.get_last_move
|
||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld [wTypeMatchup], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld b, a
|
ld b, a
|
||||||
; Fail if move is invalid or is Struggle.
|
; Fail if move is invalid or is Struggle.
|
||||||
and a
|
and a
|
||||||
|
@ -24,7 +24,7 @@ BattleCommand_Spite:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp b
|
cp b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ld [wTypeMatchup], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
dec hl
|
dec hl
|
||||||
ld b, 0
|
ld b, 0
|
||||||
push bc
|
push bc
|
||||||
@ -78,7 +78,7 @@ BattleCommand_Spite:
|
|||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
pop de
|
pop de
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wTypeMatchup], a
|
ld [wDeciramBuffer], a
|
||||||
ld hl, SpiteEffectText
|
ld hl, SpiteEffectText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ BattleCommand_Thief:
|
|||||||
|
|
||||||
; Can't steal mail.
|
; Can't steal mail.
|
||||||
|
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld d, a
|
ld d, a
|
||||||
farcall ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
@ -45,7 +45,7 @@ BattleCommand_Thief:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
call .playeritem
|
call .playeritem
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
jr .stole
|
jr .stole
|
||||||
@ -68,7 +68,7 @@ BattleCommand_Thief:
|
|||||||
|
|
||||||
; Can't steal mail!
|
; Can't steal mail!
|
||||||
|
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld d, a
|
ld d, a
|
||||||
farcall ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
@ -86,7 +86,7 @@ BattleCommand_Thief:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
call .enemyitem
|
call .enemyitem
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ UsedMoveText:
|
|||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld [wd265], a
|
ld [wMoveGrammar], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
farcall CheckUserIsCharging
|
farcall CheckUserIsCharging
|
||||||
@ -34,13 +34,12 @@ UsedMoveText:
|
|||||||
jr nz, .grammar
|
jr nz, .grammar
|
||||||
|
|
||||||
; update last move
|
; update last move
|
||||||
ld a, [wd265]
|
ld a, [wMoveGrammar]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
.grammar
|
.grammar
|
||||||
call GetMoveGrammar
|
call GetMoveGrammar ; convert move id to grammar index
|
||||||
; wd265 now contains MoveGrammar
|
|
||||||
|
|
||||||
; everything except 'instead' made redundant in localization
|
; everything except 'instead' made redundant in localization
|
||||||
|
|
||||||
@ -51,7 +50,7 @@ UsedMoveText:
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
; check move grammar
|
; check move grammar
|
||||||
ld a, [wd265]
|
ld a, [wMoveGrammar]
|
||||||
cp $3
|
cp $3
|
||||||
ld hl, UsedMove2Text
|
ld hl, UsedMove2Text
|
||||||
ret c
|
ret c
|
||||||
@ -89,14 +88,14 @@ MoveNameText:
|
|||||||
ld hl, .endusedmovetexts
|
ld hl, .endusedmovetexts
|
||||||
|
|
||||||
; get move id
|
; get move id
|
||||||
ld a, [wd265]
|
ld a, [wMoveGrammar]
|
||||||
|
|
||||||
; 2-byte pointer
|
; 2-byte pointer
|
||||||
add a
|
add a
|
||||||
|
|
||||||
; seek
|
; seek
|
||||||
push bc
|
push bc
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
@ -132,13 +131,13 @@ EndUsedMove5Text:
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
GetMoveGrammar:
|
GetMoveGrammar:
|
||||||
; store move grammar type in wd265
|
; store move grammar type in wMoveGrammar
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
; c = move id
|
; wMoveGrammar contains move id
|
||||||
ld a, [wd265]
|
ld a, [wMoveGrammar]
|
||||||
ld c, a
|
ld c, a ; move id
|
||||||
ld b, $0
|
ld b, 0 ; grammar index
|
||||||
|
|
||||||
; read grammar table
|
; read grammar table
|
||||||
ld hl, MoveGrammar
|
ld hl, MoveGrammar
|
||||||
@ -158,9 +157,9 @@ GetMoveGrammar:
|
|||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.end
|
.end
|
||||||
; wd265 now contains move grammar
|
; wMoveGrammar now contains move grammar
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wd265], a
|
ld [wMoveGrammar], a
|
||||||
|
|
||||||
; we're done
|
; we're done
|
||||||
pop bc
|
pop bc
|
||||||
|
@ -2,7 +2,7 @@ BugContest_SetCaughtContestMon:
|
|||||||
ld a, [wContestMon]
|
ld a, [wContestMon]
|
||||||
and a
|
and a
|
||||||
jr z, .firstcatch
|
jr z, .firstcatch
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
farcall DisplayAlreadyCaughtText
|
farcall DisplayAlreadyCaughtText
|
||||||
farcall DisplayCaughtContestMonStats
|
farcall DisplayCaughtContestMonStats
|
||||||
lb bc, 14, 7
|
lb bc, 14, 7
|
||||||
@ -12,7 +12,7 @@ BugContest_SetCaughtContestMon:
|
|||||||
.firstcatch
|
.firstcatch
|
||||||
call .generatestats
|
call .generatestats
|
||||||
ld a, [wTempEnemyMonSpecies]
|
ld a, [wTempEnemyMonSpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, .caughttext
|
ld hl, .caughttext
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -36,7 +36,7 @@ DisplayCaughtContestMonStats:
|
|||||||
call PlaceString
|
call PlaceString
|
||||||
|
|
||||||
ld a, [wContestMon]
|
ld a, [wContestMon]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
hlcoord 1, 2
|
hlcoord 1, 2
|
||||||
|
@ -558,7 +558,7 @@ DayCare_InitBreeding:
|
|||||||
bit DAYCAREMAN_HAS_MON_F, a
|
bit DAYCAREMAN_HAS_MON_F, a
|
||||||
ret z
|
ret z
|
||||||
callfar CheckBreedmonCompatibility
|
callfar CheckBreedmonCompatibility
|
||||||
ld a, [wd265]
|
ld a, [wBreedingCompatibility]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
inc a
|
inc a
|
||||||
|
@ -407,7 +407,7 @@ FlyFunction_InitGFX:
|
|||||||
ld d, 0
|
ld d, 0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempIconSpecies], a
|
||||||
ld e, FIELDMOVE_FLY
|
ld e, FIELDMOVE_FLY
|
||||||
farcall FlyFunction_GetMonIcon
|
farcall FlyFunction_GetMonIcon
|
||||||
xor a
|
xor a
|
||||||
|
@ -462,7 +462,7 @@ DisplayHOFMon:
|
|||||||
call TextBox
|
call TextBox
|
||||||
ld a, [wTempMonSpecies]
|
ld a, [wTempMonSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
ld hl, wTempMonDVs
|
ld hl, wTempMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
xor a
|
xor a
|
||||||
@ -477,7 +477,7 @@ DisplayHOFMon:
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], "<DOT>"
|
ld [hl], "<DOT>"
|
||||||
hlcoord 3, 13
|
hlcoord 3, 13
|
||||||
ld de, wd265
|
ld de, wDeciramBuffer
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
call GetBasePokemonName
|
call GetBasePokemonName
|
||||||
|
@ -11,7 +11,7 @@ GetFirstPokemonHappiness:
|
|||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.done
|
.done
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
@ -19,9 +19,9 @@ GetFirstPokemonHappiness:
|
|||||||
|
|
||||||
CheckFirstMonIsEgg:
|
CheckFirstMonIsEgg:
|
||||||
ld a, [wPartySpecies]
|
ld a, [wPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
cp EGG
|
cp EGG
|
||||||
ld a, 1
|
ld a, TRUE
|
||||||
jr z, .egg
|
jr z, .egg
|
||||||
xor a
|
xor a
|
||||||
|
|
||||||
@ -196,15 +196,15 @@ DayCareStep::
|
|||||||
call Random
|
call Random
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
callfar CheckBreedmonCompatibility
|
callfar CheckBreedmonCompatibility
|
||||||
ld a, [wd265]
|
ld a, [wBreedingCompatibility]
|
||||||
cp 230
|
cp 230
|
||||||
ld b, 32 percent - 1
|
ld b, 32 percent - 1
|
||||||
jr nc, .okay
|
jr nc, .okay
|
||||||
ld a, [wd265]
|
ld a, [wBreedingCompatibility]
|
||||||
cp 170
|
cp 170
|
||||||
ld b, 16 percent
|
ld b, 16 percent
|
||||||
jr nc, .okay
|
jr nc, .okay
|
||||||
ld a, [wd265]
|
ld a, [wBreedingCompatibility]
|
||||||
cp 110
|
cp 110
|
||||||
ld b, 12 percent
|
ld b, 12 percent
|
||||||
jr nc, .okay
|
jr nc, .okay
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
CheckForLuckyNumberWinners:
|
CheckForLuckyNumberWinners:
|
||||||
xor a
|
xor a
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld [wFoundMatchingIDInParty], a
|
ld [wTempByteValue], a
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
@ -34,8 +34,8 @@ CheckForLuckyNumberWinners:
|
|||||||
jr z, .SkipOpenBoxMon
|
jr z, .SkipOpenBoxMon
|
||||||
call .CompareLuckyNumberToMonID
|
call .CompareLuckyNumberToMonID
|
||||||
jr nc, .SkipOpenBoxMon
|
jr nc, .SkipOpenBoxMon
|
||||||
ld a, 1
|
ld a, TRUE
|
||||||
ld [wFoundMatchingIDInParty], a
|
ld [wTempByteValue], a
|
||||||
|
|
||||||
.SkipOpenBoxMon:
|
.SkipOpenBoxMon:
|
||||||
push bc
|
push bc
|
||||||
@ -81,8 +81,8 @@ CheckForLuckyNumberWinners:
|
|||||||
|
|
||||||
call .CompareLuckyNumberToMonID ; sets wScriptVar and wCurPartySpecies appropriately
|
call .CompareLuckyNumberToMonID ; sets wScriptVar and wCurPartySpecies appropriately
|
||||||
jr nc, .SkipBoxMon
|
jr nc, .SkipBoxMon
|
||||||
ld a, 1
|
ld a, TRUE
|
||||||
ld [wFoundMatchingIDInParty], a
|
ld [wTempByteValue], a
|
||||||
|
|
||||||
.SkipBoxMon:
|
.SkipBoxMon:
|
||||||
push bc
|
push bc
|
||||||
@ -104,7 +104,7 @@ CheckForLuckyNumberWinners:
|
|||||||
and a
|
and a
|
||||||
ret z ; found nothing
|
ret z ; found nothing
|
||||||
farcall StubbedTrainerRankings_LuckyNumberShow
|
farcall StubbedTrainerRankings_LuckyNumberShow
|
||||||
ld a, [wFoundMatchingIDInParty]
|
ld a, [wTempByteValue]
|
||||||
and a
|
and a
|
||||||
push af
|
push af
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
|
@ -185,7 +185,7 @@ CalcMagikarpLength:
|
|||||||
|
|
||||||
ld hl, MagikarpLengths
|
ld hl, MagikarpLengths
|
||||||
ld a, 2
|
ld a, 2
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
|
|
||||||
.read
|
.read
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -214,7 +214,7 @@ CalcMagikarpLength:
|
|||||||
ld [hMultiplicand + 1], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, 100
|
ld a, 100
|
||||||
ld [hMultiplicand + 2], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, [wd265]
|
ld a, [wTempByteValue]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -228,9 +228,9 @@ CalcMagikarpLength:
|
|||||||
|
|
||||||
.next
|
.next
|
||||||
inc hl ; align to next triplet
|
inc hl ; align to next triplet
|
||||||
ld a, [wd265]
|
ld a, [wTempByteValue]
|
||||||
inc a
|
inc a
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
cp 16
|
cp 16
|
||||||
jr c, .read
|
jr c, .read
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ MoveDeletion:
|
|||||||
jr c, .declined
|
jr c, .declined
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
push af
|
push af
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurMove]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
ld hl, .ConfirmDeleteText
|
ld hl, .ConfirmDeleteText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -8,7 +8,7 @@ MoveTutor:
|
|||||||
xor a
|
xor a
|
||||||
ld [wItemAttributeParamBuffer], a
|
ld [wItemAttributeParamBuffer], a
|
||||||
call .GetMoveTutorMove
|
call .GetMoveTutorMove
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
|
@ -29,7 +29,7 @@ _NameRater:
|
|||||||
xor a ; PARTYMON
|
xor a ; PARTYMON
|
||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
ld b, 0
|
ld b, 0
|
||||||
|
@ -301,7 +301,7 @@ Trade_GetAttributeOfLastPartymon:
|
|||||||
|
|
||||||
GetTradeMonName:
|
GetTradeMonName:
|
||||||
push de
|
push de
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetBasePokemonName
|
call GetBasePokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
pop de
|
pop de
|
||||||
|
@ -34,7 +34,7 @@ GameCornerPrizeMonCheckDex:
|
|||||||
call SetSeenAndCaughtMon
|
call SetSeenAndCaughtMon
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
farcall NewPokedexEntry
|
farcall NewPokedexEntry
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
@ -153,7 +153,7 @@ GetMysteryGiftItem:
|
|||||||
ld [sMysteryGiftItem], a
|
ld [sMysteryGiftItem], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, .ReceiveItemText
|
ld hl, .ReceiveItemText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -34,13 +34,14 @@ LoadMenuMonIcon:
|
|||||||
jp hl
|
jp hl
|
||||||
|
|
||||||
.Jumptable:
|
.Jumptable:
|
||||||
dw PartyMenu_InitAnimatedMonIcon ; party menu
|
; entries correspond to MONICON_* constants
|
||||||
dw NamingScreen_InitAnimatedMonIcon ; naming screen
|
dw PartyMenu_InitAnimatedMonIcon ; MONICON_PARTYMENU
|
||||||
dw MoveList_InitAnimatedMonIcon ; moves (?)
|
dw NamingScreen_InitAnimatedMonIcon ; MONICON_NAMINGSCREEN
|
||||||
dw Trade_LoadMonIconGFX ; trade
|
dw MoveList_InitAnimatedMonIcon ; MONICON_MOVES
|
||||||
dw Mobile_InitAnimatedMonIcon ; mobile
|
dw Trade_LoadMonIconGFX ; MONICON_TRADE
|
||||||
dw Mobile_InitPartyMenuBGPal71 ; mobile
|
dw Mobile_InitAnimatedMonIcon ; MONICON_MOBILE1
|
||||||
dw .GetPartyMenuMonIcon ; unused
|
dw Mobile_InitPartyMenuBGPal71 ; MONICON_MOBILE2
|
||||||
|
dw .GetPartyMenuMonIcon ; MONICON_UNUSED
|
||||||
|
|
||||||
.GetPartyMenuMonIcon:
|
.GetPartyMenuMonIcon:
|
||||||
call InitPartyMenuIcon
|
call InitPartyMenuIcon
|
||||||
@ -65,14 +66,14 @@ LoadMenuMonIcon:
|
|||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .not_mail
|
jr c, .not_mail
|
||||||
ld a, $6
|
ld a, $06
|
||||||
jr .got_tile
|
jr .got_tile
|
||||||
.not_mail
|
.not_mail
|
||||||
ld a, $5
|
ld a, $05
|
||||||
; jr .got_tile
|
; fallthrough
|
||||||
|
|
||||||
.no_item
|
.no_item
|
||||||
ld a, $4
|
ld a, $04
|
||||||
.got_tile
|
.got_tile
|
||||||
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -156,7 +157,7 @@ InitPartyMenuIcon:
|
|||||||
ld a, [hObjectStructIndexBuffer]
|
ld a, [hObjectStructIndexBuffer]
|
||||||
ld hl, wPartySpecies
|
ld hl, wPartySpecies
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, $0
|
ld d, 0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
@ -214,7 +215,7 @@ SetPartyMonIconAnimSpeed:
|
|||||||
db $80 ; HP_RED
|
db $80 ; HP_RED
|
||||||
|
|
||||||
NamingScreen_InitAnimatedMonIcon:
|
NamingScreen_InitAnimatedMonIcon:
|
||||||
ld a, [wd265]
|
ld a, [wTempIconSpecies]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [wCurIcon], a
|
ld [wCurIcon], a
|
||||||
xor a
|
xor a
|
||||||
@ -228,7 +229,7 @@ NamingScreen_InitAnimatedMonIcon:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
MoveList_InitAnimatedMonIcon:
|
MoveList_InitAnimatedMonIcon:
|
||||||
ld a, [wd265]
|
ld a, [wTempIconSpecies]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [wCurIcon], a
|
ld [wCurIcon], a
|
||||||
xor a
|
xor a
|
||||||
@ -243,7 +244,7 @@ MoveList_InitAnimatedMonIcon:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Trade_LoadMonIconGFX:
|
Trade_LoadMonIconGFX:
|
||||||
ld a, [wd265]
|
ld a, [wTempIconSpecies]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [wCurIcon], a
|
ld [wCurIcon], a
|
||||||
ld a, $62
|
ld a, $62
|
||||||
@ -254,7 +255,7 @@ Trade_LoadMonIconGFX:
|
|||||||
GetSpeciesIcon:
|
GetSpeciesIcon:
|
||||||
; Load species icon into VRAM at tile a
|
; Load species icon into VRAM at tile a
|
||||||
push de
|
push de
|
||||||
ld a, [wd265]
|
ld a, [wTempIconSpecies]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [wCurIcon], a
|
ld [wCurIcon], a
|
||||||
pop de
|
pop de
|
||||||
@ -264,7 +265,7 @@ GetSpeciesIcon:
|
|||||||
|
|
||||||
FlyFunction_GetMonIcon:
|
FlyFunction_GetMonIcon:
|
||||||
push de
|
push de
|
||||||
ld a, [wd265]
|
ld a, [wTempIconSpecies]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [wCurIcon], a
|
ld [wCurIcon], a
|
||||||
pop de
|
pop de
|
||||||
@ -274,7 +275,7 @@ FlyFunction_GetMonIcon:
|
|||||||
|
|
||||||
Unreferenced_GetMonIcon2:
|
Unreferenced_GetMonIcon2:
|
||||||
push de
|
push de
|
||||||
ld a, [wd265]
|
ld a, [wTempIconSpecies]
|
||||||
call ReadMonMenuIcon
|
call ReadMonMenuIcon
|
||||||
ld [wCurIcon], a
|
ld [wCurIcon], a
|
||||||
pop de
|
pop de
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
_DoItemEffect::
|
_DoItemEffect::
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
ld a, 1
|
ld a, 1
|
||||||
@ -489,7 +489,7 @@ PokeBallEffect:
|
|||||||
ld a, [wEnemyMonSpecies]
|
ld a, [wEnemyMonSpecies]
|
||||||
ld [wWildMon], a
|
ld [wWildMon], a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
ld a, [wBattleType]
|
ld a, [wBattleType]
|
||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
jp z, .FinishTutorial
|
jp z, .FinishTutorial
|
||||||
@ -501,13 +501,13 @@ PokeBallEffect:
|
|||||||
|
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
|
|
||||||
ld a, c
|
ld a, c
|
||||||
push af
|
push af
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call SetSeenAndCaughtMon
|
call SetSeenAndCaughtMon
|
||||||
pop af
|
pop af
|
||||||
@ -523,7 +523,7 @@ PokeBallEffect:
|
|||||||
call ClearSprites
|
call ClearSprites
|
||||||
|
|
||||||
ld a, [wEnemyMonSpecies]
|
ld a, [wEnemyMonSpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
predef NewPokedexEntry
|
predef NewPokedexEntry
|
||||||
|
|
||||||
.skip_pokedex
|
.skip_pokedex
|
||||||
@ -566,7 +566,7 @@ PokeBallEffect:
|
|||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
@ -626,7 +626,7 @@ PokeBallEffect:
|
|||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
@ -1276,7 +1276,7 @@ Table_eeeb:
|
|||||||
RareCandy_StatBooster_GetParameters:
|
RareCandy_StatBooster_GetParameters:
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
ld a, MON_LEVEL
|
ld a, MON_LEVEL
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1368,7 +1368,7 @@ RareCandyEffect:
|
|||||||
xor a ; PARTYMON
|
xor a ; PARTYMON
|
||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
predef LearnLevelMoves
|
predef LearnLevelMoves
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
@ -2344,7 +2344,7 @@ RestorePPEffect:
|
|||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
pop hl
|
pop hl
|
||||||
@ -2373,8 +2373,8 @@ RestorePPEffect:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
add PP_UP_ONE
|
add PP_UP_ONE
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, $1
|
ld a, TRUE
|
||||||
ld [wd265], a
|
ld [wUsePPUp], a
|
||||||
call ApplyPPUp
|
call ApplyPPUp
|
||||||
call Play_SFX_FULL_HEAL
|
call Play_SFX_FULL_HEAL
|
||||||
|
|
||||||
@ -2492,7 +2492,7 @@ RestorePP:
|
|||||||
ld hl, wPartyMon1PP
|
ld hl, wPartyMon1PP
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call GetMthMoveOfNthPartymon
|
call GetMthMoveOfNthPartymon
|
||||||
ld a, [wd265]
|
ld a, [wTempPP]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and PP_MASK
|
and PP_MASK
|
||||||
@ -2765,8 +2765,8 @@ ApplyPPUp:
|
|||||||
ld a, b
|
ld a, b
|
||||||
cp NUM_MOVES + 1
|
cp NUM_MOVES + 1
|
||||||
ret z
|
ret z
|
||||||
ld a, [wd265]
|
ld a, [wUsePPUp]
|
||||||
dec a
|
dec a ; FALSE?
|
||||||
jr nz, .use
|
jr nz, .use
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
inc a
|
inc a
|
||||||
@ -2822,7 +2822,7 @@ ComputeMaxPP:
|
|||||||
.okay
|
.okay
|
||||||
add b
|
add b
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd265]
|
ld a, [wTempPP]
|
||||||
dec a
|
dec a
|
||||||
jr z, .NoPPUp
|
jr z, .NoPPUp
|
||||||
dec c
|
dec c
|
||||||
@ -2857,7 +2857,7 @@ RestoreAllPP:
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
and PP_UP_MASK
|
and PP_UP_MASK
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd265]
|
ld a, [wTempPP]
|
||||||
add b
|
add b
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
@ -2933,12 +2933,12 @@ GetMaxPPOfMove:
|
|||||||
ld hl, wStringBuffer1 + 1
|
ld hl, wStringBuffer1 + 1
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
xor a
|
xor a
|
||||||
ld [wd265], a
|
ld [wTempPP], a
|
||||||
ld a, b ; this gets lost anyway
|
ld a, b ; this gets lost anyway
|
||||||
call ComputeMaxPP
|
call ComputeMaxPP
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and PP_MASK
|
and PP_MASK
|
||||||
ld [wd265], a
|
ld [wTempPP], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [wStringBuffer1 + 1], a
|
ld [wStringBuffer1 + 1], a
|
||||||
|
@ -9,7 +9,7 @@ PrintItemDescription:
|
|||||||
push de
|
push de
|
||||||
farcall GetTMHMItemMove
|
farcall GetTMHMItemMove
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
predef PrintMoveDesc
|
predef PrintMoveDesc
|
||||||
ret
|
ret
|
||||||
|
@ -33,7 +33,7 @@ ConvertCurItemIntoCurTMHM:
|
|||||||
ld c, a
|
ld c, a
|
||||||
callfar GetTMHMNumber
|
callfar GetTMHMNumber
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wCurTMHM], a
|
ld [wTempTMHM], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetTMHMItemMove:
|
GetTMHMItemMove:
|
||||||
@ -50,7 +50,7 @@ AskTeachTMHM:
|
|||||||
cp TM01
|
cp TM01
|
||||||
jr c, .NotTMHM
|
jr c, .NotTMHM
|
||||||
call GetTMHMItemMove
|
call GetTMHMItemMove
|
||||||
ld a, [wCurTMHM]
|
ld a, [wTempTMHM]
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
@ -251,9 +251,9 @@ TMHM_ShowTMMoveDescription:
|
|||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
cp NUM_TMS + NUM_HMS + 1
|
cp NUM_TMS + NUM_HMS + 1
|
||||||
jr nc, TMHM_JoypadLoop
|
jr nc, TMHM_JoypadLoop
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
predef GetTMHMMove
|
predef GetTMHMMove
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
call PrintMoveDesc
|
call PrintMoveDesc
|
||||||
@ -261,14 +261,14 @@ TMHM_ShowTMMoveDescription:
|
|||||||
|
|
||||||
TMHM_ChooseTMorHM:
|
TMHM_ChooseTMorHM:
|
||||||
call TMHM_PlaySFX_ReadText2
|
call TMHM_PlaySFX_ReadText2
|
||||||
call CountTMsHMs ; This stores the count to wd265.
|
call CountTMsHMs ; This stores the count to wTempTMHM.
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
dec a
|
dec a
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wTMHMPocketScrollPosition]
|
ld a, [wTMHMPocketScrollPosition]
|
||||||
add b
|
add b
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
cp b
|
cp b
|
||||||
jr z, _TMHM_ExitPack ; our cursor was hovering over CANCEL
|
jr z, _TMHM_ExitPack ; our cursor was hovering over CANCEL
|
||||||
TMHM_CheckHoveringOverCancel:
|
TMHM_CheckHoveringOverCancel:
|
||||||
@ -354,16 +354,16 @@ TMHM_DisplayPocketItems:
|
|||||||
jr z, .loop2
|
jr z, .loop2
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
call TMHMPocket_GetCurrentLineCoord
|
call TMHMPocket_GetCurrentLineCoord
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
cp NUM_TMS + 1
|
cp NUM_TMS + 1
|
||||||
jr nc, .HM
|
jr nc, .HM
|
||||||
ld de, wd265
|
ld de, wTempTMHM
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
jr .okay
|
jr .okay
|
||||||
@ -371,17 +371,17 @@ TMHM_DisplayPocketItems:
|
|||||||
.HM:
|
.HM:
|
||||||
push af
|
push af
|
||||||
sub NUM_TMS
|
sub NUM_TMS
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
ld [hl], "H"
|
ld [hl], "H"
|
||||||
inc hl
|
inc hl
|
||||||
ld de, wd265
|
ld de, wTempTMHM
|
||||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
|
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
pop af
|
pop af
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
.okay
|
.okay
|
||||||
predef GetTMHMMove
|
predef GetTMHMMove
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
pop hl
|
pop hl
|
||||||
@ -403,8 +403,8 @@ TMHM_DisplayPocketItems:
|
|||||||
pop bc
|
pop bc
|
||||||
push bc
|
push bc
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
ld de, wd265
|
ld de, wTempTMHM
|
||||||
lb bc, 1, 2
|
lb bc, 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
.hm2
|
.hm2
|
||||||
@ -445,7 +445,7 @@ Unreferenced_Function2ca95:
|
|||||||
ld bc, 3
|
ld bc, 3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
predef GetTMHMMove
|
predef GetTMHMMove
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
push hl
|
push hl
|
||||||
@ -508,7 +508,7 @@ Unreferenced_Function2cadf:
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
.CheckHaveRoomForTMHM:
|
.CheckHaveRoomForTMHM:
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
dec a
|
dec a
|
||||||
ld hl, wTMsHMs
|
ld hl, wTMsHMs
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -523,7 +523,7 @@ Unreferenced_Function2cadf:
|
|||||||
|
|
||||||
ConsumeTM:
|
ConsumeTM:
|
||||||
call ConvertCurItemIntoCurTMHM
|
call ConvertCurItemIntoCurTMHM
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
dec a
|
dec a
|
||||||
ld hl, wTMsHMs
|
ld hl, wTMsHMs
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -555,7 +555,7 @@ CountTMsHMs:
|
|||||||
dec c
|
dec c
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
PrintMoveDesc:
|
PrintMoveDesc:
|
||||||
|
@ -33,14 +33,14 @@ CanLearnTMHMMove:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetTMHMMove:
|
GetTMHMMove:
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
dec a
|
dec a
|
||||||
ld hl, TMHMMoves
|
ld hl, TMHMMoves
|
||||||
ld b, 0
|
ld b, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
INCLUDE "data/moves/tmhm_moves.asm"
|
INCLUDE "data/moves/tmhm_moves.asm"
|
||||||
|
@ -149,13 +149,13 @@ Gen2ToGen1LinkComms:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .done_party
|
jr z, .done_party
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
callfar ConvertMon_1to2
|
callfar ConvertMon_1to2
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
jr .party_loop
|
jr .party_loop
|
||||||
@ -651,13 +651,13 @@ Link_PrepPartyData_Gen1:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .done_party
|
jr z, .done_party
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
callfar ConvertMon_2to1
|
callfar ConvertMon_2to1
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
jr .loop2
|
jr .loop2
|
||||||
@ -692,11 +692,11 @@ Link_PrepPartyData_Gen1:
|
|||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
callfar ConvertMon_2to1
|
callfar ConvertMon_2to1
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
ld hl, MON_HP
|
ld hl, MON_HP
|
||||||
@ -976,11 +976,11 @@ Function2868a:
|
|||||||
inc de
|
inc de
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
callfar ConvertMon_1to2
|
callfar ConvertMon_1to2
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld hl, MON_HP
|
ld hl, MON_HP
|
||||||
@ -1461,7 +1461,7 @@ Function28926:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
hlcoord 0, 12
|
hlcoord 0, 12
|
||||||
ld b, 4
|
ld b, 4
|
||||||
@ -1619,7 +1619,7 @@ LinkTrade:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wd004
|
ld de, wd004
|
||||||
@ -1631,7 +1631,7 @@ LinkTrade:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, UnknownText_0x28eb8
|
ld hl, UnknownText_0x28eb8
|
||||||
bccoord 1, 14
|
bccoord 1, 14
|
||||||
@ -2047,14 +2047,14 @@ CheckTimeCapsuleCompatibility:
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.mon_too_new
|
.mon_too_new
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld a, $1
|
ld a, $1
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.move_too_new
|
.move_too_new
|
||||||
push bc
|
push bc
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
pop bc
|
pop bc
|
||||||
@ -2079,7 +2079,7 @@ Function29c67:
|
|||||||
ld hl, wPartyCount
|
ld hl, wPartyCount
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2146,13 +2146,13 @@ WaitForOtherPlayerToExit:
|
|||||||
SetBitsForLinkTradeRequest:
|
SetBitsForLinkTradeRequest:
|
||||||
ld a, LINK_TRADECENTER - 1
|
ld a, LINK_TRADECENTER - 1
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
ld [wd265], a
|
ld [wChosenCableClubRoom], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SetBitsForBattleRequest:
|
SetBitsForBattleRequest:
|
||||||
ld a, LINK_COLOSSEUM - 1
|
ld a, LINK_COLOSSEUM - 1
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
ld [wd265], a
|
ld [wChosenCableClubRoom], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SetBitsForTimeCapsuleRequest:
|
SetBitsForTimeCapsuleRequest:
|
||||||
@ -2166,7 +2166,7 @@ SetBitsForTimeCapsuleRequest:
|
|||||||
ld [rSC], a
|
ld [rSC], a
|
||||||
xor a ; LINK_TIMECAPSULE - 1
|
xor a ; LINK_TIMECAPSULE - 1
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
ld [wd265], a
|
ld [wChosenCableClubRoom], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
WaitForLinkedFriend:
|
WaitForLinkedFriend:
|
||||||
@ -2373,7 +2373,7 @@ Link_CheckCommunicationError:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
TryQuickSave:
|
TryQuickSave:
|
||||||
ld a, [wd265]
|
ld a, [wChosenCableClubRoom]
|
||||||
push af
|
push af
|
||||||
farcall Link_SaveGame
|
farcall Link_SaveGame
|
||||||
ld a, TRUE
|
ld a, TRUE
|
||||||
@ -2384,11 +2384,11 @@ TryQuickSave:
|
|||||||
ld c, 30
|
ld c, 30
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
pop af
|
pop af
|
||||||
ld [wd265], a
|
ld [wChosenCableClubRoom], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckBothSelectedSameRoom:
|
CheckBothSelectedSameRoom:
|
||||||
ld a, [wd265]
|
ld a, [wChosenCableClubRoom]
|
||||||
call Link_EnsureSync
|
call Link_EnsureSync
|
||||||
push af
|
push af
|
||||||
call LinkDataReceived
|
call LinkDataReceived
|
||||||
@ -2396,10 +2396,10 @@ CheckBothSelectedSameRoom:
|
|||||||
call LinkDataReceived
|
call LinkDataReceived
|
||||||
pop af
|
pop af
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd265]
|
ld a, [wChosenCableClubRoom]
|
||||||
cp b
|
cp b
|
||||||
jr nz, .fail
|
jr nz, .fail
|
||||||
ld a, [wd265]
|
ld a, [wChosenCableClubRoom]
|
||||||
inc a
|
inc a
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
xor a
|
xor a
|
||||||
|
@ -1430,7 +1430,7 @@ Function105688:
|
|||||||
ld de, wMysteryGiftTrainerData
|
ld de, wMysteryGiftTrainerData
|
||||||
farcall Function8ac70
|
farcall Function8ac70
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
ld hl, Text_CardNotRegistered
|
ld hl, Text_CardNotRegistered
|
||||||
jr c, PrintTextAndExit_JP
|
jr c, PrintTextAndExit_JP
|
||||||
ld hl, Text_ListedCardAsNumber
|
ld hl, Text_ListedCardAsNumber
|
||||||
|
@ -24,7 +24,7 @@ PrepMysteryGiftDataToSend:
|
|||||||
call CountSetBits
|
call CountSetBits
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [wd265]
|
ld a, [wNumSetBits]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de ; wc80f
|
inc de ; wc80f
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
@ -122,7 +122,7 @@ PlaceTradePartnerNamesAndParty:
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp -1
|
cp -1
|
||||||
ret z
|
ret z
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
ConvertMon_2to1:
|
ConvertMon_2to1:
|
||||||
; Takes the Gen-2 Pokemon number stored in wd265, finds it in the Pokered_MonIndices table, and returns its index in wd265.
|
; Takes the Gen 2 Pokemon number stored in wTempSpecies,
|
||||||
|
; finds it in the Pokered_MonIndices table,
|
||||||
|
; and returns its index in wTempSpecies.
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, 0
|
ld c, 0
|
||||||
ld hl, Pokered_MonIndices
|
ld hl, Pokered_MonIndices
|
||||||
@ -12,23 +14,24 @@ ConvertMon_2to1:
|
|||||||
cp b
|
cp b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ConvertMon_1to2:
|
ConvertMon_1to2:
|
||||||
; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265.
|
; Takes the Gen 1 Pokemon number stored in wTempSpecies
|
||||||
|
; and returns the corresponding value from Pokered_MonIndices in wTempSpecies.
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
ld hl, Pokered_MonIndices
|
ld hl, Pokered_MonIndices
|
||||||
ld b, 0
|
ld b, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
@ -311,9 +311,9 @@ Function81adb:
|
|||||||
ld a, [wcf66]
|
ld a, [wcf66]
|
||||||
inc a
|
inc a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
hlcoord 0, 1
|
hlcoord 0, 1
|
||||||
ld de, wd265
|
ld de, wDeciramBuffer
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld a, [wd002]
|
ld a, [wd002]
|
||||||
@ -353,7 +353,7 @@ Function81adb:
|
|||||||
jr .asm_81ba9
|
jr .asm_81ba9
|
||||||
|
|
||||||
.asm_81b7a
|
.asm_81b7a
|
||||||
ld a, [wd265]
|
ld a, [wDeciramBuffer]
|
||||||
ld [wTrainerClass], a
|
ld [wTrainerClass], a
|
||||||
callfar GetTrainerAttributes
|
callfar GetTrainerAttributes
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
@ -738,9 +738,9 @@ Function81df4:
|
|||||||
call Function81e5e
|
call Function81e5e
|
||||||
ld a, [wd004]
|
ld a, [wd004]
|
||||||
inc a
|
inc a
|
||||||
ld [wd265], a
|
ld [wTempTMHM], a
|
||||||
predef GetTMHMMove
|
predef GetTMHMMove
|
||||||
ld a, [wd265]
|
ld a, [wTempTMHM]
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
hlcoord 10, 12
|
hlcoord 10, 12
|
||||||
|
@ -593,7 +593,7 @@ Continue_DisplayBadgeCount:
|
|||||||
ld b, 2
|
ld b, 2
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wd265
|
ld de, wNumSetBits
|
||||||
lb bc, 1, 2
|
lb bc, 1, 2
|
||||||
jp PrintNum
|
jp PrintNum
|
||||||
|
|
||||||
@ -610,7 +610,7 @@ else
|
|||||||
endc
|
endc
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wd265
|
ld de, wNumSetBits
|
||||||
lb bc, 1, 3
|
lb bc, 1, 3
|
||||||
jp PrintNum
|
jp PrintNum
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ StartMenu_PrintBugContestStatus:
|
|||||||
and a
|
and a
|
||||||
ld de, .None
|
ld de, .None
|
||||||
jr z, .no_contest_mon
|
jr z, .no_contest_mon
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
.no_contest_mon
|
.no_contest_mon
|
||||||
|
@ -84,13 +84,13 @@ NamingScreen:
|
|||||||
|
|
||||||
.Pokemon:
|
.Pokemon:
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wTempIconSpecies], a
|
||||||
ld hl, LoadMenuMonIcon
|
ld hl, LoadMenuMonIcon
|
||||||
ld a, BANK(LoadMenuMonIcon)
|
ld a, BANK(LoadMenuMonIcon)
|
||||||
ld e, $1
|
ld e, MONICON_NAMINGSCREEN
|
||||||
rst FarCall ; ; indirect jump to LoadMenuMonIcon (8e83f (23:683f))
|
rst FarCall
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
hlcoord 5, 2
|
hlcoord 5, 2
|
||||||
call PlaceString
|
call PlaceString
|
||||||
|
@ -133,12 +133,12 @@ StartMoveMonWOMail_SaveGame:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
PauseGameLogic:
|
PauseGameLogic:
|
||||||
ld a, $1
|
ld a, TRUE
|
||||||
ld [wGameLogicPaused], a
|
ld [wGameLogicPaused], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ResumeGameLogic:
|
ResumeGameLogic:
|
||||||
xor a
|
xor a ; FALSE
|
||||||
ld [wGameLogicPaused], a
|
ld [wGameLogicPaused], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -230,13 +230,13 @@ _SavingDontTurnOffThePower:
|
|||||||
SavedTheGame:
|
SavedTheGame:
|
||||||
call _SaveGameData
|
call _SaveGameData
|
||||||
; wait 32 frames
|
; wait 32 frames
|
||||||
ld c, $20
|
ld c, 32
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
; copy the original text speed setting to the stack
|
; copy the original text speed setting to the stack
|
||||||
ld a, [wOptions]
|
ld a, [wOptions]
|
||||||
push af
|
push af
|
||||||
; set text speed super slow
|
; set text speed to medium
|
||||||
ld a, 3
|
ld a, TEXT_DELAY_MED
|
||||||
ld [wOptions], a
|
ld [wOptions], a
|
||||||
; <PLAYER> saved the game!
|
; <PLAYER> saved the game!
|
||||||
ld hl, Text_PlayerSavedTheGame
|
ld hl, Text_PlayerSavedTheGame
|
||||||
@ -248,7 +248,7 @@ SavedTheGame:
|
|||||||
call WaitPlaySFX
|
call WaitPlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
; wait 30 frames
|
; wait 30 frames
|
||||||
ld c, $1e
|
ld c, 30
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -332,8 +332,8 @@ SavingDontTurnOffThePower:
|
|||||||
; Save the text speed setting to the stack
|
; Save the text speed setting to the stack
|
||||||
ld a, [wOptions]
|
ld a, [wOptions]
|
||||||
push af
|
push af
|
||||||
; Set the text speed to super slow
|
; Set the text speed to medium
|
||||||
ld a, $3
|
ld a, TEXT_DELAY_MED
|
||||||
ld [wOptions], a
|
ld [wOptions], a
|
||||||
; SAVING... DON'T TURN OFF THE POWER.
|
; SAVING... DON'T TURN OFF THE POWER.
|
||||||
ld hl, Text_SavingDontTurnOffThePower
|
ld hl, Text_SavingDontTurnOffThePower
|
||||||
@ -342,7 +342,7 @@ SavingDontTurnOffThePower:
|
|||||||
pop af
|
pop af
|
||||||
ld [wOptions], a
|
ld [wOptions], a
|
||||||
; Wait for 16 frames
|
; Wait for 16 frames
|
||||||
ld c, $10
|
ld c, 16
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -639,7 +639,7 @@ CantUseItemText:
|
|||||||
|
|
||||||
PartyMonItemName:
|
PartyMonItemName:
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
ret
|
ret
|
||||||
@ -842,17 +842,17 @@ TryGiveItemToPartymon:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.already_holding_item
|
.already_holding_item
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, SwitchAlreadyHoldingText
|
ld hl, SwitchAlreadyHoldingText
|
||||||
call StartMenuYesNo
|
call StartMenuYesNo
|
||||||
jr c, .abort
|
jr c, .abort
|
||||||
|
|
||||||
call GiveItemToPokemon
|
call GiveItemToPokemon
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
push af
|
push af
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
pop af
|
pop af
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call ReceiveItemFromPokemon
|
call ReceiveItemFromPokemon
|
||||||
@ -860,13 +860,13 @@ TryGiveItemToPartymon:
|
|||||||
|
|
||||||
ld hl, TookAndMadeHoldText
|
ld hl, TookAndMadeHoldText
|
||||||
call MenuTextBoxBackup
|
call MenuTextBoxBackup
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call GivePartyItem
|
call GivePartyItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.bag_full
|
.bag_full
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call ReceiveItemFromPokemon
|
call ReceiveItemFromPokemon
|
||||||
ld hl, ItemStorageIsFullText
|
ld hl, ItemStorageIsFullText
|
||||||
@ -901,7 +901,7 @@ TakePartyItem:
|
|||||||
farcall ItemIsMail
|
farcall ItemIsMail
|
||||||
call GetPartyItemLocation
|
call GetPartyItemLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [hl], NO_ITEM
|
ld [hl], NO_ITEM
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, TookFromText
|
ld hl, TookFromText
|
||||||
@ -1654,8 +1654,8 @@ SetUpMoveScreenBG:
|
|||||||
ld hl, wPartySpecies
|
ld hl, wPartySpecies
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempIconSpecies], a
|
||||||
ld e, $2
|
ld e, MONICON_MOVES
|
||||||
farcall LoadMenuMonIcon
|
farcall LoadMenuMonIcon
|
||||||
hlcoord 0, 1
|
hlcoord 0, 1
|
||||||
ld b, 9
|
ld b, 9
|
||||||
@ -1755,8 +1755,8 @@ PlaceMoveData:
|
|||||||
hlcoord 16, 12
|
hlcoord 16, 12
|
||||||
cp 2
|
cp 2
|
||||||
jr c, .no_power
|
jr c, .no_power
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
ld de, wd265
|
ld de, wDeciramBuffer
|
||||||
lb bc, 1, 3
|
lb bc, 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
jr .description
|
jr .description
|
||||||
|
@ -276,7 +276,7 @@ TrainerCard_Page1_PrintDexCaught_GameTime:
|
|||||||
ld hl, wPokedexCaught
|
ld hl, wPokedexCaught
|
||||||
ld b, wEndPokedexCaught - wPokedexCaught
|
ld b, wEndPokedexCaught - wPokedexCaught
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld de, wd265
|
ld de, wNumSetBits
|
||||||
hlcoord 15, 10
|
hlcoord 15, 10
|
||||||
lb bc, 1, 3
|
lb bc, 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
|
@ -317,7 +317,7 @@ TradeAnim_TubeToOT1:
|
|||||||
ld a, TRADEANIM_RIGHT_ARROW
|
ld a, TRADEANIM_RIGHT_ARROW
|
||||||
call TradeAnim_PlaceTrademonStatsOnTubeAnim
|
call TradeAnim_PlaceTrademonStatsOnTubeAnim
|
||||||
ld a, [wLinkTradeSendmonSpecies]
|
ld a, [wLinkTradeSendmonSpecies]
|
||||||
ld [wd265], a
|
ld [wTempIconSpecies], a
|
||||||
xor a
|
xor a
|
||||||
depixel 5, 11, 4, 0
|
depixel 5, 11, 4, 0
|
||||||
ld b, $0
|
ld b, $0
|
||||||
@ -327,7 +327,7 @@ TradeAnim_TubeToPlayer1:
|
|||||||
ld a, TRADEANIM_LEFT_ARROW
|
ld a, TRADEANIM_LEFT_ARROW
|
||||||
call TradeAnim_PlaceTrademonStatsOnTubeAnim
|
call TradeAnim_PlaceTrademonStatsOnTubeAnim
|
||||||
ld a, [wLinkTradeGetmonSpecies]
|
ld a, [wLinkTradeGetmonSpecies]
|
||||||
ld [wd265], a
|
ld [wTempIconSpecies], a
|
||||||
ld a, TRADEANIMSTATE_2
|
ld a, TRADEANIMSTATE_2
|
||||||
depixel 9, 18, 4, 4
|
depixel 9, 18, 4, 4
|
||||||
ld b, $4
|
ld b, $4
|
||||||
@ -820,7 +820,7 @@ TradeAnim_GetFrontpic:
|
|||||||
|
|
||||||
TradeAnim_GetNickname:
|
TradeAnim_GetNickname:
|
||||||
push de
|
push de
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
pop de
|
pop de
|
||||||
@ -1373,7 +1373,7 @@ LoadTradeBallAndCableGFX:
|
|||||||
|
|
||||||
LoadTradeBubbleGFX:
|
LoadTradeBubbleGFX:
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld e, $3
|
ld e, MONICON_TRADE
|
||||||
callfar LoadMenuMonIcon
|
callfar LoadMenuMonIcon
|
||||||
ld de, TradeBubbleGFX
|
ld de, TradeBubbleGFX
|
||||||
ld hl, vTiles0 tile $72
|
ld hl, vTiles0 tile $72
|
||||||
|
@ -559,7 +559,7 @@ GetDecoName:
|
|||||||
|
|
||||||
.getpokename
|
.getpokename
|
||||||
push bc
|
push bc
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
pop bc
|
pop bc
|
||||||
jr .copy
|
jr .copy
|
||||||
|
@ -623,7 +623,7 @@ INCLUDE "data/items/pocket_names.asm"
|
|||||||
|
|
||||||
CurItemName:
|
CurItemName:
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1863,7 +1863,7 @@ Script_pokenamemem:
|
|||||||
jr nz, .gotit
|
jr nz, .gotit
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
.gotit
|
.gotit
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
|
|
||||||
@ -1890,7 +1890,7 @@ Script_itemtotext:
|
|||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
.ok
|
.ok
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
jr ConvertMemToText
|
jr ConvertMemToText
|
||||||
|
@ -72,7 +72,7 @@ _GetVarAction::
|
|||||||
ld hl, wPokedexCaught
|
ld hl, wPokedexCaught
|
||||||
ld b, wEndPokedexCaught - wPokedexCaught
|
ld b, wEndPokedexCaught - wPokedexCaught
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld a, [wd265]
|
ld a, [wNumSetBits]
|
||||||
jp .loadstringbuffer2
|
jp .loadstringbuffer2
|
||||||
|
|
||||||
.CountSeenMons:
|
.CountSeenMons:
|
||||||
@ -80,7 +80,7 @@ _GetVarAction::
|
|||||||
ld hl, wPokedexSeen
|
ld hl, wPokedexSeen
|
||||||
ld b, wEndPokedexSeen - wPokedexSeen
|
ld b, wEndPokedexSeen - wPokedexSeen
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld a, [wd265]
|
ld a, [wNumSetBits]
|
||||||
jp .loadstringbuffer2
|
jp .loadstringbuffer2
|
||||||
|
|
||||||
.CountBadges:
|
.CountBadges:
|
||||||
@ -88,7 +88,7 @@ _GetVarAction::
|
|||||||
ld hl, wBadges
|
ld hl, wBadges
|
||||||
ld b, 2
|
ld b, 2
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld a, [wd265]
|
ld a, [wNumSetBits]
|
||||||
jp .loadstringbuffer2
|
jp .loadstringbuffer2
|
||||||
|
|
||||||
.PlayerFacing:
|
.PlayerFacing:
|
||||||
|
@ -465,7 +465,7 @@ DexEntryScreen_MenuActionJumptable:
|
|||||||
|
|
||||||
.Cry:
|
.Cry:
|
||||||
call Pokedex_GetSelectedMon
|
call Pokedex_GetSelectedMon
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
call GetCryIndex
|
call GetCryIndex
|
||||||
ld e, c
|
ld e, c
|
||||||
ld d, b
|
ld d, b
|
||||||
@ -1088,7 +1088,7 @@ Pokedex_DrawMainScreenBG:
|
|||||||
ld hl, wPokedexSeen
|
ld hl, wPokedexSeen
|
||||||
ld b, wEndPokedexSeen - wPokedexSeen
|
ld b, wEndPokedexSeen - wPokedexSeen
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld de, wd265
|
ld de, wNumSetBits
|
||||||
hlcoord 5, 12
|
hlcoord 5, 12
|
||||||
lb bc, 1, 3
|
lb bc, 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
@ -1098,7 +1098,7 @@ Pokedex_DrawMainScreenBG:
|
|||||||
ld hl, wPokedexCaught
|
ld hl, wPokedexCaught
|
||||||
ld b, wEndPokedexCaught - wPokedexCaught
|
ld b, wEndPokedexCaught - wPokedexCaught
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld de, wd265
|
ld de, wNumSetBits
|
||||||
hlcoord 5, 15
|
hlcoord 5, 15
|
||||||
lb bc, 1, 3
|
lb bc, 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
@ -1492,7 +1492,7 @@ Pokedex_PrintListing:
|
|||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
call .PrintEntry
|
call .PrintEntry
|
||||||
@ -1531,7 +1531,7 @@ Pokedex_PrintNumberIfOldMode:
|
|||||||
push hl
|
push hl
|
||||||
ld de, -SCREEN_WIDTH
|
ld de, -SCREEN_WIDTH
|
||||||
add hl, de
|
add hl, de
|
||||||
ld de, wd265
|
ld de, wTempSpecies
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
pop hl
|
pop hl
|
||||||
@ -1585,13 +1585,13 @@ Pokedex_GetSelectedMon:
|
|||||||
ld hl, wPokedexOrder
|
ld hl, wPokedexOrder
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Pokedex_CheckCaught:
|
Pokedex_CheckCaught:
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
pop hl
|
pop hl
|
||||||
@ -1601,7 +1601,7 @@ Pokedex_CheckCaught:
|
|||||||
Pokedex_CheckSeen:
|
Pokedex_CheckSeen:
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckSeenMon
|
call CheckSeenMon
|
||||||
pop hl
|
pop hl
|
||||||
@ -1654,7 +1654,7 @@ Pokedex_OrderMonsByMode:
|
|||||||
ld e, d
|
ld e, d
|
||||||
.loopfindend
|
.loopfindend
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
call Pokedex_CheckSeen
|
call Pokedex_CheckSeen
|
||||||
jr nz, .foundend
|
jr nz, .foundend
|
||||||
dec d
|
dec d
|
||||||
@ -1674,10 +1674,10 @@ Pokedex_ABCMode:
|
|||||||
.loop1abc
|
.loop1abc
|
||||||
push bc
|
push bc
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
call Pokedex_CheckSeen
|
call Pokedex_CheckSeen
|
||||||
jr z, .skipabc
|
jr z, .skipabc
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wDexListingEnd]
|
ld a, [wDexListingEnd]
|
||||||
inc a
|
inc a
|
||||||
@ -1898,7 +1898,7 @@ Pokedex_SearchForMons:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .next_mon
|
jr z, .next_mon
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call Pokedex_CheckCaught
|
call Pokedex_CheckCaught
|
||||||
jr z, .next_mon
|
jr z, .next_mon
|
||||||
@ -1917,7 +1917,7 @@ Pokedex_SearchForMons:
|
|||||||
jr nz, .next_mon
|
jr nz, .next_mon
|
||||||
|
|
||||||
.match_found
|
.match_found
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
ld a, [wDexSearchResultCount]
|
ld a, [wDexSearchResultCount]
|
||||||
@ -2354,7 +2354,7 @@ Pokedex_LoadSelectedMonTiles:
|
|||||||
jr z, .QuestionMark
|
jr z, .QuestionMark
|
||||||
ld a, [wFirstUnownSeen]
|
ld a, [wFirstUnownSeen]
|
||||||
ld [wUnownLetter], a
|
ld [wUnownLetter], a
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
ld de, vTiles2
|
ld de, vTiles2
|
||||||
@ -2378,7 +2378,7 @@ Pokedex_LoadCurrentFootprint:
|
|||||||
call Pokedex_GetSelectedMon
|
call Pokedex_GetSelectedMon
|
||||||
|
|
||||||
Pokedex_LoadAnyFootprint:
|
Pokedex_LoadAnyFootprint:
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
and %11111000
|
and %11111000
|
||||||
srl a
|
srl a
|
||||||
@ -2386,7 +2386,7 @@ Pokedex_LoadAnyFootprint:
|
|||||||
srl a
|
srl a
|
||||||
ld e, 0
|
ld e, 0
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
and %111
|
and %111
|
||||||
swap a ; * $10
|
swap a ; * $10
|
||||||
@ -2524,7 +2524,7 @@ _NewPokedexEntry:
|
|||||||
call LoadFontsExtra
|
call LoadFontsExtra
|
||||||
call Pokedex_LoadGFX
|
call Pokedex_LoadGFX
|
||||||
call Pokedex_LoadAnyFootprint
|
call Pokedex_LoadAnyFootprint
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
call Pokedex_DrawDexEntryScreenBG
|
call Pokedex_DrawDexEntryScreenBG
|
||||||
call Pokedex_DrawFootprint
|
call Pokedex_DrawFootprint
|
||||||
|
@ -80,7 +80,7 @@ DisplayDexEntry:
|
|||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
hlcoord 9, 3
|
hlcoord 9, 3
|
||||||
call PlaceString ; mon species
|
call PlaceString ; mon species
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld b, a
|
ld b, a
|
||||||
call GetDexEntryPointer
|
call GetDexEntryPointer
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -96,11 +96,11 @@ DisplayDexEntry:
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $5d ; .
|
ld a, $5d ; .
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld de, wd265
|
ld de, wTempSpecies
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
; Check to see if we caught it. Get out of here if we haven't.
|
; Check to see if we caught it. Get out of here if we haven't.
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -1287,12 +1287,12 @@ PokegearPhoneContactSubmenu:
|
|||||||
cp 12
|
cp 12
|
||||||
jr c, .am
|
jr c, .am
|
||||||
sub 12
|
sub 12
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.am
|
.am
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2741,7 +2741,7 @@ TownMapMon:
|
|||||||
ld d, $0
|
ld d, $0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempIconSpecies], a
|
||||||
; Get FlyMon icon
|
; Get FlyMon icon
|
||||||
ld e, $08 ; starting tile in VRAM
|
ld e, $08 ; starting tile in VRAM
|
||||||
farcall GetSpeciesIcon
|
farcall GetSpeciesIcon
|
||||||
|
@ -1035,7 +1035,7 @@ PCMonInfo:
|
|||||||
cp -1
|
cp -1
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
hlcoord 1, 4
|
hlcoord 1, 4
|
||||||
xor a
|
xor a
|
||||||
ld b, 7
|
ld b, 7
|
||||||
@ -1057,7 +1057,7 @@ PCMonInfo:
|
|||||||
jr nz, .row
|
jr nz, .row
|
||||||
|
|
||||||
call BillsPC_LoadMonStats
|
call BillsPC_LoadMonStats
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld hl, wTempMonDVs
|
ld hl, wTempMonDVs
|
||||||
@ -1068,7 +1068,7 @@ PCMonInfo:
|
|||||||
xor a
|
xor a
|
||||||
ld [wBillsPC_MonHasMail], a
|
ld [wBillsPC_MonHasMail], a
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
cp EGG
|
cp EGG
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@ -1676,9 +1676,9 @@ StatsScreenDPad:
|
|||||||
and a
|
and a
|
||||||
jr z, .did_nothing
|
jr z, .did_nothing
|
||||||
call BillsPC_GetSelectedPokemonSpecies
|
call BillsPC_GetSelectedPokemonSpecies
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
call BillsPC_LoadMonStats
|
call BillsPC_LoadMonStats
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld hl, wTempMonDVs
|
ld hl, wTempMonDVs
|
||||||
@ -1893,7 +1893,7 @@ ReleasePKMN_ByePKMN:
|
|||||||
.skip_cry
|
.skip_cry
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
hlcoord 1, 16
|
hlcoord 1, 16
|
||||||
ld de, PCString_ReleasedPKMN
|
ld de, PCString_ReleasedPKMN
|
||||||
@ -2314,9 +2314,9 @@ BillsPC_PrintBoxCountAndCapacity:
|
|||||||
ld de, .Pokemon
|
ld de, .Pokemon
|
||||||
call PlaceString
|
call PlaceString
|
||||||
call GetBoxCount
|
call GetBoxCount
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
hlcoord 13, 11
|
hlcoord 13, 11
|
||||||
ld de, wd265
|
ld de, wDeciramBuffer
|
||||||
lb bc, 1, 2
|
lb bc, 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld de, .out_of_20
|
ld de, .out_of_20
|
||||||
|
@ -81,7 +81,7 @@ CheckBreedmonCompatibility:
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wd265], a
|
ld [wBreedingCompatibility], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.CheckDVs:
|
.CheckDVs:
|
||||||
@ -250,7 +250,7 @@ HatchEggs:
|
|||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
dec de
|
dec de
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
xor a
|
xor a
|
||||||
@ -676,7 +676,7 @@ EggHatch_DoAnimFrame:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
EggHatch_AnimationSequence:
|
EggHatch_AnimationSequence:
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
push af
|
push af
|
||||||
@ -910,7 +910,7 @@ DayCareMonCompatibilityText:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CheckBreedmonCompatibility
|
call CheckBreedmonCompatibility
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [wd265]
|
ld a, [wBreedingCompatibility]
|
||||||
ld hl, .AllAlone
|
ld hl, .AllAlone
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
@ -38,7 +38,7 @@ CheckPartyFullAfterContest:
|
|||||||
ld hl, wPlayerName
|
ld hl, wPlayerName
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
@ -105,7 +105,7 @@ CheckPartyFullAfterContest:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
callfar InsertPokemonIntoBox
|
callfar InsertPokemonIntoBox
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
call GiveANickname_YesNo
|
call GiveANickname_YesNo
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
|
@ -123,7 +123,7 @@ Unreferenced_CorrectPartyErrors:
|
|||||||
cp EGG
|
cp EGG
|
||||||
ld hl, .TAMAGO
|
ld hl, .TAMAGO
|
||||||
jr z, .got_nickname
|
jr z, .got_nickname
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
.got_nickname
|
.got_nickname
|
||||||
|
@ -236,7 +236,7 @@ EvolveAfterBattle_MasterLoop:
|
|||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld [wTempMonSpecies], a
|
ld [wTempMonSpecies], a
|
||||||
ld [wEvolutionNewSpecies], a
|
ld [wEvolutionNewSpecies], a
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
@ -293,15 +293,15 @@ EvolveAfterBattle_MasterLoop:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
xor a
|
xor a
|
||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
call LearnLevelMoves
|
call LearnLevelMoves
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call SetSeenAndCaughtMon
|
call SetSeenAndCaughtMon
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
cp UNOWN
|
cp UNOWN
|
||||||
jr nz, .skip_unown
|
jr nz, .skip_unown
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ UpdateSpeciesNameIfNotNicknamed:
|
|||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
push af
|
push af
|
||||||
ld a, [wBaseDexNo]
|
ld a, [wBaseDexNo]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
pop af
|
pop af
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
@ -369,7 +369,7 @@ UpdateSpeciesNameIfNotNicknamed:
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
pop de
|
pop de
|
||||||
@ -415,7 +415,7 @@ Text_WhatEvolving:
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
LearnLevelMoves:
|
LearnLevelMoves:
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
dec a
|
dec a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -466,7 +466,7 @@ LearnLevelMoves:
|
|||||||
.learn
|
.learn
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
predef LearnMove
|
predef LearnMove
|
||||||
@ -475,7 +475,7 @@ LearnLevelMoves:
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
FillMoves:
|
FillMoves:
|
||||||
|
@ -36,7 +36,7 @@ LearnMove:
|
|||||||
|
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wBattleMode]
|
ld a, [wBattleMode]
|
||||||
|
@ -149,7 +149,7 @@ CheckPokeMail::
|
|||||||
|
|
||||||
; Compare the mail message, byte for byte, with the expected message.
|
; Compare the mail message, byte for byte, with the expected message.
|
||||||
ld a, MAIL_MSG_LENGTH
|
ld a, MAIL_MSG_LENGTH
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
.loop
|
.loop
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -162,9 +162,9 @@ CheckPokeMail::
|
|||||||
jr nz, .close_sram_return
|
jr nz, .close_sram_return
|
||||||
inc hl
|
inc hl
|
||||||
inc de
|
inc de
|
||||||
ld a, [wd265]
|
ld a, [wTempByteValue]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
.done
|
.done
|
||||||
|
@ -100,7 +100,7 @@ GetMonMenuString:
|
|||||||
jr z, .NotMove
|
jr z, .NotMove
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ ListMovePP:
|
|||||||
call PrintNum
|
call PrintNum
|
||||||
ld a, "/"
|
ld a, "/"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld de, wd265
|
ld de, wTempPP
|
||||||
lb bc, 1, 2
|
lb bc, 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -52,7 +52,7 @@ TryAddMonToParty:
|
|||||||
and a
|
and a
|
||||||
jr nz, .skipnickname
|
jr nz, .skipnickname
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wPartyMonNicknames
|
ld hl, wPartyMonNicknames
|
||||||
ld a, [hMoveMon]
|
ld a, [hMoveMon]
|
||||||
@ -185,11 +185,11 @@ endr
|
|||||||
|
|
||||||
.registerpokedex
|
.registerpokedex
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
dec a
|
dec a
|
||||||
push de
|
push de
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call SetSeenAndCaughtMon
|
call SetSeenAndCaughtMon
|
||||||
pop de
|
pop de
|
||||||
@ -750,7 +750,7 @@ RestorePPofDepositedPokemon:
|
|||||||
farcall GetMaxPPOfMove
|
farcall GetMaxPPOfMove
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wTempPP]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
and %11000000
|
and %11000000
|
||||||
@ -970,7 +970,7 @@ SendMonIntoBox:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
@ -1669,7 +1669,7 @@ GivePoke::
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [wTempEnemyMonSpecies], a
|
ld [wTempEnemyMonSpecies], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
|
@ -5,21 +5,21 @@ InsertPokemonIntoBox:
|
|||||||
call InsertSpeciesIntoBoxOrParty
|
call InsertSpeciesIntoBoxOrParty
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wNextBoxOrPartyIndex], a
|
||||||
ld hl, sBoxMonNicknames
|
ld hl, sBoxMonNicknames
|
||||||
ld bc, MON_NAME_LENGTH
|
ld bc, MON_NAME_LENGTH
|
||||||
ld de, wBufferMonNick
|
ld de, wBufferMonNick
|
||||||
call InsertDataIntoBoxOrParty
|
call InsertDataIntoBoxOrParty
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wNextBoxOrPartyIndex], a
|
||||||
ld hl, sBoxMonOT
|
ld hl, sBoxMonOT
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
ld de, wBufferMonOT
|
ld de, wBufferMonOT
|
||||||
call InsertDataIntoBoxOrParty
|
call InsertDataIntoBoxOrParty
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wNextBoxOrPartyIndex], a
|
||||||
ld hl, sBoxMons
|
ld hl, sBoxMons
|
||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
ld de, wBufferMon
|
ld de, wBufferMon
|
||||||
@ -42,21 +42,21 @@ InsertPokemonIntoParty:
|
|||||||
call InsertSpeciesIntoBoxOrParty
|
call InsertSpeciesIntoBoxOrParty
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wNextBoxOrPartyIndex], a
|
||||||
ld hl, wPartyMonNicknames
|
ld hl, wPartyMonNicknames
|
||||||
ld bc, MON_NAME_LENGTH
|
ld bc, MON_NAME_LENGTH
|
||||||
ld de, wBufferMonNick
|
ld de, wBufferMonNick
|
||||||
call InsertDataIntoBoxOrParty
|
call InsertDataIntoBoxOrParty
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wNextBoxOrPartyIndex], a
|
||||||
ld hl, wPartyMonOT
|
ld hl, wPartyMonOT
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
ld de, wBufferMonOT
|
ld de, wBufferMonOT
|
||||||
call InsertDataIntoBoxOrParty
|
call InsertDataIntoBoxOrParty
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wNextBoxOrPartyIndex], a
|
||||||
ld hl, wPartyMons
|
ld hl, wPartyMons
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
ld de, wBufferMon
|
ld de, wBufferMon
|
||||||
@ -85,7 +85,7 @@ InsertDataIntoBoxOrParty:
|
|||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld a, [wd265]
|
ld a, [wNextBoxOrPartyIndex]
|
||||||
dec a
|
dec a
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
@ -95,7 +95,7 @@ InsertDataIntoBoxOrParty:
|
|||||||
pop hl
|
pop hl
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
ld a, [wd265]
|
ld a, [wNextBoxOrPartyIndex]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wCurPartyMon]
|
ld a, [wCurPartyMon]
|
||||||
cp b
|
cp b
|
||||||
@ -116,9 +116,9 @@ InsertDataIntoBoxOrParty:
|
|||||||
sbc b
|
sbc b
|
||||||
ld h, a
|
ld h, a
|
||||||
pop de
|
pop de
|
||||||
ld a, [wd265]
|
ld a, [wNextBoxOrPartyIndex]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wNextBoxOrPartyIndex], a
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.insert
|
.insert
|
||||||
|
@ -596,7 +596,7 @@ InitPartyMenuGFX:
|
|||||||
push hl
|
push hl
|
||||||
ld hl, LoadMenuMonIcon
|
ld hl, LoadMenuMonIcon
|
||||||
ld a, BANK(LoadMenuMonIcon)
|
ld a, BANK(LoadMenuMonIcon)
|
||||||
ld e, $0
|
ld e, MONICON_PARTYMENU
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld a, [hObjectStructIndexBuffer]
|
ld a, [hObjectStructIndexBuffer]
|
||||||
inc a
|
inc a
|
||||||
|
@ -377,7 +377,7 @@ StatsScreen_InitUpperHalf:
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, [wBaseDexNo]
|
ld a, [wBaseDexNo]
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
hlcoord 8, 0
|
hlcoord 8, 0
|
||||||
ld [hl], "№"
|
ld [hl], "№"
|
||||||
@ -386,7 +386,7 @@ StatsScreen_InitUpperHalf:
|
|||||||
inc hl
|
inc hl
|
||||||
hlcoord 10, 0
|
hlcoord 10, 0
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
ld de, wd265
|
ld de, wDeciramBuffer
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 14, 0
|
hlcoord 14, 0
|
||||||
call PrintLevel
|
call PrintLevel
|
||||||
@ -401,7 +401,7 @@ StatsScreen_InitUpperHalf:
|
|||||||
ld a, "/"
|
ld a, "/"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wBaseDexNo]
|
ld a, [wBaseDexNo]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
call PlaceString
|
call PlaceString
|
||||||
call StatsScreen_PlaceHorizontalDivider
|
call StatsScreen_PlaceHorizontalDivider
|
||||||
@ -483,7 +483,7 @@ StatsScreen_PlaceShinyIcon:
|
|||||||
|
|
||||||
StatsScreen_LoadGFX:
|
StatsScreen_LoadGFX:
|
||||||
ld a, [wBaseDexNo]
|
ld a, [wBaseDexNo]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -708,7 +708,7 @@ StatsScreen_LoadGFX:
|
|||||||
ld b, a
|
ld b, a
|
||||||
farcall TimeCapsule_ReplaceTeruSama
|
farcall TimeCapsule_ReplaceTeruSama
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -74,9 +74,9 @@ PrintType:
|
|||||||
jp PlaceString
|
jp PlaceString
|
||||||
|
|
||||||
GetTypeName:
|
GetTypeName:
|
||||||
; Copy the name of type [wd265] to wStringBuffer1.
|
; Copy the name of type [wNamedObjectIndexBuffer] to wStringBuffer1.
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
ld hl, TypeNames
|
ld hl, TypeNames
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
@ -26,11 +26,11 @@ PrintPage1:
|
|||||||
hlcoord 2, 11, wPrinterTileMapBuffer
|
hlcoord 2, 11, wPrinterTileMapBuffer
|
||||||
lb bc, 5, 18
|
lb bc, 5, 18
|
||||||
call ClearBox
|
call ClearBox
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
push af
|
push af
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, 1 ; get page 1
|
ld c, 1 ; get page 1
|
||||||
farcall GetDexEntryPagePointer
|
farcall GetDexEntryPagePointer
|
||||||
@ -75,11 +75,11 @@ PrintPage2:
|
|||||||
ld bc, SCREEN_WIDTH
|
ld bc, SCREEN_WIDTH
|
||||||
ld a, $32
|
ld a, $32
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
push af
|
push af
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, 2 ; get page 2
|
ld c, 2 ; get page 2
|
||||||
farcall GetDexEntryPagePointer
|
farcall GetDexEntryPagePointer
|
||||||
@ -170,7 +170,7 @@ PrintPartyMonPage1:
|
|||||||
lb bc, 2, 3
|
lb bc, 2, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld hl, wPartyMonNicknames
|
ld hl, wPartyMonNicknames
|
||||||
call Function1dc50e
|
call Function1dc50e
|
||||||
@ -186,7 +186,7 @@ PrintPartyMonPage1:
|
|||||||
inc hl
|
inc hl
|
||||||
ld [hl], "."
|
ld [hl], "."
|
||||||
inc hl
|
inc hl
|
||||||
ld de, wd265
|
ld de, wNamedObjectIndexBuffer
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 1, 9
|
hlcoord 1, 9
|
||||||
@ -297,7 +297,7 @@ Function1dc51a:
|
|||||||
and a
|
and a
|
||||||
jr z, .no_move
|
jr z, .no_move
|
||||||
|
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
jr .got_string
|
jr .got_string
|
||||||
|
|
||||||
|
@ -725,7 +725,7 @@ Printer_PrintBoxListSegment:
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp $ff
|
cp $ff
|
||||||
jp z, .finish
|
jp z, .finish
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
|
@ -694,8 +694,8 @@ PrintHour:
|
|||||||
inc hl
|
inc hl
|
||||||
pop bc
|
pop bc
|
||||||
call AdjustHourForAMorPM
|
call AdjustHourForAMorPM
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
ld de, wd265
|
ld de, wDeciramBuffer
|
||||||
call PrintTwoDigitNumberRightAlign
|
call PrintTwoDigitNumberRightAlign
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
4
home.asm
4
home.asm
@ -169,7 +169,7 @@ INCLUDE "home/hp_pals.asm"
|
|||||||
|
|
||||||
CountSetBits::
|
CountSetBits::
|
||||||
; Count the number of set bits in b bytes starting from hl.
|
; Count the number of set bits in b bytes starting from hl.
|
||||||
; Return in a, c and [wd265].
|
; Return in a, c and [wNumSetBits].
|
||||||
ld c, 0
|
ld c, 0
|
||||||
.next
|
.next
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -188,7 +188,7 @@ CountSetBits::
|
|||||||
jr nz, .next
|
jr nz, .next
|
||||||
|
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wd265], a
|
ld [wNumSetBits], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetWeekday::
|
GetWeekday::
|
||||||
|
@ -23,7 +23,7 @@ GetName::
|
|||||||
jr nz, .NotPokeName
|
jr nz, .NotPokeName
|
||||||
|
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, MON_NAME_LENGTH
|
ld hl, MON_NAME_LENGTH
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -110,7 +110,7 @@ GetBasePokemonName::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetPokemonName::
|
GetPokemonName::
|
||||||
; Get Pokemon name wd265.
|
; Get Pokemon name for wNamedObjectIndexBuffer.
|
||||||
|
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
@ -119,7 +119,7 @@ GetPokemonName::
|
|||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
; Each name is ten characters
|
; Each name is ten characters
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
dec a
|
dec a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -147,11 +147,11 @@ GetPokemonName::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetItemName::
|
GetItemName::
|
||||||
; Get item name wd265.
|
; Get item name for wNamedObjectIndexBuffer.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
|
|
||||||
cp TM01
|
cp TM01
|
||||||
jr nc, .TM
|
jr nc, .TM
|
||||||
@ -170,12 +170,12 @@ GetItemName::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetTMHMName::
|
GetTMHMName::
|
||||||
; Get TM/HM name by item id wd265.
|
; Get TM/HM name for item wNamedObjectIndexBuffer.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
; TM/HM prefix
|
; TM/HM prefix
|
||||||
@ -197,7 +197,7 @@ GetTMHMName::
|
|||||||
|
|
||||||
; TM/HM number
|
; TM/HM number
|
||||||
push de
|
push de
|
||||||
ld a, [wd265]
|
ld a, [wNamedObjectIndexBuffer]
|
||||||
ld c, a
|
ld c, a
|
||||||
callfar GetTMHMNumber
|
callfar GetTMHMNumber
|
||||||
pop de
|
pop de
|
||||||
@ -235,7 +235,7 @@ GetTMHMName::
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -22,7 +22,7 @@ PrintLevel_Force3Digits::
|
|||||||
ld c, 3
|
ld c, 3
|
||||||
|
|
||||||
Print8BitNumRightAlign::
|
Print8BitNumRightAlign::
|
||||||
ld [wd265], a
|
ld [wDeciramBuffer], a
|
||||||
ld de, wd265
|
ld de, wDeciramBuffer
|
||||||
ld b, PRINTNUM_RIGHTALIGN | 1
|
ld b, PRINTNUM_RIGHTALIGN | 1
|
||||||
jp PrintNum
|
jp PrintNum
|
||||||
|
@ -34,7 +34,7 @@ Script_BattleRoomLoop:
|
|||||||
special FadeOutPalettes
|
special FadeOutPalettes
|
||||||
reloadmap
|
reloadmap
|
||||||
ifnotequal $0, Script_FailedBattleTowerChallenge
|
ifnotequal $0, Script_FailedBattleTowerChallenge
|
||||||
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
|
copybytetovar wNrOfBeatenBattleTowerTrainers
|
||||||
ifequal BATTLETOWER_STREAK_LENGTH, Script_BeatenAllTrainers
|
ifequal BATTLETOWER_STREAK_LENGTH, Script_BeatenAllTrainers
|
||||||
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
|
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
|
||||||
warpsound
|
warpsound
|
||||||
|
@ -261,7 +261,7 @@ CopyMobileEZChatToC608:
|
|||||||
|
|
||||||
.get_name
|
.get_name
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld bc, MON_NAME_LENGTH - 1
|
ld bc, MON_NAME_LENGTH - 1
|
||||||
|
@ -428,7 +428,7 @@ Function4aad3:
|
|||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld e, 0
|
ld e, MONICON_PARTYMENU
|
||||||
farcall LoadMenuMonIcon
|
farcall LoadMenuMonIcon
|
||||||
ld a, [hObjectStructIndexBuffer]
|
ld a, [hObjectStructIndexBuffer]
|
||||||
inc a
|
inc a
|
||||||
|
@ -1549,7 +1549,7 @@ _LinkBattleSendReceiveAction:
|
|||||||
|
|
||||||
.StageForSend:
|
.StageForSend:
|
||||||
ld a, [wBattlePlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a ; BATTLEPLAYERACTION_USEMOVE?
|
||||||
jr nz, .switch
|
jr nz, .switch
|
||||||
ld a, [wCurPlayerMove]
|
ld a, [wCurPlayerMove]
|
||||||
ld b, BATTLEACTION_E
|
ld b, BATTLEACTION_E
|
||||||
@ -6383,7 +6383,7 @@ Function102d48:
|
|||||||
ld hl, wPartyCount
|
ld hl, wPartyCount
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
cp EGG
|
cp EGG
|
||||||
jr z, .asm_102d6d
|
jr z, .asm_102d6d
|
||||||
dec a
|
dec a
|
||||||
@ -6396,7 +6396,7 @@ Function102d48:
|
|||||||
ld [hl], BASE_HAPPINESS
|
ld [hl], BASE_HAPPINESS
|
||||||
|
|
||||||
.asm_102d6d
|
.asm_102d6d
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
cp UNOWN
|
cp UNOWN
|
||||||
jr nz, .asm_102d98
|
jr nz, .asm_102d98
|
||||||
ld a, [wcd4c]
|
ld a, [wcd4c]
|
||||||
@ -6529,7 +6529,7 @@ Function102e4f:
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp $ff
|
cp $ff
|
||||||
ret z
|
ret z
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
@ -6557,7 +6557,7 @@ Function102ea8:
|
|||||||
ld hl, wPartySpecies
|
ld hl, wPartySpecies
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wStringBuffer2
|
ld de, wStringBuffer2
|
||||||
@ -6570,7 +6570,7 @@ Function102ea8:
|
|||||||
ld hl, wOTPartySpecies
|
ld hl, wOTPartySpecies
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, UnknownText_0x102ee2
|
ld hl, UnknownText_0x102ee2
|
||||||
call PrintTextBoxText
|
call PrintTextBoxText
|
||||||
@ -6639,7 +6639,7 @@ Function102f85:
|
|||||||
ld hl, wOTPartySpecies
|
ld hl, wOTPartySpecies
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
call Function102dc3
|
call Function102dc3
|
||||||
ld de, String_102fb2
|
ld de, String_102fb2
|
||||||
@ -7518,11 +7518,11 @@ UnknownText_0x10377b:
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
Function103780:
|
Function103780:
|
||||||
ld a, [wd265]
|
ld a, [wChosenCableClubRoom]
|
||||||
push af
|
push af
|
||||||
call Function10378c
|
call Function10378c
|
||||||
pop af
|
pop af
|
||||||
ld [wd265], a
|
ld [wChosenCableClubRoom], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10378c:
|
Function10378c:
|
||||||
|
@ -318,7 +318,7 @@ Function108229:
|
|||||||
|
|
||||||
MobileTradeAnim_InitSpeciesName:
|
MobileTradeAnim_InitSpeciesName:
|
||||||
push de
|
push de
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
pop de
|
pop de
|
||||||
|
@ -3967,7 +3967,7 @@ BattleTower_UbersCheck:
|
|||||||
.uber_under_70
|
.uber_under_70
|
||||||
pop af
|
pop af
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wcd49
|
ld de, wcd49
|
||||||
@ -5624,11 +5624,11 @@ Function11ad1b:
|
|||||||
ld [wCurIconTile], a
|
ld [wCurIconTile], a
|
||||||
ld hl, LoadMenuMonIcon
|
ld hl, LoadMenuMonIcon
|
||||||
ld a, BANK(LoadMenuMonIcon)
|
ld a, BANK(LoadMenuMonIcon)
|
||||||
ld e, $4
|
ld e, MONICON_MOBILE1
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld hl, LoadMenuMonIcon
|
ld hl, LoadMenuMonIcon
|
||||||
ld a, BANK(LoadMenuMonIcon)
|
ld a, BANK(LoadMenuMonIcon)
|
||||||
ld e, $5
|
ld e, MONICON_MOBILE2
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld hl, $c6d0
|
ld hl, $c6d0
|
||||||
ld bc, $0115
|
ld bc, $0115
|
||||||
@ -6127,7 +6127,7 @@ Function11b099:
|
|||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
call .PlaceMonNameOrPlaceholderString
|
call .PlaceMonNameOrPlaceholderString
|
||||||
@ -6387,13 +6387,13 @@ Function11b20b:
|
|||||||
ld hl, $c6d0
|
ld hl, $c6d0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wTempSpecies], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckCaughtMemMon:
|
CheckCaughtMemMon:
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckCaughtMon
|
call CheckCaughtMon
|
||||||
pop hl
|
pop hl
|
||||||
@ -6403,7 +6403,7 @@ CheckCaughtMemMon:
|
|||||||
CheckSeenMemMon:
|
CheckSeenMemMon:
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
dec a
|
dec a
|
||||||
call CheckSeenMon
|
call CheckSeenMon
|
||||||
pop hl
|
pop hl
|
||||||
@ -6463,7 +6463,7 @@ Function11b275:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function11b279:
|
Function11b279:
|
||||||
ld a, [wd265]
|
ld a, [wTempSpecies]
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call CheckSeenMemMon
|
call CheckSeenMemMon
|
||||||
jr z, .asm_11b28f
|
jr z, .asm_11b28f
|
||||||
|
@ -121,10 +121,10 @@ Function170c06:
|
|||||||
push hl
|
push hl
|
||||||
ld de, 0
|
ld de, 0
|
||||||
xor a
|
xor a
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
.asm_170c30
|
.asm_170c30
|
||||||
ld hl, wPartyMon1HP
|
ld hl, wPartyMon1HP
|
||||||
ld a, [wd265]
|
ld a, [wTempByteValue]
|
||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -143,9 +143,9 @@ Function170c06:
|
|||||||
push hl
|
push hl
|
||||||
pop de
|
pop de
|
||||||
jr c, .asm_170c58
|
jr c, .asm_170c58
|
||||||
ld a, [wd265]
|
ld a, [wTempByteValue]
|
||||||
inc a
|
inc a
|
||||||
ld [wd265], a
|
ld [wTempByteValue], a
|
||||||
cp $3
|
cp $3
|
||||||
jr c, .asm_170c30
|
jr c, .asm_170c30
|
||||||
jr .asm_170c5b
|
jr .asm_170c5b
|
||||||
|
@ -3902,7 +3902,7 @@ Function17f1d0:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
pop hl
|
pop hl
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -4021,7 +4021,7 @@ Function17f27b:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld [wd265], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
pop hl
|
pop hl
|
||||||
call PlaceString
|
call PlaceString
|
||||||
|
19
wram.asm
19
wram.asm
@ -2199,11 +2199,24 @@ wPutativeTMHMMove:: db
|
|||||||
wInitListType:: db
|
wInitListType:: db
|
||||||
wBattleHasJustStarted:: db
|
wBattleHasJustStarted:: db
|
||||||
|
|
||||||
|
; d265 has many different short-term uses
|
||||||
wNamedObjectIndexBuffer::
|
wNamedObjectIndexBuffer::
|
||||||
wCurTMHM::
|
wDeciramBuffer::
|
||||||
|
wTempByteValue::
|
||||||
|
wNumSetBits::
|
||||||
wTypeMatchup::
|
wTypeMatchup::
|
||||||
wFoundMatchingIDInParty::
|
wCurType::
|
||||||
wd265::
|
wTempSpecies::
|
||||||
|
wTempIconSpecies::
|
||||||
|
wTempTMHM::
|
||||||
|
wTempPP::
|
||||||
|
wNextBoxOrPartyIndex::
|
||||||
|
wChosenCableClubRoom::
|
||||||
|
wBreedingCompatibility::
|
||||||
|
wMoveGrammar::
|
||||||
|
wApplyStatLevelMultipliersToEnemy::
|
||||||
|
wUsePPUp::
|
||||||
|
wd265:: ; mobile
|
||||||
db
|
db
|
||||||
|
|
||||||
wFailedToFlee:: db
|
wFailedToFlee:: db
|
||||||
|
Loading…
Reference in New Issue
Block a user