mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-04 18:30:07 +01:00
Primal Reversion Tweaks
-Fixed the inconsistent Primal Reversion activation in double battles. -Optimized the primal weather checks in attackcanceler a little. -Fixed the issue with multi-target fire/water moves during primal rain/sun.
This commit is contained in:
parent
b615bc6dcd
commit
e0b53f87fc
@ -7697,8 +7697,10 @@ BattleScript_DesolateLandEvaporatesWaterTypeMoves::
|
|||||||
attackstring
|
attackstring
|
||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
ppreduce
|
ppreduce
|
||||||
|
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_STRING_PRINTED, BattleScript_MoveEnd
|
||||||
printstring STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT
|
printstring STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
orword gHitMarker, HITMARKER_STRING_PRINTED
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_PrimordialSeaActivates::
|
BattleScript_PrimordialSeaActivates::
|
||||||
@ -7715,8 +7717,10 @@ BattleScript_PrimordialSeaFizzlesOutFireTypeMoves::
|
|||||||
attackstring
|
attackstring
|
||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
ppreduce
|
ppreduce
|
||||||
|
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_STRING_PRINTED, BattleScript_MoveEnd
|
||||||
printstring STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN
|
printstring STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
orword gHitMarker, HITMARKER_STRING_PRINTED
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_DeltaStreamActivates::
|
BattleScript_DeltaStreamActivates::
|
||||||
|
@ -200,6 +200,7 @@
|
|||||||
#define HITMARKER_CHARGING (1 << 27)
|
#define HITMARKER_CHARGING (1 << 27)
|
||||||
#define HITMARKER_FAINTED(battler) (gBitTable[battler] << 28)
|
#define HITMARKER_FAINTED(battler) (gBitTable[battler] << 28)
|
||||||
#define HITMARKER_FAINTED2(battler) ((1 << 28) << battler)
|
#define HITMARKER_FAINTED2(battler) ((1 << 28) << battler)
|
||||||
|
#define HITMARKER_STRING_PRINTED (1 << 29)
|
||||||
|
|
||||||
// Per-side statuses that affect an entire party
|
// Per-side statuses that affect an entire party
|
||||||
#define SIDE_STATUS_REFLECT (1 << 0)
|
#define SIDE_STATUS_REFLECT (1 << 0)
|
||||||
|
@ -1337,25 +1337,21 @@ static void Cmd_attackcanceler(void)
|
|||||||
|
|
||||||
GET_MOVE_TYPE(gCurrentMove, moveType);
|
GET_MOVE_TYPE(gCurrentMove, moveType);
|
||||||
|
|
||||||
if (moveType == TYPE_FIRE
|
if (WEATHER_HAS_EFFECT && gBattleMoves[gCurrentMove].power)
|
||||||
&& (gBattleWeather & WEATHER_RAIN_PRIMAL)
|
{
|
||||||
&& WEATHER_HAS_EFFECT
|
if (moveType == TYPE_FIRE && (gBattleWeather & WEATHER_RAIN_PRIMAL))
|
||||||
&& gBattleMoves[gCurrentMove].power)
|
|
||||||
{
|
{
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_PrimordialSeaFizzlesOutFireTypeMoves;
|
gBattlescriptCurrInstr = BattleScript_PrimordialSeaFizzlesOutFireTypeMoves;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (moveType == TYPE_WATER && (gBattleWeather & WEATHER_SUN_PRIMAL))
|
||||||
if (moveType == TYPE_WATER
|
|
||||||
&& (gBattleWeather & WEATHER_SUN_PRIMAL)
|
|
||||||
&& WEATHER_HAS_EFFECT
|
|
||||||
&& gBattleMoves[gCurrentMove].power)
|
|
||||||
{
|
{
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_DesolateLandEvaporatesWaterTypeMoves;
|
gBattlescriptCurrInstr = BattleScript_DesolateLandEvaporatesWaterTypeMoves;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (gBattleOutcome != 0)
|
if (gBattleOutcome != 0)
|
||||||
{
|
{
|
||||||
|
@ -8884,12 +8884,10 @@ bool32 CanMegaEvolve(u8 battlerId)
|
|||||||
// Check if trainer already mega evolved a pokemon.
|
// Check if trainer already mega evolved a pokemon.
|
||||||
if (mega->alreadyEvolved[battlerPosition])
|
if (mega->alreadyEvolved[battlerPosition])
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||||
{
|
&& IsPartnerMonFromSameTrainer(battlerId)
|
||||||
if (IsPartnerMonFromSameTrainer(battlerId)
|
|
||||||
&& (mega->alreadyEvolved[partnerPosition] || (mega->toEvolve & gBitTable[BATTLE_PARTNER(battlerId)])))
|
&& (mega->alreadyEvolved[partnerPosition] || (mega->toEvolve & gBitTable[BATTLE_PARTNER(battlerId)])))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
// Gets mon data.
|
// Gets mon data.
|
||||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user