Move Legendary egg gacha to center and double Legendary egg chance

pull/16/head
Flashfyre 2024-02-19 10:42:17 -05:00
parent 5a0cbfad56
commit fedc044aed
2 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@ import { getPokemonSpecies, speciesStarters } from "./pokemon-species";
export const EGG_SEED = 1073741824;
export enum GachaType {
LEGENDARY,
TYPE,
LEGENDARY,
SHINY
}

View File

@ -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;