From e179b9b5fea61afb496be256fad039973259ae64 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 10 Nov 2020 10:18:16 -0300 Subject: [PATCH 1/3] Updated Intimidate to Gen. 8 standard --- data/battle_scripts_1.s | 6 ++++++ include/constants/battle_config.h | 1 + 2 files changed, 7 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index de84e2411f..fbad1db5ea 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6756,6 +6756,12 @@ BattleScript_IntimidateActivatesLoop: jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented +#if B_EXPANDED_INTIMIDATE >= GEN_8 + jumpifability BS_TARGET, ABILITY_INNER_FOCUS, BattleScript_IntimidatePrevented + jumpifability BS_TARGET, ABILITY_SCRAPPY, BattleScript_IntimidatePrevented + jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_IntimidatePrevented + jumpifability BS_TARGET, ABILITY_OBLIVIOUS, BattleScript_IntimidatePrevented +#endif statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | STAT_BUFF_ALLOW_PTR, BattleScript_IntimidateActivatesLoopIncrement jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_IntimidateActivatesLoopIncrement setgraphicalstatchangevalues diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 9fcff614a9..19ea0a0280 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -106,6 +106,7 @@ #define B_MOODY_ACC_EVASION GEN_6 // In Gen8+, Moody CANNOT raise Accuray and Evasion any more. #define B_FLASH_FIRE_FROZEN GEN_6 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before. #define B_SYNCHRONIZE_NATURE GEN_6 // In Gen8+, if the Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same ability, as opposed to 50% previously. +#define B_EXPANDED_INTIMIDATE GEN_8 // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities. // Item settings #define B_HP_BERRIES GEN_6 // In Gen4+, berries which restore hp activate immediately after hp drops to half. In gen3, the effect occurs at the end of the turn. From a25190f35773a1f2d90e98d0755ef2efa1b7ea92 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 10 Nov 2020 10:34:51 -0300 Subject: [PATCH 2/3] A few things. -Introduced a Gen. 8 styled text string for Intimidate -Added an ability popup to BattleScript_IntimidatePrevented --- data/battle_scripts_1.s | 5 ++++- include/constants/battle_string_ids.h | 3 ++- src/battle_message.c | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index fbad1db5ea..1fa38f04fb 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6776,7 +6776,10 @@ BattleScript_IntimidateActivatesReturn: return BattleScript_IntimidatePrevented: pause 0x20 - printstring STRINGID_PREVENTEDFROMWORKING + call BattleScript_AbilityPopUp + setbyte gBattleCommunication STAT_ATK + stattextbuffer BS_ATTACKER + printstring STRINGID_STATWASNOTLOWERED waitmessage 0x40 call BattleScript_TryAdrenalineOrb goto BattleScript_IntimidateActivatesLoopIncrement diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 2f66f97f91..3406621111 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -549,7 +549,8 @@ #define STRINGID_NOONEWILLBEABLETORUNAWAY 545 #define STRINGID_DESTINYKNOTACTIVATES 546 #define STRINGID_CLOAKEDINAFREEZINGLIGHT 547 +#define STRINGID_STATWASNOTLOWERED 548 -#define BATTLESTRINGS_COUNT 548 +#define BATTLESTRINGS_COUNT 549 #endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H diff --git a/src/battle_message.c b/src/battle_message.c index 7e0b501b36..22697772bd 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -676,9 +676,11 @@ static const u8 sText_PkmnAbsorbingPower[] = _("{B_ATK_NAME_WITH_PREFIX} is abso static const u8 sText_NoOneWillBeAbleToRun[] = _("No one will be able to run away\nduring the next turn!"); static const u8 sText_DestinyKnotActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} fell in love\nfrom the {B_LAST_ITEM}!"); static const u8 sText_CloakedInAFreezingLight[] = _("{B_ATK_NAME_WITH_PREFIX} became cloaked\nin a freezing light!"); +static const u8 sText_StatWasNotLowered[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwas not lowered!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_STATWASNOTLOWERED - 12] = sText_StatWasNotLowered, [STRINGID_CLOAKEDINAFREEZINGLIGHT - 12] = sText_CloakedInAFreezingLight, [STRINGID_DESTINYKNOTACTIVATES - 12] = sText_DestinyKnotActivates, [STRINGID_NOONEWILLBEABLETORUNAWAY - 12] = sText_NoOneWillBeAbleToRun, From bb4f00737e7b0e432f38217ac3030f7df85e3c96 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 10 Nov 2020 14:26:47 -0300 Subject: [PATCH 3/3] B_EXPANDED_INTIMIDATE->B_UPDATED_INTIMIDATE --- data/battle_scripts_1.s | 2 +- include/constants/battle_config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 1fa38f04fb..35cc4fb4ee 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6756,7 +6756,7 @@ BattleScript_IntimidateActivatesLoop: jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented -#if B_EXPANDED_INTIMIDATE >= GEN_8 +#if B_UPDATED_INTIMIDATE >= GEN_8 jumpifability BS_TARGET, ABILITY_INNER_FOCUS, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_SCRAPPY, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_IntimidatePrevented diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 19ea0a0280..374a4b54f6 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -106,7 +106,7 @@ #define B_MOODY_ACC_EVASION GEN_6 // In Gen8+, Moody CANNOT raise Accuray and Evasion any more. #define B_FLASH_FIRE_FROZEN GEN_6 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before. #define B_SYNCHRONIZE_NATURE GEN_6 // In Gen8+, if the Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same ability, as opposed to 50% previously. -#define B_EXPANDED_INTIMIDATE GEN_8 // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities. +#define B_UPDATED_INTIMIDATE GEN_8 // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities. // Item settings #define B_HP_BERRIES GEN_6 // In Gen4+, berries which restore hp activate immediately after hp drops to half. In gen3, the effect occurs at the end of the turn.