Revert "Chilly Reception AI" (#5270)

This commit is contained in:
Pawkkie 2024-08-26 19:58:15 -04:00 committed by GitHub
parent 74c309e2b0
commit e9c8bd0548
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 19 deletions

View file

@ -1739,14 +1739,6 @@ static s32 AI_CheckBadMove(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
break;
case EFFECT_HIT_ESCAPE:
break;
case EFFECT_CHILLY_RECEPTION:
if (CountUsablePartyMons(battlerAtk) == 0)
ADJUST_SCORE(-10);
else if (weather & (B_WEATHER_SNOW | B_WEATHER_PRIMAL_ANY) || IsMoveEffectWeather(aiData->partnerMove))
ADJUST_SCORE(-8);
else if (weather & B_WEATHER_HAIL)
ADJUST_SCORE(-2); // mainly to prevent looping between hail and snow
break;
case EFFECT_BELLY_DRUM:
case EFFECT_FILLET_AWAY:
if (aiData->abilities[battlerAtk] == ABILITY_CONTRARY)
@ -2781,7 +2773,6 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
case EFFECT_SNOWSCAPE:
case EFFECT_RAIN_DANCE:
case EFFECT_SANDSTORM:
case EFFECT_CHILLY_RECEPTION:
if (IsMoveEffectWeather(move))
ADJUST_SCORE(-10);
break;
@ -2861,7 +2852,6 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
}
break;
case EFFECT_SNOWSCAPE:
case EFFECT_CHILLY_RECEPTION:
if (IsBattlerAlive(battlerAtkPartner)
&& ShouldSetSnow(battlerAtkPartner, atkPartnerAbility, atkPartnerHoldEffect))
{
@ -2879,7 +2869,7 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
switch (atkPartnerAbility)
{
case ABILITY_ANGER_POINT:
if (gMovesInfo[move].alwaysCriticalHit == TRUE
if (gMovesInfo[move].alwaysCriticalHit == TRUE
&& BattlerStatCanRise(battlerAtkPartner, atkPartnerAbility, STAT_ATK)
&& AI_IsFaster(battlerAtk, battlerAtkPartner, move)
&& !CanIndexMoveFaintTarget(battlerAtk, battlerAtkPartner, AI_THINKING_STRUCT->movesetIndex, 1))
@ -3640,7 +3630,6 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move)
//fallthrough
case EFFECT_HIT_ESCAPE:
case EFFECT_PARTING_SHOT:
case EFFECT_CHILLY_RECEPTION:
if (!IsDoubleBattle())
{
switch (ShouldPivot(battlerAtk, battlerDef, aiData->abilities[battlerDef], move, movesetIndex))
@ -4899,7 +4888,6 @@ static s32 AI_SetupFirstTurn(u32 battlerAtk, u32 battlerDef, u32 move, s32 score
case EFFECT_SANDSTORM:
case EFFECT_HAIL:
case EFFECT_SNOWSCAPE:
case EFFECT_CHILLY_RECEPTION:
case EFFECT_GEOMANCY:
case EFFECT_VICTORY_DANCE:
ADJUST_SCORE(DECENT_EFFECT);

View file

@ -2000,7 +2000,7 @@ static u32 GetBestMonIntegrated(struct Pokemon *party, int firstId, int lastId,
}
// If ace mon is the last available Pokemon and U-Turn/Volt Switch was used - switch to the mon.
if (aceMonId != PARTY_SIZE
&& (gMovesInfo[gLastUsedMove].effect == EFFECT_HIT_ESCAPE || gMovesInfo[gLastUsedMove].effect == EFFECT_PARTING_SHOT || gMovesInfo[gLastUsedMove].effect == EFFECT_BATON_PASS || gMovesInfo[gLastUsedMove].effect == EFFECT_CHILLY_RECEPTION))
&& (gMovesInfo[gLastUsedMove].effect == EFFECT_HIT_ESCAPE || gMovesInfo[gLastUsedMove].effect == EFFECT_PARTING_SHOT || gMovesInfo[gLastUsedMove].effect == EFFECT_BATON_PASS))
return aceMonId;
return PARTY_SIZE;

View file

@ -3263,8 +3263,7 @@ bool32 IsMoveEffectWeather(u32 move)
|| gMovesInfo[move].effect == EFFECT_RAIN_DANCE
|| gMovesInfo[move].effect == EFFECT_SANDSTORM
|| gMovesInfo[move].effect == EFFECT_HAIL
|| gMovesInfo[move].effect == EFFECT_SNOWSCAPE
|| gMovesInfo[move].effect == EFFECT_CHILLY_RECEPTION))
|| gMovesInfo[move].effect == EFFECT_SNOWSCAPE))
return TRUE;
return FALSE;
}

View file

@ -64,7 +64,7 @@ AI_SINGLE_BATTLE_TEST("AI_FLAG_SEQUENCE_SWITCHING: Roar and Dragon Tail still fo
}
}
AI_SINGLE_BATTLE_TEST("AI_FLAG_SEQUENCE_SWITCHING: AI will always switch into lowest party index after U-Turn, Parting Shot, Baton Pass, and Chilly Reception")
AI_SINGLE_BATTLE_TEST("AI_FLAG_SEQUENCE_SWITCHING: AI will always switch into lowest party index after U-Turn, Parting Shot, and Baton Pass")
{
u32 j, aiSequenceSwitchingFlag = 0, move = MOVE_NONE;
@ -72,7 +72,6 @@ AI_SINGLE_BATTLE_TEST("AI_FLAG_SEQUENCE_SWITCHING: AI will always switch into lo
MOVE_U_TURN,
MOVE_PARTING_SHOT,
MOVE_BATON_PASS,
MOVE_CHILLY_RECEPTION,
};
for (j = 0; j < ARRAY_COUNT(switchMoves); j++)
@ -85,7 +84,6 @@ AI_SINGLE_BATTLE_TEST("AI_FLAG_SEQUENCE_SWITCHING: AI will always switch into lo
ASSUME(gMovesInfo[MOVE_U_TURN].effect == EFFECT_HIT_ESCAPE);
ASSUME(gMovesInfo[MOVE_PARTING_SHOT].effect == EFFECT_PARTING_SHOT);
ASSUME(gMovesInfo[MOVE_BATON_PASS].effect == EFFECT_BATON_PASS);
ASSUME(gMovesInfo[MOVE_CHILLY_RECEPTION].effect == EFFECT_CHILLY_RECEPTION);
AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT | aiSequenceSwitchingFlag);
PLAYER(SPECIES_SWELLOW) { Level (50); }
OPPONENT(SPECIES_MACHOP) { Level(1); Moves(move); }