Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets
Submodule assets updated 56 files
+ images/pokemon/133-gigantamax.png
+ images/pokemon/25-cute-cosplay.png
+ images/pokemon/back/133-gigantamax.png
+ images/pokemon/back/shiny/25-beauty-cosplay.png
+ images/pokemon/back/shiny/25-cool-cosplay.png
+ images/pokemon/back/shiny/25-cosplay.png
+ images/pokemon/back/shiny/25-cute-cosplay.png
+ images/pokemon/back/shiny/25-smart-cosplay.png
+ images/pokemon/back/shiny/25-tough-cosplay.png
+ images/pokemon/icons/1/133-gigantamax.png
+ images/pokemon/icons/1/133-partner.png
+ images/pokemon/icons/1/133.png
+ images/pokemon/icons/1/133s-gigantamax.png
+ images/pokemon/icons/1/133s-partner.png
+ images/pokemon/icons/1/133s.png
+ images/pokemon/icons/variant/1/133-gigantamax_2.png
+ images/pokemon/icons/variant/1/133-gigantamax_3.png
+ images/pokemon/icons/variant/1/133-partner_2.png
+ images/pokemon/icons/variant/1/133-partner_3.png
+ images/pokemon/icons/variant/1/133_2.png
+ images/pokemon/icons/variant/1/133_3.png
+ images/pokemon/shiny/25-beauty-cosplay.png
+ images/pokemon/shiny/25-cool-cosplay.png
+ images/pokemon/shiny/25-cosplay.png
+ images/pokemon/shiny/25-cute-cosplay.png
+ images/pokemon/shiny/25-smart-cosplay.png
+ images/pokemon/shiny/25-tough-cosplay.png
+22 −0 images/pokemon/variant/133-gigantamax.json
+19 −29 images/pokemon/variant/25-cute-cosplay.json
+2 −0 images/pokemon/variant/_masterlist.json
+20 −0 images/pokemon/variant/back/133-gigantamax.json
+2,363 −2,363 images/pokemon_icons_1.json
+ images/pokemon_icons_1.png
+96 −54 images/pokemon_icons_1v.json
+ images/pokemon_icons_1v.png
+ images/types_uk.png
+ images/ui/legacy/text_images/ko/summary/summary_moves_descriptions_title_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_moves_effect_title_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_moves_moves_title_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_profile_ability_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_profile_memo_title_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_profile_passive_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_profile_profile_title_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_stats_exp_title_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_stats_item_title_ko.png
+ images/ui/legacy/text_images/ko/summary/summary_stats_stats_title_ko.png
+ images/ui/text_images/ko/summary/summary_moves_descriptions_title_ko.png
+ images/ui/text_images/ko/summary/summary_moves_effect_title_ko.png
+ images/ui/text_images/ko/summary/summary_moves_moves_title_ko.png
+ images/ui/text_images/ko/summary/summary_profile_ability_ko.png
+ images/ui/text_images/ko/summary/summary_profile_memo_title_ko.png
+ images/ui/text_images/ko/summary/summary_profile_passive_ko.png
+ images/ui/text_images/ko/summary/summary_profile_profile_title_ko.png
+ images/ui/text_images/ko/summary/summary_stats_exp_title_ko.png
+ images/ui/text_images/ko/summary/summary_stats_item_title_ko.png
+ images/ui/text_images/ko/summary/summary_stats_stats_title_ko.png
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pokemon-rogue-battle",
"private": true,
"version": "1.11.12",
"version": "1.11.13",
"type": "module",
"scripts": {
"start:prod": "vite --mode production",
Expand Down
6 changes: 5 additions & 1 deletion src/battle-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,11 @@ export class BattleScene extends SceneBase {
mysteryEncounterType?: MysteryEncounterType,
): Battle {
// failsafe for corrupt saves (such as due to enum shifting)
if (trainerData?.variant === TrainerVariant.DOUBLE && !trainerConfigs[trainerData.trainerType].hasDouble) {
if (
trainerData?.variant === TrainerVariant.DOUBLE
&& !trainerConfigs[trainerData.trainerType].hasDouble
&& !trainerConfigs[trainerData.trainerType].doubleOnly
) {
trainerData.variant = TrainerVariant.DEFAULT;
double = false;
}
Expand Down
19 changes: 11 additions & 8 deletions src/data/arena-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,13 @@ export abstract class ArenaTag implements BaseArenaTag {

/**
* Apply this tag's effects during a turn.
* @param _args - Arguments used by subclasses.
* @param args - Arguments used by subclasses.
*/
// TODO: Remove all boolean return values from subclasses
// TODO: Move all classes with `apply` triggers into a unique sub-class to prevent
// applying effects of tags that lack effect application
public apply(..._args: unknown[]): void {}
// biome-ignore lint/correctness/noUnusedFunctionParameters: pseudo-abstract method
public apply(...args: unknown[]): void {}

/**
* Trigger effects when this tag is added to the Arena.
Expand Down Expand Up @@ -209,12 +210,14 @@ export abstract class ArenaTag implements BaseArenaTag {

/**
* Apply effects when this Tag overlaps by creating a new instance while one is already present.
* @param _source - The `Pokemon` having added the tag
* @param source - The `Pokemon` having added the tag
*/
public onOverlap(_source?: Pokemon): void {}
// biome-ignore lint/correctness/noUnusedFunctionParameters: pseudo-abstract method
public onOverlap(source?: Pokemon): void {}

/**
* Reduce this {@linkcode ArenaTag}'s duration and apply any end-of-turn effects
* Reduce this {@linkcode ArenaTag}'s duration and apply any end-of-turn effects.
* @remarks
* Will ignore durations of all tags with durations `<=0`.
* @returns `true` if this tag should be kept; `false` if it should be removed.
*/
Expand Down Expand Up @@ -1632,10 +1635,10 @@ export class PendingHealTag extends SerializableArenaTag {
}
}

/** This arena tag is removed at the end of the turn if no pending healing effects are on the field */
override lapse(): boolean {
for (const key in this.pendingHeals) {
if (this.pendingHeals[key].length > 0) {
for (const pendingHeal of Object.values(this.pendingHeals)) {
// `?` works around a bug where somehow the pending heal object can be `null` (save data corruption?)
if (pendingHeal?.length > 0) {
return true;
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/data/daily-seed/daily-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ export function getDailyStartingBiome(): BiomeId {
const biomes = getEnumValues(BiomeId);
let totalWeight = 0;
const biomeThresholds: number[] = [];
for (const biome of getEnumValues(BiomeId)) {
for (const biome of biomes) {
const weight = dailyBiomeWeights[biome];
if (weight === 0) {
continue;
}

// Keep track of the total weight & each biome's cumulative weight
totalWeight += weight;
Expand Down
34 changes: 14 additions & 20 deletions src/data/trainers/trainer-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,20 +623,14 @@ export class TrainerConfig {
* Initializes the trainer configuration for an evil team leader. Temporarily hardcoding evil leader teams though.
* @param signatureSpecies The signature species for the evil team leader.
* @param specialtyType The specialty type for the evil team Leader.
* @param boolean Whether or not this is the rematch fight
* @returns The updated TrainerConfig instance.
*/
initForEvilTeamLeader(
title: string,
signatureSpecies: (SpeciesId | SpeciesId[])[],
rematch = false,
specialtyType?: PokemonType,
): TrainerConfig {
if (rematch) {
this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR);
} else {
this.setPartyTemplates(trainerPartyTemplates.RIVAL_5);
}
this.setPartyTemplates(trainerPartyTemplates.EVIL_LEADER);
signatureSpecies.forEach((speciesPool, s) => {
this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(coerceArray(speciesPool)));
});
Expand Down Expand Up @@ -5643,7 +5637,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.ROCKET_BOSS_GIOVANNI_2]: new TrainerConfig(++t)
.setName("Giovanni")
.initForEvilTeamLeader("Rocket Boss", [], true)
.initForEvilTeamLeader("Rocket Boss", [])
.setMixedBattleBgm("battle_rocket_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -5750,7 +5744,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.MAXIE_2]: new TrainerConfig(++t)
.setName("Maxie")
.initForEvilTeamLeader("Magma Boss", [], true)
.initForEvilTeamLeader("Magma Boss", [])
.setMixedBattleBgm("battle_aqua_magma_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -5840,7 +5834,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.ARCHIE_2]: new TrainerConfig(++t)
.setName("Archie")
.initForEvilTeamLeader("Aqua Boss", [], true)
.initForEvilTeamLeader("Aqua Boss", [])
.setMixedBattleBgm("battle_aqua_magma_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -5916,7 +5910,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.CYRUS_2]: new TrainerConfig(++t)
.setName("Cyrus")
.initForEvilTeamLeader("Galactic Boss", [], true)
.initForEvilTeamLeader("Galactic Boss", [])
.setMixedBattleBgm("battle_galactic_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -5982,7 +5976,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.GHETSIS_2]: new TrainerConfig(++t)
.setName("Ghetsis")
.initForEvilTeamLeader("Plasma Boss", [], true)
.initForEvilTeamLeader("Plasma Boss", [])
.setMixedBattleBgm("battle_plasma_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -6037,15 +6031,15 @@ export const trainerConfigs: TrainerConfigs = {
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([SpeciesId.MIENSHAO]))
.setPartyMemberFunc(1, getRandomPartyMemberFunc([SpeciesId.HONCHKROW, SpeciesId.TALONFLAME]))
.setPartyMemberFunc(2, getRandomPartyMemberFunc([SpeciesId.MALAMAR]))
.setPartyMemberFunc(3, getRandomPartyMemberFunc([SpeciesId.AEGISLASH, SpeciesId.HISUI_GOODRA]))
.setPartyMemberFunc(
2,
4,
getRandomPartyMemberFunc([SpeciesId.PYROAR], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset();
p.gender = Gender.MALE;
}),
)
.setPartyMemberFunc(3, getRandomPartyMemberFunc([SpeciesId.MALAMAR]))
.setPartyMemberFunc(4, getRandomPartyMemberFunc([SpeciesId.AEGISLASH, SpeciesId.HISUI_GOODRA]))
.setPartyMemberFunc(
5,
getRandomPartyMemberFunc([SpeciesId.GYARADOS], TrainerSlot.TRAINER, true, p => {
Expand All @@ -6059,7 +6053,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.LYSANDRE_2]: new TrainerConfig(++t)
.setName("Lysandre")
.initForEvilTeamLeader("Flare Boss", [], true)
.initForEvilTeamLeader("Flare Boss", [])
.setMixedBattleBgm("battle_flare_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -6126,7 +6120,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.LUSAMINE_2]: new TrainerConfig(++t)
.setName("Lusamine")
.initForEvilTeamLeader("Aether Boss", [], true)
.initForEvilTeamLeader("Aether Boss", [])
.setMixedBattleBgm("battle_aether_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -6228,7 +6222,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.GUZMA_2]: new TrainerConfig(++t)
.setName("Guzma")
.initForEvilTeamLeader("Skull Boss", [], true)
.initForEvilTeamLeader("Skull Boss", [])
.setMixedBattleBgm("battle_skull_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -6346,7 +6340,7 @@ export const trainerConfigs: TrainerConfigs = {
),
[TrainerType.ROSE_2]: new TrainerConfig(++t)
.setName("Rose")
.initForEvilTeamLeader("Macro Boss", [], true)
.initForEvilTeamLeader("Macro Boss", [])
.setMixedBattleBgm("battle_macro_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down Expand Up @@ -6432,7 +6426,7 @@ export const trainerConfigs: TrainerConfigs = {
.setInstantTera(4), // Tera Fairy Sylveon
[TrainerType.PENNY_2]: new TrainerConfig(++t)
.setName("Cassiopeia")
.initForEvilTeamLeader("Star Boss", [], true)
.initForEvilTeamLeader("Star Boss", [])
.setMixedBattleBgm("battle_star_boss")
.setVictoryBgm("victory_team_plasma")
.setPartyMemberFunc(
Expand Down
7 changes: 7 additions & 0 deletions src/data/trainers/trainer-party-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ export const trainerPartyTemplates = {
new TrainerPartyTemplate(2, PartyMemberStrength.STRONGER, false, true, EvoLevelThresholdKind.STRONG),
),

EVIL_LEADER: new TrainerPartyCompoundTemplate(
new TrainerPartyTemplate(1, PartyMemberStrength.STRONG, undefined, undefined, EvoLevelThresholdKind.STRONG),
new TrainerPartyTemplate(2, PartyMemberStrength.AVERAGE, undefined, undefined, EvoLevelThresholdKind.STRONG),
new TrainerPartyTemplate(2, PartyMemberStrength.STRONG, undefined, undefined, EvoLevelThresholdKind.STRONG),
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER, undefined, undefined, EvoLevelThresholdKind.STRONG),
),

RIVAL: new TrainerPartyCompoundTemplate(
new TrainerPartyTemplate(1, PartyMemberStrength.STRONG),
new TrainerPartyTemplate(1, PartyMemberStrength.AVERAGE),
Expand Down
4 changes: 2 additions & 2 deletions src/phases/game-over-phase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ export class GameOverPhase extends BattlePhase {

const availablePartyMembers = globalScene.getPokemonAllowedInBattle().length;

globalScene.phaseManager.pushNew("SummonPhase", 0);
globalScene.phaseManager.pushNew("SummonPhase", 0, true, true);
if (globalScene.currentBattle.double && availablePartyMembers > 1) {
globalScene.phaseManager.pushNew("SummonPhase", 1);
globalScene.phaseManager.pushNew("SummonPhase", 1, true, true);
}
if (
globalScene.currentBattle.waveIndex > 1
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ const fonts: LoadingFontFaceProperty[] = [
unicodeRange: unicodeRanges.thai,
}),
},
{
face: new FontFace("pkmnems", "url(./fonts/terrible-thaifix.ttf)", {
unicodeRange: unicodeRanges.thai,
}),
extraOptions: { sizeAdjust: "133%" },
},
];

//#region Functions
Expand Down
11 changes: 3 additions & 8 deletions src/ui/settings/abstract-control-settings-ui-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,13 @@ export abstract class AbstractControlSettingsUiHandler extends UiHandler {
settingFiltered.forEach((setting, s) => {
// Convert the setting key from format 'Key_Name' to 'Key name' for display.
// TODO: IDK if this can be followed by both an underscore and a space, so leaving it as a regex matching both for now
const i18nKey = toCamelCase(setting.replace(/Alt(_| )/, ""));
const i18nKey = toCamelCase(setting.replace(/ALT(_| )/, ""));

// Create and add a text object for the setting name to the scene.
const isLock = this.settingBlacklisted.includes(this.setting[setting]);
const labelStyle = isLock ? TextStyle.SETTINGS_LOCKED : TextStyle.SETTINGS_LABEL;
const isAlt = setting.includes("Alt");
let labelText: string;
if (isAlt) {
labelText = `${i18next.t(`settings:${i18nKey}`)}${i18next.t("settings:alt")}`;
} else {
labelText = i18next.t(`settings:${i18nKey}`);
}
const isAlt = setting.includes("ALT");
const labelText = i18next.t(`settings:${i18nKey}`) + (isAlt ? i18next.t("settings:alt") : "");
settingLabels[s] = addTextObject(8, 28 + s * 16, labelText, labelStyle);
settingLabels[s].setOrigin(0, 0);
optionsContainer.add(settingLabels[s]);
Expand Down
Loading