2023-08-12 20:00:15 +01:00
# include "global.h"
# include "test/battle.h"
ASSUMPTIONS
{
2024-12-20 11:20:46 +00:00
ASSUME ( ! IS_MOVE_STATUS ( MOVE_EMBER ) ) ;
2024-01-29 11:51:32 +00:00
ASSUME ( gMovesInfo [ MOVE_EMBER ] . type = = TYPE_FIRE ) ;
2023-08-12 20:00:15 +01:00
}
SINGLE_BATTLE_TEST ( " Primordial Sea blocks damaging Fire-type moves " )
{
GIVEN {
PLAYER ( SPECIES_KYOGRE ) { Item ( ITEM_BLUE_ORB ) ; }
OPPONENT ( SPECIES_WOBBUFFET ) ;
} WHEN {
TURN { MOVE ( opponent , MOVE_EMBER ) ; }
TURN { MOVE ( opponent , MOVE_EMBER ) ; }
} SCENE {
2024-10-21 18:52:45 +01:00
MESSAGE ( " The opposing Wobbuffet used Ember! " ) ;
2023-08-12 20:00:15 +01:00
NOT ANIMATION ( ANIM_TYPE_MOVE , MOVE_EMBER , opponent ) ;
2024-10-21 18:52:45 +01:00
MESSAGE ( " The Fire-type attack fizzled out in the heavy rain! " ) ;
2023-08-12 20:00:15 +01:00
NOT HP_BAR ( player ) ;
2024-10-21 18:52:45 +01:00
MESSAGE ( " The opposing Wobbuffet used Ember! " ) ;
2023-08-12 20:00:15 +01:00
NOT ANIMATION ( ANIM_TYPE_MOVE , MOVE_EMBER , opponent ) ;
2024-10-21 18:52:45 +01:00
MESSAGE ( " The Fire-type attack fizzled out in the heavy rain! " ) ;
2023-08-12 20:00:15 +01:00
NOT HP_BAR ( player ) ;
} THEN {
EXPECT_EQ ( player - > hp , player - > maxHP ) ;
}
}
DOUBLE_BATTLE_TEST ( " Primordial Sea blocks damaging Fire-type moves and prints the message only once with moves hitting multiple targets " )
{
GIVEN {
2024-12-20 11:20:46 +00:00
ASSUME ( ! IS_MOVE_STATUS ( MOVE_ERUPTION ) ) ;
2024-01-29 11:51:32 +00:00
ASSUME ( gMovesInfo [ MOVE_ERUPTION ] . type = = TYPE_FIRE ) ;
ASSUME ( gMovesInfo [ MOVE_ERUPTION ] . target = = MOVE_TARGET_BOTH ) ;
2023-08-12 20:00:15 +01:00
PLAYER ( SPECIES_KYOGRE ) { Item ( ITEM_BLUE_ORB ) ; { Speed ( 5 ) ; } }
PLAYER ( SPECIES_WOBBUFFET ) { Speed ( 5 ) ; }
OPPONENT ( SPECIES_WOBBUFFET ) { Speed ( 10 ) ; }
OPPONENT ( SPECIES_WOBBUFFET ) { Speed ( 8 ) ; }
} WHEN {
TURN { MOVE ( opponentLeft , MOVE_ERUPTION ) ; }
} SCENE {
2024-10-21 18:52:45 +01:00
MESSAGE ( " The opposing Wobbuffet used Eruption! " ) ;
2023-08-12 20:00:15 +01:00
NOT ANIMATION ( ANIM_TYPE_MOVE , MOVE_ERUPTION , opponentLeft ) ;
2024-10-21 18:52:45 +01:00
MESSAGE ( " The Fire-type attack fizzled out in the heavy rain! " ) ;
NOT MESSAGE ( " The Fire-type attack fizzled out in the heavy rain! " ) ;
2023-08-12 20:00:15 +01:00
} THEN {
EXPECT_EQ ( playerLeft - > hp , playerLeft - > maxHP ) ;
EXPECT_EQ ( playerRight - > hp , playerRight - > maxHP ) ;
}
}
SINGLE_BATTLE_TEST ( " Primordial Sea does not block a move if pokemon is asleep and uses a Fire-type move " ) // Sleep/confusion/paralysis all happen before the check for primal weather
{
GIVEN {
PLAYER ( SPECIES_KYOGRE ) { Item ( ITEM_BLUE_ORB ) ; }
OPPONENT ( SPECIES_WOBBUFFET ) { Status1 ( STATUS1_SLEEP ) ; }
} WHEN {
TURN { MOVE ( opponent , MOVE_EMBER ) ; }
} SCENE {
2024-10-21 18:52:45 +01:00
NOT MESSAGE ( " The Fire-type attack fizzled out in the heavy rain! " ) ;
MESSAGE ( " The opposing Wobbuffet is fast asleep. " ) ;
2023-08-12 20:00:15 +01:00
}
}