adds Akuma's ribbon achievements

This commit is contained in:
shayebeadlingkl 2024-05-01 21:22:09 -04:00
parent 25230517cc
commit 8845b26ec5
10 changed files with 5279 additions and 5140 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

View File

@ -51,9 +51,9 @@ export class Achv {
} }
getTier(): AchvTier { getTier(): AchvTier {
if (this.score >= 150)
return AchvTier.MASTER;
if (this.score >= 100) if (this.score >= 100)
return AchvTier.MASTER;
if (this.score >= 75)
return AchvTier.ROGUE; return AchvTier.ROGUE;
if (this.score >= 50) if (this.score >= 50)
return AchvTier.ULTRA; return AchvTier.ULTRA;
@ -73,6 +73,16 @@ export class MoneyAchv extends Achv {
} }
} }
export class RibbonAchv extends Achv {
private ribbonAmount: integer;
constructor(name: string, ribbonAmount: integer, iconImage: string, score: integer) {
super(name, `Accumulate a total of ${ribbonAmount.toLocaleString('en-US')} Ribbons`, iconImage, score, (scene: BattleScene, _args: any[]) => scene.gameData.gameStats.ribbonsOwned >= this.ribbonAmount);
this.ribbonAmount = ribbonAmount;
}
}
export class DamageAchv extends Achv { export class DamageAchv extends Achv {
private damageAmount: integer; private damageAmount: integer;
@ -142,7 +152,12 @@ export const achvs = {
HATCH_SHINY: new Achv('Shiny Egg', 'Hatch a shiny Pokémon from an egg', 'golden_mystic_ticket', 100).setSecret(), HATCH_SHINY: new Achv('Shiny Egg', 'Hatch a shiny Pokémon from an egg', 'golden_mystic_ticket', 100).setSecret(),
HIDDEN_ABILITY: new Achv('Hidden Potential', 'Catch a Pokémon with a hidden ability', 'ability_charm', 75), HIDDEN_ABILITY: new Achv('Hidden Potential', 'Catch a Pokémon with a hidden ability', 'ability_charm', 75),
PERFECT_IVS: new Achv('Certificate of Authenticity', 'Get perfect IVs on a Pokémon', 'blunder_policy', 100), PERFECT_IVS: new Achv('Certificate of Authenticity', 'Get perfect IVs on a Pokémon', 'blunder_policy', 100),
CLASSIC_VICTORY: new Achv('Undefeated', 'Beat the game in classic mode', 'relic_crown', 150) CLASSIC_VICTORY: new Achv('Undefeated', 'Beat the game in classic mode', 'relic_crown', 150),
_10_RIBBONS: new RibbonAchv('Pokémon League Champ.', 10, 'bronze_ribbon', 10),
_25_RIBBONS: new RibbonAchv('Great League Champ.', 25, 'great_ribbon', 25).setSecret(true),
_50_RIBBONS: new RibbonAchv('Ultra League Champ.', 50, 'ultra_ribbon', 50).setSecret(true),
_75_RIBBONS: new RibbonAchv('Rogue League Champ.', 75, 'rogue_ribbon', 75).setSecret(true),
_100_RIBBONS: new RibbonAchv('Master League Champ.', 100, 'master_ribbon', 100).setSecret(true)
}; };
{ {

View File

@ -1086,7 +1086,24 @@ export class GameData {
this.starterData[speciesIdToIncrement].winCount = 0; this.starterData[speciesIdToIncrement].winCount = 0;
} }
if(this.starterData[speciesIdToIncrement].winCount === 0 || !this.starterData[speciesIdToIncrement].winCount)
this.scene.gameData.gameStats.ribbonsOwned = 100;
const ribbonsInStats: integer = this.scene.gameData.gameStats.ribbonsOwned;
if(ribbonsInStats >= 100)
this.scene.validateAchv(achvs._100_RIBBONS);
if(ribbonsInStats >= 75)
this.scene.validateAchv(achvs._75_RIBBONS);
if(ribbonsInStats >= 50)
this.scene.validateAchv(achvs._50_RIBBONS);
if(ribbonsInStats >= 25)
this.scene.validateAchv(achvs._25_RIBBONS);
if(ribbonsInStats >= 10)
this.scene.validateAchv(achvs._10_RIBBONS);
this.starterData[speciesIdToIncrement].winCount++; this.starterData[speciesIdToIncrement].winCount++;
} }
addStarterCandy(species: PokemonSpecies, count: integer): void { addStarterCandy(species: PokemonSpecies, count: integer): void {

View File

@ -6,6 +6,7 @@ export class GameStats {
public battles: integer; public battles: integer;
public classicSessionsPlayed: integer; public classicSessionsPlayed: integer;
public sessionsWon: integer; public sessionsWon: integer;
public ribbonsOwned: integer;
public dailyRunSessionsPlayed: integer; public dailyRunSessionsPlayed: integer;
public dailyRunSessionsWon: integer; public dailyRunSessionsWon: integer;
public endlessSessionsPlayed: integer; public endlessSessionsPlayed: integer;
@ -40,6 +41,7 @@ export class GameStats {
this.battles = source?.battles || 0; this.battles = source?.battles || 0;
this.classicSessionsPlayed = source?.classicSessionsPlayed || 0; this.classicSessionsPlayed = source?.classicSessionsPlayed || 0;
this.sessionsWon = source?.sessionsWon || 0; this.sessionsWon = source?.sessionsWon || 0;
this.ribbonsOwned = source?.ribbonsOwned || 0;
this.dailyRunSessionsPlayed = source?.dailyRunSessionsPlayed || 0; this.dailyRunSessionsPlayed = source?.dailyRunSessionsPlayed || 0;
this.dailyRunSessionsWon = source?.dailyRunSessionsWon || 0; this.dailyRunSessionsWon = source?.dailyRunSessionsWon || 0;
this.endlessSessionsPlayed = source?.endlessSessionsPlayed || 0; this.endlessSessionsPlayed = source?.endlessSessionsPlayed || 0;