mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-19 01:44:20 +01:00
Moved Shiny Charm rerolls into config file
This commit is contained in:
parent
137d9801c0
commit
7fbd64ec37
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user