Merge pull request #6 from Pawkkie/drowsy-testing-suite
Adapt Sleep Clause testing suite for Drowsy
This commit is contained in:
commit
cd1f82cc67
5 changed files with 965 additions and 252 deletions
|
@ -989,6 +989,8 @@ static s32 AI_CheckBadMove(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
|
|||
case EFFECT_DROWSY:
|
||||
if (!AI_CanGiveDrowsy(battlerAtk, battlerDef, aiData->abilities[battlerDef], move, aiData->partnerMove))
|
||||
ADJUST_SCORE(-10);
|
||||
if (PartnerMoveActivatesSleepClause(aiData->partnerMove))
|
||||
ADJUST_SCORE(-20);
|
||||
break;
|
||||
case EFFECT_EXPLOSION:
|
||||
if (!(AI_THINKING_STRUCT->aiFlags[battlerAtk] & AI_FLAG_WILL_SUICIDE))
|
||||
|
|
|
@ -2412,6 +2412,7 @@ static inline bool32 IsMoveSleepClauseTrigger(u32 move)
|
|||
case EFFECT_SLEEP:
|
||||
case EFFECT_YAWN:
|
||||
case EFFECT_DARK_VOID:
|
||||
case EFFECT_DROWSY:
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2424,6 +2425,7 @@ static inline bool32 IsMoveSleepClauseTrigger(u32 move)
|
|||
{
|
||||
case MAX_EFFECT_EFFECT_SPORE_FOES:
|
||||
case MAX_EFFECT_YAWN_FOE:
|
||||
case MOVE_EFFECT_SLEEP_OR_DROWSY:
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,8 +72,8 @@ SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep pokemo
|
|||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_JOLTEON; ability = ABILITY_VOLT_ABSORB; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; species = SPECIES_ELECTIVIRE; ability = ABILITY_MOTOR_DRIVE; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = MOVE_EFFECT_POISON; species = SPECIES_ZANGOOSE; ability = ABILITY_IMMUNITY; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP; species = SPECIES_VIGOROTH; ability = ABILITY_VITAL_SPIRIT; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP; species = SPECIES_HYPNO; ability = ABILITY_INSOMNIA; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP_OR_DROWSY ; species = SPECIES_VIGOROTH; ability = ABILITY_VITAL_SPIRIT; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP_OR_DROWSY ; species = SPECIES_HYPNO; ability = ABILITY_INSOMNIA; }
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
|
@ -103,7 +103,7 @@ SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep a mon
|
|||
u32 rng;
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PSN; rng = MOVE_EFFECT_POISON; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_PRZ; rng = MOVE_EFFECT_PARALYSIS; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP; }
|
||||
PARAMETRIZE { statusAnim = B_ANIM_STATUS_SLP; rng = MOVE_EFFECT_SLEEP_OR_DROWSY ; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_BURN); }
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -31,3 +31,22 @@ SINGLE_BATTLE_TEST("Drowsy has a 25% chance of skipping the turn")
|
|||
MESSAGE("Wobbuffet is too drowsy to move!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Using Spark, Volt Tackle, or Wild Charge will cure the user of drowsiness")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_SPARK; }
|
||||
PARAMETRIZE { move = MOVE_VOLT_TACKLE; }
|
||||
PARAMETRIZE { move = MOVE_WILD_CHARGE; }
|
||||
PASSES_RANDOMLY(75, 100, RNG_DROWSY);
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_DROWSY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, player);
|
||||
MESSAGE("Wobbuffet fought off its drowsiness!");
|
||||
STATUS_ICON(player, drowsy: FALSE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue