add test
This commit is contained in:
parent
1ca4676c4c
commit
aa50bfef28
1 changed files with 23 additions and 0 deletions
|
@ -955,3 +955,26 @@ AI_DOUBLE_BATTLE_TEST("AI will the see a corresponding absorbing ability on part
|
||||||
TURN { EXPECT_MOVE(opponentLeft, MOVE_TACKLE); }
|
TURN { EXPECT_MOVE(opponentLeft, MOVE_TACKLE); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AI_SINGLE_BATTLE_TEST("AI calculates guaranteed criticals and detects critical immunity")
|
||||||
|
{
|
||||||
|
u32 ability;
|
||||||
|
PARAMETRIZE { ability = ABILITY_SWIFT_SWIM; }
|
||||||
|
PARAMETRIZE { ability = ABILITY_SHELL_ARMOR; }
|
||||||
|
|
||||||
|
GIVEN {
|
||||||
|
ASSUME(gMovesInfo[MOVE_STORM_THROW].alwaysCriticalHit);
|
||||||
|
ASSUME(gMovesInfo[MOVE_STORM_THROW].power == 60);
|
||||||
|
ASSUME(gMovesInfo[MOVE_BRICK_BREAK].power == 75);
|
||||||
|
ASSUME(gMovesInfo[MOVE_STORM_THROW].type == gMovesInfo[MOVE_BRICK_BREAK].type);
|
||||||
|
ASSUME(gMovesInfo[MOVE_STORM_THROW].category == gMovesInfo[MOVE_BRICK_BREAK].category);
|
||||||
|
AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT | AI_FLAG_OMNISCIENT);
|
||||||
|
PLAYER(SPECIES_OMASTAR) { Ability(ability); }
|
||||||
|
OPPONENT(SPECIES_WOBBUFFET) { Moves(MOVE_STORM_THROW, MOVE_BRICK_BREAK); }
|
||||||
|
} WHEN {
|
||||||
|
if (ability == ABILITY_SHELL_ARMOR)
|
||||||
|
TURN { EXPECT_MOVE(opponent, MOVE_BRICK_BREAK); }
|
||||||
|
else
|
||||||
|
TURN { EXPECT_MOVE(opponent, MOVE_STORM_THROW); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue