mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-07 00:42:16 +02:00
fix imports
This commit is contained in:
parent
88d05bcec2
commit
18907b5226
303
src/phases.ts
303
src/phases.ts
@ -1,231 +1,63 @@
|
|||||||
import BattleScene, {bypassLogin, startingWave} from "./battle-scene";
|
import BattleScene, { bypassLogin, startingWave } from "./battle-scene";
|
||||||
import {
|
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
|
||||||
DamageResult,
|
|
||||||
default as Pokemon,
|
|
||||||
EnemyPokemon,
|
|
||||||
FieldPosition,
|
|
||||||
HitResult,
|
|
||||||
MoveResult,
|
|
||||||
PlayerPokemon,
|
|
||||||
PokemonMove,
|
|
||||||
TurnMove
|
|
||||||
} from "./field/pokemon";
|
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
import {Moves} from "./data/enums/moves";
|
import { Moves } from "./data/enums/moves";
|
||||||
import {
|
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, FixedDamageAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr } from "./data/move";
|
||||||
allMoves,
|
import { Mode } from './ui/ui';
|
||||||
applyFilteredMoveAttrs,
|
import { Command } from "./ui/command-ui-handler";
|
||||||
applyMoveAttrs,
|
import { Stat } from "./data/pokemon-stat";
|
||||||
AttackMove,
|
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, PokemonFriendshipBoosterModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier } from "./modifier/modifier";
|
||||||
BypassSleepAttr,
|
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
||||||
ChargeAttr,
|
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
||||||
CopyMoveAttr,
|
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
||||||
FixedDamageAttr,
|
import { StatusEffect, getStatusEffectActivationText, getStatusEffectCatchRateMultiplier, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText } from "./data/status-effect";
|
||||||
ForceSwitchOutAttr,
|
import { SummaryUiMode } from "./ui/summary-ui-handler";
|
||||||
getMoveTargets,
|
|
||||||
HealStatusEffectAttr,
|
|
||||||
HitsTagAttr,
|
|
||||||
IgnoreOpponentStatChangesAttr,
|
|
||||||
MissEffectAttr,
|
|
||||||
MoveAttr,
|
|
||||||
MoveEffectAttr,
|
|
||||||
MoveEffectTrigger,
|
|
||||||
MoveFlags,
|
|
||||||
MoveTarget,
|
|
||||||
MoveTargetSet,
|
|
||||||
MultiHitAttr,
|
|
||||||
NoEffectAttr,
|
|
||||||
OneHitKOAccuracyAttr,
|
|
||||||
OverrideMoveEffectAttr,
|
|
||||||
PreMoveMessageAttr,
|
|
||||||
SelfStatusMove,
|
|
||||||
VariableAccuracyAttr
|
|
||||||
} from "./data/move";
|
|
||||||
import {Mode} from './ui/ui';
|
|
||||||
import {Command} from "./ui/command-ui-handler";
|
|
||||||
import {Stat} from "./data/pokemon-stat";
|
|
||||||
import {
|
|
||||||
BerryModifier,
|
|
||||||
ContactHeldItemTransferChanceModifier,
|
|
||||||
EnemyAttackStatusEffectChanceModifier,
|
|
||||||
EnemyPersistentModifier,
|
|
||||||
EnemyStatusEffectHealChanceModifier,
|
|
||||||
EnemyTurnHealModifier,
|
|
||||||
ExpBalanceModifier,
|
|
||||||
ExpBoosterModifier,
|
|
||||||
ExpShareModifier,
|
|
||||||
ExtraModifierModifier,
|
|
||||||
FlinchChanceModifier,
|
|
||||||
HealingBoosterModifier,
|
|
||||||
HitHealModifier,
|
|
||||||
IvScannerModifier,
|
|
||||||
LapsingPersistentModifier,
|
|
||||||
LapsingPokemonHeldItemModifier,
|
|
||||||
MapModifier,
|
|
||||||
Modifier,
|
|
||||||
MoneyInterestModifier,
|
|
||||||
MoneyMultiplierModifier,
|
|
||||||
MultipleParticipantExpBonusModifier,
|
|
||||||
PersistentModifier,
|
|
||||||
PokemonExpBoosterModifier,
|
|
||||||
PokemonFriendshipBoosterModifier,
|
|
||||||
PokemonHeldItemModifier,
|
|
||||||
PokemonInstantReviveModifier,
|
|
||||||
PokemonMoveAccuracyBoosterModifier,
|
|
||||||
PokemonMultiHitModifier,
|
|
||||||
SwitchEffectTransferModifier,
|
|
||||||
TempBattleStatBoosterModifier,
|
|
||||||
TurnHealModifier,
|
|
||||||
TurnHeldItemTransferModifier
|
|
||||||
} from "./modifier/modifier";
|
|
||||||
import PartyUiHandler, {PartyOption, PartyUiMode} from "./ui/party-ui-handler";
|
|
||||||
import {
|
|
||||||
doPokeballBounceAnim,
|
|
||||||
getPokeballAtlasKey,
|
|
||||||
getPokeballCatchMultiplier,
|
|
||||||
getPokeballTintColor,
|
|
||||||
PokeballType
|
|
||||||
} from "./data/pokeball";
|
|
||||||
import {CommonAnim, CommonBattleAnim, initMoveAnim, loadMoveAnimAssets, MoveAnim} from "./data/battle-anims";
|
|
||||||
import {
|
|
||||||
getStatusEffectActivationText,
|
|
||||||
getStatusEffectCatchRateMultiplier,
|
|
||||||
getStatusEffectHealText,
|
|
||||||
getStatusEffectObtainText,
|
|
||||||
getStatusEffectOverlapText,
|
|
||||||
StatusEffect
|
|
||||||
} from "./data/status-effect";
|
|
||||||
import {SummaryUiMode} from "./ui/summary-ui-handler";
|
|
||||||
import EvolutionSceneHandler from "./ui/evolution-scene-handler";
|
import EvolutionSceneHandler from "./ui/evolution-scene-handler";
|
||||||
import {EvolutionPhase} from "./evolution-phase";
|
import { EvolutionPhase } from "./evolution-phase";
|
||||||
import {Phase} from "./phase";
|
import { Phase } from "./phase";
|
||||||
import {BattleStat, getBattleStatLevelChangeDescription, getBattleStatName} from "./data/battle-stat";
|
import { BattleStat, getBattleStatLevelChangeDescription, getBattleStatName } from "./data/battle-stat";
|
||||||
import {biomeLinks, getBiomeName} from "./data/biomes";
|
import { biomeLinks, getBiomeName } from "./data/biomes";
|
||||||
import {Biome} from "./data/enums/biome";
|
import { Biome } from "./data/enums/biome";
|
||||||
import {ModifierTier} from "./modifier/modifier-tier";
|
import { ModifierTier } from "./modifier/modifier-tier";
|
||||||
import {
|
import { FusePokemonModifierType, ModifierPoolType, ModifierType, ModifierTypeFunc, ModifierTypeOption, PokemonModifierType, PokemonMoveModifierType, RememberMoveModifierType, TmModifierType, getDailyRunStarterModifiers, getEnemyBuffModifierForWave, getModifierType, getPlayerModifierTypeOptions, getPlayerShopModifierTypeOptionsForWave, modifierTypes, regenerateModifierPoolThresholds } from "./modifier/modifier-type";
|
||||||
FusePokemonModifierType,
|
|
||||||
getDailyRunStarterModifiers,
|
|
||||||
getEnemyBuffModifierForWave,
|
|
||||||
getModifierType,
|
|
||||||
getPlayerModifierTypeOptions,
|
|
||||||
getPlayerShopModifierTypeOptionsForWave,
|
|
||||||
ModifierPoolType,
|
|
||||||
ModifierType,
|
|
||||||
ModifierTypeFunc,
|
|
||||||
ModifierTypeOption,
|
|
||||||
modifierTypes,
|
|
||||||
PokemonModifierType,
|
|
||||||
PokemonMoveModifierType,
|
|
||||||
regenerateModifierPoolThresholds,
|
|
||||||
RememberMoveModifierType,
|
|
||||||
TmModifierType
|
|
||||||
} from "./modifier/modifier-type";
|
|
||||||
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
|
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
|
||||||
import {
|
import { BattlerTagLapseType, BounceTag, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags";
|
||||||
BattlerTag,
|
import { BattlerTagType } from "./data/enums/battler-tag-type";
|
||||||
BattlerTagLapseType,
|
import { getPokemonMessage } from "./messages";
|
||||||
BounceTag,
|
import { Starter } from "./ui/starter-select-ui-handler";
|
||||||
EncoreTag,
|
import { Gender } from "./data/gender";
|
||||||
HideSpriteTag as HiddenTag,
|
import { Weather, WeatherType, getRandomWeatherType, getTerrainBlockMessage, getWeatherDamageMessage, getWeatherLapseMessage } from "./data/weather";
|
||||||
ProtectedTag,
|
import { TempBattleStat } from "./data/temp-battle-stat";
|
||||||
TrappedTag
|
import { ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag } from "./data/arena-tag";
|
||||||
} from "./data/battler-tags";
|
import { ArenaTagType } from "./data/enums/arena-tag-type";
|
||||||
import {BattlerTagType} from "./data/enums/battler-tag-type";
|
import { CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostBattleAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RedirectMoveAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostBattleAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs, BattleStatMultiplierAbAttr, applyBattleStatMultiplierAbAttrs, IncrementMovePriorityAbAttr, applyPostVictoryAbAttrs, PostVictoryAbAttr, applyPostBattleInitAbAttrs, PostBattleInitAbAttr, BlockNonDirectDamageAbAttr as BlockNonDirectDamageAbAttr, applyPostKnockOutAbAttrs, PostKnockOutAbAttr, PostBiomeChangeAbAttr, applyPostFaintAbAttrs, PostFaintAbAttr, IncreasePpAbAttr, PostStatChangeAbAttr, applyPostStatChangeAbAttrs, AlwaysHitAbAttr, PreventBerryUseAbAttr } from "./data/ability";
|
||||||
import {getPokemonMessage} from "./messages";
|
import { Unlockables, getUnlockableName } from "./system/unlockables";
|
||||||
import {Starter} from "./ui/starter-select-ui-handler";
|
import { getBiomeKey } from "./field/arena";
|
||||||
import {Gender} from "./data/gender";
|
import { BattleType, BattlerIndex, TurnCommand } from "./battle";
|
||||||
import {
|
import { BattleSpec } from "./enums/battle-spec";
|
||||||
getRandomWeatherType,
|
import { Species } from "./data/enums/species";
|
||||||
getTerrainBlockMessage,
|
import { HealAchv, LevelAchv, achvs } from "./system/achv";
|
||||||
getWeatherDamageMessage,
|
import { TrainerSlot, trainerConfigs } from "./data/trainer-config";
|
||||||
getWeatherLapseMessage,
|
import { TrainerType } from "./data/enums/trainer-type";
|
||||||
Weather,
|
import { EggHatchPhase } from "./egg-hatch-phase";
|
||||||
WeatherType
|
import { Egg } from "./data/egg";
|
||||||
} from "./data/weather";
|
import { vouchers } from "./system/voucher";
|
||||||
import {TempBattleStat} from "./data/temp-battle-stat";
|
import { loggedInUser, updateUserInfo } from "./account";
|
||||||
import {ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag} from "./data/arena-tag";
|
import { PlayerGender, SessionSaveData } from "./system/game-data";
|
||||||
import {ArenaTagType} from "./data/enums/arena-tag-type";
|
import { addPokeballCaptureStars, addPokeballOpenParticles } from "./field/anims";
|
||||||
import {
|
import { SpeciesFormChangeActiveTrigger, SpeciesFormChangeManualTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangePostMoveTrigger, SpeciesFormChangePreMoveTrigger } from "./data/pokemon-forms";
|
||||||
AlwaysHitAbAttr,
|
import { battleSpecDialogue, getCharVariantFromDialogue } from "./data/dialogue";
|
||||||
applyAbAttrs,
|
import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "./ui/modifier-select-ui-handler";
|
||||||
applyBattleStatMultiplierAbAttrs,
|
import { Setting } from "./system/settings";
|
||||||
applyCheckTrappedAbAttrs,
|
import { Tutorial, handleTutorial } from "./tutorial";
|
||||||
applyPostAttackAbAttrs,
|
import { TerrainType } from "./data/terrain";
|
||||||
applyPostBattleAbAttrs,
|
import { OptionSelectConfig, OptionSelectItem } from "./ui/abstact-option-select-ui-handler";
|
||||||
applyPostBattleInitAbAttrs,
|
import { SaveSlotUiMode } from "./ui/save-slot-select-ui-handler";
|
||||||
applyPostDefendAbAttrs,
|
import { fetchDailyRunSeed, getDailyRunStarters } from "./data/daily-run";
|
||||||
applyPostFaintAbAttrs,
|
import { GameModes, gameModes } from "./game-mode";
|
||||||
applyPostKnockOutAbAttrs,
|
import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species";
|
||||||
applyPostStatChangeAbAttrs,
|
|
||||||
applyPostSummonAbAttrs,
|
|
||||||
applyPostTurnAbAttrs,
|
|
||||||
applyPostVictoryAbAttrs,
|
|
||||||
applyPostWeatherLapseAbAttrs,
|
|
||||||
applyPreStatChangeAbAttrs,
|
|
||||||
applyPreSwitchOutAbAttrs,
|
|
||||||
applyPreWeatherEffectAbAttrs,
|
|
||||||
BattleStatMultiplierAbAttr,
|
|
||||||
BlockNonDirectDamageAbAttr as BlockNonDirectDamageAbAttr, MagicBounceAbAttr,
|
|
||||||
CheckTrappedAbAttr,
|
|
||||||
IgnoreOpponentStatChangesAbAttr,
|
|
||||||
IncreasePpAbAttr,
|
|
||||||
IncrementMovePriorityAbAttr,
|
|
||||||
PostAttackAbAttr,
|
|
||||||
PostBattleAbAttr,
|
|
||||||
PostBattleInitAbAttr,
|
|
||||||
PostBiomeChangeAbAttr,
|
|
||||||
PostDefendAbAttr,
|
|
||||||
PostFaintAbAttr,
|
|
||||||
PostKnockOutAbAttr,
|
|
||||||
PostStatChangeAbAttr,
|
|
||||||
PostSummonAbAttr,
|
|
||||||
PostTurnAbAttr,
|
|
||||||
PostVictoryAbAttr,
|
|
||||||
PostWeatherLapseAbAttr,
|
|
||||||
PreSwitchOutAbAttr,
|
|
||||||
PreventBerryUseAbAttr,
|
|
||||||
PreWeatherDamageAbAttr,
|
|
||||||
ProtectStatAbAttr,
|
|
||||||
RedirectMoveAbAttr,
|
|
||||||
RunSuccessAbAttr,
|
|
||||||
StatChangeMultiplierAbAttr,
|
|
||||||
SuppressWeatherEffectAbAttr,
|
|
||||||
SyncEncounterNatureAbAttr
|
|
||||||
} from "./data/ability";
|
|
||||||
import {getUnlockableName, Unlockables} from "./system/unlockables";
|
|
||||||
import {getBiomeKey} from "./field/arena";
|
|
||||||
import {BattlerIndex, BattleType, TurnCommand} from "./battle";
|
|
||||||
import {BattleSpec} from "./enums/battle-spec";
|
|
||||||
import {Species} from "./data/enums/species";
|
|
||||||
import {achvs, HealAchv, LevelAchv} from "./system/achv";
|
|
||||||
import {trainerConfigs, TrainerSlot} from "./data/trainer-config";
|
|
||||||
import {TrainerType} from "./data/enums/trainer-type";
|
|
||||||
import {EggHatchPhase} from "./egg-hatch-phase";
|
|
||||||
import {Egg} from "./data/egg";
|
|
||||||
import {vouchers} from "./system/voucher";
|
|
||||||
import {loggedInUser, updateUserInfo} from "./account";
|
|
||||||
import {PlayerGender, SessionSaveData} from "./system/game-data";
|
|
||||||
import {addPokeballCaptureStars, addPokeballOpenParticles} from "./field/anims";
|
|
||||||
import {
|
|
||||||
SpeciesFormChangeActiveTrigger,
|
|
||||||
SpeciesFormChangeManualTrigger,
|
|
||||||
SpeciesFormChangeMoveLearnedTrigger,
|
|
||||||
SpeciesFormChangePostMoveTrigger,
|
|
||||||
SpeciesFormChangePreMoveTrigger
|
|
||||||
} from "./data/pokemon-forms";
|
|
||||||
import {battleSpecDialogue, getCharVariantFromDialogue} from "./data/dialogue";
|
|
||||||
import ModifierSelectUiHandler, {SHOP_OPTIONS_ROW_LIMIT} from "./ui/modifier-select-ui-handler";
|
|
||||||
import {Setting} from "./system/settings";
|
|
||||||
import {handleTutorial, Tutorial} from "./tutorial";
|
|
||||||
import {TerrainType} from "./data/terrain";
|
|
||||||
import {OptionSelectConfig, OptionSelectItem} from "./ui/abstact-option-select-ui-handler";
|
|
||||||
import {SaveSlotUiMode} from "./ui/save-slot-select-ui-handler";
|
|
||||||
import {fetchDailyRunSeed, getDailyRunStarters} from "./data/daily-run";
|
|
||||||
import {GameModes, gameModes} from "./game-mode";
|
|
||||||
import {getPokemonSpecies, speciesStarters} from "./data/pokemon-species";
|
|
||||||
import i18next from './plugins/i18n';
|
import i18next from './plugins/i18n';
|
||||||
import {STARTER_FORM_OVERRIDE, STARTER_SPECIES_OVERRIDE} from './overrides';
|
import { STARTER_FORM_OVERRIDE, STARTER_SPECIES_OVERRIDE } from './overrides';
|
||||||
|
|
||||||
export class LoginPhase extends Phase {
|
export class LoginPhase extends Phase {
|
||||||
private showText: boolean;
|
private showText: boolean;
|
||||||
@ -2430,11 +2262,16 @@ export class MovePhase extends BattlePhase {
|
|||||||
// Assume conditions affecting targets only apply to moves with a single target
|
// Assume conditions affecting targets only apply to moves with a single target
|
||||||
let success = this.move.getMove().applyConditions(this.pokemon, targets[0], this.move.getMove());
|
let success = this.move.getMove().applyConditions(this.pokemon, targets[0], this.move.getMove());
|
||||||
let failedText = null;
|
let failedText = null;
|
||||||
|
const isBounced = this.move.getMove().hasFlag(MoveFlags.MAGIC_COAT_MOVE) && targets[0].findTags(t => t instanceof BounceTag).find(t => targets[0].lapseTag(t.tagType));
|
||||||
if (success && this.scene.arena.isMoveWeatherCancelled(this.move.getMove()))
|
if (success && this.scene.arena.isMoveWeatherCancelled(this.move.getMove()))
|
||||||
success = false;
|
success = false;
|
||||||
else if (success && this.scene.arena.isMoveTerrainCancelled(this.pokemon, this.move.getMove())) {
|
else if (success && this.scene.arena.isMoveTerrainCancelled(this.pokemon, this.move.getMove())) {
|
||||||
success = false;
|
success = false;
|
||||||
failedText = getTerrainBlockMessage(targets[0], this.scene.arena.terrain.terrainType);
|
failedText = getTerrainBlockMessage(targets[0], this.scene.arena.terrain.terrainType);
|
||||||
|
} else if (success && isBounced) {
|
||||||
|
this.showFailedText(this.pokemon.getOpponentDescriptor() + "\nbounced the move back!");
|
||||||
|
this.targets = [this.pokemon.getBattlerIndex()];
|
||||||
|
this.pokemon = targets[0];
|
||||||
}
|
}
|
||||||
if (success)
|
if (success)
|
||||||
this.scene.unshiftPhase(this.getEffectPhase());
|
this.scene.unshiftPhase(this.getEffectPhase());
|
||||||
@ -2532,8 +2369,8 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
start() {
|
start() {
|
||||||
super.start();
|
super.start();
|
||||||
|
|
||||||
let user = this.getUserPokemon();
|
const user = this.getUserPokemon();
|
||||||
let targets = this.getTargets();
|
const targets = this.getTargets();
|
||||||
|
|
||||||
if (!user?.isOnField())
|
if (!user?.isOnField())
|
||||||
return super.end();
|
return super.end();
|
||||||
@ -2576,24 +2413,12 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
return this.end();
|
return this.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
let isBounced: BattlerTag | boolean = false;
|
|
||||||
for (let opponent of targets) {
|
|
||||||
isBounced = this.move.getMove().hasFlag(MoveFlags.MAGIC_COAT_MOVE) && (targets[0].findTags(t => t instanceof BounceTag).find(t => targets[0].lapseTag(t.tagType)) || opponent.hasAbilityWithAttr(MagicBounceAbAttr));
|
|
||||||
if (isBounced) {
|
|
||||||
this.scene.queueMessage(getPokemonMessage(targets[0], '\nbounced the move back!'));
|
|
||||||
const tempTargets = targets;
|
|
||||||
targets = [user];
|
|
||||||
user = tempTargets[0];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const applyAttrs: Promise<void>[] = [];
|
const applyAttrs: Promise<void>[] = [];
|
||||||
|
|
||||||
// Move animation only needs one target
|
// Move animation only needs one target
|
||||||
new MoveAnim(this.move.getMove().id as Moves, user, this.getTarget()?.getBattlerIndex()).play(this.scene, () => {
|
new MoveAnim(this.move.getMove().id as Moves, user, this.getTarget()?.getBattlerIndex()).play(this.scene, () => {
|
||||||
for (let target of targets) {
|
for (let target of targets) {
|
||||||
if (!targetHitChecks[target.getBattlerIndex()] && !isBounced) {
|
if (!targetHitChecks[target.getBattlerIndex()]) {
|
||||||
user.turnData.hitCount = 1;
|
user.turnData.hitCount = 1;
|
||||||
user.turnData.hitsLeft = 1;
|
user.turnData.hitsLeft = 1;
|
||||||
this.scene.queueMessage(getPokemonMessage(user, '\'s\nattack missed!'));
|
this.scene.queueMessage(getPokemonMessage(user, '\'s\nattack missed!'));
|
||||||
|
Loading…
Reference in New Issue
Block a user