Split Sheer Force tests by gen instead of by four (#7260)
This commit is contained in:
parent
38eb3461b9
commit
90601792b9
@ -609,12 +609,12 @@ static inline bool32 IsMoveSheerForceBoosted(u32 move)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Test split into four parts that handles ~1/4 of all moves each
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost 1")
|
||||
// Tests split by generation
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen1)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = 1; j < MOVES_COUNT; j += 4)
|
||||
for (u32 j = MOVE_POUND; j < MOVES_COUNT_GEN1; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
@ -692,171 +692,594 @@ DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost 2")
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen2)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = 2; j < MOVES_COUNT; j += 4)
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost 3")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = 3; j < MOVES_COUNT; j += 4)
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost 4")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = 4; j < MOVES_COUNT; j += 4)
|
||||
for (u32 j = MOVE_SKETCH; j < MOVES_COUNT_GEN2; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
}
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen3)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = MOVE_FAKE_OUT; j < MOVES_COUNT_GEN3; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
}
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen4)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = MOVE_ROOST; j < MOVES_COUNT_GEN4; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
}
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen5)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = MOVE_HONE_CLAWS; j < MOVES_COUNT_GEN5; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
}
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen6)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = MOVE_FLYING_PRESS; j < MOVES_COUNT_GEN6; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
}
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen7)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = MOVE_SHORE_UP; j < MOVES_COUNT_GEN7; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
}
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen8)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = MOVE_DYNAMAX_CANNON; j < MOVES_COUNT_GEN8; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
}
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_STEELIX) { Ability(ABILITY_SHEER_FORCE); Item(ITEM_BLUK_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_STEELIX) { Ability(ABILITY_STURDY); Item(ITEM_BLUK_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_TELEPATHY); Level(100); Item(ITEM_BLUK_BERRY); }
|
||||
} WHEN {
|
||||
if (move == MOVE_ALLURING_VOICE || move == MOVE_BURNING_JEALOUSY) // Alluring Voice requires the target to boost stats to have an effect
|
||||
TURN { MOVE(opponentRight, MOVE_AGILITY); MOVE(playerRight, MOVE_AGILITY); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_UPPER_HAND) // Upper Hand requires the target to be using a damaging priority move
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft); MOVE(playerRight, move, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_COUNTER || move == MOVE_UPPER_HAND)
|
||||
TURN { MOVE(opponentRight, MOVE_QUICK_ATTACK, target: playerLeft);
|
||||
MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentLeft);
|
||||
MOVE(playerLeft, move, target: opponentRight);
|
||||
MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_MIRROR_COAT || move == MOVE_METAL_BURST)
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_SUCKER_PUNCH || move == MOVE_THUNDERCLAP)
|
||||
TURN { MOVE(opponentRight, MOVE_SCRATCH, target: playerLeft); MOVE(playerRight, MOVE_SCRATCH, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
else if (move == MOVE_DREAM_EATER)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_HYPNOSIS, target: opponentRight); MOVE(opponentLeft, MOVE_HYPNOSIS, target: playerRight); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SNORE)
|
||||
{
|
||||
TURN { MOVE(opponentRight, MOVE_HYPNOSIS, target: playerLeft); MOVE(playerRight, MOVE_HYPNOSIS, target: opponentLeft); MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else if (move == MOVE_SPIT_UP || move == MOVE_LAST_RESORT)
|
||||
{
|
||||
TURN { MOVE(playerLeft, MOVE_STOCKPILE); MOVE(opponentLeft, MOVE_STOCKPILE); }
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
}
|
||||
else
|
||||
TURN { MOVE(playerLeft, move, target: opponentRight); MOVE(opponentLeft, move, target: playerRight); }
|
||||
switch (GetMoveEffect(move))
|
||||
{
|
||||
case EFFECT_TWO_TURNS_ATTACK:
|
||||
case EFFECT_SEMI_INVULNERABLE:
|
||||
case EFFECT_SOLAR_BEAM:
|
||||
case EFFECT_SKY_DROP:
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_FUTURE_SIGHT:
|
||||
TURN { ; }
|
||||
TURN { ; }
|
||||
break;
|
||||
case EFFECT_BIDE:
|
||||
TURN { MOVE(opponentRight, MOVE_WATER_GUN, target: playerLeft); MOVE(playerRight, MOVE_WATER_GUN, target: opponentLeft); SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
TURN { SKIP_TURN(playerLeft); SKIP_TURN(opponentLeft); }
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} SCENE {
|
||||
if (GetMoveEffect(move) != EFFECT_FUTURE_SIGHT)
|
||||
{
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
}
|
||||
else
|
||||
{
|
||||
HP_BAR(playerRight, captureDamage: &damage2);
|
||||
HP_BAR(opponentRight, captureDamage: &damage1);
|
||||
}
|
||||
} THEN {
|
||||
if (IsMoveSheerForceBoosted(move))
|
||||
EXPECT_GT(damage1, damage2);
|
||||
else
|
||||
EXPECT_EQ(damage2, damage1);
|
||||
}
|
||||
}
|
||||
|
||||
// Last test should always go up to MOVES_COUNT to catch users moves
|
||||
DOUBLE_BATTLE_TEST("Sheer Force only boosts the damage of moves it's supposed to boost (Gen9)")
|
||||
{
|
||||
s16 damage1, damage2;
|
||||
u32 move = 0;
|
||||
for (u32 j = MOVE_TERA_BLAST; j < MOVES_COUNT; j++)
|
||||
{
|
||||
if (GetMoveCategory(j) != DAMAGE_CATEGORY_STATUS && !IgnoreMoveForSheerForceBoost(j))
|
||||
PARAMETRIZE { move = j; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user