Compare commits

...

9 Commits

Author SHA1 Message Date
td76099
8a0eaa0009
[Bug] Fixing multi-hit drain moves so they heal based on individual hit and not total turn damage (#1974) 2024-06-08 23:53:03 -04:00
Matthew
ce3a9c9c87
artist request base shiny revert (#1980) 2024-06-09 12:28:56 +10:00
Madmadness65
67a0ae49b3
Add new Gym Leader, Elite Four, and Champion music (#1971) 2024-06-08 20:51:37 -05:00
SquillWall
a1171eceb9
[QoL] Show currently bound controls on starter menu for last active device (#1859)
* show currently bound controls on starter menu for last active device

* add special handling for touch controls

* remove hardcoded controls for all locales
2024-06-09 03:35:11 +02:00
Xavion3
07f0a67c78
Make getTypes ignore transform when ignoring overrides (#1976) 2024-06-08 21:08:30 -04:00
Xavion3
f0a826b8f4
[Bug] Fix Victini's generation for challenges. (#1973)
* Make victini count as gen 5 challenge instead of 4

* Add comment
2024-06-08 21:06:36 -04:00
Pancakes
ae02943b16
Use secure cookies 2024-06-08 21:03:33 -04:00
40chyan
60a3edb918
[Localization] challenge.ts zh_cn translation (#1958)
* Update challenges.ts

* Update challenges.ts
2024-06-08 19:06:27 -05:00
Xavion3
8e0e8952da
Fix switching moves in challenge mode (#1972) 2024-06-09 01:05:18 +02:00
37 changed files with 371 additions and 254 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1745,27 +1745,27 @@
1
],
"641-incarnate": [
1,
0,
0,
0
],
"641-therian": [
1,
0,
0,
0
],
"642-incarnate": [
1,
0,
0,
0
],
"642-therian": [
1,
0,
0,
0
],
"645-incarnate": [
1,
0,
0,
0
],
@ -4608,32 +4608,32 @@
1
],
"641-incarnate": [
1,
0,
0,
0
],
"641-therian": [
1,
0,
0,
0
],
"642-incarnate": [
1,
0,
0,
0
],
"642-therian": [
1,
0,
0,
0
],
"645-incarnate": [
1,
0,
0,
0
],
"645-therian": [
1,
0,
0,
0
],

View File

@ -234,6 +234,7 @@ export default class BattleScene extends SceneBase {
public rngSeedOverride: string = "";
public rngOffset: integer = 0;
public inputMethod: string;
private infoToggles: InfoToggle[] = [];
/**
@ -1679,34 +1680,64 @@ export default class BattleScene extends SceneBase {
getBgmLoopPoint(bgmName: string): number {
switch (bgmName) {
case "battle_kanto_champion":
case "battle_kanto_champion": //B2W2 Kanto Champion Battle
return 13.950;
case "battle_johto_champion":
case "battle_johto_champion": //B2W2 Johto Champion Battle
return 23.498;
case "battle_hoenn_champion":
case "battle_hoenn_champion": //B2W2 Hoenn Champion Battle
return 11.328;
case "battle_sinnoh_champion":
case "battle_sinnoh_champion": //B2W2 Sinnoh Champion Battle
return 12.235;
case "battle_champion_alder":
case "battle_champion_alder": //BW Unova Champion Battle
return 27.653;
case "battle_champion_iris":
case "battle_champion_iris": //B2W2 Unova Champion Battle
return 10.145;
case "battle_elite":
case "battle_kalos_champion": //XY Kalos Champion Battle
return 10.380;
case "battle_alola_champion": //USUM Alola Champion Battle
return 13.025;
case "battle_galar_champion": //SWSH Galar Champion Battle
return 61.635;
case "battle_champion_geeta": //SV Champion Geeta Battle
return 37.447;
case "battle_champion_nemona": //SV Champion Nemona Battle
return 14.914;
case "battle_champion_kieran": //SV Champion Kieran Battle
return 7.206;
case "battle_hoenn_elite": //ORAS Elite Four Battle
return 11.350;
case "battle_unova_elite": //BW Elite Four Battle
return 17.730;
case "battle_final_encounter":
case "battle_kalos_elite": //XY Elite Four Battle
return 12.340;
case "battle_alola_elite": //SM Elite Four Battle
return 19.212;
case "battle_galar_elite": //SWSH League Tournament Battle
return 164.069;
case "battle_paldea_elite": //SV Elite Four Battle
return 12.770;
case "battle_bb_elite": //SV BB League Elite Four Battle
return 19.434;
case "battle_final_encounter": //PMD RTDX Rayquaza's Domain
return 19.159;
case "battle_final":
case "battle_final": //BW Ghetsis Battle
return 16.453;
case "battle_kanto_gym":
case "battle_kanto_gym": //B2W2 Kanto Gym Battle
return 13.857;
case "battle_johto_gym":
case "battle_johto_gym": //B2W2 Johto Gym Battle
return 12.911;
case "battle_hoenn_gym":
case "battle_hoenn_gym": //B2W2 Hoenn Gym Battle
return 12.379;
case "battle_sinnoh_gym":
case "battle_sinnoh_gym": //B2W2 Sinnoh Gym Battle
return 13.122;
case "battle_unova_gym":
case "battle_unova_gym": //BW Unova Gym Battle
return 19.145;
case "battle_kalos_gym": //XY Kalos Gym Battle
return 44.810;
case "battle_galar_gym": //SWSH Galar Gym Battle
return 171.262;
case "battle_paldea_gym": //SV Paldea Gym Battle
return 127.489;
case "battle_legendary_kanto": //XY Kanto Legendary Battle
return 32.966;
case "battle_legendary_raikou": //HGSS Raikou Battle
@ -1775,19 +1806,19 @@ export default class BattleScene extends SceneBase {
return 24.377;
case "battle_legendary_pecharunt": //SV Pecharunt Battle
return 6.508;
case "battle_rival":
case "battle_rival": //BW Rival Battle
return 13.689;
case "battle_rival_2":
case "battle_rival_2": //BW N Battle
return 17.714;
case "battle_rival_3":
case "battle_rival_3": //BW Final N Battle
return 17.586;
case "battle_trainer":
case "battle_trainer": //BW Trainer Battle
return 13.686;
case "battle_wild":
case "battle_wild": //BW Wild Battle
return 12.703;
case "battle_wild_strong":
case "battle_wild_strong": //BW Strong Wild Battle
return 13.940;
case "end_summit":
case "end_summit": //PMD RTDX Sky Tower Summit
return 30.025;
}

View File

@ -197,7 +197,11 @@ export default class Battle {
if (!this.started && this.trainer.config.encounterBgm && this.trainer.getEncounterMessages()?.length) {
return `encounter_${this.trainer.getEncounterBgm()}`;
}
return this.trainer.getBattleBgm();
if (scene.musicPreference === 0) {
return this.trainer.getBattleBgm();
} else {
return this.trainer.getMixedBattleBgm();
}
} else if (this.gameMode.isClassic && this.waveIndex > 195 && this.battleSpec !== BattleSpec.FINAL_BOSS) {
return "end_summit";
}
@ -434,13 +438,13 @@ export const classicFixedBattles: FixedBattleConfigs = {
[145]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
.setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_5, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)),
[182]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LORELEI, TrainerType.WILL, TrainerType.SIDNEY, TrainerType.AARON, TrainerType.SHAUNTAL, TrainerType.MALVA, [ TrainerType.HALA, TrainerType.MOLAYNE ],TrainerType.MARNIE_ELITE, TrainerType.RIKA, TrainerType.CRISPIN ])),
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LORELEI, TrainerType.WILL, TrainerType.SIDNEY, TrainerType.AARON, TrainerType.SHAUNTAL, TrainerType.MALVA, [ TrainerType.HALA, TrainerType.MOLAYNE ], TrainerType.MARNIE_ELITE, TrainerType.RIKA, TrainerType.CRISPIN ])),
[184]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BRUNO, TrainerType.KOGA, TrainerType.PHOEBE, TrainerType.BERTHA, TrainerType.MARSHAL, TrainerType.SIEBOLD, TrainerType.OLIVIA, TrainerType.NESSA_ELITE, TrainerType.POPPY, TrainerType.AMARYS ])),
[186]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.AGATHA, TrainerType.BRUNO, TrainerType.GLACIA, TrainerType.FLINT, TrainerType.GRIMSLEY, TrainerType.WIKSTROM, TrainerType.ACEROLA, [TrainerType.BEA_ELITE,TrainerType.ALLISTER_ELITE], TrainerType.LARRY_ELITE, TrainerType.LACEY ])),
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.AGATHA, TrainerType.BRUNO, TrainerType.GLACIA, TrainerType.FLINT, TrainerType.GRIMSLEY, TrainerType.WIKSTROM, TrainerType.ACEROLA, [ TrainerType.BEA_ELITE, TrainerType.ALLISTER_ELITE ], TrainerType.LARRY_ELITE, TrainerType.LACEY ])),
[188]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI,TrainerType.RAIHAN_ELITE, TrainerType.HASSEL, TrainerType.DRAYTON ])),
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI, TrainerType.RAIHAN_ELITE, TrainerType.HASSEL, TrainerType.DRAYTON ])),
[190]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BLUE, [ TrainerType.RED, TrainerType.LANCE_CHAMPION ], [ TrainerType.STEVEN, TrainerType.WALLACE ], TrainerType.CYNTHIA, [ TrainerType.ALDER, TrainerType.IRIS ], TrainerType.DIANTHA, TrainerType.HAU, TrainerType.LEON, [ TrainerType.GEETA, TrainerType.NEMONA ], TrainerType.KIERAN ])),
[195]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)

View File

@ -267,11 +267,18 @@ export class SingleGenerationChallenge extends Challenge {
return false;
}
/**
* We have special code below for victini because it is classed as a generation 4 pokemon in the code
* despite being a generation 5 pokemon. This is due to UI constraints, the starter select screen has
* no more room for pokemon so victini is put in the gen 4 section instead. This code just overrides the
* normal generation check to correctly treat victini as gen 5.
*/
switch (challengeType) {
case ChallengeType.STARTER_CHOICE:
const species = args[0] as PokemonSpecies;
const isValidStarter = args[1] as Utils.BooleanHolder;
if (species.generation !== this.value) {
const starterGeneration = species.speciesId === Species.VICTINI ? 5 : species.generation;
if (starterGeneration !== this.value) {
isValidStarter.value = false;
return true;
}
@ -279,7 +286,9 @@ export class SingleGenerationChallenge extends Challenge {
case ChallengeType.POKEMON_IN_BATTLE:
const pokemon = args[0] as Pokemon;
const isValidPokemon = args[1] as Utils.BooleanHolder;
if (pokemon.isPlayer() && ((pokemon.species.formIndex === 0 ? pokemon.species : getPokemonSpecies(pokemon.species.speciesId)).generation !== this.value || (pokemon.isFusion() && (pokemon.fusionSpecies.formIndex === 0 ? pokemon.fusionSpecies : getPokemonSpecies(pokemon.fusionSpecies.speciesId)).generation !== this.value))) {
const baseGeneration = pokemon.species.speciesId === Species.VICTINI ? 5 : getPokemonSpecies(pokemon.species.speciesId).generation;
const fusionGeneration = pokemon.isFusion() ? pokemon.fusionSpecies.speciesId === Species.VICTINI ? 5 : getPokemonSpecies(pokemon.fusionSpecies.speciesId).generation : 0;
if (pokemon.isPlayer() && (baseGeneration !== this.value || (pokemon.isFusion() && fusionGeneration !== this.value))) {
isValidPokemon.value = false;
return true;
}

View File

@ -1467,7 +1467,7 @@ export class HitHealAttr extends MoveEffectAttr {
message = i18next.t("battle:drainMessage", {pokemonName: target.name});
} else {
// Default healing formula used by draining moves like Absorb, Draining Kiss, Bitter Blade, etc.
healAmount = Math.max(Math.floor(user.turnData.damageDealt * this.healRatio), 1);
healAmount = Math.max(Math.floor(user.turnData.currDamageDealt * this.healRatio), 1);
message = i18next.t("battle:regainHealth", {pokemonName: user.name});
}
if (reverseDrain) {
@ -4416,7 +4416,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
}
const party = player ? user.scene.getParty() : user.scene.getEnemyParty();
return (!player && !user.scene.currentBattle.battleType) || party.filter(p => !p.isFainted() && (player || (p as EnemyPokemon).trainerSlot === (switchOutTarget as EnemyPokemon).trainerSlot)).length > user.scene.currentBattle.getBattlerCount();
return (!player && !user.scene.currentBattle.battleType) || party.filter(p => p.isAllowedInBattle() && (player || (p as EnemyPokemon).trainerSlot === (switchOutTarget as EnemyPokemon).trainerSlot)).length > user.scene.currentBattle.getBattlerCount();
};
}

View File

@ -187,6 +187,7 @@ export class TrainerConfig {
public isBoss: boolean = false;
public hasStaticParty: boolean = false;
public useSameSeedForAllMembers: boolean = false;
public mixedBattleBgm: string;
public battleBgm: string;
public encounterBgm: string;
public femaleEncounterBgm: string;
@ -440,6 +441,11 @@ export class TrainerConfig {
return this;
}
setMixedBattleBgm(mixedBattleBgm: string): TrainerConfig {
this.mixedBattleBgm = mixedBattleBgm;
return this;
}
setBattleBgm(battleBgm: string): TrainerConfig {
this.battleBgm = battleBgm;
return this;
@ -605,7 +611,7 @@ export class TrainerConfig {
this.setMoneyMultiplier(3.25);
this.setBoss();
this.setStaticParty();
this.setBattleBgm("battle_elite");
this.setBattleBgm("battle_unova_elite");
this.setVictoryBgm("victory_gym");
this.setGenModifiersFunc(party => getRandomTeraModifiers(party, 2, specialtyTypes.length ? specialtyTypes : null));
@ -1142,76 +1148,76 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerType.BRYCEN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRYCEN"],true, Type.ICE),
[TrainerType.DRAYDEN]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["DRAYDEN"],true, Type.DRAGON),
[TrainerType.MARLON]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MARLON"],true, Type.WATER),
[TrainerType.VIOLA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VIOLA"],false, Type.BUG),
[TrainerType.GRANT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRANT"],true, Type.ROCK),
[TrainerType.KORRINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KORRINA"],false, Type.FIGHTING),
[TrainerType.RAMOS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RAMOS"],true, Type.GRASS),
[TrainerType.CLEMONT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLEMONT"],true, Type.ELECTRIC),
[TrainerType.VALERIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VALERIE"],false, Type.FAIRY),
[TrainerType.OLYMPIA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OLYMPIA"],false, Type.PSYCHIC),
[TrainerType.WULFRIC]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WULFRIC"],true, Type.ICE),
[TrainerType.MILO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MILO"],true, Type.GRASS),
[TrainerType.NESSA]: new TrainerConfig(++t).setName("Nessa").initForGymLeader(signatureSpecies["NESSA"],false, Type.WATER),
[TrainerType.KABU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KABU"],true, Type.FIRE),
[TrainerType.BEA]: new TrainerConfig(++t).setName("Bea").initForGymLeader(signatureSpecies["BEA"],false, Type.FIGHTING),
[TrainerType.ALLISTER]: new TrainerConfig(++t).setName("Allister").initForGymLeader(signatureSpecies["ALLISTER"],true, Type.GHOST),
[TrainerType.OPAL]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OPAL"],false, Type.FAIRY),
[TrainerType.BEDE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BEDE"],true, Type.FAIRY),
[TrainerType.GORDIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GORDIE"],true, Type.ROCK),
[TrainerType.MELONY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MELONY"],false, Type.ICE),
[TrainerType.PIERS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["PIERS"],true, Type.DARK).setHasDouble("piers_marnie_double").setDoubleTrainerType(TrainerType.MARNIE).setDoubleTitle("gym_leader_double"),
[TrainerType.MARNIE]: new TrainerConfig(++t).setName("Marnie").initForGymLeader(signatureSpecies["MARNIE"],false, Type.DARK).setHasDouble("marnie_piers_double").setDoubleTrainerType(TrainerType.PIERS).setDoubleTitle("gym_leader_double"),
[TrainerType.RAIHAN]: new TrainerConfig(++t).setName("Raihan").initForGymLeader(signatureSpecies["RAIHAN"],true, Type.DRAGON),
[TrainerType.KATY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KATY"],false, Type.BUG),
[TrainerType.BRASSIUS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRASSIUS"],true, Type.GRASS),
[TrainerType.IONO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["IONO"],false, Type.ELECTRIC),
[TrainerType.KOFU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KOFU"],true, Type.WATER),
[TrainerType.LARRY]: new TrainerConfig(++t).setName("Larry").initForGymLeader(signatureSpecies["LARRY"],true, Type.NORMAL),
[TrainerType.RYME]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RYME"],false, Type.GHOST),
[TrainerType.TULIP]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["TULIP"],false, Type.PSYCHIC),
[TrainerType.GRUSHA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRUSHA"],true, Type.ICE),
[TrainerType.VIOLA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VIOLA"],false, Type.BUG).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.GRANT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRANT"],true, Type.ROCK).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.KORRINA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KORRINA"],false, Type.FIGHTING).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.RAMOS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RAMOS"],true, Type.GRASS).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.CLEMONT]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["CLEMONT"],true, Type.ELECTRIC).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.VALERIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["VALERIE"],false, Type.FAIRY).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.OLYMPIA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OLYMPIA"],false, Type.PSYCHIC).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.WULFRIC]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["WULFRIC"],true, Type.ICE).setMixedBattleBgm("battle_kalos_gym"),
[TrainerType.MILO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MILO"],true, Type.GRASS).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.NESSA]: new TrainerConfig(++t).setName("Nessa").initForGymLeader(signatureSpecies["NESSA"],false, Type.WATER).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.KABU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KABU"],true, Type.FIRE).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.BEA]: new TrainerConfig(++t).setName("Bea").initForGymLeader(signatureSpecies["BEA"],false, Type.FIGHTING).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.ALLISTER]: new TrainerConfig(++t).setName("Allister").initForGymLeader(signatureSpecies["ALLISTER"],true, Type.GHOST).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.OPAL]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["OPAL"],false, Type.FAIRY).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.BEDE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BEDE"],true, Type.FAIRY).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.GORDIE]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GORDIE"],true, Type.ROCK).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.MELONY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["MELONY"],false, Type.ICE).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.PIERS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["PIERS"],true, Type.DARK).setHasDouble("piers_marnie_double").setDoubleTrainerType(TrainerType.MARNIE).setDoubleTitle("gym_leader_double").setMixedBattleBgm("battle_galar_gym"),
[TrainerType.MARNIE]: new TrainerConfig(++t).setName("Marnie").initForGymLeader(signatureSpecies["MARNIE"],false, Type.DARK).setHasDouble("marnie_piers_double").setDoubleTrainerType(TrainerType.PIERS).setDoubleTitle("gym_leader_double").setMixedBattleBgm("battle_galar_gym"),
[TrainerType.RAIHAN]: new TrainerConfig(++t).setName("Raihan").initForGymLeader(signatureSpecies["RAIHAN"],true, Type.DRAGON).setMixedBattleBgm("battle_galar_gym"),
[TrainerType.KATY]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KATY"],false, Type.BUG).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.BRASSIUS]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["BRASSIUS"],true, Type.GRASS).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.IONO]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["IONO"],false, Type.ELECTRIC).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.KOFU]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["KOFU"],true, Type.WATER).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.LARRY]: new TrainerConfig(++t).setName("Larry").initForGymLeader(signatureSpecies["LARRY"],true, Type.NORMAL).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.RYME]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["RYME"],false, Type.GHOST).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.TULIP]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["TULIP"],false, Type.PSYCHIC).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.GRUSHA]: new TrainerConfig(++t).initForGymLeader(signatureSpecies["GRUSHA"],true, Type.ICE).setMixedBattleBgm("battle_paldea_gym"),
[TrainerType.LORELEI]: new TrainerConfig((t = TrainerType.LORELEI)).initForEliteFour(signatureSpecies["LORELEI"],false, Type.ICE),
[TrainerType.BRUNO]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BRUNO"], true, Type.FIGHTING),
[TrainerType.AGATHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AGATHA"], false,Type.GHOST),
[TrainerType.LANCE]: new TrainerConfig(++t).setName("Lance").initForEliteFour(signatureSpecies["LANCE"],true, Type.DRAGON),
[TrainerType.WILL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WILL"],true, Type.PSYCHIC),
[TrainerType.KOGA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KOGA"], true, Type.POISON),
[TrainerType.KAREN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAREN"],false, Type.DARK),
[TrainerType.SIDNEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIDNEY"],true, Type.DARK),
[TrainerType.PHOEBE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["PHOEBE"],false, Type.GHOST),
[TrainerType.GLACIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["GLACIA"],false, Type.ICE),
[TrainerType.DRAKE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAKE"],true, Type.DRAGON),
[TrainerType.AARON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AARON"],true, Type.BUG),
[TrainerType.BERTHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BERTHA"],false, Type.GROUND),
[TrainerType.FLINT]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["FLINT"],true, Type.FIRE),
[TrainerType.LUCIAN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LUCIAN"], true,Type.PSYCHIC),
[TrainerType.LORELEI]: new TrainerConfig((t = TrainerType.LORELEI)).initForEliteFour(signatureSpecies["LORELEI"],false, Type.ICE).setBattleBgm("battle_kanto_gym"),
[TrainerType.BRUNO]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BRUNO"], true, Type.FIGHTING).setBattleBgm("battle_kanto_gym"),
[TrainerType.AGATHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AGATHA"], false,Type.GHOST).setBattleBgm("battle_kanto_gym"),
[TrainerType.LANCE]: new TrainerConfig(++t).setName("Lance").initForEliteFour(signatureSpecies["LANCE"],true, Type.DRAGON).setBattleBgm("battle_kanto_gym"),
[TrainerType.WILL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WILL"],true, Type.PSYCHIC).setBattleBgm("battle_johto_gym"),
[TrainerType.KOGA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KOGA"], true, Type.POISON).setBattleBgm("battle_johto_gym"),
[TrainerType.KAREN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAREN"],false, Type.DARK).setBattleBgm("battle_johto_gym"),
[TrainerType.SIDNEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIDNEY"],true, Type.DARK).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.PHOEBE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["PHOEBE"],false, Type.GHOST).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.GLACIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["GLACIA"],false, Type.ICE).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.DRAKE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAKE"],true, Type.DRAGON).setMixedBattleBgm("battle_hoenn_elite"),
[TrainerType.AARON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AARON"],true, Type.BUG).setBattleBgm("battle_sinnoh_gym"),
[TrainerType.BERTHA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["BERTHA"],false, Type.GROUND).setBattleBgm("battle_sinnoh_gym"),
[TrainerType.FLINT]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["FLINT"],true, Type.FIRE).setBattleBgm("battle_sinnoh_gym"),
[TrainerType.LUCIAN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LUCIAN"], true,Type.PSYCHIC).setBattleBgm("battle_sinnoh_gym"),
[TrainerType.SHAUNTAL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SHAUNTAL"],false, Type.GHOST),
[TrainerType.MARSHAL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MARSHAL"],true, Type.FIGHTING),
[TrainerType.GRIMSLEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["GRIMSLEY"],true, Type.DARK),
[TrainerType.CAITLIN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["CAITLIN"],false, Type.PSYCHIC),
[TrainerType.MALVA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MALVA"], false,Type.FIRE),
[TrainerType.SIEBOLD]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIEBOLD"], true,Type.WATER),
[TrainerType.WIKSTROM]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WIKSTROM"],true, Type.STEEL),
[TrainerType.DRASNA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRASNA"],false, Type.DRAGON),
[TrainerType.HALA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HALA"],true, Type.FIGHTING),
[TrainerType.MOLAYNE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MOLAYNE"],true, Type.STEEL),
[TrainerType.OLIVIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["OLIVIA"],false, Type.ROCK),
[TrainerType.ACEROLA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["ACEROLA"],false, Type.GHOST),
[TrainerType.KAHILI]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAHILI"],false, Type.FLYING),
[TrainerType.MARNIE_ELITE]: new TrainerConfig(++t).setName("Marnie").initForEliteFour(signatureSpecies["MARNIE_ELITE"],false, Type.DARK),
[TrainerType.NESSA_ELITE]: new TrainerConfig(++t).setName("Nessa").initForEliteFour(signatureSpecies["NESSA_ELITE"],false, Type.WATER),
[TrainerType.BEA_ELITE]: new TrainerConfig(++t).setName("Bea").initForEliteFour(signatureSpecies["BEA_ELITE"],false, Type.FIGHTING),
[TrainerType.ALLISTER_ELITE]: new TrainerConfig(++t).setName("Allister").initForEliteFour(signatureSpecies["ALLISTER_ELITE"],true, Type.GHOST),
[TrainerType.RAIHAN_ELITE]: new TrainerConfig(++t).setName("Raihan").initForEliteFour(signatureSpecies["RAIHAN_ELITE"],true, Type.DRAGON),
[TrainerType.RIKA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["RIKA"],false, Type.GROUND),
[TrainerType.POPPY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["POPPY"],false, Type.STEEL),
[TrainerType.LARRY_ELITE]: new TrainerConfig(++t).setName("Larry").initForEliteFour(signatureSpecies["LARRY_ELITE"],true, Type.NORMAL, Type.FLYING),
[TrainerType.HASSEL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HASSEL"],true, Type.DRAGON),
[TrainerType.CRISPIN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["CRISPIN"],true, Type.FIRE),
[TrainerType.AMARYS]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AMARYS"],false, Type.STEEL),
[TrainerType.LACEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LACEY"],false, Type.FAIRY),
[TrainerType.DRAYTON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAYTON"],true, Type.DRAGON),
[TrainerType.MALVA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MALVA"], false,Type.FIRE).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.SIEBOLD]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["SIEBOLD"], true,Type.WATER).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.WIKSTROM]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["WIKSTROM"],true, Type.STEEL).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.DRASNA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRASNA"],false, Type.DRAGON).setMixedBattleBgm("battle_kalos_elite"),
[TrainerType.HALA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HALA"],true, Type.FIGHTING).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.MOLAYNE]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["MOLAYNE"],true, Type.STEEL).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.OLIVIA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["OLIVIA"],false, Type.ROCK).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.ACEROLA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["ACEROLA"],false, Type.GHOST).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.KAHILI]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["KAHILI"],false, Type.FLYING).setMixedBattleBgm("battle_alola_elite"),
[TrainerType.MARNIE_ELITE]: new TrainerConfig(++t).setName("Marnie").initForEliteFour(signatureSpecies["MARNIE_ELITE"],false, Type.DARK).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.NESSA_ELITE]: new TrainerConfig(++t).setName("Nessa").initForEliteFour(signatureSpecies["NESSA_ELITE"],false, Type.WATER).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.BEA_ELITE]: new TrainerConfig(++t).setName("Bea").initForEliteFour(signatureSpecies["BEA_ELITE"],false, Type.FIGHTING).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.ALLISTER_ELITE]: new TrainerConfig(++t).setName("Allister").initForEliteFour(signatureSpecies["ALLISTER_ELITE"],true, Type.GHOST).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.RAIHAN_ELITE]: new TrainerConfig(++t).setName("Raihan").initForEliteFour(signatureSpecies["RAIHAN_ELITE"],true, Type.DRAGON).setMixedBattleBgm("battle_galar_elite"),
[TrainerType.RIKA]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["RIKA"],false, Type.GROUND).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.POPPY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["POPPY"],false, Type.STEEL).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.LARRY_ELITE]: new TrainerConfig(++t).setName("Larry").initForEliteFour(signatureSpecies["LARRY_ELITE"],true, Type.NORMAL, Type.FLYING).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.HASSEL]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["HASSEL"],true, Type.DRAGON).setMixedBattleBgm("battle_paldea_elite"),
[TrainerType.CRISPIN]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["CRISPIN"],true, Type.FIRE).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.AMARYS]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["AMARYS"],false, Type.STEEL).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.LACEY]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["LACEY"],false, Type.FAIRY).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.DRAYTON]: new TrainerConfig(++t).initForEliteFour(signatureSpecies["DRAYTON"],true, Type.DRAGON).setMixedBattleBgm("battle_bb_elite"),
[TrainerType.BLUE]: new TrainerConfig((t = TrainerType.BLUE)).initForChampion(signatureSpecies["BLUE"],true).setBattleBgm("battle_kanto_champion").setHasDouble("blue_red_double").setDoubleTrainerType(TrainerType.RED).setDoubleTitle("champion_double")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.ALAKAZAM], TrainerSlot.TRAINER, true, p => {
@ -1275,7 +1281,7 @@ export const trainerConfigs: TrainerConfigs = {
p.formIndex = 1;
p.generateAndPopulateMoveset();
})),
[TrainerType.DIANTHA]: new TrainerConfig(++t).initForChampion(signatureSpecies["DIANTHA"],false)
[TrainerType.DIANTHA]: new TrainerConfig(++t).initForChampion(signatureSpecies["DIANTHA"],false).setMixedBattleBgm("battle_kalos_champion")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.GOURGEIST], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset();
}))
@ -1283,11 +1289,11 @@ export const trainerConfigs: TrainerConfigs = {
p.formIndex = 1;
p.generateAndPopulateMoveset();
})),
[TrainerType.HAU]: new TrainerConfig(++t).initForChampion(signatureSpecies["HAU"],true)
[TrainerType.HAU]: new TrainerConfig(++t).initForChampion(signatureSpecies["HAU"],true).setMixedBattleBgm("battle_alola_champion")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.ALOLA_RAICHU], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset();
})),
[TrainerType.LEON]: new TrainerConfig(++t).initForChampion(signatureSpecies["LEON"],true)
[TrainerType.LEON]: new TrainerConfig(++t).initForChampion(signatureSpecies["LEON"],true).setMixedBattleBgm("battle_galar_champion")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.RILLABOOM, Species.CINDERACE, Species.INTELEON], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset();
}))
@ -1295,15 +1301,15 @@ export const trainerConfigs: TrainerConfigs = {
p.formIndex = 3;
p.generateAndPopulateMoveset();
})),
[TrainerType.GEETA]: new TrainerConfig(++t).initForChampion(signatureSpecies["GEETA"],false)
[TrainerType.GEETA]: new TrainerConfig(++t).initForChampion(signatureSpecies["GEETA"],false).setMixedBattleBgm("battle_champion_geeta")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.GLIMMORA], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset();
})),
[TrainerType.NEMONA]: new TrainerConfig(++t).initForChampion(signatureSpecies["NEMONA"],false)
[TrainerType.NEMONA]: new TrainerConfig(++t).initForChampion(signatureSpecies["NEMONA"],false).setMixedBattleBgm("battle_champion_nemona")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.LYCANROC], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset();
})),
[TrainerType.KIERAN]: new TrainerConfig(++t).initForChampion(signatureSpecies["KIERAN"],true)
[TrainerType.KIERAN]: new TrainerConfig(++t).initForChampion(signatureSpecies["KIERAN"],true).setMixedBattleBgm("battle_champion_kieran")
.setPartyMemberFunc(0, getRandomPartyMemberFunc([Species.POLIWRATH, Species.POLITOED], TrainerSlot.TRAINER, true, p => {
p.generateAndPopulateMoveset();
})),

View File

@ -857,11 +857,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
if (!ignoreOverride && this.summonData?.types) {
this.summonData.types.forEach(t => types.push(t));
} else {
const speciesForm = this.getSpeciesForm();
const speciesForm = this.getSpeciesForm(ignoreOverride);
types.push(speciesForm.type1);
const fusionSpeciesForm = this.getFusionSpeciesForm();
const fusionSpeciesForm = this.getFusionSpeciesForm(ignoreOverride);
if (fusionSpeciesForm) {
if (fusionSpeciesForm.type2 !== null && fusionSpeciesForm.type2 !== speciesForm.type1) {
types.push(fusionSpeciesForm.type2);

View File

@ -166,6 +166,10 @@ export default class Trainer extends Phaser.GameObjects.Container {
return this.config.doubleOnly || this.variant === TrainerVariant.DOUBLE;
}
getMixedBattleBgm(): string {
return this.config.mixedBattleBgm;
}
getBattleBgm(): string {
return this.config.battleBgm;
}

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "Select a move to swap with",
"unlockPassive": "Unlock Passive",
"reduceCost": "Reduce Cost",
"cycleShiny": "R: Cycle Shiny",
"cycleForm": "F: Cycle Form",
"cycleGender": "G: Cycle Gender",
"cycleAbility": "E: Cycle Ability",
"cycleNature": "N: Cycle Nature",
"cycleVariant": "V: Cycle Variant",
"cycleShiny": ": Cycle Shiny",
"cycleForm": ": Cycle Form",
"cycleGender": ": Cycle Gender",
"cycleAbility": ": Cycle Ability",
"cycleNature": ": Cycle Nature",
"cycleVariant": ": Cycle Variant",
"enablePassive": "Enable Passive",
"disablePassive": "Disable Passive",
"locked": "Locked",

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "Elige el movimiento que sustituirá a",
"unlockPassive": "Añadir Pasiva",
"reduceCost": "Reducir Coste",
"cycleShiny": "R: Cambiar Shiny",
"cycleForm": "F: Cambiar Forma",
"cycleGender": "G: Cambiar Género",
"cycleAbility": "E: Cambiar Habilidad",
"cycleNature": "N: Cambiar Naturaleza",
"cycleVariant": "V: Cambiar Variante",
"cycleShiny": ": Cambiar Shiny",
"cycleForm": ": Cambiar Forma",
"cycleGender": ": Cambiar Género",
"cycleAbility": ": Cambiar Habilidad",
"cycleNature": ": Cambiar Naturaleza",
"cycleVariant": ": Cambiar Variante",
"enablePassive": "Activar Pasiva",
"disablePassive": "Desactivar Pasiva",
"locked": "Bloqueado",

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "Sélectionnez laquelle échanger avec",
"unlockPassive": "Débloquer Passif",
"reduceCost": "Diminuer le cout",
"cycleShiny": "R: » Chromatiques",
"cycleForm": "F: » Formes",
"cycleGender": "G: » Sexes",
"cycleAbility": "E: » Talents",
"cycleNature": "N: » Natures",
"cycleVariant": "V: » Variants",
"cycleShiny": ": » Chromatiques",
"cycleForm": ": » Formes",
"cycleGender": ": » Sexes",
"cycleAbility": ": » Talents",
"cycleNature": ": » Natures",
"cycleVariant": ": » Variants",
"enablePassive": "Activer Passif",
"disablePassive": "Désactiver Passif",
"locked": "Verrouillé",

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "Seleziona una mossa da scambiare con",
"unlockPassive": "Sblocca Passiva",
"reduceCost": "Riduci Costo",
"cycleShiny": "R: Alterna Shiny",
"cycleForm": "F: Alterna Forma",
"cycleGender": "G: Alterna Sesso",
"cycleAbility": "E: Alterna Abilità",
"cycleNature": "N: Alterna Natura",
"cycleVariant": "V: Alterna Variante",
"cycleShiny": ": Alterna Shiny",
"cycleForm": ": Alterna Forma",
"cycleGender": ": Alterna Sesso",
"cycleAbility": ": Alterna Abilità",
"cycleNature": ": Alterna Natura",
"cycleVariant": ": Alterna Variante",
"enablePassive": "Attiva Passiva",
"disablePassive": "Disattiva Passiva",
"locked": "Bloccato",

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "교체될 기술을 선택해주세요. 대상:",
"unlockPassive": "패시브 해금",
"reduceCost": "코스트 줄이기",
"cycleShiny": "R: 특별한 색",
"cycleForm": "F: 폼 체인지",
"cycleGender": "G: 암수 전환",
"cycleAbility": "E: 특성 전환",
"cycleNature": "N: 성격 전환",
"cycleVariant": "V: 색상 전환",
"cycleShiny": ": 특별한 색",
"cycleForm": ": 폼 체인지",
"cycleGender": ": 암수 전환",
"cycleAbility": ": 특성 전환",
"cycleNature": ": 성격 전환",
"cycleVariant": ": 색상 전환",
"enablePassive": "패시브 활성화",
"disablePassive": "패시브 비활성화",
"locked": "잠김",

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "Escolha o movimento que substituirá",
"unlockPassive": "Aprender Passiva",
"reduceCost": "Reduzir Custo",
"cycleShiny": "R: » Shiny",
"cycleForm": "F: » Forma",
"cycleGender": "G: » Gênero",
"cycleAbility": "E: » Habilidade",
"cycleNature": "N: » Natureza",
"cycleVariant": "V: » Variante",
"cycleShiny": ": » Shiny",
"cycleForm": ": » Forma",
"cycleGender": ": » Gênero",
"cycleAbility": ": » Habilidade",
"cycleNature": ": » Natureza",
"cycleVariant": ": » Variante",
"enablePassive": "Ativar Passiva",
"disablePassive": "Desativar Passiva",
"locked": "Bloqueada",

View File

@ -1,67 +1,67 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const challenges: SimpleTranslationEntries = {
"title": "Challenge Modifiers",
"title": "适用挑战条件",
"points": "Bad Ideas",
"confirm_start": "Proceed with these challenges?",
"singleGeneration.name": "Mono Gen",
"singleGeneration.value.0": "Off",
"singleGeneration.desc.0": "You can only use pokemon from the chosen generation.",
"singleGeneration.value.1": "Gen 1",
"singleGeneration.desc.1": "You can only use pokemon from generation one.",
"singleGeneration.value.2": "Gen 2",
"singleGeneration.desc.2": "You can only use pokemon from generation two.",
"singleGeneration.value.3": "Gen 3",
"singleGeneration.desc.3": "You can only use pokemon from generation three.",
"singleGeneration.value.4": "Gen 4",
"singleGeneration.desc.4": "You can only use pokemon from generation four.",
"singleGeneration.value.5": "Gen 5",
"singleGeneration.desc.5": "You can only use pokemon from generation five.",
"singleGeneration.value.6": "Gen 6",
"singleGeneration.desc.6": "You can only use pokemon from generation six.",
"singleGeneration.value.7": "Gen 7",
"singleGeneration.desc.7": "You can only use pokemon from generation seven.",
"singleGeneration.value.8": "Gen 8",
"singleGeneration.desc.8": "You can only use pokemon from generation eight.",
"singleGeneration.value.9": "Gen 9",
"singleGeneration.desc.9": "You can only use pokemon from generation nine.",
"singleType.name": "Mono Type",
"singleType.value.0": "Off",
"singleType.desc.0": "You can only use pokemon of the chosen type.",
"singleType.value.1": "Normal",
"singleType.desc.1": "You can only use pokemon with the Normal type.",
"singleType.value.2": "Fighting",
"singleType.desc.2": "You can only use pokemon with the Fighting type.",
"singleType.value.3": "Flying",
"singleType.desc.3": "You can only use pokemon with the Flying type.",
"singleType.value.4": "Poison",
"singleType.desc.4": "You can only use pokemon with the Poison type.",
"singleType.value.5": "Ground",
"singleType.desc.5": "You can only use pokemon with the Ground type.",
"singleType.value.6": "Rock",
"singleType.desc.6": "You can only use pokemon with the Rock type.",
"singleType.value.7": "Bug",
"singleType.desc.7": "You can only use pokemon with the Bug type.",
"singleType.value.8": "Ghost",
"singleType.desc.8": "You can only use pokemon with the Ghost type.",
"singleType.value.9": "Steel",
"singleType.desc.9": "You can only use pokemon with the Steel type.",
"singleType.value.10": "Fire",
"singleType.desc.10": "You can only use pokemon with the Fire type.",
"singleType.value.11": "Water",
"singleType.desc.11": "You can only use pokemon with the Water type.",
"singleType.value.12": "Grass",
"singleType.desc.12": "You can only use pokemon with the Grass type.",
"singleType.value.13": "Electric",
"singleType.desc.13": "You can only use pokemon with the Electric type.",
"singleType.value.14": "Psychic",
"singleType.desc.14": "You can only use pokemon with the Psychic type.",
"singleType.value.15": "Ice",
"singleType.desc.15": "You can only use pokemon with the Ice type.",
"singleType.value.16": "Dragon",
"singleType.desc.16": "You can only use pokemon with the Dragon type.",
"singleType.value.17": "Dark",
"singleType.desc.17": "You can only use pokemon with the Dark type.",
"singleType.value.18": "Fairy",
"singleType.desc.18": "You can only use pokemon with the Fairy type.",
"confirm_start": "要执行这些挑战吗?",
"singleGeneration.name": "单一世代",
"singleGeneration.value.0": "关闭",
"singleGeneration.desc.0": "你只能使用所选世代的宝可梦",
"singleGeneration.value.1": "第一世代",
"singleGeneration.desc.1": "你只能使用第一世代的宝可梦",
"singleGeneration.value.2": "第二世代",
"singleGeneration.desc.2": "你只能使用第二世代的宝可梦",
"singleGeneration.value.3": "第三世代",
"singleGeneration.desc.3": "你只能使用第三世代的宝可梦",
"singleGeneration.value.4": "第四世代",
"singleGeneration.desc.4": "你只能使用第四世代的宝可梦",
"singleGeneration.value.5": "第五世代",
"singleGeneration.desc.5": "你只能使用第五世代的宝可梦",
"singleGeneration.value.6": "第六世代",
"singleGeneration.desc.6": "你只能使用第六世代的宝可梦",
"singleGeneration.value.7": "第七世代",
"singleGeneration.desc.7": "你只能使用第七世代的宝可梦",
"singleGeneration.value.8": "第八世代",
"singleGeneration.desc.8": "你只能使用第八世代的宝可梦",
"singleGeneration.value.9": "第久世代",
"singleGeneration.desc.9": "你只能使用第九世代的宝可梦",
"singleType.name": "单属性",
"singleType.value.0": "关闭",
"singleType.desc.0": "你只能使用所选属性的宝可梦",
"singleType.value.1": "普通",
"singleType.desc.1": "你只能使用普通属性的宝可梦",
"singleType.value.2": "格斗",
"singleType.desc.2": "你只能使用格斗属性的宝可梦",
"singleType.value.3": "飞行",
"singleType.desc.3": "你只能使用飞行属性的宝可梦",
"singleType.value.4": "",
"singleType.desc.4": "你只能使用毒属性的宝可梦",
"singleType.value.5": "地面",
"singleType.desc.5": "你只能使用地面属性的宝可梦",
"singleType.value.6": "岩石",
"singleType.desc.6": "你只能使用所选属性的宝可梦",
"singleType.value.7": "",
"singleType.desc.7": "你只能使用虫属性的宝可梦",
"singleType.value.8": "幽灵",
"singleType.desc.8": "你只能使用幽灵属性的宝可梦",
"singleType.value.9": "",
"singleType.desc.9": "你只能使用钢属性的宝可梦",
"singleType.value.10": "",
"singleType.desc.10": "你只能使用火属性的宝可梦",
"singleType.value.11": "",
"singleType.desc.11": "你只能使用水属性的宝可梦",
"singleType.value.12": "",
"singleType.desc.12": "你只能使用草属性的宝可梦",
"singleType.value.13": "",
"singleType.desc.13": "你只能使用电属性的宝可梦",
"singleType.value.14": "超能",
"singleType.desc.14": "你只能使用超能属性的宝可梦",
"singleType.value.15": "",
"singleType.desc.15": "你只能使用冰属性的宝可梦",
"singleType.value.16": "",
"singleType.desc.16": "你只能使用龙属性的宝可梦",
"singleType.value.17": "",
"singleType.desc.17": "你只能使用恶属性的宝可梦",
"singleType.value.18": "妖精",
"singleType.desc.18": "你只能使用妖精属性的宝可梦",
} as const;

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "选择要替换成的招式",
"unlockPassive": "解锁被动",
"reduceCost": "降低花费",
"cycleShiny": "R: 切换闪光",
"cycleForm": "F: 切换形态",
"cycleGender": "G: 切换性别",
"cycleAbility": "E: 切换特性",
"cycleNature": "N: 切换性格",
"cycleVariant": "V: 切换变种",
"cycleShiny": ": 切换闪光",
"cycleForm": ": 切换形态",
"cycleGender": ": 切换性别",
"cycleAbility": ": 切换特性",
"cycleNature": ": 切换性格",
"cycleVariant": ": 切换变种",
"enablePassive": "启用被动",
"disablePassive": "禁用被动",
"locked": "未解锁",

View File

@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"selectMoveSwapWith": "選擇想要替換成的招式",
"unlockPassive": "解鎖被動",
"reduceCost": "降低花費",
"cycleShiny": "R: 切換閃光",
"cycleForm": "F: 切換形態",
"cycleGender": "G: 切換性別",
"cycleAbility": "E: 切換特性",
"cycleNature": "N: 切換性格",
"cycleVariant": "V: 切換變種",
"cycleShiny": ": 切換閃光",
"cycleForm": ": 切換形態",
"cycleGender": ": 切換性別",
"cycleAbility": ": 切換特性",
"cycleNature": ": 切換性格",
"cycleVariant": ": 切換變種",
"enablePassive": "啟用被動",
"disablePassive": "禁用被動",
"locked": "未解鎖",

View File

@ -70,12 +70,14 @@ function simulateKeyboardEvent(eventType: string, key: string, events: EventEmit
events.emit("input_down", {
controller_type: "keyboard",
button: button,
isTouch: true
});
break;
case "keyup":
events.emit("input_up", {
controller_type: "keyboard",
button: button,
isTouch: true
});
break;
}

View File

@ -30,8 +30,23 @@ export class UiInputs {
this.listenInputs();
}
detectInputMethod(evt): void {
if (evt.controller_type === "keyboard") {
//if the touch property is present and defined, then this is a simulated keyboard event from the touch screen
if (evt.hasOwnProperty("isTouch") && evt.isTouch) {
this.scene.inputMethod = "touch";
} else {
this.scene.inputMethod = "keyboard";
}
} else if (evt.controller_type === "gamepad") {
this.scene.inputMethod = "gamepad";
}
}
listenInputs(): void {
this.events.on("input_down", (event) => {
this.detectInputMethod(event);
const actions = this.getActionsKeyDown();
if (!actions.hasOwnProperty(event.button)) {
return;

View File

@ -31,6 +31,8 @@ import { StatsContainer } from "./stats-container";
import { TextStyle, addBBCodeTextObject, addTextObject } from "./text";
import { Mode } from "./ui";
import { addWindow } from "./ui-theme";
import {SettingKeyboard} from "#app/system/settings/settings-keyboard";
import {Device} from "#app/enums/devices";
import * as Challenge from "../data/challenge";
import MoveInfoOverlay from "./move-info-overlay";
@ -56,7 +58,7 @@ interface LanguageSetting {
const languageSettings: { [key: string]: LanguageSetting } = {
"en":{
starterInfoTextSize: "56px",
instructionTextSize: "42px",
instructionTextSize: "38px",
},
"de":{
starterInfoTextSize: "56px",
@ -189,6 +191,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
private pokemonCaughtCountText: Phaser.GameObjects.Text;
private pokemonHatchedCountText: Phaser.GameObjects.Text;
private genOptionsText: Phaser.GameObjects.Text;
private instructionsContainer: Phaser.GameObjects.Container;
private instructionsText: Phaser.GameObjects.Text;
private starterSelectMessageBox: Phaser.GameObjects.NineSlice;
private starterSelectMessageBoxContainer: Phaser.GameObjects.Container;
@ -245,6 +248,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
private iconAnimHandler: PokemonIconAnimHandler;
//variables to keep track of the dynamically rendered list of instruction prompts for starter select
private instructionRowX = 0;
private instructionRowY = 0;
private instructionRowTextOffset = 12;
private starterSelectCallback: StarterSelectCallback;
protected blockInput: boolean = false;
@ -646,10 +654,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.starterSelectContainer.add(this.pokemonEggMovesContainer);
// The font size should be set per language
const instructionTextSize = textSettings.instructionTextSize;
this.instructionsText = addTextObject(this.scene, 4, 156, "", TextStyle.PARTY, { fontSize: instructionTextSize });
this.starterSelectContainer.add(this.instructionsText);
this.instructionsContainer = this.scene.add.container(4, 156);
this.instructionsContainer.setVisible(true);
this.starterSelectContainer.add(this.instructionsContainer);
this.starterSelectMessageBoxContainer = this.scene.add.container(0, this.scene.game.canvas.height / 6);
this.starterSelectMessageBoxContainer.setVisible(false);
@ -1485,45 +1492,84 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined, undefined, false);
}
createButtonFromIconText(iconSetting, gamepadType, translatedText, instructionTextSize): void {
let iconPath;
// touch controls cannot be rebound as is, and are just emulating a keyboard event.
// Additionally, since keyboard controls can be rebound (and will be displayed when they are), we need to have special handling for the touch controls
if (gamepadType === "touch") {
gamepadType = "keyboard";
switch (iconSetting) {
case SettingKeyboard.Button_Cycle_Shiny:
iconPath = "R.png";
break;
case SettingKeyboard.Button_Cycle_Form:
iconPath = "F.png";
break;
case SettingKeyboard.Button_Cycle_Gender:
iconPath = "G.png";
break;
case SettingKeyboard.Button_Cycle_Ability:
iconPath = "E.png";
break;
case SettingKeyboard.Button_Cycle_Nature:
iconPath = "N.png";
break;
case SettingKeyboard.Button_Cycle_Variant:
iconPath = "V.png";
break;
default:
break;
}
} else {
iconPath = this.scene.inputController?.getIconForLatestInputRecorded(iconSetting);
}
const iconElement = this.scene.add.sprite(this.instructionRowX, this.instructionRowY, gamepadType, iconPath);
iconElement.setScale(0.675);
iconElement.setOrigin(0.0, 0.0);
const controlLabel = addTextObject(this.scene, this.instructionRowX + this.instructionRowTextOffset, this.instructionRowY, translatedText, TextStyle.PARTY, { fontSize: instructionTextSize });
this.instructionsContainer.add([iconElement, controlLabel]);
this.instructionRowY += 8;
if (this.instructionRowY >= 24) {
this.instructionRowY = 0;
this.instructionRowX += 50;
}
}
updateInstructions(): void {
const instructionLines = [ ];
const cycleInstructionLines = [];
const currentLanguage = i18next.resolvedLanguage;
const langSettingKey = Object.keys(languageSettings).find(lang => currentLanguage.includes(lang));
const textSettings = languageSettings[langSettingKey];
const instructionTextSize = textSettings.instructionTextSize;
this.instructionRowX = 0;
this.instructionRowY = 0;
this.instructionsContainer.removeAll();
let gamepadType;
if (this.scene.inputMethod === "gamepad") {
gamepadType = this.scene.inputController.getConfig(this.scene.inputController.selectedDevice[Device.GAMEPAD]).padType;
} else {
gamepadType = this.scene.inputMethod;
}
if (this.speciesStarterDexEntry?.caughtAttr) {
if (this.canCycleShiny) {
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleShiny"));
this.createButtonFromIconText(SettingKeyboard.Button_Cycle_Shiny, gamepadType, i18next.t("starterSelectUiHandler:cycleShiny"), instructionTextSize);
}
if (this.canCycleForm) {
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleForm"));
this.createButtonFromIconText(SettingKeyboard.Button_Cycle_Form, gamepadType, i18next.t("starterSelectUiHandler:cycleForm"), instructionTextSize);
}
if (this.canCycleGender) {
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleGender"));
this.createButtonFromIconText(SettingKeyboard.Button_Cycle_Gender, gamepadType, i18next.t("starterSelectUiHandler:cycleGender"), instructionTextSize);
}
if (this.canCycleAbility) {
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleAbility"));
this.createButtonFromIconText(SettingKeyboard.Button_Cycle_Ability, gamepadType, i18next.t("starterSelectUiHandler:cycleAbility"), instructionTextSize);
}
if (this.canCycleNature) {
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleNature"));
this.createButtonFromIconText(SettingKeyboard.Button_Cycle_Nature, gamepadType, i18next.t("starterSelectUiHandler:cycleNature"), instructionTextSize);
}
if (this.canCycleVariant) {
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleVariant"));
this.createButtonFromIconText(SettingKeyboard.Button_Cycle_Variant, gamepadType, i18next.t("starterSelectUiHandler:cycleVariant"), instructionTextSize);
}
}
if (cycleInstructionLines.length > 2) {
cycleInstructionLines[0] += " | " + cycleInstructionLines.splice(1, 1);
if (cycleInstructionLines.length > 2) {
cycleInstructionLines[1] += " | " + cycleInstructionLines.splice(2, 1);
}
if (cycleInstructionLines.length > 2) {
cycleInstructionLines[2] += " | " + cycleInstructionLines.splice(3, 1);
}
}
for (const cil of cycleInstructionLines) {
instructionLines.push(cil);
}
this.instructionsText.setText(instructionLines.join("\n"));
}
getValueLimit(): integer {

View File

@ -296,7 +296,7 @@ export let isLocalServerConnected = true;
export function setCookie(cName: string, cValue: string): void {
const expiration = new Date();
expiration.setTime(new Date().getTime() + 3600000 * 24 * 30 * 3/*7*/);
document.cookie = `${cName}=${cValue};SameSite=Strict;path=/;expires=${expiration.toUTCString()}`;
document.cookie = `${cName}=${cValue};Secure;SameSite=Strict;Path=/;Expires=${expiration.toUTCString()}`;
}
export function getCookie(cName: string): string {