adds Akuma's ribbon achievements
10379
public/images/items.json
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 50 KiB |
BIN
public/images/items/bronze_ribbon.png
Normal file
After Width: | Height: | Size: 400 B |
BIN
public/images/items/great_ribbon.png
Normal file
After Width: | Height: | Size: 408 B |
BIN
public/images/items/master_ribbon.png
Normal file
After Width: | Height: | Size: 408 B |
BIN
public/images/items/rogue_ribbon.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
public/images/items/ultra_ribbon.png
Normal file
After Width: | Height: | Size: 406 B |
@ -51,9 +51,9 @@ export class Achv {
|
||||
}
|
||||
|
||||
getTier(): AchvTier {
|
||||
if (this.score >= 150)
|
||||
return AchvTier.MASTER;
|
||||
if (this.score >= 100)
|
||||
return AchvTier.MASTER;
|
||||
if (this.score >= 75)
|
||||
return AchvTier.ROGUE;
|
||||
if (this.score >= 50)
|
||||
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 {
|
||||
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(),
|
||||
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),
|
||||
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)
|
||||
};
|
||||
|
||||
{
|
||||
|
@ -1086,7 +1086,24 @@ export class GameData {
|
||||
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++;
|
||||
|
||||
}
|
||||
|
||||
addStarterCandy(species: PokemonSpecies, count: integer): void {
|
||||
|
@ -6,6 +6,7 @@ export class GameStats {
|
||||
public battles: integer;
|
||||
public classicSessionsPlayed: integer;
|
||||
public sessionsWon: integer;
|
||||
public ribbonsOwned: integer;
|
||||
public dailyRunSessionsPlayed: integer;
|
||||
public dailyRunSessionsWon: integer;
|
||||
public endlessSessionsPlayed: integer;
|
||||
@ -40,6 +41,7 @@ export class GameStats {
|
||||
this.battles = source?.battles || 0;
|
||||
this.classicSessionsPlayed = source?.classicSessionsPlayed || 0;
|
||||
this.sessionsWon = source?.sessionsWon || 0;
|
||||
this.ribbonsOwned = source?.ribbonsOwned || 0;
|
||||
this.dailyRunSessionsPlayed = source?.dailyRunSessionsPlayed || 0;
|
||||
this.dailyRunSessionsWon = source?.dailyRunSessionsWon || 0;
|
||||
this.endlessSessionsPlayed = source?.endlessSessionsPlayed || 0;
|
||||
|