Fix some bugs

pull/2/head
Flashfyre 2023-06-05 11:39:49 -04:00
parent 0cc87b4ba0
commit da8629164e
3 changed files with 8 additions and 6 deletions

View File

@ -1877,10 +1877,12 @@ export class GameOverPhase extends BattlePhase {
} }
end(): void { end(): void {
if (!this.scene.gameData.unlocks[Unlockables.ENDLESS_MODE]) if (this.victory) {
this.scene.unshiftPhase(new UnlockPhase(this.scene, Unlockables.ENDLESS_MODE)); if (!this.scene.gameData.unlocks[Unlockables.ENDLESS_MODE])
if (!this.scene.gameData.unlocks[Unlockables.MINI_BLACK_HOLE]) this.scene.unshiftPhase(new UnlockPhase(this.scene, Unlockables.ENDLESS_MODE));
this.scene.unshiftPhase(new UnlockPhase(this.scene, Unlockables.MINI_BLACK_HOLE)); if (!this.scene.gameData.unlocks[Unlockables.MINI_BLACK_HOLE])
this.scene.unshiftPhase(new UnlockPhase(this.scene, Unlockables.MINI_BLACK_HOLE));
}
super.end(); super.end();
} }

View File

@ -179,7 +179,7 @@ export default class SpritePipeline extends Phaser.Renderer.WebGL.Pipelines.Mult
const baseY = (sprite.parentContainer instanceof Pokemon const baseY = (sprite.parentContainer instanceof Pokemon
? sprite.parentContainer.y ? sprite.parentContainer.y
: sprite.y + sprite.height / 2) * 6; : sprite.y + sprite.height / 2) * 6;
const bottomPadding = Math.ceil(sprite.height * 6 * 0.05); const bottomPadding = Math.ceil(sprite.height * 0.05) * 6;
const yDelta = (baseY - y1) / 6; const yDelta = (baseY - y1) / 6;
y2 = y1 = baseY + bottomPadding; y2 = y1 = baseY + bottomPadding;
const pixelHeight = (v1 - v0) / sprite.frame.height; const pixelHeight = (v1 - v0) / sprite.frame.height;

View File

@ -854,7 +854,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
frameProgress -= frameThreshold; frameProgress -= frameThreshold;
} }
const crySound = this.scene.sound.get(key); const crySound = this.scene.sound.get(key);
if (crySound) { if (crySound && !crySound.pendingRemove) {
rate *= 0.99; rate *= 0.99;
crySound.play({ crySound.play({
rate: rate, rate: rate,