mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
Merge pull request #1243 from ghoulslash/abilities
Finish Switch In Ability Activation Messages
This commit is contained in:
commit
aa7facf57b
@ -7686,3 +7686,10 @@ BattleScript_PrintPlayerForfeitedLinkBattle::
|
|||||||
atk57
|
atk57
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
end2
|
end2
|
||||||
|
|
||||||
|
BattleScript_AnnounceAirLockCloudNine::
|
||||||
|
call BattleScript_AbilityPopUp
|
||||||
|
printstring STRINGID_AIRLOCKACTIVATES
|
||||||
|
waitmessage 0x40
|
||||||
|
call BattleScript_WeatherFormChanges
|
||||||
|
end3
|
||||||
|
@ -349,5 +349,6 @@ extern const u8 BattleScript_EmergencyExitNoPopUp[];
|
|||||||
extern const u8 BattleScript_EmergencyExitWild[];
|
extern const u8 BattleScript_EmergencyExitWild[];
|
||||||
extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
|
extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
|
||||||
extern const u8 BattleScript_CheekPouchActivates[];
|
extern const u8 BattleScript_CheekPouchActivates[];
|
||||||
|
extern const u8 BattleScript_AnnounceAirLockCloudNine[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -551,7 +551,30 @@
|
|||||||
#define STRINGID_CLOAKEDINAFREEZINGLIGHT 547
|
#define STRINGID_CLOAKEDINAFREEZINGLIGHT 547
|
||||||
#define STRINGID_STATWASNOTLOWERED 548
|
#define STRINGID_STATWASNOTLOWERED 548
|
||||||
#define STRINGID_FERVENTWISHREACHED 549
|
#define STRINGID_FERVENTWISHREACHED 549
|
||||||
|
#define STRINGID_AIRLOCKACTIVATES 550
|
||||||
|
#define STRINGID_PRESSUREENTERS 551
|
||||||
|
#define STRINGID_DARKAURAENTERS 552
|
||||||
|
#define STRINGID_FAIRYAURAENTERS 553
|
||||||
|
#define STRINGID_AURABREAKENTERS 554
|
||||||
|
#define STRINGID_COMATOSEENTERS 555
|
||||||
|
#define STRINGID_SCREENCLEANERENTERS 556
|
||||||
|
|
||||||
#define BATTLESTRINGS_COUNT 550
|
#define BATTLESTRINGS_COUNT 557
|
||||||
|
|
||||||
|
//// multichoice message IDs
|
||||||
|
// switch in ability message
|
||||||
|
#define MULTI_SWITCHIN_MOLDBREAKER 0
|
||||||
|
#define MULTI_SWITCHIN_TERAVOLT 1
|
||||||
|
#define MULTI_SWITCHIN_TURBOBLAZE 2
|
||||||
|
#define MULTI_SWITCHIN_SLOWSTART 3
|
||||||
|
#define MULTI_SWITCHIN_UNNERVE 4
|
||||||
|
#define MULTI_SWITCHIN_ANTICIPATION 5
|
||||||
|
#define MULTI_SWITCHIN_FOREWARN 6
|
||||||
|
#define MULTI_SWITCHIN_PRESSURE 7
|
||||||
|
#define MULTI_SWITCHIN_DARKAURA 8
|
||||||
|
#define MULTI_SWITCHIN_FAIRYAURA 9
|
||||||
|
#define MULTI_SWITCHIN_AURABREAK 10
|
||||||
|
#define MULTI_SWITCHIN_COMATOSE 11
|
||||||
|
#define MULTI_SWITCHIN_SCREENCLEANER 12
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||||
|
@ -678,6 +678,13 @@ static const u8 sText_NoOneWillBeAbleToRun[] = _("No one will be able to run awa
|
|||||||
static const u8 sText_DestinyKnotActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} fell in love\nfrom the {B_LAST_ITEM}!");
|
static const u8 sText_DestinyKnotActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} fell in love\nfrom the {B_LAST_ITEM}!");
|
||||||
static const u8 sText_CloakedInAFreezingLight[] = _("{B_ATK_NAME_WITH_PREFIX} became cloaked\nin a freezing light!");
|
static const u8 sText_CloakedInAFreezingLight[] = _("{B_ATK_NAME_WITH_PREFIX} became cloaked\nin a freezing light!");
|
||||||
static const u8 sText_StatWasNotLowered[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwas not lowered!");
|
static const u8 sText_StatWasNotLowered[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwas not lowered!");
|
||||||
|
static const u8 sText_AirLockActivates[] = _("The effects of weather\ndisappeared.");
|
||||||
|
static const u8 sText_PressureActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is exerting its\npressure!");
|
||||||
|
static const u8 sText_DarkAuraActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is radiating\na dark aura!");
|
||||||
|
static const u8 sText_FairyAuraActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is radiating\na fairy aura!");
|
||||||
|
static const u8 sText_AuraBreakActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} reversed all\nother POKéMON's auras!");
|
||||||
|
static const u8 sText_ComatoseActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is drowsing!");
|
||||||
|
static const u8 sText_ScreenCleanerActivates[] = _("All screens on the field were\ncleansed!");
|
||||||
|
|
||||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||||
{
|
{
|
||||||
@ -1219,6 +1226,13 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
|||||||
[STRINGID_GRASSYTERRAINHEALS - 12] = sText_GrassyTerrainHeals,
|
[STRINGID_GRASSYTERRAINHEALS - 12] = sText_GrassyTerrainHeals,
|
||||||
[STRINGID_ELECTRICTERRAINPREVENTS - 12] = sText_ElectricTerrainPreventsSleep,
|
[STRINGID_ELECTRICTERRAINPREVENTS - 12] = sText_ElectricTerrainPreventsSleep,
|
||||||
[STRINGID_PSYCHICTERRAINPREVENTS - 12] = sText_PsychicTerrainPreventsPriority,
|
[STRINGID_PSYCHICTERRAINPREVENTS - 12] = sText_PsychicTerrainPreventsPriority,
|
||||||
|
[STRINGID_AIRLOCKACTIVATES - 12] = sText_AirLockActivates,
|
||||||
|
[STRINGID_PRESSUREENTERS - 12] = sText_PressureActivates,
|
||||||
|
[STRINGID_DARKAURAENTERS - 12] = sText_DarkAuraActivates,
|
||||||
|
[STRINGID_FAIRYAURAENTERS - 12] = sText_FairyAuraActivates,
|
||||||
|
[STRINGID_AURABREAKENTERS - 12] = sText_AuraBreakActivates,
|
||||||
|
[STRINGID_COMATOSEENTERS - 12] = sText_ComatoseActivates,
|
||||||
|
[STRINGID_SCREENCLEANERENTERS - 12] = sText_ScreenCleanerActivates,
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gTerrainStringIds[] =
|
const u16 gTerrainStringIds[] =
|
||||||
@ -1248,9 +1262,19 @@ const u16 gDmgHazardsStringIds[] =
|
|||||||
|
|
||||||
const u16 gSwitchInAbilityStringIds[] =
|
const u16 gSwitchInAbilityStringIds[] =
|
||||||
{
|
{
|
||||||
STRINGID_MOLDBREAKERENTERS, STRINGID_TERAVOLTENTERS, STRINGID_TURBOBLAZEENTERS,
|
[MULTI_SWITCHIN_MOLDBREAKER] = STRINGID_MOLDBREAKERENTERS,
|
||||||
STRINGID_SLOWSTARTENTERS, STRINGID_UNNERVEENTERS, STRINGID_ANTICIPATIONACTIVATES,
|
[MULTI_SWITCHIN_TERAVOLT] = STRINGID_TERAVOLTENTERS,
|
||||||
STRINGID_FOREWARNACTIVATES
|
[MULTI_SWITCHIN_TURBOBLAZE] = STRINGID_TURBOBLAZEENTERS,
|
||||||
|
[MULTI_SWITCHIN_SLOWSTART] = STRINGID_SLOWSTARTENTERS,
|
||||||
|
[MULTI_SWITCHIN_UNNERVE] = STRINGID_UNNERVEENTERS,
|
||||||
|
[MULTI_SWITCHIN_ANTICIPATION] = STRINGID_ANTICIPATIONACTIVATES,
|
||||||
|
[MULTI_SWITCHIN_FOREWARN] = STRINGID_FOREWARNACTIVATES,
|
||||||
|
[MULTI_SWITCHIN_PRESSURE] = STRINGID_PRESSUREENTERS,
|
||||||
|
[MULTI_SWITCHIN_DARKAURA] = STRINGID_DARKAURAENTERS,
|
||||||
|
[MULTI_SWITCHIN_FAIRYAURA] = STRINGID_FAIRYAURAENTERS,
|
||||||
|
[MULTI_SWITCHIN_AURABREAK] = STRINGID_AURABREAKENTERS,
|
||||||
|
[MULTI_SWITCHIN_COMATOSE] = STRINGID_COMATOSEENTERS,
|
||||||
|
[MULTI_SWITCHIN_SCREENCLEANER] = STRINGID_SCREENCLEANERENTERS,
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gMissStringIds[] =
|
const u16 gMissStringIds[] =
|
||||||
|
@ -3656,7 +3656,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
case ABILITY_MOLD_BREAKER:
|
case ABILITY_MOLD_BREAKER:
|
||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_MOLDBREAKER;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
effect++;
|
effect++;
|
||||||
@ -3665,7 +3665,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
case ABILITY_TERAVOLT:
|
case ABILITY_TERAVOLT:
|
||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_TERAVOLT;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
effect++;
|
effect++;
|
||||||
@ -3674,7 +3674,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
case ABILITY_TURBOBLAZE:
|
case ABILITY_TURBOBLAZE:
|
||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_TURBOBLAZE;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
effect++;
|
effect++;
|
||||||
@ -3684,7 +3684,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
gDisableStructs[battler].slowStartTimer = 5;
|
gDisableStructs[battler].slowStartTimer = 5;
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_SLOWSTART;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
effect++;
|
effect++;
|
||||||
@ -3693,7 +3693,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
case ABILITY_UNNERVE:
|
case ABILITY_UNNERVE:
|
||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_UNNERVE;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
effect++;
|
effect++;
|
||||||
@ -3723,7 +3723,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
|
|
||||||
if (effect)
|
if (effect)
|
||||||
{
|
{
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_ANTICIPATION;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
}
|
}
|
||||||
@ -3741,7 +3741,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
ForewarnChooseMove(battler);
|
ForewarnChooseMove(battler);
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = 6;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_FOREWARN;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
effect++;
|
effect++;
|
||||||
@ -3784,6 +3784,60 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ABILITY_PRESSURE:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_PRESSURE;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_DARK_AURA:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_DARKAURA;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_FAIRY_AURA:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_FAIRYAURA;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_AURA_BREAK:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_AURABREAK;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_COMATOSE:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_COMATOSE;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_SCREEN_CLEANER:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_SCREENCLEANER;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case ABILITY_DRIZZLE:
|
case ABILITY_DRIZZLE:
|
||||||
if (TryChangeBattleWeather(battler, ENUM_WEATHER_RAIN, TRUE))
|
if (TryChangeBattleWeather(battler, ENUM_WEATHER_RAIN, TRUE))
|
||||||
{
|
{
|
||||||
@ -3865,16 +3919,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
break;
|
break;
|
||||||
case ABILITY_CLOUD_NINE:
|
case ABILITY_CLOUD_NINE:
|
||||||
case ABILITY_AIR_LOCK:
|
case ABILITY_AIR_LOCK:
|
||||||
for (i = 0; i < gBattlersCount; i++)
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
effect = TryWeatherFormChange(i);
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
if (effect != 0)
|
BattleScriptPushCursorAndCallback(BattleScript_AnnounceAirLockCloudNine);
|
||||||
{
|
effect++;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_CastformChange);
|
|
||||||
gBattleScripting.battler = i;
|
|
||||||
gBattleStruct->formToChangeInto = effect - 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ABILITY_SCHOOLING:
|
case ABILITY_SCHOOLING:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user