Add evolution items and new modifiers

This commit is contained in:
Flashfyre committed 2023-04-14 18:21:33 -04:00
1 parent 927f17b71f
commit b11e391e7a
32 files changed
+1949 -1246

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ export default class CommandUiHandler extends UiHandler {
const messageHandler = this.getUi().getMessageHandler();
messageHandler.bg.setTexture('bg_command');
messageHandler.message.setWordWrapWidth(1110);
messageHandler.showText(`What will\n${(this.scene as BattleScene).getPlayerPokemon().name} do?`, 0);
messageHandler.showText(`What will\n${this.scene.getPlayerPokemon().name} do?`, 0);
this.setCursor(this.cursor);
}
+3 -3
View File
@@ -49,7 +49,7 @@ export default class FightUiHandler extends UiHandler {
if (button === Button.CANCEL || button === Button.ACTION) {
if (button === Button.ACTION) {
if (((this.scene as BattleScene).getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, this.cursor))
if ((this.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, this.cursor))
success = true;
else
ui.playError();
@@ -91,7 +91,7 @@ export default class FightUiHandler extends UiHandler {
ui.add(this.cursorObj);
}
const moveset = (this.scene as BattleScene).getPlayerPokemon().moveset;
const moveset = this.scene.getPlayerPokemon().moveset;
const hasMove = cursor < moveset.length;
@@ -114,7 +114,7 @@ export default class FightUiHandler extends UiHandler {
}
displayMoves() {
const moveset = (this.scene as BattleScene).getPlayerPokemon().moveset;
const moveset = this.scene.getPlayerPokemon().moveset;
for (let m = 0; m < 4; m++) {
const moveText = addTextObject(this.scene, m % 2 === 0 ? 0 : 100, m < 2 ? 0 : 16, '-', TextStyle.WINDOW);
if (m < moveset.length)
+2 -2
View File
@@ -280,7 +280,7 @@ export default class PartyUiHandler extends MessageUiHandler {
}
populatePartySlots() {
const party = (this.scene as BattleScene).getParty();
const party = this.scene.getParty();
if (this.cursor < 6 && this.cursor >= party.length)
this.cursor = party.length - 1;
@@ -289,7 +289,7 @@ export default class PartyUiHandler extends MessageUiHandler {
for (let p in party) {
const slotIndex = parseInt(p);
const partySlot = new PartySlot(this.scene as BattleScene, slotIndex, party[p]);
const partySlot = new PartySlot(this.scene, slotIndex, party[p]);
this.scene.add.existing(partySlot);
this.partySlotsContainer.add(partySlot);
this.partySlots.push(partySlot);