mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-22 04:04:15 +01:00
Merge pull request #2740 from AlexOn1ine/AI_TryToFaint
Fix AI mon getting lower score when it is faster
This commit is contained in:
commit
cf1231d69a
@ -2632,7 +2632,7 @@ static s16 AI_TryToFaint(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||||||
if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0) && gBattleMoves[move].effect != EFFECT_EXPLOSION)
|
if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, AI_THINKING_STRUCT->movesetIndex, 0) && gBattleMoves[move].effect != EFFECT_EXPLOSION)
|
||||||
{
|
{
|
||||||
// this move can faint the target
|
// this move can faint the target
|
||||||
if (!WillAIStrikeFirst() || GetMovePriority(battlerAtk, move) > 0)
|
if (WillAIStrikeFirst() || GetMovePriority(battlerAtk, move) > 0)
|
||||||
score += 4; // we go first or we're using priority move
|
score += 4; // we go first or we're using priority move
|
||||||
else
|
else
|
||||||
score += 2;
|
score += 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user