Add support for variable category moves
Also lets shell side arm poison
This commit is contained in:
1 parent
7c8aed50cd
commit
4f63b83bd9
2 files changed
+67
-7
No files matched your search
@@ -2,7 +2,7 @@ import Phaser from 'phaser';
|
||||
import BattleScene, { ABILITY_OVERRIDE, AnySound, MOVE_OVERRIDE, OPP_ABILITY_OVERRIDE, OPP_MOVE_OVERRIDE } from '../battle-scene';
|
||||
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
|
||||
import { Moves } from "../data/enums/moves";
|
||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr } from "../data/move";
|
||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr } from "../data/move";
|
||||
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm } from '../data/pokemon-species';
|
||||
import * as Utils from '../utils';
|
||||
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
|
||||
@@ -1093,9 +1093,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
apply(source: Pokemon, battlerMove: PokemonMove): HitResult {
|
||||
let result: HitResult;
|
||||
const move = battlerMove.getMove();
|
||||
const moveCategory = move.category;
|
||||
let damage = new Utils.NumberHolder(0);
|
||||
|
||||
const variableCategory = new Utils.IntegerHolder(move.category);
|
||||
applyMoveAttrs(VariableMoveCategoryAttr, source, this, move, variableCategory);
|
||||
const moveCategory = variableCategory.value as MoveCategory;
|
||||
|
||||
const variableType = new Utils.IntegerHolder(move.type);
|
||||
const typeChangeMovePowerMultiplier = new Utils.NumberHolder(1);
|
||||
applyMoveAttrs(VariableMoveTypeAttr, source, this, move, variableType);
|
||||
|
||||
Reference in new issue
Block a user