mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-28 12:44:18 +01:00
Switch-in abilities with a message
This commit is contained in:
parent
6a7d58003b
commit
831816e9b2
@ -4646,6 +4646,11 @@ BattleScript_AttackerAbilityStatRaiseEnd3::
|
|||||||
call BattleScript_AttackerAbilityStatRaise
|
call BattleScript_AttackerAbilityStatRaise
|
||||||
end3
|
end3
|
||||||
|
|
||||||
|
BattleScript_SwitchInAbilityMsg::
|
||||||
|
printfromtable gSwitchInAbilityStringIds
|
||||||
|
waitmessage 0x40
|
||||||
|
end3
|
||||||
|
|
||||||
BattleScript_RoughSkinActivates::
|
BattleScript_RoughSkinActivates::
|
||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
|
@ -231,6 +231,7 @@ struct SpecialStatus
|
|||||||
u8 focusSashed:1;
|
u8 focusSashed:1;
|
||||||
u8 sturdied:1;
|
u8 sturdied:1;
|
||||||
u8 stormDrainRedirected:1;
|
u8 stormDrainRedirected:1;
|
||||||
|
u8 switchInAbilityDone:1;
|
||||||
s32 dmg;
|
s32 dmg;
|
||||||
s32 physicalDmg;
|
s32 physicalDmg;
|
||||||
s32 specialDmg;
|
s32 specialDmg;
|
||||||
|
@ -313,5 +313,6 @@ extern const u8 BattleScript_AttackerAbilityStatRaise[];
|
|||||||
extern const u8 BattleScript_AttackerAbilityStatRaiseEnd3[];
|
extern const u8 BattleScript_AttackerAbilityStatRaiseEnd3[];
|
||||||
extern const u8 BattleScript_PoisonHealActivates[];
|
extern const u8 BattleScript_PoisonHealActivates[];
|
||||||
extern const u8 BattleScript_BadDreamsActivates[];
|
extern const u8 BattleScript_BadDreamsActivates[];
|
||||||
|
extern const u8 BattleScript_SwitchInAbilityMsg[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -455,7 +455,25 @@
|
|||||||
#define STRINGID_ATTACKERABILITYSTATRAISE 452
|
#define STRINGID_ATTACKERABILITYSTATRAISE 452
|
||||||
#define STRINGID_POISONHEALHPUP 453
|
#define STRINGID_POISONHEALHPUP 453
|
||||||
#define STRINGID_BADDREAMSDMG 454
|
#define STRINGID_BADDREAMSDMG 454
|
||||||
|
#define STRINGID_MOLDBREAKERENTERS 455
|
||||||
|
#define STRINGID_TERAVOLTENTERS 456
|
||||||
|
#define STRINGID_TURBOBLAZEENTERS 457
|
||||||
|
#define STRINGID_SLOWSTARTENTERS 458
|
||||||
|
#define STRINGID_SLOWSTARTEND 459
|
||||||
|
#define STRINGID_SOLARPOWERHPDROP 460
|
||||||
|
#define STRINGID_AFTERMATHDMG 461
|
||||||
|
#define STRINGID_ANTICIPATIONACTIVATES 462
|
||||||
|
#define STRINGID_FOREWARNACTIVATES 463
|
||||||
|
#define STRINGID_ICEBODYHPGAIN 464
|
||||||
|
#define STRINGID_SNOWWARNINGHAIL 465
|
||||||
|
#define STRINGID_FRISKACTIVATES 466
|
||||||
|
#define STRINGID_UNNERVEENTERS 467
|
||||||
|
#define STRINGID_HARVESTBERRY 468
|
||||||
|
#define STRINGID_MOXIEATKRISE 469
|
||||||
|
#define STRINGID_MAGICBOUNCEACTIVATES 470
|
||||||
|
#define STRINGID_PROTEANTYPECHANGE 471
|
||||||
|
#define STRINGID_SYMBIOSISITEMPASS 472
|
||||||
|
|
||||||
#define BATTLESTRINGS_COUNT 443
|
#define BATTLESTRINGS_COUNT 463
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||||
|
@ -598,6 +598,24 @@ static const u8 sText_GrassyTerrainEnds[] = _("");
|
|||||||
static const u8 sText_AngryPointActivates[] = _("");
|
static const u8 sText_AngryPointActivates[] = _("");
|
||||||
static const u8 sText_PoisonHealHpUp[] = _("");
|
static const u8 sText_PoisonHealHpUp[] = _("");
|
||||||
static const u8 sText_BadDreamsDmg[] = _("");
|
static const u8 sText_BadDreamsDmg[] = _("");
|
||||||
|
static const u8 sText_MoldBreakerEnters[] = _("");
|
||||||
|
static const u8 sText_TeravoltEnters[] = _("");
|
||||||
|
static const u8 sText_TurboblazeEnters[] = _("");
|
||||||
|
static const u8 sText_SlowStartEnters[] = _("");
|
||||||
|
static const u8 sText_SlowStartEnd[] = _("");
|
||||||
|
static const u8 sText_SolarPowerHpDrop[] = _("");
|
||||||
|
static const u8 sText_AftermathDmg[] = _("");
|
||||||
|
static const u8 sText_AnticipationActivates[] = _("");
|
||||||
|
static const u8 sText_ForewarnActivates[] = _("");
|
||||||
|
static const u8 sText_IceBodyHpGain[] = _("");
|
||||||
|
static const u8 sText_SnowWarningHail[] = _("");
|
||||||
|
static const u8 sText_FriskActivates[] = _("");
|
||||||
|
static const u8 sText_UnnerveEnters[] = _("");
|
||||||
|
static const u8 sText_HarvestBerry[] = _("");
|
||||||
|
static const u8 sText_MoxieAtkRise[] = _("");
|
||||||
|
static const u8 sText_MagicBounceActivates[] = _("");
|
||||||
|
static const u8 sText_ProteanTypeChange[] = _("");
|
||||||
|
static const u8 sText_SymbiosisItemPass[] = _("");
|
||||||
|
|
||||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||||
{
|
{
|
||||||
@ -1045,6 +1063,29 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
|||||||
sText_AttackerAbilityRaisedStat, // 452
|
sText_AttackerAbilityRaisedStat, // 452
|
||||||
sText_PoisonHealHpUp, // 453
|
sText_PoisonHealHpUp, // 453
|
||||||
sText_BadDreamsDmg, // 454
|
sText_BadDreamsDmg, // 454
|
||||||
|
sText_MoldBreakerEnters,
|
||||||
|
sText_TeravoltEnters,
|
||||||
|
sText_TurboblazeEnters,
|
||||||
|
sText_SlowStartEnters,
|
||||||
|
sText_SlowStartEnd,
|
||||||
|
sText_SolarPowerHpDrop,
|
||||||
|
sText_AftermathDmg,
|
||||||
|
sText_AnticipationActivates,
|
||||||
|
sText_ForewarnActivates,
|
||||||
|
sText_IceBodyHpGain,
|
||||||
|
sText_SnowWarningHail,
|
||||||
|
sText_FriskActivates,
|
||||||
|
sText_UnnerveEnters,
|
||||||
|
sText_HarvestBerry,
|
||||||
|
sText_MoxieAtkRise,
|
||||||
|
sText_MagicBounceActivates,
|
||||||
|
sText_ProteanTypeChange,
|
||||||
|
sText_SymbiosisItemPass,
|
||||||
|
};
|
||||||
|
|
||||||
|
const u16 gSwitchInAbilityStringIds[] =
|
||||||
|
{
|
||||||
|
STRINGID_MOLDBREAKERENTERS, STRINGID_TERAVOLTENTERS, STRINGID_TURBOBLAZEENTERS, STRINGID_SLOWSTARTENTERS, STRINGID_UNNERVEENTERS
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gMissStringIds[] =
|
const u16 gMissStringIds[] =
|
||||||
|
@ -6386,6 +6386,7 @@ static void atk76_various(void)
|
|||||||
case VARIOUS_RESET_INTIMIDATE_TRACE_BITS:
|
case VARIOUS_RESET_INTIMIDATE_TRACE_BITS:
|
||||||
gSpecialStatuses[gActiveBattler].intimidatedMon = 0;
|
gSpecialStatuses[gActiveBattler].intimidatedMon = 0;
|
||||||
gSpecialStatuses[gActiveBattler].traced = 0;
|
gSpecialStatuses[gActiveBattler].traced = 0;
|
||||||
|
gSpecialStatuses[gActiveBattler].switchInAbilityDone = 0;
|
||||||
break;
|
break;
|
||||||
case VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP:
|
case VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP:
|
||||||
if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId || gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId)
|
if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId || gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId)
|
||||||
|
@ -2380,7 +2380,53 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
|||||||
BattleScriptPushCursorAndCallback(BattleScript_OverworldWeatherStarts);
|
BattleScriptPushCursorAndCallback(BattleScript_OverworldWeatherStarts);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ABILITY_MOLD_BREAKER:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_TERAVOLT:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_TURBOBLAZE:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_SLOW_START:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ABILITY_UNNERVE:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case ABILITY_DOWNLOAD:
|
case ABILITY_DOWNLOAD:
|
||||||
|
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||||
{
|
{
|
||||||
u8 statId;
|
u8 statId;
|
||||||
u32 opposingBattler = BATTLE_OPPOSITE(battler);
|
u32 opposingBattler = BATTLE_OPPOSITE(battler);
|
||||||
@ -2407,6 +2453,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
|||||||
else
|
else
|
||||||
statId = STAT_ATK;
|
statId = STAT_ATK;
|
||||||
|
|
||||||
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
|
|
||||||
if (gBattleMons[battler].statStages[statId] != 0xC)
|
if (gBattleMons[battler].statStages[statId] != 0xC)
|
||||||
{
|
{
|
||||||
gBattleMons[battler].statStages[statId]++;
|
gBattleMons[battler].statStages[statId]++;
|
||||||
@ -2469,7 +2517,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
|||||||
break;
|
break;
|
||||||
case ABILITY_CLOUD_NINE:
|
case ABILITY_CLOUD_NINE:
|
||||||
case ABILITY_AIR_LOCK:
|
case ABILITY_AIR_LOCK:
|
||||||
{
|
|
||||||
// that's a weird choice for a variable, why not use i or battler?
|
// that's a weird choice for a variable, why not use i or battler?
|
||||||
for (target1 = 0; target1 < gBattlersCount; target1++)
|
for (target1 = 0; target1 < gBattlersCount; target1++)
|
||||||
{
|
{
|
||||||
@ -2482,7 +2529,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user