From 32c3c333769403ea14f0679a874551761dda0c3f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 13 Aug 2023 19:01:03 -0400 Subject: [PATCH] Missing master merge organization My bad ^^; --- .../ability/fluffy.c} | 0 test/{ => battle}/damage_formula.c | 0 .../move_effect/axe_kick.c} | 0 .../move_effect/collision_course.c} | 0 .../move_effect/corrosive_gas.c} | 0 .../move_effect/infernal_parade.c} | 0 .../move_effect/make_it_rain.c} | 0 .../move_effect/mortal_spin.c} | 0 .../move_effect/multi_hit.c} | 0 .../move_effect/population_bomb.c} | 0 .../move_effect/spin_out.c} | 0 .../move_effect/take_heart.c} | 0 .../move_effect/teatime.c} | 0 .../move_effect/triple_arrows.c} | 0 .../damages_airborne_double_damage.c | 23 +++++ test/battle/move_flags/damages_underground.c | 23 +++++ test/battle/move_flags/damages_underwater.c | 23 +++++ .../move_flags/minimize_double_damage.c | 27 ++++++ test/status3.c | 90 ------------------- 19 files changed, 96 insertions(+), 90 deletions(-) rename test/{ability_fluffy.c => battle/ability/fluffy.c} (100%) rename test/{ => battle}/damage_formula.c (100%) rename test/{move_effect_axe_kick.c => battle/move_effect/axe_kick.c} (100%) rename test/{move_effect_collision_course.c => battle/move_effect/collision_course.c} (100%) rename test/{move_effect_corrosive_gas.c => battle/move_effect/corrosive_gas.c} (100%) rename test/{move_effect_infernal_parade.c => battle/move_effect/infernal_parade.c} (100%) rename test/{move_effect_make_it_rain.c => battle/move_effect/make_it_rain.c} (100%) rename test/{move_effect_mortal_spin.c => battle/move_effect/mortal_spin.c} (100%) rename test/{move_effect_multi_hit.c => battle/move_effect/multi_hit.c} (100%) rename test/{move_effect_population_bomb.c => battle/move_effect/population_bomb.c} (100%) rename test/{move_effect_spin_out.c => battle/move_effect/spin_out.c} (100%) rename test/{move_effect_take_heart.c => battle/move_effect/take_heart.c} (100%) rename test/{move_effect_teatime.c => battle/move_effect/teatime.c} (100%) rename test/{move_effect_triple_arrows.c => battle/move_effect/triple_arrows.c} (100%) create mode 100644 test/battle/move_flags/damages_airborne_double_damage.c create mode 100644 test/battle/move_flags/damages_underground.c create mode 100644 test/battle/move_flags/damages_underwater.c create mode 100644 test/battle/move_flags/minimize_double_damage.c delete mode 100644 test/status3.c diff --git a/test/ability_fluffy.c b/test/battle/ability/fluffy.c similarity index 100% rename from test/ability_fluffy.c rename to test/battle/ability/fluffy.c diff --git a/test/damage_formula.c b/test/battle/damage_formula.c similarity index 100% rename from test/damage_formula.c rename to test/battle/damage_formula.c diff --git a/test/move_effect_axe_kick.c b/test/battle/move_effect/axe_kick.c similarity index 100% rename from test/move_effect_axe_kick.c rename to test/battle/move_effect/axe_kick.c diff --git a/test/move_effect_collision_course.c b/test/battle/move_effect/collision_course.c similarity index 100% rename from test/move_effect_collision_course.c rename to test/battle/move_effect/collision_course.c diff --git a/test/move_effect_corrosive_gas.c b/test/battle/move_effect/corrosive_gas.c similarity index 100% rename from test/move_effect_corrosive_gas.c rename to test/battle/move_effect/corrosive_gas.c diff --git a/test/move_effect_infernal_parade.c b/test/battle/move_effect/infernal_parade.c similarity index 100% rename from test/move_effect_infernal_parade.c rename to test/battle/move_effect/infernal_parade.c diff --git a/test/move_effect_make_it_rain.c b/test/battle/move_effect/make_it_rain.c similarity index 100% rename from test/move_effect_make_it_rain.c rename to test/battle/move_effect/make_it_rain.c diff --git a/test/move_effect_mortal_spin.c b/test/battle/move_effect/mortal_spin.c similarity index 100% rename from test/move_effect_mortal_spin.c rename to test/battle/move_effect/mortal_spin.c diff --git a/test/move_effect_multi_hit.c b/test/battle/move_effect/multi_hit.c similarity index 100% rename from test/move_effect_multi_hit.c rename to test/battle/move_effect/multi_hit.c diff --git a/test/move_effect_population_bomb.c b/test/battle/move_effect/population_bomb.c similarity index 100% rename from test/move_effect_population_bomb.c rename to test/battle/move_effect/population_bomb.c diff --git a/test/move_effect_spin_out.c b/test/battle/move_effect/spin_out.c similarity index 100% rename from test/move_effect_spin_out.c rename to test/battle/move_effect/spin_out.c diff --git a/test/move_effect_take_heart.c b/test/battle/move_effect/take_heart.c similarity index 100% rename from test/move_effect_take_heart.c rename to test/battle/move_effect/take_heart.c diff --git a/test/move_effect_teatime.c b/test/battle/move_effect/teatime.c similarity index 100% rename from test/move_effect_teatime.c rename to test/battle/move_effect/teatime.c diff --git a/test/move_effect_triple_arrows.c b/test/battle/move_effect/triple_arrows.c similarity index 100% rename from test/move_effect_triple_arrows.c rename to test/battle/move_effect/triple_arrows.c diff --git a/test/battle/move_flags/damages_airborne_double_damage.c b/test/battle/move_flags/damages_airborne_double_damage.c new file mode 100644 index 000000000..5906e3b6b --- /dev/null +++ b/test/battle/move_flags/damages_airborne_double_damage.c @@ -0,0 +1,23 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Being airborne causes the target to take double damage from certain moves", s16 damage) +{ + bool32 useDive; + PARAMETRIZE { useDive = FALSE; } + PARAMETRIZE { useDive = TRUE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_TWISTER].damagesAirborneDoubleDamage); + PLAYER(SPECIES_WOBBUFFET) { Speed(1); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } + } WHEN { + if (useDive) + TURN { MOVE(opponent, MOVE_FLY); MOVE(player, MOVE_TWISTER); } + else + TURN { MOVE(player, MOVE_TWISTER); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); + } +} diff --git a/test/battle/move_flags/damages_underground.c b/test/battle/move_flags/damages_underground.c new file mode 100644 index 000000000..54af8b829 --- /dev/null +++ b/test/battle/move_flags/damages_underground.c @@ -0,0 +1,23 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Being underground causes the target to take double damage from certain moves", s16 damage) +{ + bool32 useDig; + PARAMETRIZE { useDig = FALSE; } + PARAMETRIZE { useDig = TRUE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_EARTHQUAKE].damagesUnderground); + PLAYER(SPECIES_WOBBUFFET) { Speed(1); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } + } WHEN { + if (useDig) + TURN { MOVE(opponent, MOVE_DIG); MOVE(player, MOVE_EARTHQUAKE); } + else + TURN { MOVE(player, MOVE_EARTHQUAKE); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); + } +} diff --git a/test/battle/move_flags/damages_underwater.c b/test/battle/move_flags/damages_underwater.c new file mode 100644 index 000000000..e8f45e8de --- /dev/null +++ b/test/battle/move_flags/damages_underwater.c @@ -0,0 +1,23 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Being underwater causes the target to take double damage from certain moves", s16 damage) +{ + bool32 useDive; + PARAMETRIZE { useDive = FALSE; } + PARAMETRIZE { useDive = TRUE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_SURF].damagesUnderwater); + PLAYER(SPECIES_WOBBUFFET) { Speed(1); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } + } WHEN { + if (useDive) + TURN { MOVE(opponent, MOVE_DIVE); MOVE(player, MOVE_SURF); } + else + TURN { MOVE(player, MOVE_SURF); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); + } +} diff --git a/test/battle/move_flags/minimize_double_damage.c b/test/battle/move_flags/minimize_double_damage.c new file mode 100644 index 000000000..6b631c9a3 --- /dev/null +++ b/test/battle/move_flags/minimize_double_damage.c @@ -0,0 +1,27 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("MinimizeDoubleDamage flag makes moves cause double damage to Minimized targets", s16 damage) +{ + bool32 useMinimize; + PARAMETRIZE { useMinimize = FALSE; } + PARAMETRIZE { useMinimize = TRUE; } + GIVEN { + ASSUME(gBattleMoves[MOVE_MINIMIZE].effect == EFFECT_MINIMIZE); + ASSUME(gBattleMoves[MOVE_STEAMROLLER].minimizeDoubleDamage); + PLAYER(SPECIES_WOBBUFFET) { Speed(1); } + OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } + } WHEN { + if (useMinimize) + TURN { MOVE(opponent, MOVE_MINIMIZE); MOVE(player, MOVE_STEAMROLLER); } + else + TURN { MOVE(player, MOVE_STEAMROLLER); } + } SCENE { + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); + } +} + +// Remember to add ASSUME(B_MINIMIZE_DMG_ACC >= GEN_6) +TO_DO_BATTLE_TEST("MinimizeDoubleDamage flag allows moves to skip accuracy checks towards Minimized targets") diff --git a/test/status3.c b/test/status3.c deleted file mode 100644 index c8a438451..000000000 --- a/test/status3.c +++ /dev/null @@ -1,90 +0,0 @@ -#include "global.h" -#include "test/battle.h" - -ASSUMPTIONS { - ASSUME(gBattleMoves[MOVE_MINIMIZE].effect == EFFECT_MINIMIZE); - ASSUME(gBattleMoves[MOVE_STEAMROLLER].minimizeDoubleDamage); - ASSUME(gBattleMoves[MOVE_EARTHQUAKE].damagesUnderground); - ASSUME(gBattleMoves[MOVE_SURF].damagesUnderwater); - ASSUME(gBattleMoves[MOVE_TWISTER].damagesAirborneDoubleDamage); -} - -SINGLE_BATTLE_TEST("Minimize causes the target to take double damage from certain moves", s16 damage) -{ - bool32 useMinimize; - PARAMETRIZE { useMinimize = FALSE; } - PARAMETRIZE { useMinimize = TRUE; } - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Speed(1); } - OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } - } WHEN { - if (useMinimize) - TURN { MOVE(opponent, MOVE_MINIMIZE); MOVE(player, MOVE_STEAMROLLER); } - else - TURN { MOVE(player, MOVE_STEAMROLLER); } - } SCENE { - HP_BAR(opponent, captureDamage: &results[i].damage); - } FINALLY { - EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); - } -} - -SINGLE_BATTLE_TEST("Being underground causes the target to take double damage from certain moves", s16 damage) -{ - bool32 useDig; - PARAMETRIZE { useDig = FALSE; } - PARAMETRIZE { useDig = TRUE; } - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Speed(1); } - OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } - } WHEN { - if (useDig) - TURN { MOVE(opponent, MOVE_DIG); MOVE(player, MOVE_EARTHQUAKE); } - else - TURN { MOVE(player, MOVE_EARTHQUAKE); } - } SCENE { - HP_BAR(opponent, captureDamage: &results[i].damage); - } FINALLY { - EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); - } -} - -SINGLE_BATTLE_TEST("Being underwater causes the target to take double damage from certain moves", s16 damage) -{ - bool32 useDive; - PARAMETRIZE { useDive = FALSE; } - PARAMETRIZE { useDive = TRUE; } - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Speed(1); } - OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } - } WHEN { - if (useDive) - TURN { MOVE(opponent, MOVE_DIVE); MOVE(player, MOVE_SURF); } - else - TURN { MOVE(player, MOVE_SURF); } - } SCENE { - HP_BAR(opponent, captureDamage: &results[i].damage); - } FINALLY { - EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); - } -} - -SINGLE_BATTLE_TEST("Being airborne causes the target to take double damage from certain moves", s16 damage) -{ - bool32 useDive; - PARAMETRIZE { useDive = FALSE; } - PARAMETRIZE { useDive = TRUE; } - GIVEN { - PLAYER(SPECIES_WOBBUFFET) { Speed(1); } - OPPONENT(SPECIES_WOBBUFFET) { Speed(2); } - } WHEN { - if (useDive) - TURN { MOVE(opponent, MOVE_FLY); MOVE(player, MOVE_TWISTER); } - else - TURN { MOVE(player, MOVE_TWISTER); } - } SCENE { - HP_BAR(opponent, captureDamage: &results[i].damage); - } FINALLY { - EXPECT_MUL_EQ(results[0].damage, UQ_4_12(2.0), results[1].damage); - } -}