mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-08-14 04:59:06 -05:00
347 lines
9.4 KiB
ArmAsm
347 lines
9.4 KiB
ArmAsm
#include "macros/scrcmd.inc"
|
|
#include "res/text/bank/game_corner.h"
|
|
#include "res/text/bank/menu_entries.h"
|
|
|
|
#define LOCAL_VAR_SLOT_MACHINE_ID VAR_0x8004
|
|
|
|
|
|
ScriptEntry GameCorner_SlotMachine_0
|
|
ScriptEntry GameCorner_SlotMachine_1
|
|
ScriptEntry GameCorner_SlotMachine_2
|
|
ScriptEntry GameCorner_SlotMachine_3
|
|
ScriptEntry GameCorner_SlotMachine_4
|
|
ScriptEntry GameCorner_SlotMachine_5
|
|
ScriptEntry GameCorner_SlotMachine_6
|
|
ScriptEntry GameCorner_SlotMachine_7
|
|
ScriptEntry GameCorner_SlotMachine_8
|
|
ScriptEntry GameCorner_SlotMachine_9
|
|
ScriptEntry GameCorner_SlotMachine_10
|
|
ScriptEntry GameCorner_SlotMachine_11
|
|
ScriptEntry GameCorner_CoinsClerk
|
|
ScriptEntry GameCorner_LadyExplainSlotMachines
|
|
ScriptEntry GameCorner_OldMan20Coins
|
|
ScriptEntry GameCorner_Farmer
|
|
ScriptEntry GameCorner_Worker
|
|
ScriptEntry GameCorner_LadyPokeBalls
|
|
ScriptEntry GameCorner_Guitarist
|
|
ScriptEntry GameCorner_MaylenesDad
|
|
ScriptEntry GameCorner_BgSignBonusRounds
|
|
ScriptEntry GameCorner_Looker
|
|
ScriptEntryEnd
|
|
|
|
GameCorner_SlotMachine_0:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 0
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_1:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 1
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_2:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 2
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_3:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 3
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_4:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 4
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_5:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 5
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_6:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 6
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_7:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 7
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_8:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 8
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_9:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 9
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_10:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 10
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine_11:
|
|
SetVar LOCAL_VAR_SLOT_MACHINE_ID, 11
|
|
GoTo GameCorner_SlotMachine
|
|
|
|
GameCorner_SlotMachine:
|
|
PlaySE SEQ_SE_CONFIRM
|
|
LockAll
|
|
CheckItem ITEM_COIN_CASE, 1, VAR_RESULT
|
|
GoToIfEq VAR_RESULT, FALSE, GameCorner_SlotMachine_NoCoinCase
|
|
FadeScreenOut
|
|
WaitFadeScreen
|
|
CreateJournalEvent LOCATION_EVENT_GAME_CORNER
|
|
ScrCmd_267 LOCAL_VAR_SLOT_MACHINE_ID
|
|
ReturnToField
|
|
FadeScreenIn
|
|
WaitFadeScreen
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_SlotMachine_NoCoinCase:
|
|
Message GameCorner_Text_CantPlayWithoutCoinCase
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_CoinsClerk:
|
|
PlaySE SEQ_SE_CONFIRM
|
|
LockAll
|
|
FacePlayer
|
|
Message GameCorner_Text_WelcomeToGameCorner
|
|
CheckItem ITEM_COIN_CASE, 1, VAR_RESULT
|
|
GoToIfEq VAR_RESULT, FALSE, GameCorner_CoinsClerk_NoCoinCase
|
|
GoToIfSet FLAG_RECEIVED_GAME_CORNER_TM64, GameCorner_CoinsClerk_ShowCoinsAndMoney
|
|
GoToIfSet FLAG_SAVED_GAME_CORNER_TM64, GameCorner_CoinsClerk_CheckIfCanGiveTM64
|
|
CheckBonusRoundStreak VAR_RESULT
|
|
GoToIfEq VAR_RESULT, FALSE, GameCorner_CoinsClerk_ShowCoinsAndMoney
|
|
GoTo GameCorner_CoinsClerk_CheckIfCanGiveTM64
|
|
End
|
|
|
|
GameCorner_CoinsClerk_NoCoinCase:
|
|
Message GameCorner_Text_NoCoinCaseToHoldCoins
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_CoinsClerk_ShowCoinsAndMoney:
|
|
ShowCoins 20, 2
|
|
ShowMoney 20, 7
|
|
GameCorner_CoinsClerk_OpenCoinBuyMenu:
|
|
Message GameCorner_Text_1000For50Coins
|
|
InitGlobalTextMenu 1, 1, 0, VAR_RESULT
|
|
AddMenuEntryImm MenuEntries_Text_GameCorner_50Coins, 0
|
|
AddMenuEntryImm MenuEntries_Text_GameCorner_500Coins, 1
|
|
AddMenuEntryImm MenuEntries_Text_GameCorner_NoThanks, 2
|
|
ShowMenu
|
|
SetVar VAR_0x8008, VAR_RESULT
|
|
GoToIfEq VAR_0x8008, 0, GameCorner_CoinsClerk_Buy50Coins
|
|
GoToIfEq VAR_0x8008, 1, GameCorner_CoinsClerk_Buy500Coins
|
|
GoTo GameCorner_CoinsClerk_Cancel
|
|
|
|
GameCorner_CoinsClerk_Buy50Coins:
|
|
GoToIfNotEnoughMoney 1000, GameCorner_CoinsClerk_NotEnoughMoney
|
|
GoToIfCannotAddCoins 50, GameCorner_CoinsClerk_CoinCaseFull
|
|
PlaySE SEQ_SE_DP_REGI
|
|
AddToGameRecord RECORD_MONEY_SPENT, 1000
|
|
RemoveMoney 1000
|
|
UpdateMoneyDisplay
|
|
WaitSE SEQ_SE_DP_REGI
|
|
PlaySE SEQ_SE_PL_COIN
|
|
AddCoins 50
|
|
UpdateCoinDisplay
|
|
WaitSE SEQ_SE_PL_COIN
|
|
Message GameCorner_Text_HereAreYourCoins
|
|
WaitTime 30, VAR_RESULT
|
|
GoTo GameCorner_CoinsClerk_OpenCoinBuyMenu
|
|
|
|
GameCorner_CoinsClerk_Buy500Coins:
|
|
GoToIfNotEnoughMoney 10000, GameCorner_CoinsClerk_NotEnoughMoney
|
|
GoToIfCannotAddCoins 500, GameCorner_CoinsClerk_CoinCaseFull
|
|
PlaySE SEQ_SE_DP_REGI
|
|
AddToGameRecord RECORD_MONEY_SPENT, 10000
|
|
RemoveMoney 10000
|
|
UpdateMoneyDisplay
|
|
WaitSE SEQ_SE_DP_REGI
|
|
PlaySE SEQ_SE_PL_COIN
|
|
AddCoins 500
|
|
UpdateCoinDisplay
|
|
WaitSE SEQ_SE_PL_COIN
|
|
Message GameCorner_Text_HereAreYourCoins
|
|
WaitTime 30, VAR_RESULT
|
|
GoTo GameCorner_CoinsClerk_OpenCoinBuyMenu
|
|
|
|
GameCorner_CoinsClerk_NotEnoughMoney:
|
|
Message GameCorner_Text_NotEnoughMoney
|
|
WaitButton
|
|
CloseMessage
|
|
HideCoins
|
|
HideMoney
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_CoinsClerk_CoinCaseFull:
|
|
Message GameCorner_Text_CoinCaseIsFull
|
|
WaitButton
|
|
CloseMessage
|
|
HideCoins
|
|
HideMoney
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_CoinsClerk_Cancel:
|
|
Message GameCorner_Text_PleaseComeAgain
|
|
WaitButton
|
|
CloseMessage
|
|
HideCoins
|
|
HideMoney
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_CoinsClerk_CheckIfCanGiveTM64:
|
|
SetVar VAR_0x8004, ITEM_TM64
|
|
SetVar VAR_0x8005, 1
|
|
GoToIfCannotFitItem VAR_0x8004, VAR_0x8005, VAR_RESULT, GameCorner_CoinsClerk_SaveTM64
|
|
GoTo GameCorner_CoinsClerk_TenStraightBonusRounds
|
|
End
|
|
|
|
GameCorner_CoinsClerk_TenStraightBonusRounds:
|
|
GoToIfSet FLAG_SAVED_GAME_CORNER_TM64, GameCorner_CoinsClerk_TenStraightBonusRounds_SavedTM
|
|
Message GameCorner_Text_MementoForBonusRounds
|
|
GoTo GameCorner_CoinsClerk_GiveTM64
|
|
End
|
|
|
|
GameCorner_CoinsClerk_TenStraightBonusRounds_SavedTM:
|
|
Message GameCorner_Text_StillAmazedTakeMemento
|
|
GoTo GameCorner_CoinsClerk_GiveTM64
|
|
End
|
|
|
|
GameCorner_CoinsClerk_GiveTM64:
|
|
Common_GiveItemQuantity
|
|
SetFlag FLAG_RECEIVED_GAME_CORNER_TM64
|
|
Message GameCorner_Text_PleaseKeepPlayingSlots
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_CoinsClerk_SaveTM64:
|
|
SetFlag FLAG_SAVED_GAME_CORNER_TM64
|
|
GoTo GameCorner_CoinsClerk_ShowCoinsAndMoney
|
|
End
|
|
|
|
GameCorner_LadyExplainSlotMachines:
|
|
NPCMessage GameCorner_Text_ExplainSlotMachines
|
|
End
|
|
|
|
GameCorner_OldMan20Coins:
|
|
PlaySE SEQ_SE_CONFIRM
|
|
LockAll
|
|
FacePlayer
|
|
CheckItem ITEM_COIN_CASE, 1, VAR_RESULT
|
|
GoToIfEq VAR_RESULT, FALSE, GameCorner_OldMan20Coins_NoCoinCase
|
|
GoToIfSet FLAG_RECEIVED_GAME_CORNER_20_COINS_OLD_MAN, GameCorner_OldMan20Coins_LineUpClefairy
|
|
GoToIfCannotAddCoins 20, GameCorner_OldMan20Coins_LineUpClefairy
|
|
SetFlag FLAG_RECEIVED_GAME_CORNER_20_COINS_OLD_MAN
|
|
BufferPlayerName 0
|
|
Message GameCorner_Text_IveBeenWinningATonToday
|
|
WaitButton
|
|
PlaySE SEQ_SE_PL_COIN
|
|
AddCoins 20
|
|
WaitSE SEQ_SE_PL_COIN
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_OldMan20Coins_NoCoinCase:
|
|
Message GameCorner_Text_ManNextDoorHadCoinCase
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_OldMan20Coins_LineUpClefairy:
|
|
Message GameCorner_Text_ListenWhenClefairyAppears
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_Farmer:
|
|
PlaySE SEQ_SE_CONFIRM
|
|
LockAll
|
|
FacePlayer
|
|
CheckItem ITEM_COIN_CASE, 1, VAR_RESULT
|
|
GoToIfEq VAR_RESULT, FALSE, GameCorner_Farmer_NoCoinCase
|
|
GoToIfSet FLAG_RECEIVED_GAME_CORNER_50_COINS_FARMER, GameCorner_Farmer_CannotAddCoins
|
|
GoToIfCannotAddCoins 50, GameCorner_Farmer_CannotAddCoins
|
|
SetFlag FLAG_RECEIVED_GAME_CORNER_50_COINS_FARMER
|
|
BufferPlayerName 0
|
|
Message GameCorner_Text_ItsACarnival
|
|
WaitButton
|
|
PlaySE SEQ_SE_PL_COIN
|
|
AddCoins 50
|
|
WaitSE SEQ_SE_PL_COIN
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_Farmer_NoCoinCase:
|
|
Message GameCorner_Text_ItsDrivingMeBananas
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_Farmer_CannotAddCoins:
|
|
Message GameCorner_Text_ClefairyIsAdorable
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
GameCorner_Worker:
|
|
NPCMessage GameCorner_Text_IWantCoinsOfCourse
|
|
End
|
|
|
|
GameCorner_LadyPokeBalls:
|
|
NPCMessage GameCorner_Text_WhenAPokeBallAppears
|
|
End
|
|
|
|
GameCorner_Guitarist:
|
|
NPCMessage GameCorner_Text_AFriendScoredTonOfCoins
|
|
End
|
|
|
|
GameCorner_MaylenesDad:
|
|
NPCMessage GameCorner_Text_NothingGoingMyWay
|
|
End
|
|
|
|
GameCorner_BgSignBonusRounds:
|
|
GoToIfGt VAR_CONSECUTIVE_BONUS_ROUND_WINS, 999, GameCorner_BgSignBonusRounds_GreaterThan999
|
|
BufferNumber 0, VAR_CONSECUTIVE_BONUS_ROUND_WINS
|
|
EventMessage GameCorner_Text_ShootFor10
|
|
End
|
|
|
|
GameCorner_BgSignBonusRounds_GreaterThan999:
|
|
BufferNumber 0, 999
|
|
EventMessage GameCorner_Text_ShootFor10
|
|
End
|
|
|
|
GameCorner_Looker:
|
|
PlaySE SEQ_SE_CONFIRM
|
|
LockAll
|
|
FacePlayer
|
|
GoToIfSet FLAG_ARRESTED_CHARON_STARK_MOUNTAIN, GameCorner_Looker_PostStarkMountain
|
|
Message GameCorner_Text_Looker
|
|
GoTo GameCorner_Looker_End
|
|
End
|
|
|
|
GameCorner_Looker_PostStarkMountain:
|
|
Message GameCorner_Text_Looker_PostStarkMountain
|
|
GoTo GameCorner_Looker_End
|
|
End
|
|
|
|
GameCorner_Looker_End:
|
|
WaitButton
|
|
CloseMessage
|
|
ReleaseAll
|
|
End
|
|
|
|
.balign 4, 0
|