mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Added AI conditionals for the new move effects in this batch
This commit is contained in:
parent
0a00942a26
commit
9a6bdfb74f
@ -1486,6 +1486,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
}
|
||||
break;
|
||||
case EFFECT_SPIKES:
|
||||
case EFFECT_CEASELESS_EDGE:
|
||||
if (gSideTimers[GetBattlerSide(battlerDef)].spikesAmount >= 3)
|
||||
score -= 10;
|
||||
else if (PartnerMoveIsSameNoTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove)
|
||||
@ -1493,6 +1494,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
score -= 10; // only one mon needs to set up the last layer of Spikes
|
||||
break;
|
||||
case EFFECT_STEALTH_ROCK:
|
||||
case EFFECT_STONE_AXE:
|
||||
if (gSideTimers[GetBattlerSide(battlerDef)].stealthRockAmount > 0
|
||||
|| PartnerMoveIsSameNoTarget(BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove)) //Only one mon needs to set up Stealth Rocks
|
||||
score -= 10;
|
||||
@ -3472,6 +3474,7 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
break;
|
||||
case EFFECT_TOXIC:
|
||||
case EFFECT_POISON:
|
||||
case EFFECT_BARB_BARRAGE:
|
||||
IncreasePoisonScore(battlerAtk, battlerDef, move, &score);
|
||||
break;
|
||||
case EFFECT_LIGHT_SCREEN:
|
||||
@ -3865,7 +3868,9 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
break;
|
||||
|
||||
case EFFECT_SPIKES:
|
||||
case EFFECT_CEASELESS_EDGE:
|
||||
case EFFECT_STEALTH_ROCK:
|
||||
case EFFECT_STONE_AXE:
|
||||
case EFFECT_STICKY_WEB:
|
||||
case EFFECT_TOXIC_SPIKES:
|
||||
if (AI_DATA->abilities[battlerDef] == ABILITY_MAGIC_BOUNCE || CountUsablePartyMons(battlerDef) == 0)
|
||||
@ -4596,6 +4601,10 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
break;
|
||||
}*/
|
||||
break;
|
||||
case EFFECT_DIRE_CLAW:
|
||||
if (gBattleMons[battlerDef].status1 & STATUS1_NONE)
|
||||
score += 3;
|
||||
break;
|
||||
case EFFECT_FEINT:
|
||||
if (gBattleMoves[predictedMove].effect == EFFECT_PROTECT)
|
||||
score += 3;
|
||||
@ -4900,6 +4909,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
case EFFECT_HAIL:
|
||||
case EFFECT_GEOMANCY:
|
||||
case EFFECT_VICTORY_DANCE:
|
||||
case EFFECT_STONE_AXE:
|
||||
score += 2;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user