Fix Air Baloon msg

This commit is contained in:
DizzyEggg 2019-05-20 12:20:49 +02:00
parent e1ea4b62e9
commit e00890a555
3 changed files with 30 additions and 24 deletions

View File

@ -6902,7 +6902,7 @@ BattleScript_ItemHealHP_End2::
BattleScript_AirBaloonMsgIn::
printstring STRINGID_AIRBALLOONFLOAT
waitmessage 0x40
end2
end3
BattleScript_AirBaloonMsgPop::
printstring STRINGID_AIRBALLOONPOP

View File

@ -165,6 +165,7 @@ struct SpecialStatus
u8 sturdied:1;
u8 stormDrainRedirected:1;
u8 switchInAbilityDone:1;
u8 switchInItemDone:1;
u8 instructedChosenTarget:3;
u8 berryReduced:1;
u8 gemBoost:1;

View File

@ -3746,35 +3746,40 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
switch (caseID)
{
case ITEMEFFECT_ON_SWITCH_IN:
switch (battlerHoldEffect)
if (!gSpecialStatuses[battlerId].switchInItemDone)
{
case HOLD_EFFECT_DOUBLE_PRIZE:
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
gBattleStruct->moneyMultiplier *= 2;
break;
case HOLD_EFFECT_RESTORE_STATS:
for (i = 0; i < NUM_BATTLE_STATS; i++)
switch (battlerHoldEffect)
{
if (gBattleMons[battlerId].statStages[i] < 6)
case HOLD_EFFECT_DOUBLE_PRIZE:
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
gBattleStruct->moneyMultiplier *= 2;
break;
case HOLD_EFFECT_RESTORE_STATS:
for (i = 0; i < NUM_BATTLE_STATS; i++)
{
gBattleMons[battlerId].statStages[i] = 6;
effect = ITEM_STATS_CHANGE;
if (gBattleMons[battlerId].statStages[i] < 6)
{
gBattleMons[battlerId].statStages[i] = 6;
effect = ITEM_STATS_CHANGE;
}
}
if (effect)
{
gBattleScripting.battler = battlerId;
gPotentialItemEffectBattler = battlerId;
gActiveBattler = gBattlerAttacker = battlerId;
BattleScriptExecute(BattleScript_WhiteHerbEnd2);
}
break;
case HOLD_EFFECT_AIR_BALLOON:
effect = ITEM_EFFECT_OTHER;
gBattleScripting.battler = battlerId;
BattleScriptPushCursorAndCallback(BattleScript_AirBaloonMsgIn);
RecordItemEffectBattle(battlerId, HOLD_EFFECT_AIR_BALLOON);
break;
}
if (effect)
{
gBattleScripting.battler = battlerId;
gPotentialItemEffectBattler = battlerId;
gActiveBattler = gBattlerAttacker = battlerId;
BattleScriptExecute(BattleScript_WhiteHerbEnd2);
}
break;
case HOLD_EFFECT_AIR_BALLOON:
effect = ITEM_EFFECT_OTHER;
gBattleScripting.battler = battlerId;
BattleScriptExecute(BattleScript_AirBaloonMsgIn);
RecordItemEffectBattle(battlerId, HOLD_EFFECT_AIR_BALLOON);
break;
gSpecialStatuses[battlerId].switchInItemDone = 1;
}
break;
case 1: