mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 14:59:26 +02:00
eslint
This commit is contained in:
parent
4846722630
commit
52c74591c6
@ -69,18 +69,18 @@ export const FieryFalloutEncounter: MysteryEncounter =
|
|||||||
species: volcaronaSpecies,
|
species: volcaronaSpecies,
|
||||||
isBoss: false,
|
isBoss: false,
|
||||||
gender: Gender.MALE,
|
gender: Gender.MALE,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [ BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON ],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [Stat.SPDEF, Stat.SPD], 2));
|
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ Stat.SPDEF, Stat.SPD ], 2));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
species: volcaronaSpecies,
|
species: volcaronaSpecies,
|
||||||
isBoss: false,
|
isBoss: false,
|
||||||
gender: Gender.FEMALE,
|
gender: Gender.FEMALE,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [ BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON ],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [Stat.SPDEF, Stat.SPD], 2));
|
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ Stat.SPDEF, Stat.SPD ], 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -223,7 +223,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
|||||||
encounter.setDialogueToken("chosenPokemon", pokemon1.getNameToRender());
|
encounter.setDialogueToken("chosenPokemon", pokemon1.getNameToRender());
|
||||||
const eggOptions = getEggOptions(scene, pokemon1CommonEggs, pokemon1RareEggs);
|
const eggOptions = getEggOptions(scene, pokemon1CommonEggs, pokemon1RareEggs);
|
||||||
setEncounterRewards(scene,
|
setEncounterRewards(scene,
|
||||||
{ guaranteedModifierTypeFuncs: [modifierTypes.SOOTHE_BELL], fillRemaining: true },
|
{ guaranteedModifierTypeFuncs: [ modifierTypes.SOOTHE_BELL ], fillRemaining: true },
|
||||||
eggOptions,
|
eggOptions,
|
||||||
() => doPostEncounterCleanup(scene));
|
() => doPostEncounterCleanup(scene));
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
|||||||
encounter.setDialogueToken("chosenPokemon", pokemon2.getNameToRender());
|
encounter.setDialogueToken("chosenPokemon", pokemon2.getNameToRender());
|
||||||
const eggOptions = getEggOptions(scene, pokemon2CommonEggs, pokemon2RareEggs);
|
const eggOptions = getEggOptions(scene, pokemon2CommonEggs, pokemon2RareEggs);
|
||||||
setEncounterRewards(scene,
|
setEncounterRewards(scene,
|
||||||
{ guaranteedModifierTypeFuncs: [modifierTypes.SOOTHE_BELL], fillRemaining: true },
|
{ guaranteedModifierTypeFuncs: [ modifierTypes.SOOTHE_BELL ], fillRemaining: true },
|
||||||
eggOptions,
|
eggOptions,
|
||||||
() => doPostEncounterCleanup(scene));
|
() => doPostEncounterCleanup(scene));
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
|||||||
encounter.setDialogueToken("chosenPokemon", pokemon3.getNameToRender());
|
encounter.setDialogueToken("chosenPokemon", pokemon3.getNameToRender());
|
||||||
const eggOptions = getEggOptions(scene, pokemon3CommonEggs, pokemon3RareEggs);
|
const eggOptions = getEggOptions(scene, pokemon3CommonEggs, pokemon3RareEggs);
|
||||||
setEncounterRewards(scene,
|
setEncounterRewards(scene,
|
||||||
{ guaranteedModifierTypeFuncs: [modifierTypes.SOOTHE_BELL], fillRemaining: true },
|
{ guaranteedModifierTypeFuncs: [ modifierTypes.SOOTHE_BELL ], fillRemaining: true },
|
||||||
eggOptions,
|
eggOptions,
|
||||||
() => doPostEncounterCleanup(scene));
|
() => doPostEncounterCleanup(scene));
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ export const WeirdDreamEncounter: MysteryEncounter =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
setEncounterRewards(scene, { guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], fillRemaining: false }, undefined, onBeforeRewards);
|
setEncounterRewards(scene, { guaranteedModifierTiers: [ ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT ], fillRemaining: false }, undefined, onBeforeRewards);
|
||||||
|
|
||||||
await showEncounterText(scene, `${namespace}:option.2.selected_2`, null, undefined, true);
|
await showEncounterText(scene, `${namespace}:option.2.selected_2`, null, undefined, true);
|
||||||
await initBattleWithEnemyConfig(scene, enemyPartyConfig);
|
await initBattleWithEnemyConfig(scene, enemyPartyConfig);
|
||||||
@ -451,7 +451,7 @@ async function postProcessTransformedPokemon(scene: BattleScene, previousPokemon
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Roll a neutral nature
|
// Roll a neutral nature
|
||||||
newPokemon.nature = [Nature.HARDY, Nature.DOCILE, Nature.BASHFUL, Nature.QUIRKY, Nature.SERIOUS][randSeedInt(5)];
|
newPokemon.nature = [ Nature.HARDY, Nature.DOCILE, Nature.BASHFUL, Nature.QUIRKY, Nature.SERIOUS ][randSeedInt(5)];
|
||||||
|
|
||||||
// For pokemon at/below 570 BST or any shiny pokemon, unlock it permanently as if you had caught it
|
// For pokemon at/below 570 BST or any shiny pokemon, unlock it permanently as if you had caught it
|
||||||
if (!forBattle && (newPokemon.getSpeciesForm().getBaseStatTotal() <= NON_LEGENDARY_BST_THRESHOLD || newPokemon.isShiny())) {
|
if (!forBattle && (newPokemon.getSpeciesForm().getBaseStatTotal() <= NON_LEGENDARY_BST_THRESHOLD || newPokemon.isShiny())) {
|
||||||
@ -509,7 +509,7 @@ async function postProcessTransformedPokemon(scene: BattleScene, previousPokemon
|
|||||||
|
|
||||||
// Randomize the second type of the pokemon
|
// Randomize the second type of the pokemon
|
||||||
// If the pokemon does not normally have a second type, it will gain 1
|
// If the pokemon does not normally have a second type, it will gain 1
|
||||||
const newTypes = [newPokemon.getTypes()[0]];
|
const newTypes = [ newPokemon.getTypes()[0] ];
|
||||||
let newType = randSeedInt(18) as Type;
|
let newType = randSeedInt(18) as Type;
|
||||||
while (newType === newTypes[0]) {
|
while (newType === newTypes[0]) {
|
||||||
newType = randSeedInt(18) as Type;
|
newType = randSeedInt(18) as Type;
|
||||||
@ -531,7 +531,7 @@ async function postProcessTransformedPokemon(scene: BattleScene, previousPokemon
|
|||||||
// Def or SpDef
|
// Def or SpDef
|
||||||
stats.push(baseStats[Stat.DEF] < baseStats[Stat.SPDEF] ? Stat.DEF : Stat.SPDEF);
|
stats.push(baseStats[Stat.DEF] < baseStats[Stat.SPDEF] ? Stat.DEF : Stat.SPDEF);
|
||||||
const modType = modifierTypes.MYSTERY_ENCOUNTER_OLD_GATEAU()
|
const modType = modifierTypes.MYSTERY_ENCOUNTER_OLD_GATEAU()
|
||||||
.generateType(scene.getParty(), [20, stats])
|
.generateType(scene.getParty(), [ 20, stats ])
|
||||||
?.withIdFromFunc(modifierTypes.MYSTERY_ENCOUNTER_OLD_GATEAU);
|
?.withIdFromFunc(modifierTypes.MYSTERY_ENCOUNTER_OLD_GATEAU);
|
||||||
const modifier = modType?.newModifier(newPokemon);
|
const modifier = modType?.newModifier(newPokemon);
|
||||||
if (modifier) {
|
if (modifier) {
|
||||||
|
@ -48,7 +48,7 @@ describe("Fiery Fallout - Mystery Encounter", () => {
|
|||||||
.startingWave(defaultWave)
|
.startingWave(defaultWave)
|
||||||
.startingBiome(defaultBiome)
|
.startingBiome(defaultBiome)
|
||||||
.disableTrainerWaves()
|
.disableTrainerWaves()
|
||||||
.moveset([Moves.PAYBACK, Moves.THUNDERBOLT]); // Required for attack type booster item generation
|
.moveset([ Moves.PAYBACK, Moves.THUNDERBOLT ]); // Required for attack type booster item generation
|
||||||
|
|
||||||
vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue(
|
vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue(
|
||||||
new Map<Biome, MysteryEncounterType[]>([
|
new Map<Biome, MysteryEncounterType[]>([
|
||||||
@ -113,14 +113,14 @@ describe("Fiery Fallout - Mystery Encounter", () => {
|
|||||||
species: getPokemonSpecies(Species.VOLCARONA),
|
species: getPokemonSpecies(Species.VOLCARONA),
|
||||||
isBoss: false,
|
isBoss: false,
|
||||||
gender: Gender.MALE,
|
gender: Gender.MALE,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [ BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON ],
|
||||||
mysteryEncounterBattleEffects: expect.any(Function)
|
mysteryEncounterBattleEffects: expect.any(Function)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
species: getPokemonSpecies(Species.VOLCARONA),
|
species: getPokemonSpecies(Species.VOLCARONA),
|
||||||
isBoss: false,
|
isBoss: false,
|
||||||
gender: Gender.FEMALE,
|
gender: Gender.FEMALE,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [ BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON ],
|
||||||
mysteryEncounterBattleEffects: expect.any(Function)
|
mysteryEncounterBattleEffects: expect.any(Function)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user