Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions data/maps/BattleFrontier_ExchangeServiceCorner/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@
"script": "BattleFrontier_ExchangeServiceCorner_EventScript_DecorClerk2",
"flag": "0"
},
{
"graphics_id": "OBJ_EVENT_GFX_WORKER_F",
"x": 7,
"y": 5,
"elevation": 0,
"movement_type": "MOVEMENT_TYPE_FACE_DOWN",
"movement_range_x": 0,
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "BattleFrontier_ExchangeServiceCorner_EventScript_PokeBallClerk",
"flag": "0"
},
{
"graphics_id": "OBJ_EVENT_GFX_WORKER_F",
"x": 9,
Expand Down
9 changes: 9 additions & 0 deletions data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ BattleFrontier_ExchangeServiceCorner_EventScript_HoldItemClerk::
release
end

BattleFrontier_ExchangeServiceCorner_EventScript_PokeBallClerk::
lock
faceplayer
msgbox BattleFrontier_ExchangeServiceCorner_Text_WelcomePleaseChoosePrize, MSGBOX_DEFAULT
special CreateBPPokeBallShop
waitstate
release
end

BattleFrontier_ExchangeServiceCorner_EventScript_Man::
msgbox BattleFrontier_ExchangeServiceCorner_Text_GoGetYourOwnDoll, MSGBOX_NPC
end
Expand Down
1 change: 1 addition & 0 deletions data/specials.inc
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ gSpecials::
def_special CreateBPHoldItemShop
def_special CreateBPDecorShop1
def_special CreateBPDecorShop2
def_special CreateBPPokeBallShop
def_special DisplayBerryPowderVendorMenu
def_special RemoveBerryPowderVendorMenu
def_special HasEnoughBerryPowder
Expand Down
1 change: 1 addition & 0 deletions include/shop.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ void CreateBPVitaminShop(void); // multi-buy vitamins
void CreateBPHoldItemShop(void); // single-buy held items
void CreateBPDecorShop1(void); // single-buy small dolls
void CreateBPDecorShop2(void); // single-buy large dolls
void CreateBPPokeBallShop(void); // multi-buy Poké Balls

#endif // GUARD_SHOP_H
1 change: 1 addition & 0 deletions include/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,7 @@ extern const u8 gText_YouWantedVar1ThatllBeVar2[];
extern const u8 gText_YouWantedVar1ThatllBeVar2BP[];
extern const u8 gText_InBagVar1[];
extern const u8 gText_Var1AndYouWantedVar2[];
extern const u8 gText_Var1AndYouWantedVar2BP[];
extern const u8 gText_HereYouGoThankYou[];
extern const u8 gText_NoMoreRoomForThis[];
extern const u8 gText_YouAlreadyHaveThis[];
Expand Down
9 changes: 9 additions & 0 deletions src/data/battle_frontier/battle_frontier_exchange_corner.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,12 @@ static const struct BPShopEntry sBPDecor2ShopEntries[] = {
{ ITEM_NONE, 0 },
};

static const struct BPShopEntry sBPPokeBallShopEntries[] = {
{ ITEM_NET_BALL, 1 },
{ ITEM_DIVE_BALL, 1 },
{ ITEM_NEST_BALL, 1 },
{ ITEM_REPEAT_BALL, 1 },
{ ITEM_TIMER_BALL, 1 },
{ ITEM_LUXURY_BALL, 1 },
{ ITEM_NONE, 0 },
};
15 changes: 6 additions & 9 deletions src/shop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,6 @@ static void Task_BuyMenu(u8 taskId)
tItemCount = 1;
CopyItemName(itemId, gStringVar1);
ptr = ConvertIntToDecimalStringN(gStringVar2, sShopData->totalCost, STR_CONV_MODE_LEFT_ALIGN, 4);
StringCopy(ptr, gText_BP);
StringExpandPlaceholders(gStringVar4, gText_YouWantedVar1ThatllBeVar2BP);
BuyMenuDisplayMessage(taskId, gStringVar4, BuyMenuConfirmPurchase);
}
Expand All @@ -1834,7 +1833,6 @@ static void Task_BuyMenu(u8 taskId)
tItemCount = 1;
StringCopy(gStringVar1, gDecorations[itemId].name);
ptr = ConvertIntToDecimalStringN(gStringVar2, sShopData->totalCost, STR_CONV_MODE_LEFT_ALIGN, 4);
StringCopy(ptr, gText_BP);
StringExpandPlaceholders(gStringVar4, gText_YouWantedVar1ThatllBeVar2BP);
BuyMenuDisplayMessage(taskId, gStringVar4, BuyMenuConfirmPurchase);
}
Expand Down Expand Up @@ -1994,9 +1992,7 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
}
else if (sMartInfo.martType == MART_TYPE_BP)
{
// Append "BP" to the cost string shown in the confirm message
StringCopy(gStringVar3 + StringLength(gStringVar3), gText_BP);
BuyMenuDisplayMessage(taskId, gText_Var1AndYouWantedVar2, BuyMenuConfirmPurchase);
BuyMenuDisplayMessage(taskId, gText_Var1AndYouWantedVar2BP, BuyMenuConfirmPurchase);
}
else
BuyMenuDisplayMessage(taskId, gText_Var1AndYouWantedVar2, BuyMenuConfirmPurchase);
Expand Down Expand Up @@ -2417,7 +2413,8 @@ static void CreateBPShopCommon(u8 martType, const struct BPShopEntry *entries)
FadeScreen(FADE_TO_BLACK, 0);
}

void CreateBPVitaminShop(void) { CreateBPShopCommon(MART_TYPE_BP, sBPVitaminShopEntries); }
void CreateBPHoldItemShop(void) { CreateBPShopCommon(MART_TYPE_BP_ITEM, sBPHoldItemShopEntries); }
void CreateBPDecorShop1(void) { CreateBPShopCommon(MART_TYPE_BP_DECOR, sBPDecor1ShopEntries); }
void CreateBPDecorShop2(void) { CreateBPShopCommon(MART_TYPE_BP_DECOR, sBPDecor2ShopEntries); }
void CreateBPVitaminShop(void) { CreateBPShopCommon(MART_TYPE_BP, sBPVitaminShopEntries); }
void CreateBPHoldItemShop(void) { CreateBPShopCommon(MART_TYPE_BP_ITEM, sBPHoldItemShopEntries); }
void CreateBPDecorShop1(void) { CreateBPShopCommon(MART_TYPE_BP_DECOR, sBPDecor1ShopEntries); }
void CreateBPDecorShop2(void) { CreateBPShopCommon(MART_TYPE_BP_DECOR, sBPDecor2ShopEntries); }
void CreateBPPokeBallShop(void) { CreateBPShopCommon(MART_TYPE_BP, sBPPokeBallShopEntries); }
3 changes: 2 additions & 1 deletion src/strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,10 @@ const u8 gText_QuitShopping[] = _("Quit shopping.");
const u8 gText_Var1CertainlyHowMany[] = _("{STR_VAR_1}? Certainly.\nHow many would you like?");
const u8 gText_Var1CertainlyHowMany2[] = _("{STR_VAR_1}? Certainly.\nHow many would you like?");
const u8 gText_Var1AndYouWantedVar2[] = _("{STR_VAR_1}? And you wanted {STR_VAR_2}?\nThat will be ¥{STR_VAR_3}.");
const u8 gText_Var1AndYouWantedVar2BP[] = _("{STR_VAR_1}? And you wanted {STR_VAR_2}?\nThat will be {STR_VAR_3}BP.");
const u8 gText_Var1IsItThatllBeVar2[] = _("{STR_VAR_1}, is it?\nThat'll be ¥{STR_VAR_2}. Do you want it?");
const u8 gText_YouWantedVar1ThatllBeVar2[] = _("You wanted {STR_VAR_1}?\nThat'll be ¥{STR_VAR_2}. Will that be okay?");
const u8 gText_YouWantedVar1ThatllBeVar2BP[] = _("You wanted {STR_VAR_1}?\nThat'll be {STR_VAR_2}. Will that be okay?");
const u8 gText_YouWantedVar1ThatllBeVar2BP[] = _("You wanted {STR_VAR_1}?\nThat'll be {STR_VAR_2}BP. Will that be okay?");
const u8 gText_HereYouGoThankYou[] = _("Here you go!\nThank you very much.");
const u8 gText_ThankYouIllSendItHome[] = _("Thank you!\nI'll send it to your home PC.");
const u8 gText_ThanksIllSendItHome[] = _("Thanks!\nI'll send it to your PC at home.");
Expand Down