diff --git a/public/images/pokemon/exp/back/381-mega.png b/public/images/pokemon/exp/back/381-mega.png index 811231cbc..d865e64c3 100644 Binary files a/public/images/pokemon/exp/back/381-mega.png and b/public/images/pokemon/exp/back/381-mega.png differ diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 98c1fc83e..c3f920acb 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -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)); 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; this.getEnemyParty().forEach(enemyPokemon => enemyPokemon.destroy()); this.trySpreadPokerus(); diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 72850fb05..ed55bbf4d 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -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("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("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, ""), diff --git a/src/game-mode.ts b/src/game-mode.ts index f06c65826..0ac3f0503 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -20,6 +20,7 @@ interface GameModeConfig { hasTrainers?: boolean; hasFixedBattles?: boolean; hasNoShop?: boolean; + hasShortBiomes?: boolean; hasRandomBiomes?: boolean; hasRandomBosses?: boolean; isSplicedOnly?: boolean; @@ -33,6 +34,7 @@ export class GameMode implements GameModeConfig { public hasTrainers: boolean; public hasFixedBattles: boolean; public hasNoShop: boolean; + public hasShortBiomes: boolean; public hasRandomBiomes: boolean; public hasRandomBosses: boolean; public isSplicedOnly: boolean; @@ -174,7 +176,7 @@ export class GameMode implements GameModeConfig { export const gameModes = Object.freeze({ [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.SPLICED_ENDLESS]: new GameMode(GameModes.SPLICED_ENDLESS, { isEndless: true, hasRandomBiomes: true, hasRandomBosses: true, isSplicedOnly: true }), + [GameModes.ENDLESS]: new GameMode(GameModes.ENDLESS, { isEndless: true, hasShortBiomes: true, hasRandomBosses: 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 }) }); \ No newline at end of file diff --git a/src/phases.ts b/src/phases.ts index 038907d94..f59c6516e 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -1049,7 +1049,8 @@ export class SelectBiomePhase extends BattlePhase { }; 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); else if (this.scene.gameMode.hasRandomBiomes) setNextBiome(this.generateNextBiome()); @@ -1086,8 +1087,10 @@ export class SelectBiomePhase extends BattlePhase { }); } else setNextBiome(biomes[Utils.randSeedInt(biomes.length)]); - } else + } else if (biomeLinks.hasOwnProperty(currentBiome)) setNextBiome(biomeLinks[currentBiome] as Biome); + else + setNextBiome(this.generateNextBiome()); } generateNextBiome(): Biome {