2019-01-01 20:06:23 +00:00
|
|
|
GameCorner_Script:
|
2023-07-14 01:27:56 +00:00
|
|
|
call GameCornerSelectLuckySlotMachine
|
|
|
|
call GameCornerSetRocketHideoutDoorTile
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2019-01-01 20:06:23 +00:00
|
|
|
ld hl, GameCorner_ScriptPointers
|
|
|
|
ld a, [wGameCornerCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
jp CallFunctionInTable
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerSelectLuckySlotMachine:
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
bit BIT_CUR_MAP_LOADED_2, [hl]
|
|
|
|
res BIT_CUR_MAP_LOADED_2, [hl]
|
2014-05-18 18:19:10 +00:00
|
|
|
ret z
|
2014-05-24 18:40:38 +00:00
|
|
|
call Random
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hRandomAdd]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $7
|
2023-11-19 00:44:03 +00:00
|
|
|
jr nc, .not_max
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $8
|
2023-11-19 00:44:03 +00:00
|
|
|
.not_max
|
2014-05-18 18:19:10 +00:00
|
|
|
srl a
|
|
|
|
srl a
|
|
|
|
srl a
|
2015-07-13 20:35:35 +00:00
|
|
|
ld [wLuckySlotHiddenObjectIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerSetRocketHideoutDoorTile:
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
bit BIT_CUR_MAP_LOADED_1, [hl]
|
|
|
|
res BIT_CUR_MAP_LOADED_1, [hl]
|
2014-05-18 18:19:10 +00:00
|
|
|
ret z
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_FOUND_ROCKET_HIDEOUT
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
ld a, $2a
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 2, 8
|
2014-09-14 18:29:18 +00:00
|
|
|
predef_jump ReplaceTileBlock
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerReenterMapAfterPlayerLoss:
|
|
|
|
xor a ; SCRIPT_GAMECORNER_DEFAULT
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCurMapScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
GameCorner_ScriptPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_script_pointers
|
|
|
|
dw_const GameCornerDefaultScript, SCRIPT_GAMECORNER_DEFAULT
|
|
|
|
dw_const GameCornerRocketBattleScript, SCRIPT_GAMECORNER_ROCKET_BATTLE
|
|
|
|
dw_const GameCornerRocketExitScript, SCRIPT_GAMECORNER_ROCKET_EXIT
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerDefaultScript:
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerRocketBattleScript:
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wIsInBattle]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $ff
|
2023-07-14 01:27:56 +00:00
|
|
|
jp z, GameCornerReenterMapAfterPlayerLoss
|
|
|
|
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, TEXT_GAMECORNER_ROCKET_AFTER_BATTLE
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, GAMECORNER_ROCKET
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call SetSpriteMovementBytesToFF
|
2023-11-19 00:44:03 +00:00
|
|
|
ld de, GameCornerMovement_Rocket_WalkAroundPlayer
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wYCoord]
|
2020-08-28 16:10:55 +00:00
|
|
|
cp 6
|
2023-11-19 00:44:03 +00:00
|
|
|
jr nz, .not_direct_movement
|
|
|
|
ld de, GameCornerMovement_Rocket_WalkDirect
|
|
|
|
jr .got_rocket_movement
|
|
|
|
.not_direct_movement
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wXCoord]
|
2020-08-28 16:10:55 +00:00
|
|
|
cp 8
|
2023-11-19 00:44:03 +00:00
|
|
|
jr nz, .got_rocket_movement
|
|
|
|
ld de, GameCornerMovement_Rocket_WalkDirect
|
|
|
|
.got_rocket_movement
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, GAMECORNER_ROCKET
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call MoveSprite
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_GAMECORNER_ROCKET_EXIT
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
GameCornerMovement_Rocket_WalkAroundPlayer:
|
2015-07-17 07:52:25 +00:00
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_UP
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
2020-07-16 16:32:19 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
GameCornerMovement_Rocket_WalkDirect:
|
2015-07-17 07:52:25 +00:00
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
2020-07-16 16:32:19 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerRocketExitScript:
|
2024-07-16 17:02:54 +00:00
|
|
|
ld a, [wStatusFlags5]
|
|
|
|
bit BIT_SCRIPTED_NPC_MOVEMENT, a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_GAME_CORNER_ROCKET
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef HideObject
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
set BIT_CUR_MAP_LOADED_1, [hl]
|
|
|
|
set BIT_CUR_MAP_LOADED_2, [hl]
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_GAMECORNER_DEFAULT
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
GameCorner_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const GameCornerBeauty1Text, TEXT_GAMECORNER_BEAUTY1
|
|
|
|
dw_const GameCornerClerk1Text, TEXT_GAMECORNER_CLERK1
|
|
|
|
dw_const GameCornerMiddleAgedMan1Text, TEXT_GAMECORNER_MIDDLE_AGED_MAN1
|
|
|
|
dw_const GameCornerBeauty2Text, TEXT_GAMECORNER_BEAUTY2
|
|
|
|
dw_const GameCornerFishingGuruText, TEXT_GAMECORNER_FISHING_GURU
|
|
|
|
dw_const GameCornerMiddleAgedWomanText, TEXT_GAMECORNER_MIDDLE_AGED_WOMAN
|
|
|
|
dw_const GameCornerGymGuideText, TEXT_GAMECORNER_GYM_GUIDE
|
|
|
|
dw_const GameCornerGamblerText, TEXT_GAMECORNER_GAMBLER
|
|
|
|
dw_const GameCornerClerk2Text, TEXT_GAMECORNER_CLERK2
|
|
|
|
dw_const GameCornerGentlemanText, TEXT_GAMECORNER_GENTLEMAN
|
|
|
|
dw_const GameCornerRocketText, TEXT_GAMECORNER_ROCKET
|
|
|
|
dw_const GameCornerPosterText, TEXT_GAMECORNER_POSTER
|
|
|
|
dw_const GameCornerRocketAfterBattleText, TEXT_GAMECORNER_ROCKET_AFTER_BATTLE
|
|
|
|
|
|
|
|
GameCornerBeauty1Text:
|
|
|
|
text_far _GameCornerBeauty1Text
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerClerk1Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2023-07-14 01:27:56 +00:00
|
|
|
; Show player's coins
|
|
|
|
call GameCornerDrawCoinBox
|
|
|
|
ld hl, .DoYouNeedSomeGameCoins
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
call YesNoChoice
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .declined
|
|
|
|
; Can only get more coins if you
|
|
|
|
; - have the Coin Case
|
2017-12-30 00:54:27 +00:00
|
|
|
ld b, COIN_CASE
|
2014-05-18 18:19:10 +00:00
|
|
|
call IsItemInBag
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .no_coin_case
|
|
|
|
; - have room in the Coin Case for at least 9 coins
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nc, .coin_case_full
|
|
|
|
; - have at least 1000 yen
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney], a
|
|
|
|
ldh [hMoney + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $10
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney + 1], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call HasEnoughMoney
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nc, .buy_coins
|
|
|
|
ld hl, .CantAffordTheCoins
|
|
|
|
jr .print_ret
|
|
|
|
.buy_coins
|
|
|
|
; Spend 1000 yen
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney], a
|
|
|
|
ldh [hMoney + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $10
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney + 1], a
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hMoney + 2
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerMoney + 2
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $3
|
2014-06-16 20:57:26 +00:00
|
|
|
predef SubBCDPredef
|
2023-07-14 01:27:56 +00:00
|
|
|
; Receive 50 coins
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $50
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2023-07-14 01:27:56 +00:00
|
|
|
; Update display
|
|
|
|
call GameCornerDrawCoinBox
|
|
|
|
ld hl, .ThanksHereAre50Coins
|
|
|
|
jr .print_ret
|
|
|
|
.declined
|
|
|
|
ld hl, .PleaseComePlaySometime
|
|
|
|
jr .print_ret
|
|
|
|
.coin_case_full
|
|
|
|
ld hl, .CoinCaseIsFull
|
|
|
|
jr .print_ret
|
|
|
|
.no_coin_case
|
|
|
|
ld hl, .DontHaveCoinCase
|
|
|
|
.print_ret
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.DoYouNeedSomeGameCoins:
|
|
|
|
text_far _GameCornerClerk1DoYouNeedSomeGameCoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.ThanksHereAre50Coins:
|
|
|
|
text_far _GameCornerClerk1ThanksHereAre50CoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.PleaseComePlaySometime:
|
|
|
|
text_far _GameCornerClerk1PleaseComePlaySometimeText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.CantAffordTheCoins:
|
|
|
|
text_far _GameCornerClerk1CantAffordTheCoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.CoinCaseIsFull:
|
|
|
|
text_far _GameCornerClerk1CoinCaseIsFullText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.DontHaveCoinCase:
|
|
|
|
text_far _GameCornerClerk1DontHaveCoinCaseText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerMiddleAgedMan1Text:
|
|
|
|
text_far _GameCornerMiddleAgedMan1Text
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerBeauty2Text:
|
|
|
|
text_far _GameCornerBeauty2Text
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerFishingGuruText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_GOT_10_COINS
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .alreadyGotNpcCoins
|
|
|
|
ld hl, .WantToPlayText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
ld b, COIN_CASE
|
|
|
|
call IsItemInBag
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .dontHaveCoinCase
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nc, .coinCaseFull
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $10
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_GOT_10_COINS
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .Received10CoinsText
|
|
|
|
jr .print_ret
|
|
|
|
.alreadyGotNpcCoins
|
|
|
|
ld hl, .WinsComeAndGoText
|
|
|
|
jr .print_ret
|
|
|
|
.coinCaseFull
|
|
|
|
ld hl, .DontNeedMyCoinsText
|
|
|
|
jr .print_ret
|
|
|
|
.dontHaveCoinCase
|
|
|
|
ld hl, GameCornerOopsForgotCoinCaseText
|
|
|
|
.print_ret
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.WantToPlayText:
|
|
|
|
text_far _GameCornerFishingGuruWantToPlayText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.Received10CoinsText:
|
|
|
|
text_far _GameCornerFishingGuruReceived10CoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
sound_get_item_1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.DontNeedMyCoinsText:
|
|
|
|
text_far _GameCornerFishingGuruDontNeedMyCoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.WinsComeAndGoText:
|
|
|
|
text_far _GameCornerFishingGuruWinsComeAndGoText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerMiddleAgedWomanText:
|
|
|
|
text_far _GameCornerMiddleAgedWomanText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerGymGuideText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 02:41:23 +00:00
|
|
|
CheckEvent EVENT_BEAT_ERIKA
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, GameCornerGymGuideChampInMakingText
|
|
|
|
jr z, .not_defeated
|
|
|
|
ld hl, GameCornerGymGuideTheyOfferRarePokemonText
|
|
|
|
.not_defeated
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerGymGuideChampInMakingText:
|
|
|
|
text_far _GameCornerGymGuideChampInMakingText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerGymGuideTheyOfferRarePokemonText:
|
|
|
|
text_far _GameCornerGymGuideTheyOfferRarePokemonText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerGamblerText:
|
|
|
|
text_far _GameCornerGamblerText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerClerk2Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_GOT_20_COINS_2
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .alreadyGotNpcCoins
|
|
|
|
ld hl, .WantSomeCoinsText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
ld b, COIN_CASE
|
|
|
|
call IsItemInBag
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .dontHaveCoinCase
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nc, .coinCaseFull
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $20
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_GOT_20_COINS_2
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .Received20CoinsText
|
|
|
|
jr .print_ret
|
|
|
|
.alreadyGotNpcCoins
|
|
|
|
ld hl, .INeedMoreCoinsText
|
|
|
|
jr .print_ret
|
|
|
|
.coinCaseFull
|
|
|
|
ld hl, .YouHaveLotsOfCoinsText
|
|
|
|
jr .print_ret
|
|
|
|
.dontHaveCoinCase
|
|
|
|
ld hl, GameCornerOopsForgotCoinCaseText
|
|
|
|
.print_ret
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.WantSomeCoinsText:
|
|
|
|
text_far _GameCornerClerk2WantSomeCoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.Received20CoinsText:
|
|
|
|
text_far _GameCornerClerk2Received20CoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
sound_get_item_1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.YouHaveLotsOfCoinsText:
|
|
|
|
text_far _GameCornerClerk2YouHaveLotsOfCoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.INeedMoreCoinsText:
|
|
|
|
text_far _GameCornerClerk2INeedMoreCoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerGentlemanText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_GOT_20_COINS
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .alreadyGotNpcCoins
|
|
|
|
ld hl, .ThrowingMeOffText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2017-12-30 00:54:27 +00:00
|
|
|
ld b, COIN_CASE
|
2014-05-18 18:19:10 +00:00
|
|
|
call IsItemInBag
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .dontHaveCoinCase
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .coinCaseFull
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $20
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_GOT_20_COINS
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .Received20CoinsText
|
|
|
|
jr .print_ret
|
|
|
|
.alreadyGotNpcCoins
|
|
|
|
ld hl, .CloselyWatchTheReelsText
|
|
|
|
jr .print_ret
|
|
|
|
.coinCaseFull
|
|
|
|
ld hl, .YouGotYourOwnCoinsText
|
|
|
|
jr .print_ret
|
|
|
|
.dontHaveCoinCase
|
|
|
|
ld hl, GameCornerOopsForgotCoinCaseText
|
|
|
|
.print_ret
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.ThrowingMeOffText:
|
|
|
|
text_far _GameCornerGentlemanThrowingMeOffText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.Received20CoinsText:
|
|
|
|
text_far _GameCornerGentlemanReceived20CoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
sound_get_item_1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.YouGotYourOwnCoinsText:
|
|
|
|
text_far _GameCornerGentlemanYouGotYourOwnCoinsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.CloselyWatchTheReelsText:
|
|
|
|
text_far _GameCornerGentlemanCloselyWatchTheReelsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerRocketText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .ImGuardingThisPosterText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2024-07-16 17:02:54 +00:00
|
|
|
ld hl, wStatusFlags3
|
|
|
|
set BIT_TALKED_TO_TRAINER, [hl]
|
|
|
|
set BIT_PRINT_END_BATTLE_TEXT, [hl]
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .BattleEndText
|
|
|
|
ld de, .BattleEndText
|
2014-09-14 18:29:18 +00:00
|
|
|
call SaveEndBattleTextPointers
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hSpriteIndex]
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call EngageMapTrainer
|
|
|
|
call InitBattleEnemyParameters
|
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hJoyHeld], a
|
|
|
|
ldh [hJoyPressed], a
|
|
|
|
ldh [hJoyReleased], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_GAMECORNER_ROCKET_BATTLE
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.ImGuardingThisPosterText:
|
|
|
|
text_far _GameCornerRocketImGuardingThisPosterText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.BattleEndText:
|
|
|
|
text_far _GameCornerRocketBattleEndText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerRocketAfterBattleText:
|
|
|
|
text_far _GameCornerRocketAfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerPosterText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .SwitchBehindPosterText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
call WaitForSoundToFinish
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_GO_INSIDE
|
2014-05-18 18:19:10 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_FOUND_ROCKET_HIDEOUT
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $43
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 2, 8
|
2014-09-14 18:29:18 +00:00
|
|
|
predef ReplaceTileBlock
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.SwitchBehindPosterText:
|
|
|
|
text_far _GameCornerPosterSwitchBehindPosterText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_SWITCH
|
2014-05-18 18:19:10 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerOopsForgotCoinCaseText:
|
|
|
|
text_far _GameCornerOopsForgotCoinCaseText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
GameCornerDrawCoinBox:
|
2024-07-16 17:02:54 +00:00
|
|
|
ld hl, wStatusFlags5
|
|
|
|
set BIT_NO_TEXT_DELAY, [hl]
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 11, 0
|
2020-11-06 15:33:58 +00:00
|
|
|
ld b, 5
|
|
|
|
ld c, 7
|
2014-05-18 18:19:10 +00:00
|
|
|
call TextBoxBorder
|
|
|
|
call UpdateSprites
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 1
|
2015-08-05 21:20:29 +00:00
|
|
|
ld b, 4
|
|
|
|
ld c, 7
|
2014-05-18 18:19:10 +00:00
|
|
|
call ClearScreenArea
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 2
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerMoneyText
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 3
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerBlankText1
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 3
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerMoney
|
2020-11-06 15:33:58 +00:00
|
|
|
ld c, 3 | MONEY_SIGN | LEADING_ZEROES
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintBCDNumber
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 4
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerCoinText
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 5
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerBlankText2
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 15, 5
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $82
|
|
|
|
call PrintBCDNumber
|
2024-07-16 17:02:54 +00:00
|
|
|
ld hl, wStatusFlags5
|
|
|
|
res BIT_NO_TEXT_DELAY, [hl]
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerMoneyText:
|
2014-05-18 18:19:10 +00:00
|
|
|
db "MONEY@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerCoinText:
|
2014-05-18 18:19:10 +00:00
|
|
|
db "COIN@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerBlankText1:
|
2014-05-18 18:19:10 +00:00
|
|
|
db " @"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerBlankText2:
|
2014-05-18 18:19:10 +00:00
|
|
|
db " @"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Has9990Coins:
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $99
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $90
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp HasEnoughCoins
|