pokeemerald/test/battle/move_effect/stealth_rock.c
DizzyEggg 0c8fdce1a4
New tests + Sheer Force / Last Resort minor bug fixes (#3378)
* tests for intimidate defiant

* sheer force fix + tests

* white herb tests

* tests for stealth rock, weak armor and last resort fix

* style changes to weak armor test
2023-10-30 11:39:41 +01:00

33 lines
1.1 KiB
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_STEALTH_ROCK].effect == EFFECT_STEALTH_ROCK);
}
SINGLE_BATTLE_TEST("Stealth Rock damage on switch in based on typing")
{
u32 species, divisor;
PARAMETRIZE { species = SPECIES_CHARIZARD; divisor = 2; } // Fire / Flying
PARAMETRIZE { species = SPECIES_PIDGEOT; divisor = 4; } // Flying
PARAMETRIZE { species = SPECIES_RATICATE; divisor = 8; } // Normal dmg
PARAMETRIZE { species = SPECIES_GOLEM; divisor = 16; } // Ground not very effective
PARAMETRIZE { species = SPECIES_STEELIX; divisor = 32; } // Ground/Steel not very effective
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(species);
} WHEN {
TURN { MOVE(player, MOVE_STEALTH_ROCK); }
TURN { SWITCH(opponent, 1); }
} SCENE {
s32 maxHP = GetMonData(&OPPONENT_PARTY[1], MON_DATA_MAX_HP);
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEALTH_ROCK, player);
// MESSAGE("2 sent out species!");
HP_BAR(opponent, damage: maxHP / divisor);
}
}