Remove temp scores in AI_CalcMoveEffectScores (#4655)

This commit is contained in:
Alex 2024-05-30 09:54:24 +02:00 committed by GitHub
parent 58793294b8
commit 462dca0c09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 18 deletions

View file

@ -32,17 +32,11 @@
#define BEST_DAMAGE_MOVE 1 // Move with the most amount of hits with the best accuracy/effect
#define POWERFUL_STATUS_MOVE 10 // Moves with this score will be chosen over a move that faints target
// Temporary scores that are added together to determine a final score at the end of AI_CalcMoveEffectScore
// Scores given in AI_CalcMoveEffectScore
#define WEAK_EFFECT 1
#define DECENT_EFFECT 2
#define GOOD_EFFECT 4
#define BEST_EFFECT 6
// AI_CalcMoveEffectScore final score
#define NOT_GOOD_ENOUGH 0 // Not worth using over a damaging move
#define GOOD_MOVE_EFFECTS 2 // Worth using over a damaging move
#define PREFERRED_MOVE_EFFECTS 3 // Worth using over a damagin move and is better then DECENT_EFFECT
#define BEST_MOVE_EFFECTS 4 // Best possible move effects. E.g. stat boosting moves that boost multiply moves
#define GOOD_EFFECT 3
#define BEST_EFFECT 4
// AI_TryToFaint
#define FAST_KILL 6 // AI is faster and faints target

View file

@ -4722,14 +4722,7 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move)
}
}
if (score <= 1)
return NOT_GOOD_ENOUGH;
else if (score <= 3)
return GOOD_MOVE_EFFECTS;
else if (score <= 5)
return PREFERRED_MOVE_EFFECTS;
else
return BEST_MOVE_EFFECTS;
return score;
}
// AI_FLAG_CHECK_VIABILITY - Chooses best possible move to hit player