diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 56a6fc1b7..eb4ffe4a7 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7412,6 +7412,18 @@ BattleScript_AbilityCuredStatus:: updatestatusicon BS_SCRIPTING return +BattleScript_BattlerShookOffTaunt:: + call BattleScript_AbilityPopUp + printstring STRINGID_PKMNSHOOKOFFTHETAUNT + waitmessage B_WAIT_TIME_LONG + return + +BattleScript_BattlerGotOverItsInfatuation:: + call BattleScript_AbilityPopUp + printstring STRINGID_PKMNGOTOVERITSINFATUATION + waitmessage B_WAIT_TIME_LONG + return + BattleScript_IgnoresWhileAsleep:: printstring STRINGID_PKMNIGNORESASLEEP waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 6aee81458..ea85cf43c 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -368,5 +368,7 @@ extern const u8 BattleScript_MicleBerryActivateEnd2[]; extern const u8 BattleScript_MicleBerryActivateRet[]; extern const u8 BattleScript_JabocaRowapBerryActivates[]; extern const u8 BattleScript_NotAffectedAbilityPopUp[]; +extern const u8 BattleScript_BattlerShookOffTaunt[]; +extern const u8 BattleScript_BattlerGotOverItsInfatuation[]; #endif // GUARD_BATTLE_SCRIPTS_H diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index f929a1e87..266aef147 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -568,8 +568,10 @@ #define STRINGID_CURIOUSMEDICINEENTERS 564 #define STRINGID_CANACTFASTERTHANKSTO 565 #define STRINGID_MICLEBERRYACTIVATES 566 - -#define BATTLESTRINGS_COUNT 567 +#define STRINGID_PKMNSHOOKOFFTHETAUNT 567 +#define STRINGID_PKMNGOTOVERITSINFATUATION 568 + +#define BATTLESTRINGS_COUNT 569 // 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 c7464b70c..d4d5756f9 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -694,9 +694,13 @@ static const u8 sText_AsOneEnters[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} has two static const u8 sText_CuriousMedicineEnters[] = _("{B_EFF_NAME_WITH_PREFIX}'s\nstat changes were reset!"); static const u8 sText_CanActFaster[] = _("{B_ATK_NAME_WITH_PREFIX} can act faster,\nthanks to {B_LAST_ITEM}!"); static const u8 sText_MicleBerryActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} boosted the accuracy of its\nnext move using {B_LAST_ITEM}!"); +static const u8 sText_PkmnShookOffTheTaunt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} shook off\nthe taunt!"); +static const u8 sText_PkmnGotOverItsInfatuation[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} got over\nits infatuation!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { + [STRINGID_PKMNGOTOVERITSINFATUATION - 12] = sText_PkmnGotOverItsInfatuation, + [STRINGID_PKMNSHOOKOFFTHETAUNT - 12] = sText_PkmnShookOffTheTaunt, [STRINGID_MICLEBERRYACTIVATES - 12] = sText_MicleBerryActivates, [STRINGID_CANACTFASTERTHANKSTO - 12] = sText_CanActFaster, [STRINGID_CURIOUSMEDICINEENTERS - 12] = sText_CuriousMedicineEnters, diff --git a/src/battle_util.c b/src/battle_util.c index 4c3f795de..fdf8201aa 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5100,10 +5100,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move break; case ABILITY_OBLIVIOUS: if (gBattleMons[battler].status2 & STATUS2_INFATUATION) - { - StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); effect = 3; - } + else if (gDisableStructs[battler].tauntTimer != 0) + effect = 4; break; } if (effect) @@ -5112,17 +5111,26 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move { case 1: // status cleared gBattleMons[battler].status1 = 0; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_AbilityCuredStatus; break; case 2: // get rid of confusion gBattleMons[battler].status2 &= ~(STATUS2_CONFUSION); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_AbilityCuredStatus; break; case 3: // get rid of infatuation gBattleMons[battler].status2 &= ~(STATUS2_INFATUATION); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_BattlerGotOverItsInfatuation; + break; + case 4: // get rid of taunt + gDisableStructs[battler].tauntTimer = 0; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_BattlerShookOffTaunt; break; } - BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_AbilityCuredStatus; gBattleScripting.battler = gActiveBattler = gBattlerAbility = battler; BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler);