Apply suggestions from code review
Co-authored-by: LOuroboros <lunosouroboros@gmail.com>
This commit is contained in:
parent
333917941b
commit
3b4cba9b51
1 changed files with 8 additions and 6 deletions
|
@ -8033,10 +8033,10 @@ u8 IsMonDisobedient(void)
|
||||||
return 0;
|
return 0;
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
|
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
|
||||||
return 0;
|
return 0;
|
||||||
#if B_OBEDIENCE_MECHANICS < GEN_8
|
#if B_OBEDIENCE_MECHANICS < GEN_8
|
||||||
if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName))
|
if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName))
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
if (FlagGet(FLAG_BADGE08_GET))
|
if (FlagGet(FLAG_BADGE08_GET))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -8050,11 +8050,13 @@ u8 IsMonDisobedient(void)
|
||||||
obedienceLevel = 70;
|
obedienceLevel = 70;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if B_OBEDIENCE_MECHANICS >= GEN_8
|
#if B_OBEDIENCE_MECHANICS >= GEN_8
|
||||||
if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName))
|
if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName))
|
||||||
levelReferenced = gBattleMons[gBattlerAttacker].metLevel;
|
levelReferenced = gBattleMons[gBattlerAttacker].metLevel;
|
||||||
else
|
else
|
||||||
#endif
|
#else
|
||||||
|
if (gBattleMons[gBattlerAttacker].level <= obedienceLevel)
|
||||||
|
#endif
|
||||||
levelReferenced = gBattleMons[gBattlerAttacker].level;
|
levelReferenced = gBattleMons[gBattlerAttacker].level;
|
||||||
|
|
||||||
if (levelReferenced <= obedienceLevel)
|
if (levelReferenced <= obedienceLevel)
|
||||||
|
|
Loading…
Reference in a new issue