Replace type gacha with rare egg move gacha

This commit is contained in:
Flashfyre committed 2024-03-03 21:30:11 -05:00
1 parent 6dc5e7b1fd
commit c683f72aad
6 files changed
+13 -44

No files matched your search

+3 -15
View File
@@ -8,7 +8,7 @@ import { EggTier } from "./enums/egg-type";
export const EGG_SEED = 1073741824;
export enum GachaType {
TYPE,
MOVE,
LEGENDARY,
SHINY
}
@@ -82,8 +82,8 @@ export function getEggGachaTypeDescriptor(scene: BattleScene, egg: Egg): string
switch (egg.gachaType) {
case GachaType.LEGENDARY:
return `Legendary Rate Up (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, egg.timestamp)).getName()})`;
case GachaType.TYPE:
return `Type Rate Up (${Utils.toReadableString(Type[getTypeGachaTypeForTimestamp(scene, egg.timestamp)])})`;
case GachaType.MOVE:
return 'Rare Egg Move Rate Up';
case GachaType.SHINY:
return 'Shiny Rate Up';
}
@@ -101,17 +101,5 @@ export function getLegendaryGachaSpeciesForTimestamp(scene: BattleScene, timesta
ret = Utils.randSeedItem(legendarySpecies);
}, Utils.getSunday(new Date(timestamp)).getTime(), EGG_SEED.toString());
return ret;
}
export function getTypeGachaTypeForTimestamp(scene: BattleScene, timestamp: integer): Type {
const allTypes = Utils.getEnumValues(Type);
const types = allTypes.slice(1, allTypes.length - 1);
let ret: Type;
scene.executeWithSeedOffset(() => {
ret = Utils.randSeedItem(types);
}, Utils.getSunday(new Date(timestamp)).getTime(), EGG_SEED.toString());
return ret;
}