Moved Shiny Charm rerolls into config file

This commit is contained in:
Eduardo Quezada 2020-10-17 01:26:51 -03:00
parent 137d9801c0
commit 7fbd64ec37
3 changed files with 2 additions and 2 deletions

View File

@ -14,6 +14,7 @@
#endif
// Item config
#define P_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects.
#define P_KEY_FOSSILS GEN_7 // In Gen4+, all Gen 3 fossils became regular items.
#define P_KEY_ESCAPE_ROPE GEN_7 // In Gen8, Escape Rope became a Key Item.

View File

@ -91,7 +91,6 @@
// Shiny odds
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
#define SHINY_CHARM_REROLLS 3 // Amount of re-rolls if has Shiny Charm.
// Flags for Get(Box)MonData / Set(Box)MonData
#define MON_DATA_PERSONALITY 0

View File

@ -2233,7 +2233,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
personality = Random32();
shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality);
rolls++;
} while (shinyValue >= SHINY_ODDS && rolls < SHINY_CHARM_REROLLS);
} while (shinyValue >= SHINY_ODDS && rolls < P_SHINY_CHARM_REROLLS);
}
}