eslint cleanup

This commit is contained in:
frutescens 2024-11-01 12:26:41 -07:00
parent 154347a61a
commit ce58f2524d
2 changed files with 143 additions and 143 deletions

View File

@ -13,6 +13,7 @@ import { Arena, ArenaBase } from "#app/field/arena";
import { GameData } from "#app/system/game-data"; import { GameData } from "#app/system/game-data";
import { addTextObject, getTextColor, TextStyle } from "#app/ui/text"; import { addTextObject, getTextColor, TextStyle } from "#app/ui/text";
import { allMoves } from "#app/data/move"; import { allMoves } from "#app/data/move";
import { MusicPreference } from "./system/settings/settings";
import { getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getModifierType, getPartyLuckValue, ModifierPoolType, modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; import { getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getModifierType, getPartyLuckValue, ModifierPoolType, modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type";
import AbilityBar from "#app/ui/ability-bar"; import AbilityBar from "#app/ui/ability-bar";
import { allAbilities, applyAbAttrs, applyPostBattleInitAbAttrs, BlockItemTheftAbAttr, DoubleBattleChanceAbAttr, PostBattleInitAbAttr } from "#app/data/ability"; import { allAbilities, applyAbAttrs, applyPostBattleInitAbAttrs, BlockItemTheftAbAttr, DoubleBattleChanceAbAttr, PostBattleInitAbAttr } from "#app/data/ability";

View File

@ -6,7 +6,7 @@ import { GameMode } from "./game-mode";
import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/modifier"; import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/modifier";
import { PokeballType } from "./data/pokeball"; import { PokeballType } from "./data/pokeball";
import { trainerConfigs } from "#app/data/trainer-config"; import { trainerConfigs } from "#app/data/trainer-config";
import { SpeciesFormKey } from "#app/data/pokemon-species"; import { SpeciesFormKey } from "#enums/species-form-key";
import Pokemon, { EnemyPokemon, PlayerPokemon, QueuedMove } from "#app/field/pokemon"; import Pokemon, { EnemyPokemon, PlayerPokemon, QueuedMove } from "#app/field/pokemon";
import { ArenaTagType } from "#enums/arena-tag-type"; import { ArenaTagType } from "#enums/arena-tag-type";
import { BattleSpec } from "#enums/battle-spec"; import { BattleSpec } from "#enums/battle-spec";
@ -214,7 +214,6 @@ export default class Battle {
} }
getBgmOverride(scene: BattleScene): string | null { getBgmOverride(scene: BattleScene): string | null {
const battlers = this.enemyParty.slice(0, this.getBattlerCount());
if (this.isBattleMysteryEncounter() && this.mysteryEncounter?.encounterMode === MysteryEncounterMode.DEFAULT) { if (this.isBattleMysteryEncounter() && this.mysteryEncounter?.encounterMode === MysteryEncounterMode.DEFAULT) {
// Music is overridden for MEs during ME onInit() // Music is overridden for MEs during ME onInit()
// Should not use any BGM overrides before swapping from DEFAULT mode // Should not use any BGM overrides before swapping from DEFAULT mode
@ -242,151 +241,151 @@ export default class Battle {
if (pokemon.species.legendary || pokemon.species.subLegendary || pokemon.species.mythical) { if (pokemon.species.legendary || pokemon.species.subLegendary || pokemon.species.mythical) {
if (scene.musicPreference === MusicPreference.CONSISTENT) { if (scene.musicPreference === MusicPreference.CONSISTENT) {
switch (pokemon.species.speciesId) { switch (pokemon.species.speciesId) {
case Species.REGIROCK: case Species.REGIROCK:
case Species.REGICE: case Species.REGICE:
case Species.REGISTEEL: case Species.REGISTEEL:
case Species.REGIGIGAS: case Species.REGIGIGAS:
case Species.REGIDRAGO: case Species.REGIDRAGO:
case Species.REGIELEKI: case Species.REGIELEKI:
return "battle_legendary_regis_g5"; return "battle_legendary_regis_g5";
case Species.KYUREM: case Species.KYUREM:
return "battle_legendary_kyurem"; return "battle_legendary_kyurem";
default: default:
if (pokemon.species.legendary) { if (pokemon.species.legendary) {
return "battle_legendary_res_zek"; return "battle_legendary_res_zek";
} }
return "battle_legendary_unova"; return "battle_legendary_unova";
} }
} else if (scene.musicPreference === MusicPreference.MIXED) { } else if (scene.musicPreference === MusicPreference.MIXED) {
switch (pokemon.species.speciesId) { switch (pokemon.species.speciesId) {
case Species.ARTICUNO: case Species.ARTICUNO:
case Species.ZAPDOS: case Species.ZAPDOS:
case Species.MOLTRES: case Species.MOLTRES:
case Species.MEWTWO: case Species.MEWTWO:
case Species.MEW: case Species.MEW:
return "battle_legendary_kanto"; return "battle_legendary_kanto";
case Species.RAIKOU: case Species.RAIKOU:
return "battle_legendary_raikou"; return "battle_legendary_raikou";
case Species.ENTEI: case Species.ENTEI:
return "battle_legendary_entei"; return "battle_legendary_entei";
case Species.SUICUNE: case Species.SUICUNE:
return "battle_legendary_suicune"; return "battle_legendary_suicune";
case Species.LUGIA: case Species.LUGIA:
return "battle_legendary_lugia"; return "battle_legendary_lugia";
case Species.HO_OH: case Species.HO_OH:
return "battle_legendary_ho_oh"; return "battle_legendary_ho_oh";
case Species.REGIROCK: case Species.REGIROCK:
case Species.REGICE: case Species.REGICE:
case Species.REGISTEEL: case Species.REGISTEEL:
case Species.REGIGIGAS: case Species.REGIGIGAS:
case Species.REGIDRAGO: case Species.REGIDRAGO:
case Species.REGIELEKI: case Species.REGIELEKI:
return "battle_legendary_regis_g6"; return "battle_legendary_regis_g6";
case Species.GROUDON: case Species.GROUDON:
case Species.KYOGRE: case Species.KYOGRE:
return "battle_legendary_gro_kyo"; return "battle_legendary_gro_kyo";
case Species.RAYQUAZA: case Species.RAYQUAZA:
return "battle_legendary_rayquaza"; return "battle_legendary_rayquaza";
case Species.DEOXYS: case Species.DEOXYS:
return "battle_legendary_deoxys"; return "battle_legendary_deoxys";
case Species.HEATRAN: case Species.HEATRAN:
case Species.CRESSELIA: case Species.CRESSELIA:
case Species.DARKRAI: case Species.DARKRAI:
case Species.SHAYMIN: case Species.SHAYMIN:
return "battle_legendary_sinnoh"; return "battle_legendary_sinnoh";
case Species.DIALGA: case Species.DIALGA:
case Species.PALKIA: case Species.PALKIA:
if (pokemon.species.getFormSpriteKey() === SpeciesFormKey.ORIGIN) { if (pokemon.species.getFormSpriteKey() === SpeciesFormKey.ORIGIN) {
return "battle_legendary_origin_forme"; return "battle_legendary_origin_forme";
} }
return "battle_legendary_dia_pal"; return "battle_legendary_dia_pal";
case Species.GIRATINA: case Species.GIRATINA:
return "battle_legendary_giratina"; return "battle_legendary_giratina";
case Species.ARCEUS: case Species.ARCEUS:
return "battle_legendary_arceus"; return "battle_legendary_arceus";
case Species.COBALION: case Species.COBALION:
case Species.TERRAKION: case Species.TERRAKION:
case Species.VIRIZION: case Species.VIRIZION:
case Species.KELDEO: case Species.KELDEO:
case Species.TORNADUS: case Species.TORNADUS:
case Species.LANDORUS: case Species.LANDORUS:
case Species.THUNDURUS: case Species.THUNDURUS:
case Species.MELOETTA: case Species.MELOETTA:
case Species.GENESECT: case Species.GENESECT:
return "battle_legendary_unova"; return "battle_legendary_unova";
case Species.KYUREM: case Species.KYUREM:
return "battle_legendary_kyurem"; return "battle_legendary_kyurem";
case Species.XERNEAS: case Species.XERNEAS:
case Species.YVELTAL: case Species.YVELTAL:
case Species.ZYGARDE: case Species.ZYGARDE:
return "battle_legendary_xern_yvel"; return "battle_legendary_xern_yvel";
case Species.TAPU_KOKO: case Species.TAPU_KOKO:
case Species.TAPU_LELE: case Species.TAPU_LELE:
case Species.TAPU_BULU: case Species.TAPU_BULU:
case Species.TAPU_FINI: case Species.TAPU_FINI:
return "battle_legendary_tapu"; return "battle_legendary_tapu";
case Species.SOLGALEO: case Species.SOLGALEO:
case Species.LUNALA: case Species.LUNALA:
return "battle_legendary_sol_lun";
case Species.NECROZMA:
switch (pokemon.getFormKey()) {
case "dusk-mane":
case "dawn-wings":
return "battle_legendary_dusk_dawn";
case "ultra":
return "battle_legendary_ultra_nec";
default:
return "battle_legendary_sol_lun"; return "battle_legendary_sol_lun";
} case Species.NECROZMA:
case Species.NIHILEGO: switch (pokemon.getFormKey()) {
case Species.PHEROMOSA: case "dusk-mane":
case Species.BUZZWOLE: case "dawn-wings":
case Species.XURKITREE: return "battle_legendary_dusk_dawn";
case Species.CELESTEELA: case "ultra":
case Species.GUZZLORD: return "battle_legendary_ultra_nec";
case Species.POIPOLE: default:
case Species.NAGANADEL: return "battle_legendary_sol_lun";
case Species.STAKATAKA: }
case Species.BLACEPHALON: case Species.NIHILEGO:
return "battle_legendary_ub"; case Species.PHEROMOSA:
case Species.ZACIAN: case Species.BUZZWOLE:
case Species.ZAMAZENTA: case Species.XURKITREE:
return "battle_legendary_zac_zam"; case Species.CELESTEELA:
case Species.GLASTRIER: case Species.GUZZLORD:
case Species.SPECTRIER: case Species.POIPOLE:
return "battle_legendary_glas_spec"; case Species.NAGANADEL:
case Species.CALYREX: case Species.STAKATAKA:
if (pokemon.getFormKey() === "ice" || pokemon.getFormKey() === "shadow") { case Species.BLACEPHALON:
return "battle_legendary_riders"; return "battle_legendary_ub";
} case Species.ZACIAN:
return "battle_legendary_calyrex"; case Species.ZAMAZENTA:
case Species.GALAR_ARTICUNO: return "battle_legendary_zac_zam";
case Species.GALAR_ZAPDOS: case Species.GLASTRIER:
case Species.GALAR_MOLTRES: case Species.SPECTRIER:
return "battle_legendary_birds_galar"; return "battle_legendary_glas_spec";
case Species.WO_CHIEN: case Species.CALYREX:
case Species.CHIEN_PAO: if (pokemon.getFormKey() === "ice" || pokemon.getFormKey() === "shadow") {
case Species.TING_LU: return "battle_legendary_riders";
case Species.CHI_YU: }
return "battle_legendary_ruinous"; return "battle_legendary_calyrex";
case Species.KORAIDON: case Species.GALAR_ARTICUNO:
case Species.MIRAIDON: case Species.GALAR_ZAPDOS:
return "battle_legendary_kor_mir"; case Species.GALAR_MOLTRES:
case Species.OKIDOGI: return "battle_legendary_birds_galar";
case Species.MUNKIDORI: case Species.WO_CHIEN:
case Species.FEZANDIPITI: case Species.CHIEN_PAO:
return "battle_legendary_loyal_three"; case Species.TING_LU:
case Species.OGERPON: case Species.CHI_YU:
return "battle_legendary_ogerpon"; return "battle_legendary_ruinous";
case Species.TERAPAGOS: case Species.KORAIDON:
return "battle_legendary_terapagos"; case Species.MIRAIDON:
case Species.PECHARUNT: return "battle_legendary_kor_mir";
return "battle_legendary_pecharunt"; case Species.OKIDOGI:
default: case Species.MUNKIDORI:
if (pokemon.species.legendary) { case Species.FEZANDIPITI:
return "battle_legendary_res_zek"; return "battle_legendary_loyal_three";
} case Species.OGERPON:
return "battle_legendary_unova"; return "battle_legendary_ogerpon";
case Species.TERAPAGOS:
return "battle_legendary_terapagos";
case Species.PECHARUNT:
return "battle_legendary_pecharunt";
default:
if (pokemon.species.legendary) {
return "battle_legendary_res_zek";
}
return "battle_legendary_unova";
} }
} }
} }