mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Merge branch 'hotfix-1.9.1' of https://github.com/pagefaultgames/pokerogue into chrcdtfx
This commit is contained in:
commit
58629be5f2
@ -91,8 +91,8 @@ export default class PokemonData {
|
||||
this.formIndex = Math.max(Math.min(source.formIndex, getPokemonSpecies(this.species).forms.length - 1), 0);
|
||||
this.abilityIndex = source.abilityIndex;
|
||||
this.passive = source.passive;
|
||||
this.shiny = sourcePokemon?.isShiny() ?? source.shiny;
|
||||
this.variant = sourcePokemon?.getVariant() ?? source.variant;
|
||||
this.shiny = source.shiny;
|
||||
this.variant = source.variant;
|
||||
this.pokeball = source.pokeball ?? PokeballType.POKEBALL;
|
||||
this.level = source.level;
|
||||
this.exp = source.exp;
|
||||
|
@ -873,6 +873,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
const tweenChain: Phaser.Types.Tweens.TweenChainBuilderConfig = {
|
||||
targets: icon,
|
||||
loop: -1,
|
||||
paused: startPaused,
|
||||
// Make the initial bounce a little randomly delayed
|
||||
delay: randIntRange(0, 50) * 5,
|
||||
loopDelay: 1000,
|
||||
@ -894,19 +895,14 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
],
|
||||
};
|
||||
|
||||
const isPassiveAvailable = this.isPassiveAvailable(species.speciesId);
|
||||
const isValueReductionAvailable = this.isValueReductionAvailable(species.speciesId);
|
||||
const isSameSpeciesEggAvailable = this.isSameSpeciesEggAvailable(species.speciesId);
|
||||
|
||||
// 'Passives Only' mode
|
||||
if (globalScene.candyUpgradeNotification === 1) {
|
||||
if (isPassiveAvailable) {
|
||||
globalScene.tweens.chain(tweenChain).paused = startPaused;
|
||||
}
|
||||
// 'On' mode
|
||||
} else if (globalScene.candyUpgradeNotification === 2) {
|
||||
if (isPassiveAvailable || isValueReductionAvailable || isSameSpeciesEggAvailable) {
|
||||
globalScene.tweens.chain(tweenChain).paused = startPaused;
|
||||
if (
|
||||
this.isPassiveAvailable(species.speciesId) ||
|
||||
(globalScene.candyUpgradeNotification === 2 &&
|
||||
(this.isValueReductionAvailable(species.speciesId) || this.isSameSpeciesEggAvailable(species.speciesId)))
|
||||
) {
|
||||
const chain = globalScene.tweens.chain(tweenChain);
|
||||
if (!startPaused) {
|
||||
chain.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2040,7 +2036,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
this.checkIconId(lastSpeciesIcon, container.species, props.female, props.formIndex, props.shiny, props.variant);
|
||||
this.iconAnimHandler.addOrUpdate(lastSpeciesIcon, PokemonIconAnimMode.NONE);
|
||||
// Resume the animation for the previously selected species
|
||||
globalScene.tweens.getTweensOf(lastSpeciesIcon).forEach(tween => tween.resume());
|
||||
globalScene.tweens.getTweensOf(lastSpeciesIcon).forEach(tween => tween.play());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1444,6 +1444,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
|
||||
const tweenChain: Phaser.Types.Tweens.TweenChainBuilderConfig = {
|
||||
targets: icon,
|
||||
paused: startPaused,
|
||||
loop: -1,
|
||||
// Make the initial bounce a little randomly delayed
|
||||
delay: randIntRange(0, 50) * 5,
|
||||
@ -1451,14 +1452,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
tweens: [
|
||||
{
|
||||
targets: icon,
|
||||
y: 2 - 5,
|
||||
y: "-=5",
|
||||
duration: fixedInt(125),
|
||||
ease: "Cubic.easeOut",
|
||||
yoyo: true,
|
||||
},
|
||||
{
|
||||
targets: icon,
|
||||
y: 2 - 3,
|
||||
y: "-=3",
|
||||
duration: fixedInt(150),
|
||||
ease: "Cubic.easeOut",
|
||||
yoyo: true,
|
||||
@ -1466,19 +1467,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
],
|
||||
};
|
||||
|
||||
const isPassiveAvailable = this.isPassiveAvailable(species.speciesId);
|
||||
const isValueReductionAvailable = this.isValueReductionAvailable(species.speciesId);
|
||||
const isSameSpeciesEggAvailable = this.isSameSpeciesEggAvailable(species.speciesId);
|
||||
|
||||
// 'Passives Only' mode
|
||||
if (globalScene.candyUpgradeNotification === 1) {
|
||||
if (isPassiveAvailable) {
|
||||
globalScene.tweens.chain(tweenChain).paused = startPaused;
|
||||
}
|
||||
// 'On' mode
|
||||
} else if (globalScene.candyUpgradeNotification === 2) {
|
||||
if (isPassiveAvailable || isValueReductionAvailable || isSameSpeciesEggAvailable) {
|
||||
globalScene.tweens.chain(tweenChain).paused = startPaused;
|
||||
if (
|
||||
this.isPassiveAvailable(species.speciesId) ||
|
||||
(globalScene.candyUpgradeNotification === 2 &&
|
||||
(this.isValueReductionAvailable(species.speciesId) || this.isSameSpeciesEggAvailable(species.speciesId)))
|
||||
) {
|
||||
const chain = globalScene.tweens.chain(tweenChain);
|
||||
if (!startPaused) {
|
||||
chain.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3478,7 +3474,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
|
||||
// Resume the animation for the previously selected species
|
||||
const icon = this.starterContainers[speciesIndex].icon;
|
||||
globalScene.tweens.getTweensOf(icon).forEach(tween => tween.resume());
|
||||
globalScene.tweens.getTweensOf(icon).forEach(tween => tween.play());
|
||||
}
|
||||
|
||||
this.lastSpecies = species!; // TODO: is this bang correct?
|
||||
|
Loading…
Reference in New Issue
Block a user