mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
remove varianttiers
This commit is contained in:
parent
2c4f02098f
commit
fe18bce026
@ -1,6 +1,6 @@
|
||||
import BattleScene from "../battle-scene";
|
||||
import PokemonSpecies, { getPokemonSpecies, speciesStarters } from "./pokemon-species";
|
||||
import { VariantTier } from "../enums/variant-tiers";
|
||||
import { VariantTier } from "../enums/variant-tier";
|
||||
import * as Utils from "../utils";
|
||||
import Overrides from "#app/overrides";
|
||||
import { pokemonPrevolutions } from "./pokemon-evolutions";
|
||||
@ -168,11 +168,11 @@ export class Egg {
|
||||
this._tier = this.getEggTierFromSpeciesStarterValue();
|
||||
this._hatchWaves = eggOptions.hatchWaves ?? this.getEggTierDefaultHatchWaves();
|
||||
}
|
||||
// If species has no variant, set variantTier to common. This needs to
|
||||
// If species has no variant, set variantTier to standard. This needs to
|
||||
// be done because species with no variants get filtered at rollSpecies but if the
|
||||
// species is set via options or the legendary gacha pokemon gets choosen the check never happens
|
||||
if (this._species && !getPokemonSpecies(this._species).hasVariants()) {
|
||||
this._variantTier = VariantTier.COMMON;
|
||||
this._variantTier = VariantTier.STANDARD;
|
||||
}
|
||||
// Needs this._tier so it needs to be generated afer the tier override if bought from same species
|
||||
this._eggMoveIndex = eggOptions?.eggMoveIndex ?? this.rollEggMoveIndex();
|
||||
@ -459,12 +459,12 @@ export class Egg {
|
||||
// place but I don't want to touch the pokemon class.
|
||||
private rollVariant(): VariantTier {
|
||||
if (!this.isShiny) {
|
||||
return VariantTier.COMMON;
|
||||
return VariantTier.STANDARD;
|
||||
}
|
||||
|
||||
const rand = Utils.randSeedInt(10);
|
||||
if (rand >= 4) {
|
||||
return VariantTier.COMMON; // 6/10
|
||||
return VariantTier.STANDARD; // 6/10
|
||||
} else if (rand >= 1) {
|
||||
return VariantTier.RARE; // 3/10
|
||||
} else {
|
||||
|
@ -1,5 +0,0 @@
|
||||
export enum VariantTier {
|
||||
COMMON,
|
||||
RARE,
|
||||
EPIC
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { EggTier } from "#enums/egg-type";
|
||||
import { Species } from "#enums/species";
|
||||
import { VariantTier } from "#enums/variant-tiers";
|
||||
import { VariantTier } from "#enums/variant-tier";
|
||||
import { EGG_SEED, Egg } from "../data/egg";
|
||||
import { EggSourceType } from "#app/enums/egg-source-types.js";
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { Species } from "#enums/species";
|
||||
import Phaser from "phaser";
|
||||
import { EggSourceType } from "#app/enums/egg-source-types.js";
|
||||
import { EggTier } from "#app/enums/egg-type.js";
|
||||
import { VariantTier } from "#app/enums/variant-tiers.js";
|
||||
import { VariantTier } from "#app/enums/variant-tier.js";
|
||||
import GameManager from "#test/utils/gameManager";
|
||||
import EggData from "#app/system/egg-data.js";
|
||||
import * as Utils from "#app/utils.js";
|
||||
@ -129,9 +129,9 @@ describe("Egg Generation Tests", () => {
|
||||
|
||||
expect(result).toBe(expectedResult);
|
||||
});
|
||||
it("should return a shiny common variant", () => {
|
||||
it("should return a shiny standard variant", () => {
|
||||
const scene = game.scene;
|
||||
const expectedVariantTier = VariantTier.COMMON;
|
||||
const expectedVariantTier = VariantTier.STANDARD;
|
||||
|
||||
const result = new Egg({scene, isShiny: true, variantTier: expectedVariantTier, species: Species.BULBASAUR}).generatePlayerPokemon(scene).variant;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user