fix protect

This commit is contained in:
DizzyEggg 2018-11-03 23:32:18 +01:00
parent bc42de5f60
commit c3eac92af8
2 changed files with 3 additions and 1 deletions

View file

@ -2918,8 +2918,10 @@ AI_TryToFaint_DoubleSuperEffective:
AI_TryToFaint_TryToEncourageQuickAttack: AI_TryToFaint_TryToEncourageQuickAttack:
if_effect EFFECT_EXPLOSION, AI_TryToFaint_End if_effect EFFECT_EXPLOSION, AI_TryToFaint_End
if_user_faster AI_TryToFaint_ScoreUp4
if_move_flag FLAG_HIGH_CRIT AI_TryToFaint_ScoreUp4 if_move_flag FLAG_HIGH_CRIT AI_TryToFaint_ScoreUp4
score +2 score +2
end
AI_TryToFaint_ScoreUp4: AI_TryToFaint_ScoreUp4:
score +4 score +4

View file

@ -7139,7 +7139,7 @@ static void atk77_setprotectlike(void) // protect and endure
{ {
bool32 notLastTurn = TRUE; bool32 notLastTurn = TRUE;
if (gBattleMoves[gLastResultingMoves[gBattlerAttacker]].flags & FLAG_PROTECTION_MOVE) if (!(gBattleMoves[gLastResultingMoves[gBattlerAttacker]].flags & FLAG_PROTECTION_MOVE))
gDisableStructs[gBattlerAttacker].protectUses = 0; gDisableStructs[gBattlerAttacker].protectUses = 0;
if (gCurrentTurnActionNumber == (gBattlersCount - 1)) if (gCurrentTurnActionNumber == (gBattlersCount - 1))