mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-26 18:22:19 +02:00
Track met wave
This commit is contained in:
parent
ddf97fd8f6
commit
a7aaed6255
@ -95,6 +95,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
public metLevel: integer;
|
public metLevel: integer;
|
||||||
public metBiome: Biome | -1;
|
public metBiome: Biome | -1;
|
||||||
public metSpecies: Species;
|
public metSpecies: Species;
|
||||||
|
public metWave: integer;
|
||||||
public luck: integer;
|
public luck: integer;
|
||||||
public pauseEvolutions: boolean;
|
public pauseEvolutions: boolean;
|
||||||
public pokerus: boolean;
|
public pokerus: boolean;
|
||||||
@ -194,6 +195,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
this.luck = dataSource.luck;
|
this.luck = dataSource.luck;
|
||||||
this.metBiome = dataSource.metBiome;
|
this.metBiome = dataSource.metBiome;
|
||||||
this.metSpecies = dataSource.metSpecies ?? (this.metBiome !== -1 ? this.species.speciesId : this.species.getRootSpeciesId(true));
|
this.metSpecies = dataSource.metSpecies ?? (this.metBiome !== -1 ? this.species.speciesId : this.species.getRootSpeciesId(true));
|
||||||
|
this.metWave = dataSource.metWave ?? (this.metBiome === -1 ? -1: 0);
|
||||||
this.pauseEvolutions = dataSource.pauseEvolutions;
|
this.pauseEvolutions = dataSource.pauseEvolutions;
|
||||||
this.pokerus = !!dataSource.pokerus;
|
this.pokerus = !!dataSource.pokerus;
|
||||||
this.evoCounter = dataSource.evoCounter ?? 0;
|
this.evoCounter = dataSource.evoCounter ?? 0;
|
||||||
@ -240,6 +242,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
this.metLevel = level;
|
this.metLevel = level;
|
||||||
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
|
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
|
||||||
this.metSpecies = species.speciesId;
|
this.metSpecies = species.speciesId;
|
||||||
|
this.metWave = scene.currentBattle ? scene.currentBattle.waveIndex : -1;
|
||||||
this.pokerus = false;
|
this.pokerus = false;
|
||||||
|
|
||||||
if (level > 1) {
|
if (level > 1) {
|
||||||
@ -4081,6 +4084,7 @@ export class PlayerPokemon extends Pokemon {
|
|||||||
newPokemon.metLevel = this.metLevel;
|
newPokemon.metLevel = this.metLevel;
|
||||||
newPokemon.metBiome = this.metBiome;
|
newPokemon.metBiome = this.metBiome;
|
||||||
newPokemon.metSpecies = this.metSpecies;
|
newPokemon.metSpecies = this.metSpecies;
|
||||||
|
newPokemon.metWave = this.metWave;
|
||||||
newPokemon.fusionSpecies = this.fusionSpecies;
|
newPokemon.fusionSpecies = this.fusionSpecies;
|
||||||
newPokemon.fusionFormIndex = this.fusionFormIndex;
|
newPokemon.fusionFormIndex = this.fusionFormIndex;
|
||||||
newPokemon.fusionAbilityIndex = this.fusionAbilityIndex;
|
newPokemon.fusionAbilityIndex = this.fusionAbilityIndex;
|
||||||
@ -4088,6 +4092,7 @@ export class PlayerPokemon extends Pokemon {
|
|||||||
newPokemon.fusionVariant = this.fusionVariant;
|
newPokemon.fusionVariant = this.fusionVariant;
|
||||||
newPokemon.fusionGender = this.fusionGender;
|
newPokemon.fusionGender = this.fusionGender;
|
||||||
newPokemon.fusionLuck = this.fusionLuck;
|
newPokemon.fusionLuck = this.fusionLuck;
|
||||||
|
newPokemon.usedTMs = this.usedTMs;
|
||||||
|
|
||||||
this.scene.getParty().push(newPokemon);
|
this.scene.getParty().push(newPokemon);
|
||||||
newPokemon.evolve((!isFusion ? newEvolution : new FusionSpeciesFormEvolution(this.id, newEvolution)), evoSpecies);
|
newPokemon.evolve((!isFusion ? newEvolution : new FusionSpeciesFormEvolution(this.id, newEvolution)), evoSpecies);
|
||||||
@ -4779,6 +4784,7 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
this.pokeball = pokeballType;
|
this.pokeball = pokeballType;
|
||||||
this.metLevel = this.level;
|
this.metLevel = this.level;
|
||||||
this.metBiome = this.scene.arena.biomeType;
|
this.metBiome = this.scene.arena.biomeType;
|
||||||
|
this.metWave = this.scene.currentBattle.waveIndex;
|
||||||
this.metSpecies = this.species.speciesId;
|
this.metSpecies = this.species.speciesId;
|
||||||
const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.variant, this.ivs, this.nature, this);
|
const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.variant, this.ivs, this.nature, this);
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"memoString": "{{natureFragment}} nature,\n{{metFragment}}",
|
"memoString": "{{natureFragment}} nature,\n{{metFragment}}",
|
||||||
"metFragment": {
|
"metFragment": {
|
||||||
"normal": "met at Lv{{level}},\n{{biome}}.",
|
"normal": "met at Lv{{level}},\n{{biome}}, Wave {{wave}}.",
|
||||||
"apparently": "apparently met at Lv{{level}},\n{{biome}}."
|
"apparently": "apparently met at Lv{{level}},\n{{biome}}."
|
||||||
},
|
},
|
||||||
"natureFragment": {
|
"natureFragment": {
|
||||||
|
@ -38,8 +38,9 @@ export default class PokemonData {
|
|||||||
public status: Status | null;
|
public status: Status | null;
|
||||||
public friendship: integer;
|
public friendship: integer;
|
||||||
public metLevel: integer;
|
public metLevel: integer;
|
||||||
public metBiome: Biome | -1;
|
public metBiome: Biome | -1; // -1 for starters
|
||||||
public metSpecies: Species;
|
public metSpecies: Species;
|
||||||
|
public metWave: integer; // 0 for unknown (previous saves), -1 for starters
|
||||||
public luck: integer;
|
public luck: integer;
|
||||||
public pauseEvolutions: boolean;
|
public pauseEvolutions: boolean;
|
||||||
public pokerus: boolean;
|
public pokerus: boolean;
|
||||||
@ -90,14 +91,14 @@ export default class PokemonData {
|
|||||||
this.metLevel = source.metLevel || 5;
|
this.metLevel = source.metLevel || 5;
|
||||||
this.metBiome = source.metBiome !== undefined ? source.metBiome : -1;
|
this.metBiome = source.metBiome !== undefined ? source.metBiome : -1;
|
||||||
this.metSpecies = source.metSpecies;
|
this.metSpecies = source.metSpecies;
|
||||||
|
this.metWave = source.metWave !== undefined ? source.metWave : 0;
|
||||||
this.luck = source.luck !== undefined ? source.luck : (source.shiny ? (source.variant + 1) : 0);
|
this.luck = source.luck !== undefined ? source.luck : (source.shiny ? (source.variant + 1) : 0);
|
||||||
if (!forHistory) {
|
if (!forHistory) {
|
||||||
this.pauseEvolutions = !!source.pauseEvolutions;
|
this.pauseEvolutions = !!source.pauseEvolutions;
|
||||||
|
this.evoCounter = source.evoCounter ?? 0;
|
||||||
}
|
}
|
||||||
this.pokerus = !!source.pokerus;
|
this.pokerus = !!source.pokerus;
|
||||||
|
|
||||||
this.evoCounter = source.evoCounter ?? 0;
|
|
||||||
|
|
||||||
this.fusionSpecies = sourcePokemon ? sourcePokemon.fusionSpecies?.speciesId : source.fusionSpecies;
|
this.fusionSpecies = sourcePokemon ? sourcePokemon.fusionSpecies?.speciesId : source.fusionSpecies;
|
||||||
this.fusionFormIndex = source.fusionFormIndex;
|
this.fusionFormIndex = source.fusionFormIndex;
|
||||||
this.fusionAbilityIndex = source.fusionAbilityIndex;
|
this.fusionAbilityIndex = source.fusionAbilityIndex;
|
||||||
|
@ -824,6 +824,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
metFragment: i18next.t(`pokemonSummary:metFragment.${this.pokemon?.metBiome === -1? "apparently": "normal"}`, {
|
metFragment: i18next.t(`pokemonSummary:metFragment.${this.pokemon?.metBiome === -1? "apparently": "normal"}`, {
|
||||||
biome: `${getBBCodeFrag(getBiomeName(this.pokemon?.metBiome!), TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct?
|
biome: `${getBBCodeFrag(getBiomeName(this.pokemon?.metBiome!), TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct?
|
||||||
level: `${getBBCodeFrag(this.pokemon?.metLevel.toString()!, TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct?
|
level: `${getBBCodeFrag(this.pokemon?.metLevel.toString()!, TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct?
|
||||||
|
wave: `${getBBCodeFrag((this.pokemon?.metWave ? this.pokemon.metWave.toString()! : i18next.t("pokemonSummary:unknownTrainer")), TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct?
|
||||||
}),
|
}),
|
||||||
natureFragment: i18next.t(`pokemonSummary:natureFragment.${rawNature}`, { nature: nature })
|
natureFragment: i18next.t(`pokemonSummary:natureFragment.${rawNature}`, { nature: nature })
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user