Ability pop-up for levitate and wonder guard

This commit is contained in:
DizzyEggg 2020-04-13 13:06:31 +02:00
parent 8f61445dfe
commit 51e2e0ad10
2 changed files with 3 additions and 3 deletions

View File

@ -1953,6 +1953,8 @@ static void Cmd_resultmessage(void)
if (gMoveResultFlags & MOVE_RESULT_MISSED && (!(gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) || gBattleCommunication[6] > 2))
{
if (gBattleCommunication[6] > 2) // Wonder Guard or Levitate - show the ability pop-up
CreateAbilityPopUp(gBattlerTarget, gBattleMons[gBattlerTarget].ability, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0);
stringId = gMissStringIds[gBattleCommunication[6]];
gBattleCommunication[MSG_DISPLAY] = 1;
}

View File

@ -4411,8 +4411,6 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
}
}
break;
case 2:
break;
case ITEMEFFECT_MOVE_END:
for (battlerId = 0; battlerId < gBattlersCount; battlerId++)
{
@ -6198,7 +6196,7 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat
gLastUsedAbility = ABILITY_LEVITATE;
gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE);
gLastLandedMoves[battlerDef] = 0;
gBattleCommunication[6] = moveType;
gBattleCommunication[6] = 4;
RecordAbilityBattle(battlerDef, ABILITY_LEVITATE);
}
}