From 33d5cbd7a284dce2234de8bb6bff615accbf5049 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 1 Sep 2024 17:13:58 -0400 Subject: [PATCH] Moved ASSUMEs to inside GIVEN blocks (#5308) --- test/battle/ability/anger_point.c | 13 +++----- test/battle/ability/galvanize.c | 6 ++-- test/battle/ability/harvest.c | 20 ++++++------ test/battle/ability/pickup.c | 18 +++++------ test/battle/ability/wind_rider.c | 2 +- test/battle/form_change/status.c | 10 +++--- test/battle/gimmick/dynamax.c | 2 +- test/battle/move.c | 14 ++++---- test/battle/move_effect/absorb.c | 2 +- test/battle/move_effect/accuracy_down.c | 2 +- test/battle/move_effect/dream_eater.c | 2 +- test/battle/move_effect/evasion_up.c | 2 +- test/battle/move_effect/future_sight.c | 4 +-- test/battle/move_effect/heal_bell.c | 3 +- test/battle/move_effect/instruct.c | 22 ++++++------- test/battle/move_effect/reflect_type.c | 32 +++++++++---------- .../move_effects_combined/triple_arrows.c | 4 +-- 17 files changed, 77 insertions(+), 81 deletions(-) diff --git a/test/battle/ability/anger_point.c b/test/battle/ability/anger_point.c index 270d66f28e..ddfa3c841d 100644 --- a/test/battle/ability/anger_point.c +++ b/test/battle/ability/anger_point.c @@ -3,9 +3,8 @@ SINGLE_BATTLE_TEST("Anger Point raises Attack stage to maximum after receiving a critical hit") { - ASSUME(gMovesInfo[MOVE_FROST_BREATH].alwaysCriticalHit); - GIVEN { + ASSUME(gMovesInfo[MOVE_FROST_BREATH].alwaysCriticalHit); PLAYER(SPECIES_PRIMEAPE) { Ability(ABILITY_ANGER_POINT); } OPPONENT(SPECIES_SNORUNT); } WHEN { @@ -23,10 +22,9 @@ SINGLE_BATTLE_TEST("Anger Point raises Attack stage to maximum after receiving a SINGLE_BATTLE_TEST("Anger Point does not trigger when already at maximum Attack stage") { - ASSUME(gMovesInfo[MOVE_FROST_BREATH].alwaysCriticalHit); - ASSUME(gMovesInfo[MOVE_BELLY_DRUM].effect == EFFECT_BELLY_DRUM); - GIVEN { + ASSUME(gMovesInfo[MOVE_FROST_BREATH].alwaysCriticalHit); + ASSUME(gMovesInfo[MOVE_BELLY_DRUM].effect == EFFECT_BELLY_DRUM); PLAYER(SPECIES_PRIMEAPE) { Ability(ABILITY_ANGER_POINT); Speed(2); } OPPONENT(SPECIES_SNORUNT) { Speed(1); } } WHEN { @@ -51,10 +49,9 @@ TO_DO_BATTLE_TEST("Anger Point triggers when a substitute takes the hit (Gen4)") SINGLE_BATTLE_TEST("Anger Point does not trigger when a substitute takes the hit (Gen5+)") { - ASSUME(gMovesInfo[MOVE_FROST_BREATH].alwaysCriticalHit); - ASSUME(gMovesInfo[MOVE_SUBSTITUTE].effect == EFFECT_SUBSTITUTE); - GIVEN { + ASSUME(gMovesInfo[MOVE_FROST_BREATH].alwaysCriticalHit); + ASSUME(gMovesInfo[MOVE_SUBSTITUTE].effect == EFFECT_SUBSTITUTE); PLAYER(SPECIES_PRIMEAPE) { Ability(ABILITY_ANGER_POINT); Speed(2); } OPPONENT(SPECIES_SNORUNT) { Speed(1); } } WHEN { diff --git a/test/battle/ability/galvanize.c b/test/battle/ability/galvanize.c index 55dfd7287a..7f604f3dac 100644 --- a/test/battle/ability/galvanize.c +++ b/test/battle/ability/galvanize.c @@ -28,10 +28,10 @@ SINGLE_BATTLE_TEST("Galvanize can not turn certain moves into Electric type move PARAMETRIZE { move = MOVE_WEATHER_BALL; } PARAMETRIZE { move = MOVE_MULTI_ATTACK; } - ASSUME(gMovesInfo[MOVE_HIDDEN_POWER].effect == EFFECT_HIDDEN_POWER); - ASSUME(gMovesInfo[MOVE_WEATHER_BALL].effect == EFFECT_WEATHER_BALL); - ASSUME(gMovesInfo[MOVE_MULTI_ATTACK].effect == EFFECT_CHANGE_TYPE_ON_ITEM); GIVEN { + ASSUME(gMovesInfo[MOVE_HIDDEN_POWER].effect == EFFECT_HIDDEN_POWER); + ASSUME(gMovesInfo[MOVE_WEATHER_BALL].effect == EFFECT_WEATHER_BALL); + ASSUME(gMovesInfo[MOVE_MULTI_ATTACK].effect == EFFECT_CHANGE_TYPE_ON_ITEM); PLAYER(SPECIES_KRABBY); OPPONENT(SPECIES_GEODUDE_ALOLAN) { Ability(ABILITY_GALVANIZE); } } WHEN { diff --git a/test/battle/ability/harvest.c b/test/battle/ability/harvest.c index f19e0715de..03e13b394e 100644 --- a/test/battle/ability/harvest.c +++ b/test/battle/ability/harvest.c @@ -60,8 +60,8 @@ SINGLE_BATTLE_TEST("Harvest doesn't always restore a Berry if Cloud Nine/Air Loc SINGLE_BATTLE_TEST("Harvest restores a Berry even after being switched out and back in") { - ASSUME(gMovesInfo[MOVE_PARTING_SHOT].effect == EFFECT_PARTING_SHOT); GIVEN { + ASSUME(gMovesInfo[MOVE_PARTING_SHOT].effect == EFFECT_PARTING_SHOT); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); MaxHP(500); HP(251); Item(ITEM_SITRUS_BERRY); } OPPONENT(SPECIES_WOBBUFFET); @@ -79,8 +79,8 @@ SINGLE_BATTLE_TEST("Harvest restores a Berry even after being switched out and b SINGLE_BATTLE_TEST("Harvest restores a Berry consumed by Fling") { - ASSUME(gMovesInfo[MOVE_FLING].effect == EFFECT_FLING); GIVEN { + ASSUME(gMovesInfo[MOVE_FLING].effect == EFFECT_FLING); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -96,8 +96,8 @@ SINGLE_BATTLE_TEST("Harvest restores a Berry consumed by Fling") SINGLE_BATTLE_TEST("Harvest restores a Berry consumed by Natural Gift") { - ASSUME(gMovesInfo[MOVE_NATURAL_GIFT].effect == EFFECT_NATURAL_GIFT); GIVEN { + ASSUME(gMovesInfo[MOVE_NATURAL_GIFT].effect == EFFECT_NATURAL_GIFT); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -116,8 +116,8 @@ TO_DO_BATTLE_TEST("Harvest only works once per turn"); // Check for berries that SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when destroyed by Incinerate") { PASSES_RANDOMLY(1, 1, RNG_HARVEST); - ASSUME(MoveHasAdditionalEffect(MOVE_INCINERATE, MOVE_EFFECT_INCINERATE)); GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_INCINERATE, MOVE_EFFECT_INCINERATE)); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -134,8 +134,8 @@ SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when destroyed by Incinerate SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when knocked off by Knock Off") { PASSES_RANDOMLY(1, 1, RNG_HARVEST); - ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF)); GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF)); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -152,8 +152,8 @@ SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when knocked off by Knock Of SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when eaten by Bug Bite/Pluck") { PASSES_RANDOMLY(1, 1, RNG_HARVEST); - ASSUME(MoveHasAdditionalEffect(MOVE_BUG_BITE, MOVE_EFFECT_BUG_BITE)); GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_BUG_BITE, MOVE_EFFECT_BUG_BITE)); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -208,8 +208,8 @@ DOUBLE_BATTLE_TEST("Harvest order is affected by speed") SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when transfered to another Pokémon") { - ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); GIVEN { + ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -225,8 +225,8 @@ SINGLE_BATTLE_TEST("Harvest doesn't restore a Berry when transfered to another P SINGLE_BATTLE_TEST("Harvest can restore a Berry that was transferred from another Pokémon") { - ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); GIVEN { + ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); PLAYER(SPECIES_TORKOAL) { Ability(ABILITY_DROUGHT); Item(ITEM_SITRUS_BERRY); } OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); HP(100); MaxHP(500); } } WHEN { @@ -244,9 +244,9 @@ SINGLE_BATTLE_TEST("Harvest can restore a Berry that was transferred from anothe SINGLE_BATTLE_TEST("Harvest can only restore the newest berry consumed that was transferred from another Pokémon instead of its original Berry") { - ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); - ASSUME(gItemsInfo[ITEM_APICOT_BERRY].holdEffect == HOLD_EFFECT_SP_DEFENSE_UP); GIVEN { + ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); + ASSUME(gItemsInfo[ITEM_APICOT_BERRY].holdEffect == HOLD_EFFECT_SP_DEFENSE_UP); PLAYER(SPECIES_TORKOAL) { Ability(ABILITY_DROUGHT); Item(ITEM_SITRUS_BERRY); } OPPONENT(SPECIES_EXEGGUTOR) { Ability(ABILITY_HARVEST); HP(100); MaxHP(500); Item(ITEM_APICOT_BERRY); } } WHEN { diff --git a/test/battle/ability/pickup.c b/test/battle/ability/pickup.c index 57f6429feb..927e1b3468 100644 --- a/test/battle/ability/pickup.c +++ b/test/battle/ability/pickup.c @@ -43,8 +43,8 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant the user their item") SINGLE_BATTLE_TEST("Pickup doesn't grant another Pokémon's popped Air Balloon") { - ASSUME(gItemsInfo[ITEM_AIR_BALLOON].holdEffect == HOLD_EFFECT_AIR_BALLOON); GIVEN { + ASSUME(gItemsInfo[ITEM_AIR_BALLOON].holdEffect == HOLD_EFFECT_AIR_BALLOON); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_AIR_BALLOON); } } WHEN { @@ -102,8 +102,8 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant an item after its holder faints") SINGLE_BATTLE_TEST("Pickup doesn't grant an used item if holder is replaced") { - ASSUME(gMovesInfo[MOVE_PARTING_SHOT].effect == EFFECT_PARTING_SHOT); GIVEN { + ASSUME(gMovesInfo[MOVE_PARTING_SHOT].effect == EFFECT_PARTING_SHOT); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { MaxHP(300); HP(151); Item(ITEM_SITRUS_BERRY); } @@ -127,8 +127,8 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant an used item if holder is replaced") SINGLE_BATTLE_TEST("Pickup doesn't grant an item if it destroyed the item with Incinerate") { - ASSUME(MoveHasAdditionalEffect(MOVE_INCINERATE, MOVE_EFFECT_INCINERATE)); GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_INCINERATE, MOVE_EFFECT_INCINERATE)); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -146,8 +146,8 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant an item if it destroyed the item with I SINGLE_BATTLE_TEST("Pickup doesn't grant an item if it knocked off that item") { - ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF)); GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_KNOCK_OFF, MOVE_EFFECT_KNOCK_OFF)); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -165,8 +165,8 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant an item if it knocked off that item") SINGLE_BATTLE_TEST("Pickup doesn't grant an item if the user eats it with Bug Bite/Pluck") { - ASSUME(MoveHasAdditionalEffect(MOVE_BUG_BITE, MOVE_EFFECT_BUG_BITE)); GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_BUG_BITE, MOVE_EFFECT_BUG_BITE)); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -184,8 +184,8 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant an item if the user eats it with Bug Bi SINGLE_BATTLE_TEST("Pickup doesn't grant an used item if its user already restored it") { - ASSUME(gMovesInfo[MOVE_RECYCLE].effect == EFFECT_RECYCLE); GIVEN { + ASSUME(gMovesInfo[MOVE_RECYCLE].effect == EFFECT_RECYCLE); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { MaxHP(100); HP(51); Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -204,8 +204,8 @@ SINGLE_BATTLE_TEST("Pickup doesn't grant an used item if its user already restor SINGLE_BATTLE_TEST("Pickup restores an item that has been Flinged") { - ASSUME(gMovesInfo[MOVE_FLING].effect == EFFECT_FLING); GIVEN { + ASSUME(gMovesInfo[MOVE_FLING].effect == EFFECT_FLING); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -221,8 +221,8 @@ SINGLE_BATTLE_TEST("Pickup restores an item that has been Flinged") SINGLE_BATTLE_TEST("Pickup restores an item that was used by Natural Gift") { - ASSUME(gMovesInfo[MOVE_NATURAL_GIFT].effect == EFFECT_NATURAL_GIFT); GIVEN { + ASSUME(gMovesInfo[MOVE_NATURAL_GIFT].effect == EFFECT_NATURAL_GIFT); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); } } WHEN { @@ -258,8 +258,8 @@ DOUBLE_BATTLE_TEST("Pickup triggers based on Speed order") DOUBLE_BATTLE_TEST("Pickup grants a random item used by another Pokémon") { PASSES_RANDOMLY(1, 3, RNG_PICKUP); - ASSUME(gItemsInfo[ITEM_WHITE_HERB].holdEffect == HOLD_EFFECT_RESTORE_STATS); GIVEN { + ASSUME(gItemsInfo[ITEM_WHITE_HERB].holdEffect == HOLD_EFFECT_RESTORE_STATS); PLAYER(SPECIES_ZIGZAGOON) { Ability(ABILITY_PICKUP); } PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_WHITE_HERB); } OPPONENT(SPECIES_WOBBUFFET) { MaxHP(100); HP(51); Item(ITEM_SITRUS_BERRY); } diff --git a/test/battle/ability/wind_rider.c b/test/battle/ability/wind_rider.c index 57e6f0d275..cd4dbeed1f 100644 --- a/test/battle/ability/wind_rider.c +++ b/test/battle/ability/wind_rider.c @@ -107,8 +107,8 @@ SINGLE_BATTLE_TEST("Wind Rider activates when it's no longer effected by Neutral SINGLE_BATTLE_TEST("Wind Rider absorbs Wind moves and raises Attack by one stage") { - ASSUME(gMovesInfo[MOVE_GUST].windMove == TRUE); GIVEN { + ASSUME(gMovesInfo[MOVE_GUST].windMove == TRUE); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_BRAMBLIN) { Ability(ABILITY_WIND_RIDER); } } WHEN { diff --git a/test/battle/form_change/status.c b/test/battle/form_change/status.c index 0b94202bbd..612c125497 100644 --- a/test/battle/form_change/status.c +++ b/test/battle/form_change/status.c @@ -11,12 +11,12 @@ SINGLE_BATTLE_TEST("Shaymin-Sky reverts to Shaymin-Land when frozen or frostbitt PARAMETRIZE { move = MOVE_POISON_STING; } PARAMETRIZE { move = MOVE_POISON_FANG; } - ASSUME(MoveHasAdditionalEffect(MOVE_POWDER_SNOW, MOVE_EFFECT_FREEZE_OR_FROSTBITE)); - ASSUME(MoveHasAdditionalEffect(MOVE_EMBER, MOVE_EFFECT_BURN)); - ASSUME(MoveHasAdditionalEffect(MOVE_THUNDERSHOCK, MOVE_EFFECT_PARALYSIS)); - ASSUME(MoveHasAdditionalEffect(MOVE_POISON_STING, MOVE_EFFECT_POISON)); - ASSUME(MoveHasAdditionalEffect(MOVE_POISON_FANG, MOVE_EFFECT_TOXIC)); GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_POWDER_SNOW, MOVE_EFFECT_FREEZE_OR_FROSTBITE)); + ASSUME(MoveHasAdditionalEffect(MOVE_EMBER, MOVE_EFFECT_BURN)); + ASSUME(MoveHasAdditionalEffect(MOVE_THUNDERSHOCK, MOVE_EFFECT_PARALYSIS)); + ASSUME(MoveHasAdditionalEffect(MOVE_POISON_STING, MOVE_EFFECT_POISON)); + ASSUME(MoveHasAdditionalEffect(MOVE_POISON_FANG, MOVE_EFFECT_TOXIC)); PLAYER(SPECIES_SHAYMIN_SKY); OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/gimmick/dynamax.c b/test/battle/gimmick/dynamax.c index d0360918c8..599ae4d454 100644 --- a/test/battle/gimmick/dynamax.c +++ b/test/battle/gimmick/dynamax.c @@ -1463,8 +1463,8 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't execute effects on fainted battler SINGLE_BATTLE_TEST("(DYNAMAX) Moxie clones can be triggered by Max Moves fainting opponents") { - ASSUME(gMovesInfo[MOVE_WATERFALL].power > 0); GIVEN { + ASSUME(gMovesInfo[MOVE_WATERFALL].power > 0); PLAYER(SPECIES_GYARADOS) { Ability(ABILITY_MOXIE); } OPPONENT(SPECIES_WOBBUFFET) { HP(1); } OPPONENT(SPECIES_WYNAUT); diff --git a/test/battle/move.c b/test/battle/move.c index 081a91712d..655895da77 100644 --- a/test/battle/move.c +++ b/test/battle/move.c @@ -85,11 +85,11 @@ DOUBLE_BATTLE_TEST("Turn order is determined randomly if priority and Speed tie PARAMETRIZE {} // Hack to make permutations legal. PASSES_RANDOMLY(24, 24, RNG_SPEED_TIE); - ASSUME(gMovesInfo[MOVE_ENDEAVOR].effect == EFFECT_ENDEAVOR); - ASSUME(gMovesInfo[MOVE_LIFE_DEW].effect == EFFECT_JUNGLE_HEALING); - ASSUME(gMovesInfo[MOVE_CRUSH_GRIP].effect == EFFECT_VARY_POWER_BASED_ON_HP); - ASSUME(gMovesInfo[MOVE_SUPER_FANG].effect == EFFECT_SUPER_FANG); GIVEN { + ASSUME(gMovesInfo[MOVE_ENDEAVOR].effect == EFFECT_ENDEAVOR); + ASSUME(gMovesInfo[MOVE_LIFE_DEW].effect == EFFECT_JUNGLE_HEALING); + ASSUME(gMovesInfo[MOVE_CRUSH_GRIP].effect == EFFECT_VARY_POWER_BASED_ON_HP); + ASSUME(gMovesInfo[MOVE_SUPER_FANG].effect == EFFECT_SUPER_FANG); PLAYER(SPECIES_WOBBUFFET) { MaxHP(480); HP(360); Defense(100); Speed(1); } PLAYER(SPECIES_WYNAUT) { Speed(1); } OPPONENT(SPECIES_WOBBUFFET) { Attack(100); Speed(1); } @@ -136,9 +136,9 @@ DOUBLE_BATTLE_TEST("Turn order is determined randomly if priority and Speed tie SINGLE_BATTLE_TEST("Critical hits occur at a 1/24 rate") { - ASSUME(B_CRIT_CHANCE >= GEN_7); PASSES_RANDOMLY(1, 24, RNG_CRITICAL_HIT); GIVEN { + ASSUME(B_CRIT_CHANCE >= GEN_7); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { @@ -150,10 +150,10 @@ SINGLE_BATTLE_TEST("Critical hits occur at a 1/24 rate") SINGLE_BATTLE_TEST("Slash's critical hits occur at a 1/8 rate") { - ASSUME(B_CRIT_CHANCE >= GEN_7); - ASSUME(gMovesInfo[MOVE_SLASH].criticalHitStage == 1); PASSES_RANDOMLY(1, 8, RNG_CRITICAL_HIT); GIVEN { + ASSUME(B_CRIT_CHANCE >= GEN_7); + ASSUME(gMovesInfo[MOVE_SLASH].criticalHitStage == 1); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/move_effect/absorb.c b/test/battle/move_effect/absorb.c index b0140a7a65..698ea41091 100644 --- a/test/battle/move_effect/absorb.c +++ b/test/battle/move_effect/absorb.c @@ -26,8 +26,8 @@ SINGLE_BATTLE_TEST("Absorb recovers 50% of the damage dealt") SINGLE_BATTLE_TEST("Absorb fails if Heal Block applies") { - ASSUME(B_HEAL_BLOCKING >= GEN_6); GIVEN { + ASSUME(B_HEAL_BLOCKING >= GEN_6); PLAYER(SPECIES_WOBBUFFET) { HP(1); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/move_effect/accuracy_down.c b/test/battle/move_effect/accuracy_down.c index a4a8ad49bf..8a015c4a67 100644 --- a/test/battle/move_effect/accuracy_down.c +++ b/test/battle/move_effect/accuracy_down.c @@ -8,9 +8,9 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Sand Attack lowers Accuracy by 1 stage") { - ASSUME(gMovesInfo[MOVE_SCRATCH].accuracy == 100); PASSES_RANDOMLY(gMovesInfo[MOVE_SCRATCH].accuracy * 3 / 4, 100, RNG_ACCURACY); GIVEN { + ASSUME(gMovesInfo[MOVE_SCRATCH].accuracy == 100); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/move_effect/dream_eater.c b/test/battle/move_effect/dream_eater.c index 4ce749b5d2..f0fd113d2b 100644 --- a/test/battle/move_effect/dream_eater.c +++ b/test/battle/move_effect/dream_eater.c @@ -39,8 +39,8 @@ SINGLE_BATTLE_TEST("Dream Eater fails on awake targets") SINGLE_BATTLE_TEST("Dream Eater fails if Heal Block applies") { - ASSUME(B_HEAL_BLOCKING >= GEN_6); GIVEN { + ASSUME(B_HEAL_BLOCKING >= GEN_6); PLAYER(SPECIES_WOBBUFFET) { HP(1); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/move_effect/evasion_up.c b/test/battle/move_effect/evasion_up.c index 4dcd92c7b3..7058694e9d 100644 --- a/test/battle/move_effect/evasion_up.c +++ b/test/battle/move_effect/evasion_up.c @@ -8,9 +8,9 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Double Team raises Evasion") { - ASSUME(gMovesInfo[MOVE_SCRATCH].accuracy == 100); PASSES_RANDOMLY(gMovesInfo[MOVE_SCRATCH].accuracy * 3 / 4, 100, RNG_ACCURACY); GIVEN { + ASSUME(gMovesInfo[MOVE_SCRATCH].accuracy == 100); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN { diff --git a/test/battle/move_effect/future_sight.c b/test/battle/move_effect/future_sight.c index fa78461a9d..778895ba58 100644 --- a/test/battle/move_effect/future_sight.c +++ b/test/battle/move_effect/future_sight.c @@ -158,9 +158,9 @@ SINGLE_BATTLE_TEST("Future Sight will miss timing if target faints by residual d SINGLE_BATTLE_TEST("Future Sight breaks Focus Sash and doesn't make the holder endure another move") { - ASSUME(gMovesInfo[MOVE_PSYCHIC].power > 0); - ASSUME(gItemsInfo[ITEM_FOCUS_SASH].holdEffect == HOLD_EFFECT_FOCUS_SASH); GIVEN { + ASSUME(gMovesInfo[MOVE_PSYCHIC].power > 0); + ASSUME(gItemsInfo[ITEM_FOCUS_SASH].holdEffect == HOLD_EFFECT_FOCUS_SASH); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_PIDGEY) { Level(1); Item(ITEM_FOCUS_SASH); } } WHEN { diff --git a/test/battle/move_effect/heal_bell.c b/test/battle/move_effect/heal_bell.c index 743af905ce..c098886a98 100644 --- a/test/battle/move_effect/heal_bell.c +++ b/test/battle/move_effect/heal_bell.c @@ -88,9 +88,8 @@ SINGLE_BATTLE_TEST("Heal Bell cures inactive soundproof Pokemon") SINGLE_BATTLE_TEST("Heal Bell cures a soundproof user") { - ASSUME(B_HEAL_BELL_SOUNDPROOF == GEN_5 || B_HEAL_BELL_SOUNDPROOF >= GEN_8); - GIVEN { + ASSUME(B_HEAL_BELL_SOUNDPROOF == GEN_5 || B_HEAL_BELL_SOUNDPROOF >= GEN_8); PLAYER(SPECIES_EXPLOUD) { Ability(ABILITY_SOUNDPROOF); Status1(STATUS1_POISON); } OPPONENT(SPECIES_WYNAUT); } WHEN { diff --git a/test/battle/move_effect/instruct.c b/test/battle/move_effect/instruct.c index 4521969920..59772ea944 100644 --- a/test/battle/move_effect/instruct.c +++ b/test/battle/move_effect/instruct.c @@ -23,8 +23,8 @@ DOUBLE_BATTLE_TEST("Instruct fails if target hasn't made a move") DOUBLE_BATTLE_TEST("Instruct fails if move is banned by Instruct") { - ASSUME(gMovesInfo[MOVE_BIDE].instructBanned == TRUE); GIVEN { + ASSUME(gMovesInfo[MOVE_BIDE].instructBanned == TRUE); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_BIDE); } OPPONENT(SPECIES_WOBBUFFET); @@ -59,8 +59,8 @@ DOUBLE_BATTLE_TEST("Instruct-called move targets the target of the move picked o DOUBLE_BATTLE_TEST("Instruct doesn't bypass sleep") { - ASSUME(gMovesInfo[MOVE_SPORE].effect == EFFECT_SLEEP); GIVEN { + ASSUME(gMovesInfo[MOVE_SPORE].effect == EFFECT_SLEEP); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_GROWL); } OPPONENT(SPECIES_WOBBUFFET); @@ -78,8 +78,8 @@ DOUBLE_BATTLE_TEST("Instruct doesn't bypass sleep") DOUBLE_BATTLE_TEST("Instruct fails if target doesn't know the last move it used") { - ASSUME(gMovesInfo[MOVE_DRAGON_DANCE].danceMove == TRUE); GIVEN { + ASSUME(gMovesInfo[MOVE_DRAGON_DANCE].danceMove == TRUE); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_ORICORIO) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_CELEBRATE); } OPPONENT(SPECIES_WOBBUFFET); @@ -99,8 +99,8 @@ DOUBLE_BATTLE_TEST("Instruct fails if target doesn't know the last move it used" DOUBLE_BATTLE_TEST("Instruct-called move fails if it can only be used on the first turn but consumes PP") { - ASSUME(gMovesInfo[MOVE_FAKE_OUT].effect == EFFECT_FIRST_TURN_ONLY); GIVEN { + ASSUME(gMovesInfo[MOVE_FAKE_OUT].effect == EFFECT_FIRST_TURN_ONLY); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_FAKE_OUT); } OPPONENT(SPECIES_WOBBUFFET); @@ -118,8 +118,8 @@ DOUBLE_BATTLE_TEST("Instruct-called move fails if it can only be used on the fir DOUBLE_BATTLE_TEST("Instruct-called move doesn't fail if tormented") { - ASSUME(gMovesInfo[MOVE_TORMENT].effect == EFFECT_TORMENT); GIVEN { + ASSUME(gMovesInfo[MOVE_TORMENT].effect == EFFECT_TORMENT); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_FAKE_OUT); } OPPONENT(SPECIES_WOBBUFFET); @@ -136,9 +136,9 @@ DOUBLE_BATTLE_TEST("Instruct-called move doesn't fail if tormented") DOUBLE_BATTLE_TEST("Instruct-called status moves don't fail if holding Assault Vest") { - ASSUME(gItemsInfo[ITEM_ASSAULT_VEST].holdEffect == HOLD_EFFECT_ASSAULT_VEST); - ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); GIVEN { + ASSUME(gItemsInfo[ITEM_ASSAULT_VEST].holdEffect == HOLD_EFFECT_ASSAULT_VEST); + ASSUME(gMovesInfo[MOVE_TRICK].effect == EFFECT_TRICK); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_TRICK); } OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_ASSAULT_VEST); } @@ -154,8 +154,8 @@ DOUBLE_BATTLE_TEST("Instruct-called status moves don't fail if holding Assault V DOUBLE_BATTLE_TEST("Instruct-called status move fails if taunted") { - ASSUME(gMovesInfo[MOVE_TAUNT].effect == EFFECT_TAUNT); GIVEN { + ASSUME(gMovesInfo[MOVE_TAUNT].effect == EFFECT_TAUNT); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_GROWL); } OPPONENT(SPECIES_WOBBUFFET); @@ -180,8 +180,8 @@ DOUBLE_BATTLE_TEST("Instruct-called status move fails if taunted") DOUBLE_BATTLE_TEST("Instruct-called moves fail if disabled") { - ASSUME(gMovesInfo[MOVE_DISABLE].effect == EFFECT_DISABLE); GIVEN { + ASSUME(gMovesInfo[MOVE_DISABLE].effect == EFFECT_DISABLE); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_GROWL); } OPPONENT(SPECIES_WOBBUFFET); @@ -200,9 +200,9 @@ DOUBLE_BATTLE_TEST("Instruct-called moves fail if disabled") DOUBLE_BATTLE_TEST("Instruct-called moves keep their priority") { - ASSUME(gMovesInfo[MOVE_QUICK_ATTACK].priority == 1); - ASSUME(gMovesInfo[MOVE_PSYCHIC_TERRAIN].effect == EFFECT_PSYCHIC_TERRAIN); GIVEN { + ASSUME(gMovesInfo[MOVE_QUICK_ATTACK].priority == 1); + ASSUME(gMovesInfo[MOVE_PSYCHIC_TERRAIN].effect == EFFECT_PSYCHIC_TERRAIN); PLAYER(SPECIES_WOBBUFFET); PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_TACKLE, MOVE_POUND, MOVE_SCRATCH, MOVE_QUICK_ATTACK); } OPPONENT(SPECIES_WOBBUFFET); diff --git a/test/battle/move_effect/reflect_type.c b/test/battle/move_effect/reflect_type.c index 32ed9520c8..0b610efe6e 100644 --- a/test/battle/move_effect/reflect_type.c +++ b/test/battle/move_effect/reflect_type.c @@ -88,11 +88,11 @@ SINGLE_BATTLE_TEST("Reflect Type does not affect any of Silvally's forms") SINGLE_BATTLE_TEST("Reflect Type does not affect Pokémon with no types") { - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); - ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[0] == TYPE_WATER); - ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[1] == TYPE_FIGHTING); GIVEN { + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[0] == TYPE_WATER); + ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[1] == TYPE_FIGHTING); PLAYER(SPECIES_ARCANINE); OPPONENT(SPECIES_POLIWRATH); } WHEN { @@ -109,11 +109,11 @@ SINGLE_BATTLE_TEST("Reflect Type does not affect Pokémon with no types") SINGLE_BATTLE_TEST("Reflect Type copies a target's dual types") { - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); - ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[0] == TYPE_WATER); - ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[1] == TYPE_FIGHTING); GIVEN { + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[0] == TYPE_WATER); + ASSUME(gSpeciesInfo[SPECIES_POLIWRATH].types[1] == TYPE_FIGHTING); PLAYER(SPECIES_ARCANINE); OPPONENT(SPECIES_POLIWRATH); } WHEN { @@ -131,11 +131,11 @@ SINGLE_BATTLE_TEST("Reflect Type copies a target's dual types") SINGLE_BATTLE_TEST("Reflect Type copies a target's pure type") { - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); - ASSUME(gSpeciesInfo[SPECIES_SUDOWOODO].types[0] == TYPE_ROCK); - ASSUME(gSpeciesInfo[SPECIES_SUDOWOODO].types[1] == TYPE_ROCK); GIVEN { + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_SUDOWOODO].types[0] == TYPE_ROCK); + ASSUME(gSpeciesInfo[SPECIES_SUDOWOODO].types[1] == TYPE_ROCK); PLAYER(SPECIES_ARCANINE); OPPONENT(SPECIES_SUDOWOODO); } WHEN { @@ -153,11 +153,11 @@ SINGLE_BATTLE_TEST("Reflect Type copies a target's pure type") SINGLE_BATTLE_TEST("Reflect Type defaults to Normal type for the user's types[0] and types[1] if the target only has a 3rd type") { - ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] == TYPE_PSYCHIC); - ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[1] == TYPE_PSYCHIC); - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); - ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); GIVEN { + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] == TYPE_PSYCHIC); + ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[1] == TYPE_PSYCHIC); + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[0] == TYPE_FIRE); + ASSUME(gSpeciesInfo[SPECIES_ARCANINE].types[1] == TYPE_FIRE); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_ARCANINE); } WHEN { diff --git a/test/battle/move_effects_combined/triple_arrows.c b/test/battle/move_effects_combined/triple_arrows.c index 4286a9ba07..383fce6cbf 100644 --- a/test/battle/move_effects_combined/triple_arrows.c +++ b/test/battle/move_effects_combined/triple_arrows.c @@ -46,10 +46,10 @@ SINGLE_BATTLE_TEST("Triple Arrows makes the foe flinch 30% of the time") SINGLE_BATTLE_TEST("Triple Arrows lands a critical hit") { - ASSUME(B_CRIT_CHANCE >= GEN_7); - ASSUME(gMovesInfo[MOVE_TRIPLE_ARROWS].criticalHitStage == 1); PASSES_RANDOMLY(1, 8, RNG_CRITICAL_HIT); GIVEN { + ASSUME(B_CRIT_CHANCE >= GEN_7); + ASSUME(gMovesInfo[MOVE_TRIPLE_ARROWS].criticalHitStage == 1); PLAYER(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET); } WHEN {