mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
adds the ribbon asset, hooking it up
This commit is contained in:
parent
8a54e862fc
commit
58f76d9cb8
BIN
public/images/ui/champion_ribbon.png
Normal file
BIN
public/images/ui/champion_ribbon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 192 B |
@ -68,6 +68,7 @@ export class LoadingScene extends SceneBase {
|
|||||||
this.loadImage('shiny_star_small_1', 'ui', 'shiny_small_1.png');
|
this.loadImage('shiny_star_small_1', 'ui', 'shiny_small_1.png');
|
||||||
this.loadImage('shiny_star_small_2', 'ui', 'shiny_small_2.png');
|
this.loadImage('shiny_star_small_2', 'ui', 'shiny_small_2.png');
|
||||||
this.loadImage('ha_capsule', 'ui', 'ha_capsule.png');
|
this.loadImage('ha_capsule', 'ui', 'ha_capsule.png');
|
||||||
|
this.loadImage('champion_ribbon', 'ui', 'champion_ribbon.png');
|
||||||
this.loadImage('icon_spliced', 'ui');
|
this.loadImage('icon_spliced', 'ui');
|
||||||
this.loadImage('icon_tera', 'ui');
|
this.loadImage('icon_tera', 'ui');
|
||||||
this.loadImage('type_tera', 'ui');
|
this.loadImage('type_tera', 'ui');
|
||||||
|
@ -128,6 +128,7 @@ export interface DexEntry {
|
|||||||
seenCount: integer;
|
seenCount: integer;
|
||||||
caughtCount: integer;
|
caughtCount: integer;
|
||||||
hatchedCount: integer;
|
hatchedCount: integer;
|
||||||
|
winCount: integer;
|
||||||
ivs: integer[];
|
ivs: integer[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -951,7 +952,7 @@ export class GameData {
|
|||||||
|
|
||||||
for (let species of allSpecies) {
|
for (let species of allSpecies) {
|
||||||
data[species.speciesId] = {
|
data[species.speciesId] = {
|
||||||
seenAttr: 0n, caughtAttr: 0n, natureAttr: 0, seenCount: 0, caughtCount: 0, hatchedCount: 0, ivs: [ 0, 0, 0, 0, 0, 0 ]
|
seenAttr: 0n, caughtAttr: 0n, natureAttr: 0, seenCount: 0, caughtCount: 0, hatchedCount: 0, winCount: 1, ivs: [ 0, 0, 0, 0, 0, 0 ]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,6 +170,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
private starterValueLabels: Phaser.GameObjects.Text[];
|
private starterValueLabels: Phaser.GameObjects.Text[];
|
||||||
private shinyIcons: Phaser.GameObjects.Image[][];
|
private shinyIcons: Phaser.GameObjects.Image[][];
|
||||||
private hiddenAbilityIcons: Phaser.GameObjects.Image[];
|
private hiddenAbilityIcons: Phaser.GameObjects.Image[];
|
||||||
|
private classicWinIcons: Phaser.GameObjects.Image[];
|
||||||
|
|
||||||
private iconAnimHandler: PokemonIconAnimHandler;
|
private iconAnimHandler: PokemonIconAnimHandler;
|
||||||
|
|
||||||
@ -406,6 +407,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
return ret;
|
return ret;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.classicWinIcons = new Array(81).fill(null).map((_, i) => {
|
||||||
|
const x = (i % 9) * 18;
|
||||||
|
const y = Math.floor(i / 9) * 18;
|
||||||
|
const ret = this.scene.add.image(x + 152, y + 16, 'champion_ribbon');
|
||||||
|
ret.setOrigin(0, 0);
|
||||||
|
ret.setScale(0.5);
|
||||||
|
ret.setVisible(false);
|
||||||
|
this.starterSelectContainer.add(ret);
|
||||||
|
return ret;
|
||||||
|
});
|
||||||
|
|
||||||
this.pokemonSprite = this.scene.add.sprite(53, 63, `pkmn__sub`);
|
this.pokemonSprite = this.scene.add.sprite(53, 63, `pkmn__sub`);
|
||||||
this.pokemonSprite.setPipeline(this.scene.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], ignoreTimeTint: true });
|
this.pokemonSprite.setPipeline(this.scene.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], ignoreTimeTint: true });
|
||||||
this.starterSelectContainer.add(this.pokemonSprite);
|
this.starterSelectContainer.add(this.pokemonSprite);
|
||||||
@ -1176,6 +1188,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.shinyIcons[s][v].setTint(getVariantTint(speciesVariants[v] === DexAttr.DEFAULT_VARIANT ? 0 : speciesVariants[v] === DexAttr.VARIANT_2 ? 1 : 2));
|
this.shinyIcons[s][v].setTint(getVariantTint(speciesVariants[v] === DexAttr.DEFAULT_VARIANT ? 0 : speciesVariants[v] === DexAttr.VARIANT_2 ? 1 : 2));
|
||||||
}
|
}
|
||||||
this.hiddenAbilityIcons[s].setVisible(slotVisible && !!this.scene.gameData.dexData[speciesId].caughtAttr && !!(this.scene.gameData.starterData[speciesId].abilityAttr & 4));
|
this.hiddenAbilityIcons[s].setVisible(slotVisible && !!this.scene.gameData.dexData[speciesId].caughtAttr && !!(this.scene.gameData.starterData[speciesId].abilityAttr & 4));
|
||||||
|
// this.classicWinIcons[s].setVisible(slotVisible);
|
||||||
|
this.classicWinIcons[s].setVisible(slotVisible && this.scene.gameData.dexData[speciesId].winCount > 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
changed = super.setCursor(cursor);
|
changed = super.setCursor(cursor);
|
||||||
|
Loading…
Reference in New Issue
Block a user