Add WiP logic for daily run and fix some performance issues
This commit is contained in:
1 parent
eab1ba7ab9
commit
81f9e2da36
22 files changed
+213
-70
No files matched your search
@@ -185,7 +185,7 @@ export default class AchvsUiHandler extends MessageUiHandler {
|
||||
let updateAchv = ret;
|
||||
|
||||
if (!this.cursorObj) {
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'starter_select_cursor_highlight', null, 16, 16, 1, 1, 1, 1);
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'select_cursor_highlight', null, 16, 16, 1, 1, 1, 1);
|
||||
this.cursorObj.setOrigin(0, 0);
|
||||
this.achvIconsContainer.add(this.cursorObj);
|
||||
updateAchv = true;
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class EggListUiHandler extends MessageUiHandler {
|
||||
this.eggListIconContainer = this.scene.add.container(115, 9);
|
||||
this.eggListContainer.add(this.eggListIconContainer);
|
||||
|
||||
this.cursorObj = this.scene.add.image(0, 0, 'starter_select_cursor');
|
||||
this.cursorObj = this.scene.add.image(0, 0, 'select_cursor');
|
||||
this.cursorObj.setOrigin(0, 0);
|
||||
this.eggListContainer.add(this.cursorObj);
|
||||
|
||||
|
||||
@@ -70,9 +70,11 @@ const displayStats: DisplayStats = {
|
||||
return `${caughtCount} (${Math.floor((caughtCount / dexKeys.length) * 1000) / 10}%)`;
|
||||
}
|
||||
},
|
||||
classicSessionsPlayed: 'Runs (Classic)',
|
||||
sessionsWon: 'Wins (Classic)',
|
||||
endlessSessionsPlayed: 'Runs (Endless)?',
|
||||
classicSessionsPlayed: 'Classic Runs',
|
||||
sessionsWon: 'Classic Wins',
|
||||
dailyRunSessionsPlayed: 'Daily Run Attempts',
|
||||
dailyRunSessionsWon: 'Daily Run Wins',
|
||||
endlessSessionsPlayed: 'Endless Runs?',
|
||||
highestEndlessWave: 'Highest Wave (Endless)?',
|
||||
highestMoney: 'Highest Money',
|
||||
highestDamage: 'Highest Damage',
|
||||
|
||||
@@ -172,7 +172,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler {
|
||||
let changed = super.setCursor(cursor);
|
||||
|
||||
if (!this.cursorObj) {
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'starter_select_cursor_highlight', null, 296, 44, 1, 1, 1, 1);
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'select_cursor_highlight_thick', null, 296, 44, 2, 2, 2, 2);
|
||||
this.cursorObj.setOrigin(0, 0);
|
||||
this.sessionSlotsContainer.add(this.cursorObj);
|
||||
}
|
||||
@@ -254,6 +254,8 @@ class SessionSlot extends Phaser.GameObjects.Container {
|
||||
iconContainer.add(text);
|
||||
|
||||
pokemonIconsContainer.add(iconContainer);
|
||||
|
||||
pokemon.destroy();
|
||||
});
|
||||
|
||||
this.add(pokemonIconsContainer);
|
||||
|
||||
@@ -156,7 +156,7 @@ export default class SettingsUiHandler extends UiHandler {
|
||||
const ret = super.setCursor(cursor);
|
||||
|
||||
if (!this.cursorObj) {
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'starter_select_cursor_highlight', null, (this.scene.game.canvas.width / 6) - 10, 16, 1, 1, 1, 1);
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'select_cursor_highlight', null, (this.scene.game.canvas.width / 6) - 10, 16, 1, 1, 1, 1);
|
||||
this.cursorObj.setOrigin(0, 0);
|
||||
this.optionsContainer.add(this.cursorObj);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface Starter {
|
||||
species: PokemonSpecies;
|
||||
dexAttr: bigint;
|
||||
nature: Nature;
|
||||
moveset: StarterMoveset;
|
||||
moveset?: StarterMoveset;
|
||||
pokerus: boolean;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
});
|
||||
|
||||
this.pokerusCursorObjs = new Array(3).fill(null).map(() => {
|
||||
const cursorObj = this.scene.add.image(0, 0, 'starter_select_cursor_pokerus');
|
||||
const cursorObj = this.scene.add.image(0, 0, 'select_cursor_pokerus');
|
||||
cursorObj.setVisible(false);
|
||||
cursorObj.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(cursorObj);
|
||||
@@ -222,22 +222,22 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
});
|
||||
|
||||
this.starterCursorObjs = new Array(6).fill(null).map(() => {
|
||||
const cursorObj = this.scene.add.image(0, 0, 'starter_select_cursor_highlight');
|
||||
const cursorObj = this.scene.add.image(0, 0, 'select_cursor_highlight');
|
||||
cursorObj.setVisible(false);
|
||||
cursorObj.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(cursorObj);
|
||||
return cursorObj;
|
||||
});
|
||||
|
||||
this.cursorObj = this.scene.add.image(0, 0, 'starter_select_cursor');
|
||||
this.cursorObj = this.scene.add.image(0, 0, 'select_cursor');
|
||||
this.cursorObj.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.cursorObj);
|
||||
|
||||
this.genCursorHighlightObj = this.scene.add.image(111, 5, 'starter_select_gen_cursor_highlight');
|
||||
this.genCursorHighlightObj = this.scene.add.image(111, 5, 'select_gen_cursor_highlight');
|
||||
this.genCursorHighlightObj.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.genCursorHighlightObj);
|
||||
|
||||
this.genCursorObj = this.scene.add.image(111, 5, 'starter_select_gen_cursor');
|
||||
this.genCursorObj = this.scene.add.image(111, 5, 'select_gen_cursor');
|
||||
this.genCursorObj.setVisible(false);
|
||||
this.genCursorObj.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.genCursorObj);
|
||||
@@ -250,7 +250,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
startLabel.setOrigin(0.5, 0);
|
||||
this.starterSelectContainer.add(startLabel);
|
||||
|
||||
this.startCursorObj = this.scene.add.nineslice(111, 160, 'starter_select_cursor', null, 26, 15, 1, 1, 1, 1);
|
||||
this.startCursorObj = this.scene.add.nineslice(111, 160, 'select_cursor', null, 26, 15, 1, 1, 1, 1);
|
||||
this.startCursorObj.setVisible(false);
|
||||
this.startCursorObj.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.startCursorObj);
|
||||
@@ -1212,6 +1212,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
ui.setModeWithoutClear(Mode.CONFIRM, () => {
|
||||
const startRun = (gameMode: GameModes) => {
|
||||
this.scene.gameMode = gameModes[gameMode];
|
||||
this.scene.money = this.scene.gameMode.getStartingMoney();
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
const thisObj = this;
|
||||
const originalStarterSelectCallback = this.starterSelectCallback;
|
||||
|
||||
@@ -183,7 +183,7 @@ export default class VouchersUiHandler extends MessageUiHandler {
|
||||
let updateVoucher = ret;
|
||||
|
||||
if (!this.cursorObj) {
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'starter_select_cursor_highlight', null, 16, 16, 1, 1, 1, 1);
|
||||
this.cursorObj = this.scene.add.nineslice(0, 0, 'select_cursor_highlight', null, 16, 16, 1, 1, 1, 1);
|
||||
this.cursorObj.setOrigin(0, 0);
|
||||
this.voucherIconsContainer.add(this.cursorObj);
|
||||
updateVoucher = true;
|
||||
|
||||
Reference in new issue
Block a user