mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-14 22:06:28 +00:00
[Bug][Mystery Encounters] Use proper BST calculation (#5199)
Mystery Encounters that check the base stats of a pokemon will no longer check modified BST and instead check the actual BST
This commit is contained in:
parent
4e0b10769b
commit
0989128deb
@ -449,7 +449,7 @@ function getPokemonTradeOptions(): Map<number, EnemyPokemon[]> {
|
||||
});
|
||||
tradeOptionsMap.set(pokemon.id, tradeOptions);
|
||||
} else {
|
||||
const originalBst = pokemon.calculateBaseStats().reduce((a, b) => a + b, 0);
|
||||
const originalBst = pokemon.getSpeciesForm().getBaseStatTotal();
|
||||
|
||||
const tradeOptions: PokemonSpecies[] = [];
|
||||
for (let i = 0; i < 3; i++) {
|
||||
|
@ -452,7 +452,7 @@ function getSpeciesFromPool(speciesPool: (Species | BreederSpeciesEvolution)[][]
|
||||
}
|
||||
|
||||
function calculateEggRewardsForPokemon(pokemon: PlayerPokemon): [number, number] {
|
||||
const bst = pokemon.calculateBaseStats().reduce((a, b) => a + b, 0);
|
||||
const bst = pokemon.getSpeciesForm().getBaseStatTotal();
|
||||
// 1 point for every 20 points below 680 BST the pokemon is, (max 18, min 1)
|
||||
const pointsFromBst = Math.min(Math.max(Math.floor((680 - bst) / 20), 1), 18);
|
||||
|
||||
|
@ -147,8 +147,8 @@ export const TheStrongStuffEncounter: MysteryEncounter =
|
||||
// Sort party by bst
|
||||
const sortedParty = globalScene.getPlayerParty().slice(0)
|
||||
.sort((pokemon1, pokemon2) => {
|
||||
const pokemon1Bst = pokemon1.calculateBaseStats().reduce((a, b) => a + b, 0);
|
||||
const pokemon2Bst = pokemon2.calculateBaseStats().reduce((a, b) => a + b, 0);
|
||||
const pokemon1Bst = pokemon1.getSpeciesForm().getBaseStatTotal();
|
||||
const pokemon2Bst = pokemon2.getSpeciesForm().getBaseStatTotal();
|
||||
return pokemon2Bst - pokemon1Bst;
|
||||
});
|
||||
|
||||
|
@ -360,7 +360,7 @@ function getTeamTransformations(): PokemonTransformation[] {
|
||||
const index = pokemonTransformations.findIndex(p => p.previousPokemon.id === removed.id);
|
||||
pokemonTransformations[index].heldItems = removed.getHeldItems().filter(m => !(m instanceof PokemonFormChangeItemModifier));
|
||||
|
||||
const bst = removed.calculateBaseStats().reduce((a, b) => a + b, 0);
|
||||
const bst = removed.getSpeciesForm().getBaseStatTotal();
|
||||
let newBstRange: [number, number];
|
||||
if (i < 2) {
|
||||
newBstRange = HIGH_BST_TRANSFORM_BASE_VALUES;
|
||||
|
Loading…
x
Reference in New Issue
Block a user