AI burn score fixes and improvements (#5356)
* Burn score fixes * Remove CanTargetFaintAi check
This commit is contained in:
parent
3cfc0004b6
commit
4c49dfdd1d
1 changed files with 7 additions and 4 deletions
|
@ -3744,11 +3744,14 @@ void IncreaseBurnScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score)
|
||||||
|
|
||||||
if (AI_CanBurn(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove))
|
if (AI_CanBurn(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove))
|
||||||
{
|
{
|
||||||
ADJUST_SCORE_PTR(WEAK_EFFECT); // burning is good
|
if (HasMoveWithCategory(battlerDef, DAMAGE_CATEGORY_PHYSICAL)
|
||||||
if (HasMoveWithCategory(battlerDef, DAMAGE_CATEGORY_PHYSICAL))
|
|| (!(AI_THINKING_STRUCT->aiFlags[battlerAtk] & AI_FLAG_OMNISCIENT) // Not Omniscient but expects physical attacker
|
||||||
|
&& gSpeciesInfo[gBattleMons[battlerDef].species].baseAttack >= gSpeciesInfo[gBattleMons[battlerDef].species].baseSpAttack + 10))
|
||||||
{
|
{
|
||||||
if (CanTargetFaintAi(battlerDef, battlerAtk))
|
if (gMovesInfo[GetBestDmgMoveFromBattler(battlerDef, battlerAtk)].category == DAMAGE_CATEGORY_PHYSICAL)
|
||||||
ADJUST_SCORE_PTR(DECENT_EFFECT); // burning the target to stay alive is cool
|
ADJUST_SCORE_PTR(DECENT_EFFECT);
|
||||||
|
else
|
||||||
|
ADJUST_SCORE_PTR(WEAK_EFFECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HasMoveEffectANDArg(battlerAtk, EFFECT_DOUBLE_POWER_ON_ARG_STATUS, STATUS1_BURN)
|
if (HasMoveEffectANDArg(battlerAtk, EFFECT_DOUBLE_POWER_ON_ARG_STATUS, STATUS1_BURN)
|
||||||
|
|
Loading…
Reference in a new issue