mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +02:00
[Balance] Trainer pokemon now have minimum IVs of wave/10
(#5719)
This commit is contained in:
parent
89a9d55d3c
commit
a7479c8eb6
@ -12,7 +12,6 @@ import BattleInfo, {
|
||||
import type Move from "#app/data/moves/move";
|
||||
import {
|
||||
HighCritAttr,
|
||||
StatChangeBeforeDmgCalcAttr,
|
||||
HitsTagAttr,
|
||||
applyMoveAttrs,
|
||||
FixedDamageAttr,
|
||||
@ -70,10 +69,8 @@ import {
|
||||
EFFECTIVE_STATS,
|
||||
} from "#enums/stat";
|
||||
import {
|
||||
DamageMoneyRewardModifier,
|
||||
EnemyDamageBoosterModifier,
|
||||
EnemyDamageReducerModifier,
|
||||
EnemyEndureChanceModifier,
|
||||
EnemyFusionChanceModifier,
|
||||
HiddenAbilityRateBoosterModifier,
|
||||
BaseStatModifier,
|
||||
@ -119,7 +116,6 @@ import {
|
||||
TypeImmuneTag,
|
||||
getBattlerTag,
|
||||
SemiInvulnerableTag,
|
||||
TypeBoostTag,
|
||||
MoveRestrictionBattlerTag,
|
||||
ExposedTag,
|
||||
DragonCheerTag,
|
||||
@ -188,7 +184,7 @@ import {
|
||||
PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr,
|
||||
applyAllyStatMultiplierAbAttrs,
|
||||
AllyStatMultiplierAbAttr,
|
||||
MoveAbilityBypassAbAttr
|
||||
MoveAbilityBypassAbAttr,
|
||||
} from "#app/data/abilities/ability";
|
||||
import { allAbilities } from "#app/data/data-lists";
|
||||
import type PokemonData from "#app/system/pokemon-data";
|
||||
@ -202,7 +198,7 @@ import {
|
||||
EVOLVE_MOVE,
|
||||
RELEARN_MOVE,
|
||||
} from "#app/data/balance/pokemon-level-moves";
|
||||
import { DamageAchv, achvs } from "#app/system/achv";
|
||||
import { achvs } from "#app/system/achv";
|
||||
import type { StarterDataEntry, StarterMoveset } from "#app/system/game-data";
|
||||
import { DexAttr } from "#app/system/game-data";
|
||||
import {
|
||||
@ -7030,6 +7026,15 @@ export class EnemyPokemon extends Pokemon {
|
||||
}
|
||||
speciesId = prevolution;
|
||||
}
|
||||
|
||||
if (this.hasTrainer() && globalScene.currentBattle) {
|
||||
const { waveIndex } = globalScene.currentBattle;
|
||||
const ivs: number[] = [];
|
||||
while (ivs.length < 6) {
|
||||
ivs.push(this.randSeedIntRange(Math.floor(waveIndex / 10), 31));
|
||||
}
|
||||
this.ivs = ivs;
|
||||
}
|
||||
}
|
||||
|
||||
this.aiType =
|
||||
|
@ -209,4 +209,19 @@ describe("Spec - Pokemon", () => {
|
||||
expect(types[1]).toBe(PokemonType.DARK);
|
||||
});
|
||||
});
|
||||
|
||||
it.each([5, 25, 55, 95, 145, 195])(
|
||||
"should set minimum IVs for enemy trainer pokemon based on wave (%i)",
|
||||
async wave => {
|
||||
game.override.startingWave(wave);
|
||||
await game.classicMode.startBattle([Species.FEEBAS]);
|
||||
const { waveIndex } = game.scene.currentBattle;
|
||||
|
||||
for (const pokemon of game.scene.getEnemyParty()) {
|
||||
for (const index in pokemon.ivs) {
|
||||
expect(pokemon.ivs[index]).toBeGreaterThanOrEqual(Math.floor(waveIndex / 10));
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user