type hints affected by enemy illusion

This commit is contained in:
Lylian 2025-03-31 16:29:55 +02:00
parent a1f7304d4c
commit 149d56c31d
3 changed files with 5 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class DefaultOverrides {
readonly STARTER_FORM_OVERRIDES: Partial<Record<Species, number>> = {}; readonly STARTER_FORM_OVERRIDES: Partial<Record<Species, number>> = {};
/** default 5 or 20 for Daily */ /** default 5 or 20 for Daily */
readonly STARTING_LEVEL_OVERRIDE: number = 30; readonly STARTING_LEVEL_OVERRIDE: number = 0;
/** /**
* SPECIES OVERRIDE * SPECIES OVERRIDE
* will only apply to the first starter in your party or each enemy pokemon * will only apply to the first starter in your party or each enemy pokemon

View File

@ -306,6 +306,9 @@ export default class FightUiHandler extends UiHandler implements InfoToggle {
pokemon, pokemon,
pokemonMove.getMove(), pokemonMove.getMove(),
!opponent.battleData?.abilityRevealed, !opponent.battleData?.abilityRevealed,
undefined,
undefined,
true
); );
if (effectiveness === undefined) { if (effectiveness === undefined) {
return undefined; return undefined;

View File

@ -78,7 +78,7 @@ describe("Abilities - Illusion", () => {
}); });
it("causes enemy AI to consider the illusion's type instead of the actual type when considering move effectiveness", async () => { it("causes enemy AI to consider the illusion's type instead of the actual type when considering move effectiveness", async () => {
game.override.enemyMoveset([Moves.FLAMETHROWER, Moves.PSYCHIC, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.FLAMETHROWER, Moves.PSYCHIC, Moves.TACKLE]);
await game.classicMode.startBattle([Species.ZOROARK, Species.AXEW]); await game.classicMode.startBattle([Species.ZOROARK, Species.AXEW]);
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;