mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-24 16:29:27 +02:00
Merge branch 'beta' into prabbyd4281
This commit is contained in:
commit
4b6b8f4ac2
@ -527,18 +527,19 @@ interface monotypeOverride {
|
|||||||
*/
|
*/
|
||||||
export class SingleTypeChallenge extends Challenge {
|
export class SingleTypeChallenge extends Challenge {
|
||||||
private static TYPE_OVERRIDES: monotypeOverride[] = [
|
private static TYPE_OVERRIDES: monotypeOverride[] = [
|
||||||
{species: Species.MELOETTA, type: Type.PSYCHIC, fusion: true},
|
|
||||||
{species: Species.CASTFORM, type: Type.NORMAL, fusion: false},
|
{species: Species.CASTFORM, type: Type.NORMAL, fusion: false},
|
||||||
];
|
];
|
||||||
|
// TODO: Find a solution for all Pokemon with this ssui issue, including Basculin and Burmy
|
||||||
|
private static SPECIES_OVERRIDES: Species[] = [Species.MELOETTA];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(Challenges.SINGLE_TYPE, 18);
|
super(Challenges.SINGLE_TYPE, 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
applyStarterChoice(pokemon: PokemonSpecies, valid: Utils.BooleanHolder, dexAttr: DexAttrProps, soft: boolean = false): boolean {
|
override applyStarterChoice(pokemon: PokemonSpecies, valid: Utils.BooleanHolder, dexAttr: DexAttrProps, soft: boolean = false): boolean {
|
||||||
const speciesForm = getPokemonSpeciesForm(pokemon.speciesId, dexAttr.formIndex);
|
const speciesForm = getPokemonSpeciesForm(pokemon.speciesId, dexAttr.formIndex);
|
||||||
const types = [speciesForm.type1, speciesForm.type2];
|
const types = [speciesForm.type1, speciesForm.type2];
|
||||||
if (soft) {
|
if (soft && !SingleTypeChallenge.SPECIES_OVERRIDES.includes(pokemon.speciesId)) {
|
||||||
const speciesToCheck = [pokemon.speciesId];
|
const speciesToCheck = [pokemon.speciesId];
|
||||||
while (speciesToCheck.length) {
|
while (speciesToCheck.length) {
|
||||||
const checking = speciesToCheck.pop();
|
const checking = speciesToCheck.pop();
|
||||||
|
@ -595,6 +595,8 @@ function getTrainerConfigForWave(waveIndex: number) {
|
|||||||
}))
|
}))
|
||||||
.setPartyMemberFunc(4, getRandomPartyMemberFunc(POOL_4_POKEMON, TrainerSlot.TRAINER, true));
|
.setPartyMemberFunc(4, getRandomPartyMemberFunc(POOL_4_POKEMON, TrainerSlot.TRAINER, true));
|
||||||
} else {
|
} else {
|
||||||
|
pool3Copy = randSeedShuffle(pool3Copy);
|
||||||
|
const pool3Mon2 = pool3Copy.pop()!;
|
||||||
config
|
config
|
||||||
.setPartyTemplates(new TrainerPartyCompoundTemplate(new TrainerPartyTemplate(4, PartyMemberStrength.AVERAGE), new TrainerPartyTemplate(1, PartyMemberStrength.STRONG)))
|
.setPartyTemplates(new TrainerPartyCompoundTemplate(new TrainerPartyTemplate(4, PartyMemberStrength.AVERAGE), new TrainerPartyTemplate(1, PartyMemberStrength.STRONG)))
|
||||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.BEEDRILL ], TrainerSlot.TRAINER, true, p => {
|
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.BEEDRILL ], TrainerSlot.TRAINER, true, p => {
|
||||||
@ -616,9 +618,9 @@ function getTrainerConfigForWave(waveIndex: number) {
|
|||||||
p.generateName();
|
p.generateName();
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.setPartyMemberFunc(3, getRandomPartyMemberFunc([pool3Mon.species], TrainerSlot.TRAINER, true, p => {
|
.setPartyMemberFunc(3, getRandomPartyMemberFunc([pool3Mon2.species], TrainerSlot.TRAINER, true, p => {
|
||||||
if (!isNullOrUndefined(pool3Mon.formIndex)) {
|
if (!isNullOrUndefined(pool3Mon2.formIndex)) {
|
||||||
p.formIndex = pool3Mon.formIndex;
|
p.formIndex = pool3Mon2.formIndex;
|
||||||
p.generateAndPopulateMoveset();
|
p.generateAndPopulateMoveset();
|
||||||
p.generateName();
|
p.generateName();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user