From e2e31f0b746631f6073d397734a936e38a56d54e Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 28 Oct 2021 16:53:00 -0400 Subject: [PATCH] skill swap config option for switchin abilities --- data/battle_scripts_1.s | 11 +++++++++++ include/constants/battle_config.h | 1 + 2 files changed, 12 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 5b1048e7b9..009c3a882f 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -5200,8 +5200,19 @@ BattleScript_EffectSkillSwap: tryswapabilities BattleScript_ButItFailed attackanimation waitanimation +.if B_ABILITY_POP_UP == TRUE + copybyte gBattlerAbility, gBattlerTarget + call BattleScript_AbilityPopUp + pause 20 + copybyte gBattlerAbility, gBattlerAttacker + call BattleScript_AbilityPopUp +.endif printstring STRINGID_PKMNSWAPPEDABILITIES waitmessage B_WAIT_TIME_LONG +.if B_SKILL_SWAP >= GEN_4 + switchinabilities BS_ATTACKER + switchinabilities BS_TARGET +.endif goto BattleScript_MoveEnd BattleScript_EffectImprison:: diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 99ad7360a1..41fee089de 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -148,6 +148,7 @@ #define B_CRASH_IF_TARGET_IMMUNE GEN_7 // In Gen4+, The user of Jump Kick or High Jump Kick will "keep going and crash" if it attacks a target that is immune to the move. #define B_MEMENTO_FAIL GEN_7 // In Gen4+, Memento fails if there is no target or if the target is protected or behind substitute. But not if Atk/Sp. Atk are at -6. #define B_GLARE_GHOST GEN_7 // In Gen4+, Glare can hit Ghost-type Pokémon normally. +#define B_SKILL_SWAP GEN_7 // In Gen4+, Skill Swap triggers switch-in abilities after use. // Ability settings #define B_ABILITY_WEATHER GEN_7 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.