Add wrapper for game mode
This commit is contained in:
1 parent
76de0d01f9
commit
623d600e13
12 files changed
+139
-72
No files matched your search
+3
-3
@@ -11,7 +11,7 @@ import { Type } from "../data/type";
|
||||
import Move from "../data/move";
|
||||
import { ArenaTag, ArenaTagSide, getArenaTag } from "../data/arena-tag";
|
||||
import { ArenaTagType } from "../data/enums/arena-tag-type";
|
||||
import { GameMode } from "../game-mode";
|
||||
import { GameModes } from "../game-mode";
|
||||
import { TrainerType } from "../data/enums/trainer-type";
|
||||
import { BattlerIndex } from "../battle";
|
||||
import { Moves } from "../data/enums/moves";
|
||||
@@ -55,7 +55,7 @@ export class Arena {
|
||||
|
||||
randomSpecies(waveIndex: integer, level: integer, attempt?: integer): PokemonSpecies {
|
||||
const isBoss = !!this.scene.getEncounterBossSegments(waveIndex, level) && !!this.pokemonPool[BiomePoolTier.BOSS].length
|
||||
&& (this.biomeType !== Biome.END || this.scene.gameMode === GameMode.CLASSIC || waveIndex % 250 === 0);
|
||||
&& (this.biomeType !== Biome.END || this.scene.gameMode.isClassic || this.scene.gameMode.isWaveFinal(waveIndex));
|
||||
const tierValue = Utils.randSeedInt(!isBoss ? 512 : 64);
|
||||
let tier = !isBoss
|
||||
? tierValue >= 156 ? BiomePoolTier.COMMON : tierValue >= 32 ? BiomePoolTier.UNCOMMON : tierValue >= 6 ? BiomePoolTier.RARE : tierValue >= 1 ? BiomePoolTier.SUPER_RARE : BiomePoolTier.ULTRA_RARE
|
||||
@@ -125,7 +125,7 @@ export class Arena {
|
||||
|
||||
randomTrainerType(waveIndex: integer): TrainerType {
|
||||
const isBoss = (waveIndex % 30) === 20 && !!this.trainerPool[BiomePoolTier.BOSS].length
|
||||
&& (this.biomeType !== Biome.END || this.scene.gameMode === GameMode.CLASSIC || waveIndex % 250 === 0);
|
||||
&& (this.biomeType !== Biome.END || this.scene.gameMode.isClassic || this.scene.gameMode.isWaveFinal(waveIndex));
|
||||
const tierValue = Utils.randSeedInt(!isBoss ? 512 : 64);
|
||||
let tier = !isBoss
|
||||
? tierValue >= 156 ? BiomePoolTier.COMMON : tierValue >= 32 ? BiomePoolTier.UNCOMMON : tierValue >= 6 ? BiomePoolTier.RARE : tierValue >= 1 ? BiomePoolTier.SUPER_RARE : BiomePoolTier.ULTRA_RARE
|
||||
|
||||
@@ -32,7 +32,7 @@ import { BattleSpec } from "../enums/battle-spec";
|
||||
import { Mode } from '../ui/ui';
|
||||
import PartyUiHandler, { PartyOption, PartyUiMode } from '../ui/party-ui-handler';
|
||||
import SoundFade from 'phaser3-rex-plugins/plugins/soundfade';
|
||||
import { GameMode } from '../game-mode';
|
||||
import { GameModes } from '../game-mode';
|
||||
import { LevelMoves } from '../data/pokemon-level-moves';
|
||||
import { DamageAchv, achvs } from '../system/achv';
|
||||
import { DexAttr, StarterMoveset } from '../system/game-data';
|
||||
@@ -180,7 +180,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
|
||||
this.pokerus = false;
|
||||
|
||||
const fused = new Utils.BooleanHolder(scene.gameMode === GameMode.SPLICED_ENDLESS);
|
||||
const fused = new Utils.BooleanHolder(scene.gameMode.isSplicedOnly);
|
||||
if (!fused.value && !this.isPlayer() && !this.hasTrainer())
|
||||
this.scene.applyModifier(EnemyFusionChanceModifier, false, fused);
|
||||
|
||||
@@ -536,7 +536,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
const fusionBaseStats = this.getFusionSpeciesForm().baseStats;
|
||||
for (let s = 0; s < this.stats.length; s++)
|
||||
baseStats[s] = Math.ceil((baseStats[s] + fusionBaseStats[s]) / 2);
|
||||
} else if (this.scene.gameMode === GameMode.SPLICED_ENDLESS) {
|
||||
} else if (this.scene.gameMode.isSplicedOnly) {
|
||||
for (let s = 0; s < this.stats.length; s++)
|
||||
baseStats[s] = Math.ceil(baseStats[s] / 2);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user