Skip to content

Commit cc976e2

Browse files
authored
Hotfix 1.11.13 to Main
2 parents b9a524c + 0b70627 commit cc976e2

File tree

10 files changed

+51
-45
lines changed

10 files changed

+51
-45
lines changed

assets

Submodule assets updated 56 files

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pokemon-rogue-battle",
33
"private": true,
4-
"version": "1.11.12",
4+
"version": "1.11.13",
55
"type": "module",
66
"scripts": {
77
"start:prod": "vite --mode production",

src/battle-scene.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,11 @@ export class BattleScene extends SceneBase {
12671267
mysteryEncounterType?: MysteryEncounterType,
12681268
): Battle {
12691269
// failsafe for corrupt saves (such as due to enum shifting)
1270-
if (trainerData?.variant === TrainerVariant.DOUBLE && !trainerConfigs[trainerData.trainerType].hasDouble) {
1270+
if (
1271+
trainerData?.variant === TrainerVariant.DOUBLE
1272+
&& !trainerConfigs[trainerData.trainerType].hasDouble
1273+
&& !trainerConfigs[trainerData.trainerType].doubleOnly
1274+
) {
12711275
trainerData.variant = TrainerVariant.DEFAULT;
12721276
double = false;
12731277
}

src/data/arena-tag.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,13 @@ export abstract class ArenaTag implements BaseArenaTag {
164164

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

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

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

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

1635-
/** This arena tag is removed at the end of the turn if no pending healing effects are on the field */
16361638
override lapse(): boolean {
1637-
for (const key in this.pendingHeals) {
1638-
if (this.pendingHeals[key].length > 0) {
1639+
for (const pendingHeal of Object.values(this.pendingHeals)) {
1640+
// `?` works around a bug where somehow the pending heal object can be `null` (save data corruption?)
1641+
if (pendingHeal?.length > 0) {
16391642
return true;
16401643
}
16411644
}

src/data/daily-seed/daily-run.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,8 @@ export function getDailyStartingBiome(): BiomeId {
8989
const biomes = getEnumValues(BiomeId);
9090
let totalWeight = 0;
9191
const biomeThresholds: number[] = [];
92-
for (const biome of getEnumValues(BiomeId)) {
92+
for (const biome of biomes) {
9393
const weight = dailyBiomeWeights[biome];
94-
if (weight === 0) {
95-
continue;
96-
}
9794

9895
// Keep track of the total weight & each biome's cumulative weight
9996
totalWeight += weight;

src/data/trainers/trainer-config.ts

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -623,20 +623,14 @@ export class TrainerConfig {
623623
* Initializes the trainer configuration for an evil team leader. Temporarily hardcoding evil leader teams though.
624624
* @param signatureSpecies The signature species for the evil team leader.
625625
* @param specialtyType The specialty type for the evil team Leader.
626-
* @param boolean Whether or not this is the rematch fight
627626
* @returns The updated TrainerConfig instance.
628627
*/
629628
initForEvilTeamLeader(
630629
title: string,
631630
signatureSpecies: (SpeciesId | SpeciesId[])[],
632-
rematch = false,
633631
specialtyType?: PokemonType,
634632
): TrainerConfig {
635-
if (rematch) {
636-
this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR);
637-
} else {
638-
this.setPartyTemplates(trainerPartyTemplates.RIVAL_5);
639-
}
633+
this.setPartyTemplates(trainerPartyTemplates.EVIL_LEADER);
640634
signatureSpecies.forEach((speciesPool, s) => {
641635
this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(coerceArray(speciesPool)));
642636
});
@@ -5643,7 +5637,7 @@ export const trainerConfigs: TrainerConfigs = {
56435637
),
56445638
[TrainerType.ROCKET_BOSS_GIOVANNI_2]: new TrainerConfig(++t)
56455639
.setName("Giovanni")
5646-
.initForEvilTeamLeader("Rocket Boss", [], true)
5640+
.initForEvilTeamLeader("Rocket Boss", [])
56475641
.setMixedBattleBgm("battle_rocket_boss")
56485642
.setVictoryBgm("victory_team_plasma")
56495643
.setPartyMemberFunc(
@@ -5750,7 +5744,7 @@ export const trainerConfigs: TrainerConfigs = {
57505744
),
57515745
[TrainerType.MAXIE_2]: new TrainerConfig(++t)
57525746
.setName("Maxie")
5753-
.initForEvilTeamLeader("Magma Boss", [], true)
5747+
.initForEvilTeamLeader("Magma Boss", [])
57545748
.setMixedBattleBgm("battle_aqua_magma_boss")
57555749
.setVictoryBgm("victory_team_plasma")
57565750
.setPartyMemberFunc(
@@ -5840,7 +5834,7 @@ export const trainerConfigs: TrainerConfigs = {
58405834
),
58415835
[TrainerType.ARCHIE_2]: new TrainerConfig(++t)
58425836
.setName("Archie")
5843-
.initForEvilTeamLeader("Aqua Boss", [], true)
5837+
.initForEvilTeamLeader("Aqua Boss", [])
58445838
.setMixedBattleBgm("battle_aqua_magma_boss")
58455839
.setVictoryBgm("victory_team_plasma")
58465840
.setPartyMemberFunc(
@@ -5916,7 +5910,7 @@ export const trainerConfigs: TrainerConfigs = {
59165910
),
59175911
[TrainerType.CYRUS_2]: new TrainerConfig(++t)
59185912
.setName("Cyrus")
5919-
.initForEvilTeamLeader("Galactic Boss", [], true)
5913+
.initForEvilTeamLeader("Galactic Boss", [])
59205914
.setMixedBattleBgm("battle_galactic_boss")
59215915
.setVictoryBgm("victory_team_plasma")
59225916
.setPartyMemberFunc(
@@ -5982,7 +5976,7 @@ export const trainerConfigs: TrainerConfigs = {
59825976
),
59835977
[TrainerType.GHETSIS_2]: new TrainerConfig(++t)
59845978
.setName("Ghetsis")
5985-
.initForEvilTeamLeader("Plasma Boss", [], true)
5979+
.initForEvilTeamLeader("Plasma Boss", [])
59865980
.setMixedBattleBgm("battle_plasma_boss")
59875981
.setVictoryBgm("victory_team_plasma")
59885982
.setPartyMemberFunc(
@@ -6037,15 +6031,15 @@ export const trainerConfigs: TrainerConfigs = {
60376031
.setVictoryBgm("victory_team_plasma")
60386032
.setPartyMemberFunc(0, getRandomPartyMemberFunc([SpeciesId.MIENSHAO]))
60396033
.setPartyMemberFunc(1, getRandomPartyMemberFunc([SpeciesId.HONCHKROW, SpeciesId.TALONFLAME]))
6034+
.setPartyMemberFunc(2, getRandomPartyMemberFunc([SpeciesId.MALAMAR]))
6035+
.setPartyMemberFunc(3, getRandomPartyMemberFunc([SpeciesId.AEGISLASH, SpeciesId.HISUI_GOODRA]))
60406036
.setPartyMemberFunc(
6041-
2,
6037+
4,
60426038
getRandomPartyMemberFunc([SpeciesId.PYROAR], TrainerSlot.TRAINER, true, p => {
60436039
p.generateAndPopulateMoveset();
60446040
p.gender = Gender.MALE;
60456041
}),
60466042
)
6047-
.setPartyMemberFunc(3, getRandomPartyMemberFunc([SpeciesId.MALAMAR]))
6048-
.setPartyMemberFunc(4, getRandomPartyMemberFunc([SpeciesId.AEGISLASH, SpeciesId.HISUI_GOODRA]))
60496043
.setPartyMemberFunc(
60506044
5,
60516045
getRandomPartyMemberFunc([SpeciesId.GYARADOS], TrainerSlot.TRAINER, true, p => {
@@ -6059,7 +6053,7 @@ export const trainerConfigs: TrainerConfigs = {
60596053
),
60606054
[TrainerType.LYSANDRE_2]: new TrainerConfig(++t)
60616055
.setName("Lysandre")
6062-
.initForEvilTeamLeader("Flare Boss", [], true)
6056+
.initForEvilTeamLeader("Flare Boss", [])
60636057
.setMixedBattleBgm("battle_flare_boss")
60646058
.setVictoryBgm("victory_team_plasma")
60656059
.setPartyMemberFunc(
@@ -6126,7 +6120,7 @@ export const trainerConfigs: TrainerConfigs = {
61266120
),
61276121
[TrainerType.LUSAMINE_2]: new TrainerConfig(++t)
61286122
.setName("Lusamine")
6129-
.initForEvilTeamLeader("Aether Boss", [], true)
6123+
.initForEvilTeamLeader("Aether Boss", [])
61306124
.setMixedBattleBgm("battle_aether_boss")
61316125
.setVictoryBgm("victory_team_plasma")
61326126
.setPartyMemberFunc(
@@ -6228,7 +6222,7 @@ export const trainerConfigs: TrainerConfigs = {
62286222
),
62296223
[TrainerType.GUZMA_2]: new TrainerConfig(++t)
62306224
.setName("Guzma")
6231-
.initForEvilTeamLeader("Skull Boss", [], true)
6225+
.initForEvilTeamLeader("Skull Boss", [])
62326226
.setMixedBattleBgm("battle_skull_boss")
62336227
.setVictoryBgm("victory_team_plasma")
62346228
.setPartyMemberFunc(
@@ -6346,7 +6340,7 @@ export const trainerConfigs: TrainerConfigs = {
63466340
),
63476341
[TrainerType.ROSE_2]: new TrainerConfig(++t)
63486342
.setName("Rose")
6349-
.initForEvilTeamLeader("Macro Boss", [], true)
6343+
.initForEvilTeamLeader("Macro Boss", [])
63506344
.setMixedBattleBgm("battle_macro_boss")
63516345
.setVictoryBgm("victory_team_plasma")
63526346
.setPartyMemberFunc(
@@ -6432,7 +6426,7 @@ export const trainerConfigs: TrainerConfigs = {
64326426
.setInstantTera(4), // Tera Fairy Sylveon
64336427
[TrainerType.PENNY_2]: new TrainerConfig(++t)
64346428
.setName("Cassiopeia")
6435-
.initForEvilTeamLeader("Star Boss", [], true)
6429+
.initForEvilTeamLeader("Star Boss", [])
64366430
.setMixedBattleBgm("battle_star_boss")
64376431
.setVictoryBgm("victory_team_plasma")
64386432
.setPartyMemberFunc(

src/data/trainers/trainer-party-template.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ export const trainerPartyTemplates = {
205205
new TrainerPartyTemplate(2, PartyMemberStrength.STRONGER, false, true, EvoLevelThresholdKind.STRONG),
206206
),
207207

208+
EVIL_LEADER: new TrainerPartyCompoundTemplate(
209+
new TrainerPartyTemplate(1, PartyMemberStrength.STRONG, undefined, undefined, EvoLevelThresholdKind.STRONG),
210+
new TrainerPartyTemplate(2, PartyMemberStrength.AVERAGE, undefined, undefined, EvoLevelThresholdKind.STRONG),
211+
new TrainerPartyTemplate(2, PartyMemberStrength.STRONG, undefined, undefined, EvoLevelThresholdKind.STRONG),
212+
new TrainerPartyTemplate(1, PartyMemberStrength.STRONGER, undefined, undefined, EvoLevelThresholdKind.STRONG),
213+
),
214+
208215
RIVAL: new TrainerPartyCompoundTemplate(
209216
new TrainerPartyTemplate(1, PartyMemberStrength.STRONG),
210217
new TrainerPartyTemplate(1, PartyMemberStrength.AVERAGE),

src/phases/game-over-phase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ export class GameOverPhase extends BattlePhase {
8787

8888
const availablePartyMembers = globalScene.getPokemonAllowedInBattle().length;
8989

90-
globalScene.phaseManager.pushNew("SummonPhase", 0);
90+
globalScene.phaseManager.pushNew("SummonPhase", 0, true, true);
9191
if (globalScene.currentBattle.double && availablePartyMembers > 1) {
92-
globalScene.phaseManager.pushNew("SummonPhase", 1);
92+
globalScene.phaseManager.pushNew("SummonPhase", 1, true, true);
9393
}
9494
if (
9595
globalScene.currentBattle.waveIndex > 1

src/plugins/i18n.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ const fonts: LoadingFontFaceProperty[] = [
9494
unicodeRange: unicodeRanges.thai,
9595
}),
9696
},
97+
{
98+
face: new FontFace("pkmnems", "url(./fonts/terrible-thaifix.ttf)", {
99+
unicodeRange: unicodeRanges.thai,
100+
}),
101+
extraOptions: { sizeAdjust: "133%" },
102+
},
97103
];
98104

99105
//#region Functions

src/ui/settings/abstract-control-settings-ui-handler.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,18 +206,13 @@ export abstract class AbstractControlSettingsUiHandler extends UiHandler {
206206
settingFiltered.forEach((setting, s) => {
207207
// Convert the setting key from format 'Key_Name' to 'Key name' for display.
208208
// TODO: IDK if this can be followed by both an underscore and a space, so leaving it as a regex matching both for now
209-
const i18nKey = toCamelCase(setting.replace(/Alt(_| )/, ""));
209+
const i18nKey = toCamelCase(setting.replace(/ALT(_| )/, ""));
210210

211211
// Create and add a text object for the setting name to the scene.
212212
const isLock = this.settingBlacklisted.includes(this.setting[setting]);
213213
const labelStyle = isLock ? TextStyle.SETTINGS_LOCKED : TextStyle.SETTINGS_LABEL;
214-
const isAlt = setting.includes("Alt");
215-
let labelText: string;
216-
if (isAlt) {
217-
labelText = `${i18next.t(`settings:${i18nKey}`)}${i18next.t("settings:alt")}`;
218-
} else {
219-
labelText = i18next.t(`settings:${i18nKey}`);
220-
}
214+
const isAlt = setting.includes("ALT");
215+
const labelText = i18next.t(`settings:${i18nKey}`) + (isAlt ? i18next.t("settings:alt") : "");
221216
settingLabels[s] = addTextObject(8, 28 + s * 16, labelText, labelStyle);
222217
settingLabels[s].setOrigin(0, 0);
223218
optionsContainer.add(settingLabels[s]);

0 commit comments

Comments
 (0)