commit
6edec5bc3d
6 changed files with 53 additions and 9 deletions
|
@ -4197,6 +4197,15 @@ BattleScript_NotAffected::
|
|||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_NotAffectedAbilityPopUp::
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectUproar::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
|
@ -7411,6 +7420,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
|
||||
|
|
|
@ -367,5 +367,8 @@ extern const u8 BattleScript_CustapBerryActivation[];
|
|||
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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -9739,7 +9739,7 @@ static void Cmd_tryinfatuating(void)
|
|||
|
||||
if (GetBattlerAbility(gBattlerTarget) == ABILITY_OBLIVIOUS)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_ObliviousPreventsAttraction;
|
||||
gBattlescriptCurrInstr = BattleScript_NotAffectedAbilityPopUp;
|
||||
gLastUsedAbility = ABILITY_OBLIVIOUS;
|
||||
RecordAbilityBattle(gBattlerTarget, ABILITY_OBLIVIOUS);
|
||||
}
|
||||
|
@ -11152,7 +11152,13 @@ static void Cmd_jumpifnodamage(void)
|
|||
|
||||
static void Cmd_settaunt(void)
|
||||
{
|
||||
if (gDisableStructs[gBattlerTarget].tauntTimer == 0)
|
||||
if (GetBattlerAbility(gBattlerTarget) == ABILITY_OBLIVIOUS)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_NotAffectedAbilityPopUp;
|
||||
gLastUsedAbility = ABILITY_OBLIVIOUS;
|
||||
RecordAbilityBattle(gBattlerTarget, ABILITY_OBLIVIOUS);
|
||||
}
|
||||
else if (gDisableStructs[gBattlerTarget].tauntTimer == 0)
|
||||
{
|
||||
u8 turns = 4;
|
||||
if (GetBattlerTurnOrderNum(gBattlerTarget) > GetBattlerTurnOrderNum(gBattlerAttacker))
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue