2023-06-28 17:26:03 +01:00
# include "global.h"
2023-08-12 20:00:15 +01:00
# include "test/battle.h"
2023-06-28 17:26:03 +01:00
2024-05-22 21:20:44 +01:00
SINGLE_BATTLE_TEST ( " Own Tempo prevents Intimidate but no other stat down changes " )
2023-06-28 17:26:03 +01:00
{
GIVEN {
ASSUME ( B_UPDATED_INTIMIDATE > = GEN_8 ) ;
2024-05-22 21:20:44 +01:00
ASSUME ( gMovesInfo [ MOVE_CONFUSE_RAY ] . effect = = EFFECT_CONFUSE ) ;
2023-06-28 17:26:03 +01:00
PLAYER ( SPECIES_EKANS ) { Ability ( ABILITY_INTIMIDATE ) ; } ;
OPPONENT ( SPECIES_SLOWPOKE ) { Ability ( ABILITY_OWN_TEMPO ) ; } ;
} WHEN {
2024-05-22 21:20:44 +01:00
TURN { MOVE ( player , MOVE_SCARY_FACE ) ; }
2023-06-28 17:26:03 +01:00
} SCENE {
ABILITY_POPUP ( player , ABILITY_INTIMIDATE ) ;
ABILITY_POPUP ( opponent , ABILITY_OWN_TEMPO ) ;
2023-10-18 21:14:49 +01:00
MESSAGE ( " Foe Slowpoke's Own Tempo prevents stat loss! " ) ;
2024-05-22 21:20:44 +01:00
ANIMATION ( ANIM_TYPE_MOVE , MOVE_SCARY_FACE , player ) ;
NONE_OF {
ABILITY_POPUP ( opponent , ABILITY_OWN_TEMPO ) ;
MESSAGE ( " Foe Slowpoke's Own Tempo prevents stat loss! " ) ;
}
2023-06-28 17:26:03 +01:00
}
}
SINGLE_BATTLE_TEST ( " Own Tempo prevents confusion from moves by the opponent " )
{
GIVEN {
2024-01-29 11:51:32 +00:00
ASSUME ( gMovesInfo [ MOVE_CONFUSE_RAY ] . effect = = EFFECT_CONFUSE ) ;
2023-06-28 17:26:03 +01:00
PLAYER ( SPECIES_WOBBUFFET ) ;
OPPONENT ( SPECIES_SLOWPOKE ) { Ability ( ABILITY_OWN_TEMPO ) ; } ;
} WHEN {
TURN { MOVE ( player , MOVE_CONFUSE_RAY ) ; }
} SCENE {
ABILITY_POPUP ( opponent , ABILITY_OWN_TEMPO ) ;
MESSAGE ( " Foe Slowpoke's Own Tempo prevents confusion! " ) ;
}
}
SINGLE_BATTLE_TEST ( " Own Tempo prevents confusion from moves by the user " )
{
GIVEN {
2024-02-26 05:21:38 +00:00
ASSUME ( MoveHasAdditionalEffectSelf ( MOVE_PETAL_DANCE , MOVE_EFFECT_THRASH ) ) ;
2023-06-28 17:26:03 +01:00
PLAYER ( SPECIES_WOBBUFFET ) ;
OPPONENT ( SPECIES_SLOWPOKE ) { Ability ( ABILITY_OWN_TEMPO ) ; } ;
} WHEN {
TURN { MOVE ( opponent , MOVE_PETAL_DANCE ) ; }
TURN { MOVE ( opponent , MOVE_PETAL_DANCE ) ; }
TURN { MOVE ( opponent , MOVE_PETAL_DANCE ) ; }
TURN { MOVE ( opponent , MOVE_PETAL_DANCE ) ; }
} SCENE {
ANIMATION ( ANIM_TYPE_MOVE , MOVE_PETAL_DANCE , opponent ) ;
ANIMATION ( ANIM_TYPE_MOVE , MOVE_PETAL_DANCE , opponent ) ;
ANIMATION ( ANIM_TYPE_MOVE , MOVE_PETAL_DANCE , opponent ) ;
ANIMATION ( ANIM_TYPE_MOVE , MOVE_PETAL_DANCE , opponent ) ;
NONE_OF { MESSAGE ( " Foe Slowpoke became confused due to fatigue! " ) ; }
}
}
2024-07-03 09:48:31 +01:00
SINGLE_BATTLE_TEST ( " Own Tempo is ignored by Mold Breaker " )
{
KNOWN_FAILING ; // Ideally the func CanBeConfused should be split into AttackerCanBeConfused and TargetCanBeConfused or we do it in the same func but have a check for when battlerAtk == battlerDef
GIVEN {
ASSUME ( gMovesInfo [ MOVE_CONFUSE_RAY ] . effect = = EFFECT_CONFUSE ) ;
PLAYER ( SPECIES_PINSIR ) { Ability ( ABILITY_MOLD_BREAKER ) ; }
OPPONENT ( SPECIES_SLOWPOKE ) { Ability ( ABILITY_OWN_TEMPO ) ; } ;
} WHEN {
TURN { MOVE ( player , MOVE_CONFUSE_RAY ) ; }
} SCENE {
NONE_OF {
ABILITY_POPUP ( opponent , ABILITY_OWN_TEMPO ) ;
MESSAGE ( " Foe Slowpoke's Own Tempo prevents confusion! " ) ;
}
}
}
2023-06-28 17:26:03 +01:00
SINGLE_BATTLE_TEST ( " Own Tempo cures confusion obtained from an opponent with Mold Breaker " )
{
KNOWN_FAILING ;
GIVEN {
2024-01-29 11:51:32 +00:00
ASSUME ( gMovesInfo [ MOVE_CONFUSE_RAY ] . effect = = EFFECT_CONFUSE ) ;
2023-06-28 17:26:03 +01:00
PLAYER ( SPECIES_PINSIR ) { Ability ( ABILITY_MOLD_BREAKER ) ; } ;
OPPONENT ( SPECIES_SLOWPOKE ) { Ability ( ABILITY_OWN_TEMPO ) ; } ;
} WHEN {
TURN { MOVE ( player , MOVE_CONFUSE_RAY ) ; }
} SCENE {
ANIMATION ( ANIM_TYPE_MOVE , MOVE_CONFUSE_RAY , player ) ;
MESSAGE ( " Foe Slowpoke became confused! " ) ;
NONE_OF {
ANIMATION ( ANIM_TYPE_STATUS , B_ANIM_STATUS_CONFUSION , opponent ) ;
}
ABILITY_POPUP ( opponent , ABILITY_OWN_TEMPO ) ;
MESSAGE ( " Foe Slowpoke's Own Tempo cured its confusion problem! " ) ;
}
}
SINGLE_BATTLE_TEST ( " Own Tempo cures confusion if it's obtained via Skill Swap " )
{
GIVEN {
2024-01-29 11:51:32 +00:00
ASSUME ( gMovesInfo [ MOVE_CONFUSE_RAY ] . effect = = EFFECT_CONFUSE ) ;
ASSUME ( gMovesInfo [ MOVE_SKILL_SWAP ] . effect = = EFFECT_SKILL_SWAP ) ;
2023-06-28 17:26:03 +01:00
PLAYER ( SPECIES_SLOWPOKE ) { Ability ( ABILITY_OWN_TEMPO ) ; } ;
OPPONENT ( SPECIES_WOBBUFFET ) ;
} WHEN {
TURN { MOVE ( player , MOVE_CONFUSE_RAY ) ; }
TURN { MOVE ( player , MOVE_SKILL_SWAP ) ;
MOVE ( opponent , MOVE_TACKLE ) ;
}
} SCENE {
ANIMATION ( ANIM_TYPE_MOVE , MOVE_CONFUSE_RAY , player ) ;
MESSAGE ( " Foe Wobbuffet became confused! " ) ;
ANIMATION ( ANIM_TYPE_MOVE , MOVE_SKILL_SWAP , player ) ;
ABILITY_POPUP ( opponent , ABILITY_OWN_TEMPO ) ;
MESSAGE ( " Foe Wobbuffet's Own Tempo cured its confusion problem! " ) ;
ANIMATION ( ANIM_TYPE_MOVE , MOVE_TACKLE , opponent ) ;
}
}
SINGLE_BATTLE_TEST ( " Own Tempo prevents confusion from items " )
{
GIVEN {
2024-01-26 18:25:52 +00:00
ASSUME ( gItemsInfo [ ITEM_BERSERK_GENE ] . holdEffect = = HOLD_EFFECT_BERSERK_GENE ) ;
2023-06-28 17:26:03 +01:00
PLAYER ( SPECIES_WOBBUFFET ) ;
OPPONENT ( SPECIES_SLOWPOKE ) { Ability ( ABILITY_OWN_TEMPO ) ; Item ( ITEM_BERSERK_GENE ) ; } ;
} WHEN {
TURN { MOVE ( opponent , MOVE_TACKLE ) ; }
} SCENE {
ANIMATION ( ANIM_TYPE_GENERAL , B_ANIM_HELD_ITEM_EFFECT , opponent ) ;
ABILITY_POPUP ( opponent , ABILITY_OWN_TEMPO ) ;
ANIMATION ( ANIM_TYPE_MOVE , MOVE_TACKLE , opponent ) ;
}
}