Minor fixes

This commit is contained in:
Flashfyre 2024-05-07 00:38:14 -04:00
parent 07e8b35e18
commit f5a7cf415f
5 changed files with 15 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

View File

@ -3487,7 +3487,6 @@ export class RibbonModifierRewardPhase extends ModifierRewardPhase {
this.scene.addModifier(newModifier).then(() => { this.scene.addModifier(newModifier).then(() => {
this.scene.gameData.saveSystem().then(success => { this.scene.gameData.saveSystem().then(success => {
if (success) { if (success) {
// this.species.cry(this.scene);
this.scene.playSound('level_up_fanfare'); this.scene.playSound('level_up_fanfare');
this.scene.ui.setMode(Mode.MESSAGE); this.scene.ui.setMode(Mode.MESSAGE);
this.scene.arenaBg.setVisible(false); this.scene.arenaBg.setVisible(false);
@ -3577,9 +3576,8 @@ export class GameOverPhase extends BattlePhase {
this.scene.ui.clearText(); this.scene.ui.clearText();
this.handleUnlocks(); this.handleUnlocks();
if (this.victory && !firstClear && success[1]) { if (this.victory && !firstClear && success[1]) {
for (let species of this.firstRibbons) { for (let species of this.firstRibbons)
this.scene.unshiftPhase(new RibbonModifierRewardPhase(this.scene, modifierTypes.VOUCHER_PLUS, species)); this.scene.unshiftPhase(new RibbonModifierRewardPhase(this.scene, modifierTypes.VOUCHER_PLUS, species));
}
this.scene.unshiftPhase(new GameOverModifierRewardPhase(this.scene, modifierTypes.VOUCHER_PREMIUM)); this.scene.unshiftPhase(new GameOverModifierRewardPhase(this.scene, modifierTypes.VOUCHER_PREMIUM));
} }
this.scene.reset(); this.scene.reset();

View File

@ -135,11 +135,11 @@ export const achvs = {
LV_100: new LevelAchv('But Wait, There\'s More!', 100, 'rare_candy', 25).setSecret(), LV_100: new LevelAchv('But Wait, There\'s More!', 100, 'rare_candy', 25).setSecret(),
LV_250: new LevelAchv('Elite', 250, 'rarer_candy', 50).setSecret(true), LV_250: new LevelAchv('Elite', 250, 'rarer_candy', 50).setSecret(true),
LV_1000: new LevelAchv('To Go Even Further Beyond', 1000, 'candy_jar', 100).setSecret(true), LV_1000: new LevelAchv('To Go Even Further Beyond', 1000, 'candy_jar', 100).setSecret(true),
_10_RIBBONS: new RibbonAchv('Pokémon League Champ.', 10, 'bronze_ribbon', 10), _10_RIBBONS: new RibbonAchv('Pokémon League Champion', 10, 'bronze_ribbon', 10),
_25_RIBBONS: new RibbonAchv('Great League Champ.', 25, 'great_ribbon', 25).setSecret(true), _25_RIBBONS: new RibbonAchv('Great League Champion', 25, 'great_ribbon', 25).setSecret(true),
_50_RIBBONS: new RibbonAchv('Ultra League Champ.', 50, 'ultra_ribbon', 50).setSecret(true), _50_RIBBONS: new RibbonAchv('Ultra League Champion', 50, 'ultra_ribbon', 50).setSecret(true),
_75_RIBBONS: new RibbonAchv('Rogue League Champ.', 75, 'rogue_ribbon', 75).setSecret(true), _75_RIBBONS: new RibbonAchv('Rogue League Champion', 75, 'rogue_ribbon', 75).setSecret(true),
_100_RIBBONS: new RibbonAchv('Master League Champ.', 100, 'master_ribbon', 100).setSecret(true), _100_RIBBONS: new RibbonAchv('Master League Champion', 100, 'master_ribbon', 100).setSecret(true),
TRANSFER_MAX_BATTLE_STAT: new Achv('Teamwork', 'Baton pass to another party member with at least one stat maxed out', 'stick', 20), TRANSFER_MAX_BATTLE_STAT: new Achv('Teamwork', 'Baton pass to another party member with at least one stat maxed out', 'stick', 20),
MAX_FRIENDSHIP: new Achv('Friendmaxxing', 'Reach max friendship on a Pokémon', 'soothe_bell', 25), MAX_FRIENDSHIP: new Achv('Friendmaxxing', 'Reach max friendship on a Pokémon', 'soothe_bell', 25),
MEGA_EVOLVE: new Achv('Megamorph', 'Mega evolve a Pokémon', 'mega_bracelet', 50), MEGA_EVOLVE: new Achv('Megamorph', 'Mega evolve a Pokémon', 'mega_bracelet', 50),

View File

@ -173,7 +173,7 @@ export interface StarterDataEntry {
abilityAttr: integer; abilityAttr: integer;
passiveAttr: integer; passiveAttr: integer;
valueReduction: integer; valueReduction: integer;
winCount: integer; classicWinCount: integer;
} }
export interface StarterData { export interface StarterData {
@ -195,7 +195,8 @@ const systemShortKeys = {
eggMoves: '$em', eggMoves: '$em',
candyCount: '$x', candyCount: '$x',
passive: '$p', passive: '$p',
valueReduction: '$vr' valueReduction: '$vr',
classicWinCount: '$wc'
}; };
export class GameData { export class GameData {
@ -997,7 +998,7 @@ export class GameData {
abilityAttr: defaultStarterSpecies.includes(speciesId) ? AbilityAttr.ABILITY_1 : 0, abilityAttr: defaultStarterSpecies.includes(speciesId) ? AbilityAttr.ABILITY_1 : 0,
passiveAttr: 0, passiveAttr: 0,
valueReduction: 0, valueReduction: 0,
winCount: 0 classicWinCount: 0
}; };
} }
@ -1094,11 +1095,11 @@ export class GameData {
incrementRibbonCount(species: PokemonSpecies, forStarter: boolean = false): integer { incrementRibbonCount(species: PokemonSpecies, forStarter: boolean = false): integer {
const speciesIdToIncrement: Species = species.getRootSpeciesId(forStarter); const speciesIdToIncrement: Species = species.getRootSpeciesId(forStarter);
if (!this.starterData[speciesIdToIncrement].winCount) { if (!this.starterData[speciesIdToIncrement].classicWinCount) {
this.starterData[speciesIdToIncrement].winCount = 0; this.starterData[speciesIdToIncrement].classicWinCount = 0;
} }
if (!this.starterData[speciesIdToIncrement].winCount) if (!this.starterData[speciesIdToIncrement].classicWinCount)
this.scene.gameData.gameStats.ribbonsOwned++; this.scene.gameData.gameStats.ribbonsOwned++;
const ribbonsInStats: integer = this.scene.gameData.gameStats.ribbonsOwned; const ribbonsInStats: integer = this.scene.gameData.gameStats.ribbonsOwned;
@ -1114,7 +1115,7 @@ export class GameData {
if (ribbonsInStats >= 10) if (ribbonsInStats >= 10)
this.scene.validateAchv(achvs._10_RIBBONS); this.scene.validateAchv(achvs._10_RIBBONS);
return ++this.starterData[speciesIdToIncrement].winCount; return ++this.starterData[speciesIdToIncrement].classicWinCount;
} }
addStarterCandy(species: PokemonSpecies, count: integer): void { addStarterCandy(species: PokemonSpecies, count: integer): void {

View File

@ -1204,7 +1204,7 @@ 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.scene.gameData.starterData[speciesId].winCount > 0); this.classicWinIcons[s].setVisible(slotVisible && this.scene.gameData.starterData[speciesId].classicWinCount > 0);
} }
} else { } else {
changed = super.setCursor(cursor); changed = super.setCursor(cursor);