mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-25 07:29:01 -05:00
document sunyshore market scripts (#696)
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
This commit is contained in:
commit
8b631e7324
|
|
@ -3145,10 +3145,10 @@
|
|||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_233 arg0, arg1
|
||||
.macro GetPartyMonEVTotal destVar, partySlot
|
||||
.short 563
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
.short \destVar
|
||||
.short \partySlot
|
||||
.endm
|
||||
|
||||
.macro GetDayOfWeek destVarID
|
||||
|
|
|
|||
|
|
@ -1,158 +1,159 @@
|
|||
#include "macros/scrcmd.inc"
|
||||
#include "res/text/bank/sunyshore_market.h"
|
||||
#include "generated/ribbons.h"
|
||||
#include "constants/pokemon.h"
|
||||
|
||||
|
||||
ScriptEntry _001A
|
||||
ScriptEntry _0096
|
||||
ScriptEntry _00A9
|
||||
ScriptEntry _0175
|
||||
ScriptEntry _0018
|
||||
ScriptEntry _01D4
|
||||
ScriptEntry SunyshoreMarket_EffortRibbonWoman
|
||||
ScriptEntry SunyshoreMarket_Sailor
|
||||
ScriptEntry SunyshoreMarket_SealShop
|
||||
ScriptEntry SunyshoreMarket_PokefanM
|
||||
ScriptEntry SunyshoreMarket_Dummy
|
||||
ScriptEntry SunyshoreMarket_BattleGirl
|
||||
|
||||
_0018:
|
||||
SunyshoreMarket_Dummy:
|
||||
End
|
||||
|
||||
_001A:
|
||||
SunyshoreMarket_EffortRibbonWoman:
|
||||
PlayFanfare SEQ_SE_CONFIRM
|
||||
LockAll
|
||||
FacePlayer
|
||||
GetFirstNonEggInParty VAR_0x8000
|
||||
GetPartyMonRibbon VAR_RESULT, VAR_0x8000, RIBBON_HOENN_EFFORT
|
||||
GoToIfEq VAR_RESULT, 1, _0086
|
||||
GoToIfEq VAR_RESULT, TRUE, SunyshoreMarket_PokemonAlreadyHasEffortRibbon
|
||||
BufferPartyMonSpecies 0, VAR_0x8000
|
||||
Message 0
|
||||
ScrCmd_233 VAR_RESULT, VAR_0x8000
|
||||
GoToIfLt VAR_RESULT, 0x1FE, _007B
|
||||
Message 1
|
||||
Message SunyshoreMarket_Text_OhYourPokemon
|
||||
GetPartyMonEVTotal VAR_RESULT, VAR_0x8000
|
||||
GoToIfLt VAR_RESULT, MAX_EVS_ALL_STATS, SunyshoreMarket_NotEnoughEVs
|
||||
Message SunyshoreMarket_Text_ItWorkedStupendouslyHard
|
||||
SetPartyMonRibbon VAR_0x8000, RIBBON_HOENN_EFFORT
|
||||
PlaySound SEQ_FANFA1
|
||||
BufferPlayerName 1
|
||||
Message 2
|
||||
Message SunyshoreMarket_Text_PlayerReceivedEffortRibbon
|
||||
WaitSound
|
||||
BufferPartyMonSpecies 0, VAR_0x8000
|
||||
Message 3
|
||||
Message SunyshoreMarket_Text_PlayerPutEffortRibbonOn
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_007B:
|
||||
Message 4
|
||||
SunyshoreMarket_NotEnoughEVs:
|
||||
Message SunyshoreMarket_Text_ItNeedsToWorkHarder
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_0086:
|
||||
SunyshoreMarket_PokemonAlreadyHasEffortRibbon:
|
||||
BufferPartyMonSpecies 0, VAR_0x8000
|
||||
Message 5
|
||||
Message SunyshoreMarket_Text_EffortRibbonLooksGood
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_0096:
|
||||
SunyshoreMarket_Sailor:
|
||||
PlayFanfare SEQ_SE_CONFIRM
|
||||
LockAll
|
||||
FacePlayer
|
||||
Message 6
|
||||
Message SunyshoreMarket_Text_BestKnownForSeals
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_00A9:
|
||||
SunyshoreMarket_SealShop:
|
||||
PlayFanfare SEQ_SE_CONFIRM
|
||||
LockAll
|
||||
FacePlayer
|
||||
CheckItem ITEM_SEAL_CASE, 1, VAR_RESULT
|
||||
GoToIfEq VAR_RESULT, 0, _00D9
|
||||
Message 7
|
||||
GoToIfEq VAR_RESULT, FALSE, SunyshoreMarket_NoSealCase
|
||||
Message SunyshoreMarket_Text_ALittleTimeIfYouWill
|
||||
CallCommonScript 0x7E3
|
||||
CloseMessageWithoutErasing
|
||||
Call _00E4
|
||||
Call SunyshoreMarket_OpenSealShopMenu
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_00D9:
|
||||
Message 8
|
||||
SunyshoreMarket_NoSealCase:
|
||||
Message SunyshoreMarket_Text_NoSealCase
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_00E4:
|
||||
SunyshoreMarket_OpenSealShopMenu:
|
||||
GetDayOfWeek VAR_RESULT
|
||||
SetVar VAR_0x8008, VAR_RESULT
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_SUNDAY, _016F
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_MONDAY, _014B
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_TUESDAY, _0151
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_WEDNESDAY, _0157
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_THURSDAY, _015D
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_FRIDAY, _0163
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_SATURDAY, _0169
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_SUNDAY, SunyshoreMarket_SealShopSunday
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_MONDAY, SunyshoreMarket_SealShopMonday
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_TUESDAY, SunyshoreMarket_SealShopTuesday
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_WEDNESDAY, SunyshoreMarket_SealShopWednesday
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_THURSDAY, SunyshoreMarket_SealShopThursday
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_FRIDAY, SunyshoreMarket_SealShopFriday
|
||||
GoToIfEq VAR_0x8008, DAY_OF_WEEK_SATURDAY, SunyshoreMarket_SealShopSaturday
|
||||
End
|
||||
|
||||
_014B:
|
||||
SunyshoreMarket_SealShopMonday:
|
||||
PokeMartSeal MART_SEAL_ID_SUNYSHORE_MONDAY
|
||||
Return
|
||||
|
||||
_0151:
|
||||
SunyshoreMarket_SealShopTuesday:
|
||||
PokeMartSeal MART_SEAL_ID_SUNYSHORE_TUESDAY
|
||||
Return
|
||||
|
||||
_0157:
|
||||
SunyshoreMarket_SealShopWednesday:
|
||||
PokeMartSeal MART_SEAL_ID_SUNYSHORE_WEDNESDAY
|
||||
Return
|
||||
|
||||
_015D:
|
||||
SunyshoreMarket_SealShopThursday:
|
||||
PokeMartSeal MART_SEAL_ID_SUNYSHORE_THURSDAY
|
||||
Return
|
||||
|
||||
_0163:
|
||||
SunyshoreMarket_SealShopFriday:
|
||||
PokeMartSeal MART_SEAL_ID_SUNYSHORE_FRIDAY
|
||||
Return
|
||||
|
||||
_0169:
|
||||
SunyshoreMarket_SealShopSaturday:
|
||||
PokeMartSeal MART_SEAL_ID_SUNYSHORE_SATURDAY
|
||||
Return
|
||||
|
||||
_016F:
|
||||
SunyshoreMarket_SealShopSunday:
|
||||
PokeMartSeal MART_SEAL_ID_SUNYSHORE_SUNDAY
|
||||
Return
|
||||
|
||||
_0175:
|
||||
SunyshoreMarket_PokefanM:
|
||||
PlayFanfare SEQ_SE_CONFIRM
|
||||
LockAll
|
||||
FacePlayer
|
||||
Message 9
|
||||
Message SunyshoreMarket_Text_SeeTheSealMerchant
|
||||
GetDayOfWeek VAR_MAP_LOCAL_0
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_SUNDAY, _01BE
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_MONDAY, _01BE
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_TUESDAY, _01BE
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_WEDNESDAY, _01BE
|
||||
GoTo _01C9
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_SUNDAY, SunyshoreMarket_PokefanM_FirstWeekHalfMessage
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_MONDAY, SunyshoreMarket_PokefanM_FirstWeekHalfMessage
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_TUESDAY, SunyshoreMarket_PokefanM_FirstWeekHalfMessage
|
||||
GoToIfEq VAR_MAP_LOCAL_0, DAY_OF_WEEK_WEDNESDAY, SunyshoreMarket_PokefanM_FirstWeekHalfMessage
|
||||
GoTo SunyshoreMarket_PokefanM_SecondWeekHalfMessage
|
||||
|
||||
_01BE:
|
||||
Message 10
|
||||
SunyshoreMarket_PokefanM_FirstWeekHalfMessage:
|
||||
Message SunyshoreMarket_Text_DidntHaveSeals
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_01C9:
|
||||
Message 11
|
||||
SunyshoreMarket_PokefanM_SecondWeekHalfMessage:
|
||||
Message SunyshoreMarket_Text_CameThroughWithDifferentSeals
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
End
|
||||
|
||||
_01D4:
|
||||
SunyshoreMarket_BattleGirl:
|
||||
PlayFanfare SEQ_SE_CONFIRM
|
||||
LockAll
|
||||
FacePlayer
|
||||
Message 12
|
||||
Message SunyshoreMarket_Text_HugeFanOfWiFiPlaza
|
||||
WaitABXPadPress
|
||||
CloseMessage
|
||||
ReleaseAll
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
"key": 54275,
|
||||
"messages": [
|
||||
{
|
||||
"id": "pl_msg_00000167_00000",
|
||||
"id": "SunyshoreMarket_Text_OhYourPokemon",
|
||||
"en_US": [
|
||||
"Oh?\n",
|
||||
"Your {STRVAR_1 0, 0, 0}...\r"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00001",
|
||||
"id": "SunyshoreMarket_Text_ItWorkedStupendouslyHard",
|
||||
"en_US": [
|
||||
"It worked stupendously hard,\n",
|
||||
"didn’t it?\r",
|
||||
|
|
@ -18,21 +18,21 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00002",
|
||||
"id": "SunyshoreMarket_Text_PlayerReceivedEffortRibbon",
|
||||
"en_US": [
|
||||
"{STRVAR_1 3, 1, 0} received\n",
|
||||
"the Effort Ribbon.\r"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00003",
|
||||
"id": "SunyshoreMarket_Text_PlayerPutEffortRibbonOn",
|
||||
"en_US": [
|
||||
"{STRVAR_1 3, 1, 0} put the Effort Ribbon\n",
|
||||
"on {STRVAR_1 0, 0, 0}."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00004",
|
||||
"id": "SunyshoreMarket_Text_ItNeedsToWorkHarder",
|
||||
"en_US": [
|
||||
"It needs to work a little harder.\r",
|
||||
"If it does, I’ll give your Pokémon\n",
|
||||
|
|
@ -40,28 +40,28 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00005",
|
||||
"id": "SunyshoreMarket_Text_EffortRibbonLooksGood",
|
||||
"en_US": [
|
||||
"Oh! That Effort Ribbon looks \n",
|
||||
"good on your {STRVAR_1 0, 0, 0}!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00006",
|
||||
"id": "SunyshoreMarket_Text_BestKnownForSeals",
|
||||
"en_US": [
|
||||
"Sunyshore Market is best known for\n",
|
||||
"its big selection of Seals."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00007",
|
||||
"id": "SunyshoreMarket_Text_ALittleTimeIfYouWill",
|
||||
"en_US": [
|
||||
"Ah, please, allow me a little of your\n",
|
||||
"time, if you will. You won’t regret it.\r"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00008",
|
||||
"id": "SunyshoreMarket_Text_NoSealCase",
|
||||
"en_US": [
|
||||
"Ah, please, allow me a little of your\n",
|
||||
"time, if you will. You won’t regret it.\r",
|
||||
|
|
@ -72,25 +72,25 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00009",
|
||||
"id": "SunyshoreMarket_Text_SeeTheSealMerchant",
|
||||
"en_US": "See the Seal Merchant there?\r"
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00010",
|
||||
"id": "SunyshoreMarket_Text_DidntHaveSeals",
|
||||
"en_US": [
|
||||
"He didn’t have any Seals I wanted...\n",
|
||||
"Maybe tomorrow, I guess."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00011",
|
||||
"id": "SunyshoreMarket_Text_CameThroughWithDifferentSeals",
|
||||
"en_US": [
|
||||
"He came through with different Seals\n",
|
||||
"today! Just what I wanted to see!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pl_msg_00000167_00012",
|
||||
"id": "SunyshoreMarket_Text_HugeFanOfWiFiPlaza",
|
||||
"en_US": [
|
||||
"I love Tap Toys!\n",
|
||||
"Plaza Games are great, too!\r",
|
||||
|
|
|
|||
28
src/scrcmd.c
28
src/scrcmd.c
|
|
@ -616,7 +616,7 @@ static BOOL ScrCmd_FinishNpcTrade(ScriptContext *ctx);
|
|||
static BOOL ScrCmd_22B(ScriptContext *ctx);
|
||||
static BOOL ScrCmd_22C(ScriptContext *ctx);
|
||||
static BOOL ScrCmd_GetSetNationalDexEnabled(ScriptContext *ctx);
|
||||
static BOOL ScrCmd_233(ScriptContext *ctx);
|
||||
static BOOL ScrCmd_GetPartyMonEVTotal(ScriptContext *ctx);
|
||||
static BOOL ScrCmd_GetDayOfWeek(ScriptContext *ctx);
|
||||
static BOOL ScrCmd_239(ScriptContext *ctx);
|
||||
static BOOL ScrCmd_GetSpeciesFootprintType(ScriptContext *ctx);
|
||||
|
|
@ -1333,7 +1333,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
|||
ScrCmd_GetPartyMonRibbon,
|
||||
ScrCmd_SetPartyMonRibbon,
|
||||
ScrCmd_232,
|
||||
ScrCmd_233,
|
||||
ScrCmd_GetPartyMonEVTotal,
|
||||
ScrCmd_GetDayOfWeek,
|
||||
ScrCmd_235,
|
||||
ScrCmd_236,
|
||||
|
|
@ -6333,21 +6333,21 @@ static BOOL ScrCmd_GetSetNationalDexEnabled(ScriptContext *ctx)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL ScrCmd_233(ScriptContext *ctx)
|
||||
static BOOL ScrCmd_GetPartyMonEVTotal(ScriptContext *ctx)
|
||||
{
|
||||
u16 *v1 = ScriptContext_GetVarPointer(ctx);
|
||||
u16 v2 = ScriptContext_GetVar(ctx);
|
||||
u32 v3[7];
|
||||
u16 *destVar = ScriptContext_GetVarPointer(ctx);
|
||||
u16 slot = ScriptContext_GetVar(ctx);
|
||||
u32 evs[STAT_MAX];
|
||||
|
||||
Pokemon *mon = Party_GetPokemonBySlotIndex(SaveData_GetParty(ctx->fieldSystem->saveData), v2);
|
||||
Pokemon *mon = Party_GetPokemonBySlotIndex(SaveData_GetParty(ctx->fieldSystem->saveData), slot);
|
||||
|
||||
v3[0] = Pokemon_GetValue(mon, MON_DATA_HP_EV, NULL);
|
||||
v3[1] = Pokemon_GetValue(mon, MON_DATA_ATK_EV, NULL);
|
||||
v3[2] = Pokemon_GetValue(mon, MON_DATA_DEF_EV, NULL);
|
||||
v3[3] = Pokemon_GetValue(mon, MON_DATA_SPEED_EV, NULL);
|
||||
v3[4] = Pokemon_GetValue(mon, MON_DATA_SPATK_EV, NULL);
|
||||
v3[5] = Pokemon_GetValue(mon, MON_DATA_SPDEF_EV, NULL);
|
||||
*v1 = (v3[0] + v3[1] + v3[2] + v3[3] + v3[4] + v3[5]);
|
||||
evs[STAT_HP] = Pokemon_GetValue(mon, MON_DATA_HP_EV, NULL);
|
||||
evs[STAT_ATTACK] = Pokemon_GetValue(mon, MON_DATA_ATK_EV, NULL);
|
||||
evs[STAT_DEFENSE] = Pokemon_GetValue(mon, MON_DATA_DEF_EV, NULL);
|
||||
evs[STAT_SPEED] = Pokemon_GetValue(mon, MON_DATA_SPEED_EV, NULL);
|
||||
evs[STAT_SPECIAL_ATTACK] = Pokemon_GetValue(mon, MON_DATA_SPATK_EV, NULL);
|
||||
evs[STAT_SPECIAL_DEFENSE] = Pokemon_GetValue(mon, MON_DATA_SPDEF_EV, NULL);
|
||||
*destVar = evs[STAT_HP] + evs[STAT_ATTACK] + evs[STAT_DEFENSE] + evs[STAT_SPEED] + evs[STAT_SPECIAL_ATTACK] + evs[STAT_SPECIAL_DEFENSE];
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user