mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-30 14:20:42 +01:00
AI logic for Charge
This commit is contained in:
parent
e14afd8957
commit
b8ea412e61
@ -985,8 +985,10 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||||||
score -= 20;
|
score -= 20;
|
||||||
else if (!HasMoveWithType(battlerAtk, TYPE_ELECTRIC))
|
else if (!HasMoveWithType(battlerAtk, TYPE_ELECTRIC))
|
||||||
score -= 10;
|
score -= 10;
|
||||||
|
#if B_CHARGE_SPDEF_RAISE >= GEN_5
|
||||||
else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPDEF))
|
else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPDEF))
|
||||||
score -= 5;
|
score -= 5;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case EFFECT_QUIVER_DANCE:
|
case EFFECT_QUIVER_DANCE:
|
||||||
case EFFECT_GEOMANCY:
|
case EFFECT_GEOMANCY:
|
||||||
@ -4051,8 +4053,9 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||||||
case EFFECT_CHARGE:
|
case EFFECT_CHARGE:
|
||||||
if (HasDamagingMoveOfType(battlerAtk, TYPE_ELECTRIC))
|
if (HasDamagingMoveOfType(battlerAtk, TYPE_ELECTRIC))
|
||||||
score += 2;
|
score += 2;
|
||||||
|
#if B_CHARGE_SPDEF_RAISE >= GEN_5
|
||||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPDEF, &score);
|
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPDEF, &score);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case EFFECT_TAUNT:
|
case EFFECT_TAUNT:
|
||||||
if (IS_MOVE_STATUS(predictedMove))
|
if (IS_MOVE_STATUS(predictedMove))
|
||||||
|
@ -2063,7 +2063,9 @@ bool32 IsStatRaisingEffect(u16 effect)
|
|||||||
case EFFECT_EVASION_UP_2:
|
case EFFECT_EVASION_UP_2:
|
||||||
case EFFECT_MINIMIZE:
|
case EFFECT_MINIMIZE:
|
||||||
case EFFECT_DEFENSE_CURL:
|
case EFFECT_DEFENSE_CURL:
|
||||||
|
#if B_CHARGE_SPDEF_RAISE >= GEN_5
|
||||||
case EFFECT_CHARGE:
|
case EFFECT_CHARGE:
|
||||||
|
#endif
|
||||||
case EFFECT_CALM_MIND:
|
case EFFECT_CALM_MIND:
|
||||||
case EFFECT_COSMIC_POWER:
|
case EFFECT_COSMIC_POWER:
|
||||||
case EFFECT_DRAGON_DANCE:
|
case EFFECT_DRAGON_DANCE:
|
||||||
|
Loading…
Reference in New Issue
Block a user