Some minor bug fixes

This commit is contained in:
Flashfyre 2023-04-12 21:44:12 -04:00
parent 6397a10998
commit 53d62056d2
3 changed files with 7 additions and 5 deletions

View File

@ -28,7 +28,7 @@ export class SelectStarterPhase extends BattlePhase {
start() {
super.start();
this.scene.sound.play('menu');
this.scene.sound.play('menu', { loop: true });
this.scene.ui.setMode(Mode.STARTER_SELECT, (starterSpecies: PokemonSpecies[]) => {
const party = this.scene.getParty();
@ -747,7 +747,7 @@ export class StatChangePhase extends PokemonPhase {
pokemon.enableMask();
const pokemonMaskSprite = pokemon.maskSprite;
const statSprite = this.scene.add.tileSprite((this.player ? 106 : 236) * 6, ((this.player ? 148 : 84) + (this.levels >= 1 ? 160 : 0)) * 6, 128, 288, 'battle_stats', this.stats.length > 1 ? 'mix' : BattleStat[this.stats[0]].toLowerCase());
const statSprite = this.scene.add.tileSprite((this.player ? 106 : 236) * 6, ((this.player ? 148 : 84) + (this.levels >= 1 ? 160 : 0)) * 6, 156, 316, 'battle_stats', this.stats.length > 1 ? 'mix' : BattleStat[this.stats[0]].toLowerCase());
statSprite.setAlpha(0);
statSprite.setScale(6);
statSprite.setOrigin(0.5, 1);

View File

@ -51,6 +51,8 @@ export default class FightUiHandler extends UiHandler {
if (button === Button.ACTION) {
if (((this.scene as BattleScene).getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, this.cursor))
success = true;
else
ui.playError();
} else {
ui.setMode(Mode.COMMAND);
success = true;

View File

@ -56,9 +56,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.pokemonNumberText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonNumberText);
this.pokemonSprite = this.scene.add.sprite(53, 63, `pkmn__sub`);
this.starterSelectContainer.add(this.pokemonSprite);
this.pokemonNameText = addTextObject(this.scene, 6, 112, '', TextStyle.SUMMARY);
this.pokemonNameText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonNameText);
@ -133,6 +130,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
return icon;
});
this.pokemonSprite = this.scene.add.sprite(53, 63, `pkmn__sub`);
this.starterSelectContainer.add(this.pokemonSprite);
this.starterSelectMessageBoxContainer = this.scene.add.container(0, this.scene.game.canvas.height / 6);
this.starterSelectMessageBoxContainer.setVisible(false);
this.starterSelectContainer.add(this.starterSelectMessageBoxContainer);