Skip to content

Commit

Permalink
fix golden rod unique pick (keldaanCommunity#1894)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainpolletvillard committed Jul 2, 2024
1 parent cda42a9 commit 2cad19c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/models/shop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import Player from "./colyseus-models/player"
import PokemonFactory from "./pokemon-factory"
import { getPokemonData } from "./precomputed/precomputed-pokemon-data"
import { PRECOMPUTED_POKEMONS_PER_RARITY } from "./precomputed/precomputed-rarity"
import { PRECOMPUTED_POKEMONS_PER_TYPE_AND_CATEGORY } from "./precomputed/precomputed-types-and-categories"
import { PVEStages } from "./pve-stages"

export function getPoolSize(rarity: Rarity, maxStars: number): number {
Expand Down Expand Up @@ -482,9 +481,12 @@ export default class Shop {
}
})
const typeWanted = pickRandomIn(topSynergies)
const uniques = PRECOMPUTED_POKEMONS_PER_TYPE_AND_CATEGORY[
typeWanted
].uniquePokemons.filter((p) => getPokemonData(p).stars === 3)
const uniques = UniqueShop.filter(
(p) =>
p in PkmDuos === false &&
getPokemonData(p as Pkm).types.includes(typeWanted)
) as Pkm[]

if (rarity === Rarity.SPECIAL && uniques.length > 0) {
fish = pickRandomIn(uniques)
} else {
Expand Down

0 comments on commit 2cad19c

Please sign in to comment.