From adf039fe12e936dfd2772419fa9c4ac8e45e37e1 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 4 Jan 2021 07:41:56 -0300 Subject: [PATCH] Made BufferStatRoseMessage print an extra string if B_X_ITEMS_BUFF == GEN_7 Also turned sText_StatSharply into gText_StatSharply. --- include/battle_message.h | 1 + src/battle_message.c | 4 ++-- src/pokemon.c | 11 ++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/battle_message.h b/include/battle_message.h index 06f030860..900c3b1eb 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -286,6 +286,7 @@ extern const u8 gText_BattleWallyName[]; extern const u8 gText_Win[]; extern const u8 gText_Loss[]; extern const u8 gText_Draw[]; +extern const u8 gText_StatSharply[]; extern const u8 gText_StatRose[]; extern const u8 gText_PkmnsStatChanged2[]; extern const u8 gText_PkmnGettingPumped[]; diff --git a/src/battle_message.c b/src/battle_message.c index 35ccc6e26..a6c04fc0d 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -305,7 +305,7 @@ static const u8 sText_PkmnsXPreventsFlinching[] = _("{B_EFF_NAME_WITH_PREFIX}'s static const u8 sText_PkmnsXPreventsYsZ[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nprevents {B_DEF_NAME_WITH_PREFIX}'s\l{B_DEF_ABILITY} from working!"); static const u8 sText_PkmnsXCuredItsYProblem[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\ncured its {B_BUFF1} problem!"); static const u8 sText_PkmnsXHadNoEffectOnY[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nhad no effect on {B_EFF_NAME_WITH_PREFIX}!"); -static const u8 sText_StatSharply[] = _("sharply "); +const u8 gText_StatSharply[] = _("sharply "); const u8 gText_StatRose[] = _("rose!"); static const u8 sText_StatHarshly[] = _("harshly "); static const u8 sText_StatFell[] = _("fell!"); @@ -914,7 +914,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_PKMNPREVENTSSTATLOSSWITH - 12] = sText_PkmnPreventsStatLossWith, [STRINGID_PKMNHURTSWITH - 12] = sText_PkmnHurtsWith, [STRINGID_PKMNTRACED - 12] = sText_PkmnTraced, - [STRINGID_STATSHARPLY - 12] = sText_StatSharply, + [STRINGID_STATSHARPLY - 12] = gText_StatSharply, [STRINGID_STATROSE - 12] = gText_StatRose, [STRINGID_STATHARSHLY - 12] = sText_StatHarshly, [STRINGID_STATFELL - 12] = sText_StatFell, diff --git a/src/pokemon.c b/src/pokemon.c index 8985ef465..4fe8464c9 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5119,7 +5119,16 @@ static void BufferStatRoseMessage(s32 arg0) { gBattlerTarget = gBattlerInMenuId; StringCopy(gBattleTextBuff1, gStatNamesTable[sStatsToRaise[arg0]]); - StringCopy(gBattleTextBuff2, gText_StatRose); + if (B_X_ITEMS_BUFF == GEN_7) + { + StringCopy(gBattleTextBuff2, gText_EmptyString3); + StringAppend(gBattleTextBuff2, gText_StatSharply); + StringAppend(gBattleTextBuff2, gText_StatRose); + } + else + { + StringCopy(gBattleTextBuff2, gText_StatRose); + } BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnsStatChanged2); }