mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-14 22:05:34 +01:00
[Beta] Add Ribbon Sprites over stuff (#6704)
* ribbons * Remove now-unused comments * Update achv.ts
This commit is contained in:
parent
a66f183a30
commit
9e96380bc0
@ -458,7 +458,7 @@ export const achvs = {
|
||||
CLASSIC_VICTORY: new Achv(
|
||||
"classicVictory",
|
||||
"classicVictory.description",
|
||||
"relic_crown",
|
||||
"classic_ribbon_default",
|
||||
250,
|
||||
_ => globalScene.gameData.gameStats.sessionsWon === 0,
|
||||
),
|
||||
@ -483,7 +483,7 @@ export const achvs = {
|
||||
LV_250: new LevelAchv("lv250", 250, "rarer_candy", 25).setSecret(true),
|
||||
LV_1000: new LevelAchv("lv1000", 1000, "candy_jar", 50).setSecret(true),
|
||||
TRANSFER_MAX_STAT_STAGE: new Achv("transferMaxStatStage", "transferMaxStatStage.description", "baton", 25),
|
||||
MAX_FRIENDSHIP: new Achv("maxFriendship", "maxFriendship.description", "soothe_bell", 25),
|
||||
MAX_FRIENDSHIP: new Achv("maxFriendship", "maxFriendship.description", "ribbon_friendship", 25),
|
||||
MEGA_EVOLVE: new Achv("megaEvolve", "megaEvolve.description", "mega_bracelet", 50),
|
||||
GIGANTAMAX: new Achv("gigantamax", "gigantamax.description", "dynamax_band", 50),
|
||||
TERASTALLIZE: new Achv("terastallize", "terastallize.description", "tera_orb", 25),
|
||||
@ -651,7 +651,7 @@ export const achvs = {
|
||||
MONO_NORMAL: new ChallengeAchv(
|
||||
"monoNormal",
|
||||
"monoNormal.description",
|
||||
"silk_scarf",
|
||||
"ribbon_normal",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -663,7 +663,7 @@ export const achvs = {
|
||||
MONO_FIGHTING: new ChallengeAchv(
|
||||
"monoFighting",
|
||||
"monoFighting.description",
|
||||
"black_belt",
|
||||
"ribbon_fighting",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -675,7 +675,7 @@ export const achvs = {
|
||||
MONO_FLYING: new ChallengeAchv(
|
||||
"monoFlying",
|
||||
"monoFlying.description",
|
||||
"sharp_beak",
|
||||
"ribbon_flying",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -687,7 +687,7 @@ export const achvs = {
|
||||
MONO_POISON: new ChallengeAchv(
|
||||
"monoPoison",
|
||||
"monoPoison.description",
|
||||
"poison_barb",
|
||||
"ribbon_poison",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -699,7 +699,7 @@ export const achvs = {
|
||||
MONO_GROUND: new ChallengeAchv(
|
||||
"monoGround",
|
||||
"monoGround.description",
|
||||
"soft_sand",
|
||||
"ribbon_ground",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -711,7 +711,7 @@ export const achvs = {
|
||||
MONO_ROCK: new ChallengeAchv(
|
||||
"monoRock",
|
||||
"monoRock.description",
|
||||
"hard_stone",
|
||||
"ribbon_rock",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -723,7 +723,7 @@ export const achvs = {
|
||||
MONO_BUG: new ChallengeAchv(
|
||||
"monoBug",
|
||||
"monoBug.description",
|
||||
"silver_powder",
|
||||
"ribbon_bug",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -735,7 +735,7 @@ export const achvs = {
|
||||
MONO_GHOST: new ChallengeAchv(
|
||||
"monoGhost",
|
||||
"monoGhost.description",
|
||||
"spell_tag",
|
||||
"ribbon_ghost",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -747,7 +747,7 @@ export const achvs = {
|
||||
MONO_STEEL: new ChallengeAchv(
|
||||
"monoSteel",
|
||||
"monoSteel.description",
|
||||
"metal_coat",
|
||||
"ribbon_steel",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -759,7 +759,7 @@ export const achvs = {
|
||||
MONO_FIRE: new ChallengeAchv(
|
||||
"monoFire",
|
||||
"monoFire.description",
|
||||
"charcoal",
|
||||
"ribbon_fire",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -771,7 +771,7 @@ export const achvs = {
|
||||
MONO_WATER: new ChallengeAchv(
|
||||
"monoWater",
|
||||
"monoWater.description",
|
||||
"mystic_water",
|
||||
"ribbon_water",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -783,7 +783,7 @@ export const achvs = {
|
||||
MONO_GRASS: new ChallengeAchv(
|
||||
"monoGrass",
|
||||
"monoGrass.description",
|
||||
"miracle_seed",
|
||||
"ribbon_grass",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -795,7 +795,7 @@ export const achvs = {
|
||||
MONO_ELECTRIC: new ChallengeAchv(
|
||||
"monoElectric",
|
||||
"monoElectric.description",
|
||||
"magnet",
|
||||
"ribbon_electric",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -807,7 +807,7 @@ export const achvs = {
|
||||
MONO_PSYCHIC: new ChallengeAchv(
|
||||
"monoPsychic",
|
||||
"monoPsychic.description",
|
||||
"twisted_spoon",
|
||||
"ribbon_psychic",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -819,7 +819,7 @@ export const achvs = {
|
||||
MONO_ICE: new ChallengeAchv(
|
||||
"monoIce",
|
||||
"monoIce.description",
|
||||
"never_melt_ice",
|
||||
"ribbon_ice",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -831,7 +831,7 @@ export const achvs = {
|
||||
MONO_DRAGON: new ChallengeAchv(
|
||||
"monoDragon",
|
||||
"monoDragon.description",
|
||||
"dragon_fang",
|
||||
"ribbon_dragon",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -843,7 +843,7 @@ export const achvs = {
|
||||
MONO_DARK: new ChallengeAchv(
|
||||
"monoDark",
|
||||
"monoDark.description",
|
||||
"black_glasses",
|
||||
"ribbon_dark",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
@ -855,7 +855,7 @@ export const achvs = {
|
||||
MONO_FAIRY: new ChallengeAchv(
|
||||
"monoFairy",
|
||||
"monoFairy.description",
|
||||
"fairy_feather",
|
||||
"ribbon_fairy",
|
||||
100,
|
||||
c =>
|
||||
c instanceof SingleTypeChallenge
|
||||
|
||||
@ -22,8 +22,12 @@ export function ribbonFlagToAssetKey(flag: RibbonFlag): Phaser.GameObjects.Sprit
|
||||
let imageKey: string;
|
||||
switch (flag) {
|
||||
// biome-ignore-start lint/suspicious/noFallthroughSwitchClause: intentional
|
||||
case RibbonData.CLASSIC:
|
||||
imageKey ??= "classic_ribbon_default";
|
||||
case RibbonData.FRIENDSHIP:
|
||||
imageKey ??= "ribbon_friendship";
|
||||
case RibbonData.MONO_GEN_1:
|
||||
imageKey = "ribbon_gen1";
|
||||
imageKey ??= "ribbon_gen1";
|
||||
case RibbonData.MONO_GEN_2:
|
||||
imageKey ??= "ribbon_gen2";
|
||||
case RibbonData.MONO_GEN_3:
|
||||
@ -40,20 +44,45 @@ export function ribbonFlagToAssetKey(flag: RibbonFlag): Phaser.GameObjects.Sprit
|
||||
imageKey ??= "ribbon_gen8";
|
||||
case RibbonData.MONO_GEN_9:
|
||||
imageKey ??= "ribbon_gen9";
|
||||
case RibbonData.MONO_NORMAL:
|
||||
imageKey ??= "ribbon_normal";
|
||||
case RibbonData.MONO_FIGHTING:
|
||||
imageKey ??= "ribbon_fighting";
|
||||
case RibbonData.MONO_FLYING:
|
||||
imageKey ??= "ribbon_flying";
|
||||
case RibbonData.MONO_POISON:
|
||||
imageKey ??= "ribbon_poison";
|
||||
case RibbonData.MONO_GROUND:
|
||||
imageKey ??= "ribbon_ground";
|
||||
case RibbonData.MONO_ROCK:
|
||||
imageKey ??= "ribbon_rock";
|
||||
case RibbonData.MONO_BUG:
|
||||
imageKey ??= "ribbon_bug";
|
||||
case RibbonData.MONO_GHOST:
|
||||
imageKey ??= "ribbon_ghost";
|
||||
case RibbonData.MONO_STEEL:
|
||||
imageKey ??= "ribbon_steel";
|
||||
case RibbonData.MONO_FIRE:
|
||||
imageKey ??= "ribbon_fire";
|
||||
case RibbonData.MONO_WATER:
|
||||
imageKey ??= "ribbon_water";
|
||||
case RibbonData.MONO_GRASS:
|
||||
imageKey ??= "ribbon_grass";
|
||||
case RibbonData.MONO_ELECTRIC:
|
||||
imageKey ??= "ribbon_electric";
|
||||
case RibbonData.MONO_PSYCHIC:
|
||||
imageKey ??= "ribbon_psychic";
|
||||
case RibbonData.MONO_ICE:
|
||||
imageKey ??= "ribbon_ice";
|
||||
case RibbonData.MONO_DRAGON:
|
||||
imageKey ??= "ribbon_dragon";
|
||||
case RibbonData.MONO_DARK:
|
||||
imageKey ??= "ribbon_dark";
|
||||
case RibbonData.MONO_FAIRY:
|
||||
imageKey ??= "ribbon_fairy";
|
||||
default:
|
||||
imageKey ??= "ribbon_typeless";
|
||||
return globalScene.add.image(0, 0, "items", imageKey).setDisplaySize(16, 16);
|
||||
// biome-ignore-end lint/suspicious/noFallthroughSwitchClause: done with fallthrough
|
||||
// Ribbons that don't use the items atlas
|
||||
// biome-ignore-start lint/suspicious/noFallthroughSwitchClause: Another fallthrough block
|
||||
case RibbonData.NUZLOCKE:
|
||||
imageKey = "champion_ribbon_emerald";
|
||||
default:
|
||||
imageKey ??= "champion_ribbon";
|
||||
{
|
||||
const img = globalScene.add.image(0, 0, imageKey);
|
||||
const target = 12;
|
||||
const scale = Math.min(target / img.width, target / img.height);
|
||||
return img.setScale(scale);
|
||||
}
|
||||
// biome-ignore-end lint/suspicious/noFallthroughSwitchClause: End fallthrough block
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user