Fix damage reduction abilities not working
parent
02e35aad83
commit
74e9b95e13
|
@ -1,5 +1,5 @@
|
|||
import { MainClient, NamedAPIResource } from 'pokenode-ts';
|
||||
import { MoveTarget, Moves, allMoves } from './move';
|
||||
import { MoveTarget, allMoves } from './move';
|
||||
import * as Utils from '../utils';
|
||||
import fs from 'vite-plugin-fs/browser';
|
||||
import PokemonSpecies, { PokemonForm, SpeciesFormKey, allSpecies } from './pokemon-species';
|
||||
|
@ -9,6 +9,7 @@ import { Abilities, allAbilities } from './ability';
|
|||
import { Species } from './enums/species';
|
||||
import { pokemonFormLevelMoves } from './pokemon-level-moves';
|
||||
import { tmSpecies } from './tms';
|
||||
import { Moves } from './enums/moves';
|
||||
|
||||
const targetMap = {
|
||||
'specific-move': MoveTarget.ATTACKER,
|
||||
|
|
|
@ -480,10 +480,13 @@ export class EncounterPhase extends BattlePhase {
|
|||
this.scene.gameData.setPokemonSeen(enemyPokemon);
|
||||
}
|
||||
|
||||
if (this.scene.gameMode === GameMode.CLASSIC && (battle.battleSpec === BattleSpec.FINAL_BOSS || !(battle.waveIndex % 250)) && enemyPokemon.species.speciesId === Species.ETERNATUS) {
|
||||
if (enemyPokemon.species.speciesId === Species.ETERNATUS) {
|
||||
if (this.scene.gameMode === GameMode.CLASSIC && (battle.battleSpec === BattleSpec.FINAL_BOSS || !(battle.waveIndex % 250))) {
|
||||
if (battle.battleSpec !== BattleSpec.FINAL_BOSS)
|
||||
enemyPokemon.formIndex = 1;
|
||||
enemyPokemon.setBoss();
|
||||
} else if (!(battle.waveIndex % 1000))
|
||||
enemyPokemon.formIndex = 1;
|
||||
}
|
||||
|
||||
loadEnemyAssets.push(enemyPokemon.loadAssets());
|
||||
|
|
|
@ -376,7 +376,7 @@ export default class SpritePipeline extends FieldSpritePipeline {
|
|||
|
||||
batchQuad(gameObject: Phaser.GameObjects.GameObject, x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number,
|
||||
u0: number, v0: number, u1: number, v1: number, tintTL: number, tintTR: number, tintBL: number, tintBR: number, tintEffect: number | boolean,
|
||||
texture?: WebGLTexture, unit?: number): boolean {
|
||||
texture?: Phaser.Renderer.WebGL.Wrappers.WebGLTextureWrapper, unit?: number): boolean {
|
||||
const sprite = gameObject as Phaser.GameObjects.Sprite;
|
||||
|
||||
this.set1f('vCutoff', v1);
|
||||
|
|
|
@ -25,7 +25,7 @@ import { TempBattleStat } from './data/temp-battle-stat';
|
|||
import { WeakenMoveTypeTag } from './data/arena-tag';
|
||||
import { ArenaTagType } from "./data/enums/arena-tag-type";
|
||||
import { Biome } from "./data/enums/biome";
|
||||
import { Abilities, Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs } from './data/ability';
|
||||
import { Abilities, Ability, BattleStatMultiplierAbAttr, BlockCritAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs } from './data/ability';
|
||||
import PokemonData from './system/pokemon-data';
|
||||
import { BattlerIndex } from './battle';
|
||||
import { BattleSpec } from "./enums/battle-spec";
|
||||
|
@ -1014,6 +1014,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
power.value = 60;
|
||||
applyPreAttackAbAttrs(VariableMovePowerAbAttr, source, this, battlerMove, power);
|
||||
|
||||
applyPreDefendAbAttrs(ReceivedMoveDamageMultiplierAbAttr, this, source, battlerMove, cancelled, power);
|
||||
|
||||
if (!typeless)
|
||||
applyPreDefendAbAttrs(TypeImmunityAbAttr, this, source, battlerMove, cancelled, typeMultiplier);
|
||||
if (!cancelled.value)
|
||||
|
|
Loading…
Reference in New Issue