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
|
||||
pause B_WAIT_TIME_SHORT
|
||||
ppreduce
|
||||
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_STRING_PRINTED, BattleScript_MoveEnd
|
||||
printstring STRINGID_MOVEEVAPORATEDINTHEHARSHSUNLIGHT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_STRING_PRINTED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_PrimordialSeaActivates::
|
||||
@ -7715,8 +7717,10 @@ BattleScript_PrimordialSeaFizzlesOutFireTypeMoves::
|
||||
attackstring
|
||||
pause B_WAIT_TIME_SHORT
|
||||
ppreduce
|
||||
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_STRING_PRINTED, BattleScript_MoveEnd
|
||||
printstring STRINGID_MOVEFIZZLEDOUTINTHEHEAVYRAIN
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_STRING_PRINTED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_DeltaStreamActivates::
|
||||
|
@ -200,6 +200,7 @@
|
||||
#define HITMARKER_CHARGING (1 << 27)
|
||||
#define HITMARKER_FAINTED(battler) (gBitTable[battler] << 28)
|
||||
#define HITMARKER_FAINTED2(battler) ((1 << 28) << battler)
|
||||
#define HITMARKER_STRING_PRINTED (1 << 29)
|
||||
|
||||
// Per-side statuses that affect an entire party
|
||||
#define SIDE_STATUS_REFLECT (1 << 0)
|
||||
|
@ -1337,25 +1337,21 @@ static void Cmd_attackcanceler(void)
|
||||
|
||||
GET_MOVE_TYPE(gCurrentMove, moveType);
|
||||
|
||||
if (moveType == TYPE_FIRE
|
||||
&& (gBattleWeather & WEATHER_RAIN_PRIMAL)
|
||||
&& WEATHER_HAS_EFFECT
|
||||
&& gBattleMoves[gCurrentMove].power)
|
||||
if (WEATHER_HAS_EFFECT && gBattleMoves[gCurrentMove].power)
|
||||
{
|
||||
if (moveType == TYPE_FIRE && (gBattleWeather & WEATHER_RAIN_PRIMAL))
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_PrimordialSeaFizzlesOutFireTypeMoves;
|
||||
return;
|
||||
}
|
||||
|
||||
if (moveType == TYPE_WATER
|
||||
&& (gBattleWeather & WEATHER_SUN_PRIMAL)
|
||||
&& WEATHER_HAS_EFFECT
|
||||
&& gBattleMoves[gCurrentMove].power)
|
||||
else if (moveType == TYPE_WATER && (gBattleWeather & WEATHER_SUN_PRIMAL))
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_DesolateLandEvaporatesWaterTypeMoves;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (gBattleOutcome != 0)
|
||||
{
|
||||
|
@ -8884,12 +8884,10 @@ bool32 CanMegaEvolve(u8 battlerId)
|
||||
// Check if trainer already mega evolved a pokemon.
|
||||
if (mega->alreadyEvolved[battlerPosition])
|
||||
return FALSE;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
{
|
||||
if (IsPartnerMonFromSameTrainer(battlerId)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& IsPartnerMonFromSameTrainer(battlerId)
|
||||
&& (mega->alreadyEvolved[partnerPosition] || (mega->toEvolve & gBitTable[BATTLE_PARTNER(battlerId)])))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Gets mon data.
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
|
Loading…
x
Reference in New Issue
Block a user