mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 14:22:19 +02:00
merge
This commit is contained in:
parent
b3ccf8d9b6
commit
15fbd9a54f
@ -884,7 +884,7 @@ export default class BattleScene extends SceneBase {
|
||||
return true;
|
||||
}
|
||||
|
||||
public getPlayerParty(fakeShininess: boolean = true): PlayerPokemon[] {
|
||||
public getPlayerParty(fakeShininess = true): PlayerPokemon[] {
|
||||
const party = this.party;
|
||||
if (!fakeShininess) {
|
||||
party.map(pokemon => {
|
||||
|
@ -8,7 +8,7 @@ import i18next from "i18next";
|
||||
* @param pokemon {@linkcode Pokemon} name and battle context will be retrieved from this instance
|
||||
* @returns {string} ex: "Wild Gengar", "Ectoplasma sauvage"
|
||||
*/
|
||||
export function getPokemonNameWithAffix(pokemon: Pokemon | undefined, useIllusion: boolean = true): string {
|
||||
export function getPokemonNameWithAffix(pokemon: Pokemon | undefined, useIllusion = true): string {
|
||||
if (!pokemon) {
|
||||
return "Missigno";
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ export class SummonPhase extends PartyMemberPokemonPhase {
|
||||
this.player ? 36 : 248,
|
||||
this.player ? 80 : 44,
|
||||
"pb",
|
||||
getPokeballAtlasKey(pokemon.battleData.illusion.pokeball ?? pokemon.pokeball)
|
||||
getPokeballAtlasKey(pokemon.battleData.illusion.pokeball ?? pokemon.pokeball),
|
||||
);
|
||||
pokeball.setVisible(false);
|
||||
pokeball.setOrigin(0.5, 0.625);
|
||||
@ -177,7 +177,11 @@ export class SummonPhase extends PartyMemberPokemonPhase {
|
||||
}
|
||||
globalScene.currentBattle.seenEnemyPartyMemberIds.add(pokemon.id);
|
||||
}
|
||||
addPokeballOpenParticles(pokemon.x, pokemon.y - 16, pokemon.battleData.illusion.pokeball ?? pokemon.pokeball);
|
||||
addPokeballOpenParticles(
|
||||
pokemon.x,
|
||||
pokemon.y - 16,
|
||||
pokemon.battleData.illusion.pokeball ?? pokemon.pokeball,
|
||||
);
|
||||
globalScene.updateModifiers(this.player);
|
||||
globalScene.updateFieldScale();
|
||||
pokemon.showInfo();
|
||||
|
@ -1,5 +1,11 @@
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import { applyPreSummonAbAttrs, applyPreSwitchOutAbAttrs, PostDamageForceSwitchAbAttr, PreSummonAbAttr, PreSwitchOutAbAttr } from "#app/data/ability";
|
||||
import {
|
||||
applyPreSummonAbAttrs,
|
||||
applyPreSwitchOutAbAttrs,
|
||||
PostDamageForceSwitchAbAttr,
|
||||
PreSummonAbAttr,
|
||||
PreSwitchOutAbAttr,
|
||||
} from "#app/data/ability";
|
||||
import { allMoves, ForceSwitchOutAttr } from "#app/data/moves/move";
|
||||
import { getPokeballTintColor } from "#app/data/pokeball";
|
||||
import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms";
|
||||
|
@ -798,7 +798,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
while (
|
||||
nameTextWidth >
|
||||
(this.player || !this.boss ? 60 : 98) -
|
||||
((pokemon.gender !== Gender.GENDERLESS ? 6 : 0) +
|
||||
((gender !== Gender.GENDERLESS ? 6 : 0) +
|
||||
(pokemon.fusionSpecies ? 8 : 0) +
|
||||
(pokemon.isShiny() ? 8 : 0) +
|
||||
(Math.min(pokemon.level.toString().length, 3) - 3) * 8)
|
||||
|
@ -1582,7 +1582,9 @@ class PartySlot extends Phaser.GameObjects.Container {
|
||||
const fusionShinyStar = globalScene.add.image(0, 0, "shiny_star_small_2");
|
||||
fusionShinyStar.setOrigin(0, 0);
|
||||
fusionShinyStar.setPosition(shinyStar.x, shinyStar.y);
|
||||
fusionShinyStar.setTint(getVariantTint(this.pokemon.battleData.illusion.basePokemon?.fusionVariant ?? this.pokemon.fusionVariant));
|
||||
fusionShinyStar.setTint(
|
||||
getVariantTint(this.pokemon.battleData.illusion.basePokemon?.fusionVariant ?? this.pokemon.fusionVariant),
|
||||
);
|
||||
|
||||
slotInfoContainer.add(fusionShinyStar);
|
||||
}
|
||||
|
@ -348,8 +348,14 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.pokemonSprite.setPipelineData("isTerastallized", this.pokemon.isTerastallized);
|
||||
this.pokemonSprite.setPipelineData("ignoreTimeTint", true);
|
||||
this.pokemonSprite.setPipelineData("spriteKey", this.pokemon.getSpriteKey());
|
||||
this.pokemonSprite.setPipelineData("shiny", this.pokemon.battleData.illusion.basePokemon?.shiny ?? this.pokemon.shiny);
|
||||
this.pokemonSprite.setPipelineData("variant", this.pokemon.battleData.illusion.basePokemon?.variant ?? this.pokemon.variant);
|
||||
this.pokemonSprite.setPipelineData(
|
||||
"shiny",
|
||||
this.pokemon.battleData.illusion.basePokemon?.shiny ?? this.pokemon.shiny,
|
||||
);
|
||||
this.pokemonSprite.setPipelineData(
|
||||
"variant",
|
||||
this.pokemon.battleData.illusion.basePokemon?.variant ?? this.pokemon.variant,
|
||||
);
|
||||
["spriteColors", "fusionSpriteColors"].map(k => {
|
||||
delete this.pokemonSprite.pipelineData[`${k}Base`];
|
||||
if (this.pokemon?.summonData?.speciesForm) {
|
||||
@ -446,7 +452,9 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.fusionShinyIcon.setPosition(this.shinyIcon.x, this.shinyIcon.y);
|
||||
this.fusionShinyIcon.setVisible(doubleShiny);
|
||||
if (isFusion) {
|
||||
this.fusionShinyIcon.setTint(getVariantTint(this.pokemon.battleData.illusion.basePokemon?.fusionVariant ?? this.pokemon.fusionVariant));
|
||||
this.fusionShinyIcon.setTint(
|
||||
getVariantTint(this.pokemon.battleData.illusion.basePokemon?.fusionVariant ?? this.pokemon.fusionVariant),
|
||||
);
|
||||
}
|
||||
|
||||
this.pokeball.setFrame(getPokeballAtlasKey(this.pokemon.pokeball));
|
||||
|
@ -3,9 +3,7 @@ import Phaser from "phaser";
|
||||
import GameManager from "#test/testUtils/gameManager";
|
||||
import overrides from "#app/overrides";
|
||||
import { Species } from "#enums/species";
|
||||
import {
|
||||
TurnEndPhase,
|
||||
} from "#app/phases/turn-end-phase";
|
||||
import { TurnEndPhase } from "#app/phases/turn-end-phase";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { PokeballType } from "#app/enums/pokeball";
|
||||
@ -88,8 +86,22 @@ describe("Abilities - Illusion", () => {
|
||||
|
||||
const flameThrower = enemy.getMoveset()[0]!.getMove();
|
||||
const psychic = enemy.getMoveset()[1]!.getMove();
|
||||
const flameThrowerEffectiveness = zoroark.getAttackTypeEffectiveness(flameThrower.type, enemy, undefined, undefined, flameThrower, true);
|
||||
const psychicEffectiveness = zoroark.getAttackTypeEffectiveness(psychic.type, enemy, undefined, undefined, psychic, true);
|
||||
const flameThrowerEffectiveness = zoroark.getAttackTypeEffectiveness(
|
||||
flameThrower.type,
|
||||
enemy,
|
||||
undefined,
|
||||
undefined,
|
||||
flameThrower,
|
||||
true,
|
||||
);
|
||||
const psychicEffectiveness = zoroark.getAttackTypeEffectiveness(
|
||||
psychic.type,
|
||||
enemy,
|
||||
undefined,
|
||||
undefined,
|
||||
psychic,
|
||||
true,
|
||||
);
|
||||
expect(psychicEffectiveness).above(flameThrowerEffectiveness);
|
||||
});
|
||||
|
||||
@ -111,7 +123,12 @@ describe("Abilities - Illusion", () => {
|
||||
});
|
||||
|
||||
it("copy the the name, the nickname, the gender, the shininess and the pokeball of the pokemon", async () => {
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.SCARY_FACE, Moves.SCARY_FACE, Moves.SCARY_FACE, Moves.SCARY_FACE ]);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([
|
||||
Moves.SCARY_FACE,
|
||||
Moves.SCARY_FACE,
|
||||
Moves.SCARY_FACE,
|
||||
Moves.SCARY_FACE,
|
||||
]);
|
||||
|
||||
await game.classicMode.startBattle([Species.ABRA, Species.ZOROARK, Species.AXEW]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user