diff --git a/data/maps/BattleFrontier_ExchangeServiceCorner/map.json b/data/maps/BattleFrontier_ExchangeServiceCorner/map.json index c27134543c..47e0ef0017 100755 --- a/data/maps/BattleFrontier_ExchangeServiceCorner/map.json +++ b/data/maps/BattleFrontier_ExchangeServiceCorner/map.json @@ -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, diff --git a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc index 00c71f5833..ff249824b0 100755 --- a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc +++ b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc @@ -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 diff --git a/data/specials.inc b/data/specials.inc index d6f150b28b..7d333a641f 100755 --- a/data/specials.inc +++ b/data/specials.inc @@ -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 diff --git a/include/shop.h b/include/shop.h index 9a47a6c25f..c695d20441 100755 --- a/include/shop.h +++ b/include/shop.h @@ -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 diff --git a/include/strings.h b/include/strings.h index 73f2a3c3e4..dd7fff10a3 100755 --- a/include/strings.h +++ b/include/strings.h @@ -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[]; diff --git a/src/data/battle_frontier/battle_frontier_exchange_corner.h b/src/data/battle_frontier/battle_frontier_exchange_corner.h index 5bc3fa4392..b3065dabef 100755 --- a/src/data/battle_frontier/battle_frontier_exchange_corner.h +++ b/src/data/battle_frontier/battle_frontier_exchange_corner.h @@ -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 }, +}; diff --git a/src/shop.c b/src/shop.c index 2c01990fae..45924c8df5 100755 --- a/src/shop.c +++ b/src/shop.c @@ -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); } @@ -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); } @@ -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); @@ -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); } diff --git a/src/strings.c b/src/strings.c index eabdfb9122..228c5858a5 100755 --- a/src/strings.c +++ b/src/strings.c @@ -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.");