Move Legendary egg gacha to center and double Legendary egg chance
This commit is contained in:
parent
5a0cbfad56
commit
fedc044aed
|
@ -8,8 +8,8 @@ import { getPokemonSpecies, speciesStarters } from "./pokemon-species";
|
|||
export const EGG_SEED = 1073741824;
|
||||
|
||||
export enum GachaType {
|
||||
LEGENDARY,
|
||||
TYPE,
|
||||
LEGENDARY,
|
||||
SHINY
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue