From 3753ea73be9522d038c375a0191ba482f4df1d05 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 24 Apr 2023 22:32:12 -0400 Subject: [PATCH] Fix some bugs --- public/battle-anims/overheat.json | 4 ++-- .../images/battle_anims/GEN8- Doom Desire.png | Bin 6333 -> 1333 bytes src/battle-phases.ts | 5 +++-- src/battle-scene.ts | 5 ++--- src/data/battle-anims.ts | 2 +- src/pokemon.ts | 2 +- src/ui/starter-select-ui-handler.ts | 12 ++++++++++-- 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/public/battle-anims/overheat.json b/public/battle-anims/overheat.json index d2ae4b11953..6177194ddaa 100644 --- a/public/battle-anims/overheat.json +++ b/public/battle-anims/overheat.json @@ -4674,7 +4674,7 @@ }, { "frameIndex": 12, - "resourceName": "Overheat1.ogg", + "resourceName": "PRSFX- Overheat1.wav", "volume": 100, "pitch": 100, "eventType": "AnimTimedSoundEvent" @@ -9398,7 +9398,7 @@ }, { "frameIndex": 12, - "resourceName": "Overheat1.ogg", + "resourceName": "PRSFX- Overheat1.wav", "volume": 100, "pitch": 100, "eventType": "AnimTimedSoundEvent" diff --git a/public/images/battle_anims/GEN8- Doom Desire.png b/public/images/battle_anims/GEN8- Doom Desire.png index 0fd86ff8dd8217abdd26fc3e8c1c675ffbde3d1b..4037e4364425c55651837d6eb804a3681a4eea98 100644 GIT binary patch literal 1333 zcmchX|5MTj7{_TEAJYWJN{vKhHM_XH^fG6ZWReRf3a25}nLCPH#6B2 z=wjl7heZ9+SU&W`*eWR)t$+HaHhk+~h|4?{LqebocUZn5s*ony&7LT-pWVJ_^3vUncNNogCD@Z)2Qxo6 ztjnx9N>Ytk7q*wsdU*D0UG8v zAcNbq6?vVCo)IbKV&rP09i)n3BBffx%yZNoU<(-Bee9S*QlJnS~@y;KsqqL zQz=qTFI5%#X_$VRo9SpM9k4?+*apw&8yc`?Xr#zBAnj2z^X@R0snk^oR;8fx{TIc= z{G1xP{S86SyZ6??6Gy*l-296vG$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h>cG5Jk`#j@=wy{*-qiAzlR6F%~ZqKT+A5rccE5t91KWCN33Q?`eFS-Kdo`L{e#Q;b<6(N6<5{ zyd^rAWjY5T=kN@+e6lY@53KHA-Kbv^z=jvjfc)3=Z>%eRd24y$l}EXVsE>bYpKlL> z*S1kCbW56q`;o!HlFk5#IB4Qs~v*(zG^tZQZ{Q4`)4v+bVwXmxtGMB*k@ zVIkBbG9{vP%ZXgsL8byyKk4DDmvgRZV4wNg7VJaCH@>M=Q&E?c$&hbSMrWGp5-tkf zs3vKd6<@fou%^)X#KpJ*;}YYIDk?+K)lX4r_G&8qsdRrSJGXM^C59T&btrZDj)6IH za%uFmfs(m$KI*bd;l^nX6y*G=9=5LP9_q42@Kw>rlYsMcA X%eb|L`S+lA5tuW@g?wVw=J@{s@5b<> diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 496b8a8537c..4a860803674 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -559,7 +559,7 @@ export class CommandPhase extends BattlePhase { }, null, true); break; case Command.RUN: - //this.scene.unshiftPhase(new MoveAnimTestPhase(this.scene, [ Moves.SEISMIC_TOSS ])); + //this.scene.unshiftPhase(new MoveAnimTestPhase(this.scene)); //success = true; break; } @@ -1048,7 +1048,8 @@ export class MoveAnimTestPhase extends BattlePhase { if (moveId === undefined) { this.playMoveAnim(this.moveQueue.slice(0), true); return; - } + } else if (player) + console.log(Moves[moveId]); initMoveAnim(moveId).then(() => { loadMoveAnimAssets(this.scene, [ moveId ], true) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index cf31fa30444..39f5d41374e 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1,6 +1,6 @@ import Phaser from 'phaser'; import { Biome } from './data/biome'; -import UI, { Mode } from './ui/ui'; +import UI from './ui/ui'; import { EncounterPhase, SummonPhase, CommandPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, SelectStarterPhase, MessagePhase } from './battle-phases'; import Pokemon, { PlayerPokemon, EnemyPokemon } from './pokemon'; import PokemonSpecies, { allSpecies, getPokemonSpecies } from './data/pokemon-species'; @@ -384,8 +384,6 @@ export default class BattleScene extends Phaser.Scene { ]).then(() => { if (enableAuto) initAutoPlay.apply(this); - - this.pokeballCounts[PokeballType.POKEBALL] += 5; this.newBattle(); @@ -444,6 +442,7 @@ export default class BattleScene extends Phaser.Scene { reset(): void { this.pokeballCounts = Object.fromEntries(Utils.getEnumValues(PokeballType).filter(p => p <= PokeballType.MASTER_BALL).map(t => [ t, 0 ])); + this.pokeballCounts[PokeballType.POKEBALL] += 5; this.modifiers = []; this.enemyModifiers = []; diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index 446c86ef1ac..ba9b184e066 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -557,7 +557,7 @@ export abstract class BattleAnim { let xOffset = (!isReverseCoords ? (userInitialX - targetInitialX) : (targetInitialX - userInitialX)); let yOffset = (!isReverseCoords ? (userInitialY - targetInitialY) : (targetInitialY - userInitialY)); const ySpriteOffset = ((userHalfHeight * (1 - xProgress)) + (targetHalfHeight * xProgress)) * -1; - const globalXOffset = !isGlobal ? 0 : -114; + const globalXOffset = 0;//!isGlobal ? 0 : -114; const globalYOffset = 0; if (isGlobal) { xOffset -= ((scene.game.canvas.width / 6) * 0.25) / 2; diff --git a/src/pokemon.ts b/src/pokemon.ts index a8690f76631..791fd761acc 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -296,7 +296,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { value = Math.min(value + this.level + 10, 99999); if (this.hp > value || this.hp === undefined) this.hp = value; - else { + else if (this.hp) { const lastMaxHp = this.getMaxHp(); if (lastMaxHp && value > lastMaxHp) this.hp += value - lastMaxHp; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 703357671ad..dddf1bd02ed 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -136,8 +136,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { icon.setScale(0.5); icon.setOrigin(0, 0); icon.play(species.getIconKey(dexEntry?.female, dexEntry?.formIndex)).stop(); - if (!dexEntry) - icon.setTintFill(0); + icon.setTintFill(0); this.starterSelectGenIconContainers[g].add(icon); s++; } @@ -184,6 +183,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler { if (args.length >= 1 && args[0] instanceof Function) { super.show(args); + for (let g = 0; g < this.genSpecies.length; g++) { + this.genSpecies[g].forEach((species, s) => { + const dexEntry = this.scene.gameData.getDefaultDexEntry(species); + const icon = this.starterSelectGenIconContainers[g].getAt(s) as Phaser.GameObjects.Sprite; + if (dexEntry) + icon.clearTint(); + }); + } + this.starterSelectCallback = args[0] as StarterSelectCallback; this.starterSelectContainer.setVisible(true);