[Enhancement] Add Met Wave to Pokemon Data (#4271)
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>
This commit is contained in:
parent
009fd3fc5c
commit
3ed2c74f38
|
@ -95,6 +95,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
public metLevel: integer;
|
||||
public metBiome: Biome | -1;
|
||||
public metSpecies: Species;
|
||||
public metWave: number;
|
||||
public luck: integer;
|
||||
public pauseEvolutions: boolean;
|
||||
public pokerus: boolean;
|
||||
|
@ -194,6 +195,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
this.luck = dataSource.luck;
|
||||
this.metBiome = dataSource.metBiome;
|
||||
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.pokerus = !!dataSource.pokerus;
|
||||
this.evoCounter = dataSource.evoCounter ?? 0;
|
||||
|
@ -240,6 +242,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
this.metLevel = level;
|
||||
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
|
||||
this.metSpecies = species.speciesId;
|
||||
this.metWave = scene.currentBattle ? scene.currentBattle.waveIndex : -1;
|
||||
this.pokerus = false;
|
||||
|
||||
if (level > 1) {
|
||||
|
@ -4081,6 +4084,7 @@ export class PlayerPokemon extends Pokemon {
|
|||
newPokemon.metLevel = this.metLevel;
|
||||
newPokemon.metBiome = this.metBiome;
|
||||
newPokemon.metSpecies = this.metSpecies;
|
||||
newPokemon.metWave = this.metWave;
|
||||
newPokemon.fusionSpecies = this.fusionSpecies;
|
||||
newPokemon.fusionFormIndex = this.fusionFormIndex;
|
||||
newPokemon.fusionAbilityIndex = this.fusionAbilityIndex;
|
||||
|
@ -4088,6 +4092,7 @@ export class PlayerPokemon extends Pokemon {
|
|||
newPokemon.fusionVariant = this.fusionVariant;
|
||||
newPokemon.fusionGender = this.fusionGender;
|
||||
newPokemon.fusionLuck = this.fusionLuck;
|
||||
newPokemon.usedTMs = this.usedTMs;
|
||||
|
||||
this.scene.getParty().push(newPokemon);
|
||||
newPokemon.evolve((!isFusion ? newEvolution : new FusionSpeciesFormEvolution(this.id, newEvolution)), evoSpecies);
|
||||
|
@ -4779,6 +4784,7 @@ export class EnemyPokemon extends Pokemon {
|
|||
this.pokeball = pokeballType;
|
||||
this.metLevel = this.level;
|
||||
this.metBiome = this.scene.arena.biomeType;
|
||||
this.metWave = this.scene.currentBattle.waveIndex;
|
||||
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);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "Abbrechen",
|
||||
"memoString": "Wesen: {{natureFragment}}\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "Herkunft: {{biome}}\nMit Lv. {{level}} erhalten.",
|
||||
"normal": "Herkunft: {{biome}} - Welle {{wave}}\nMit Lv. {{level}} erhalten.",
|
||||
"apparently": "Herkunft: {{biome}}\nOffenbar mit Lv. {{level}} erhalten."
|
||||
},
|
||||
"natureFragment": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "Cancel",
|
||||
"memoString": "{{natureFragment}} nature,\n{{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}}."
|
||||
},
|
||||
"natureFragment": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "Salir",
|
||||
"memoString": "Naturaleza {{natureFragment}},\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "encontrado al Nv. {{level}},\n{{biome}}.",
|
||||
"normal": "encontrado al Nv. {{level}},\n{{biome}}, Oleada {{wave}}.",
|
||||
"apparently": "aparentemente encontrado al Nv. {{level}},\n{{biome}}."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "Annuler",
|
||||
"memoString": "{{natureFragment}} de nature,\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "rencontré au N.{{level}},\n{{biome}}.",
|
||||
"normal": "rencontré au N.{{level}},\n{{biome}}, Vague {{wave}}.",
|
||||
"apparently": "apparemment rencontré au N.{{level}},\n{{biome}}."
|
||||
},
|
||||
"natureFragment": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "Annulla",
|
||||
"memoString": "Natura {{natureFragment}},\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "incontrato al Lv.{{level}},\n{{biome}}.",
|
||||
"normal": "incontrato al Lv.{{level}},\n{{biome}}, Onda {{wave}}.",
|
||||
"apparently": "apparentemente incontrato al Lv.{{level}},\n{{biome}}."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "キャンセル",
|
||||
"memoString": "{{natureFragment}}な性格。\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "{{biome}}で\nLv.{{level}}の時に出会った。",
|
||||
"normal": "ラウンド{{wave}}に{{biome}}で\nLv.{{level}}の時に出会った。",
|
||||
"apparently": "{{biome}}で\nLv.{{level}}の時に出会ったようだ。"
|
||||
},
|
||||
"natureFragment": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "그만둔다",
|
||||
"memoString": "{{natureFragment}}.\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "{{biome}}에서\n레벨 {{level}}일 때 만났다.",
|
||||
"normal": "{{biome}}에서 웨이브{{wave}},\n레벨 {{level}}일 때 만났다.",
|
||||
"apparently": "{{biome}}에서\n레벨 {{level}}일 때 만난 것 같다."
|
||||
},
|
||||
"natureFragment": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"cancel": "Cancelar",
|
||||
"memoString": "Natureza {{natureFragment}},\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "encontrado no Nv.{{level}},\n{{biome}}.",
|
||||
"normal": "encontrado no Nv.{{level}},\n{{biome}}, Onda {{wave}}.",
|
||||
"apparently": "aparentemente encontrado no Nv.{{level}},\n{{biome}}."
|
||||
},
|
||||
"natureFragment": {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
"memoString": "{{natureFragment}} 性格,\n{{metFragment}}",
|
||||
"metFragment": {
|
||||
"normal": "met at Lv{{level}},\n{{biome}}.",
|
||||
"normal": "met at Lv{{level}},\n{{biome}}, Wave {{wave}}.",
|
||||
"apparently": "命中注定般地相遇于Lv.{{level}},\n{{biome}}。"
|
||||
},
|
||||
"natureFragment": {
|
||||
|
|
|
@ -38,8 +38,9 @@ export default class PokemonData {
|
|||
public status: Status | null;
|
||||
public friendship: integer;
|
||||
public metLevel: integer;
|
||||
public metBiome: Biome | -1;
|
||||
public metBiome: Biome | -1; // -1 for starters
|
||||
public metSpecies: Species;
|
||||
public metWave: number; // 0 for unknown (previous saves), -1 for starters
|
||||
public luck: integer;
|
||||
public pauseEvolutions: boolean;
|
||||
public pokerus: boolean;
|
||||
|
@ -90,14 +91,14 @@ export default class PokemonData {
|
|||
this.metLevel = source.metLevel || 5;
|
||||
this.metBiome = source.metBiome !== undefined ? source.metBiome : -1;
|
||||
this.metSpecies = source.metSpecies;
|
||||
this.metWave = source.metWave ?? (this.metBiome === -1 ? -1 : 0);
|
||||
this.luck = source.luck !== undefined ? source.luck : (source.shiny ? (source.variant + 1) : 0);
|
||||
if (!forHistory) {
|
||||
this.pauseEvolutions = !!source.pauseEvolutions;
|
||||
this.evoCounter = source.evoCounter ?? 0;
|
||||
}
|
||||
this.pokerus = !!source.pokerus;
|
||||
|
||||
this.evoCounter = source.evoCounter ?? 0;
|
||||
|
||||
this.fusionSpecies = sourcePokemon ? sourcePokemon.fusionSpecies?.speciesId : source.fusionSpecies;
|
||||
this.fusionFormIndex = source.fusionFormIndex;
|
||||
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"}`, {
|
||||
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?
|
||||
wave: `${getBBCodeFrag((this.pokemon?.metWave ? this.pokemon.metWave.toString()! : i18next.t("pokemonSummary:unknownTrainer")), TextStyle.SUMMARY_RED)}${closeFragment}`,
|
||||
}),
|
||||
natureFragment: i18next.t(`pokemonSummary:natureFragment.${rawNature}`, { nature: nature })
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue