Fix errors from merged PRs
parent
fd8cb07c9b
commit
df7a6be654
|
@ -10,7 +10,7 @@ import { BattlerTagType } from "./enums/battler-tag-type";
|
||||||
import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect";
|
import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect";
|
||||||
import { Gender } from "./gender";
|
import { Gender } from "./gender";
|
||||||
import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, RecoilAttr, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves } from "./move";
|
import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, RecoilAttr, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves } from "./move";
|
||||||
import { ArenaTagSide } from "./arena-tag";
|
import { ArenaTagSide, ArenaTrapTag } from "./arena-tag";
|
||||||
import { ArenaTagType } from "./enums/arena-tag-type";
|
import { ArenaTagType } from "./enums/arena-tag-type";
|
||||||
import { Stat } from "./pokemon-stat";
|
import { Stat } from "./pokemon-stat";
|
||||||
import { PokemonHeldItemModifier } from "../modifier/modifier";
|
import { PokemonHeldItemModifier } from "../modifier/modifier";
|
||||||
|
@ -558,7 +558,7 @@ export class PostDefendStatChangeAbAttr extends PostDefendAbAttr {
|
||||||
|
|
||||||
export class PostDefendApplyArenaTrapTagAbAttr extends PostDefendAbAttr {
|
export class PostDefendApplyArenaTrapTagAbAttr extends PostDefendAbAttr {
|
||||||
private condition: PokemonDefendCondition;
|
private condition: PokemonDefendCondition;
|
||||||
private tagType: ArenaTrapTag;
|
private tagType: ArenaTagType;
|
||||||
|
|
||||||
constructor(condition: PokemonDefendCondition, tagType: ArenaTagType) {
|
constructor(condition: PokemonDefendCondition, tagType: ArenaTagType) {
|
||||||
super(true);
|
super(true);
|
||||||
|
|
|
@ -845,7 +845,7 @@ export class HitHealAttr extends MoveEffectAttr {
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const healAmount = Math.max(Math.floor(user.turnData.damageDealt * this.healRatio), 1);
|
const healAmount = Math.max(Math.floor(user.turnData.damageDealt * this.healRatio), 1);
|
||||||
const reverseDrain = pokemon.hasAbilityWithAttr(ReverseDrainAbAttr);
|
const reverseDrain = user.hasAbilityWithAttr(ReverseDrainAbAttr);
|
||||||
user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(),
|
user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(),
|
||||||
!reverseDrain ? healAmount : healAmount * -1,
|
!reverseDrain ? healAmount : healAmount * -1,
|
||||||
!reverseDrain ? getPokemonMessage(target, ` had its\nenergy drained!`) : undefined,
|
!reverseDrain ? getPokemonMessage(target, ` had its\nenergy drained!`) : undefined,
|
||||||
|
@ -865,7 +865,7 @@ export class StrengthSapHealAttr extends MoveEffectAttr {
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const healAmount = target.stats[Stat.ATK] * (Math.max(2, 2 + target.summonData.battleStats[BattleStat.ATK]) / Math.max(2, 2 - target.summonData.battleStats[BattleStat.ATK]));
|
const healAmount = target.stats[Stat.ATK] * (Math.max(2, 2 + target.summonData.battleStats[BattleStat.ATK]) / Math.max(2, 2 - target.summonData.battleStats[BattleStat.ATK]));
|
||||||
const reverseDrain = pokemon.hasAbilityWithAttr(ReverseDrainAbAttr);
|
const reverseDrain = user.hasAbilityWithAttr(ReverseDrainAbAttr);
|
||||||
user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(),
|
user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(),
|
||||||
!reverseDrain ? healAmount : healAmount * -1,
|
!reverseDrain ? healAmount : healAmount * -1,
|
||||||
!reverseDrain ? getPokemonMessage(user, ` regained\nhealth!`) : undefined,
|
!reverseDrain ? getPokemonMessage(user, ` regained\nhealth!`) : undefined,
|
||||||
|
|
Loading…
Reference in New Issue