hotfix egg descrptions
This commit is contained in:
parent
eb224381a6
commit
6c0602b3f8
|
@ -253,14 +253,14 @@ export class Egg {
|
|||
|
||||
public getEggTypeDescriptor(scene: BattleScene): string {
|
||||
switch (this.sourceType) {
|
||||
case EggSourceType.GACHA_LEGENDARY:
|
||||
return `${i18next.t("egg:gachaTypeLegendary")} (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, this.timestamp)).getName()})`;
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
return i18next.t("egg:gachaTypeMove");
|
||||
case EggSourceType.GACHA_SHINY:
|
||||
return i18next.t("egg:gachaTypeShiny");
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
return i18next.t("egg:sameSpeciesEgg", { species: getPokemonSpecies(this._species).getName()});
|
||||
case EggSourceType.GACHA_LEGENDARY:
|
||||
return `${i18next.t("egg:gachaTypeLegendary")} (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, this.timestamp)).getName()})`;
|
||||
case EggSourceType.GACHA_SHINY:
|
||||
return i18next.t("egg:gachaTypeShiny");
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
return i18next.t("egg:gachaTypeMove");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,12 +275,12 @@ export class Egg {
|
|||
private rollEggMoveIndex() {
|
||||
let baseChance = DEFAULT_RARE_EGGMOVE_RATE;
|
||||
switch (this._sourceType) {
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
baseChance = GACHA_MOVE_UP_RARE_EGGMOVE_RATE;
|
||||
break;
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
baseChance = SAME_SPECIES_EGG_RARE_EGGMOVE_RATE;
|
||||
break;
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
baseChance = GACHA_MOVE_UP_RARE_EGGMOVE_RATE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export default class EggData {
|
|||
const sourceEgg = source instanceof Egg ? source as Egg : null;
|
||||
this.id = sourceEgg ? sourceEgg.id : source.id;
|
||||
this.tier = sourceEgg ? sourceEgg.tier : (source.tier ?? Math.floor(this.id / EGG_SEED));
|
||||
this.sourceType = sourceEgg ? sourceEgg.sourceType : (source.gachaType ?? source.sourceType);
|
||||
this.sourceType = !source.species ? source.gachaType : sourceEgg ? sourceEgg.sourceType : (source.gachaType ?? source.sourceType);
|
||||
this.hatchWaves = sourceEgg ? sourceEgg.hatchWaves : source.hatchWaves;
|
||||
this.timestamp = sourceEgg ? sourceEgg.timestamp : source.timestamp;
|
||||
this.variantTier = sourceEgg ? sourceEgg.variantTier : source.variantTier;
|
||||
|
|
Loading…
Reference in New Issue