OUTDATED Surviving poison outside of battle with 1hp
This no longer works, but Lunos has found a fix further down - go check it out!
With just a few steps your pokemon should survive poison on the overworld now with 1hp, like in later gens.
Open the file
/src/field_poison.c
Spoiler:
Find the following function:
s32 DoPoisonFieldEffect(void)
Simply add:
u32 numSurvived = 0;
Then find this code inside:
if(hp == 0 || --hp == 0)
and change the
whole if-statement to:
if (hp == 1 || --hp == 1)
{
u32 status = STATUS1_NONE;
SetMonData(pokemon, MON_DATA_STATUS, &status);
numSurvived++;
ScriptContext1_SetupScript(EventScript_PoisonSurvial);
}
Last in this file add the following after the for-loop:
if (numSurvived != 0)
{
return FLDPSN_NONE;
}
Next open
/data/event_scripts.s and add the following to the end of the file:
Thats it, everything should be done.