mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-04-26 02:14:22 -05:00
Fix Air Balloon message happening when another battler switches in (#8455)
This commit is contained in:
parent
3fb8215016
commit
02798e9990
|
|
@ -196,11 +196,10 @@ struct SpecialStatus
|
|||
u8 rototillerAffected:1; // to be affected by rototiller
|
||||
// End of byte
|
||||
u8 criticalHit:1;
|
||||
u8 switchInItemDone:1;
|
||||
u8 instructedChosenTarget:3;
|
||||
u8 berryReduced:1;
|
||||
u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS
|
||||
u8 padding2:1;
|
||||
u8 padding2:2;
|
||||
// End of byte
|
||||
u8 gemParam:7;
|
||||
u8 gemBoost:1;
|
||||
|
|
|
|||
|
|
@ -222,9 +222,8 @@ static enum ItemEffect TryAirBalloon(u32 battler, ActivationTiming timing)
|
|||
effect = ITEM_EFFECT_OTHER;
|
||||
}
|
||||
}
|
||||
else if (!gSpecialStatuses[battler].switchInItemDone)
|
||||
else if (gBattleStruct->battlerState[battler].switchIn)
|
||||
{
|
||||
gSpecialStatuses[battler].switchInItemDone = TRUE;
|
||||
BattleScriptCall(BattleScript_AirBalloonMsgInRet);
|
||||
RecordItemEffectBattle(battler, HOLD_EFFECT_AIR_BALLOON);
|
||||
effect = ITEM_EFFECT_OTHER;
|
||||
|
|
|
|||
|
|
@ -3240,7 +3240,6 @@ void SwitchInClearSetData(u32 battler, struct Volatiles *volatilesCopy)
|
|||
gBattleStruct->battlerState[battler].canPickupItem = FALSE;
|
||||
gBattleStruct->battlerState[battler].wasAboveHalfHp = gBattleMons[battler].hp > gBattleMons[battler].maxHP / 2;
|
||||
gBattleStruct->hazardsCounter = 0;
|
||||
gSpecialStatuses[battler].switchInItemDone = FALSE;
|
||||
|
||||
ClearPursuitValuesIfSet(battler);
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,6 @@ static bool32 FirstEventBlockEvents(struct BattleCalcValues *calcValues)
|
|||
else if (EmergencyExitCanBeTriggered(battler))
|
||||
{
|
||||
gBattleScripting.battler = gBattlerAbility = battler;
|
||||
gSpecialStatuses[battler].switchInItemDone = FALSE;
|
||||
gBattleStruct->battlerState[battler].forcedSwitch = FALSE;
|
||||
gBattleStruct->eventState.switchIn = 0;
|
||||
BattleScriptCall(BattleScript_EmergencyExit);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,20 @@ SINGLE_BATTLE_TEST("Air Balloon prevents the holder from taking damage from grou
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Air Balloon only displays entry message when user switches in")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_AIR_BALLOON); };
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { SWITCH(opponent, 1); }
|
||||
} SCENE {
|
||||
MESSAGE("Wobbuffet floats in the air with its Air Balloon!");
|
||||
NOT MESSAGE("Wobbuffet floats in the air with its Air Balloon!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Air Balloon pops when the holder is hit by a move that is not ground type")
|
||||
{
|
||||
GIVEN {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user