mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-26 20:44:35 -04:00
213 lines
7.6 KiB
C++
213 lines
7.6 KiB
C++
BattleFrontier_Lounge3_MapScripts::
|
|
.byte 0
|
|
|
|
.set BET_AMOUNT_5, 5
|
|
.set BET_AMOUNT_10, 10
|
|
.set BET_AMOUNT_15, 15
|
|
|
|
BattleFrontier_Lounge3_EventScript_Gambler::
|
|
lock
|
|
faceplayer
|
|
goto_if_set FLAG_MET_BATTLE_FRONTIER_GAMBLER, BattleFrontier_Lounge3_EventScript_AlreadyMetGambler
|
|
call BattleFrontier_Lounge3_EventScript_CountSilverSymbols
|
|
goto_if_le VAR_0x8004, 2, BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols
|
|
setflag FLAG_MET_BATTLE_FRONTIER_GAMBLER
|
|
msgbox BattleFrontier_Lounge3_Text_YouLookToughExplainGambling, MSGBOX_DEFAULT
|
|
goto BattleFrontier_Lounge3_EventScript_AskToEnterChallenge
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_AskToEnterChallenge::
|
|
special ShowFrontierGamblerLookingMessage
|
|
waitmessage
|
|
waitbuttonpress
|
|
msgbox BattleFrontier_Lounge3_Text_HowAboutEnteringEventForMe, MSGBOX_YESNO
|
|
goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge3_EventScript_DeclineChallenge
|
|
msgbox BattleFrontier_Lounge3_Text_SpotMeSomeBattlePoints, MSGBOX_YESNO
|
|
goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge3_EventScript_DeclineChallenge
|
|
message BattleFrontier_Lounge3_Text_HowMuchCanYouSpot
|
|
waitmessage
|
|
special ShowBattlePointsWindow
|
|
goto BattleFrontier_Lounge3_EventScript_ChooseBetAmount
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_ChooseBetAmount::
|
|
multichoice 20, 4, MULTI_FRONTIER_GAMBLER_BET, FALSE
|
|
copyvar VAR_FRONTIER_GAMBLER_AMOUNT_BET, VAR_RESULT
|
|
switch VAR_RESULT
|
|
case FRONTIER_GAMBLER_BET_5, BattleFrontier_Lounge3_EventScript_Bet5
|
|
case FRONTIER_GAMBLER_BET_10, BattleFrontier_Lounge3_EventScript_Bet10
|
|
case FRONTIER_GAMBLER_BET_15, BattleFrontier_Lounge3_EventScript_Bet15
|
|
case FRONTIER_GAMBLER_BET_CANCEL, BattleFrontier_Lounge3_EventScript_CancelBet
|
|
case MULTI_B_PRESSED, BattleFrontier_Lounge3_EventScript_CancelBet
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_Bet5::
|
|
setvar VAR_0x8008, BET_AMOUNT_5
|
|
goto BattleFrontier_Lounge3_EventScript_TryPlaceBet
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_Bet10::
|
|
setvar VAR_0x8008, BET_AMOUNT_10
|
|
goto BattleFrontier_Lounge3_EventScript_TryPlaceBet
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_Bet15::
|
|
setvar VAR_0x8008, BET_AMOUNT_15
|
|
goto BattleFrontier_Lounge3_EventScript_TryPlaceBet
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_TryPlaceBet::
|
|
specialvar VAR_TEMP_1, GetFrontierBattlePoints
|
|
goto_if_ge VAR_TEMP_1, VAR_0x8008, BattleFrontier_Lounge3_EventScript_PlaceBet
|
|
msgbox BattleFrontier_Lounge3_Text_YouDontHaveEnoughPoints, MSGBOX_DEFAULT
|
|
message BattleFrontier_Lounge3_Text_HowMuchCanYouSpot
|
|
waitmessage
|
|
goto BattleFrontier_Lounge3_EventScript_ChooseBetAmount
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_PlaceBet::
|
|
copyvar VAR_0x8004, VAR_0x8008
|
|
special TakeFrontierBattlePoints
|
|
setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET
|
|
special UpdateBattlePointsWindow
|
|
playse SE_SHOP
|
|
msgbox BattleFrontier_Lounge3_Text_ThanksOffYouGo, MSGBOX_DEFAULT
|
|
goto BattleFrontier_Lounge3_EventScript_FinishBet
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_FinishBet::
|
|
special ShowFrontierGamblerGoMessage
|
|
waitmessage
|
|
waitbuttonpress
|
|
special CloseBattlePointsWindow
|
|
release
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_CountSilverSymbols::
|
|
setvar VAR_0x8004, 0
|
|
call_if_set FLAG_SYS_TOWER_SILVER, BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount
|
|
call_if_set FLAG_SYS_DOME_SILVER, BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount
|
|
call_if_set FLAG_SYS_PALACE_SILVER, BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount
|
|
call_if_set FLAG_SYS_ARENA_SILVER, BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount
|
|
call_if_set FLAG_SYS_FACTORY_SILVER, BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount
|
|
call_if_set FLAG_SYS_PIKE_SILVER, BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount
|
|
call_if_set FLAG_SYS_PYRAMID_SILVER, BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount
|
|
return
|
|
|
|
BattleFrontier_Lounge3_EventScript_AddSilverSymbolCount::
|
|
addvar VAR_0x8004, 1
|
|
return
|
|
|
|
BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols::
|
|
msgbox BattleFrontier_Lounge3_Text_CantYouSeeWereBusyHere, MSGBOX_DEFAULT
|
|
goto BattleFrontier_Lounge3_EventScript_FaceOriginalDirection
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_AlreadyMetGambler::
|
|
msgbox BattleFrontier_Lounge3_Text_Oh, MSGBOX_DEFAULT
|
|
goto_if_ge VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET, BattleFrontier_Lounge3_EventScript_CheckBetResults
|
|
goto BattleFrontier_Lounge3_EventScript_AskToEnterChallenge
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_CheckBetResults::
|
|
goto_if_eq VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET, BattleFrontier_Lounge3_EventScript_ChallengeNotAttempted
|
|
goto_if_eq VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON, BattleFrontier_Lounge3_EventScript_WonChallenge
|
|
goto BattleFrontier_Lounge3_EventScript_LostChallenge
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_WonChallenge::
|
|
msgbox BattleFrontier_Lounge3_Text_HelloChampHeresYourPoints, MSGBOX_DEFAULT
|
|
call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_5, BattleFrontier_Lounge3_EventScript_RewardBet5
|
|
call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_10, BattleFrontier_Lounge3_EventScript_RewardBet10
|
|
call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15, BattleFrontier_Lounge3_EventScript_RewardBet15
|
|
msgbox BattleFrontier_Lounge3_Text_ObtainedBattlePoints, MSGBOX_GETPOINTS
|
|
special GiveFrontierBattlePoints
|
|
msgbox BattleFrontier_Lounge3_Text_ThinkOfMeForAnotherChallenge, MSGBOX_DEFAULT
|
|
setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WAITING
|
|
release
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_LostChallenge::
|
|
msgbox BattleFrontier_Lounge3_Text_NiceTryCantReturnPoints, MSGBOX_DEFAULT
|
|
setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WAITING
|
|
release
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_RewardBet5::
|
|
buffernumberstring STR_VAR_1, (BET_AMOUNT_5 * 2)
|
|
setvar VAR_0x8004, (BET_AMOUNT_5 * 2)
|
|
return
|
|
|
|
BattleFrontier_Lounge3_EventScript_RewardBet10::
|
|
buffernumberstring STR_VAR_1, (BET_AMOUNT_10 * 2)
|
|
setvar VAR_0x8004, (BET_AMOUNT_10 * 2)
|
|
return
|
|
|
|
BattleFrontier_Lounge3_EventScript_RewardBet15::
|
|
buffernumberstring STR_VAR_1, (BET_AMOUNT_15 * 2)
|
|
setvar VAR_0x8004, (BET_AMOUNT_15 * 2)
|
|
return
|
|
|
|
BattleFrontier_Lounge3_EventScript_ChallengeNotAttempted::
|
|
special ShowFrontierGamblerGoMessage
|
|
waitmessage
|
|
waitbuttonpress
|
|
release
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_DeclineChallenge::
|
|
msgbox BattleFrontier_Lounge3_Text_NotInterested, MSGBOX_DEFAULT
|
|
release
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_CancelBet::
|
|
special CloseBattlePointsWindow
|
|
goto BattleFrontier_Lounge3_EventScript_DeclineChallenge
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_Man::
|
|
msgbox BattleFrontier_Lounge3_Text_ShouldBeTakingChallenges, MSGBOX_NPC
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_Woman::
|
|
lock
|
|
faceplayer
|
|
msgbox BattleFrontier_Lounge3_Text_BackedWrongTrainer, MSGBOX_DEFAULT
|
|
goto BattleFrontier_Lounge3_EventScript_FaceOriginalDirection
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_PokefanF::
|
|
lock
|
|
faceplayer
|
|
msgbox BattleFrontier_Lounge3_Text_KnowWinnerWhenISeeOne, MSGBOX_DEFAULT
|
|
goto BattleFrontier_Lounge3_EventScript_FaceOriginalDirection
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_FatMan::
|
|
lock
|
|
faceplayer
|
|
msgbox BattleFrontier_Lounge3_Text_TrainerGoodButRattled, MSGBOX_DEFAULT
|
|
goto BattleFrontier_Lounge3_EventScript_FaceOriginalDirection
|
|
end
|
|
|
|
BattleFrontier_Lounge3_EventScript_FaceOriginalDirection::
|
|
closemessage
|
|
applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
|
|
waitmovement 0
|
|
release
|
|
end
|
|
|
|
.ifdef FRENCH
|
|
.include "data/maps/BattleFrontier_Lounge3/text_fr.inc"
|
|
.else
|
|
.ifdef ITALIAN
|
|
.include "data/maps/BattleFrontier_Lounge3/text_it.inc"
|
|
.else
|
|
.ifdef SPANISH
|
|
.include "data/maps/BattleFrontier_Lounge3/text_es.inc"
|
|
.else
|
|
.include "data/maps/BattleFrontier_Lounge3/text.inc"
|
|
.endif
|
|
.endif
|
|
.endif
|