From d62c0d6d51942afac048532f92f57d5e0746a72a Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 12 Aug 2023 15:00:15 -0400 Subject: [PATCH] Organized tests into subfolders (#2822) --- Makefile | 2 +- test/test_battle.h => include/test/battle.h | 3 +- {test => include/test}/test.h | 0 .../ability/bad_dreams.c} | 2 +- .../ability/beads_of_ruin.c} | 2 +- .../ability/blaze.c} | 2 +- .../ability/clear_body.c} | 2 +- .../ability/cloud_nine.c} | 2 +- .../ability/compound_eyes.c} | 2 +- .../ability/contrary.c} | 2 +- .../ability/cute_charm.c} | 2 +- .../{ability_damp.c => battle/ability/damp.c} | 2 +- .../ability/desolate_land.c} | 62 +----- .../ability/download.c} | 2 +- .../ability/drizzle.c} | 2 +- .../ability/dry_skin.c} | 2 +- .../ability/electromorphosis.c} | 2 +- .../ability/flame_body.c} | 2 +- .../ability/flower_gift.c} | 2 +- .../ability/forecast.c} | 2 +- .../ability/full_metal_body.c} | 2 +- .../ability/hunger_switch.c} | 2 +- .../ability/hydration.c} | 2 +- .../ability/hyper_cutter.c} | 2 +- .../ability/ice_body.c} | 2 +- .../ability/immunity.c} | 2 +- .../ability/inner_focus.c} | 2 +- .../ability/insomnia.c} | 2 +- .../ability/intimidate.c} | 2 +- .../ability/leaf_guard.c} | 2 +- .../ability/limber.c} | 2 +- .../ability/magic_bounce.c} | 2 +- .../ability/mirror_armor.c} | 2 +- .../ability/oblivious.c} | 2 +- test/battle/ability/overcoat.c | 21 ++ .../ability/overgrow.c} | 2 +- .../ability/own_tempo.c} | 2 +- .../ability/pastel_veil.c} | 2 +- .../ability/poison_point.c} | 2 +- test/battle/ability/primordial_sea.c | 66 ++++++ .../ability/protosynthesis.c} | 2 +- .../ability/quark_drive.c} | 2 +- .../ability/rain_dish.c} | 2 +- .../ability/rattled.c} | 2 +- .../ability/sand_veil.c} | 2 +- .../ability/schooling.c} | 2 +- .../ability/scrappy.c} | 2 +- .../ability/snow_cloak.c} | 2 +- .../ability/snow_warning.c} | 2 +- .../ability/speed_boost.c} | 2 +- .../ability/stamina.c} | 2 +- .../ability/static.c} | 2 +- .../ability/stench.c} | 2 +- .../ability/sturdy.c} | 2 +- .../ability/swarm.c} | 2 +- .../ability/sword_of_ruin.c} | 2 +- .../ability/tablets_of_ruin.c} | 2 +- .../ability/torrent.c} | 2 +- .../ability/vessel_of_ruin.c} | 2 +- .../ability/volt_absorb.c} | 2 +- .../ability/water_absorb.c} | 2 +- .../ability/white_smoke.c} | 2 +- .../ability/wind_power.c} | 2 +- .../ability/zen_mode.c} | 2 +- test/battle/form_change/battle_switch.c | 23 +++ .../form_change/begin_battle.c} | 40 +--- test/battle/form_change/faint.c | 19 ++ .../{ => battle/form_change}/mega_evolution.c | 2 +- .../form_change}/primal_reversion.c | 2 +- .../hold_effect/air_balloon.c} | 2 +- .../hold_effect/berserk_gene.c} | 2 +- .../hold_effect/clear_amulet.c} | 2 +- .../hold_effect/eject_button.c} | 2 +- .../hold_effect/gems.c} | 2 +- .../hold_effect/leftovers.c} | 2 +- .../hold_effect/mirror_herb.c} | 2 +- .../hold_effect/red_card.c} | 2 +- test/battle/hold_effect/safety_goggles.c | 26 +++ .../hold_effect/utility_umbrella.c} | 2 +- .../item_effect/cure_status.c} | 2 +- .../item_effect/heal_and_cure_status.c} | 2 +- .../item_effect/increase_stat.c} | 2 +- .../item_effect/restore_hp.c} | 2 +- .../item_effect/restore_pp.c} | 2 +- .../item_effect/revive.c} | 2 +- .../item_effect/set_focus_energy.c} | 2 +- .../item_effect/set_mist.c} | 2 +- test/{ => battle}/move.c | 2 +- .../move_effect/absorb.c} | 2 +- .../move_effect/accuracy_down.c} | 2 +- .../move_effect/after_you.c} | 2 +- .../move_effect/assist.c} | 2 +- .../move_effect/attack_down.c} | 2 +- .../move_effect/attack_up.c} | 2 +- .../move_effect/attack_up_user_ally.c} | 2 +- .../move_effect/barb_barrage.c} | 2 +- .../move_effect/beak_blast.c} | 2 +- .../move_effect/bide.c} | 2 +- .../move_effect/burn_hit.c} | 2 +- .../move_effect/burn_up.c} | 2 +- .../move_effect/court_change.c} | 2 +- .../move_effect/defense_down.c} | 2 +- .../move_effect/defense_up.c} | 2 +- .../move_effect/defog.c} | 2 +- .../move_effect/dire_claw.c} | 2 +- .../move_effect/double_shock.c} | 2 +- .../move_effect/dream_eater.c} | 2 +- .../move_effect/encore.c} | 2 +- .../move_effect/evasion_up.c} | 2 +- .../move_effect/explosion.c} | 2 +- .../move_effect/focus_punch.c} | 2 +- .../move_effect/freeze_hit.c} | 2 +- .../move_effect/haze.c} | 2 +- .../move_effect/healing_wish.c} | 2 +- .../move_effect/hex.c} | 2 +- .../move_effect/hit_escape.c} | 2 +- .../move_effect/hit_set_entry_hazardss.c} | 2 +- .../move_effect/hit_switch_target.c} | 2 +- .../move_effect/hydro_steam.c} | 2 +- .../move_effect/metronome.c} | 2 +- .../move_effect/mind_blown.c} | 2 +- .../move_effect/mirror_move.c} | 2 +- .../move_effect/paralyze_hit.c} | 2 +- .../move_effect/poison_hit.c} | 2 +- .../move_effect/rampage.c} | 2 +- .../move_effect/recoil_if_miss.c} | 2 +- .../move_effect/reflect.c} | 2 +- .../move_effect/revival_blessing.c} | 2 +- .../move_effect/roar.c} | 2 +- .../move_effect/shell_trap.c} | 2 +- .../move_effect/sleep.c} | 2 +- .../move_effect/special_attack_down.c} | 2 +- .../move_effect/special_attack_up_3.c} | 2 +- .../move_effect/spikes.c} | 2 +- .../move_effect/sticky_web.c} | 2 +- .../move_effect/stockpile.c} | 2 +- .../move_effect/tailwind.c} | 2 +- .../move_effect/teleport.c} | 2 +- .../move_effect/torment.c} | 2 +- .../move_effect/toxic.c} | 2 +- .../move_effect/toxic_spikes.c} | 2 +- .../move_effect/tri_attack.c} | 2 +- .../move_effect/triple_kick.c} | 2 +- .../move_effect/venoshock.c} | 2 +- .../move_flags/three_strikes.c} | 2 +- test/battle/status1/bad_poison.c | 39 ++++ test/battle/status1/burn.c | 35 ++++ test/battle/status1/freeze.c | 45 ++++ .../status1/frostbite.c} | 2 +- test/battle/status1/paralysis.c | 44 ++++ test/battle/status1/poison.c | 17 ++ test/battle/status1/sleep.c | 23 +++ .../terrain/electric.c} | 2 +- .../terrain/grassy.c} | 2 +- .../terrain/misty.c} | 2 +- .../terrain/psychic.c} | 2 +- test/{ => battle}/trainer_control.c | 2 +- test/battle/type/grass.c | 17 ++ .../{weather_rain.c => battle/weather/rain.c} | 2 +- .../{weather_snow.c => battle/weather/snow.c} | 2 +- .../weather/sunlight.c} | 2 +- test/powder_moves.c | 47 ----- test/random.c | 2 +- test/status1.c | 193 ------------------ test/test_runner.c | 2 +- test/test_runner_battle.c | 2 +- 166 files changed, 527 insertions(+), 489 deletions(-) rename test/test_battle.h => include/test/battle.h (99%) rename {test => include/test}/test.h (100%) rename test/{ability_bad_dreams.c => battle/ability/bad_dreams.c} (99%) rename test/{ability_beads_of_ruin.c => battle/ability/beads_of_ruin.c} (98%) rename test/{ability_blaze.c => battle/ability/blaze.c} (95%) rename test/{ability_clear_body.c => battle/ability/clear_body.c} (98%) rename test/{ability_cloud_nine.c => battle/ability/cloud_nine.c} (94%) rename test/{ability_compound_eyes.c => battle/ability/compound_eyes.c} (97%) rename test/{ability_contrary.c => battle/ability/contrary.c} (99%) rename test/{ability_cute_charm.c => battle/ability/cute_charm.c} (98%) rename test/{ability_damp.c => battle/ability/damp.c} (98%) rename test/{primal_weather.c => battle/ability/desolate_land.c} (51%) rename test/{ability_download.c => battle/ability/download.c} (99%) rename test/{ability_drizzle.c => battle/ability/drizzle.c} (96%) rename test/{ability_dry_skin.c => battle/ability/dry_skin.c} (99%) rename test/{ability_electromorphosis.c => battle/ability/electromorphosis.c} (98%) rename test/{ability_flame_body.c => battle/ability/flame_body.c} (97%) rename test/{ability_flower_gift.c => battle/ability/flower_gift.c} (99%) rename test/{ability_forecast.c => battle/ability/forecast.c} (99%) rename test/{ability_full_metal_body.c => battle/ability/full_metal_body.c} (98%) rename test/{ability_hunger_switch.c => battle/ability/hunger_switch.c} (96%) rename test/{ability_hydration.c => battle/ability/hydration.c} (95%) rename test/{ability_hyper_cutter.c => battle/ability/hyper_cutter.c} (98%) rename test/{ability_ice_body.c => battle/ability/ice_body.c} (96%) rename test/{ability_immunity.c => battle/ability/immunity.c} (98%) rename test/{ability_inner_focus.c => battle/ability/inner_focus.c} (98%) rename test/{ability_insomnia.c => battle/ability/insomnia.c} (98%) rename test/{ability_intimidate.c => battle/ability/intimidate.c} (99%) rename test/{ability_leaf_guard.c => battle/ability/leaf_guard.c} (99%) rename test/{ability_limber.c => battle/ability/limber.c} (94%) rename test/{ability_magic_bounce.c => battle/ability/magic_bounce.c} (99%) rename test/{ability_mirror_armor.c => battle/ability/mirror_armor.c} (99%) rename test/{ability_oblivious.c => battle/ability/oblivious.c} (98%) create mode 100644 test/battle/ability/overcoat.c rename test/{ability_overgrow.c => battle/ability/overgrow.c} (96%) rename test/{ability_own_tempo.c => battle/ability/own_tempo.c} (99%) rename test/{ability_pastel_veil.c => battle/ability/pastel_veil.c} (99%) rename test/{ability_poison_point.c => battle/ability/poison_point.c} (97%) create mode 100644 test/battle/ability/primordial_sea.c rename test/{ability_protosynthesis.c => battle/ability/protosynthesis.c} (99%) rename test/{ability_quark_drive.c => battle/ability/quark_drive.c} (99%) rename test/{ability_rain_dish.c => battle/ability/rain_dish.c} (94%) rename test/{ability_rattled.c => battle/ability/rattled.c} (99%) rename test/{ability_sand_veil.c => battle/ability/sand_veil.c} (96%) rename test/{ability_schooling.c => battle/ability/schooling.c} (99%) rename test/{ability_scrappy.c => battle/ability/scrappy.c} (98%) rename test/{ability_snow_cloak.c => battle/ability/snow_cloak.c} (96%) rename test/{ability_snow_warning.c => battle/ability/snow_warning.c} (96%) rename test/{ability_speed_boost.c => battle/ability/speed_boost.c} (96%) rename test/{ability_stamina.c => battle/ability/stamina.c} (99%) rename test/{ability_static.c => battle/ability/static.c} (97%) rename test/{ability_stench.c => battle/ability/stench.c} (97%) rename test/{ability_sturdy.c => battle/ability/sturdy.c} (98%) rename test/{ability_swarm.c => battle/ability/swarm.c} (95%) rename test/{ability_sword_of_ruin.c => battle/ability/sword_of_ruin.c} (98%) rename test/{ability_tablets_of_ruin.c => battle/ability/tablets_of_ruin.c} (98%) rename test/{ability_torrent.c => battle/ability/torrent.c} (95%) rename test/{ability_vessel_of_ruin.c => battle/ability/vessel_of_ruin.c} (98%) rename test/{ability_volt_absorb.c => battle/ability/volt_absorb.c} (99%) rename test/{ability_water_absorb.c => battle/ability/water_absorb.c} (99%) rename test/{ability_white_smoke.c => battle/ability/white_smoke.c} (98%) rename test/{ability_wind_power.c => battle/ability/wind_power.c} (99%) rename test/{ability_zen_mode.c => battle/ability/zen_mode.c} (99%) create mode 100644 test/battle/form_change/battle_switch.c rename test/{form_change.c => battle/form_change/begin_battle.c} (68%) create mode 100644 test/battle/form_change/faint.c rename test/{ => battle/form_change}/mega_evolution.c (99%) rename test/{ => battle/form_change}/primal_reversion.c (99%) rename test/{hold_effect_air_balloon.c => battle/hold_effect/air_balloon.c} (99%) rename test/{hold_effect_berserk_gene.c => battle/hold_effect/berserk_gene.c} (99%) rename test/{hold_effect_clear_amulet.c => battle/hold_effect/clear_amulet.c} (99%) rename test/{hold_effect_eject_button.c => battle/hold_effect/eject_button.c} (99%) rename test/{hold_effect_gems.c => battle/hold_effect/gems.c} (99%) rename test/{hold_effect_leftovers.c => battle/hold_effect/leftovers.c} (98%) rename test/{hold_effect_mirror_herb.c => battle/hold_effect/mirror_herb.c} (98%) rename test/{hold_effect_red_card.c => battle/hold_effect/red_card.c} (99%) create mode 100644 test/battle/hold_effect/safety_goggles.c rename test/{hold_effect_utility_umbrella.c => battle/hold_effect/utility_umbrella.c} (99%) rename test/{item_effect_cure_status.c => battle/item_effect/cure_status.c} (99%) rename test/{item_effect_heal_and_cure_status.c => battle/item_effect/heal_and_cure_status.c} (98%) rename test/{item_effect_increase_stat.c => battle/item_effect/increase_stat.c} (99%) rename test/{item_effect_restore_hp.c => battle/item_effect/restore_hp.c} (98%) rename test/{item_effect_restore_pp.c => battle/item_effect/restore_pp.c} (98%) rename test/{item_effect_revive.c => battle/item_effect/revive.c} (98%) rename test/{item_effect_set_focus_energy.c => battle/item_effect/set_focus_energy.c} (96%) rename test/{item_effect_set_mist.c => battle/item_effect/set_mist.c} (96%) rename test/{ => battle}/move.c (99%) rename test/{move_effect_absorb.c => battle/move_effect/absorb.c} (97%) rename test/{move_effect_accuracy_down.c => battle/move_effect/accuracy_down.c} (96%) rename test/{move_effect_after_you.c => battle/move_effect/after_you.c} (98%) rename test/{move_effect_assist.c => battle/move_effect/assist.c} (96%) rename test/{move_effect_attack_down.c => battle/move_effect/attack_down.c} (97%) rename test/{move_effect_attack_up.c => battle/move_effect/attack_up.c} (97%) rename test/{move_effect_attack_up_user_ally.c => battle/move_effect/attack_up_user_ally.c} (99%) rename test/{move_effect_barb_barrage.c => battle/move_effect/barb_barrage.c} (98%) rename test/{move_effect_beak_blast.c => battle/move_effect/beak_blast.c} (99%) rename test/{move_effect_bide.c => battle/move_effect/bide.c} (97%) rename test/{move_effect_burn_hit.c => battle/move_effect/burn_hit.c} (97%) rename test/{move_effect_burn_up.c => battle/move_effect/burn_up.c} (98%) rename test/{move_effect_court_change.c => battle/move_effect/court_change.c} (99%) rename test/{move_effect_defense_down.c => battle/move_effect/defense_down.c} (97%) rename test/{move_effect_defense_up.c => battle/move_effect/defense_up.c} (97%) rename test/{move_effect_defog.c => battle/move_effect/defog.c} (99%) rename test/{move_effect_dire_claw.c => battle/move_effect/dire_claw.c} (99%) rename test/{move_effect_double_shock.c => battle/move_effect/double_shock.c} (98%) rename test/{move_effect_dream_eater.c => battle/move_effect/dream_eater.c} (98%) rename test/{move_effect_encore.c => battle/move_effect/encore.c} (98%) rename test/{move_effect_evasion_up.c => battle/move_effect/evasion_up.c} (96%) rename test/{move_effect_explosion.c => battle/move_effect/explosion.c} (99%) rename test/{move_effect_focus_punch.c => battle/move_effect/focus_punch.c} (99%) rename test/{move_effect_freeze_hit.c => battle/move_effect/freeze_hit.c} (97%) rename test/{move_effect_haze.c => battle/move_effect/haze.c} (97%) rename test/{move_effect_healing_wish.c => battle/move_effect/healing_wish.c} (99%) rename test/{move_effect_hex.c => battle/move_effect/hex.c} (97%) rename test/{move_effect_hit_escape.c => battle/move_effect/hit_escape.c} (99%) rename test/{move_effect_hit_set_entry_hazardss.c => battle/move_effect/hit_set_entry_hazardss.c} (99%) rename test/{move_effect_hit_switch_target.c => battle/move_effect/hit_switch_target.c} (98%) rename test/{move_effect_hydro_steam.c => battle/move_effect/hydro_steam.c} (98%) rename test/{move_effect_metronome.c => battle/move_effect/metronome.c} (98%) rename test/{move_effect_mind_blown.c => battle/move_effect/mind_blown.c} (99%) rename test/{move_effect_mirror_move.c => battle/move_effect/mirror_move.c} (99%) rename test/{move_effect_paralyze_hit.c => battle/move_effect/paralyze_hit.c} (97%) rename test/{move_effect_poison_hit.c => battle/move_effect/poison_hit.c} (97%) rename test/{move_effect_rampage.c => battle/move_effect/rampage.c} (99%) rename test/{move_effect_recoil_if_miss.c => battle/move_effect/recoil_if_miss.c} (99%) rename test/{move_effect_reflect.c => battle/move_effect/reflect.c} (99%) rename test/{move_effect_revival_blessing.c => battle/move_effect/revival_blessing.c} (99%) rename test/{move_effect_roar.c => battle/move_effect/roar.c} (98%) rename test/{move_effect_shell_trap.c => battle/move_effect/shell_trap.c} (99%) rename test/{move_effect_sleep.c => battle/move_effect/sleep.c} (97%) rename test/{move_effect_special_attack_down.c => battle/move_effect/special_attack_down.c} (97%) rename test/{move_effect_special_attack_up_3.c => battle/move_effect/special_attack_up_3.c} (97%) rename test/{move_effect_spikes.c => battle/move_effect/spikes.c} (99%) rename test/{move_effect_sticky_web.c => battle/move_effect/sticky_web.c} (99%) rename test/{move_effect_stockpile.c => battle/move_effect/stockpile.c} (99%) rename test/{move_effect_tailwind.c => battle/move_effect/tailwind.c} (98%) rename test/{move_effect_teleport.c => battle/move_effect/teleport.c} (98%) rename test/{move_effect_torment.c => battle/move_effect/torment.c} (98%) rename test/{move_effect_toxic.c => battle/move_effect/toxic.c} (98%) rename test/{move_effect_toxic_spikes.c => battle/move_effect/toxic_spikes.c} (99%) rename test/{move_effect_tri_attack.c => battle/move_effect/tri_attack.c} (99%) rename test/{move_effect_triple_kick.c => battle/move_effect/triple_kick.c} (97%) rename test/{move_effect_venoshock.c => battle/move_effect/venoshock.c} (97%) rename test/{move_flag_three_strikes.c => battle/move_flags/three_strikes.c} (98%) create mode 100644 test/battle/status1/bad_poison.c create mode 100644 test/battle/status1/burn.c create mode 100644 test/battle/status1/freeze.c rename test/{status_frostbite.c => battle/status1/frostbite.c} (99%) create mode 100644 test/battle/status1/paralysis.c create mode 100644 test/battle/status1/poison.c create mode 100644 test/battle/status1/sleep.c rename test/{terrain_electric.c => battle/terrain/electric.c} (99%) rename test/{terrain_grassy.c => battle/terrain/grassy.c} (99%) rename test/{terrain_misty.c => battle/terrain/misty.c} (99%) rename test/{terrain_psychic.c => battle/terrain/psychic.c} (99%) rename test/{ => battle}/trainer_control.c (99%) create mode 100644 test/battle/type/grass.c rename test/{weather_rain.c => battle/weather/rain.c} (98%) rename test/{weather_snow.c => battle/weather/snow.c} (99%) rename test/{weather_sunlight.c => battle/weather/sunlight.c} (98%) delete mode 100644 test/powder_moves.c delete mode 100644 test/status1.c diff --git a/Makefile b/Makefile index c4964e42e..79ed8f160 100644 --- a/Makefile +++ b/Makefile @@ -450,7 +450,7 @@ $(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt # NOTE: Based on C_DEP above, but without NODEP and KEEP_TEMPS handling. define TEST_DEP -$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib -I test $2) +$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2) @echo "$$(CC1) -o $$@ $$<" @$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ - endef diff --git a/test/test_battle.h b/include/test/battle.h similarity index 99% rename from test/test_battle.h rename to include/test/battle.h index b4f38ed91..dc40a8a20 100644 --- a/test/test_battle.h +++ b/include/test/battle.h @@ -447,13 +447,13 @@ #ifndef GUARD_TEST_BATTLE_H #define GUARD_TEST_BATTLE_H +#include "global.h" #include "battle.h" #include "battle_anim.h" #include "data.h" #include "item.h" #include "random.h" #include "recorded_battle.h" -#include "test.h" #include "util.h" #include "constants/abilities.h" #include "constants/battle_anim.h" @@ -462,6 +462,7 @@ #include "constants/items.h" #include "constants/moves.h" #include "constants/species.h" +#include "test/test.h" // NOTE: If the stack is too small the test runner will probably crash // or loop. diff --git a/test/test.h b/include/test/test.h similarity index 100% rename from test/test.h rename to include/test/test.h diff --git a/test/ability_bad_dreams.c b/test/battle/ability/bad_dreams.c similarity index 99% rename from test/ability_bad_dreams.c rename to test/battle/ability/bad_dreams.c index 9bf800534..42ac3f04a 100644 --- a/test/ability_bad_dreams.c +++ b/test/battle/ability/bad_dreams.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_beads_of_ruin.c b/test/battle/ability/beads_of_ruin.c similarity index 98% rename from test/ability_beads_of_ruin.c rename to test/battle/ability/beads_of_ruin.c index 28b39a430..1c6f740e8 100644 --- a/test/ability_beads_of_ruin.c +++ b/test/battle/ability/beads_of_ruin.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_blaze.c b/test/battle/ability/blaze.c similarity index 95% rename from test/ability_blaze.c rename to test/battle/ability/blaze.c index 1e12c6b29..12ccced93 100644 --- a/test/ability_blaze.c +++ b/test/battle/ability/blaze.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Blaze boosts Fire-type moves in a pinch", s16 damage) { diff --git a/test/ability_clear_body.c b/test/battle/ability/clear_body.c similarity index 98% rename from test/ability_clear_body.c rename to test/battle/ability/clear_body.c index 11789aaf6..7f167c9fe 100644 --- a/test/ability_clear_body.c +++ b/test/battle/ability/clear_body.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Clear Body prevents intimidate") { diff --git a/test/ability_cloud_nine.c b/test/battle/ability/cloud_nine.c similarity index 94% rename from test/ability_cloud_nine.c rename to test/battle/ability/cloud_nine.c index 02da15ee1..e8de0fd8a 100644 --- a/test/ability_cloud_nine.c +++ b/test/battle/ability/cloud_nine.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Cloud Nine prevents weather effects") { diff --git a/test/ability_compound_eyes.c b/test/battle/ability/compound_eyes.c similarity index 97% rename from test/ability_compound_eyes.c rename to test/battle/ability/compound_eyes.c index 6bdb15fa7..cc005943b 100644 --- a/test/ability_compound_eyes.c +++ b/test/battle/ability/compound_eyes.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Compound Eyes raises accuracy") { diff --git a/test/ability_contrary.c b/test/battle/ability/contrary.c similarity index 99% rename from test/ability_contrary.c rename to test/battle/ability/contrary.c index 52347f379..de4093716 100644 --- a/test/ability_contrary.c +++ b/test/battle/ability/contrary.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_cute_charm.c b/test/battle/ability/cute_charm.c similarity index 98% rename from test/ability_cute_charm.c rename to test/battle/ability/cute_charm.c index ccf5c490b..1a55fc359 100644 --- a/test/ability_cute_charm.c +++ b/test/battle/ability/cute_charm.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Cute Charm inflicts infatuation on contact") { diff --git a/test/ability_damp.c b/test/battle/ability/damp.c similarity index 98% rename from test/ability_damp.c rename to test/battle/ability/damp.c index 19a4ac5ad..ce53db112 100644 --- a/test/ability_damp.c +++ b/test/battle/ability/damp.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Damp prevents explosion-like moves from enemies") { diff --git a/test/primal_weather.c b/test/battle/ability/desolate_land.c similarity index 51% rename from test/primal_weather.c rename to test/battle/ability/desolate_land.c index 650a79921..ca52c9cd6 100644 --- a/test/primal_weather.c +++ b/test/battle/ability/desolate_land.c @@ -1,72 +1,12 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { - ASSUME(gBattleMoves[MOVE_EMBER].power != 0); - ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE); ASSUME(gBattleMoves[MOVE_WATER_GUN].power != 0); ASSUME(gBattleMoves[MOVE_WATER_GUN].type == TYPE_WATER); } -SINGLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves") -{ - GIVEN { - PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB);} - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(opponent, MOVE_EMBER); } - TURN { MOVE(opponent, MOVE_EMBER); } - } SCENE { - MESSAGE("Foe Wobbuffet used Ember!"); - NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_EMBER, opponent); - MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); - NOT HP_BAR(player); - MESSAGE("Foe Wobbuffet used Ember!"); - NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_EMBER, opponent); - MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); - NOT HP_BAR(player); - } THEN { - EXPECT_EQ(player->hp, player->maxHP); - } -} - -DOUBLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves and prints the message only once with moves hitting multiple targets") -{ - GIVEN { - ASSUME(gBattleMoves[MOVE_ERUPTION].power != 0); - ASSUME(gBattleMoves[MOVE_ERUPTION].type == TYPE_FIRE); - ASSUME(gBattleMoves[MOVE_ERUPTION].target == MOVE_TARGET_BOTH); - PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB); {Speed(5);}} - PLAYER(SPECIES_WOBBUFFET) {Speed(5);} - OPPONENT(SPECIES_WOBBUFFET) {Speed(10);} - OPPONENT(SPECIES_WOBBUFFET) {Speed(8);} - } WHEN { - TURN { MOVE(opponentLeft, MOVE_ERUPTION); } - } SCENE { - MESSAGE("Foe Wobbuffet used Eruption!"); - NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ERUPTION, opponentLeft); - MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); - NOT MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); - } THEN { - EXPECT_EQ(playerLeft->hp, playerLeft->maxHP); - EXPECT_EQ(playerRight->hp, playerRight->maxHP); - } -} - -SINGLE_BATTLE_TEST("Primordial Sea does not block a move if pokemon is asleep and uses a Fire-type move") // Sleep/confusion/paralysis all happen before the check for primal weather -{ - GIVEN { - PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB);} - OPPONENT(SPECIES_WOBBUFFET) {Status1(STATUS1_SLEEP);} - } WHEN { - TURN { MOVE(opponent, MOVE_EMBER); } - } SCENE { - NOT MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); - MESSAGE("Foe Wobbuffet is fast asleep."); - } -} - SINGLE_BATTLE_TEST("Desolate Land blocks damaging Water-type moves") { GIVEN { diff --git a/test/ability_download.c b/test/battle/ability/download.c similarity index 99% rename from test/ability_download.c rename to test/battle/ability/download.c index ee03f6911..5b59e37f0 100644 --- a/test/ability_download.c +++ b/test/battle/ability/download.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_drizzle.c b/test/battle/ability/drizzle.c similarity index 96% rename from test/ability_drizzle.c rename to test/battle/ability/drizzle.c index fd0d42616..ce0fc9514 100644 --- a/test/ability_drizzle.c +++ b/test/battle/ability/drizzle.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Drizzle summons rain", s16 damage) { diff --git a/test/ability_dry_skin.c b/test/battle/ability/dry_skin.c similarity index 99% rename from test/ability_dry_skin.c rename to test/battle/ability/dry_skin.c index 028076d5a..832b7baaf 100644 --- a/test/ability_dry_skin.c +++ b/test/battle/ability/dry_skin.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Dry Skin causes 1/8th Max HP damage in Sun") { diff --git a/test/ability_electromorphosis.c b/test/battle/ability/electromorphosis.c similarity index 98% rename from test/ability_electromorphosis.c rename to test/battle/ability/electromorphosis.c index 25d33aac0..9111fa328 100644 --- a/test/ability_electromorphosis.c +++ b/test/battle/ability/electromorphosis.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Electromorphosis sets up Charge when hit by any move") { diff --git a/test/ability_flame_body.c b/test/battle/ability/flame_body.c similarity index 97% rename from test/ability_flame_body.c rename to test/battle/ability/flame_body.c index 303337693..ae9138e12 100644 --- a/test/ability_flame_body.c +++ b/test/battle/ability/flame_body.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Flame Body inflicts burn on contact") { diff --git a/test/ability_flower_gift.c b/test/battle/ability/flower_gift.c similarity index 99% rename from test/ability_flower_gift.c rename to test/battle/ability/flower_gift.c index 560706af4..fdd191f55 100644 --- a/test/ability_flower_gift.c +++ b/test/battle/ability/flower_gift.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim in harsh sunlight") { diff --git a/test/ability_forecast.c b/test/battle/ability/forecast.c similarity index 99% rename from test/ability_forecast.c rename to test/battle/ability/forecast.c index 696c0383a..26ad789da 100644 --- a/test/ability_forecast.c +++ b/test/battle/ability/forecast.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Forecast transforms Castform in weather from an opponent's move") { diff --git a/test/ability_full_metal_body.c b/test/battle/ability/full_metal_body.c similarity index 98% rename from test/ability_full_metal_body.c rename to test/battle/ability/full_metal_body.c index c47ce9d4d..d00714d52 100644 --- a/test/ability_full_metal_body.c +++ b/test/battle/ability/full_metal_body.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Full Metal Body prevents intimidate") { diff --git a/test/ability_hunger_switch.c b/test/battle/ability/hunger_switch.c similarity index 96% rename from test/ability_hunger_switch.c rename to test/battle/ability/hunger_switch.c index 336c2c160..c0802d664 100644 --- a/test/ability_hunger_switch.c +++ b/test/battle/ability/hunger_switch.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Hunger Switch switches Morpeko's forms at the end of the turn") { diff --git a/test/ability_hydration.c b/test/battle/ability/hydration.c similarity index 95% rename from test/ability_hydration.c rename to test/battle/ability/hydration.c index 45689b212..2dca490c0 100644 --- a/test/ability_hydration.c +++ b/test/battle/ability/hydration.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Hydration cures non-volatile Status conditions if it is raining") { diff --git a/test/ability_hyper_cutter.c b/test/battle/ability/hyper_cutter.c similarity index 98% rename from test/ability_hyper_cutter.c rename to test/battle/ability/hyper_cutter.c index 67dac4c66..ac942039b 100644 --- a/test/ability_hyper_cutter.c +++ b/test/battle/ability/hyper_cutter.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Hyper Cutter prevents intimidate") { diff --git a/test/ability_ice_body.c b/test/battle/ability/ice_body.c similarity index 96% rename from test/ability_ice_body.c rename to test/battle/ability/ice_body.c index 0658ace81..aca84532a 100644 --- a/test/ability_ice_body.c +++ b/test/battle/ability/ice_body.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Ice Body prevents damage from hail") { diff --git a/test/ability_immunity.c b/test/battle/ability/immunity.c similarity index 98% rename from test/ability_immunity.c rename to test/battle/ability/immunity.c index fea2eb522..3c6c4afa6 100644 --- a/test/ability_immunity.c +++ b/test/battle/ability/immunity.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Immunity prevents Poison Sting poison") { diff --git a/test/ability_inner_focus.c b/test/battle/ability/inner_focus.c similarity index 98% rename from test/ability_inner_focus.c rename to test/battle/ability/inner_focus.c index 5b713475d..574c860a7 100644 --- a/test/ability_inner_focus.c +++ b/test/battle/ability/inner_focus.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Inner Focus prevents intimidate") { diff --git a/test/ability_insomnia.c b/test/battle/ability/insomnia.c similarity index 98% rename from test/ability_insomnia.c rename to test/battle/ability/insomnia.c index 2fcb6a97e..cb22be925 100644 --- a/test/ability_insomnia.c +++ b/test/battle/ability/insomnia.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Insomnia prevents sleep") { diff --git a/test/ability_intimidate.c b/test/battle/ability/intimidate.c similarity index 99% rename from test/ability_intimidate.c rename to test/battle/ability/intimidate.c index f9681493b..a0a23cc13 100644 --- a/test/ability_intimidate.c +++ b/test/battle/ability/intimidate.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_leaf_guard.c b/test/battle/ability/leaf_guard.c similarity index 99% rename from test/ability_leaf_guard.c rename to test/battle/ability/leaf_guard.c index 92727175a..2c052b5a6 100644 --- a/test/ability_leaf_guard.c +++ b/test/battle/ability/leaf_guard.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Leaf Guard prevents non-volatile status conditions in sun") { diff --git a/test/ability_limber.c b/test/battle/ability/limber.c similarity index 94% rename from test/ability_limber.c rename to test/battle/ability/limber.c index ff701b663..87d4177ff 100644 --- a/test/ability_limber.c +++ b/test/battle/ability/limber.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Limber prevents paralysis") { diff --git a/test/ability_magic_bounce.c b/test/battle/ability/magic_bounce.c similarity index 99% rename from test/ability_magic_bounce.c rename to test/battle/ability/magic_bounce.c index ab51369ef..348b80f0a 100644 --- a/test/ability_magic_bounce.c +++ b/test/battle/ability/magic_bounce.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Magic Bounce bounces back status moves") diff --git a/test/ability_mirror_armor.c b/test/battle/ability/mirror_armor.c similarity index 99% rename from test/ability_mirror_armor.c rename to test/battle/ability/mirror_armor.c index 7e15e029b..2b0a59044 100644 --- a/test/ability_mirror_armor.c +++ b/test/battle/ability/mirror_armor.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_oblivious.c b/test/battle/ability/oblivious.c similarity index 98% rename from test/ability_oblivious.c rename to test/battle/ability/oblivious.c index 9d9aeeb29..51d27bb16 100644 --- a/test/ability_oblivious.c +++ b/test/battle/ability/oblivious.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Oblivious prevents Infatuation") { diff --git a/test/battle/ability/overcoat.c b/test/battle/ability/overcoat.c new file mode 100644 index 000000000..5f2405167 --- /dev/null +++ b/test/battle/ability/overcoat.c @@ -0,0 +1,21 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Overcoat blocks powder and spore moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_PINECO) { Ability(ABILITY_OVERCOAT); } + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + ABILITY_POPUP(opponent, ABILITY_OVERCOAT); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); + MESSAGE("It doesn't affect Foe Pineco…"); + } +} + +TO_DO_BATTLE_TEST("Overcoat blocks damage from hail"); +TO_DO_BATTLE_TEST("Overcoat blocks damage from sandstorm"); +TO_DO_BATTLE_TEST("Overcoat blocks Effect Spore's effect"); diff --git a/test/ability_overgrow.c b/test/battle/ability/overgrow.c similarity index 96% rename from test/ability_overgrow.c rename to test/battle/ability/overgrow.c index 82d8dd467..548dc9bb3 100644 --- a/test/ability_overgrow.c +++ b/test/battle/ability/overgrow.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Overgrow boosts Grass-type moves in a pinch", s16 damage) { diff --git a/test/ability_own_tempo.c b/test/battle/ability/own_tempo.c similarity index 99% rename from test/ability_own_tempo.c rename to test/battle/ability/own_tempo.c index 2440ac779..4c6a3167f 100644 --- a/test/ability_own_tempo.c +++ b/test/battle/ability/own_tempo.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Own Tempo prevents intimidate") { diff --git a/test/ability_pastel_veil.c b/test/battle/ability/pastel_veil.c similarity index 99% rename from test/ability_pastel_veil.c rename to test/battle/ability/pastel_veil.c index 363c018c1..74d764fc3 100644 --- a/test/ability_pastel_veil.c +++ b/test/battle/ability/pastel_veil.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Pastel Veil prevents Poison Sting poison") { diff --git a/test/ability_poison_point.c b/test/battle/ability/poison_point.c similarity index 97% rename from test/ability_poison_point.c rename to test/battle/ability/poison_point.c index a85edd85b..63690d84d 100644 --- a/test/ability_poison_point.c +++ b/test/battle/ability/poison_point.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Poison Point inflicts poison on contact") { diff --git a/test/battle/ability/primordial_sea.c b/test/battle/ability/primordial_sea.c new file mode 100644 index 000000000..37fbb1b23 --- /dev/null +++ b/test/battle/ability/primordial_sea.c @@ -0,0 +1,66 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_EMBER].power != 0); + ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE); +} + +SINGLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves") +{ + GIVEN { + PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB);} + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_EMBER); } + TURN { MOVE(opponent, MOVE_EMBER); } + } SCENE { + MESSAGE("Foe Wobbuffet used Ember!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_EMBER, opponent); + MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); + NOT HP_BAR(player); + MESSAGE("Foe Wobbuffet used Ember!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_EMBER, opponent); + MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); + NOT HP_BAR(player); + } THEN { + EXPECT_EQ(player->hp, player->maxHP); + } +} + +DOUBLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves and prints the message only once with moves hitting multiple targets") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_ERUPTION].power != 0); + ASSUME(gBattleMoves[MOVE_ERUPTION].type == TYPE_FIRE); + ASSUME(gBattleMoves[MOVE_ERUPTION].target == MOVE_TARGET_BOTH); + PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB); {Speed(5);}} + PLAYER(SPECIES_WOBBUFFET) {Speed(5);} + OPPONENT(SPECIES_WOBBUFFET) {Speed(10);} + OPPONENT(SPECIES_WOBBUFFET) {Speed(8);} + } WHEN { + TURN { MOVE(opponentLeft, MOVE_ERUPTION); } + } SCENE { + MESSAGE("Foe Wobbuffet used Eruption!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ERUPTION, opponentLeft); + MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); + NOT MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); + } THEN { + EXPECT_EQ(playerLeft->hp, playerLeft->maxHP); + EXPECT_EQ(playerRight->hp, playerRight->maxHP); + } +} + +SINGLE_BATTLE_TEST("Primordial Sea does not block a move if pokemon is asleep and uses a Fire-type move") // Sleep/confusion/paralysis all happen before the check for primal weather +{ + GIVEN { + PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB);} + OPPONENT(SPECIES_WOBBUFFET) {Status1(STATUS1_SLEEP);} + } WHEN { + TURN { MOVE(opponent, MOVE_EMBER); } + } SCENE { + NOT MESSAGE("The Fire-type attack fizzled out\nin the heavy rain!"); + MESSAGE("Foe Wobbuffet is fast asleep."); + } +} \ No newline at end of file diff --git a/test/ability_protosynthesis.c b/test/battle/ability/protosynthesis.c similarity index 99% rename from test/ability_protosynthesis.c rename to test/battle/ability/protosynthesis.c index 9f794e00a..0ed74d4f6 100644 --- a/test/ability_protosynthesis.c +++ b/test/battle/ability/protosynthesis.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_quark_drive.c b/test/battle/ability/quark_drive.c similarity index 99% rename from test/ability_quark_drive.c rename to test/battle/ability/quark_drive.c index b004c760c..bce6795ca 100644 --- a/test/ability_quark_drive.c +++ b/test/battle/ability/quark_drive.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_rain_dish.c b/test/battle/ability/rain_dish.c similarity index 94% rename from test/ability_rain_dish.c rename to test/battle/ability/rain_dish.c index 04009507c..dd647f0eb 100644 --- a/test/ability_rain_dish.c +++ b/test/battle/ability/rain_dish.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Rain Dish recovers 1/16th of Max HP in Rain") { diff --git a/test/ability_rattled.c b/test/battle/ability/rattled.c similarity index 99% rename from test/ability_rattled.c rename to test/battle/ability/rattled.c index 493e3cfca..e936ed7de 100644 --- a/test/ability_rattled.c +++ b/test/battle/ability/rattled.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_sand_veil.c b/test/battle/ability/sand_veil.c similarity index 96% rename from test/ability_sand_veil.c rename to test/battle/ability/sand_veil.c index 50abad51c..c2f6440c3 100644 --- a/test/ability_sand_veil.c +++ b/test/battle/ability/sand_veil.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Sand Veil prevents damage from sandstorm") { diff --git a/test/ability_schooling.c b/test/battle/ability/schooling.c similarity index 99% rename from test/ability_schooling.c rename to test/battle/ability/schooling.c index 87f69ea31..448e37261 100644 --- a/test/ability_schooling.c +++ b/test/battle/ability/schooling.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Schooling switches Level 20+ Wishiwashi's form when HP is 25-percent or less at the end of the turn") { diff --git a/test/ability_scrappy.c b/test/battle/ability/scrappy.c similarity index 98% rename from test/ability_scrappy.c rename to test/battle/ability/scrappy.c index b4f83afcf..df4ededa4 100644 --- a/test/ability_scrappy.c +++ b/test/battle/ability/scrappy.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Scrappy prevents intimidate") { diff --git a/test/ability_snow_cloak.c b/test/battle/ability/snow_cloak.c similarity index 96% rename from test/ability_snow_cloak.c rename to test/battle/ability/snow_cloak.c index 8a95a8ea0..88fe6e509 100644 --- a/test/ability_snow_cloak.c +++ b/test/battle/ability/snow_cloak.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Snow Cloak prevents damage from hail") { diff --git a/test/ability_snow_warning.c b/test/battle/ability/snow_warning.c similarity index 96% rename from test/ability_snow_warning.c rename to test/battle/ability/snow_warning.c index 5e8b13d54..17f18814b 100644 --- a/test/ability_snow_warning.c +++ b/test/battle/ability/snow_warning.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" #if B_SNOW_WARNING < GEN_9 SINGLE_BATTLE_TEST("Snow Warning summons hail") diff --git a/test/ability_speed_boost.c b/test/battle/ability/speed_boost.c similarity index 96% rename from test/ability_speed_boost.c rename to test/battle/ability/speed_boost.c index 78aa876e6..0cc82e806 100644 --- a/test/ability_speed_boost.c +++ b/test/battle/ability/speed_boost.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Speed Boost gradually boosts Speed") { diff --git a/test/ability_stamina.c b/test/battle/ability/stamina.c similarity index 99% rename from test/ability_stamina.c rename to test/battle/ability/stamina.c index 70cf3cdc0..3470cce51 100644 --- a/test/ability_stamina.c +++ b/test/battle/ability/stamina.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" #define STAMINA_STAT_RAISE(target, msg) \ { \ diff --git a/test/ability_static.c b/test/battle/ability/static.c similarity index 97% rename from test/ability_static.c rename to test/battle/ability/static.c index 022efa5bb..eb52a838b 100644 --- a/test/ability_static.c +++ b/test/battle/ability/static.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Static inflicts paralysis on contact") { diff --git a/test/ability_stench.c b/test/battle/ability/stench.c similarity index 97% rename from test/ability_stench.c rename to test/battle/ability/stench.c index dd1d027e9..a91c861fc 100644 --- a/test/ability_stench.c +++ b/test/battle/ability/stench.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Stench has a 10% chance to flinch") { diff --git a/test/ability_sturdy.c b/test/battle/ability/sturdy.c similarity index 98% rename from test/ability_sturdy.c rename to test/battle/ability/sturdy.c index 42cdab11f..7a7fdf39f 100644 --- a/test/ability_sturdy.c +++ b/test/battle/ability/sturdy.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Sturdy prevents OHKO moves") { diff --git a/test/ability_swarm.c b/test/battle/ability/swarm.c similarity index 95% rename from test/ability_swarm.c rename to test/battle/ability/swarm.c index 7709e976e..c6479412a 100644 --- a/test/ability_swarm.c +++ b/test/battle/ability/swarm.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Swarm boosts Bug-type moves in a pinch", s16 damage) { diff --git a/test/ability_sword_of_ruin.c b/test/battle/ability/sword_of_ruin.c similarity index 98% rename from test/ability_sword_of_ruin.c rename to test/battle/ability/sword_of_ruin.c index 6ec4f8fe8..2abc0c04f 100644 --- a/test/ability_sword_of_ruin.c +++ b/test/battle/ability/sword_of_ruin.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_tablets_of_ruin.c b/test/battle/ability/tablets_of_ruin.c similarity index 98% rename from test/ability_tablets_of_ruin.c rename to test/battle/ability/tablets_of_ruin.c index 38dcfc856..ca12b6813 100644 --- a/test/ability_tablets_of_ruin.c +++ b/test/battle/ability/tablets_of_ruin.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_torrent.c b/test/battle/ability/torrent.c similarity index 95% rename from test/ability_torrent.c rename to test/battle/ability/torrent.c index e5c701775..673e21b79 100644 --- a/test/ability_torrent.c +++ b/test/battle/ability/torrent.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Torrent boosts Water-type moves in a pinch", s16 damage) { diff --git a/test/ability_vessel_of_ruin.c b/test/battle/ability/vessel_of_ruin.c similarity index 98% rename from test/ability_vessel_of_ruin.c rename to test/battle/ability/vessel_of_ruin.c index 6c7b2664f..4f8408795 100644 --- a/test/ability_vessel_of_ruin.c +++ b/test/battle/ability/vessel_of_ruin.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_volt_absorb.c b/test/battle/ability/volt_absorb.c similarity index 99% rename from test/ability_volt_absorb.c rename to test/battle/ability/volt_absorb.c index f9af7e17b..2f69a287b 100644 --- a/test/ability_volt_absorb.c +++ b/test/battle/ability/volt_absorb.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Volt Absorb heals 25% when hit by electric type moves") { diff --git a/test/ability_water_absorb.c b/test/battle/ability/water_absorb.c similarity index 99% rename from test/ability_water_absorb.c rename to test/battle/ability/water_absorb.c index 50547d13d..cda319603 100644 --- a/test/ability_water_absorb.c +++ b/test/battle/ability/water_absorb.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Water Absorb heals 25% when hit by water type moves") { diff --git a/test/ability_white_smoke.c b/test/battle/ability/white_smoke.c similarity index 98% rename from test/ability_white_smoke.c rename to test/battle/ability/white_smoke.c index 9689aee6c..7bedbca24 100644 --- a/test/ability_white_smoke.c +++ b/test/battle/ability/white_smoke.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("White Smoke prevents intimidate") { diff --git a/test/ability_wind_power.c b/test/battle/ability/wind_power.c similarity index 99% rename from test/ability_wind_power.c rename to test/battle/ability/wind_power.c index 8488db269..996910640 100644 --- a/test/ability_wind_power.c +++ b/test/battle/ability/wind_power.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/ability_zen_mode.c b/test/battle/ability/zen_mode.c similarity index 99% rename from test/ability_zen_mode.c rename to test/battle/ability/zen_mode.c index e0e72471f..37bb4160f 100644 --- a/test/ability_zen_mode.c +++ b/test/battle/ability/zen_mode.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Zen Mode switches Darmanitan's form when HP is half or less at the end of the turn") { diff --git a/test/battle/form_change/battle_switch.c b/test/battle/form_change/battle_switch.c new file mode 100644 index 000000000..bd18e0ccf --- /dev/null +++ b/test/battle/form_change/battle_switch.c @@ -0,0 +1,23 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon switching out") +{ + GIVEN { + ASSUME(P_GEN_6_POKEMON == TRUE); + PLAYER(SPECIES_AEGISLASH); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TACKLE); } + TURN { SWITCH(player, 1); } + TURN { SWITCH(player, 0); } + } SCENE { + ABILITY_POPUP(player, ABILITY_STANCE_CHANGE); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + MESSAGE("Aegislash used Tackle!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + } THEN { + EXPECT_EQ(player->species, SPECIES_AEGISLASH); + } +} diff --git a/test/form_change.c b/test/battle/form_change/begin_battle.c similarity index 68% rename from test/form_change.c rename to test/battle/form_change/begin_battle.c index 43497101c..328db756d 100644 --- a/test/form_change.c +++ b/test/battle/form_change/begin_battle.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Xerneas changes into Active Form upon battle start") { @@ -79,41 +79,3 @@ SINGLE_BATTLE_TEST("Zamazenta's Iron Head becomes Behemoth Bash upon form change EXPECT_EQ(player->moves[0], MOVE_BEHEMOTH_BASH); } } - -SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon switching out") -{ - GIVEN { - ASSUME(P_GEN_6_POKEMON == TRUE); - PLAYER(SPECIES_AEGISLASH); - PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, MOVE_TACKLE); } - TURN { SWITCH(player, 1); } - TURN { SWITCH(player, 0); } - } SCENE { - ABILITY_POPUP(player, ABILITY_STANCE_CHANGE); - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); - MESSAGE("Aegislash used Tackle!"); - MESSAGE("Foe Wobbuffet used Celebrate!"); - } THEN { - EXPECT_EQ(player->species, SPECIES_AEGISLASH); - } -} - -SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting") -{ - GIVEN { - ASSUME(P_GEN_6_POKEMON == TRUE); - PLAYER(SPECIES_AEGISLASH) { HP(1); } - PLAYER(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(opponent, MOVE_GUST); SEND_OUT(player, 1); } - } SCENE { - MESSAGE("Foe Wobbuffet used Gust!"); - MESSAGE("Aegislash fainted!"); - } THEN { - EXPECT_EQ(GetMonData(&PLAYER_PARTY[0], MON_DATA_SPECIES), SPECIES_AEGISLASH); - } -} diff --git a/test/battle/form_change/faint.c b/test/battle/form_change/faint.c new file mode 100644 index 000000000..f4baa2894 --- /dev/null +++ b/test/battle/form_change/faint.c @@ -0,0 +1,19 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting") +{ + GIVEN { + ASSUME(P_GEN_6_POKEMON == TRUE); + PLAYER(SPECIES_AEGISLASH) { HP(1); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_GUST); SEND_OUT(player, 1); } + } SCENE { + MESSAGE("Foe Wobbuffet used Gust!"); + MESSAGE("Aegislash fainted!"); + } THEN { + EXPECT_EQ(GetMonData(&PLAYER_PARTY[0], MON_DATA_SPECIES), SPECIES_AEGISLASH); + } +} diff --git a/test/mega_evolution.c b/test/battle/form_change/mega_evolution.c similarity index 99% rename from test/mega_evolution.c rename to test/battle/form_change/mega_evolution.c index 5597f5396..32cfb2c59 100644 --- a/test/mega_evolution.c +++ b/test/battle/form_change/mega_evolution.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Venusaur can Mega Evolve holding Venusaurite") { diff --git a/test/primal_reversion.c b/test/battle/form_change/primal_reversion.c similarity index 99% rename from test/primal_reversion.c rename to test/battle/form_change/primal_reversion.c index f888d17f7..3e271f67c 100644 --- a/test/primal_reversion.c +++ b/test/battle/form_change/primal_reversion.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Primal reversion happens for Groudon only when holding Red Orb") { diff --git a/test/hold_effect_air_balloon.c b/test/battle/hold_effect/air_balloon.c similarity index 99% rename from test/hold_effect_air_balloon.c rename to test/battle/hold_effect/air_balloon.c index ba740948a..1ed8a89e4 100644 --- a/test/hold_effect_air_balloon.c +++ b/test/battle/hold_effect/air_balloon.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/hold_effect_berserk_gene.c b/test/battle/hold_effect/berserk_gene.c similarity index 99% rename from test/hold_effect_berserk_gene.c rename to test/battle/hold_effect/berserk_gene.c index 981881e74..6fd0f8a85 100644 --- a/test/hold_effect_berserk_gene.c +++ b/test/battle/hold_effect/berserk_gene.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/hold_effect_clear_amulet.c b/test/battle/hold_effect/clear_amulet.c similarity index 99% rename from test/hold_effect_clear_amulet.c rename to test/battle/hold_effect/clear_amulet.c index 83c887b2d..39e6c22a6 100644 --- a/test/hold_effect_clear_amulet.c +++ b/test/battle/hold_effect/clear_amulet.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/hold_effect_eject_button.c b/test/battle/hold_effect/eject_button.c similarity index 99% rename from test/hold_effect_eject_button.c rename to test/battle/hold_effect/eject_button.c index 7e6312656..4409f5d5b 100644 --- a/test/hold_effect_eject_button.c +++ b/test/battle/hold_effect/eject_button.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/hold_effect_gems.c b/test/battle/hold_effect/gems.c similarity index 99% rename from test/hold_effect_gems.c rename to test/battle/hold_effect/gems.c index 9a90b81f9..c98718313 100644 --- a/test/hold_effect_gems.c +++ b/test/battle/hold_effect/gems.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/hold_effect_leftovers.c b/test/battle/hold_effect/leftovers.c similarity index 98% rename from test/hold_effect_leftovers.c rename to test/battle/hold_effect/leftovers.c index 01b0655a5..7e51a3bd7 100644 --- a/test/hold_effect_leftovers.c +++ b/test/battle/hold_effect/leftovers.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/hold_effect_mirror_herb.c b/test/battle/hold_effect/mirror_herb.c similarity index 98% rename from test/hold_effect_mirror_herb.c rename to test/battle/hold_effect/mirror_herb.c index 22f564b85..1e9058b08 100644 --- a/test/hold_effect_mirror_herb.c +++ b/test/battle/hold_effect/mirror_herb.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/hold_effect_red_card.c b/test/battle/hold_effect/red_card.c similarity index 99% rename from test/hold_effect_red_card.c rename to test/battle/hold_effect/red_card.c index 0a8bb3460..aad7fea64 100644 --- a/test/hold_effect_red_card.c +++ b/test/battle/hold_effect/red_card.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/battle/hold_effect/safety_goggles.c b/test/battle/hold_effect/safety_goggles.c new file mode 100644 index 000000000..bec703443 --- /dev/null +++ b/test/battle/hold_effect/safety_goggles.c @@ -0,0 +1,26 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + gItems[ITEM_SAFETY_GOGGLES].holdEffect == HOLD_EFFECT_SAFETY_GOGGLES; +}; + +SINGLE_BATTLE_TEST("Safety Goggles block powder and spore moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + ASSUME(gItems[ITEM_SAFETY_GOGGLES].holdEffect == HOLD_EFFECT_SAFETY_GOGGLES); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_ABRA) { Item(ITEM_SAFETY_GOGGLES); } + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); + MESSAGE("Foe Abra is not affected thanks to its SafetyGoggles!"); + } +} + +TO_DO_BATTLE_TEST("Safety Goggles blocks damage from hail"); +TO_DO_BATTLE_TEST("Safety Goggles blocks damage from sandstorm"); +TO_DO_BATTLE_TEST("Safety Goggles blocks Effect Spore's effect"); diff --git a/test/hold_effect_utility_umbrella.c b/test/battle/hold_effect/utility_umbrella.c similarity index 99% rename from test/hold_effect_utility_umbrella.c rename to test/battle/hold_effect/utility_umbrella.c index 6716ee72f..837bacc90 100644 --- a/test/hold_effect_utility_umbrella.c +++ b/test/battle/hold_effect/utility_umbrella.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" // Please add Utility Umbrella interactions with move, item and ability effects on their respective files. ASSUMPTIONS diff --git a/test/item_effect_cure_status.c b/test/battle/item_effect/cure_status.c similarity index 99% rename from test/item_effect_cure_status.c rename to test/battle/item_effect/cure_status.c index 1f7c9d7a2..c8b16dfdb 100644 --- a/test/item_effect_cure_status.c +++ b/test/battle/item_effect/cure_status.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Paralyze Heal heals a battler from being paralyzed") { diff --git a/test/item_effect_heal_and_cure_status.c b/test/battle/item_effect/heal_and_cure_status.c similarity index 98% rename from test/item_effect_heal_and_cure_status.c rename to test/battle/item_effect/heal_and_cure_status.c index 1f81ad922..de6a459a1 100644 --- a/test/item_effect_heal_and_cure_status.c +++ b/test/battle/item_effect/heal_and_cure_status.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary status") { diff --git a/test/item_effect_increase_stat.c b/test/battle/item_effect/increase_stat.c similarity index 99% rename from test/item_effect_increase_stat.c rename to test/battle/item_effect/increase_stat.c index ab4113064..3aeb8d525 100644 --- a/test/item_effect_increase_stat.c +++ b/test/battle/item_effect/increase_stat.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("X Attack sharply raises battler's Attack stat", s16 damage) { diff --git a/test/item_effect_restore_hp.c b/test/battle/item_effect/restore_hp.c similarity index 98% rename from test/item_effect_restore_hp.c rename to test/battle/item_effect/restore_hp.c index a469b21ff..b9e4be034 100644 --- a/test/item_effect_restore_hp.c +++ b/test/battle/item_effect/restore_hp.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Items can restore a battler's HP by a fixed amount") { diff --git a/test/item_effect_restore_pp.c b/test/battle/item_effect/restore_pp.c similarity index 98% rename from test/item_effect_restore_pp.c rename to test/battle/item_effect/restore_pp.c index 7194efbbb..e998ef3d9 100644 --- a/test/item_effect_restore_pp.c +++ b/test/battle/item_effect/restore_pp.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Ether restores the PP of one of a battler's moves by 10 ") { diff --git a/test/item_effect_revive.c b/test/battle/item_effect/revive.c similarity index 98% rename from test/item_effect_revive.c rename to test/battle/item_effect/revive.c index c2a22f80a..2be2ac4a6 100644 --- a/test/item_effect_revive.c +++ b/test/battle/item_effect/revive.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Revive restores a fainted battler's HP to half") { diff --git a/test/item_effect_set_focus_energy.c b/test/battle/item_effect/set_focus_energy.c similarity index 96% rename from test/item_effect_set_focus_energy.c rename to test/battle/item_effect/set_focus_energy.c index 95648465e..da326bbe3 100644 --- a/test/item_effect_set_focus_energy.c +++ b/test/battle/item_effect/set_focus_energy.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Dire Hit increases a battler's critical hit chance by 2 stages") { diff --git a/test/item_effect_set_mist.c b/test/battle/item_effect/set_mist.c similarity index 96% rename from test/item_effect_set_mist.c rename to test/battle/item_effect/set_mist.c index e01775ec4..a369e70d9 100644 --- a/test/item_effect_set_mist.c +++ b/test/battle/item_effect/set_mist.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Guard Spec. sets Mist effect on the battlers side") { diff --git a/test/move.c b/test/battle/move.c similarity index 99% rename from test/move.c rename to test/battle/move.c index 9e23c2bd0..e89c2ad35 100644 --- a/test/move.c +++ b/test/battle/move.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Accuracy controls the proportion of misses") { diff --git a/test/move_effect_absorb.c b/test/battle/move_effect/absorb.c similarity index 97% rename from test/move_effect_absorb.c rename to test/battle/move_effect/absorb.c index 2ea49ef9e..d46dbd9c5 100644 --- a/test/move_effect_absorb.c +++ b/test/battle/move_effect/absorb.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_accuracy_down.c b/test/battle/move_effect/accuracy_down.c similarity index 96% rename from test/move_effect_accuracy_down.c rename to test/battle/move_effect/accuracy_down.c index a6a79d8db..a30430a28 100644 --- a/test/move_effect_accuracy_down.c +++ b/test/battle/move_effect/accuracy_down.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_after_you.c b/test/battle/move_effect/after_you.c similarity index 98% rename from test/move_effect_after_you.c rename to test/battle/move_effect/after_you.c index a488d7a8c..576267cb4 100644 --- a/test/move_effect_after_you.c +++ b/test/battle/move_effect/after_you.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_assist.c b/test/battle/move_effect/assist.c similarity index 96% rename from test/move_effect_assist.c rename to test/battle/move_effect/assist.c index 28ae78572..ed2f43dc1 100644 --- a/test/move_effect_assist.c +++ b/test/battle/move_effect/assist.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_attack_down.c b/test/battle/move_effect/attack_down.c similarity index 97% rename from test/move_effect_attack_down.c rename to test/battle/move_effect/attack_down.c index 0df14f701..2149624c8 100644 --- a/test/move_effect_attack_down.c +++ b/test/battle/move_effect/attack_down.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_attack_up.c b/test/battle/move_effect/attack_up.c similarity index 97% rename from test/move_effect_attack_up.c rename to test/battle/move_effect/attack_up.c index 4978d03f9..7cd8f953c 100644 --- a/test/move_effect_attack_up.c +++ b/test/battle/move_effect/attack_up.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_attack_up_user_ally.c b/test/battle/move_effect/attack_up_user_ally.c similarity index 99% rename from test/move_effect_attack_up_user_ally.c rename to test/battle/move_effect/attack_up_user_ally.c index 3d2ac6bb8..6691b49ed 100644 --- a/test/move_effect_attack_up_user_ally.c +++ b/test/battle/move_effect/attack_up_user_ally.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_barb_barrage.c b/test/battle/move_effect/barb_barrage.c similarity index 98% rename from test/move_effect_barb_barrage.c rename to test/battle/move_effect/barb_barrage.c index ad9f1ec2e..89062b3de 100644 --- a/test/move_effect_barb_barrage.c +++ b/test/battle/move_effect/barb_barrage.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_beak_blast.c b/test/battle/move_effect/beak_blast.c similarity index 99% rename from test/move_effect_beak_blast.c rename to test/battle/move_effect/beak_blast.c index a2d66b405..50bff2411 100644 --- a/test/move_effect_beak_blast.c +++ b/test/battle/move_effect/beak_blast.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_bide.c b/test/battle/move_effect/bide.c similarity index 97% rename from test/move_effect_bide.c rename to test/battle/move_effect/bide.c index 0b0e18408..4dfdc3430 100644 --- a/test/move_effect_bide.c +++ b/test/battle/move_effect/bide.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_burn_hit.c b/test/battle/move_effect/burn_hit.c similarity index 97% rename from test/move_effect_burn_hit.c rename to test/battle/move_effect/burn_hit.c index 88fef17cb..3f257dfcb 100644 --- a/test/move_effect_burn_hit.c +++ b/test/battle/move_effect/burn_hit.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_burn_up.c b/test/battle/move_effect/burn_up.c similarity index 98% rename from test/move_effect_burn_up.c rename to test/battle/move_effect/burn_up.c index a53b1afa8..d24e47992 100644 --- a/test/move_effect_burn_up.c +++ b/test/battle/move_effect/burn_up.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_court_change.c b/test/battle/move_effect/court_change.c similarity index 99% rename from test/move_effect_court_change.c rename to test/battle/move_effect/court_change.c index 9d03efddf..4aa2e9d36 100644 --- a/test/move_effect_court_change.c +++ b/test/battle/move_effect/court_change.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_defense_down.c b/test/battle/move_effect/defense_down.c similarity index 97% rename from test/move_effect_defense_down.c rename to test/battle/move_effect/defense_down.c index 9ecd1c25f..8a8c69ec3 100644 --- a/test/move_effect_defense_down.c +++ b/test/battle/move_effect/defense_down.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_defense_up.c b/test/battle/move_effect/defense_up.c similarity index 97% rename from test/move_effect_defense_up.c rename to test/battle/move_effect/defense_up.c index 492ce7bc9..b4c7cb4db 100644 --- a/test/move_effect_defense_up.c +++ b/test/battle/move_effect/defense_up.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_defog.c b/test/battle/move_effect/defog.c similarity index 99% rename from test/move_effect_defog.c rename to test/battle/move_effect/defog.c index 055f3f61a..1cd78fb50 100644 --- a/test/move_effect_defog.c +++ b/test/battle/move_effect/defog.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_dire_claw.c b/test/battle/move_effect/dire_claw.c similarity index 99% rename from test/move_effect_dire_claw.c rename to test/battle/move_effect/dire_claw.c index 712b6ea25..421ba201d 100644 --- a/test/move_effect_dire_claw.c +++ b/test/battle/move_effect/dire_claw.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_double_shock.c b/test/battle/move_effect/double_shock.c similarity index 98% rename from test/move_effect_double_shock.c rename to test/battle/move_effect/double_shock.c index c3651c403..89f758681 100644 --- a/test/move_effect_double_shock.c +++ b/test/battle/move_effect/double_shock.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_dream_eater.c b/test/battle/move_effect/dream_eater.c similarity index 98% rename from test/move_effect_dream_eater.c rename to test/battle/move_effect/dream_eater.c index fa17b94a6..047fe7898 100644 --- a/test/move_effect_dream_eater.c +++ b/test/battle/move_effect/dream_eater.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_encore.c b/test/battle/move_effect/encore.c similarity index 98% rename from test/move_effect_encore.c rename to test/battle/move_effect/encore.c index f8a178512..eff6c33b2 100644 --- a/test/move_effect_encore.c +++ b/test/battle/move_effect/encore.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_evasion_up.c b/test/battle/move_effect/evasion_up.c similarity index 96% rename from test/move_effect_evasion_up.c rename to test/battle/move_effect/evasion_up.c index 4a4e99db7..ecb6429cd 100644 --- a/test/move_effect_evasion_up.c +++ b/test/battle/move_effect/evasion_up.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_explosion.c b/test/battle/move_effect/explosion.c similarity index 99% rename from test/move_effect_explosion.c rename to test/battle/move_effect/explosion.c index 41e74044b..ef6dba6c0 100644 --- a/test/move_effect_explosion.c +++ b/test/battle/move_effect/explosion.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_focus_punch.c b/test/battle/move_effect/focus_punch.c similarity index 99% rename from test/move_effect_focus_punch.c rename to test/battle/move_effect/focus_punch.c index 2bd1e52e5..e97deef43 100644 --- a/test/move_effect_focus_punch.c +++ b/test/battle/move_effect/focus_punch.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_freeze_hit.c b/test/battle/move_effect/freeze_hit.c similarity index 97% rename from test/move_effect_freeze_hit.c rename to test/battle/move_effect/freeze_hit.c index bb0878d0d..5d99311ce 100644 --- a/test/move_effect_freeze_hit.c +++ b/test/battle/move_effect/freeze_hit.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_haze.c b/test/battle/move_effect/haze.c similarity index 97% rename from test/move_effect_haze.c rename to test/battle/move_effect/haze.c index bd43c6947..f1e4456aa 100644 --- a/test/move_effect_haze.c +++ b/test/battle/move_effect/haze.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_healing_wish.c b/test/battle/move_effect/healing_wish.c similarity index 99% rename from test/move_effect_healing_wish.c rename to test/battle/move_effect/healing_wish.c index 00ee76561..fd25b8489 100644 --- a/test/move_effect_healing_wish.c +++ b/test/battle/move_effect/healing_wish.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_hex.c b/test/battle/move_effect/hex.c similarity index 97% rename from test/move_effect_hex.c rename to test/battle/move_effect/hex.c index 2847aeb17..e0a924906 100644 --- a/test/move_effect_hex.c +++ b/test/battle/move_effect/hex.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_hit_escape.c b/test/battle/move_effect/hit_escape.c similarity index 99% rename from test/move_effect_hit_escape.c rename to test/battle/move_effect/hit_escape.c index fb5ff2dd5..f2d513095 100644 --- a/test/move_effect_hit_escape.c +++ b/test/battle/move_effect/hit_escape.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_hit_set_entry_hazardss.c b/test/battle/move_effect/hit_set_entry_hazardss.c similarity index 99% rename from test/move_effect_hit_set_entry_hazardss.c rename to test/battle/move_effect/hit_set_entry_hazardss.c index 23f0f0b28..caf75ed49 100644 --- a/test/move_effect_hit_set_entry_hazardss.c +++ b/test/battle/move_effect/hit_set_entry_hazardss.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_hit_switch_target.c b/test/battle/move_effect/hit_switch_target.c similarity index 98% rename from test/move_effect_hit_switch_target.c rename to test/battle/move_effect/hit_switch_target.c index 5af3062a4..683b005fd 100644 --- a/test/move_effect_hit_switch_target.c +++ b/test/battle/move_effect/hit_switch_target.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_hydro_steam.c b/test/battle/move_effect/hydro_steam.c similarity index 98% rename from test/move_effect_hydro_steam.c rename to test/battle/move_effect/hydro_steam.c index 487449159..f86da07ac 100644 --- a/test/move_effect_hydro_steam.c +++ b/test/battle/move_effect/hydro_steam.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_metronome.c b/test/battle/move_effect/metronome.c similarity index 98% rename from test/move_effect_metronome.c rename to test/battle/move_effect/metronome.c index 1e68603e6..c6611ffa5 100644 --- a/test/move_effect_metronome.c +++ b/test/battle/move_effect/metronome.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_mind_blown.c b/test/battle/move_effect/mind_blown.c similarity index 99% rename from test/move_effect_mind_blown.c rename to test/battle/move_effect/mind_blown.c index 19179f990..485f2abd6 100644 --- a/test/move_effect_mind_blown.c +++ b/test/battle/move_effect/mind_blown.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_mirror_move.c b/test/battle/move_effect/mirror_move.c similarity index 99% rename from test/move_effect_mirror_move.c rename to test/battle/move_effect/mirror_move.c index ff21c0efa..b709ffce7 100644 --- a/test/move_effect_mirror_move.c +++ b/test/battle/move_effect/mirror_move.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_paralyze_hit.c b/test/battle/move_effect/paralyze_hit.c similarity index 97% rename from test/move_effect_paralyze_hit.c rename to test/battle/move_effect/paralyze_hit.c index 8e7d259f7..4efe6746c 100644 --- a/test/move_effect_paralyze_hit.c +++ b/test/battle/move_effect/paralyze_hit.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_poison_hit.c b/test/battle/move_effect/poison_hit.c similarity index 97% rename from test/move_effect_poison_hit.c rename to test/battle/move_effect/poison_hit.c index b1a154810..91d700466 100644 --- a/test/move_effect_poison_hit.c +++ b/test/battle/move_effect/poison_hit.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_rampage.c b/test/battle/move_effect/rampage.c similarity index 99% rename from test/move_effect_rampage.c rename to test/battle/move_effect/rampage.c index aa4a002fb..a1a271b37 100644 --- a/test/move_effect_rampage.c +++ b/test/battle/move_effect/rampage.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_recoil_if_miss.c b/test/battle/move_effect/recoil_if_miss.c similarity index 99% rename from test/move_effect_recoil_if_miss.c rename to test/battle/move_effect/recoil_if_miss.c index 51b5fe5e9..c72fd2648 100644 --- a/test/move_effect_recoil_if_miss.c +++ b/test/battle/move_effect/recoil_if_miss.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_reflect.c b/test/battle/move_effect/reflect.c similarity index 99% rename from test/move_effect_reflect.c rename to test/battle/move_effect/reflect.c index 4ea875f35..dd8738f72 100644 --- a/test/move_effect_reflect.c +++ b/test/battle/move_effect/reflect.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_revival_blessing.c b/test/battle/move_effect/revival_blessing.c similarity index 99% rename from test/move_effect_revival_blessing.c rename to test/battle/move_effect/revival_blessing.c index 3cb4d4ca4..a5dd32c19 100644 --- a/test/move_effect_revival_blessing.c +++ b/test/battle/move_effect/revival_blessing.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" // Note: Since these tests are recorded battle, they don't test the right battle controller // behaviors. These have been tested in-game, in double, in multi, and in link battles. AI will always diff --git a/test/move_effect_roar.c b/test/battle/move_effect/roar.c similarity index 98% rename from test/move_effect_roar.c rename to test/battle/move_effect/roar.c index 99256b298..20f934808 100644 --- a/test/move_effect_roar.c +++ b/test/battle/move_effect/roar.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_shell_trap.c b/test/battle/move_effect/shell_trap.c similarity index 99% rename from test/move_effect_shell_trap.c rename to test/battle/move_effect/shell_trap.c index 2498e12f2..7fb80210e 100644 --- a/test/move_effect_shell_trap.c +++ b/test/battle/move_effect/shell_trap.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_sleep.c b/test/battle/move_effect/sleep.c similarity index 97% rename from test/move_effect_sleep.c rename to test/battle/move_effect/sleep.c index c34e1248e..d2cac0af9 100644 --- a/test/move_effect_sleep.c +++ b/test/battle/move_effect/sleep.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_special_attack_down.c b/test/battle/move_effect/special_attack_down.c similarity index 97% rename from test/move_effect_special_attack_down.c rename to test/battle/move_effect/special_attack_down.c index 0511692d4..6e7a84f0a 100644 --- a/test/move_effect_special_attack_down.c +++ b/test/battle/move_effect/special_attack_down.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_special_attack_up_3.c b/test/battle/move_effect/special_attack_up_3.c similarity index 97% rename from test/move_effect_special_attack_up_3.c rename to test/battle/move_effect/special_attack_up_3.c index ad53bedb9..340c59360 100644 --- a/test/move_effect_special_attack_up_3.c +++ b/test/battle/move_effect/special_attack_up_3.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_spikes.c b/test/battle/move_effect/spikes.c similarity index 99% rename from test/move_effect_spikes.c rename to test/battle/move_effect/spikes.c index 0c84a5fb1..bfc0f39b5 100644 --- a/test/move_effect_spikes.c +++ b/test/battle/move_effect/spikes.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_sticky_web.c b/test/battle/move_effect/sticky_web.c similarity index 99% rename from test/move_effect_sticky_web.c rename to test/battle/move_effect/sticky_web.c index f0a6eb8d8..e12cc8090 100644 --- a/test/move_effect_sticky_web.c +++ b/test/battle/move_effect/sticky_web.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_stockpile.c b/test/battle/move_effect/stockpile.c similarity index 99% rename from test/move_effect_stockpile.c rename to test/battle/move_effect/stockpile.c index b16408d49..0e540bb5d 100644 --- a/test/move_effect_stockpile.c +++ b/test/battle/move_effect/stockpile.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" // These tests cover all 3 effects: Stockpile, Spit up and Swallow. ASSUMPTIONS diff --git a/test/move_effect_tailwind.c b/test/battle/move_effect/tailwind.c similarity index 98% rename from test/move_effect_tailwind.c rename to test/battle/move_effect/tailwind.c index 7dfffdbe0..2e9ee5ade 100644 --- a/test/move_effect_tailwind.c +++ b/test/battle/move_effect/tailwind.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_teleport.c b/test/battle/move_effect/teleport.c similarity index 98% rename from test/move_effect_teleport.c rename to test/battle/move_effect/teleport.c index 9c8a16d4b..7544ae8a4 100644 --- a/test/move_effect_teleport.c +++ b/test/battle/move_effect/teleport.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_torment.c b/test/battle/move_effect/torment.c similarity index 98% rename from test/move_effect_torment.c rename to test/battle/move_effect/torment.c index 43f05e29f..dbef1d983 100644 --- a/test/move_effect_torment.c +++ b/test/battle/move_effect/torment.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_toxic.c b/test/battle/move_effect/toxic.c similarity index 98% rename from test/move_effect_toxic.c rename to test/battle/move_effect/toxic.c index f71d2a972..78d978b26 100644 --- a/test/move_effect_toxic.c +++ b/test/battle/move_effect/toxic.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_toxic_spikes.c b/test/battle/move_effect/toxic_spikes.c similarity index 99% rename from test/move_effect_toxic_spikes.c rename to test/battle/move_effect/toxic_spikes.c index 44780da21..3be2d1627 100644 --- a/test/move_effect_toxic_spikes.c +++ b/test/battle/move_effect/toxic_spikes.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_tri_attack.c b/test/battle/move_effect/tri_attack.c similarity index 99% rename from test/move_effect_tri_attack.c rename to test/battle/move_effect/tri_attack.c index 91b465067..aec711aab 100644 --- a/test/move_effect_tri_attack.c +++ b/test/battle/move_effect/tri_attack.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_triple_kick.c b/test/battle/move_effect/triple_kick.c similarity index 97% rename from test/move_effect_triple_kick.c rename to test/battle/move_effect/triple_kick.c index e0a91b011..5ff47c840 100644 --- a/test/move_effect_triple_kick.c +++ b/test/battle/move_effect/triple_kick.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_effect_venoshock.c b/test/battle/move_effect/venoshock.c similarity index 97% rename from test/move_effect_venoshock.c rename to test/battle/move_effect/venoshock.c index 134982a60..b2b8fcda2 100644 --- a/test/move_effect_venoshock.c +++ b/test/battle/move_effect/venoshock.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/move_flag_three_strikes.c b/test/battle/move_flags/three_strikes.c similarity index 98% rename from test/move_flag_three_strikes.c rename to test/battle/move_flags/three_strikes.c index b597b4efe..794df10d3 100644 --- a/test/move_flag_three_strikes.c +++ b/test/battle/move_flags/three_strikes.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Three-strike flag turns a move into a 3-hit move") { diff --git a/test/battle/status1/bad_poison.c b/test/battle/status1/bad_poison.c new file mode 100644 index 000000000..7a430086b --- /dev/null +++ b/test/battle/status1/bad_poison.c @@ -0,0 +1,39 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Bad poison deals 1/16th cumulative damage per turn") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + for (i = 0; i < 4; i++) + TURN {} + } SCENE { + s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); + for (i = 0; i < 4; i++) + HP_BAR(player, damage: maxHP / 16 * (i + 1)); + } +} + +SINGLE_BATTLE_TEST("Bad poison cumulative damage resets on switch") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); } + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN {} + TURN {} + TURN { SWITCH(player, 1); } + TURN { SWITCH(player, 0); } + TURN {} + TURN {} + } SCENE { + s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); + for (i = 0; i < 2; i++) + HP_BAR(player, damage: maxHP / 16 * (i + 1)); + for (i = 0; i < 2; i++) + HP_BAR(player, damage: maxHP / 16 * (i + 1)); + } +} diff --git a/test/battle/status1/burn.c b/test/battle/status1/burn.c new file mode 100644 index 000000000..84439ec9e --- /dev/null +++ b/test/battle/status1/burn.c @@ -0,0 +1,35 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Burn deals 1/16th damage per turn") +{ + GIVEN { + ASSUME(B_BURN_DAMAGE >= GEN_LATEST); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_BURN); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + for (i = 0; i < 4; i++) + TURN {} + } SCENE { + s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); + for (i = 0; i < 4; i++) + HP_BAR(player, damage: maxHP / 16); + } +} + +SINGLE_BATTLE_TEST("Burn reduces Attack by 50%", s16 damage) +{ + bool32 burned; + PARAMETRIZE { burned = FALSE; } + PARAMETRIZE { burned = TRUE; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { if (burned) Status1(STATUS1_BURN); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_TACKLE); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); + } +} diff --git a/test/battle/status1/freeze.c b/test/battle/status1/freeze.c new file mode 100644 index 000000000..e3c53f790 --- /dev/null +++ b/test/battle/status1/freeze.c @@ -0,0 +1,45 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Freeze has a 20% chance of being thawed") +{ + PASSES_RANDOMLY(20, 100, RNG_FROZEN); + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } SCENE { + STATUS_ICON(player, none: TRUE); + } +} + +SINGLE_BATTLE_TEST("Freeze is thawed by opponent's Fire-type attacks") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_EMBER); MOVE(player, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Foe Wobbuffet used Ember!"); + MESSAGE("Wobbuffet was defrosted!"); + STATUS_ICON(player, none: TRUE); + } +} + +SINGLE_BATTLE_TEST("Freeze is thawed by user's Flame Wheel") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_FLAME_WHEEL].flags & FLAG_THAW_USER); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_FLAME_WHEEL); } + } SCENE { + MESSAGE("Wobbuffet was defrosted by Flame Wheel!"); + STATUS_ICON(player, none: TRUE); + MESSAGE("Wobbuffet used Flame Wheel!"); + } +} diff --git a/test/status_frostbite.c b/test/battle/status1/frostbite.c similarity index 99% rename from test/status_frostbite.c rename to test/battle/status1/frostbite.c index d2bfa6bba..2b61c4d65 100644 --- a/test/status_frostbite.c +++ b/test/battle/status1/frostbite.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Frostbite reduces the special attack by 50 percent") { diff --git a/test/battle/status1/paralysis.c b/test/battle/status1/paralysis.c new file mode 100644 index 000000000..b6edaf263 --- /dev/null +++ b/test/battle/status1/paralysis.c @@ -0,0 +1,44 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Paralysis reduces Speed by 50%") +{ + u16 playerSpeed; + bool32 playerFirst; + PARAMETRIZE { playerSpeed = 98; playerFirst = FALSE; } + PARAMETRIZE { playerSpeed = 102; playerFirst = TRUE; } + GIVEN { + ASSUME(B_PARALYSIS_SPEED >= GEN_7); + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); Speed(playerSpeed); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(50); } + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } + } SCENE { + if (playerFirst) { + ONE_OF { + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Wobbuffet is paralyzed! It can't move!"); + } + MESSAGE("Foe Wobbuffet used Celebrate!"); + } else { + MESSAGE("Foe Wobbuffet used Celebrate!"); + ONE_OF { + MESSAGE("Wobbuffet used Celebrate!"); + MESSAGE("Wobbuffet is paralyzed! It can't move!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Paralysis has a 25% chance of skipping the turn") +{ + PASSES_RANDOMLY(25, 100, RNG_PARALYSIS); + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Wobbuffet is paralyzed! It can't move!"); + } +} diff --git a/test/battle/status1/poison.c b/test/battle/status1/poison.c new file mode 100644 index 000000000..771d0d2ec --- /dev/null +++ b/test/battle/status1/poison.c @@ -0,0 +1,17 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Poison deals 1/8th damage per turn") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + for (i = 0; i < 4; i++) + TURN {} + } SCENE { + s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); + for (i = 0; i < 4; i++) + HP_BAR(player, damage: maxHP / 8); + } +} diff --git a/test/battle/status1/sleep.c b/test/battle/status1/sleep.c new file mode 100644 index 000000000..8ef6137d3 --- /dev/null +++ b/test/battle/status1/sleep.c @@ -0,0 +1,23 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Sleep prevents the battler from using a move") +{ + u32 turns; + PARAMETRIZE { turns = 1; } + PARAMETRIZE { turns = 2; } + PARAMETRIZE { turns = 3; } + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP_TURN(turns)); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + for (i = 0; i < turns; i++) + TURN { MOVE(player, MOVE_CELEBRATE); } + } SCENE { + for (i = 0; i < turns - 1; i++) + MESSAGE("Wobbuffet is fast asleep."); + MESSAGE("Wobbuffet woke up!"); + STATUS_ICON(player, none: TRUE); + MESSAGE("Wobbuffet used Celebrate!"); + } +} diff --git a/test/terrain_electric.c b/test/battle/terrain/electric.c similarity index 99% rename from test/terrain_electric.c rename to test/battle/terrain/electric.c index 78f490c42..cebb0cb75 100644 --- a/test/terrain_electric.c +++ b/test/battle/terrain/electric.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Electric Terrain protects grounded battlers from falling asleep") { diff --git a/test/terrain_grassy.c b/test/battle/terrain/grassy.c similarity index 99% rename from test/terrain_grassy.c rename to test/battle/terrain/grassy.c index 21d64f61e..893a30528 100644 --- a/test/terrain_grassy.c +++ b/test/battle/terrain/grassy.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Grassy Terrain recovers 1/16th HP at end of turn") { diff --git a/test/terrain_misty.c b/test/battle/terrain/misty.c similarity index 99% rename from test/terrain_misty.c rename to test/battle/terrain/misty.c index f60122075..dd6489af6 100644 --- a/test/terrain_misty.c +++ b/test/battle/terrain/misty.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Misty Terrain protects grounded battlers from non-volatile status conditions") { diff --git a/test/terrain_psychic.c b/test/battle/terrain/psychic.c similarity index 99% rename from test/terrain_psychic.c rename to test/battle/terrain/psychic.c index f9f95a47d..c810af340 100644 --- a/test/terrain_psychic.c +++ b/test/battle/terrain/psychic.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" SINGLE_BATTLE_TEST("Psychic Terrain protects grounded battlers from priority moves") { diff --git a/test/trainer_control.c b/test/battle/trainer_control.c similarity index 99% rename from test/trainer_control.c rename to test/battle/trainer_control.c index 2a21dcdf6..f5ca68e36 100644 --- a/test/trainer_control.c +++ b/test/battle/trainer_control.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test.h" +#include "test/test.h" #include "battle.h" #include "battle_main.h" #include "data.h" diff --git a/test/battle/type/grass.c b/test/battle/type/grass.c new file mode 100644 index 000000000..b36813ac7 --- /dev/null +++ b/test/battle/type/grass.c @@ -0,0 +1,17 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Grass-type Pokémon block powder and spore moves") +{ + GIVEN { + ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); + ASSUME(gSpeciesInfo[SPECIES_ODDISH].types[0] == TYPE_GRASS); + PLAYER(SPECIES_WYNAUT); + OPPONENT(SPECIES_ODDISH); + } WHEN { + TURN { MOVE(player, MOVE_STUN_SPORE); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); + MESSAGE("It doesn't affect Foe Oddish…"); + } +} diff --git a/test/weather_rain.c b/test/battle/weather/rain.c similarity index 98% rename from test/weather_rain.c rename to test/battle/weather/rain.c index b99681495..00ac26304 100644 --- a/test/weather_rain.c +++ b/test/battle/weather/rain.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" // Please add Rain interactions with move, item and ability effects on their respective files. ASSUMPTIONS diff --git a/test/weather_snow.c b/test/battle/weather/snow.c similarity index 99% rename from test/weather_snow.c rename to test/battle/weather/snow.c index 93deb1432..1e8cb62cb 100644 --- a/test/weather_snow.c +++ b/test/battle/weather/snow.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" ASSUMPTIONS { diff --git a/test/weather_sunlight.c b/test/battle/weather/sunlight.c similarity index 98% rename from test/weather_sunlight.c rename to test/battle/weather/sunlight.c index beba0e9b6..9d471332a 100644 --- a/test/weather_sunlight.c +++ b/test/battle/weather/sunlight.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test_battle.h" +#include "test/battle.h" // Please add Sunlight interactions with move, item and ability effects on their respective files. ASSUMPTIONS diff --git a/test/powder_moves.c b/test/powder_moves.c deleted file mode 100644 index a0185ad37..000000000 --- a/test/powder_moves.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "global.h" -#include "test_battle.h" - -SINGLE_BATTLE_TEST("Powder Moves are blocked by Grass Types") -{ - GIVEN { - ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); - ASSUME(gSpeciesInfo[SPECIES_ODDISH].types[0] == TYPE_GRASS); - PLAYER(SPECIES_WYNAUT); - OPPONENT(SPECIES_ODDISH); - } WHEN { - TURN { MOVE(player, MOVE_STUN_SPORE); } - } SCENE { - NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); - MESSAGE("It doesn't affect Foe Oddish…"); - } -} - -SINGLE_BATTLE_TEST("Powder Moves are blocked by Ability Overcoat") -{ - GIVEN { - ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); - PLAYER(SPECIES_WYNAUT); - OPPONENT(SPECIES_PINECO) { Ability(ABILITY_OVERCOAT); } - } WHEN { - TURN { MOVE(player, MOVE_STUN_SPORE); } - } SCENE { - ABILITY_POPUP(opponent, ABILITY_OVERCOAT); - NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); - MESSAGE("It doesn't affect Foe Pineco…"); - } -} - -SINGLE_BATTLE_TEST("Powder Moves are blocked by Item Safety Goggles") -{ - GIVEN { - ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER); - ASSUME(gItems[ITEM_SAFETY_GOGGLES].holdEffect == HOLD_EFFECT_SAFETY_GOGGLES); - PLAYER(SPECIES_WYNAUT); - OPPONENT(SPECIES_ABRA) { Item(ITEM_SAFETY_GOGGLES); } - } WHEN { - TURN { MOVE(player, MOVE_STUN_SPORE); } - } SCENE { - NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player); - MESSAGE("Foe Abra is not affected thanks to its SafetyGoggles!"); - } -} diff --git a/test/random.c b/test/random.c index a56e91a10..202933beb 100644 --- a/test/random.c +++ b/test/random.c @@ -1,5 +1,5 @@ #include "global.h" -#include "test.h" +#include "test/test.h" #include "random.h" TEST("RandomUniform generates lo..hi") diff --git a/test/status1.c b/test/status1.c deleted file mode 100644 index c244b9a60..000000000 --- a/test/status1.c +++ /dev/null @@ -1,193 +0,0 @@ -#include "global.h" -#include "test_battle.h" - -SINGLE_BATTLE_TEST("Sleep prevents the battler from using a move") -{ - u32 turns; - PARAMETRIZE { turns = 1; } - PARAMETRIZE { turns = 2; } - PARAMETRIZE { turns = 3; } - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP_TURN(turns)); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - for (i = 0; i < turns; i++) - TURN { MOVE(player, MOVE_CELEBRATE); } - } SCENE { - for (i = 0; i < turns - 1; i++) - MESSAGE("Wobbuffet is fast asleep."); - MESSAGE("Wobbuffet woke up!"); - STATUS_ICON(player, none: TRUE); - MESSAGE("Wobbuffet used Celebrate!"); - } -} - -SINGLE_BATTLE_TEST("Poison deals 1/8th damage per turn") -{ - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - for (i = 0; i < 4; i++) - TURN {} - } SCENE { - s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); - for (i = 0; i < 4; i++) - HP_BAR(player, damage: maxHP / 8); - } -} - -SINGLE_BATTLE_TEST("Burn deals 1/16th damage per turn") -{ - GIVEN { - ASSUME(B_BURN_DAMAGE >= GEN_LATEST); - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_BURN); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - for (i = 0; i < 4; i++) - TURN {} - } SCENE { - s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); - for (i = 0; i < 4; i++) - HP_BAR(player, damage: maxHP / 16); - } -} - -SINGLE_BATTLE_TEST("Burn reduces Attack by 50%", s16 damage) -{ - bool32 burned; - PARAMETRIZE { burned = FALSE; } - PARAMETRIZE { burned = TRUE; } - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { if (burned) Status1(STATUS1_BURN); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, MOVE_TACKLE); } - } SCENE { - HP_BAR(opponent, captureDamage: &results[i].damage); - } FINALLY { - EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage); - } -} - -SINGLE_BATTLE_TEST("Freeze has a 20% chance of being thawed") -{ - PASSES_RANDOMLY(20, 100, RNG_FROZEN); - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, MOVE_CELEBRATE); } - } SCENE { - STATUS_ICON(player, none: TRUE); - } -} - -SINGLE_BATTLE_TEST("Freeze is thawed by opponent's Fire-type attacks") -{ - GIVEN { - ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE); - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(opponent, MOVE_EMBER); MOVE(player, MOVE_CELEBRATE); } - } SCENE { - MESSAGE("Foe Wobbuffet used Ember!"); - MESSAGE("Wobbuffet was defrosted!"); - STATUS_ICON(player, none: TRUE); - } -} - -SINGLE_BATTLE_TEST("Freeze is thawed by user's Flame Wheel") -{ - GIVEN { - ASSUME(gBattleMoves[MOVE_FLAME_WHEEL].flags & FLAG_THAW_USER); - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, MOVE_FLAME_WHEEL); } - } SCENE { - MESSAGE("Wobbuffet was defrosted by Flame Wheel!"); - STATUS_ICON(player, none: TRUE); - MESSAGE("Wobbuffet used Flame Wheel!"); - } -} - -SINGLE_BATTLE_TEST("Paralysis reduces Speed by 50%") -{ - u16 playerSpeed; - bool32 playerFirst; - PARAMETRIZE { playerSpeed = 98; playerFirst = FALSE; } - PARAMETRIZE { playerSpeed = 102; playerFirst = TRUE; } - GIVEN { - ASSUME(B_PARALYSIS_SPEED >= GEN_7); - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); Speed(playerSpeed); } - OPPONENT(SPECIES_WOBBUFFET) { Speed(50); } - } WHEN { - TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); } - } SCENE { - if (playerFirst) { - ONE_OF { - MESSAGE("Wobbuffet used Celebrate!"); - MESSAGE("Wobbuffet is paralyzed! It can't move!"); - } - MESSAGE("Foe Wobbuffet used Celebrate!"); - } else { - MESSAGE("Foe Wobbuffet used Celebrate!"); - ONE_OF { - MESSAGE("Wobbuffet used Celebrate!"); - MESSAGE("Wobbuffet is paralyzed! It can't move!"); - } - } - } -} - -SINGLE_BATTLE_TEST("Paralysis has a 25% chance of skipping the turn") -{ - PASSES_RANDOMLY(25, 100, RNG_PARALYSIS); - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, MOVE_CELEBRATE); } - } SCENE { - MESSAGE("Wobbuffet is paralyzed! It can't move!"); - } -} - -SINGLE_BATTLE_TEST("Bad poison deals 1/16th cumulative damage per turn") -{ - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - for (i = 0; i < 4; i++) - TURN {} - } SCENE { - s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); - for (i = 0; i < 4; i++) - HP_BAR(player, damage: maxHP / 16 * (i + 1)); - } -} - -SINGLE_BATTLE_TEST("Bad poison cumulative damage resets on switch") -{ - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); } - PLAYER(SPECIES_WYNAUT); - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN {} - TURN {} - TURN { SWITCH(player, 1); } - TURN { SWITCH(player, 0); } - TURN {} - TURN {} - } SCENE { - s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP); - for (i = 0; i < 2; i++) - HP_BAR(player, damage: maxHP / 16 * (i + 1)); - for (i = 0; i < 2; i++) - HP_BAR(player, damage: maxHP / 16 * (i + 1)); - } -} diff --git a/test/test_runner.c b/test/test_runner.c index 3f1352e5a..637ff0ed8 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -6,8 +6,8 @@ #include "main.h" #include "malloc.h" #include "random.h" -#include "test.h" #include "test_runner.h" +#include "test/test.h" #define TIMEOUT_SECONDS 55 diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index 4de144c38..e65066a84 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -7,7 +7,7 @@ #include "main.h" #include "malloc.h" #include "random.h" -#include "test_battle.h" +#include "test/battle.h" #include "window.h" #if defined(__INTELLISENSE__)