diff --git a/include/config/battle.h b/include/config/battle.h index 6f6bc92fe6..63283b0dbb 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -108,9 +108,9 @@ #define B_STOCKPILE_RAISES_DEFS GEN_LATEST // In Gen4+, Stockpile also raises Defense and Sp. Defense stats. Once Spit Up / Swallow is used, these stat changes are lost. #define B_TRANSFORM_SHINY GEN_LATEST // In Gen4+, Transform will copy the shiny state of the opponent instead of maintaining its own shiny state. #define B_TRANSFORM_FORM_CHANGES GEN_LATEST // In Gen5+, Transformed Pokemon cannot change forms. - #define B_WIDE_GUARD GEN_LATEST // In Gen5 only, Quick Guard has a chance to fail if used consecutively. #define B_QUICK_GUARD GEN_LATEST // In Gen5 only, Wide Guard has a chance to fail if used consecutively. +#define B_IMPRISON GEN_LATEST // In Gen5+, Imprison doesn't fail if opposing pokemon don't have any moves the user knows. // Ability settings #define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index aef26ce826..3d21c922eb 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -14114,6 +14114,11 @@ static void Cmd_tryimprison(void) { gBattlescriptCurrInstr = cmd->failInstr; } + else if (B_IMPRISON >= GEN_5) + { + gStatuses3[gBattlerAttacker] |= STATUS3_IMPRISONED_OTHERS; + gBattlescriptCurrInstr = cmd->nextInstr; + } else { u8 battler, sideAttacker;