• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How to disable status conditions after battle ends in Pokeemerald ?

curiouscat555

Beginner pokeemerald decomp editor
  • 1
    Posts
    68
    Days
    • Seen Feb 27, 2025
    I am a beginner in the pokeemerald decomp editing. I am editing pret pokeemerald and have made a few edits by looking through the simple modifications directory within pokecommunity but am not able to find what edits needed to be done to which files to end all status conditions to all pokemons once a battle is over. Basically i would not like a pokemon to carry over any status conditionlike poison, burn, sleep etc (especially the poison counter) once a trainer/gym leader/elite four battle is over. Just like how status condition confusion ends once there is a switch out or battle end I and am looking to find a way to reset/heal all other status condition as well.
     
    I am a beginner in the pokeemerald decomp editing. I am editing pret pokeemerald and have made a few edits by looking through the simple modifications directory within pokecommunity but am not able to find what edits needed to be done to which files to end all status conditions to all pokemons once a battle is over. Basically i would not like a pokemon to carry over any status conditionlike poison, burn, sleep etc (especially the poison counter) once a trainer/gym leader/elite four battle is over. Just like how status condition confusion ends once there is a switch out or battle end I and am looking to find a way to reset/heal all other status condition as well.
    You could check how HealPlayerParty heals the Player's Pokémon status1 and then imitate it in a party-wide for loop thrown into one of the functions of code that execute at the end of a battle, like for example HandleEndTurn_FinishBattle.
    Ex:
    Diff:
    diff --git a/src/battle_main.c b/src/battle_main.c
    index 25b1cfa84..a13ee76ec 100644
    --- a/src/battle_main.c
    +++ b/src/battle_main.c
    @@ -5101,6 +5101,8 @@ static void HandleEndTurn_MonFled(void)
    
     static void HandleEndTurn_FinishBattle(void)
     {
    +    u32 i;
    +
         if (gCurrentActionFuncId == B_ACTION_TRY_FINISH || gCurrentActionFuncId == B_ACTION_FINISHED)
         {
             if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK
    @@ -5146,6 +5148,19 @@ static void HandleEndTurn_FinishBattle(void)
             RecordedBattle_SetPlaybackFinished();
             BeginFastPaletteFade(3);
             FadeOutMapMusic(5);
    +
    +        for (i = 0; i < PARTY_SIZE; i++)
    +        {
    +            u8 arg[4];
    +
    +            // since status is u32, the four 0 assignments here are probably for safety to prevent undefined data from reaching SetMonData.
    +            arg[0] = 0;
    +            arg[1] = 0;
    +            arg[2] = 0;
    +            arg[3] = 0;
    +            SetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_STATUS, arg);
    +        }
    +
             gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions;
             gCB2_AfterEvolution = BattleMainCB2;
         }

    The result:
    [PokeCommunity.com] How to disable status conditions after battle ends in Pokeemerald ?
     
    Back
    Top