Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add one test case and several TODO battle tests #1

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions test/battle/sleep_clause.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,39 @@ SINGLE_BATTLE_TEST("Sleep Clause: Moves with sleep effect chance will still do d
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent);
STATUS_ICON(opponent, sleep: TRUE);
ANIMATION(ANIM_TYPE_MOVE, MOVE_RELIC_SONG, player);
HP_BAR(opponent);
NONE_OF {
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent);
MESSAGE("Foe Wobbuffet fell asleep!");
STATUS_ICON(opponent, sleep: TRUE);
}
}
}

// I added a dire claw test because im too lazy to read what MOVE_EFFECT_DIRE_CLAW does and i suspect it could be
// different than a normal "secondary sleep chance" effect -- feel free to delete this comment also
// or even this test as it might be redundant
ASSUMPTIONS
{
ASSUME(MoveHasAdditionalEffect(MOVE_DIRE_CLAW, MOVE_EFFECT_DIRE_CLAW) == TRUE);
}

SINGLE_BATTLE_TEST("Sleep Clause: Dire Claw cannot sleep a mon when sleep clause is active")
{
PASSES_RANDOMLY(100, 100, RNG_SECONDARY_EFFECT);
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_SPORE); }
TURN { MOVE(player, MOVE_DIRE_CLAW); SWITCH(opponent, 1); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPORE, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent);
STATUS_ICON(opponent, sleep: TRUE);
ANIMATION(ANIM_TYPE_MOVE, MOVE_DIRE_CLAW, player);
HP_BAR(opponent);
NONE_OF {
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent);
MESSAGE("Foe Wobbuffet fell asleep!");
Expand Down Expand Up @@ -281,3 +314,81 @@ DOUBLE_BATTLE_TEST("Sleep Clause: G-Max Befuddle can only sleep one opposing mon
}
}
}

//honestly some of these are probably covered by just normal sleep tests
// also possible that these should be done in doubles since its kinda just a nomral "mon woke up" test
TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon wakes up");
// something like:
// player has wob
// ai has wob
// player uses spore, AI wob falls asleep
// player celebrates until sleeping wob wakes up
// player uses spore, AI wob falls asleep

// OR something like
// player has wob
// ai has wob and wob
// player uses spore, AI wob falls asleep
// player celebrates until sleeping wob wakes up
// AI switches, player uses spore, AI wob 2 falls asleep


TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up with aromatherapy");
// something like:
// player has wob
// ai has wob and wob
// player uses spore, AI wob falls asleep
// AI switches, player uses spore, it fails
// player uses spore, it fails (or any move that can succeed)
// AI wob uses aromatherapy, cures sleeping wob
// player uses spore, it succeeds

// might be redundant if they use the same effect
TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up with heal bell");
// something like:
// player has wob
// ai has wob and wob
// player uses spore, AI wob falls asleep
// AI switches, player uses spore, it fails
// player uses spore, it fails (or any move that can succeed)
// AI wob uses heal bell, cures sleeping wob
// player uses spore, it succeeds

//I think doubles
TO_DO_BATTLE_TEST("DOUBLES: Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up with g-max sweetness whatever the fuck that is");
// something like:
// player has wob and wob
// ai has wob and wob
// someone puts someone to sleep and someone on the sleeping team uses gmax sweetness, which should cure the party of status
// can sleep again after that

// now that im writing the pseudo for this test it feels wack
TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up forcefully by a move from an opponent");
// something like:
// player has wob
// ai has wob and wob
// player uses spore, AI wob falls asleep
// AI switches, player uses spore, it fails
// AI switches back to sleeping wob, player uses wake-up-slap/uproar, which wakes up enemy wob
// AI switches AGAIN, player uses spore, it succeeds

// this feels like a horribly complicated scenario that would probably not happen in a million runs but unfortunately i thought of it so i will
// write it down
TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up by using sleep talk into psycho shift");
// replace psycho shift with the following moves:
// jungle healing, lunar blessing, refresh, purify (maybe?), take heart

TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up by the ability hydration in the rain");

TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up by the ability natural cure");

TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up by the ability shed skin");

TO_DO_BATTLE_TEST("DOUBLES TEST: Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up by the ability healer");

TO_DO_BATTLE_TEST("Sleep Clause: sleep clause is deactivated when a sleeping mon is woken up by the item awakening");
// replace awakening with the following items:
// blue flute, chesto berry, big malasada, casteliacone, full heal, full restore, heal powder, lava cookie, lum berry
// lumiose galett, miracle berry?, old gateau, pewter Crunchies, rage candy bar, shalour sable
// idk wtf half these items even are and id imagine a lot of them share effects so i doubt a test will be needed for all of them

Loading