diff --git a/src/data/egg.ts b/src/data/egg.ts index 6aed81310..d59b13091 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -8,8 +8,8 @@ import { getPokemonSpecies, speciesStarters } from "./pokemon-species"; export const EGG_SEED = 1073741824; export enum GachaType { - LEGENDARY, TYPE, + LEGENDARY, SHINY } diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index eaa03fe82..413f31e50 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -341,10 +341,10 @@ export default class EggGachaUiHandler extends MessageUiHandler { count = 0; if (!eggs) { eggs = []; - + const tierValueOffset = this.gachaCursor === GachaType.LEGENDARY ? 1 : 0; const tiers = new Array(pullCount).fill(null).map(() => { const tierValue = Utils.randInt(256); - return tierValue >= 52 ? ModifierTier.COMMON : tierValue >= 8 ? ModifierTier.GREAT : tierValue >= 1 ? ModifierTier.ULTRA : ModifierTier.MASTER; + return tierValue >= 52 + tierValueOffset ? ModifierTier.COMMON : tierValue + tierValueOffset >= 8 ? ModifierTier.GREAT : tierValue >= 1 + tierValueOffset ? ModifierTier.ULTRA : ModifierTier.MASTER; }); if (pullCount >= 25 && !tiers.filter(t => t >= ModifierTier.ULTRA).length) tiers[Utils.randInt(tiers.length)] = ModifierTier.ULTRA;