diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index dd6af61e5..dc0a1900e 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2581,6 +2581,18 @@ BattleScript_AromaVeilProtects: orhalfword gMoveResultFlags, MOVE_RESULT_FAILED goto BattleScript_MoveEnd +BattleScript_PastelVeilProtectsRet:: + pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUp + printstring STRINGID_PASTELVEILPROTECTED + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_PastelVeilProtects: + call BattleScript_PastelVeilProtectsRet + orhalfword gMoveResultFlags, MOVE_RESULT_FAILED + goto BattleScript_MoveEnd + BattleScript_LeafGuardProtectsRet:: pause B_WAIT_TIME_SHORT call BattleScript_AbilityPopUp @@ -3053,6 +3065,7 @@ BattleScript_EffectToxic:: ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects + jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguard BattleScript_LeafGuardProtects jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects @@ -3080,6 +3093,7 @@ BattleScript_AlreadyPoisoned:: BattleScript_ImmunityProtected:: copybyte gEffectBattler, gBattlerTarget + call BattleScript_AbilityPopUp setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_PSNPrevention goto BattleScript_MoveEnd @@ -3408,6 +3422,7 @@ BattleScript_EffectPoison:: ppreduce jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects + jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects jumpifflowerveil BattleScript_FlowerVeilProtects jumpifleafguard BattleScript_LeafGuardProtects jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 1d461e2a0..a84f0ff34 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -597,8 +597,9 @@ #define STRINGID_BUTPOKEMONCANTUSETHEMOVE 594 #define STRINGID_BUTHOOPACANTUSEIT 595 #define STRINGID_BROKETHROUGHPROTECTION 596 +#define STRINGID_PASTELVEILPROTECTED 597 -#define BATTLESTRINGS_COUNT 597 +#define BATTLESTRINGS_COUNT 598 // The below IDs are all indexes into battle message tables, // used to determine which of a set of messages to print. diff --git a/src/battle_message.c b/src/battle_message.c index f26726a69..f6569f039 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -723,9 +723,11 @@ static const u8 sText_PkmnRevertedToPrimal[] = _("{B_ATK_NAME_WITH_PREFIX}'s Pri static const u8 sText_ButPokemonCantUseTheMove[] = _("But {B_ATK_NAME_WITH_PREFIX} can't\nuse the move!"); static const u8 sText_ButHoopaCantUseIt[] = _("But Hoopa can't use it\nthe way it is now!"); static const u8 sText_BrokeThroughProtection[] = _("It broke through the\n{B_DEF_NAME_WITH_PREFIX}'s protection!"); +static const u8 sText_PastelVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is protected\nby a pastel veil!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_PASTELVEILPROTECTED -12] = sText_PastelVeilProtected, [STRINGID_BROKETHROUGHPROTECTION - 12] = sText_BrokeThroughProtection, [STRINGID_BUTPOKEMONCANTUSETHEMOVE - 12] = sText_ButPokemonCantUseTheMove, [STRINGID_BUTHOOPACANTUSEIT - 12] = sText_ButHoopaCantUseIt,