Endless biomes are short but connected

pull/248/head
Flashfyre 2024-04-22 20:30:46 -04:00
parent 71f99da38d
commit eeb547417f
5 changed files with 30 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -893,7 +893,26 @@ export default class BattleScene extends SceneBase {
//this.pushPhase(new TrainerMessageTestPhase(this, TrainerType.RIVAL, TrainerType.RIVAL_2, TrainerType.RIVAL_3, TrainerType.RIVAL_4, TrainerType.RIVAL_5, TrainerType.RIVAL_6)); //this.pushPhase(new TrainerMessageTestPhase(this, TrainerType.RIVAL, TrainerType.RIVAL_2, TrainerType.RIVAL_3, TrainerType.RIVAL_4, TrainerType.RIVAL_5, TrainerType.RIVAL_6));
if (!waveIndex && lastBattle) { if (!waveIndex && lastBattle) {
const isNewBiome = !(lastBattle.waveIndex % 10) || (this.gameMode.isDaily && lastBattle.waveIndex === 49); let isNewBiome = !(lastBattle.waveIndex % 10) || ((this.gameMode.hasShortBiomes || this.gameMode.isDaily) && (lastBattle.waveIndex % 50) === 49);
if (!isNewBiome && this.gameMode.hasShortBiomes) {
let w = lastBattle.waveIndex - ((lastBattle.waveIndex % 10) - 1);
let biomeWaves = 1;
while (w < lastBattle.waveIndex) {
let wasNewBiome = false;
this.executeWithSeedOffset(() => {
wasNewBiome = !Utils.randSeedInt(6 - biomeWaves);
}, w << 4);
if (wasNewBiome)
biomeWaves = 1;
else
biomeWaves++;
w++;
}
this.executeWithSeedOffset(() => {
isNewBiome = !Utils.randSeedInt(6 - biomeWaves);
}, lastBattle.waveIndex << 4);
}
const resetArenaState = isNewBiome || this.currentBattle.battleType === BattleType.TRAINER || this.currentBattle.battleSpec === BattleSpec.FINAL_BOSS; const resetArenaState = isNewBiome || this.currentBattle.battleType === BattleType.TRAINER || this.currentBattle.battleSpec === BattleSpec.FINAL_BOSS;
this.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy()); this.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy());
this.trySpreadPokerus(); this.trySpreadPokerus();

View File

@ -1782,7 +1782,7 @@ export function initSpecies() {
new PokemonForm("Fancy Pattern", "fancy", Type.BUG, null, 0.3, 2.5, Abilities.SHIELD_DUST, Abilities.COMPOUND_EYES, Abilities.FRIEND_GUARD, 200, 38, 35, 40, 27, 25, 35, 255, 70, 40, false, ""), new PokemonForm("Fancy Pattern", "fancy", Type.BUG, null, 0.3, 2.5, Abilities.SHIELD_DUST, Abilities.COMPOUND_EYES, Abilities.FRIEND_GUARD, 200, 38, 35, 40, 27, 25, 35, 255, 70, 40, false, ""),
new PokemonForm("Poké Ball Pattern", "poke-ball", Type.BUG, null, 0.3, 2.5, Abilities.SHIELD_DUST, Abilities.COMPOUND_EYES, Abilities.FRIEND_GUARD, 200, 38, 35, 40, 27, 25, 35, 255, 70, 40, false, ""), new PokemonForm("Poké Ball Pattern", "poke-ball", Type.BUG, null, 0.3, 2.5, Abilities.SHIELD_DUST, Abilities.COMPOUND_EYES, Abilities.FRIEND_GUARD, 200, 38, 35, 40, 27, 25, 35, 255, 70, 40, false, ""),
), ),
new PokemonSpecies(Species.SPEWPA, 6, false, false, false, "Scatterdust Pokémon", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.NONE, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, GrowthRate.MEDIUM_FAST, 50, false, false, new PokemonSpecies(Species.SPEWPA, 6, false, false, false, "Scatterdust Pokémon", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.SHED_SKIN, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, GrowthRate.MEDIUM_FAST, 50, false, false,
new PokemonForm("Meadow Pattern", "meadow", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.NONE, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, false, ""), new PokemonForm("Meadow Pattern", "meadow", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.NONE, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, false, ""),
new PokemonForm("Icy Snow Pattern", "icy-snow", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.NONE, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, false, ""), new PokemonForm("Icy Snow Pattern", "icy-snow", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.NONE, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, false, ""),
new PokemonForm("Polar Pattern", "polar", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.NONE, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, false, ""), new PokemonForm("Polar Pattern", "polar", Type.BUG, null, 0.3, 8.4, Abilities.SHED_SKIN, Abilities.NONE, Abilities.FRIEND_GUARD, 213, 45, 22, 60, 27, 30, 29, 120, 70, 75, false, ""),

View File

@ -20,6 +20,7 @@ interface GameModeConfig {
hasTrainers?: boolean; hasTrainers?: boolean;
hasFixedBattles?: boolean; hasFixedBattles?: boolean;
hasNoShop?: boolean; hasNoShop?: boolean;
hasShortBiomes?: boolean;
hasRandomBiomes?: boolean; hasRandomBiomes?: boolean;
hasRandomBosses?: boolean; hasRandomBosses?: boolean;
isSplicedOnly?: boolean; isSplicedOnly?: boolean;
@ -33,6 +34,7 @@ export class GameMode implements GameModeConfig {
public hasTrainers: boolean; public hasTrainers: boolean;
public hasFixedBattles: boolean; public hasFixedBattles: boolean;
public hasNoShop: boolean; public hasNoShop: boolean;
public hasShortBiomes: boolean;
public hasRandomBiomes: boolean; public hasRandomBiomes: boolean;
public hasRandomBosses: boolean; public hasRandomBosses: boolean;
public isSplicedOnly: boolean; public isSplicedOnly: boolean;
@ -174,7 +176,7 @@ export class GameMode implements GameModeConfig {
export const gameModes = Object.freeze({ export const gameModes = Object.freeze({
[GameModes.CLASSIC]: new GameMode(GameModes.CLASSIC, { isClassic: true, hasTrainers: true, hasFixedBattles: true }), [GameModes.CLASSIC]: new GameMode(GameModes.CLASSIC, { isClassic: true, hasTrainers: true, hasFixedBattles: true }),
[GameModes.ENDLESS]: new GameMode(GameModes.ENDLESS, { isEndless: true, hasRandomBiomes: true, hasRandomBosses: true }), [GameModes.ENDLESS]: new GameMode(GameModes.ENDLESS, { isEndless: true, hasShortBiomes: true, hasRandomBosses: true }),
[GameModes.SPLICED_ENDLESS]: new GameMode(GameModes.SPLICED_ENDLESS, { isEndless: true, hasRandomBiomes: true, hasRandomBosses: true, isSplicedOnly: true }), [GameModes.SPLICED_ENDLESS]: new GameMode(GameModes.SPLICED_ENDLESS, { isEndless: true, hasShortBiomes: true, hasRandomBosses: true, isSplicedOnly: true }),
[GameModes.DAILY]: new GameMode(GameModes.DAILY, { isDaily: true, hasTrainers: true, hasNoShop: true }) [GameModes.DAILY]: new GameMode(GameModes.DAILY, { isDaily: true, hasTrainers: true, hasNoShop: true })
}); });

View File

@ -1049,7 +1049,8 @@ export class SelectBiomePhase extends BattlePhase {
}; };
if ((this.scene.gameMode.isClassic && this.scene.gameMode.isWaveFinal(this.scene.currentBattle.waveIndex + 9)) if ((this.scene.gameMode.isClassic && this.scene.gameMode.isWaveFinal(this.scene.currentBattle.waveIndex + 9))
|| (this.scene.gameMode.isDaily && this.scene.gameMode.isWaveFinal(this.scene.currentBattle.waveIndex))) || (this.scene.gameMode.isDaily && this.scene.gameMode.isWaveFinal(this.scene.currentBattle.waveIndex))
|| (this.scene.gameMode.hasShortBiomes && !(this.scene.currentBattle.waveIndex % 50)))
setNextBiome(Biome.END); setNextBiome(Biome.END);
else if (this.scene.gameMode.hasRandomBiomes) else if (this.scene.gameMode.hasRandomBiomes)
setNextBiome(this.generateNextBiome()); setNextBiome(this.generateNextBiome());
@ -1086,8 +1087,10 @@ export class SelectBiomePhase extends BattlePhase {
}); });
} else } else
setNextBiome(biomes[Utils.randSeedInt(biomes.length)]); setNextBiome(biomes[Utils.randSeedInt(biomes.length)]);
} else } else if (biomeLinks.hasOwnProperty(currentBiome))
setNextBiome(biomeLinks[currentBiome] as Biome); setNextBiome(biomeLinks[currentBiome] as Biome);
else
setNextBiome(this.generateNextBiome());
} }
generateNextBiome(): Biome { generateNextBiome(): Biome {