mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 23:32:19 +02:00
Merge branch 'beta' into keybind-migrator
This commit is contained in:
commit
f6004da37e
BIN
public/images/ui/cursor_tera.png
Normal file
BIN
public/images/ui/cursor_tera.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 B |
BIN
public/images/ui/legacy/cursor_tera.png
Normal file
BIN
public/images/ui/legacy/cursor_tera.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 262 B |
@ -101,6 +101,7 @@ export class LoadingScene extends SceneBase {
|
||||
this.loadImage("icon_lock", "ui", "icon_lock.png");
|
||||
this.loadImage("icon_stop", "ui", "icon_stop.png");
|
||||
this.loadImage("icon_tera", "ui");
|
||||
this.loadImage("cursor_tera", "ui");
|
||||
this.loadImage("type_tera", "ui");
|
||||
this.loadAtlas("type_bgs", "ui");
|
||||
this.loadAtlas("button_tera", "ui");
|
||||
|
@ -1,8 +1,29 @@
|
||||
import { getPokemonSpeciesForm } from "#app/data/pokemon-species";
|
||||
import type { SessionSaveData } from "#app/system/game-data";
|
||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import { DexAttr, type SessionSaveData, type SystemSaveData } from "#app/system/game-data";
|
||||
import * as Utils from "#app/utils";
|
||||
|
||||
export const systemMigrators = [] as const;
|
||||
export const systemMigrators = [
|
||||
/**
|
||||
* If a starter is caught, but the only forms registered as caught are not starterSelectable,
|
||||
* unlock the default form.
|
||||
* @param data {@linkcode SystemSaveData}
|
||||
*/
|
||||
function migrateUnselectableForms(data: SystemSaveData) {
|
||||
if (data.starterData && data.dexData) {
|
||||
Object.keys(data.starterData).forEach(sd => {
|
||||
const caughtAttr = data.dexData[sd]?.caughtAttr;
|
||||
const species = getPokemonSpecies(Number(sd));
|
||||
if (caughtAttr && species.forms?.length > 1) {
|
||||
const selectableForms = species.forms.filter((form, formIndex) => form.isStarterSelectable && (caughtAttr & globalScene.gameData.getFormAttr(formIndex)));
|
||||
if (selectableForms.length === 0) {
|
||||
data.dexData[sd].caughtAttr += DexAttr.DEFAULT_FORM;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
] as const;
|
||||
|
||||
export const settingsMigrators = [] as const;
|
||||
|
||||
|
@ -226,7 +226,9 @@ export default class FightUiHandler extends UiHandler implements InfoToggle {
|
||||
}
|
||||
|
||||
if (!this.cursorObj) {
|
||||
this.cursorObj = globalScene.add.image(0, 0, "cursor");
|
||||
const isTera = this.fromCommand === Command.TERA;
|
||||
this.cursorObj = globalScene.add.image(0, 0, isTera ? "cursor_tera" : "cursor");
|
||||
this.cursorObj.setScale(isTera ? 0.7 : 1);
|
||||
ui.add(this.cursorObj);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user