diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 0406d20a98..02f873659f 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -123,6 +123,7 @@ #define B_DISABLE_TURNS GEN_7 // Disable's turns. See Cmd_disablelastusedattack. #define B_TAILWIND_TURNS GEN_7 // In Gen5+, Tailwind lasts 4 turns instead of 3. #define B_SLEEP_TURNS GEN_7 // In Gen5+, sleep lasts for 1-3 turns instead of 2-5 turns. +#define B_TAUNT_TURNS GEN_7 // In Gen5+, Taunt lasts 3 turns if the user acts before the target, or 4 turns if the target acted before the user. In Gen3, taunt lasts 2 turns and in Gen 4, 3-5 turns. // Move data settings #define B_UPDATED_MOVE_DATA GEN_8 // Updates move data in gBattleMoves, including Power, Accuracy, PP, stat changes, targets, chances of secondary effects, etc. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 58c46d1714..9a3f0bf018 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -11778,9 +11778,15 @@ static void Cmd_settaunt(void) } else if (gDisableStructs[gBattlerTarget].tauntTimer == 0) { - u8 turns = 4; - if (GetBattlerTurnOrderNum(gBattlerTarget) > GetBattlerTurnOrderNum(gBattlerAttacker)) - turns--; // If the target hasn't yet moved this turn, Taunt lasts for only three turns (source: Bulbapedia) + #if B_TAUNT_TURNS >= GEN_5 + u8 turns = 4; + if (GetBattlerTurnOrderNum(gBattlerTarget) > GetBattlerTurnOrderNum(gBattlerAttacker)) + turns--; // If the target hasn't yet moved this turn, Taunt lasts for only three turns (source: Bulbapedia) + #elif B_TAUNT_TURNS == GEN_4 + u8 turns = (Random() & 2) + 3; + #else + u8 turns = 2; + #endif gDisableStructs[gBattlerTarget].tauntTimer = gDisableStructs[gBattlerTarget].tauntTimer2 = turns; gBattlescriptCurrInstr += 5;