You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Add meaningful aliases for wd265
Introduce MONICON_* constants Introduce BATTLEPLAYERACTION_* constants
This commit is contained in:
@@ -2,7 +2,7 @@ BugContest_SetCaughtContestMon:
|
||||
ld a, [wContestMon]
|
||||
and a
|
||||
jr z, .firstcatch
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
farcall DisplayAlreadyCaughtText
|
||||
farcall DisplayCaughtContestMonStats
|
||||
lb bc, 14, 7
|
||||
@@ -12,7 +12,7 @@ BugContest_SetCaughtContestMon:
|
||||
.firstcatch
|
||||
call .generatestats
|
||||
ld a, [wTempEnemyMonSpecies]
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld hl, .caughttext
|
||||
call PrintText
|
||||
|
||||
@@ -36,7 +36,7 @@ DisplayCaughtContestMonStats:
|
||||
call PlaceString
|
||||
|
||||
ld a, [wContestMon]
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld de, wStringBuffer1
|
||||
hlcoord 1, 2
|
||||
|
||||
@@ -558,7 +558,7 @@ DayCare_InitBreeding:
|
||||
bit DAYCAREMAN_HAS_MON_F, a
|
||||
ret z
|
||||
callfar CheckBreedmonCompatibility
|
||||
ld a, [wd265]
|
||||
ld a, [wBreedingCompatibility]
|
||||
and a
|
||||
ret z
|
||||
inc a
|
||||
|
||||
@@ -407,7 +407,7 @@ FlyFunction_InitGFX:
|
||||
ld d, 0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
ld [wd265], a
|
||||
ld [wTempIconSpecies], a
|
||||
ld e, FIELDMOVE_FLY
|
||||
farcall FlyFunction_GetMonIcon
|
||||
xor a
|
||||
|
||||
@@ -462,7 +462,7 @@ DisplayHOFMon:
|
||||
call TextBox
|
||||
ld a, [wTempMonSpecies]
|
||||
ld [wCurPartySpecies], a
|
||||
ld [wd265], a
|
||||
ld [wDeciramBuffer], a
|
||||
ld hl, wTempMonDVs
|
||||
predef GetUnownLetter
|
||||
xor a
|
||||
@@ -477,7 +477,7 @@ DisplayHOFMon:
|
||||
ld [hli], a
|
||||
ld [hl], "<DOT>"
|
||||
hlcoord 3, 13
|
||||
ld de, wd265
|
||||
ld de, wDeciramBuffer
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||
call PrintNum
|
||||
call GetBasePokemonName
|
||||
|
||||
@@ -11,7 +11,7 @@ GetFirstPokemonHappiness:
|
||||
jr .loop
|
||||
|
||||
.done
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
ld a, [hl]
|
||||
ld [wScriptVar], a
|
||||
call GetPokemonName
|
||||
@@ -19,9 +19,9 @@ GetFirstPokemonHappiness:
|
||||
|
||||
CheckFirstMonIsEgg:
|
||||
ld a, [wPartySpecies]
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
cp EGG
|
||||
ld a, 1
|
||||
ld a, TRUE
|
||||
jr z, .egg
|
||||
xor a
|
||||
|
||||
@@ -196,15 +196,15 @@ DayCareStep::
|
||||
call Random
|
||||
ld [hl], a
|
||||
callfar CheckBreedmonCompatibility
|
||||
ld a, [wd265]
|
||||
ld a, [wBreedingCompatibility]
|
||||
cp 230
|
||||
ld b, 32 percent - 1
|
||||
jr nc, .okay
|
||||
ld a, [wd265]
|
||||
ld a, [wBreedingCompatibility]
|
||||
cp 170
|
||||
ld b, 16 percent
|
||||
jr nc, .okay
|
||||
ld a, [wd265]
|
||||
ld a, [wBreedingCompatibility]
|
||||
cp 110
|
||||
ld b, 12 percent
|
||||
jr nc, .okay
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
CheckForLuckyNumberWinners:
|
||||
xor a
|
||||
ld [wScriptVar], a
|
||||
ld [wFoundMatchingIDInParty], a
|
||||
ld [wTempByteValue], a
|
||||
ld a, [wPartyCount]
|
||||
and a
|
||||
ret z
|
||||
@@ -34,8 +34,8 @@ CheckForLuckyNumberWinners:
|
||||
jr z, .SkipOpenBoxMon
|
||||
call .CompareLuckyNumberToMonID
|
||||
jr nc, .SkipOpenBoxMon
|
||||
ld a, 1
|
||||
ld [wFoundMatchingIDInParty], a
|
||||
ld a, TRUE
|
||||
ld [wTempByteValue], a
|
||||
|
||||
.SkipOpenBoxMon:
|
||||
push bc
|
||||
@@ -81,8 +81,8 @@ CheckForLuckyNumberWinners:
|
||||
|
||||
call .CompareLuckyNumberToMonID ; sets wScriptVar and wCurPartySpecies appropriately
|
||||
jr nc, .SkipBoxMon
|
||||
ld a, 1
|
||||
ld [wFoundMatchingIDInParty], a
|
||||
ld a, TRUE
|
||||
ld [wTempByteValue], a
|
||||
|
||||
.SkipBoxMon:
|
||||
push bc
|
||||
@@ -104,7 +104,7 @@ CheckForLuckyNumberWinners:
|
||||
and a
|
||||
ret z ; found nothing
|
||||
farcall StubbedTrainerRankings_LuckyNumberShow
|
||||
ld a, [wFoundMatchingIDInParty]
|
||||
ld a, [wTempByteValue]
|
||||
and a
|
||||
push af
|
||||
ld a, [wCurPartySpecies]
|
||||
|
||||
@@ -185,7 +185,7 @@ CalcMagikarpLength:
|
||||
|
||||
ld hl, MagikarpLengths
|
||||
ld a, 2
|
||||
ld [wd265], a
|
||||
ld [wTempByteValue], a
|
||||
|
||||
.read
|
||||
ld a, [hli]
|
||||
@@ -214,7 +214,7 @@ CalcMagikarpLength:
|
||||
ld [hMultiplicand + 1], a
|
||||
ld a, 100
|
||||
ld [hMultiplicand + 2], a
|
||||
ld a, [wd265]
|
||||
ld a, [wTempByteValue]
|
||||
ld [hMultiplier], a
|
||||
call Multiply
|
||||
ld b, 0
|
||||
@@ -228,9 +228,9 @@ CalcMagikarpLength:
|
||||
|
||||
.next
|
||||
inc hl ; align to next triplet
|
||||
ld a, [wd265]
|
||||
ld a, [wTempByteValue]
|
||||
inc a
|
||||
ld [wd265], a
|
||||
ld [wTempByteValue], a
|
||||
cp 16
|
||||
jr c, .read
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ MoveDeletion:
|
||||
jr c, .declined
|
||||
ld a, [wMenuCursorY]
|
||||
push af
|
||||
ld a, [wCurSpecies]
|
||||
ld [wd265], a
|
||||
ld a, [wCurMove]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetMoveName
|
||||
ld hl, .ConfirmDeleteText
|
||||
call PrintText
|
||||
|
||||
@@ -8,7 +8,7 @@ MoveTutor:
|
||||
xor a
|
||||
ld [wItemAttributeParamBuffer], a
|
||||
call .GetMoveTutorMove
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
ld [wPutativeTMHMMove], a
|
||||
call GetMoveName
|
||||
call CopyName1
|
||||
|
||||
@@ -29,7 +29,7 @@ _NameRater:
|
||||
xor a ; PARTYMON
|
||||
ld [wMonType], a
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
ld [wCurSpecies], a
|
||||
call GetBaseData
|
||||
ld b, 0
|
||||
|
||||
@@ -301,7 +301,7 @@ Trade_GetAttributeOfLastPartymon:
|
||||
|
||||
GetTradeMonName:
|
||||
push de
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetBasePokemonName
|
||||
ld hl, wStringBuffer1
|
||||
pop de
|
||||
|
||||
@@ -34,7 +34,7 @@ GameCornerPrizeMonCheckDex:
|
||||
call SetSeenAndCaughtMon
|
||||
call FadeToMenu
|
||||
ld a, [wScriptVar]
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
farcall NewPokedexEntry
|
||||
call ExitAllMenus
|
||||
ret
|
||||
@@ -153,7 +153,7 @@ GetMysteryGiftItem:
|
||||
ld [sMysteryGiftItem], a
|
||||
call CloseSRAM
|
||||
ld a, [wCurItem]
|
||||
ld [wd265], a
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetItemName
|
||||
ld hl, .ReceiveItemText
|
||||
call PrintText
|
||||
|
||||
Reference in New Issue
Block a user