mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Missing master merge organization
My bad ^^;
This commit is contained in:
parent
b8a22eb119
commit
32c3c33376
23
test/battle/move_flags/damages_airborne_double_damage.c
Normal file
23
test/battle/move_flags/damages_airborne_double_damage.c
Normal file
@ -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);
|
||||
}
|
||||
}
|
23
test/battle/move_flags/damages_underground.c
Normal file
23
test/battle/move_flags/damages_underground.c
Normal file
@ -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);
|
||||
}
|
||||
}
|
23
test/battle/move_flags/damages_underwater.c
Normal file
23
test/battle/move_flags/damages_underwater.c
Normal file
@ -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);
|
||||
}
|
||||
}
|
27
test/battle/move_flags/minimize_double_damage.c
Normal file
27
test/battle/move_flags/minimize_double_damage.c
Normal file
@ -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")
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user