Merge remote-tracking branch 'rhh/upcoming' into battlemove_refactored
This commit is contained in:
commit
b1f0fbdf89
4 changed files with 86 additions and 1 deletions
|
@ -8553,6 +8553,7 @@ BattleScript_GooeyActivates::
|
|||
call BattleScript_AbilityPopUp
|
||||
swapattackerwithtarget @ for defiant, mirror armor
|
||||
seteffectsecondary
|
||||
swapattackerwithtarget
|
||||
return
|
||||
|
||||
BattleScript_AbilityStatusEffect::
|
||||
|
|
|
@ -195,3 +195,20 @@ DOUBLE_BATTLE_TEST("Mirror Armor lowers Speed of the partner Pokemon after Court
|
|||
MESSAGE("Wobbuffet's Speed fell!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Mirror Armor reflects Tangling Hair speed drop")
|
||||
{
|
||||
KNOWN_FAILING;
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_TANGLING_HAIR); }
|
||||
OPPONENT(SPECIES_CORVIKNIGHT) { Ability(ABILITY_MIRROR_ARMOR); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
ABILITY_POPUP(player, ABILITY_TANGLING_HAIR);
|
||||
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||
ABILITY_POPUP(opponent, ABILITY_MIRROR_ARMOR);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
}
|
||||
}
|
||||
|
|
68
test/battle/ability/tangling_hair.c
Normal file
68
test/battle/ability/tangling_hair.c
Normal file
|
@ -0,0 +1,68 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].effect == EFFECT_HIT);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power > 0);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].makesContact == TRUE);
|
||||
}
|
||||
|
||||
|
||||
SINGLE_BATTLE_TEST("Tangling Hair drops opposing mon's speed if ability user got hit by a contact move")
|
||||
{
|
||||
u32 move;
|
||||
|
||||
PARAMETRIZE { move = MOVE_TACKLE; }
|
||||
PARAMETRIZE { move = MOVE_SWIFT; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SWIFT].makesContact == FALSE);
|
||||
PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_TANGLING_HAIR); }
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
if (move == MOVE_TACKLE) {
|
||||
ABILITY_POPUP(player, ABILITY_TANGLING_HAIR);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||
MESSAGE("Foe Wynaut's Speed fell!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Tangling Hair does not cause Rocky Helmet miss activation")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_ROCKY_HELMET].holdEffect == HOLD_EFFECT_ROCKY_HELMET);
|
||||
PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_TANGLING_HAIR); Item(ITEM_ROCKY_HELMET); }
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
ABILITY_POPUP(player, ABILITY_TANGLING_HAIR);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||
MESSAGE("Foe Wynaut's Speed fell!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
MESSAGE("Foe Wynaut was hurt by Dugtrio's Rocky Helmet!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Tangling Hair Speed stat drop triggers defiant")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_TANGLING_HAIR); }
|
||||
OPPONENT(SPECIES_PAWNIARD) { Ability(ABILITY_DEFIANT); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
ABILITY_POPUP(player, ABILITY_TANGLING_HAIR);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||
MESSAGE("Foe Pawniard's Speed fell!");
|
||||
ABILITY_POPUP(opponent, ABILITY_DEFIANT);
|
||||
MESSAGE("Foe Pawniard's Attack sharply rose!");
|
||||
}
|
||||
}
|
|
@ -275,7 +275,6 @@ SINGLE_BATTLE_TEST("Rage Fist number of hits is copied by Transform")
|
|||
{
|
||||
s16 timesGotHit[2];
|
||||
|
||||
// KNOWN_FAILING; // After Transform , wrong move is used by transformed mon
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_REGIROCK);
|
||||
OPPONENT(SPECIES_REGIROCK) { Moves(MOVE_RAGE_FIST, MOVE_CELEBRATE); }
|
||||
|
|
Loading…
Reference in a new issue