Add daily runs (WiP)
This commit is contained in:
1 parent
81f9e2da36
commit
56f4a71ca6
14 files changed
+332
-139
No files matched your search
+6
-2
@@ -53,6 +53,9 @@ export class Arena {
|
||||
}
|
||||
|
||||
randomSpecies(waveIndex: integer, level: integer, attempt?: integer): PokemonSpecies {
|
||||
const overrideSpecies = this.scene.gameMode.getOverrideSpecies(waveIndex);
|
||||
if (overrideSpecies)
|
||||
return overrideSpecies;
|
||||
const isBoss = !!this.scene.getEncounterBossSegments(waveIndex, level) && !!this.pokemonPool[BiomePoolTier.BOSS].length
|
||||
&& (this.biomeType !== Biome.END || this.scene.gameMode.isClassic || this.scene.gameMode.isWaveFinal(waveIndex));
|
||||
const tierValue = Utils.randSeedInt(!isBoss ? 512 : 64);
|
||||
@@ -123,8 +126,9 @@ export class Arena {
|
||||
}
|
||||
|
||||
randomTrainerType(waveIndex: integer): TrainerType {
|
||||
const isBoss = (waveIndex % 30) === 20 && !!this.trainerPool[BiomePoolTier.BOSS].length
|
||||
&& (this.biomeType !== Biome.END || this.scene.gameMode.isClassic || this.scene.gameMode.isWaveFinal(waveIndex));
|
||||
const isBoss = !!this.trainerPool[BiomePoolTier.BOSS].length
|
||||
&& this.scene.gameMode.isTrainerBoss(waveIndex, this.biomeType);
|
||||
console.log(isBoss, this.trainerPool)
|
||||
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
|
||||
|
||||
@@ -1073,9 +1073,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
if (source.getTag(BattlerTagType.CRIT_BOOST))
|
||||
critLevel.value += 2;
|
||||
const critChance = Math.ceil(16 / Math.pow(2, critLevel.value));
|
||||
const blockCrit = new Utils.BooleanHolder(false);
|
||||
applyAbAttrs(BlockCritAbAttr, this, null);
|
||||
isCritical = !blockCrit.value && !source.getTag(BattlerTagType.NO_CRIT) && (critChance === 1 || !this.scene.currentBattle.randSeedInt(critChance));
|
||||
isCritical = !source.getTag(BattlerTagType.NO_CRIT) && (critChance === 1 || !this.scene.currentBattle.randSeedInt(critChance));
|
||||
if (isCritical) {
|
||||
const blockCrit = new Utils.BooleanHolder(false);
|
||||
applyAbAttrs(BlockCritAbAttr, this, null, blockCrit);
|
||||
if (blockCrit.value)
|
||||
isCritical = false;
|
||||
}
|
||||
}
|
||||
const sourceAtk = new Utils.IntegerHolder(source.getBattleStat(isPhysical ? Stat.ATK : Stat.SPATK, this));
|
||||
const targetDef = new Utils.IntegerHolder(this.getBattleStat(isPhysical ? Stat.DEF : Stat.SPDEF, source));
|
||||
|
||||
@@ -78,7 +78,8 @@ export default class Trainer extends Phaser.GameObjects.Container {
|
||||
const ret = [];
|
||||
const partyTemplate = this.getPartyTemplate();
|
||||
|
||||
let baseLevel = 1 + waveIndex / 2 + Math.pow(waveIndex / 25, 2);
|
||||
const difficultyWaveIndex = this.scene.gameMode.getWaveForDifficulty(waveIndex);
|
||||
let baseLevel = 1 + difficultyWaveIndex / 2 + Math.pow(difficultyWaveIndex / 25, 2);
|
||||
|
||||
for (let i = 0; i < partyTemplate.size; i++) {
|
||||
let multiplier = 1;
|
||||
@@ -106,8 +107,8 @@ export default class Trainer extends Phaser.GameObjects.Container {
|
||||
let levelOffset = 0;
|
||||
|
||||
if (strength < TrainerPartyMemberStrength.STRONG) {
|
||||
multiplier = Math.min(multiplier + 0.025 * Math.floor(waveIndex / 25), 1.2);
|
||||
levelOffset = -Math.floor((waveIndex / 50) * (TrainerPartyMemberStrength.STRONG - strength));
|
||||
multiplier = Math.min(multiplier + 0.025 * Math.floor(difficultyWaveIndex / 25), 1.2);
|
||||
levelOffset = -Math.floor((difficultyWaveIndex / 50) * (TrainerPartyMemberStrength.STRONG - strength));
|
||||
}
|
||||
|
||||
const level = Math.ceil(baseLevel * multiplier) + levelOffset;
|
||||
|
||||
Reference in new issue
Block a user