rh-hideout / pokeemerald-expansion

Feature branche for the pokeemerald decompilation. See the wiki for more info.
369 stars 1.19k forks source link

Refactor ability order #5660

Open AlexOn1ine opened 1 week ago

AlexOn1ine commented 1 week ago

Description

1st: Neutralizing Gas, Tera Shift
2nd: Klutz, Unnerve, As One (Ice Rider), As One (Shadow Rider)
3rd: like every other switch in ability
4th: Primal Reversion
5th: Flower Gift, Forecast, Ice Face, Costar, Commander, Protosynthesis, Quark Drive, Hospitality
6th: Opportunist

According to research from kittenchilly this is the order of ability activation which is not correct in expansion. If there is a primal reversion on field drought / drizzle are skipped.

Version

1.9.3 (Latest release)

Upcoming/master Version

No response

Discord contact info

No response

kittenchilly commented 1 week ago

After researching more, entry hazards are done at the same time as 3.

AlexOn1ine commented 1 week ago
DOUBLE_BATTLE_TEST("Switch In Order Test")
{
    GIVEN {
        PLAYER(SPECIES_BULBASAUR) { HP(1); }
        PLAYER(SPECIES_PIKACHU) { HP(1); }
        PLAYER(SPECIES_TERAPAGOS);
        PLAYER(SPECIES_TREECKO);
        OPPONENT(SPECIES_TORCHIC) { HP(1); }
        OPPONENT(SPECIES_GOLEM);
        OPPONENT(SPECIES_KOFFING) { Ability(ABILITY_NEUTRALIZING_GAS); }
        OPPONENT(SPECIES_MUDKIP);
    } WHEN {
        TURN {
            MOVE(playerLeft, MOVE_STEALTH_ROCK);
            MOVE(playerRight, MOVE_SPIKES);
            MOVE(opponentLeft, MOVE_STEALTH_ROCK);
            MOVE(opponentRight, MOVE_EXPLOSION);
            SEND_OUT(playerLeft, 2);
            SEND_OUT(playerRight, 3);
            SEND_OUT(opponentLeft, 2);
            SEND_OUT(opponentRight, 3);
        }
    } SCENE {
        ANIMATION(ANIM_TYPE_MOVE, MOVE_STEALTH_ROCK, playerLeft);
        ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKES, playerRight);
        ANIMATION(ANIM_TYPE_MOVE, MOVE_STEALTH_ROCK, opponentLeft);
        ANIMATION(ANIM_TYPE_MOVE, MOVE_EXPLOSION, opponentRight);
    }
}

Incomplete test made for viewing purposes only. Showdown replay for reference