Remove status effect move type immunity
This commit is contained in:
1 parent
4e5121b9c9
commit
893c20fc16
3 files changed
+14
-5
No files matched your search
@@ -2,7 +2,7 @@ import Phaser from 'phaser';
|
||||
import BattleScene, { AnySound } from '../battle-scene';
|
||||
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
|
||||
import { Moves } from "../data/enums/moves";
|
||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusEffectAttr, AttackMove } from "../data/move";
|
||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr } from "../data/move";
|
||||
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies } from '../data/pokemon-species';
|
||||
import * as Utils from '../utils';
|
||||
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
|
||||
@@ -1012,7 +1012,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
const cancelled = new Utils.BooleanHolder(false);
|
||||
const typeless = !!move.getAttrs(TypelessAttr).length;
|
||||
const types = this.getTypes(true);
|
||||
const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveCategory.STATUS || move.getAttrs(StatusEffectAttr).length)
|
||||
const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveCategory.STATUS || move.getAttrs(StatusMoveTypeImmunityAttr).find(attr => (attr as StatusMoveTypeImmunityAttr).immuneType === move.type))
|
||||
? getTypeDamageMultiplier(move.type, types[0]) * (types.length > 1 ? getTypeDamageMultiplier(move.type, types[1]) : 1)
|
||||
: 1);
|
||||
if (typeless)
|
||||
|
||||
Reference in new issue
Block a user