diff --git a/public/images/items/max_repel.png b/public/images/items/max_repel.png new file mode 100644 index 000000000..d8bef7079 Binary files /dev/null and b/public/images/items/max_repel.png differ diff --git a/public/images/items/repel.png b/public/images/items/repel.png new file mode 100644 index 000000000..3d1359e68 Binary files /dev/null and b/public/images/items/repel.png differ diff --git a/public/images/items/super_repel.png b/public/images/items/super_repel.png new file mode 100644 index 000000000..db09ded8a Binary files /dev/null and b/public/images/items/super_repel.png differ diff --git a/src/battle-scene.ts b/src/battle-scene.ts index f5a38d137..0976c662d 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1,8 +1,8 @@ import Phaser from 'phaser'; import UI, { Mode } from './ui/ui'; -import { EncounterPhase, SummonPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, LevelCapPhase, TestMessagePhase, ShowTrainerPhase, TrainerMessageTestPhase, LoginPhase, ConsolidateDataPhase, SelectGenderPhase, MovePhase } from './phases'; -import Pokemon, { PlayerPokemon, EnemyPokemon } from './pokemon'; -import PokemonSpecies, { PokemonSpeciesFilter, SpeciesFormKey, allSpecies, getPokemonSpecies, initSpecies, speciesStarters } from './data/pokemon-species'; +import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, ConsolidateDataPhase, MovePhase } from './phases'; +import Pokemon, { PlayerPokemon, EnemyPokemon } from './field/pokemon'; +import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species'; import * as Utils from './utils'; import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier } from './modifier/modifier'; import { PokeballType } from './data/pokeball'; @@ -10,7 +10,7 @@ import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets import { Phase } from './phase'; import { initGameSpeed } from './system/game-speed'; import { Biome } from "./data/enums/biome"; -import { Arena, ArenaBase, getBiomeHasProps, getBiomeKey } from './arena'; +import { Arena, ArenaBase, getBiomeHasProps, getBiomeKey } from './field/arena'; import { GameData, PlayerGender } from './system/game-data'; import StarterSelectUiHandler from './ui/starter-select-ui-handler'; import { TextStyle, addTextObject } from './ui/text'; @@ -27,7 +27,7 @@ import SpritePipeline from './pipelines/sprite'; import PartyExpBar from './ui/party-exp-bar'; import { trainerConfigs } from './data/trainer-config'; import { TrainerType } from "./data/enums/trainer-type"; -import Trainer from './trainer'; +import Trainer from './field/trainer'; import TrainerData from './system/trainer-data'; import SoundFade from 'phaser3-rex-plugins/plugins/soundfade'; import { pokemonPrevolutions } from './data/pokemon-evolutions'; @@ -49,7 +49,7 @@ import { SpeciesFormChangeTimeOfDayTrigger, SpeciesFormChangeTrigger, pokemonFor import { FormChangePhase, QuietFormChangePhase } from './form-change-phase'; import { BattleSpec } from './enums/battle-spec'; import { getTypeRgb } from './data/type'; -import PokemonSpriteSparkleHandler from './sprite/pokemon-sprite-sparkle-handler'; +import PokemonSpriteSparkleHandler from './field/pokemon-sprite-sparkle-handler'; import CharSprite from './ui/char-sprite'; export const bypassLogin = false; diff --git a/src/battle.ts b/src/battle.ts index fb54a0d09..e47315039 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -1,8 +1,8 @@ import BattleScene from "./battle-scene"; -import { EnemyPokemon, PlayerPokemon, QueuedMove } from "./pokemon"; +import { EnemyPokemon, PlayerPokemon, QueuedMove } from "./field/pokemon"; import { Command } from "./ui/command-ui-handler"; import * as Utils from "./utils"; -import Trainer from "./trainer"; +import Trainer from "./field/trainer"; import { Species } from "./data/enums/species"; import { Moves } from "./data/enums/moves"; import { TrainerType } from "./data/enums/trainer-type"; diff --git a/src/data/ability.ts b/src/data/ability.ts index 5882a3589..063b8c070 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1,4 +1,4 @@ -import Pokemon, { HitResult, PokemonMove } from "../pokemon"; +import Pokemon, { HitResult, PokemonMove } from "../field/pokemon"; import { Type } from "./type"; import * as Utils from "../utils"; import { BattleStat, getBattleStatName } from "./battle-stat"; diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index bb231e804..bf6c2c4ad 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -1,9 +1,9 @@ -import { Arena } from "../arena"; +import { Arena } from "../field/arena"; import { Type } from "./type"; import * as Utils from "../utils"; import { allMoves } from "./move"; import { getPokemonMessage } from "../messages"; -import Pokemon, { HitResult, PokemonMove } from "../pokemon"; +import Pokemon, { HitResult, PokemonMove } from "../field/pokemon"; import { DamagePhase, MoveEffectPhase, ObtainStatusEffectPhase } from "../phases"; import { StatusEffect } from "./status-effect"; import { BattlerTagType } from "./enums/battler-tag-type"; diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index 9e419c369..9ec14d4c8 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -1,7 +1,7 @@ //import { battleAnimRawData } from "./battle-anim-raw-data"; import BattleScene from "../battle-scene"; import { AttackMove, ChargeAttr, DelayedAttackAttr, MoveFlags, SelfStatusMove, allMoves } from "./move"; -import Pokemon from "../pokemon"; +import Pokemon from "../field/pokemon"; import * as Utils from "../utils"; import { BattlerIndex } from "../battle"; import stringify, { Element } from "json-stable-stringify"; diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 32ce7913e..bb52f234c 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1,7 +1,7 @@ import { CommonAnim, CommonBattleAnim } from "./battle-anims"; import { CommonAnimPhase, DamagePhase, MovePhase, ObtainStatusEffectPhase, PokemonHealPhase, ShowAbilityPhase } from "../phases"; import { getPokemonMessage } from "../messages"; -import Pokemon, { MoveResult, HitResult } from "../pokemon"; +import Pokemon, { MoveResult, HitResult } from "../field/pokemon"; import { Stat } from "./pokemon-stat"; import { StatusEffect } from "./status-effect"; import * as Utils from "../utils"; diff --git a/src/data/berry.ts b/src/data/berry.ts index ab686ad02..d753d2962 100644 --- a/src/data/berry.ts +++ b/src/data/berry.ts @@ -1,6 +1,6 @@ import { PokemonHealPhase, StatChangePhase } from "../phases"; import { getPokemonMessage } from "../messages"; -import Pokemon, { HitResult } from "../pokemon"; +import Pokemon, { HitResult } from "../field/pokemon"; import { getBattleStatName } from "./battle-stat"; import { BattleStat } from "./battle-stat"; import { BattlerTagType } from "./enums/battler-tag-type"; diff --git a/src/data/move.ts b/src/data/move.ts index 0731fadb1..5bc92ce69 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5,7 +5,7 @@ import { BattleStat, getBattleStatName } from "./battle-stat"; import { EncoreTag } from "./battler-tags"; import { BattlerTagType } from "./enums/battler-tag-type"; import { getPokemonMessage } from "../messages"; -import Pokemon, { AttackMoveResult, HitResult, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../pokemon"; +import Pokemon, { AttackMoveResult, HitResult, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../field/pokemon"; import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect"; import { Type } from "./type"; import * as Utils from "../utils"; diff --git a/src/data/pokemon-evolutions.ts b/src/data/pokemon-evolutions.ts index 67ef679e7..a1a9e62ba 100644 --- a/src/data/pokemon-evolutions.ts +++ b/src/data/pokemon-evolutions.ts @@ -3,7 +3,7 @@ import { AttackTypeBoosterModifier, FlinchChanceModifier } from "../modifier/mod import { AttackTypeBoosterModifierType } from "../modifier/modifier-type"; import { Moves } from "./enums/moves"; import { PokeballType } from "./pokeball"; -import Pokemon from "../pokemon"; +import Pokemon from "../field/pokemon"; import { Stat } from "./pokemon-stat"; import { Species } from "./enums/species"; import { Type } from "./type"; diff --git a/src/data/pokemon-forms.ts b/src/data/pokemon-forms.ts index 52d3d3abe..be7bafd46 100644 --- a/src/data/pokemon-forms.ts +++ b/src/data/pokemon-forms.ts @@ -1,6 +1,6 @@ import { TimeOfDay } from "./enums/time-of-day"; import { PokemonFormChangeItemModifier } from "../modifier/modifier"; -import Pokemon from "../pokemon"; +import Pokemon from "../field/pokemon"; import { Moves } from "./enums/moves"; import { SpeciesFormKey } from "./pokemon-species"; import { Species } from "./enums/species"; diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 5ccab7914..04a5fc5a8 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -1,6 +1,6 @@ import BattleScene, { startingWave } from "../battle-scene"; import { ModifierTypeFunc, modifierTypes } from "../modifier/modifier-type"; -import { EnemyPokemon } from "../pokemon"; +import { EnemyPokemon } from "../field/pokemon"; import * as Utils from "../utils"; import { TrainerType } from "./enums/trainer-type"; import { Moves } from "./enums/moves"; diff --git a/src/data/weather.ts b/src/data/weather.ts index 758f18f7c..6d467b360 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -1,6 +1,6 @@ import { Biome } from "./enums/biome"; import { getPokemonMessage } from "../messages"; -import Pokemon from "../pokemon"; +import Pokemon from "../field/pokemon"; import { Type } from "./type"; import Move, { AttackMove } from "./move"; import * as Utils from "../utils"; diff --git a/src/egg-hatch-phase.ts b/src/egg-hatch-phase.ts index c7e692951..b66a510b7 100644 --- a/src/egg-hatch-phase.ts +++ b/src/egg-hatch-phase.ts @@ -6,7 +6,7 @@ import { Mode } from "./ui/ui"; import { EGG_SEED, Egg, GachaType, getLegendaryGachaSpeciesForTimestamp, getTypeGachaTypeForTimestamp } from "./data/egg"; import EggHatchSceneHandler from "./ui/egg-hatch-scene-handler"; import { Species } from "./data/enums/species"; -import { PlayerPokemon } from "./pokemon"; +import { PlayerPokemon } from "./field/pokemon"; import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species"; import { StatsContainer } from "./ui/stats-container"; import { TextStyle, addBBCodeTextObject, addTextObject } from "./ui/text"; diff --git a/src/evolution-phase.ts b/src/evolution-phase.ts index a9b2fe9ba..d1095d270 100644 --- a/src/evolution-phase.ts +++ b/src/evolution-phase.ts @@ -6,8 +6,8 @@ import EvolutionSceneHandler from "./ui/evolution-scene-handler"; import * as Utils from "./utils"; import { Mode } from "./ui/ui"; import { LearnMovePhase } from "./phases"; -import { cos, sin } from "./anims"; -import { PlayerPokemon } from "./pokemon"; +import { cos, sin } from "./field/anims"; +import { PlayerPokemon } from "./field/pokemon"; import { getTypeRgb } from "./data/type"; export class EvolutionPhase extends Phase { diff --git a/src/anims.ts b/src/field/anims.ts similarity index 97% rename from src/anims.ts rename to src/field/anims.ts index 364a3136c..4a6bd2bc6 100644 --- a/src/anims.ts +++ b/src/field/anims.ts @@ -1,6 +1,6 @@ -import BattleScene from "./battle-scene"; -import { PokeballType } from "./data/pokeball"; -import * as Utils from "./utils"; +import BattleScene from "../battle-scene"; +import { PokeballType } from "../data/pokeball"; +import * as Utils from "../utils"; export function addPokeballOpenParticles(scene: BattleScene, x: number, y: number, pokeballType: PokeballType): void { switch (pokeballType) { diff --git a/src/arena.ts b/src/field/arena.ts similarity index 95% rename from src/arena.ts rename to src/field/arena.ts index 0c351470a..c631e94bd 100644 --- a/src/arena.ts +++ b/src/field/arena.ts @@ -1,21 +1,21 @@ -import BattleScene from "./battle-scene"; -import { BiomePoolTier, BiomeTierPokemonPools, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools } from "./data/biomes"; -import { Biome } from "./data/enums/biome"; -import * as Utils from "./utils"; -import PokemonSpecies, { getPokemonSpecies } from "./data/pokemon-species"; -import { Species } from "./data/enums/species"; -import { Weather, WeatherType, getWeatherClearMessage, getWeatherStartMessage } from "./data/weather"; -import { CommonAnimPhase } from "./phases"; -import { CommonAnim } from "./data/battle-anims"; -import { Type } from "./data/type"; -import Move from "./data/move"; -import { ArenaTag, ArenaTagSide, getArenaTag } from "./data/arena-tag"; -import { ArenaTagType } from "./data/enums/arena-tag-type"; -import { GameMode } from "./game-mode"; -import { TrainerType } from "./data/enums/trainer-type"; -import { BattlerIndex } from "./battle"; -import { Moves } from "./data/enums/moves"; -import { TimeOfDay } from "./data/enums/time-of-day"; +import BattleScene from "../battle-scene"; +import { BiomePoolTier, BiomeTierPokemonPools, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools } from "../data/biomes"; +import { Biome } from "../data/enums/biome"; +import * as Utils from "../utils"; +import PokemonSpecies, { getPokemonSpecies } from "../data/pokemon-species"; +import { Species } from "../data/enums/species"; +import { Weather, WeatherType, getWeatherClearMessage, getWeatherStartMessage } from "../data/weather"; +import { CommonAnimPhase } from "../phases"; +import { CommonAnim } from "../data/battle-anims"; +import { Type } from "../data/type"; +import Move from "../data/move"; +import { ArenaTag, ArenaTagSide, getArenaTag } from "../data/arena-tag"; +import { ArenaTagType } from "../data/enums/arena-tag-type"; +import { GameMode } from "../game-mode"; +import { TrainerType } from "../data/enums/trainer-type"; +import { BattlerIndex } from "../battle"; +import { Moves } from "../data/enums/moves"; +import { TimeOfDay } from "../data/enums/time-of-day"; const WEATHER_OVERRIDE = WeatherType.NONE; diff --git a/src/sprite/pokemon-sprite-sparkle-handler.ts b/src/field/pokemon-sprite-sparkle-handler.ts similarity index 98% rename from src/sprite/pokemon-sprite-sparkle-handler.ts rename to src/field/pokemon-sprite-sparkle-handler.ts index 2e6f7b223..c14aff6a2 100644 --- a/src/sprite/pokemon-sprite-sparkle-handler.ts +++ b/src/field/pokemon-sprite-sparkle-handler.ts @@ -1,5 +1,5 @@ import BattleScene from "../battle-scene"; -import Pokemon from "../pokemon"; +import Pokemon from "./pokemon"; import * as Utils from "../utils"; export default class PokemonSpriteSparkleHandler { diff --git a/src/pokemon.ts b/src/field/pokemon.ts similarity index 97% rename from src/pokemon.ts rename to src/field/pokemon.ts index 1a0cc34dc..3b33e8bea 100644 --- a/src/pokemon.ts +++ b/src/field/pokemon.ts @@ -1,44 +1,44 @@ 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 { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies } from './data/pokemon-species'; -import * as Utils from './utils'; -import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from './data/type'; -import { getLevelTotalExp } from './data/exp'; -import { Stat } from './data/pokemon-stat'; -import { AttackTypeBoosterModifier, DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, HiddenAbilityRateBoosterModifier, PokemonBaseStatModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempBattleStatBoosterModifier, TerastallizeModifier } from './modifier/modifier'; -import { PokeballType } from './data/pokeball'; -import { Gender } from './data/gender'; -import { initMoveAnim, loadMoveAnimAssets } from './data/battle-anims'; -import { Status, StatusEffect } from './data/status-effect'; -import { reverseCompatibleTms, tmSpecies } from './data/tms'; -import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition } from './data/pokemon-evolutions'; -import { DamagePhase, FaintPhase, LearnMovePhase, StatChangePhase, SwitchSummonPhase } from './phases'; -import { BattleStat } from './data/battle-stat'; -import { BattlerTag, BattlerTagLapseType, EncoreTag, TypeBoostTag, getBattlerTag } from './data/battler-tags'; -import { BattlerTagType } from "./data/enums/battler-tag-type"; -import { Species } from './data/enums/species'; -import { WeatherType } from './data/weather'; -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, 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"; -import { Mode } from './ui/ui'; -import PartyUiHandler, { PartyOption, PartyUiMode } from './ui/party-ui-handler'; +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 { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies } from '../data/pokemon-species'; +import * as Utils from '../utils'; +import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type'; +import { getLevelTotalExp } from '../data/exp'; +import { Stat } from '../data/pokemon-stat'; +import { AttackTypeBoosterModifier, DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, HiddenAbilityRateBoosterModifier, PokemonBaseStatModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempBattleStatBoosterModifier, TerastallizeModifier } from '../modifier/modifier'; +import { PokeballType } from '../data/pokeball'; +import { Gender } from '../data/gender'; +import { initMoveAnim, loadMoveAnimAssets } from '../data/battle-anims'; +import { Status, StatusEffect } from '../data/status-effect'; +import { reverseCompatibleTms, tmSpecies } from '../data/tms'; +import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition } from '../data/pokemon-evolutions'; +import { DamagePhase, FaintPhase, LearnMovePhase, StatChangePhase, SwitchSummonPhase } from '../phases'; +import { BattleStat } from '../data/battle-stat'; +import { BattlerTag, BattlerTagLapseType, EncoreTag, TypeBoostTag, getBattlerTag } from '../data/battler-tags'; +import { BattlerTagType } from "../data/enums/battler-tag-type"; +import { Species } from '../data/enums/species'; +import { WeatherType } from '../data/weather'; +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, 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"; +import { Mode } from '../ui/ui'; +import PartyUiHandler, { PartyOption, PartyUiMode } from '../ui/party-ui-handler'; import SoundFade from 'phaser3-rex-plugins/plugins/soundfade'; -import { GameMode } from './game-mode'; -import { LevelMoves } from './data/pokemon-level-moves'; -import { DamageAchv, achvs } from './system/achv'; -import { DexAttr, StarterMoveset } from './system/game-data'; +import { GameMode } from '../game-mode'; +import { LevelMoves } from '../data/pokemon-level-moves'; +import { DamageAchv, achvs } from '../system/achv'; +import { DexAttr, StarterMoveset } from '../system/game-data'; import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from '@material/material-color-utilities'; -import { Nature, getNatureStatMultiplier } from './data/nature'; -import { SpeciesFormChange, SpeciesFormChangeActiveTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangeMoveUsedTrigger, SpeciesFormChangeStatusEffectTrigger } from './data/pokemon-forms'; +import { Nature, getNatureStatMultiplier } from '../data/nature'; +import { SpeciesFormChange, SpeciesFormChangeActiveTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangeMoveUsedTrigger, SpeciesFormChangeStatusEffectTrigger } from '../data/pokemon-forms'; export enum FieldPosition { CENTER, diff --git a/src/trainer.ts b/src/field/trainer.ts similarity index 96% rename from src/trainer.ts rename to src/field/trainer.ts index a47c22225..8cf73530b 100644 --- a/src/trainer.ts +++ b/src/field/trainer.ts @@ -1,11 +1,11 @@ -import BattleScene from "./battle-scene"; -import { pokemonPrevolutions } from "./data/pokemon-evolutions"; -import PokemonSpecies, { getPokemonSpecies } from "./data/pokemon-species"; -import { TrainerConfig, TrainerPartyCompoundTemplate, TrainerPartyMemberStrength, TrainerPartyTemplate, TrainerPoolTier, trainerConfigs, trainerPartyTemplates } from "./data/trainer-config"; -import { TrainerType } from "./data/enums/trainer-type"; +import BattleScene from "../battle-scene"; +import { pokemonPrevolutions } from "../data/pokemon-evolutions"; +import PokemonSpecies, { getPokemonSpecies } from "../data/pokemon-species"; +import { TrainerConfig, TrainerPartyCompoundTemplate, TrainerPartyMemberStrength, TrainerPartyTemplate, TrainerPoolTier, trainerConfigs, trainerPartyTemplates } from "../data/trainer-config"; +import { TrainerType } from "../data/enums/trainer-type"; import { EnemyPokemon } from "./pokemon"; -import * as Utils from "./utils"; -import { PersistentModifier } from "./modifier/modifier"; +import * as Utils from "../utils"; +import { PersistentModifier } from "../modifier/modifier"; export default class Trainer extends Phaser.GameObjects.Container { public config: TrainerConfig; diff --git a/src/form-change-phase.ts b/src/form-change-phase.ts index 4ed592a9d..ea0f51c50 100644 --- a/src/form-change-phase.ts +++ b/src/form-change-phase.ts @@ -4,7 +4,7 @@ import { SpeciesFormKey } from "./data/pokemon-species"; import { achvs } from "./system/achv"; import { SpeciesFormChange, getSpeciesFormChangeMessage } from "./data/pokemon-forms"; import { EndEvolutionPhase, EvolutionPhase } from "./evolution-phase"; -import Pokemon, { EnemyPokemon, PlayerPokemon } from "./pokemon"; +import Pokemon, { EnemyPokemon, PlayerPokemon } from "./field/pokemon"; import { Mode } from "./ui/ui"; import PartyUiHandler from "./ui/party-ui-handler"; import { BattleSpec } from "./enums/battle-spec"; diff --git a/src/messages.ts b/src/messages.ts index bf0513ca3..e5696c324 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -1,5 +1,5 @@ import { BattleSpec } from "./enums/battle-spec"; -import Pokemon from "./pokemon"; +import Pokemon from "./field/pokemon"; export function getPokemonMessage(pokemon: Pokemon, content: string): string { let prefix: string; diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index e3a765f7b..95e4c8f35 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -2,7 +2,7 @@ import * as Modifiers from './modifier'; import { AttackMove, allMoves } from '../data/move'; import { Moves } from "../data/enums/moves"; import { PokeballType, getPokeballName } from '../data/pokeball'; -import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from '../pokemon'; +import Pokemon, { EnemyPokemon, PlayerPokemon, PokemonMove } from '../field/pokemon'; import { EvolutionItem, SpeciesFriendshipEvolutionCondition, pokemonEvolutions } from '../data/pokemon-evolutions'; import { Stat, getStatName } from '../data/pokemon-stat'; import { tmPoolTiers, tmSpecies } from '../data/tms'; @@ -740,6 +740,10 @@ export const modifierTypes = { PP_UP: () => new PokemonPpUpModifierType('PP Up', 1), PP_MAX: () => new PokemonPpUpModifierType('PP Max', 3), + /*REPEL: () => new DoubleBattleChanceBoosterModifierType('Repel', 5), + SUPER_REPEL: () => new DoubleBattleChanceBoosterModifierType('Super Repel', 10), + MAX_REPEL: () => new DoubleBattleChanceBoosterModifierType('Max Repel', 25),*/ + LURE: () => new DoubleBattleChanceBoosterModifierType('Lure', 5), SUPER_LURE: () => new DoubleBattleChanceBoosterModifierType('Super Lure', 10), MAX_LURE: () => new DoubleBattleChanceBoosterModifierType('Max Lure', 25), diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index ae62e989a..a14df4879 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -3,7 +3,7 @@ import { LearnMovePhase, LevelUpPhase, ObtainStatusEffectPhase, PokemonHealPhase import BattleScene from "../battle-scene"; import { getLevelTotalExp } from "../data/exp"; import { PokeballType } from "../data/pokeball"; -import Pokemon, { PlayerPokemon } from "../pokemon"; +import Pokemon, { PlayerPokemon } from "../field/pokemon"; import { Stat } from "../data/pokemon-stat"; import { addTextObject, TextStyle } from "../ui/text"; import { Type } from '../data/type'; diff --git a/src/phases.ts b/src/phases.ts index 91a548b0a..36a8345e1 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -1,5 +1,5 @@ import BattleScene, { bypassLogin, startingLevel, startingWave } from "./battle-scene"; -import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./pokemon"; +import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon"; import * as Utils from './utils'; import { Moves } from "./data/enums/moves"; import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveCategory, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr } from "./data/move"; @@ -32,7 +32,7 @@ import { ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag } from "./data/arena- import { ArenaTagType } from "./data/enums/arena-tag-type"; import { Abilities, CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs } from "./data/ability"; import { Unlockables, getUnlockableName } from "./system/unlockables"; -import { getBiomeKey } from "./arena"; +import { getBiomeKey } from "./field/arena"; import { BattleType, BattlerIndex, TurnCommand } from "./battle"; import { BattleSpec } from "./enums/battle-spec"; import { GameMode } from "./game-mode"; @@ -45,7 +45,7 @@ import { Egg } from "./data/egg"; import { vouchers } from "./system/voucher"; import { loggedInUser, updateUserInfo } from "./account"; import { GameDataType, PlayerGender } from "./system/game-data"; -import { addPokeballCaptureStars, addPokeballOpenParticles } from "./anims"; +import { addPokeballCaptureStars, addPokeballOpenParticles } from "./field/anims"; import { SpeciesFormChangeActiveTrigger, SpeciesFormChangeManualTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangeMoveUsedTrigger } from "./data/pokemon-forms"; import { battleSpecDialogue, getCharVariantFromDialogue } from "./data/dialogue"; import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "./ui/modifier-select-ui-handler"; diff --git a/src/pipelines/sprite.ts b/src/pipelines/sprite.ts index 4cba0bcb9..434672156 100644 --- a/src/pipelines/sprite.ts +++ b/src/pipelines/sprite.ts @@ -1,5 +1,5 @@ -import Pokemon from "../pokemon"; -import Trainer from "../trainer"; +import Pokemon from "../field/pokemon"; +import Trainer from "../field/trainer"; import FieldSpritePipeline from "./field-sprite"; const spriteFragShader = ` diff --git a/src/system/arena-data.ts b/src/system/arena-data.ts index e7f859688..4d5fb10e8 100644 --- a/src/system/arena-data.ts +++ b/src/system/arena-data.ts @@ -1,4 +1,4 @@ -import { Arena } from "../arena"; +import { Arena } from "../field/arena"; import { ArenaTag } from "../data/arena-tag"; import { Biome } from "../data/enums/biome"; import { Weather } from "../data/weather"; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index a06ebe127..3a571ef0c 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1,5 +1,5 @@ import BattleScene, { PokeballCounts, bypassLogin } from "../battle-scene"; -import Pokemon, { EnemyPokemon, PlayerPokemon } from "../pokemon"; +import Pokemon, { EnemyPokemon, PlayerPokemon } from "../field/pokemon"; import { pokemonPrevolutions } from "../data/pokemon-evolutions"; import PokemonSpecies, { allSpecies, getPokemonSpecies, speciesStarters } from "../data/pokemon-species"; import { Species } from "../data/enums/species"; diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 46cd439b0..ff63237e8 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -7,7 +7,7 @@ import { PokeballType } from "../data/pokeball"; import { getPokemonSpecies } from "../data/pokemon-species"; import { Species } from "../data/enums/species"; import { Status } from "../data/status-effect"; -import Pokemon, { EnemyPokemon, PokemonMove, PokemonSummonData } from "../pokemon"; +import Pokemon, { EnemyPokemon, PokemonMove, PokemonSummonData } from "../field/pokemon"; export default class PokemonData { public id: integer; diff --git a/src/system/trainer-data.ts b/src/system/trainer-data.ts index c4b4b8d0c..07e9c846a 100644 --- a/src/system/trainer-data.ts +++ b/src/system/trainer-data.ts @@ -1,6 +1,6 @@ import BattleScene from "../battle-scene"; import { TrainerType } from "../data/enums/trainer-type"; -import Trainer from "../trainer"; +import Trainer from "../field/trainer"; export default class TrainerData { public trainerType: TrainerType; diff --git a/src/ui/ability-bar.ts b/src/ui/ability-bar.ts index 85f1a1f19..c7e771af9 100644 --- a/src/ui/ability-bar.ts +++ b/src/ui/ability-bar.ts @@ -1,5 +1,5 @@ import BattleScene from "../battle-scene"; -import Pokemon from "../pokemon"; +import Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; const hiddenX = -91; diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 2d46edad6..62bee2e5b 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -1,4 +1,4 @@ -import { EnemyPokemon, default as Pokemon } from '../pokemon'; +import { EnemyPokemon, default as Pokemon } from '../field/pokemon'; import { getLevelTotalExp, getLevelRelExp } from '../data/exp'; import * as Utils from '../utils'; import { addTextObject, TextStyle } from './text'; diff --git a/src/ui/egg-list-ui-handler.ts b/src/ui/egg-list-ui-handler.ts index eebabf2f0..489566651 100644 --- a/src/ui/egg-list-ui-handler.ts +++ b/src/ui/egg-list-ui-handler.ts @@ -1,6 +1,6 @@ import BattleScene, { Button } from "../battle-scene"; import { Mode } from "./ui"; -import PokemonIconAnimHandler, { PokemonIconAnimMode } from "../sprite/pokemon-icon-anim-handler"; +import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler"; import { TextStyle, addTextObject } from "./text"; import MessageUiHandler from "./message-ui-handler"; import { EGG_SEED, Egg, GachaType, getEggGachaTypeDescriptor, getEggHatchWavesMessage, getEggDescriptor } from "../data/egg"; diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index ad5663e27..1d4734c3b 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -1,5 +1,5 @@ import BattleScene from "../battle-scene"; -import Pokemon from "../pokemon"; +import Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; export default class PartyExpBar extends Phaser.GameObjects.Container { diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 8598d1dd7..a8be33b87 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -1,6 +1,6 @@ import { CommandPhase } from "../phases"; import BattleScene, { Button } from "../battle-scene"; -import { PlayerPokemon, PokemonMove } from "../pokemon"; +import { PlayerPokemon, PokemonMove } from "../field/pokemon"; import { addTextObject, TextStyle } from "./text"; import { Command } from "./command-ui-handler"; import MessageUiHandler from "./message-ui-handler"; @@ -11,7 +11,7 @@ import { allMoves } from "../data/move"; import { Moves } from "../data/enums/moves"; import { getGenderColor, getGenderSymbol } from "../data/gender"; import { StatusEffect } from "../data/status-effect"; -import PokemonIconAnimHandler, { PokemonIconAnimMode } from "../sprite/pokemon-icon-anim-handler"; +import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler"; import { pokemonEvolutions } from "../data/pokemon-evolutions"; import { addWindow } from "./window"; import { SpeciesFormChangeItemTrigger } from "../data/pokemon-forms"; diff --git a/src/ui/pokeball-tray.ts b/src/ui/pokeball-tray.ts index 0acfcff6a..cc2bd21cb 100644 --- a/src/ui/pokeball-tray.ts +++ b/src/ui/pokeball-tray.ts @@ -1,5 +1,5 @@ import BattleScene from "../battle-scene"; -import Pokemon from "../pokemon"; +import Pokemon from "../field/pokemon"; export default class PokeballTray extends Phaser.GameObjects.Container { private player: boolean; diff --git a/src/sprite/pokemon-icon-anim-handler.ts b/src/ui/pokemon-icon-anim-handler.ts similarity index 100% rename from src/sprite/pokemon-icon-anim-handler.ts rename to src/ui/pokemon-icon-anim-handler.ts diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index aace255ee..5f4d5fde1 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -11,7 +11,7 @@ import { Unlockables } from "../system/unlockables"; import { GrowthRate, getGrowthRateColor } from "../data/exp"; import { DexAttr, DexEntry, StarterFormMoveData, StarterMoveset } from "../system/game-data"; import * as Utils from "../utils"; -import PokemonIconAnimHandler, { PokemonIconAnimMode } from "../sprite/pokemon-icon-anim-handler"; +import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler"; import { StatsContainer } from "./stats-container"; import { addWindow } from "./window"; import { Nature, getNatureName } from "../data/nature"; diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index e8923d93c..8cdbdc3d6 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -2,7 +2,7 @@ import BattleScene, { Button } from "../battle-scene"; import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import * as Utils from "../utils"; -import { PlayerPokemon } from "../pokemon"; +import { PlayerPokemon } from "../field/pokemon"; import { Type, getTypeRgb } from "../data/type"; import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag, getTextColor } from "./text"; import Move, { MoveCategory } from "../data/move";