mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 23:42:18 +02:00
Apply suggestions from Kev code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
d450f1073c
commit
ef353da35a
@ -9866,7 +9866,7 @@ export function initMoves() {
|
|||||||
const lastEnemyFaint = globalScene.currentBattle.enemyFaintsHistory[globalScene.currentBattle.enemyFaintsHistory.length - 1];
|
const lastEnemyFaint = globalScene.currentBattle.enemyFaintsHistory[globalScene.currentBattle.enemyFaintsHistory.length - 1];
|
||||||
return (
|
return (
|
||||||
(lastPlayerFaint !== undefined && turn - lastPlayerFaint.turn === 1 && user.isPlayer()) ||
|
(lastPlayerFaint !== undefined && turn - lastPlayerFaint.turn === 1 && user.isPlayer()) ||
|
||||||
(lastEnemyFaint !== undefined && turn - lastEnemyFaint.turn === 1 &&user.isEnemy())
|
(lastEnemyFaint !== undefined && turn - lastEnemyFaint.turn === 1 && user.isEnemy())
|
||||||
) ? 2 : 1;
|
) ? 2 : 1;
|
||||||
}),
|
}),
|
||||||
new AttackMove(Moves.FINAL_GAMBIT, PokemonType.FIGHTING, MoveCategory.SPECIAL, -1, 100, 5, -1, 0, 5)
|
new AttackMove(Moves.FINAL_GAMBIT, PokemonType.FIGHTING, MoveCategory.SPECIAL, -1, 100, 5, -1, 0, 5)
|
||||||
|
@ -5,7 +5,7 @@ import { Nature } from "#enums/nature";
|
|||||||
import { PokeballType } from "#enums/pokeball";
|
import { PokeballType } from "#enums/pokeball";
|
||||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "../data/pokemon-species";
|
import { getPokemonSpecies, getPokemonSpeciesForm } from "../data/pokemon-species";
|
||||||
import { Status } from "../data/status-effect";
|
import { Status } from "../data/status-effect";
|
||||||
import Pokemon, { PokemonBattleData, PokemonMove, PokemonSummonData } from "../field/pokemon";
|
import Pokemon, { EnemyPokemon, PokemonBattleData, PokemonMove, PokemonSummonData } from "../field/pokemon";
|
||||||
import { TrainerSlot } from "#enums/trainer-slot";
|
import { TrainerSlot } from "#enums/trainer-slot";
|
||||||
import type { Variant } from "#app/sprites/variant";
|
import type { Variant } from "#app/sprites/variant";
|
||||||
import type { Biome } from "#enums/biome";
|
import type { Biome } from "#enums/biome";
|
||||||
@ -140,7 +140,7 @@ export default class PokemonData {
|
|||||||
this.fusionLuck = source.fusionLuck ?? (source.fusionShiny ? source.fusionVariant + 1 : 0);
|
this.fusionLuck = source.fusionLuck ?? (source.fusionShiny ? source.fusionVariant + 1 : 0);
|
||||||
this.fusionTeraType = (source.fusionTeraType ?? 0) as PokemonType;
|
this.fusionTeraType = (source.fusionTeraType ?? 0) as PokemonType;
|
||||||
|
|
||||||
this.boss = (source.isEnemy() && !!source.bossSegments) || (!this.player && !!source.boss);
|
this.boss = (source instanceof EnemyPokemon && !!source.bossSegments) || (!this.player && !!source.boss);
|
||||||
this.bossSegments = source.bossSegments ?? 0;
|
this.bossSegments = source.bossSegments ?? 0;
|
||||||
|
|
||||||
this.summonData = new PokemonSummonData(source.summonData);
|
this.summonData = new PokemonSummonData(source.summonData);
|
||||||
|
Loading…
Reference in New Issue
Block a user