[Enhancement] Add female and double grunts (#3280)
* Add female and double grunts, add localizations * Update src/locales/fr/trainers.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/it/trainers.ts Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> * Update src/locales/ko/trainers.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update src/locales/pt_BR/trainers.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update trainers.ts --------- Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> Co-authored-by: Enoch <enoch.jwsong@gmail.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
This commit is contained in:
parent
e5f458d2c0
commit
52ef92ae78
|
@ -425,7 +425,13 @@ export class FixedBattleConfig {
|
|||
}
|
||||
}
|
||||
|
||||
function getRandomTrainerFunc(trainerPool: (TrainerType | TrainerType[])[]): GetTrainerFunc {
|
||||
/**
|
||||
* Helper function to generate a random trainer for evil team trainers and the elite 4/champion
|
||||
* @param trainerPool The TrainerType or list of TrainerTypes that can possibly be generated
|
||||
* @param randomGender whether or not to randomly (50%) generate a female trainer (for use with evil team grunts)
|
||||
* @returns the generated trainer
|
||||
*/
|
||||
function getRandomTrainerFunc(trainerPool: (TrainerType | TrainerType[])[], randomGender: boolean = false): GetTrainerFunc {
|
||||
return (scene: BattleScene) => {
|
||||
const rand = Utils.randSeedInt(trainerPool.length);
|
||||
const trainerTypes: TrainerType[] = [];
|
||||
|
@ -435,11 +441,20 @@ function getRandomTrainerFunc(trainerPool: (TrainerType | TrainerType[])[]): Get
|
|||
: trainerPoolEntry;
|
||||
trainerTypes.push(trainerType);
|
||||
}
|
||||
// If the trainer type has a double variant, there's a 33% chance of it being a double battle (for now we only allow tate&liza to be double)
|
||||
if (trainerConfigs[trainerTypes[rand]].trainerTypeDouble && (trainerTypes[rand] === TrainerType.TATE || trainerTypes[rand] === TrainerType.LIZA)) {
|
||||
return new Trainer(scene, trainerTypes[rand], Utils.randSeedInt(3) ? TrainerVariant.DOUBLE : TrainerVariant.DEFAULT);
|
||||
let trainerGender = TrainerVariant.DEFAULT;
|
||||
if (randomGender) {
|
||||
trainerGender = (Utils.randInt(2) === 0) ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT;
|
||||
}
|
||||
return new Trainer(scene, trainerTypes[rand], TrainerVariant.DEFAULT);
|
||||
|
||||
/* 1/3 chance for evil team grunts to be double battles */
|
||||
const evilTeamGrunts = [TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT];
|
||||
const isEvilTeamGrunt = evilTeamGrunts.includes(trainerTypes[rand]);
|
||||
|
||||
if (trainerConfigs[trainerTypes[rand]].hasDouble && isEvilTeamGrunt) {
|
||||
return new Trainer(scene, trainerTypes[rand], (Utils.randInt(3) === 0) ? TrainerVariant.DOUBLE : trainerGender);
|
||||
}
|
||||
|
||||
return new Trainer(scene, trainerTypes[rand], trainerGender);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -462,21 +477,21 @@ export const classicFixedBattles: FixedBattleConfigs = {
|
|||
[25]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
|
||||
.setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_2, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)),
|
||||
[35]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ])),
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ], true)),
|
||||
[55]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
|
||||
.setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_3, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)),
|
||||
[62]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35)
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ])),
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ], true)),
|
||||
[64]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35)
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ])),
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ], true)),
|
||||
[66]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35)
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ])),
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ], true)),
|
||||
[95]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
|
||||
.setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_4, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)),
|
||||
[112]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35)
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ])),
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ], true)),
|
||||
[114]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35)
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ])),
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT ], true)),
|
||||
[115]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35)
|
||||
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_BOSS_GIOVANNI_1, TrainerType.MAXIE, TrainerType.ARCHIE, TrainerType.CYRUS, TrainerType.GHETSIS, TrainerType.LYSANDRE ])),
|
||||
[145]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
|
||||
|
|
|
@ -126,17 +126,23 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"workers": "Workers",
|
||||
"youngster": "Youngster",
|
||||
"rocket_grunt": "Rocket Grunt",
|
||||
"rocket_grunts": "Rocket Grunts",
|
||||
"rocket_grunt_female": "Rocket Grunt",
|
||||
"magma_grunt": "Magma Grunt",
|
||||
"magma_grunt_female": "Magma Grunt",
|
||||
"magma_grunts": "Magma Grunts",
|
||||
"aqua_grunt": "Aqua Grunt",
|
||||
"aqua_grunt_female": "Aqua Grunt",
|
||||
"aqua_grunts": "Aqua Grunts",
|
||||
"galactic_grunt": "Galactic Grunt",
|
||||
"galactic_grunt_female": "Galactic Grunt",
|
||||
"galactic_grunts": "Galactic Grunts",
|
||||
"plasma_grunt": "Plasma Grunt",
|
||||
"plasma_grunt_female": "Plasma Grunt",
|
||||
"plasma_grunts": "Plasma Grunts",
|
||||
"flare_grunt": "Flare Grunt",
|
||||
"flare_grunt_female": "Flare Grunt",
|
||||
"flare_grunts": "Flare Grunts",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
|
@ -117,7 +117,25 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"worker": "Operario",
|
||||
"worker_female": "Operaria",
|
||||
"workers": "Operarios",
|
||||
"youngster": "Joven"
|
||||
"youngster": "Joven",
|
||||
"rocket_grunt": "Rocket Grunt",
|
||||
"rocket_grunts": "Rocket Grunts",
|
||||
"rocket_grunt_female": "Rocket Grunt",
|
||||
"magma_grunt": "Magma Grunt",
|
||||
"magma_grunt_female": "Magma Grunt",
|
||||
"magma_grunts": "Magma Grunts",
|
||||
"aqua_grunt": "Aqua Grunt",
|
||||
"aqua_grunt_female": "Aqua Grunt",
|
||||
"aqua_grunts": "Aqua Grunts",
|
||||
"galactic_grunt": "Galactic Grunt",
|
||||
"galactic_grunt_female": "Galactic Grunt",
|
||||
"galactic_grunts": "Galactic Grunts",
|
||||
"plasma_grunt": "Plasma Grunt",
|
||||
"plasma_grunt_female": "Plasma Grunt",
|
||||
"plasma_grunts": "Plasma Grunts",
|
||||
"flare_grunt": "Flare Grunt",
|
||||
"flare_grunt_female": "Flare Grunt",
|
||||
"flare_grunts": "Flare Grunts",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
|
@ -127,16 +127,22 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"youngster": "Gamin",
|
||||
"rocket_grunt": "Sbire de la Team Rocket",
|
||||
"rocket_grunt_female": "Sbire de la Team Rocket",
|
||||
"rocket_grunts": "Sbires de la Team Rocket",
|
||||
"magma_grunt": "Sbire de la Team Magma",
|
||||
"magma_grunt_female": "Sbire de la Team Magma",
|
||||
"magma_grunts": "Sbires de la Team Magma",
|
||||
"aqua_grunt": "Sbire de la Team Aqua",
|
||||
"aqua_grunt_female": "Sbire de la Team Aqua",
|
||||
"aqua_grunts": "Sbires de la Team Aqua",
|
||||
"galactic_grunt": "Sbire de la Team Galaxie",
|
||||
"galactic_grunt_female": "Sbire Team Galaxie",
|
||||
"galactic_grunt_female": "Sbire de la Team Galaxie",
|
||||
"galactic_grunts": "Sbires de la Team Galaxie",
|
||||
"plasma_grunt": "Sbire de la Team Plasma",
|
||||
"plasma_grunt_female": "Sbire de la Team Plasma",
|
||||
"plasma_grunts": "Sbires de la Team Plasma",
|
||||
"flare_grunt": "Sbire de la Team Flare",
|
||||
"flare_grunt_female": "Sbire de la Team Flare",
|
||||
"flare_grunts": "Sbires de la Team Flare",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
|
@ -118,7 +118,25 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"worker": "Operaio",
|
||||
"worker_female": "Lavoratrice",
|
||||
"workers": "Lavoratori",
|
||||
"youngster": "Bullo"
|
||||
"youngster": "Bullo",
|
||||
"rocket_grunt": "Recluta Team Rocket",
|
||||
"rocket_grunts": "Reclute Team Rocket",
|
||||
"rocket_grunt_female": "Recluta Team Rocket",
|
||||
"magma_grunt": "Recluta Team Magma",
|
||||
"magma_grunt_female": "Recluta Team Magma",
|
||||
"magma_grunts": "Reclute Team Magma",
|
||||
"aqua_grunt": "Recluta Team Idro",
|
||||
"aqua_grunt_female": "Recluta Team Idro",
|
||||
"aqua_grunts": "Recluta Team Idro",
|
||||
"galactic_grunt": "Recluta Team Galassia",
|
||||
"galactic_grunt_female": "Recluta Team Galassia",
|
||||
"galactic_grunts": "Reclute Team Galassia",
|
||||
"plasma_grunt": "Seguace Plasma",
|
||||
"plasma_grunt_female": "Seguace Plasma",
|
||||
"plasma_grunts": "Seguaci Plasma",
|
||||
"flare_grunt": "Recluta Team Flare",
|
||||
"flare_grunt_female": "Recluta Team Flare",
|
||||
"flare_grunts": "Reclute Team Flare",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
|
@ -127,16 +127,22 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"youngster": "반바지 꼬마",
|
||||
"rocket_grunt": "로켓단 조무래기",
|
||||
"rocket_grunt_female": "로켓단 조무래기",
|
||||
"rocket_grunts": "로켓단 조무래기들",
|
||||
"magma_grunt": "마그마단 조무래기",
|
||||
"magma_grunt_female": "마그마단 조무래기",
|
||||
"magma_grunts": "마그마단 조무래기들",
|
||||
"aqua_grunt": "아쿠아단 조무래기",
|
||||
"aqua_grunt_female": "아쿠아단 조무래기",
|
||||
"aqua_grunts": "아쿠아단 조무래기들",
|
||||
"galactic_grunt": "갤럭시단 조무래기",
|
||||
"galactic_grunt_female": "갤럭시단 조무래기",
|
||||
"galactic_grunts": "갤럭시단 조무래기들",
|
||||
"plasma_grunt": "플라스마단 조무래기",
|
||||
"plasma_grunt_female": "플라스마단 조무래기",
|
||||
"plasma_grunts": "플라스마단 조무래기들",
|
||||
"flare_grunt": "플레어단 조무래기",
|
||||
"flare_grunt_female": "플레어단 조무래기",
|
||||
"flare_grunts": "플레어단 조무래기들",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
|
@ -127,16 +127,22 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"youngster": "Jovem",
|
||||
"rocket_grunt": "Recruta da Equipe Rocket",
|
||||
"rocket_grunt_female": "Recruta da Equipe Rocket",
|
||||
"rocket_grunts": "Recrutas da Equipe Rocket",
|
||||
"magma_grunt": "Recruta da Equipe Magma",
|
||||
"magma_grunt_female": "Recruta da Equipe Magma",
|
||||
"magma_grunts": "Recrutas da Equipe Magma",
|
||||
"aqua_grunt": "Recruta da Equipe Aqua",
|
||||
"aqua_grunt_female": "Recruta da Equipe Aqua",
|
||||
"aqua_grunts": "Recrutas da Equipe Aqua",
|
||||
"galactic_grunt": "Recruta da Equipe Galáctica",
|
||||
"galactic_grunt_female": "Recruta da Equipe Galáctica",
|
||||
"galactic_grunts": "Recrutas da Equipe Galáctica",
|
||||
"plasma_grunt": "Recruta da Equipe Plasma",
|
||||
"plasma_grunt_female": "Recruta da Equipe Plasma",
|
||||
"plasma_grunts": "Recrutas da Equipe Plasma",
|
||||
"flare_grunt": "Recruta da Equipe Flare",
|
||||
"flare_grunt_female": "Recruta da Equipe Flare",
|
||||
"flare_grunts": "Recrutas da Equipe Flare",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
|
@ -127,16 +127,22 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"youngster": "短裤小子",
|
||||
"rocket_grunt": "火箭队手下",
|
||||
"rocket_grunt_female": "火箭队手下",
|
||||
"rocket_grunts": "火箭队手下们",
|
||||
"magma_grunt": "熔岩队手下",
|
||||
"magma_grunt_female": "熔岩队手下",
|
||||
"magma_grunts": "熔岩队手下们",
|
||||
"aqua_grunt": "海洋队手下",
|
||||
"aqua_grunt_female": "海洋队手下",
|
||||
"aqua_grunts": "海洋队手下们",
|
||||
"galactic_grunt": "银河队手下",
|
||||
"galactic_grunt_female": "银河队手下",
|
||||
"galactic_grunts": "银河队手下们",
|
||||
"plasma_grunt": "等离子队手下",
|
||||
"plasma_grunt_female": "等离子队手下",
|
||||
"plasma_grunts": "等离子队手下们",
|
||||
"flare_grunt": "闪焰队手下",
|
||||
"flare_grunt_female": "闪焰队手下",
|
||||
"flare_grunts": "闪焰队手下们",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
|
@ -118,7 +118,23 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||
"worker": "工人",
|
||||
"worker_female": "工人",
|
||||
"workers": "工人組合",
|
||||
"youngster": "短褲小子"
|
||||
"youngster": "短褲小子",
|
||||
"rocket_grunts": "火箭队手下們",
|
||||
"magma_grunt": "熔岩队手下",
|
||||
"magma_grunt_female": "熔岩队手下",
|
||||
"magma_grunts": "熔岩队手下們",
|
||||
"aqua_grunt": "海洋队手下",
|
||||
"aqua_grunt_female": "海洋队手下",
|
||||
"aqua_grunts": "海洋队手下們",
|
||||
"galactic_grunt": "银河队手下",
|
||||
"galactic_grunt_female": "银河队手下",
|
||||
"galactic_grunts": "银河队手下們",
|
||||
"plasma_grunt": "等离子队手下",
|
||||
"plasma_grunt_female": "等离子队手下",
|
||||
"plasma_grunts": "等离子队手下們",
|
||||
"flare_grunt": "闪焰队手下",
|
||||
"flare_grunt_female": "闪焰队手下",
|
||||
"flare_grunts": "闪焰队手下們",
|
||||
} as const;
|
||||
|
||||
// Names of special trainers like gym leaders, elite four, and the champion
|
||||
|
|
Loading…
Reference in New Issue