Adaptability, Aerilate, Aftermath tests (#5242)
* Adaptability, Aerilate, Aftermath tests * Update test/battle/ability/aerilate.c Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com> --------- Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
This commit is contained in:
parent
85fe398b50
commit
2fed75f7c5
4 changed files with 65 additions and 4 deletions
|
@ -5746,8 +5746,10 @@ bool32 TrySetAteType(u32 move, u32 battlerAtk, u32 attackerAbility)
|
|||
break;
|
||||
case EFFECT_HIDDEN_POWER:
|
||||
case EFFECT_WEATHER_BALL:
|
||||
case EFFECT_CHANGE_TYPE_ON_ITEM:
|
||||
case EFFECT_NATURAL_GIFT:
|
||||
case EFFECT_CHANGE_TYPE_ON_ITEM:
|
||||
case EFFECT_REVELATION_DANCE:
|
||||
case EFFECT_TERRAIN_PULSE:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,25 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Adaptability increases same-type attack bonus from x1.5 to x2");
|
||||
SINGLE_BATTLE_TEST("Adaptability increases same-type attack bonus from x1.5 to x2", s16 damage)
|
||||
{
|
||||
u32 ability;
|
||||
PARAMETRIZE { ability = ABILITY_HYPER_CUTTER; }
|
||||
PARAMETRIZE { ability = ABILITY_ADAPTABILITY; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_CRAWDAUNT) { Ability(ability); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_WATER_GUN); }
|
||||
} SCENE {
|
||||
MESSAGE("Crawdaunt used Water Gun!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_WATER_GUN, player);
|
||||
HP_BAR(opponent, captureDamage: &results[i].damage);
|
||||
} FINALLY {
|
||||
// The jump from 1.5x STAB to 2.0x STAB is a 1.33x boost.
|
||||
EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.33), results[1].damage);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("(TERA) Terastallizing into a different type with Adaptability gives 2.0x STAB", s16 damage)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,30 @@ SINGLE_BATTLE_TEST("Aerilate turns a Normal-type move into Flying-type move")
|
|||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Aerilate can not turn certain moves into Flying type moves");
|
||||
SINGLE_BATTLE_TEST("Aerilate can not turn certain moves into Flying type moves")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_WEATHER_BALL; }
|
||||
// PARAMETRIZE { move = MOVE_NATURAL_GIFT; } TODO: handle this case via Skill Swap
|
||||
PARAMETRIZE { move = MOVE_JUDGMENT; }
|
||||
PARAMETRIZE { move = MOVE_TECHNO_BLAST; }
|
||||
PARAMETRIZE { move = MOVE_REVELATION_DANCE; }
|
||||
PARAMETRIZE { move = MOVE_MULTI_ATTACK; }
|
||||
PARAMETRIZE { move = MOVE_TERRAIN_PULSE; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_MEGANIUM);
|
||||
OPPONENT(SPECIES_SALAMENCE) { Item(ITEM_SALAMENCITE); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, move, gimmick: GIMMICK_MEGA); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
NONE_OF {
|
||||
MESSAGE("It's super effective!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Aerilate boosts power of affected moves by 20% (Gen7+)");
|
||||
TO_DO_BATTLE_TEST("Aerilate boosts power of affected moves by 30% (Gen6)");
|
||||
|
||||
|
|
|
@ -1,4 +1,22 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Aftermath damages the attacker by 1/4th of its max HP if they faint the target has this ability by a contact move");
|
||||
SINGLE_BATTLE_TEST("Aftermath damages the attacker by 1/4th of its max HP if fainted by a contact move")
|
||||
{
|
||||
s16 aftermathDamage;
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_VOLTORB) { HP(1); Ability(ABILITY_AFTERMATH); };
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN {MOVE(opponent, MOVE_TACKLE);}
|
||||
} SCENE {
|
||||
MESSAGE("Foe Wobbuffet used Tackle!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
MESSAGE("Voltorb fainted!");
|
||||
ABILITY_POPUP(player, ABILITY_AFTERMATH);
|
||||
HP_BAR(opponent, captureDamage: &aftermathDamage);
|
||||
} THEN {
|
||||
EXPECT_EQ(aftermathDamage, opponent->maxHP / 4);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue