diff --git a/src/data/egg.ts b/src/data/egg.ts index 9c76591f01b..3e872d364f3 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -15,9 +15,10 @@ export const EGG_SEED = 1073741824; // Rates for specific random properties in 1/x const DEFAULT_SHINY_RATE = 128; const GACHA_SHINY_UP_SHINY_RATE = 64; -const SAME_SPECIES_EGG_SHINY_RATE = 32; -const SAME_SPECIES_EGG_HA_RATE = 16; +const SAME_SPECIES_EGG_SHINY_RATE = 24; +const SAME_SPECIES_EGG_HA_RATE = 8; const MANAPHY_EGG_MANAPHY_RATE = 8; +const GACHA_EGG_HA_RATE = 192; // 1/x for legendary eggs, 1/x*2 for epic eggs, 1/x*4 for rare eggs, and 1/x*8 for common eggs const DEFAULT_RARE_EGGMOVE_RATE = 6; @@ -211,11 +212,12 @@ export class Egg { pokemonSpecies = getPokemonSpecies(Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) ? Species.PHIONE : Species.MANAPHY); } - // Sets the hidden ability if a hidden ability exists and the override is set - // or if the same species egg hits the chance + // Sets the hidden ability if a hidden ability exists and + // the override is set or the egg hits the chance let abilityIndex: number | undefined = undefined; - if (pokemonSpecies.abilityHidden && (this._overrideHiddenAbility - || (this._sourceType === EggSourceType.SAME_SPECIES_EGG && !Utils.randSeedInt(SAME_SPECIES_EGG_HA_RATE)))) { + const sameSpeciesEggHACheck = (this._sourceType === EggSourceType.SAME_SPECIES_EGG && !Utils.randSeedInt(SAME_SPECIES_EGG_HA_RATE)); + const gachaEggHACheck = (!(this._sourceType === EggSourceType.SAME_SPECIES_EGG) && !Utils.randSeedInt(GACHA_EGG_HA_RATE)); + if (pokemonSpecies.abilityHidden && (this._overrideHiddenAbility || sameSpeciesEggHACheck || gachaEggHACheck)) { abilityIndex = 2; } @@ -396,8 +398,7 @@ export class Egg { * 2 cost mons get 1.5x * 4, 6, 8 cost mons get 1.75x * 3, 5, 7, 9 cost mons get 1x - * Alolan, Galarian, and Paldean mons get 0.5x - * Hisui mons get 0.125x + * Alolan, Galarian, Hisui, and Paldean mons get 0.5x * * The total weight is also being calculated EACH time there is an egg hatch instead of being generated once * and being the same each time @@ -408,7 +409,7 @@ export class Egg { let weight = Math.floor((((maxStarterValue - speciesStarters[speciesId]) / ((maxStarterValue - minStarterValue) + 1)) * 1.5 + 1) * 100); const species = getPokemonSpecies(speciesId); if (species.isRegional()) { - weight = Math.floor(weight / (species.isRareRegional() ? 8 : 2)); + weight = Math.floor(weight / 2); } speciesWeights.push(totalWeight + weight); totalWeight += weight; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 00e6a1881dc..e80a82be5ff 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -118,16 +118,16 @@ const languageSettings: { [key: string]: LanguageSetting } = { }; const starterCandyCosts: { passive: integer, costReduction: [integer, integer], egg: integer }[] = [ - { passive: 50, costReduction: [30, 75], egg: 35 }, // 1 - { passive: 45, costReduction: [25, 60], egg: 35 }, // 2 - { passive: 40, costReduction: [20, 50], egg: 35 }, // 3 - { passive: 30, costReduction: [15, 40], egg: 30 }, // 4 - { passive: 25, costReduction: [12, 35], egg: 25 }, // 5 - { passive: 20, costReduction: [10, 30], egg: 20 }, // 6 - { passive: 15, costReduction: [8, 20], egg: 15 }, // 7 - { passive: 10, costReduction: [5, 15], egg: 10 }, // 8 - { passive: 10, costReduction: [3, 10], egg: 10 }, // 9 - { passive: 10, costReduction: [3, 10], egg: 10 }, // 10 + { passive: 40, costReduction: [25, 60], egg: 30 }, // 1 Cost + { passive: 40, costReduction: [25, 60], egg: 30 }, // 2 Cost + { passive: 35, costReduction: [20, 50], egg: 25 }, // 3 Cost + { passive: 30, costReduction: [15, 40], egg: 20 }, // 4 Cost + { passive: 25, costReduction: [12, 35], egg: 18 }, // 5 Cost + { passive: 20, costReduction: [10, 30], egg: 15 }, // 6 Cost + { passive: 15, costReduction: [8, 20], egg: 12 }, // 7 Cost + { passive: 10, costReduction: [5, 15], egg: 8 }, // 8 Cost + { passive: 10, costReduction: [5, 15], egg: 8 }, // 9 Cost + { passive: 10, costReduction: [5, 15], egg: 8 }, // 10 Cost ]; // Position of UI elements