This commit is contained in:
damocleas 2025-08-18 23:38:07 +02:00 committed by GitHub
commit 65541d37ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 7609 additions and 7538 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

View File

@ -99,7 +99,7 @@ export class LoadingScene extends SceneBase {
this.loadImage("type_tera", "ui");
this.loadAtlas("type_bgs", "ui");
this.loadAtlas("button_tera", "ui");
this.loadImage("mystery_egg", "ui");
this.loadImage("common_egg", "ui");
this.loadImage("normal_memory", "ui");
this.loadImage("dawn_icon_fg", "ui");

View File

@ -43,13 +43,11 @@ export class Achv {
constructor(
localizationKey: string,
name: string,
description: string,
iconImage: string,
score: number,
conditionFunc?: ConditionFn,
) {
this.name = name;
this.description = description;
this.iconImage = iconImage;
this.score = score;
@ -108,8 +106,8 @@ export class Achv {
export class MoneyAchv extends Achv {
moneyAmount: number;
constructor(localizationKey: string, name: string, moneyAmount: number, iconImage: string, score: number) {
super(localizationKey, name, "", iconImage, score, (_args: any[]) => globalScene.money >= this.moneyAmount);
constructor(localizationKey: string, moneyAmount: number, iconImage: string, score: number) {
super(localizationKey, "", iconImage, score, (_args: any[]) => globalScene.money >= this.moneyAmount);
this.moneyAmount = moneyAmount;
}
}
@ -117,10 +115,9 @@ export class MoneyAchv extends Achv {
export class RibbonAchv extends Achv {
ribbonAmount: number;
constructor(localizationKey: string, name: string, ribbonAmount: number, iconImage: string, score: number) {
constructor(localizationKey: string, ribbonAmount: number, iconImage: string, score: number) {
super(
localizationKey,
name,
"",
iconImage,
score,
@ -133,10 +130,9 @@ export class RibbonAchv extends Achv {
export class DamageAchv extends Achv {
damageAmount: number;
constructor(localizationKey: string, name: string, damageAmount: number, iconImage: string, score: number) {
constructor(localizationKey: string, damageAmount: number, iconImage: string, score: number) {
super(
localizationKey,
name,
"",
iconImage,
score,
@ -149,10 +145,9 @@ export class DamageAchv extends Achv {
export class HealAchv extends Achv {
healAmount: number;
constructor(localizationKey: string, name: string, healAmount: number, iconImage: string, score: number) {
constructor(localizationKey: string, healAmount: number, iconImage: string, score: number) {
super(
localizationKey,
name,
"",
iconImage,
score,
@ -165,10 +160,9 @@ export class HealAchv extends Achv {
export class LevelAchv extends Achv {
level: number;
constructor(localizationKey: string, name: string, level: number, iconImage: string, score: number) {
constructor(localizationKey: string, level: number, iconImage: string, score: number) {
super(
localizationKey,
name,
"",
iconImage,
score,
@ -181,26 +175,24 @@ export class LevelAchv extends Achv {
export class ModifierAchv extends Achv {
constructor(
localizationKey: string,
name: string,
description: string,
iconImage: string,
score: number,
modifierFunc: (modifier: Modifier) => boolean,
) {
super(localizationKey, name, description, iconImage, score, (args: any[]) => modifierFunc(args[0] as Modifier));
super(localizationKey, description, iconImage, score, (args: any[]) => modifierFunc(args[0] as Modifier));
}
}
export class ChallengeAchv extends Achv {
constructor(
localizationKey: string,
name: string,
description: string,
iconImage: string,
score: number,
challengeFunc: (challenge: Challenge) => boolean,
) {
super(localizationKey, name, description, iconImage, score, (args: any[]) => challengeFunc(args[0] as Challenge));
super(localizationKey, description, iconImage, score, (args: any[]) => challengeFunc(args[0] as Challenge));
}
}
@ -461,83 +453,94 @@ export function getAchievementDescription(localizationKey: string): string {
}
export const achvs = {
_10K_MONEY: new MoneyAchv("10KMoney", "", 10000, "nugget", 10),
_100K_MONEY: new MoneyAchv("100KMoney", "", 100000, "big_nugget", 25).setSecret(true),
_1M_MONEY: new MoneyAchv("1MMoney", "", 1000000, "relic_gold", 50).setSecret(true),
_10M_MONEY: new MoneyAchv("10MMoney", "", 10000000, "coin_case", 100).setSecret(true),
_250_DMG: new DamageAchv("250Dmg", "", 250, "lucky_punch", 10),
_1000_DMG: new DamageAchv("1000Dmg", "", 1000, "lucky_punch_great", 25).setSecret(true),
_2500_DMG: new DamageAchv("2500Dmg", "", 2500, "lucky_punch_ultra", 50).setSecret(true),
_10000_DMG: new DamageAchv("10000Dmg", "", 10000, "lucky_punch_master", 100).setSecret(true),
_250_HEAL: new HealAchv("250Heal", "", 250, "potion", 10),
_1000_HEAL: new HealAchv("1000Heal", "", 1000, "super_potion", 25).setSecret(true),
_2500_HEAL: new HealAchv("2500Heal", "", 2500, "hyper_potion", 50).setSecret(true),
_10000_HEAL: new HealAchv("10000Heal", "", 10000, "max_potion", 100).setSecret(true),
LV_100: new LevelAchv("lv100", "", 100, "rare_candy", 25).setSecret(),
LV_250: new LevelAchv("lv250", "", 250, "rarer_candy", 50).setSecret(true),
LV_1000: new LevelAchv("lv1000", "", 1000, "candy_jar", 100).setSecret(true),
_10_RIBBONS: new RibbonAchv("10Ribbons", "", 10, "bronze_ribbon", 10),
_25_RIBBONS: new RibbonAchv("25Ribbons", "", 25, "great_ribbon", 25).setSecret(true),
_50_RIBBONS: new RibbonAchv("50Ribbons", "", 50, "ultra_ribbon", 50).setSecret(true),
_75_RIBBONS: new RibbonAchv("75Ribbons", "", 75, "rogue_ribbon", 75).setSecret(true),
_100_RIBBONS: new RibbonAchv("100Ribbons", "", 100, "master_ribbon", 100).setSecret(true),
TRANSFER_MAX_STAT_STAGE: new Achv("transferMaxStatStage", "", "transferMaxStatStage.description", "baton", 20),
MAX_FRIENDSHIP: new Achv("maxFriendship", "", "maxFriendship.description", "soothe_bell", 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),
STELLAR_TERASTALLIZE: new Achv(
"stellarTerastallize",
"",
"stellarTerastallize.description",
"stellar_tera_shard",
25,
).setSecret(true),
SPLICE: new Achv("splice", "", "splice.description", "dna_splicers", 10),
MINI_BLACK_HOLE: new ModifierAchv(
"miniBlackHole",
"",
"miniBlackHole.description",
"mini_black_hole",
25,
modifier => modifier instanceof TurnHeldItemTransferModifier,
).setSecret(),
CATCH_MYTHICAL: new Achv("catchMythical", "", "catchMythical.description", "strange_ball", 50).setSecret(),
CATCH_SUB_LEGENDARY: new Achv("catchSubLegendary", "", "catchSubLegendary.description", "rb", 75).setSecret(),
CATCH_LEGENDARY: new Achv("catchLegendary", "", "catchLegendary.description", "mb", 100).setSecret(),
SEE_SHINY: new Achv("seeShiny", "", "seeShiny.description", "pb_gold", 75),
SHINY_PARTY: new Achv("shinyParty", "", "shinyParty.description", "shiny_charm", 100).setSecret(true),
HATCH_MYTHICAL: new Achv("hatchMythical", "", "hatchMythical.description", "mystery_egg", 75).setSecret(),
HATCH_SUB_LEGENDARY: new Achv(
"hatchSubLegendary",
"",
"hatchSubLegendary.description",
"oval_stone",
100,
).setSecret(),
HATCH_LEGENDARY: new Achv("hatchLegendary", "", "hatchLegendary.description", "lucky_egg", 125).setSecret(),
HATCH_SHINY: new Achv("hatchShiny", "", "hatchShiny.description", "golden_egg", 100).setSecret(),
HIDDEN_ABILITY: new Achv("hiddenAbility", "", "hiddenAbility.description", "ability_charm", 75),
PERFECT_IVS: new Achv("perfectIvs", "", "perfectIvs.description", "blunder_policy", 100),
CLASSIC_VICTORY: new Achv(
"classicVictory",
"",
"classicVictory.description",
"relic_crown",
150,
_ => globalScene.gameData.gameStats.sessionsWon === 0,
),
_10_RIBBONS: new RibbonAchv("10_RIBBONS", 10, "bronze_ribbon", 10),
_25_RIBBONS: new RibbonAchv("25_RIBBONS", 25, "great_ribbon", 25),
_50_RIBBONS: new RibbonAchv("50_RIBBONS", 50, "ultra_ribbon", 50),
_75_RIBBONS: new RibbonAchv("75_RIBBONS", 75, "rogue_ribbon", 75),
_100_RIBBONS: new RibbonAchv("100_RIBBONS", 100, "master_ribbon", 100),
_10K_MONEY: new MoneyAchv("10KMoney", 10000, "nugget", 10),
_100K_MONEY: new MoneyAchv("100KMoney", 100000, "big_nugget", 25).setSecret(true),
_1M_MONEY: new MoneyAchv("1MMoney", 1000000, "relic_gold", 50).setSecret(true),
_10M_MONEY: new MoneyAchv("10MMoney", 10000000, "coin_case", 100).setSecret(true),
_250_DMG: new DamageAchv("250Dmg", 250, "lucky_punch", 10),
_1000_DMG: new DamageAchv("1000Dmg", 1000, "lucky_punch_great", 25).setSecret(true),
_2500_DMG: new DamageAchv("2500Dmg", 2500, "lucky_punch_ultra", 50).setSecret(true),
_10000_DMG: new DamageAchv("10000Dmg", 10000, "lucky_punch_master", 100).setSecret(true),
_250_HEAL: new HealAchv("250Heal", 250, "potion", 10),
_1000_HEAL: new HealAchv("1000Heal", 1000, "super_potion", 25).setSecret(true),
_2500_HEAL: new HealAchv("2500Heal", 2500, "hyper_potion", 50).setSecret(true),
_10000_HEAL: new HealAchv("10000Heal", 10000, "max_potion", 100).setSecret(true),
LV_100: new LevelAchv("lv100", 100, "rare_candy", 25).setSecret(),
LV_250: new LevelAchv("lv250", 250, "rarer_candy", 50).setSecret(true),
LV_1000: new LevelAchv("lv1000", 1000, "candy_jar", 100).setSecret(true),
TRANSFER_MAX_STAT_STAGE: new Achv("transferMaxStatStage", "transferMaxStatStage.description", "baton", 20),
MAX_FRIENDSHIP: new Achv("maxFriendship", "maxFriendship.description", "soothe_bell", 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),
STELLAR_TERASTALLIZE: new Achv("stellarTerastallize", "stellarTerastallize.description", 25).setSecret(true),
SPLICE: new Achv("splice", "splice.description", "dna_splicers", 10),
MINI_BLACK_HOLE: new ModifierAchv(
"miniBlackHole",
"miniBlackHole.description",
"mini_black_hole",
25,
modifier => modifier instanceof TurnHeldItemTransferModifier,
).setSecret(),
CATCH_MYTHICAL: new Achv("catchMythical", "catchMythical.description", "strange_ball", 50).setSecret(),
CATCH_SUB_LEGENDARY: new Achv("catchSubLegendary", "catchSubLegendary.description", "rb", 75).setSecret(),
CATCH_LEGENDARY: new Achv("catchLegendary", "catchLegendary.description", "mb", 100).setSecret(),
SEE_SHINY: new Achv("seeShiny", "seeShiny.description", "pb_gold", 75),
SHINY_PARTY: new Achv("shinyParty", "shinyParty.description", "shiny_charm", 100).setSecret(true),
HATCH_MYTHICAL: new Achv("hatchMythical", "hatchMythical.description", "manaphy_egg", 75).setSecret(),
HATCH_SUB_LEGENDARY: new Achv("hatchSubLegendary", "hatchSubLegendary.description", "epic_egg", 100).setSecret(),
HATCH_LEGENDARY: new Achv("hatchLegendary", "hatchLegendary.description", "legendary_egg", 125).setSecret(),
HATCH_SHINY: new Achv("hatchShiny", "hatchShiny.description", "rogue_egg", 100).setSecret(),
HIDDEN_ABILITY: new Achv("hiddenAbility", "hiddenAbility.description", "ability_charm", 75),
PERFECT_IVS: new Achv("perfectIvs", "perfectIvs.description", "blunder_policy", 100),
UNEVOLVED_CLASSIC_VICTORY: new Achv(
"unevolvedClassicVictory",
"",
"unevolvedClassicVictory.description",
"eviolite",
175,
_ => globalScene.getPlayerParty().some(p => p.getSpeciesForm(true).speciesId in pokemonEvolutions),
),
FRESH_START: new ChallengeAchv(
"freshStart",
"freshStart.description",
"reviver_seed",
100,
c =>
c instanceof FreshStartChallenge &&
c.value === 1 &&
!globalScene.gameMode.challenges.some(
c => [Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT].includes(c.id) && c.value > 0,
),
),
NUZLOCKE: new ChallengeAchv("nuzlocke", "nuzlocke.description", "leaf_stone", 100, isNuzlockeChallenge),
INVERSE_BATTLE: new ChallengeAchv(
"inverseBattle",
"inverseBattle.description",
"inverse",
100,
c => c instanceof InverseBattleChallenge && c.value > 0,
),
FLIP_STATS: new ChallengeAchv(
"flipStats",
"flipStats.description",
"dubious_disc",
100,
c => c instanceof FlipStatChallenge && c.value > 0,
),
MONO_GEN_ONE_VICTORY: new ChallengeAchv(
"monoGenOne",
"",
"monoGenOne.description",
"ribbon_gen1",
100,
@ -550,7 +553,6 @@ export const achvs = {
),
MONO_GEN_TWO_VICTORY: new ChallengeAchv(
"monoGenTwo",
"",
"monoGenTwo.description",
"ribbon_gen2",
100,
@ -563,7 +565,6 @@ export const achvs = {
),
MONO_GEN_THREE_VICTORY: new ChallengeAchv(
"monoGenThree",
"",
"monoGenThree.description",
"ribbon_gen3",
100,
@ -576,7 +577,6 @@ export const achvs = {
),
MONO_GEN_FOUR_VICTORY: new ChallengeAchv(
"monoGenFour",
"",
"monoGenFour.description",
"ribbon_gen4",
100,
@ -589,7 +589,6 @@ export const achvs = {
),
MONO_GEN_FIVE_VICTORY: new ChallengeAchv(
"monoGenFive",
"",
"monoGenFive.description",
"ribbon_gen5",
100,
@ -602,7 +601,6 @@ export const achvs = {
),
MONO_GEN_SIX_VICTORY: new ChallengeAchv(
"monoGenSix",
"",
"monoGenSix.description",
"ribbon_gen6",
100,
@ -615,7 +613,6 @@ export const achvs = {
),
MONO_GEN_SEVEN_VICTORY: new ChallengeAchv(
"monoGenSeven",
"",
"monoGenSeven.description",
"ribbon_gen7",
100,
@ -628,7 +625,6 @@ export const achvs = {
),
MONO_GEN_EIGHT_VICTORY: new ChallengeAchv(
"monoGenEight",
"",
"monoGenEight.description",
"ribbon_gen8",
100,
@ -641,7 +637,6 @@ export const achvs = {
),
MONO_GEN_NINE_VICTORY: new ChallengeAchv(
"monoGenNine",
"",
"monoGenNine.description",
"ribbon_gen9",
100,
@ -654,7 +649,6 @@ export const achvs = {
),
MONO_NORMAL: new ChallengeAchv(
"monoNormal",
"",
"monoNormal.description",
"silk_scarf",
100,
@ -667,7 +661,6 @@ export const achvs = {
),
MONO_FIGHTING: new ChallengeAchv(
"monoFighting",
"",
"monoFighting.description",
"black_belt",
100,
@ -680,7 +673,6 @@ export const achvs = {
),
MONO_FLYING: new ChallengeAchv(
"monoFlying",
"",
"monoFlying.description",
"sharp_beak",
100,
@ -693,7 +685,6 @@ export const achvs = {
),
MONO_POISON: new ChallengeAchv(
"monoPoison",
"",
"monoPoison.description",
"poison_barb",
100,
@ -706,7 +697,6 @@ export const achvs = {
),
MONO_GROUND: new ChallengeAchv(
"monoGround",
"",
"monoGround.description",
"soft_sand",
100,
@ -719,7 +709,6 @@ export const achvs = {
),
MONO_ROCK: new ChallengeAchv(
"monoRock",
"",
"monoRock.description",
"hard_stone",
100,
@ -732,7 +721,6 @@ export const achvs = {
),
MONO_BUG: new ChallengeAchv(
"monoBug",
"",
"monoBug.description",
"silver_powder",
100,
@ -745,7 +733,6 @@ export const achvs = {
),
MONO_GHOST: new ChallengeAchv(
"monoGhost",
"",
"monoGhost.description",
"spell_tag",
100,
@ -758,7 +745,6 @@ export const achvs = {
),
MONO_STEEL: new ChallengeAchv(
"monoSteel",
"",
"monoSteel.description",
"metal_coat",
100,
@ -771,7 +757,6 @@ export const achvs = {
),
MONO_FIRE: new ChallengeAchv(
"monoFire",
"",
"monoFire.description",
"charcoal",
100,
@ -784,7 +769,6 @@ export const achvs = {
),
MONO_WATER: new ChallengeAchv(
"monoWater",
"",
"monoWater.description",
"mystic_water",
100,
@ -797,7 +781,6 @@ export const achvs = {
),
MONO_GRASS: new ChallengeAchv(
"monoGrass",
"",
"monoGrass.description",
"miracle_seed",
100,
@ -810,7 +793,6 @@ export const achvs = {
),
MONO_ELECTRIC: new ChallengeAchv(
"monoElectric",
"",
"monoElectric.description",
"magnet",
100,
@ -823,7 +805,6 @@ export const achvs = {
),
MONO_PSYCHIC: new ChallengeAchv(
"monoPsychic",
"",
"monoPsychic.description",
"twisted_spoon",
100,
@ -836,7 +817,6 @@ export const achvs = {
),
MONO_ICE: new ChallengeAchv(
"monoIce",
"",
"monoIce.description",
"never_melt_ice",
100,
@ -849,7 +829,6 @@ export const achvs = {
),
MONO_DRAGON: new ChallengeAchv(
"monoDragon",
"",
"monoDragon.description",
"dragon_fang",
100,
@ -862,7 +841,6 @@ export const achvs = {
),
MONO_DARK: new ChallengeAchv(
"monoDark",
"",
"monoDark.description",
"black_glasses",
100,
@ -875,7 +853,6 @@ export const achvs = {
),
MONO_FAIRY: new ChallengeAchv(
"monoFairy",
"",
"monoFairy.description",
"fairy_feather",
100,
@ -886,38 +863,8 @@ export const achvs = {
c => [Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT].includes(c.id) && c.value > 0,
),
),
FRESH_START: new ChallengeAchv(
"freshStart",
"",
"freshStart.description",
"reviver_seed",
100,
c =>
c instanceof FreshStartChallenge &&
c.value === 1 &&
!globalScene.gameMode.challenges.some(
c => [Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT].includes(c.id) && c.value > 0,
),
),
INVERSE_BATTLE: new ChallengeAchv(
"inverseBattle",
"",
"inverseBattle.description",
"inverse",
100,
c => c instanceof InverseBattleChallenge && c.value > 0,
),
FLIP_STATS: new ChallengeAchv(
"flipStats",
"",
"flipStats.description",
"dubious_disc",
100,
c => c instanceof FlipStatChallenge && c.value > 0,
),
FLIP_INVERSE: new ChallengeAchv(
"flipInverse",
"",
"flipInverse.description",
"cracked_pot",
100,
@ -926,9 +873,7 @@ export const achvs = {
c.value > 0 &&
globalScene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0),
).setSecret(),
// TODO: Decide on icon
NUZLOCKE: new ChallengeAchv("nuzlocke", "", "nuzlocke.description", "leaf_stone", 100, isNuzlockeChallenge),
BREEDERS_IN_SPACE: new Achv("breedersInSpace", "", "breedersInSpace.description", "moon_stone", 50).setSecret(),
BREEDERS_IN_SPACE: new Achv("breedersInSpace", "breedersInSpace.description", "moon_stone", 50).setSecret(),
};
export function initAchievements() {

View File

@ -30,7 +30,7 @@ const languageSettings: { [key: string]: LanguageSetting } = {
export class AchvsUiHandler extends MessageUiHandler {
private readonly ROWS = 4;
private readonly COLS = 17;
private readonly COLS = 18;
private mainContainer: Phaser.GameObjects.Container;
private iconsContainer: Phaser.GameObjects.Container;
@ -115,8 +115,8 @@ export class AchvsUiHandler extends MessageUiHandler {
this.icons = [];
for (let a = 0; a < this.ROWS * this.COLS; a++) {
const x = (a % this.COLS) * 18;
const y = Math.floor(a / this.COLS) * 18;
const x = (a % this.COLS) * 17;
const y = Math.floor(a / this.COLS) * 19;
const icon = globalScene.add.sprite(x, y, "items", "unknown").setOrigin(0).setScale(0.5);

View File

@ -107,7 +107,7 @@ export class PokedexMonContainer extends Phaser.GameObjects.Container {
this.candyUpgradeOverlayIcon = candyUpgradeOverlayIcon;
// move icons
const eggMove1Icon = globalScene.add.image(0, 12, "mystery_egg");
const eggMove1Icon = globalScene.add.image(0, 12, "common_egg");
eggMove1Icon.setOrigin(0, 0);
eggMove1Icon.setScale(0.25);
eggMove1Icon.setVisible(false);
@ -123,7 +123,7 @@ export class PokedexMonContainer extends Phaser.GameObjects.Container {
this.tmMove1Icon = tmMove1Icon;
// move icons
const eggMove2Icon = globalScene.add.image(7, 12, "mystery_egg");
const eggMove2Icon = globalScene.add.image(7, 12, "common_egg");
eggMove2Icon.setOrigin(0, 0);
eggMove2Icon.setScale(0.25);
eggMove2Icon.setVisible(false);