mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Cleanup
This commit is contained in:
parent
25099d28e7
commit
e784664631
@ -189,7 +189,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.metSpecies = dataSource.metSpecies ?? (this.metBiome !== -1 ? this.species.speciesId : this.species.getRootSpeciesId(true));
|
||||
this.pauseEvolutions = dataSource.pauseEvolutions;
|
||||
this.pokerus = !!dataSource.pokerus;
|
||||
this.evoCounter = dataSource.evoCounter || 0;
|
||||
this.evoCounter = dataSource.evoCounter ?? 0;
|
||||
this.fusionSpecies = dataSource.fusionSpecies instanceof PokemonSpecies ? dataSource.fusionSpecies : dataSource.fusionSpecies ? getPokemonSpecies(dataSource.fusionSpecies) : null;
|
||||
this.fusionFormIndex = dataSource.fusionFormIndex;
|
||||
this.fusionAbilityIndex = dataSource.fusionAbilityIndex;
|
||||
@ -2212,12 +2212,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.battleData.hitCount++;
|
||||
const attackResult = { move: move.id, result: result as DamageResult, damage: damage.value, critical: isCritical, sourceId: source.id, sourceBattlerIndex: source.getBattlerIndex() };
|
||||
this.turnData.attacksReceived.unshift(attackResult);
|
||||
if (source.isPlayer()) {
|
||||
if (!this.isPlayer()) {
|
||||
if (source.isPlayer() && !this.isPlayer()) {
|
||||
this.scene.applyModifiers(DamageMoneyRewardModifier, true, source, damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// want to include is.Fainted() in case multi hit move ends early, still want to render message
|
||||
if (source.turnData.hitsLeft === 1 || this.isFainted()) {
|
||||
|
@ -92,7 +92,7 @@ export default class PokemonData {
|
||||
}
|
||||
this.pokerus = !!source.pokerus;
|
||||
|
||||
this.evoCounter = source.evoCounter || 0;
|
||||
this.evoCounter = source.evoCounter ?? 0;
|
||||
|
||||
this.fusionSpecies = sourcePokemon ? sourcePokemon.fusionSpecies?.speciesId : source.fusionSpecies;
|
||||
this.fusionFormIndex = source.fusionFormIndex;
|
||||
|
Loading…
Reference in New Issue
Block a user