mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 23:11:11 +00:00
[Misc] Tandemaus evolves into 3 family form at a rate of 25% (#2738)
This commit is contained in:
parent
6c6dc01490
commit
fc8b708785
@ -1145,6 +1145,11 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
||||
new SpeciesEvolution(Species.PAWMOT, 32, null, null)
|
||||
],
|
||||
[Species.TANDEMAUS]: [
|
||||
new SpeciesFormEvolution(Species.MAUSHOLD, "", "three", 25, null, new SpeciesEvolutionCondition(p => {
|
||||
let ret = false;
|
||||
p.scene.executeWithSeedOffset(() => ret = !Utils.randSeedInt(4), p.id);
|
||||
return ret;
|
||||
})),
|
||||
new SpeciesEvolution(Species.MAUSHOLD, 25, null, null)
|
||||
],
|
||||
[Species.FIDOUGH]: [
|
||||
|
@ -2459,8 +2459,8 @@ export function initSpecies() {
|
||||
new PokemonSpecies(Species.PAWMOT, 9, false, false, false, "Hands-On Pokémon", Type.ELECTRIC, Type.FIGHTING, 0.9, 41, Abilities.VOLT_ABSORB, Abilities.NATURAL_CURE, Abilities.IRON_FIST, 490, 70, 115, 70, 70, 60, 105, 45, 50, 245, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.TANDEMAUS, 9, false, false, false, "Couple Pokémon", Type.NORMAL, null, 0.3, 1.8, Abilities.RUN_AWAY, Abilities.PICKUP, Abilities.OWN_TEMPO, 305, 50, 50, 45, 40, 45, 75, 150, 50, 61, GrowthRate.FAST, null, false),
|
||||
new PokemonSpecies(Species.MAUSHOLD, 9, false, false, false, "Family Pokémon", Type.NORMAL, null, 0.3, 2.3, Abilities.FRIEND_GUARD, Abilities.CHEEK_POUCH, Abilities.TECHNICIAN, 470, 74, 75, 70, 65, 75, 111, 75, 50, 165, GrowthRate.FAST, null, false, false,
|
||||
new PokemonForm("Family of Four", "four", Type.NORMAL, null, 0.3, 2.3, Abilities.FRIEND_GUARD, Abilities.CHEEK_POUCH, Abilities.TECHNICIAN, 470, 74, 75, 70, 65, 75, 111, 75, 50, 165),
|
||||
new PokemonForm("Family of Three", "three", Type.NORMAL, null, 0.3, 2.8, Abilities.FRIEND_GUARD, Abilities.CHEEK_POUCH, Abilities.TECHNICIAN, 470, 74, 75, 70, 65, 75, 111, 75, 50, 165),
|
||||
new PokemonForm("Family of Four", "four", Type.NORMAL, null, 0.3, 2.8, Abilities.FRIEND_GUARD, Abilities.CHEEK_POUCH, Abilities.TECHNICIAN, 470, 74, 75, 70, 65, 75, 111, 75, 50, 165),
|
||||
new PokemonForm("Family of Three", "three", Type.NORMAL, null, 0.3, 2.3, Abilities.FRIEND_GUARD, Abilities.CHEEK_POUCH, Abilities.TECHNICIAN, 470, 74, 75, 70, 65, 75, 111, 75, 50, 165),
|
||||
),
|
||||
new PokemonSpecies(Species.FIDOUGH, 9, false, false, false, "Puppy Pokémon", Type.FAIRY, null, 0.3, 10.9, Abilities.OWN_TEMPO, Abilities.NONE, Abilities.KLUTZ, 312, 37, 55, 70, 30, 55, 65, 190, 50, 62, GrowthRate.MEDIUM_SLOW, 50, false),
|
||||
new PokemonSpecies(Species.DACHSBUN, 9, false, false, false, "Dog Pokémon", Type.FAIRY, null, 0.5, 14.9, Abilities.WELL_BAKED_BODY, Abilities.NONE, Abilities.AROMA_VEIL, 477, 57, 80, 115, 50, 80, 95, 90, 50, 167, GrowthRate.MEDIUM_SLOW, 50, false),
|
||||
|
48
src/test/evolutions/evolutions.test.ts
Normal file
48
src/test/evolutions/evolutions.test.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import Phaser from "phaser";
|
||||
import GameManager from "#app/test/utils/gameManager";
|
||||
import { Species } from "#enums/species";
|
||||
import * as Utils from "#app/utils";
|
||||
|
||||
describe("Evolution tests", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
let game: GameManager;
|
||||
|
||||
beforeAll(() => {
|
||||
phaserGame = new Phaser.Game({
|
||||
type: Phaser.HEADLESS,
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
game.phaseInterceptor.restoreOg();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
});
|
||||
|
||||
it("tandemaus evolution form test", async () => {
|
||||
/* this test checks to make sure that tandemaus will
|
||||
* evolve into a 3 family maushold 25% of the time
|
||||
* and a 4 family maushold the other 75% of the time
|
||||
* This is done by using the getEvolution method in pokemon.ts
|
||||
* getEvolution will give back the form that the pokemon can evolve into
|
||||
* It does this by checking the pokemon conditions in pokemon-forms.ts
|
||||
* For tandemaus, the conditions are random due to a randSeedInt(4)
|
||||
* If the value is 0, it's a 3 family maushold, whereas if the value is
|
||||
* 1, 2 or 3, it's a 4 family maushold
|
||||
*/
|
||||
await game.startBattle([Species.TANDEMAUS]); // starts us off with a tandemaus
|
||||
const playerPokemon = game.scene.getPlayerPokemon();
|
||||
playerPokemon.level = 25; // tandemaus evolves at level 25
|
||||
vi.spyOn(Utils, "randSeedInt").mockReturnValue(0); // setting the random generator to be 0 to force a three family maushold
|
||||
const threeForm = playerPokemon.getEvolution();
|
||||
expect(threeForm.evoFormKey).toBe("three"); // as per pokemon-forms, the evoFormKey for 3 family mausholds is "three"
|
||||
for (let f = 1; f < 4; f++) {
|
||||
vi.spyOn(Utils, "randSeedInt").mockReturnValue(f); // setting the random generator to 1, 2 and 3 to force 4 family mausholds
|
||||
const fourForm = playerPokemon.getEvolution();
|
||||
expect(fourForm.evoFormKey).toBe(null); // meanwhile, according to the pokemon-forms, the evoFormKey for a 4 family maushold is null
|
||||
}
|
||||
}, 5000);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user