mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
a few tweaks
This commit is contained in:
parent
6a3266a265
commit
47bf5b2840
@ -363,7 +363,7 @@ static u8 ChooseMoveOrAction_Doubles(void)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
BattleAI_SetupAIData(gBattleStruct->palaceFlags >> 4);
|
||||
else
|
||||
BattleAI_SetupAIData((1 << MAX_MON_MOVES) - 1);
|
||||
BattleAI_SetupAIData(0xF);
|
||||
|
||||
gBattlerTarget = i;
|
||||
GetAiLogicData(sBattler_AI, gBattlerTarget);
|
||||
@ -1741,18 +1741,17 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
|
||||
if (decreased)
|
||||
break;
|
||||
if (gBattleMons[battlerDef].status2 & STATUS2_RECHARGE)
|
||||
if (IsBattlerIncapacitated(battlerDef, AI_DATA->defAbility))
|
||||
{
|
||||
score -= 10;
|
||||
break;
|
||||
}
|
||||
|
||||
if (gBattleMoves[gLastResultingMoves[battlerAtk]].effect == EFFECT_PROTECT
|
||||
&& move != MOVE_QUICK_GUARD
|
||||
if (move != MOVE_QUICK_GUARD
|
||||
&& move != MOVE_WIDE_GUARD
|
||||
&& move != MOVE_CRAFTY_SHIELD) //These moves have infinite usage
|
||||
{
|
||||
if (GetBattlerSecondaryDamage(battlerAtk)
|
||||
if (GetBattlerSecondaryDamage(battlerAtk) >= gBattleMons[battlerAtk].hp
|
||||
&& AI_DATA->defAbility != ABILITY_MOXIE
|
||||
&& AI_DATA->defAbility != ABILITY_BEAST_BOOST)
|
||||
{
|
||||
|
@ -2643,7 +2643,7 @@ bool32 AI_CanBeInfatuated(u8 battlerAtk, u8 battlerDef, u16 defAbility, u8 atkGe
|
||||
|| atkGender == defGender
|
||||
|| atkGender == MON_GENDERLESS
|
||||
|| defGender == MON_GENDERLESS
|
||||
|| !IsAbilityOnSide(battlerDef, ABILITY_AROMA_VEIL))
|
||||
|| IsAbilityOnSide(battlerDef, ABILITY_AROMA_VEIL))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user