PC does not revive dead mon

voloved 2023-10-30 17:21:51 -04:00
parent 4d84efa11f
commit 9992d17fe6
1 changed files with 18 additions and 0 deletions

@ -550,6 +550,24 @@ struct BoxPokemon
}; };
-------------------------------- src/pokemon.c -------------------------------- -------------------------------- src/pokemon.c --------------------------------
void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest)
{
u32 value = 0;
dest->box = *src;
SetMonData(dest, MON_DATA_STATUS, &value);
SetMonData(dest, MON_DATA_HP, &value);
SetMonData(dest, MON_DATA_MAX_HP, &value);
value = MAIL_NONE;
SetMonData(dest, MON_DATA_MAIL, &value);
CalculateMonStats(dest);
+ if (GetMonData(dest, MON_DATA_DEAD) && FlagGet(FLAG_NUZLOCKE))
+ {
+ value = 0;
+ SetMonData(dest, MON_DATA_HP, &value);
+ }
}
@@ -4150,13 +4150,15 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) @@ -4150,13 +4150,15 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
} }
case MON_DATA_LANGUAGE: case MON_DATA_LANGUAGE: