Merge branch 'PlagueVonKarma:master' into origin

This commit is contained in:
Egon370 2024-05-17 12:26:10 -07:00 committed by GitHub
commit a0cae560d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 513 additions and 59 deletions

View file

@ -207,6 +207,7 @@
const EVENT_GAVE_FOSSIL_TO_LAB const EVENT_GAVE_FOSSIL_TO_LAB
const EVENT_LAB_STILL_REVIVING_FOSSIL const EVENT_LAB_STILL_REVIVING_FOSSIL
const EVENT_LAB_HANDING_OVER_FOSSIL_MON const EVENT_LAB_HANDING_OVER_FOSSIL_MON
const EVENT_GOT_POCKET_LAPRAS
; Saffron City events ; Saffron City events
const_next $340 const_next $340

View file

@ -13,7 +13,7 @@
const POKE_BALL ; $04 const POKE_BALL ; $04
const TOWN_MAP ; $05 const TOWN_MAP ; $05
const BICYCLE ; $06 const BICYCLE ; $06
const SURFBOARD ; $07 buggy? const POCKET_LAPRAS ; $07
const SAFARI_BALL ; $08 const SAFARI_BALL ; $08
const POKEDEX ; $09 const POKEDEX ; $09
const MOON_STONE ; $0A const MOON_STONE ; $0A

View file

@ -6,7 +6,7 @@ KeyItemFlags:
dbit FALSE ; POKE_BALL dbit FALSE ; POKE_BALL
dbit TRUE ; TOWN_MAP dbit TRUE ; TOWN_MAP
dbit TRUE ; BICYCLE dbit TRUE ; BICYCLE
dbit TRUE ; SURFBOARD dbit TRUE ; POCKET_LAPRAS
dbit FALSE ; SAFARI_BALL dbit FALSE ; SAFARI_BALL
dbit TRUE ; POKEDEX dbit TRUE ; POKEDEX
dbit FALSE ; MOON_STONE dbit FALSE ; MOON_STONE

View file

@ -6,7 +6,7 @@ ItemNames::
li "POKé BALL" li "POKé BALL"
li "TOWN MAP" li "TOWN MAP"
li "BICYCLE" li "BICYCLE"
li "LAPRAS' BALL" ; surfboard, ?????, etc. li "LAPRAS' BALL" ; Pocket Lapras
li "SAFARI BALL" li "SAFARI BALL"
li "POKéDEX" li "POKéDEX"
li "MOON STONE" li "MOON STONE"

View file

@ -6,7 +6,7 @@ ItemPrices::
bcd3 200 ; POKE_BALL bcd3 200 ; POKE_BALL
bcd3 0 ; TOWN_MAP bcd3 0 ; TOWN_MAP
bcd3 0 ; BICYCLE bcd3 0 ; BICYCLE
bcd3 0 ; SURFBOARD bcd3 0 ; POCKET_LAPRAS
bcd3 1000 ; SAFARI_BALL bcd3 1000 ; SAFARI_BALL
bcd3 0 ; POKEDEX bcd3 0 ; POKEDEX
bcd3 0 ; MOON_STONE bcd3 0 ; MOON_STONE

View file

@ -10,14 +10,15 @@ CinnabarIsland_Object:
warp_event 14, 11, CINNABAR_VOLCANO_FLOORS, 1 warp_event 14, 11, CINNABAR_VOLCANO_FLOORS, 1
def_bg_events def_bg_events
bg_event 11, 15, 3 ; CinnabarIslandText3 bg_event 11, 15, 4 ; CinnabarIslandText3
bg_event 22, 19, 4 ; MartSignText bg_event 22, 19, 5 ; MartSignText
bg_event 16, 17, 5 ; PokeCenterSignText bg_event 16, 17, 6 ; PokeCenterSignText
bg_event 9, 23, 6 ; CinnabarIslandText6 bg_event 9, 23, 7 ; CinnabarIslandText6
bg_event 23, 13, 7 ; CinnabarIslandText7 bg_event 23, 13, 8 ; CinnabarIslandText7
def_object_events def_object_events
object_event 11, 18, SPRITE_GIRL, WALK, LEFT_RIGHT, 1 ; person object_event 11, 18, SPRITE_GIRL, WALK, LEFT_RIGHT, 1 ; person
object_event 17, 20, SPRITE_GAMBLER, STAY, NONE, 2 ; person object_event 17, 20, SPRITE_GAMBLER, STAY, NONE, 2 ; person
object_event 25, 18, SPRITE_COOLTRAINER_M, WALK, UP_DOWN, 3 ; Pocket Lapras
def_warps_to CINNABAR_ISLAND def_warps_to CINNABAR_ISLAND

View file

@ -1,5 +1,7 @@
TitleMons: TitleMons:
; mons on the title screen are randomly chosen from here ; mons on the title screen are randomly chosen from here
db SCREAM_TAIL ; Mascots
db SANDY_SHOCKS
db TOTARTLE ; New Starters db TOTARTLE ; New Starters
db GOROCHU db GOROCHU
db SYLVEON db SYLVEON
@ -9,10 +11,8 @@ TitleMons:
db BELLIGNAN ; GS Betas db BELLIGNAN ; GS Betas
db LUXWAN db LUXWAN
db PORYGON2 ; Post-Gen 1 Evos db PORYGON2 ; Post-Gen 1 Evos
db MAGNEZONE db TANGROWTH
db ANNIHILAPE db ANNIHILAPE
db SCREAM_TAIL ; LGPE and SV db EXEGGUTOR_A ; Regional Variants & Convergents
db WUGTRIO
db MELTAN
db EXEGGUTOR_A ; Regional Variants
db TAUROS_PB db TAUROS_PB
db WUGTRIO

View file

@ -12,8 +12,8 @@ _UltraBallDescription::
prompt prompt
_GreatBallDescription:: _GreatBallDescription::
text "A BALL with a de-" text "A BALL with a good"
next "cent success rate." next "success rate."
prompt prompt
_PokeBallDescription:: _PokeBallDescription::
@ -31,6 +31,11 @@ _BicycleDescription::
next "for travel." next "for travel."
prompt prompt
_PocketLaprasDescription::
text "A LAPRAS that lets"
next "you cross water."
prompt
_SafariBallDescription:: _SafariBallDescription::
text "Just an ULTRA BALL" text "Just an ULTRA BALL"
next "painted green." next "painted green."
@ -110,7 +115,7 @@ _EscapeRopeDescription::
_RepelDescription:: _RepelDescription::
text "Repels weak #-" text "Repels weak #-"
next "MON for 100 steps." next "MON. (100 steps)"
prompt prompt
_OldAmberDescription:: _OldAmberDescription::
@ -205,18 +210,18 @@ _MaxReviveDescription::
prompt prompt
_GuardSpecDescription:: _GuardSpecDescription::
text "Prevents stats" text "Prevents stat re-"
next "reduction. (1 BTL)" next "duction. (1 BTL)"
prompt prompt
_SuperRepelDescription:: _SuperRepelDescription::
text "Repels weak #-" text "Repels weak #-"
next "MON for 200 steps." next "MON. (200 steps)"
prompt prompt
_MaxRepelDescription:: _MaxRepelDescription::
text "Repels weak #-" text "Repels weak #-"
next "MON for 250 steps." next "MON. (250 steps)"
prompt prompt
_DireHitDescription:: _DireHitDescription::
@ -281,7 +286,7 @@ _OaksParcelDescription::
_ItemfinderDescription:: _ItemfinderDescription::
text "Checks for unseen" text "Checks for unseen"
next "items in the area." next "items nearby."
prompt prompt
_SilphScopeDescription:: _SilphScopeDescription::
@ -340,8 +345,8 @@ _ElixerDescription::
prompt prompt
_MaxElixerDescription:: _MaxElixerDescription::
text "Fully restores the" text "Fully restores PP"
next "PP of one #MON." next "of all moves."
prompt prompt
_CitrinePassDescription:: _CitrinePassDescription::
@ -380,13 +385,13 @@ _HM02Description::
prompt prompt
_HM03Description:: _HM03Description::
text "A strong water-" text "A strong WATER-"
next "type attack." next "type attack."
prompt prompt
_HM04Description:: _HM04Description::
text "A powerful physi-" text "A strong physical"
next "cal attack." next "attack."
prompt prompt
_HM05Description:: _HM05Description::
@ -420,12 +425,12 @@ _TM05Description::
prompt prompt
_TM06Description:: _TM06Description::
text "A poison move with" text "A POISON move with"
next "increasing damage." next "rising damage."
prompt prompt
_TM07Description:: _TM07Description::
text "A one-hit KO," text "A one-hit KO"
next "drill attack." next "drill attack."
prompt prompt
@ -475,8 +480,8 @@ _TM16Description::
prompt prompt
_TM17Description:: _TM17Description::
text "An attack that al-" text "A move that also"
next "so hurts the user." next "hurts the user."
prompt prompt
_TM18Description:: _TM18Description::
@ -520,13 +525,13 @@ _TM25Description::
prompt prompt
_TM26Description:: _TM26Description::
text "Tough but useless" text "Tough, but useless"
next "vs. flying foes." next "vs. FLYING foes."
prompt prompt
_TM27Description:: _TM27Description::
text "A GROUND-type," text "A one-hit KO"
next "one-hit KO attack." next "GROUND attack."
prompt prompt
_TM28Description:: _TM28Description::
@ -595,8 +600,8 @@ _TM40Description::
prompt prompt
_TM41Description:: _TM41Description::
text "Restores HP by 1/2" text "Restores 1/2 the"
next "the user's max HP." next "user's max HP."
prompt prompt
_TM42Description:: _TM42Description::
@ -615,8 +620,8 @@ _TM44Description::
prompt prompt
_TM45Description:: _TM45Description::
text "A move that may" text "A move that will"
next "cause paralysis." next "paralyze a foe."
prompt prompt
_TM46Description:: _TM46Description::
@ -640,8 +645,8 @@ _TM49Description::
prompt prompt
_TM50Description:: _TM50Description::
text "Makes a decoy with" text "Uses 1/4 max HP"
next "1/4 user's max HP." next "to make a decoy."
prompt prompt
_UnusedItemDescription:: _UnusedItemDescription::

View file

@ -233,3 +233,18 @@ ENDC
line "your friend and" line "your friend and"
cont "come again!" cont "come again!"
done done
_SortItemsText::
text "Would you like to"
next "sort items?"
done
_SortComplete::
text "Sorting is"
next "complete!"
prompt
_NothingToSort::
text "There are no items"
next "to sort."
prompt

View file

@ -39,9 +39,18 @@ DisplayDiploma::
hlcoord 10, 4 hlcoord 10, 4
ld de, wPlayerName ld de, wPlayerName
call PlaceString call PlaceString
ld a, [wPlayerSex]
and a ; are you playing as Red
jr z, .red ; if yes, Red appears on the diploma
jr nz, .green ; if no, Green replaces him
.green
farcall DrawFPlayerCharacter
jr .skip
.red
farcall DrawPlayerCharacter farcall DrawPlayerCharacter
.skip
; Move the player 33 pixels right and set the priority bit so he appears ; Move the player 33 pixels right and set the priority bit so they appear
; behind the background layer. ; behind the background layer.
ld hl, wShadowOAMSprite00XCoord ld hl, wShadowOAMSprite00XCoord
lb bc, $80, $28 lb bc, $80, $28

View file

@ -23,7 +23,7 @@ ItemUsePtrTable:
dw ItemUseBall ; POKE_BALL dw ItemUseBall ; POKE_BALL
dw ItemUseTownMap ; TOWN_MAP dw ItemUseTownMap ; TOWN_MAP
dw ItemUseBicycle ; BICYCLE dw ItemUseBicycle ; BICYCLE
dw ItemUseSurfboard ; out-of-battle Surf effect dw ItemUseLapras ; POCKET_LAPRAS
dw ItemUseBall ; SAFARI_BALL dw ItemUseBall ; SAFARI_BALL
dw ItemUsePokedex ; POKEDEX dw ItemUsePokedex ; POKEDEX
dw ItemUseEvoStone ; MOON_STONE dw ItemUseEvoStone ; MOON_STONE
@ -759,12 +759,17 @@ ItemUseBicycle:
jp PrintText jp PrintText
; used for Surf out-of-battle effect ; used for Surf out-of-battle effect
ItemUseSurfboard: ItemUseLapras:
ld a, [wWalkBikeSurfState] ld a, [wWalkBikeSurfState]
ld [wWalkBikeSurfStateCopy], a ld [wWalkBikeSurfStateCopy], a
cp 2 ; is the player already surfing? cp 2 ; is the player already surfing?
jr z, .tryToStopSurfing jr z, .tryToStopSurfing
.tryToSurf .tryToSurf
farcall IsSurfingAllowed
ld hl, wd728
bit 1, [hl]
res 1, [hl]
jp z, .no
call IsNextTileShoreOrWater call IsNextTileShoreOrWater
jp c, SurfingAttemptFailed jp c, SurfingAttemptFailed
ld hl, TilePairCollisionsWater ld hl, TilePairCollisionsWater
@ -837,6 +842,10 @@ ItemUseSurfboard:
inc a inc a
ld [wSimulatedJoypadStatesIndex], a ld [wSimulatedJoypadStatesIndex], a
ret ret
.no
ld a, 1
and a
ret
SurfingGotOnText: SurfingGotOnText:
text_far _SurfingGotOnText text_far _SurfingGotOnText

View file

@ -26,7 +26,7 @@ ItemDescriptionPointers:
text_end text_end
text_far _BicycleDescription text_far _BicycleDescription
text_end text_end
text_far _UnusedItemDescription text_far _PocketLaprasDescription
text_end text_end
text_far _SafariBallDescription text_far _SafariBallDescription
text_end text_end

View file

@ -165,7 +165,7 @@ StartMenu_Pokemon::
bit 1, [hl] bit 1, [hl]
res 1, [hl] res 1, [hl]
jp z, .loop jp z, .loop
ld a, SURFBOARD ld a, POCKET_LAPRAS
ld [wcf91], a ld [wcf91], a
ld [wPseudoItemID], a ld [wPseudoItemID], a
call UseItem call UseItem
@ -331,6 +331,7 @@ StartMenu_Item::
ld a, [wBagSavedMenuItem] ld a, [wBagSavedMenuItem]
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
call DisplayListMenuID call DisplayListMenuID
jp nz, .sortItems
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
ld [wBagSavedMenuItem], a ld [wBagSavedMenuItem], a
jr nc, .choseItem jr nc, .choseItem
@ -451,6 +452,9 @@ StartMenu_Item::
.infoItem .infoItem
farcall DisplayItemDescription farcall DisplayItemDescription
jp ItemMenuLoop jp ItemMenuLoop
.sortItems
farcall SortItems
jp ItemMenuLoop
CannotUseItemsHereText: CannotUseItemsHereText:
text_far _CannotUseItemsHereText text_far _CannotUseItemsHereText

View file

@ -147,3 +147,264 @@ HandleItemListSwapping::
pop de pop de
pop hl pop hl
jp DisplayListMenuIDLoop jp DisplayListMenuIDLoop
SortItems::
push hl
push bc
ld hl, SortItemsText ; Display the text to ask to sort
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jp z, .beginSorting ; If yes
jr .done
.finishedSwapping
ld a, [hSwapTemp] ; If not 0, then a swap of items did occur
cp 0
jr z, .nothingSorted
ld hl, SortComplete
jr .printResultText
.nothingSorted
ld hl, NothingToSort
.printResultText
call PrintText
.done
xor a ; Zeroes a
pop bc
pop hl
ret
.beginSorting
xor a
ld [hSwapTemp], a ; 1 if something in the bag got sorted
ld de, 0
ld hl, ItemSortList
ld b, [hl] ; This is the first item to check for
ld hl, wBagItems
ld c, 0 ; Relative to wBagItems, this is where we'd like to begin swapping
.loopCurrItemInBag
ld a, [hl] ; Load the value of hl to a (which is an item number) and Increments to the quantity
cp -1 ; See if the item number is $ff, which is 'cancel'
jr z, .findNextItem ; If it is cancel, then move onto the next item
cp b
jr z, .hasItem ; If it's not b, then go to the next item in the bag
inc hl ; increments past the quantity to the next item to check
inc hl
jr .loopCurrItemInBag
.findNextItem
ld d, 0
inc e
ld hl, ItemSortList
add hl, de
ld b, [hl]
ld hl, wBagItems ; Resets hl to start at the beginning of the bag
ld a, b
cp -1 ; Check if we got through all of the items, to the last one
jr z, .finishedSwapping
jr .loopCurrItemInBag
.hasItem ; c contains where to swap to relative to the start of wBagItems
; hl contains where the item to swap is absolute.
; b contains the item ID
push de
ld d, h
ld e, l
ld hl, wBagItems
ld a, b
ld b, 0
add hl, bc ; hl now holds where we'd like to swap to
ld b, a
ld a, [de]
cp [hl]
jr z, .cont ; If they're the same item
ld a, 1
ld [hSwapTemp], a
ld a, [hl]
ld [hSwapItemID],a ; [hSwapItemID] = second item ID
inc hl
ld a,[hld]
ld [hSwapItemQuantity],a ; [hSwapItemQuantity] = second item quantity
ld a,[de]
ld [hli],a ; put first item ID in second item slot
inc de
ld a,[de]
ld [hl],a ; put first item quantity in second item slot
ld a,[hSwapItemQuantity]
ld [de],a ; put second item quantity in first item slot
dec de
ld a,[hSwapItemID]
ld [de],a ; put second item ID in first item slot
.cont
inc c
inc c
ld h, d
ld l, e
pop de
jr .findNextItem
SortItemsText::
text_far _SortItemsText
db "@"
SortComplete::
text_far _SortComplete
db "@"
NothingToSort::
text_far _NothingToSort
db "@"
ItemSortList::
; Used Key Items
db BICYCLE
db SUPER_ROD
db POCKET_LAPRAS
db ITEMFINDER
db TOWN_MAP
db MYSTERY_BOX
; Balls
db POKE_BALL
db GREAT_BALL
db ULTRA_BALL
db SAFARI_BALL
db MASTER_BALL
; Common Items
db REPEL
db SUPER_REPEL
db MAX_REPEL
db ESCAPE_ROPE
db POKE_DOLL
; Health
db POTION
db SUPER_POTION
db HYPER_POTION
db MAX_POTION
db FULL_RESTORE
db FRESH_WATER
db SODA_POP
db LEMONADE
; Revival
db REVIVE
db MAX_REVIVE
; Status
db ANTIDOTE
db BURN_HEAL
db ICE_HEAL
db AWAKENING
db PARLYZ_HEAL
db FULL_HEAL
db POKE_FLUTE
; PP
db ETHER
db MAX_ETHER
db ELIXER
db MAX_ELIXER
; Battle Raises
db X_ACCURACY
db X_ATTACK
db X_DEFEND
db X_SPEED
db X_SPECIAL
db GUARD_SPEC
db DIRE_HIT
; Permanent Raises
db RARE_CANDY
db HP_UP
db PROTEIN
db IRON
db CARBOS
db CALCIUM
db PP_UP
; Evolution Items
db LEAF_STONE
db FIRE_STONE
db THUNDER_STONE
db WATER_STONE
db MOON_STONE
db HEART_STONE
db POISON_STONE
db ICE_STONE
db METAL_COAT
db UP_GRADE
db DUBIOUS_DISC
db BLK_AUGURITE
db PROTECTOR
db CANDY_JAR
; Other Non-Key Items
db DOME_FOSSIL
db HELIX_FOSSIL
db WING_FOSSIL
db OLD_AMBER
db NUGGET
db BOTTLE_CAP
; Key Items With No Use
db COIN_CASE
db SILPHLETTER
db S_S_TICKET
db OLD_SEA_MAP
db CITRINE_PASS
db SECRET_KEY
db BIKE_VOUCHER
db CARD_KEY
db GOLD_TEETH
db OAKS_PARCEL
db LIFT_KEY
db SILPH_SCOPE
db TEA
db EXP_ALL
; TMs
db TM01
db TM01 + 1
db TM01 + 2
db TM01 + 3
db TM01 + 4
db TM01 + 5
db TM01 + 6
db TM01 + 7
db TM01 + 8
db TM01 + 9
db TM01 + 10
db TM01 + 11
db TM01 + 12
db TM01 + 13
db TM01 + 14
db TM01 + 15
db TM01 + 16
db TM01 + 17
db TM01 + 18
db TM01 + 19
db TM01 + 20
db TM01 + 21
db TM01 + 22
db TM01 + 23
db TM01 + 24
db TM01 + 25
db TM01 + 26
db TM01 + 27
db TM01 + 28
db TM01 + 29
db TM01 + 30
db TM01 + 31
db TM01 + 32
db TM01 + 33
db TM01 + 34
db TM01 + 35
db TM01 + 36
db TM01 + 37
db TM01 + 38
db TM01 + 39
db TM01 + 40
db TM01 + 41
db TM01 + 42
db TM01 + 43
db TM01 + 44
db TM01 + 45
db TM01 + 46
db TM01 + 47
db TM01 + 48
db TM01 + 49
; HMs
db HM01
db HM01 + 1
db HM01 + 2
db HM01 + 3
db HM01 + 4
db -1 ; end

View file

@ -91,8 +91,15 @@ DisplayTitleScreen:
inc a inc a
dec b dec b
jr nz, .pokemonLogoLastTileRowLoop jr nz, .pokemonLogoLastTileRowLoop
call Random
ldh a, [hRandomAdd]
cp 129
jr c, .male
call DrawFPlayerCharacter
jr .playerskip
.male
call DrawPlayerCharacter call DrawPlayerCharacter
.playerskip
; put a pokeball in the player's hand ; put a pokeball in the player's hand
ld hl, wShadowOAMSprite10 ld hl, wShadowOAMSprite10
@ -119,11 +126,19 @@ DisplayTitleScreen:
call SaveScreenTilesToBuffer2 call SaveScreenTilesToBuffer2
call LoadScreenTilesFromBuffer2 call LoadScreenTilesFromBuffer2
call EnableLCD call EnableLCD
call Random
ldh a, [hRandomSub]
cp 129
jr c, .notshocks
ld a, SANDY_SHOCKS
ld [wTitleMonSpecies], a
call LoadTitleMonSprite
jr .skip
.notshocks
ld a, SCREAM_TAIL ld a, SCREAM_TAIL
ld [wTitleMonSpecies], a ld [wTitleMonSpecies], a
call LoadTitleMonSprite call LoadTitleMonSprite
.skip
ld a, HIGH(vBGMap0 + $300) ld a, HIGH(vBGMap0 + $300)
call TitleScreenCopyTileMapToVRAM call TitleScreenCopyTileMapToVRAM
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
@ -347,6 +362,43 @@ DrawPlayerCharacter:
jr nz, .loop jr nz, .loop
ret ret
DrawFPlayerCharacter:
ld hl, FPlayerCharacterTitleGraphics
ld de, vSprites
ld bc, FPlayerCharacterTitleGraphicsEnd - FPlayerCharacterTitleGraphics
ld a, BANK(FPlayerCharacterTitleGraphics)
call FarCopyData2
call ClearSprites
xor a
ld [wFPlayerCharacterOAMTile], a
ld hl, wShadowOAM
lb de, $60, $5a
ld b, 7
.loop2
push de
ld c, 5
.innerLoop2
ld a, d
ld [hli], a ; Y
ld a, e
ld [hli], a ; X
add 8
ld e, a
ld a, [wFPlayerCharacterOAMTile]
ld [hli], a ; tile
inc a
ld [wFPlayerCharacterOAMTile], a
inc hl
dec c
jr nz, .innerLoop2
pop de
ld a, 8
add d
ld d, a
dec b
jr nz, .loop2
ret
ClearBothBGMaps: ClearBothBGMaps:
ld hl, vBGMap0 ld hl, vBGMap0
ld bc, $400 * 2 ld bc, $400 * 2
@ -387,15 +439,15 @@ CopyrightTextString:
INCLUDE "data/pokemon/title_mons.asm" INCLUDE "data/pokemon/title_mons.asm"
; prints version text (red, blue) ; prints version text
PrintGameVersionOnTitleScreen: PrintGameVersionOnTitleScreen:
hlcoord 7, 8 hlcoord 6, 8
ld de, VersionOnTitleScreenText ld de, VersionOnTitleScreenText
jp PlaceString jp PlaceString
; these point to special tiles specifically loaded for that purpose and are not usual text ; these point to special tiles specifically loaded for that purpose and are not usual text
VersionOnTitleScreenText: VersionOnTitleScreenText:
db $61,$62,$63,$64,$65,$66,$67,$68,"@" ; "Blue Version" db $61,$62,$63,$64,$65,$66,$67,$68,"@"
DebugNewGamePlayerName: DebugNewGamePlayerName:
db "NINTEN@" db "NINTEN@"

View file

@ -33,7 +33,7 @@ TrySurf:
and a and a
jr nz, .no2 jr nz, .no2
call GetPartyMonName2 call GetPartyMonName2
ld a, SURFBOARD ld a, POCKET_LAPRAS
ld [wcf91], a ld [wcf91], a
ld [wPseudoItemID], a ld [wPseudoItemID], a
call UseItem call UseItem

BIN
gfx/title/fplayer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 489 B

View file

@ -6,3 +6,6 @@ TrainerInfoTextBoxTileGraphicsEnd:
CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp" CircleTile: INCBIN "gfx/trainer_card/circle_tile.2bpp"
BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp" BadgeNumbersTileGraphics: INCBIN "gfx/trainer_card/badge_numbers.2bpp"
FPlayerCharacterTitleGraphics: INCBIN "gfx/title/fplayer.2bpp"
FPlayerCharacterTitleGraphicsEnd:

View file

@ -1,7 +1,8 @@
; rst vectors (unused) ; rst vectors (unused)
SECTION "rst0", ROM0[$0000] SECTION "rst0", ROM0[$0000]
rst $38 _Bankswitch::
jp Bankswitch
ds $08 - @, 0 ; unused ds $08 - @, 0 ; unused

View file

@ -50,7 +50,7 @@ DisplayListMenuID::
ld [wTopMenuItemY], a ld [wTopMenuItemY], a
ld a, 5 ld a, 5
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
ld a, A_BUTTON | B_BUTTON | SELECT ld a, A_BUTTON | B_BUTTON | SELECT | START
ld [wMenuWatchedKeys], a ld [wMenuWatchedKeys], a
ld c, 10 ld c, 10
call DelayFrames call DelayFrames
@ -178,6 +178,8 @@ DisplayListMenuIDLoop::
jp nz, ExitListMenu ; if so, exit the menu jp nz, ExitListMenu ; if so, exit the menu
bit BIT_SELECT, a bit BIT_SELECT, a
jp nz, HandleItemListSwapping ; if so, allow the player to swap menu entries jp nz, HandleItemListSwapping ; if so, allow the player to swap menu entries
bit 3, a ; was the start button pressed?
jp nz, .sortItems ; if so, allow the player to swap menu entries
ld b, a ld b, a
bit BIT_D_DOWN, b bit BIT_D_DOWN, b
ld hl, wListScrollOffset ld hl, wListScrollOffset
@ -197,6 +199,10 @@ DisplayListMenuIDLoop::
jp z, DisplayListMenuIDLoop jp z, DisplayListMenuIDLoop
dec [hl] dec [hl]
jp DisplayListMenuIDLoop jp DisplayListMenuIDLoop
.sortItems
rra ; Sets the zero flag to 0 so the sorting function will happen
rla
jp BankswitchBack
DisplayChooseQuantityMenu:: DisplayChooseQuantityMenu::
; text box dimensions/coordinates for just quantity ; text box dimensions/coordinates for just quantity

View file

@ -1,13 +1,13 @@
MACRO farcall MACRO farcall
ld b, BANK(\1) ld b, BANK(\1)
ld hl, \1 ld hl, \1
call Bankswitch rst _Bankswitch
ENDM ENDM
MACRO callfar MACRO callfar
ld hl, \1 ld hl, \1
ld b, BANK(\1) ld b, BANK(\1)
call Bankswitch rst _Bankswitch
ENDM ENDM
MACRO farjp MACRO farjp

View file

@ -861,6 +861,7 @@ wNumShakes::
wWhichBadge:: wWhichBadge::
wTitleMonSpecies:: wTitleMonSpecies::
wPlayerCharacterOAMTile:: wPlayerCharacterOAMTile::
wFPlayerCharacterOAMTile::
; the number of small stars OAM entries to move down ; the number of small stars OAM entries to move down
wMoveDownSmallStarsOAMCount:: wMoveDownSmallStarsOAMCount::
wChargeMoveNum:: wChargeMoveNum::

View file

@ -53,6 +53,7 @@ CinnabarIslandScript1:
CinnabarIsland_TextPointers: CinnabarIsland_TextPointers:
dw CinnabarIslandText1 dw CinnabarIslandText1
dw CinnabarIslandText2 dw CinnabarIslandText2
dw CinnabarPocketLapras
dw CinnabarIslandText3 dw CinnabarIslandText3
dw MartSignText dw MartSignText
dw PokeCenterSignText dw PokeCenterSignText
@ -83,3 +84,88 @@ CinnabarIslandText6:
CinnabarIslandText7: CinnabarIslandText7:
text_far _CinnabarIslandText7 text_far _CinnabarIslandText7
text_end text_end
_CinnabarPocketLapras1:
text "Bah, this LAPRAS"
line "just doesn't want"
cont "to fight! Can you"
cont "believe that?"
para "All it likes to"
line "do is SURF, but"
cont "my GYARADOS can"
cont "already do that!"
para "Here, take it. I"
line "can't stand its"
cont "big ol' eyes"
cont "looking at me."
prompt
_PocketLaprasNoRoomText:
text "You don't have"
line "room, either?"
para "Well, it's not"
line "like it's going"
cont "anywhere..."
done
_ReceivedPocketLaprasText:
text "<PLAYER> received"
line "@"
text_ram wStringBuffer
text "!@"
text_end
_CinnabarPocketLapras2:
text "Take care of it"
line "though, alright?"
cont "LAPRAS is very"
cont "endangered."
para "You should stay"
line "safe, too." ; haha, llinos, you sly dog
done
; for some reason it crashed super hard if I didn't do this.
CinnabarPocketLapras1:
text_far _CinnabarPocketLapras1
text_end
CinnabarPocketLapras2:
text_far _CinnabarPocketLapras2
text_end
PocketLaprasNoRoomText:
text_far _PocketLaprasNoRoomText
text_end
ReceivedPocketLaprasText:
text_far _ReceivedPocketLaprasText
text_end
CinnabarPocketLapras:
text_asm
CheckEvent EVENT_GOT_POCKET_LAPRAS
jr nz, .skip
ld hl, CinnabarPocketLapras1
call PrintText
lb bc, POCKET_LAPRAS, 1
call GiveItem
jr nc, .bag_full
ld hl, ReceivedPocketLaprasText
call PrintText
ld a, SFX_GET_KEY_ITEM
call PlaySound
SetEvent EVENT_GOT_POCKET_LAPRAS ; if you get here, it's done.
jr .end
.bag_full
ld hl, PocketLaprasNoRoomText
jr .end
.skip
ld hl, CinnabarPocketLapras2
call PrintText
; fallthrough
.end
jp TextScriptEnd