expanded Pokemon size

Rhyperior files are dummies and will need to be properly edited with sprites, Rhydon evo data, etc, but it (and the other files included) show that the trainer and pokemon sprite indexes have been separated, which allows us to add the other KEP mons
This commit is contained in:
emaskyesmogon 2022-08-31 20:47:02 -06:00
parent b33e266d44
commit 1893b4c7cf
28 changed files with 160 additions and 24 deletions

View file

@ -200,5 +200,6 @@
const DEX_DRAGONITE ; 149 const DEX_DRAGONITE ; 149
const DEX_MEWTWO ; 150 const DEX_MEWTWO ; 150
const DEX_MEW ; 151 const DEX_MEW ; 151
const DEX_RHYPERIOR
DEF NUM_POKEMON EQU const_value - 1 DEF NUM_POKEMON EQU const_value - 1

View file

@ -206,6 +206,7 @@
const BETOBEBII ; $C5 (new) const BETOBEBII ; $C5 (new)
const BELLOSSOM ; $C6 (new) const BELLOSSOM ; $C6 (new)
const SCIZOR ; $C7 (new) const SCIZOR ; $C7 (new)
const RHYPERIOR ; $C8 (test)
DEF NUM_POKEMON_INDEXES EQU const_value - 1 DEF NUM_POKEMON_INDEXES EQU const_value - 1

View file

@ -196,4 +196,5 @@ INCLUDE "data/pokemon/base_stats/dragonair.asm"
INCLUDE "data/pokemon/base_stats/dragonite.asm" INCLUDE "data/pokemon/base_stats/dragonite.asm"
INCLUDE "data/pokemon/base_stats/mewtwo.asm" INCLUDE "data/pokemon/base_stats/mewtwo.asm"
INCLUDE "data/pokemon/base_stats/mew.asm" INCLUDE "data/pokemon/base_stats/mew.asm"
INCLUDE "data/pokemon/base_stats/rhyperior.asm"
assert_table_length NUM_POKEMON assert_table_length NUM_POKEMON

View file

@ -0,0 +1,27 @@
db DEX_RHYDON ; pokedex id
db 115, 140, 130, 50, 55
; hp atk def spd spc
db GROUND, ROCK ; type
db 60 ; catch rate
db 204 ; base exp
INCBIN "gfx/pokemon/front/rhydon.pic", 0, 1 ; sprite dimensions
dw RhydonPicFront, RhydonPicBack
db HORN_ATTACK, STOMP, TAIL_WHIP, FURY_ATTACK ; level 1 learnset
db GROWTH_SLOW ; growth rate
; tm/hm learnset
tmhm MEGA_PUNCH, MEGA_KICK, TOXIC, HORN_DRILL, BODY_SLAM, \
TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, \
BLIZZARD, HYPER_BEAM, PAY_DAY, SUBMISSION, COUNTER, \
SEISMIC_TOSS, RAGE, THUNDERBOLT, THUNDER, EARTHQUAKE, \
FISSURE, DIG, MIMIC, DOUBLE_TEAM, BIDE, \
FIRE_BLAST, SKULL_BASH, REST, ROCK_SLIDE, SUBSTITUTE, \
SURF, STRENGTH
; end
db BANK(RhydonPicFront)
assert BANK(RhydonPicFront) == BANK(RhydonPicBack)

View file

@ -205,4 +205,5 @@ CryData::
mon_cry SFX_CRY_05, $FF, $40 ; Betobebii mon_cry SFX_CRY_05, $FF, $40 ; Betobebii
mon_cry SFX_CRY_00, $00, $00 ; Bellossom (unfinished) mon_cry SFX_CRY_00, $00, $00 ; Bellossom (unfinished)
mon_cry SFX_CRY_00, $00, $00 ; Scizor (unfinished) mon_cry SFX_CRY_00, $00, $00 ; Scizor (unfinished)
mon_cry SFX_CRY_00, $00, $00 ; Rhyperior (test)
assert_table_length NUM_POKEMON_INDEXES assert_table_length NUM_POKEMON_INDEXES

View file

@ -199,6 +199,7 @@ PokedexEntryPointers:
dw MissingNoDexEntry dw MissingNoDexEntry
dw BellossomDexEntry dw BellossomDexEntry
dw ScizorDexEntry dw ScizorDexEntry
dw RhyperiorDexEntry
assert_table_length NUM_POKEMON_INDEXES assert_table_length NUM_POKEMON_INDEXES
; string: species name ; string: species name
@ -1550,3 +1551,10 @@ ScizorDexEntry:
text_far _ScizorDexEntry text_far _ScizorDexEntry
text_end text_end
RhyperiorDexEntry:
db "TEST@"
db 5,11
dw 5000
text_far _RhyperiorDexEntry
text_end

View file

@ -199,4 +199,5 @@ PokedexOrder:
db DEX_BETOBEBII db DEX_BETOBEBII
db DEX_BELLOSSOM db DEX_BELLOSSOM
db DEX_SCIZOR db DEX_SCIZOR
db DEX_RHYPERIOR
assert_table_length NUM_POKEMON_INDEXES assert_table_length NUM_POKEMON_INDEXES

View file

@ -202,6 +202,7 @@ EvosMovesPointerTable:
dw BetobebiiEvosMoves dw BetobebiiEvosMoves
dw BellossomEvosMoves dw BellossomEvosMoves
dw ScizorEvosMoves dw ScizorEvosMoves
dw RhyperiorEvosMoves
assert_table_length NUM_POKEMON_INDEXES assert_table_length NUM_POKEMON_INDEXES
RhydonEvosMoves: RhydonEvosMoves:
@ -2538,3 +2539,14 @@ ScizorEvosMoves:
db 50, BULLET_PUNCH db 50, BULLET_PUNCH
db 0 db 0
RhyperiorEvosMoves:
; Evolutions
db 0
; Learnset
db 30, STOMP
db 35, TAIL_WHIP
db 40, FURY_ATTACK
db 48, HORN_DRILL
db 55, LEER
db 64, TAKE_DOWN
db 0

View file

@ -196,4 +196,5 @@ MonPartyData:
nybble ICON_SNAKE ; Dragonite nybble ICON_SNAKE ; Dragonite
nybble ICON_MON ; Mewtwo nybble ICON_MON ; Mewtwo
nybble ICON_MON ; Mew nybble ICON_MON ; Mew
nybble ICON_MON ; Rhyperior
end_nybble_array NUM_POKEMON end_nybble_array NUM_POKEMON

View file

@ -199,4 +199,5 @@ MonsterNames::
db "BETOBEBII@" db "BETOBEBII@"
db "BELLOSSOM@" db "BELLOSSOM@"
db "SCIZOR@@@@" db "SCIZOR@@@@"
db "RHYPERIOR@"
assert_table_length NUM_POKEMON_INDEXES assert_table_length NUM_POKEMON_INDEXES

View file

@ -448,6 +448,16 @@ _BellossomDexEntry::
next "to summon the sun" next "to summon the sun"
dex dex
_RhyperiorDexEntry::
text "This is a newly"
next "discovered"
next "#MON. It is"
page "currently under"
next "investigation. No"
next "info is available"
dex
_MissingNoDexEntry:: _MissingNoDexEntry::
text "This is a newly" text "This is a newly"
next "discovered" next "discovered"

View file

@ -197,4 +197,5 @@ MonsterPalettes:
db PAL_BROWNMON ; DRAGONITE db PAL_BROWNMON ; DRAGONITE
db PAL_MEWMON ; MEWTWO db PAL_MEWMON ; MEWTWO
db PAL_MEWMON ; MEW db PAL_MEWMON ; MEW
db PAL_GREYMON ; RHYPERIOR
assert_table_length NUM_POKEMON + 1 assert_table_length NUM_POKEMON + 1

View file

@ -82,8 +82,8 @@ BattleTransitions:
GetBattleTransitionID_WildOrTrainer: GetBattleTransitionID_WildOrTrainer:
ld a, [wCurOpponent] ld a, [wCurOpponent]
cp OPP_ID_OFFSET and a
jr nc, .trainer jr nz, .trainer
res 0, c res 0, c
ret ret
.trainer .trainer

View file

@ -955,6 +955,12 @@ TrainerBattleVictory:
; win money ; win money
ld hl, MoneyForWinningText ld hl, MoneyForWinningText
call PrintText call PrintText
xor a
ld [wIsTrainerBattle], a
ld a, 1
ld [wWasTrainerBattle], a
ld de, wPlayerMoney + 2 ld de, wPlayerMoney + 2
ld hl, wAmountMoneyWon + 2 ld hl, wAmountMoneyWon + 2
ld c, $3 ld c, $3
@ -1142,6 +1148,8 @@ ChooseNextMon:
; called when player is out of usable mons. ; called when player is out of usable mons.
; prints appropriate lose message, sets carry flag if player blacked out (special case for initial rival fight) ; prints appropriate lose message, sets carry flag if player blacked out (special case for initial rival fight)
HandlePlayerBlackOut: HandlePlayerBlackOut:
xor a
ld [wIsTrainerBattle], a
ld a, [wLinkState] ld a, [wLinkState]
cp LINK_STATE_BATTLING cp LINK_STATE_BATTLING
jr z, .notRival1Battle jr z, .notRival1Battle
@ -6801,9 +6809,11 @@ InitBattleCommon:
push af push af
res 1, [hl] res 1, [hl]
callfar InitBattleVariables callfar InitBattleVariables
ld a, [wIsTrainerBattle]
and a
jp z, InitWildBattle
ld a, [wEnemyMonSpecies2] ld a, [wEnemyMonSpecies2]
sub OPP_ID_OFFSET sub OPP_ID_OFFSET
jp c, InitWildBattle
ld [wTrainerClass], a ld [wTrainerClass], a
call GetTrainerInformation call GetTrainerInformation
callfar ReadTrainer callfar ReadTrainer

View file

@ -99,6 +99,7 @@ TryDoWildEncounter:
ret ret
.willEncounter .willEncounter
xor a xor a
ld [wIsTrainerBattle], a
ret ret
INCLUDE "data/wild/probabilities.asm" INCLUDE "data/wild/probabilities.asm"

View file

@ -119,6 +119,9 @@ UpdateNPCSprite:
ld hl, wMapSpriteData ld hl, wMapSpriteData
add l add l
ld l, a ld l, a
jr nc, .nc
inc h
.nc
ld a, [hl] ; read movement byte 2 ld a, [hl] ; read movement byte 2
ld [wCurSpriteMovement2], a ld [wCurSpriteMovement2], a
ld h, HIGH(wSpriteStateData1) ld h, HIGH(wSpriteStateData1)

View file

@ -22,3 +22,19 @@ CopyData::
or b or b
jr nz, CopyData jr nz, CopyData
ret ret
FarCopyData2::
; Identical to FarCopyData, but uses hROMBankTemp
; as temp space instead of wBuffer.
ldh [hROMBankTemp], a
ldh a, [hLoadedROMBank]
push af
ldh a, [hROMBankTemp]
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
call CopyData
pop af
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
ret

View file

@ -1,18 +1,3 @@
FarCopyData2::
; Identical to FarCopyData, but uses hROMBankTemp
; as temp space instead of wBuffer.
ldh [hROMBankTemp], a
ldh a, [hLoadedROMBank]
push af
ldh a, [hROMBankTemp]
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
call CopyData
pop af
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
ret
FarCopyData3:: FarCopyData3::
; Copy bc bytes from a:de to hl. ; Copy bc bytes from a:de to hl.
ldh [hROMBankTemp], a ldh [hROMBankTemp], a

View file

@ -143,6 +143,8 @@ DisplayListMenuIDLoop::
ld [wd0b5], a ld [wd0b5], a
ld a, BANK(ItemNames) ld a, BANK(ItemNames)
ld [wPredefBank], a ld [wPredefBank], a
ld a, ITEM_NAME
ld [wNameListType], a
call GetName call GetName
jr .storeChosenEntry jr .storeChosenEntry
.pokemonList .pokemonList

View file

@ -190,16 +190,20 @@ EndTrainerBattle::
res 0, [hl] ; player is no longer engaged by any trainer res 0, [hl] ; player is no longer engaged by any trainer
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $ff cp $ff
jp z, ResetButtonPressedAndMapScript jr z, EndTrainerBattleWhiteout
ld a, $2 ld a, $2
call ReadTrainerHeaderInfo call ReadTrainerHeaderInfo
ld a, [wTrainerHeaderFlagBit] ld a, [wTrainerHeaderFlagBit]
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
call TrainerFlagAction ; flag trainer as fought call TrainerFlagAction ; flag trainer as fought
ld a, [wEnemyMonOrTrainerClass] ld a, [wWasTrainerBattle]
cp OPP_ID_OFFSET and a
jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite) jr nz, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite)
ld a, [wCurMap]
cp POKEMON_TOWER_7F
jr z, .skipRemoveSprite ; the tower 7f scripts call EndTrainerBattle manually after
; wIsTrainerBattle has been unset
ld hl, wMissableObjectList ld hl, wMissableObjectList
ld de, $2 ld de, $2
ld a, [wSpriteIndex] ld a, [wSpriteIndex]
@ -209,11 +213,19 @@ EndTrainerBattle::
ld [wMissableObjectIndex], a ; load corresponding missable object index and remove it ld [wMissableObjectIndex], a ; load corresponding missable object index and remove it
predef HideObject predef HideObject
.skipRemoveSprite .skipRemoveSprite
xor a
ld [wWasTrainerBattle], a
ld hl, wd730 ld hl, wd730
bit 4, [hl] bit 4, [hl]
res 4, [hl] res 4, [hl]
ret nz ret nz
EndTrainerBattleWhiteout:
xor a
ld [wIsTrainerBattle], a
ld [wWasTrainerBattle], a
; fallthrough to original routine
ResetButtonPressedAndMapScript:: ResetButtonPressedAndMapScript::
xor a xor a
ld [wJoyIgnore], a ld [wJoyIgnore], a
@ -232,12 +244,14 @@ InitBattleEnemyParameters::
ld a, [wEngagedTrainerClass] ld a, [wEngagedTrainerClass]
ld [wCurOpponent], a ld [wCurOpponent], a
ld [wEnemyMonOrTrainerClass], a ld [wEnemyMonOrTrainerClass], a
cp OPP_ID_OFFSET ld a, [wIsTrainerBattle]
and a
jr z, .noTrainer
ld a, [wEngagedTrainerSet] ld a, [wEngagedTrainerSet]
jr c, .noTrainer
ld [wTrainerNo], a ld [wTrainerNo], a
ret ret
.noTrainer .noTrainer
ld a, [wEngagedTrainerSet]
ld [wCurEnemyLVL], a ld [wCurEnemyLVL], a
ret ret
@ -333,7 +347,17 @@ EngageMapTrainer::
ld a, [hli] ; load trainer class ld a, [hli] ; load trainer class
ld [wEngagedTrainerClass], a ld [wEngagedTrainerClass], a
ld a, [hl] ; load trainer mon set ld a, [hl] ; load trainer mon set
bit 7, a
jr nz, .pokemon
ld [wEngagedTrainerSet], a ld [wEngagedTrainerSet], a
ld a, 1
ld [wIsTrainerBattle], a
jp PlayTrainerMusic
.pokemon
and $7F
ld [wEngagedTrainerSet], a
xor a
ld [wIsTrainerBattle], a
jp PlayTrainerMusic jp PlayTrainerMusic
PrintEndBattleText:: PrintEndBattleText::

View file

@ -156,6 +156,8 @@ CeruleanCityScript1:
ld a, $9 ld a, $9
.done .done
ld [wTrainerNo], a ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
xor a xor a
ldh [hJoyHeld], a ldh [hJoyHeld], a
@ -168,6 +170,8 @@ CeruleanCityScript2:
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $ff cp $ff
jp z, CeruleanCityScript_1948c jp z, CeruleanCityScript_1948c
xor a
ld [wIsTrainerBattle], a
call CeruleanCityScript_1955d call CeruleanCityScript_1955d
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a

View file

@ -382,6 +382,8 @@ OaksLabScript11:
ret nz ret nz
; define which team rival uses, and fight it ; define which team rival uses, and fight it
ld a, 1
ld [wIsTrainerBattle], a
ld a, OPP_RIVAL1 ld a, OPP_RIVAL1
ld [wCurOpponent], a ld [wCurOpponent], a
ld a, [wRivalStarter] ld a, [wRivalStarter]
@ -416,6 +418,8 @@ OaksLabScript11:
ret ret
OaksLabScript12: OaksLabScript12:
xor a
ld [wIsTrainerBattle], a
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld a, PLAYER_DIR_UP ld a, PLAYER_DIR_UP

View file

@ -66,6 +66,8 @@ PokemonTower2Script1:
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $ff cp $ff
jp z, PokemonTower2Script_604fe jp z, PokemonTower2Script_604fe
xor a
ld [wIsTrainerBattle], a
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL
@ -164,6 +166,8 @@ PokemonTower2Text1:
ld a, $6 ld a, $6
.done .done
ld [wTrainerNo], a ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $1 ld a, $1
ld [wPokemonTower2FCurScript], a ld [wPokemonTower2FCurScript], a

View file

@ -33,6 +33,8 @@ Route12Script0:
ld [wCurOpponent], a ld [wCurOpponent], a
ld a, 30 ld a, 30
ld [wCurEnemyLVL], a ld [wCurEnemyLVL], a
xor a
ld [wIsTrainerBattle], a
ld a, HS_ROUTE_12_SNORLAX ld a, HS_ROUTE_12_SNORLAX
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject predef HideObject

View file

@ -33,6 +33,8 @@ Route16Script0:
ld [wCurOpponent], a ld [wCurOpponent], a
ld a, 30 ld a, 30
ld [wCurEnemyLVL], a ld [wCurEnemyLVL], a
xor a
ld [wIsTrainerBattle], a
ld a, HS_ROUTE_16_SNORLAX ld a, HS_ROUTE_16_SNORLAX
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject predef HideObject

View file

@ -33,6 +33,8 @@ Route22Script_50ed6:
.asm_50ee1 .asm_50ee1
ld a, [hl] ld a, [hl]
ld [wTrainerNo], a ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ret ret
Route22MoveRivalSprite: Route22MoveRivalSprite:
@ -149,6 +151,8 @@ Route22Script2:
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $ff cp $ff
jp z, Route22Script_50ece jp z, Route22Script_50ece
xor a
ld [wIsTrainerBattle], a
ld a, [wSpritePlayerStateData1FacingDirection] ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN and a ; cp SPRITE_FACING_DOWN
jr nz, .notDown jr nz, .notDown
@ -304,6 +308,8 @@ Route22Script5:
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $ff cp $ff
jp z, Route22Script_50ece jp z, Route22Script_50ece
xor a
ld [wIsTrainerBattle], a
ld a, $2 ld a, $2
ldh [hSpriteIndex], a ldh [hSpriteIndex], a
ld a, [wcf0d] ld a, [wcf0d]

View file

@ -114,6 +114,8 @@ SSAnne2Script1:
ld a, $3 ld a, $3
.done .done
ld [wTrainerNo], a ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
call SSAnne2Script_61416 call SSAnne2Script_61416
ld a, $2 ld a, $2
@ -124,6 +126,8 @@ SSAnne2Script2:
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $ff cp $ff
jp z, SSAnne2Script_613ab jp z, SSAnne2Script_613ab
xor a
ld [wIsTrainerBattle], a
call SSAnne2Script_61416 call SSAnne2Script_61416
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a

View file

@ -199,6 +199,8 @@ SilphCo7Script3:
ld a, $9 ld a, $9
.asm_51cc0 .asm_51cc0
ld [wTrainerNo], a ld [wTrainerNo], a
ld a, 1
ld [wIsTrainerBattle], a
ld a, $4 ld a, $4
jp SilphCo7Text_51c10 jp SilphCo7Text_51c10
@ -206,6 +208,8 @@ SilphCo7Script4:
ld a, [wIsInBattle] ld a, [wIsInBattle]
cp $ff cp $ff
jp z, SilphCo7Text_51c0c jp z, SilphCo7Text_51c0c
xor a
ld [wIsTrainerBattle], a
ld a, $f0 ld a, $f0
ld [wJoyIgnore], a ld [wJoyIgnore], a
SetEvent EVENT_BEAT_SILPH_CO_RIVAL SetEvent EVENT_BEAT_SILPH_CO_RIVAL