mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 23:32:19 +02:00
halfway to manual eslint fix
This commit is contained in:
parent
28ada389e3
commit
8e2506045d
@ -13,7 +13,7 @@ import { LoadingScene } from './loading-scene';
|
|||||||
// Catch global errors and display them in an alert so users can report the issue.
|
// Catch global errors and display them in an alert so users can report the issue.
|
||||||
window.onerror = function (message, source, lineno, colno, error) {
|
window.onerror = function (message, source, lineno, colno, error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
const errorString = `Received unhandled error. Open browser console and click OK to see details.\nError: ${message}\nSource: ${source}\nLine: ${lineno}\nColumn: ${colno}\nStack: ${error.stack}`;
|
// const errorString = `Received unhandled error. Open browser console and click OK to see details.\nError: ${message}\nSource: ${source}\nLine: ${lineno}\nColumn: ${colno}\nStack: ${error.stack}`;
|
||||||
//alert(errorString);
|
//alert(errorString);
|
||||||
// Avoids logging the error a second time.
|
// Avoids logging the error a second time.
|
||||||
return true;
|
return true;
|
||||||
@ -21,7 +21,7 @@ window.onerror = function (message, source, lineno, colno, error) {
|
|||||||
|
|
||||||
// Catch global promise rejections and display them in an alert so users can report the issue.
|
// Catch global promise rejections and display them in an alert so users can report the issue.
|
||||||
window.addEventListener('unhandledrejection', (event) => {
|
window.addEventListener('unhandledrejection', (event) => {
|
||||||
const errorString = `Received unhandled promise rejection. Open browser console and click OK to see details.\nReason: ${event.reason}`;
|
// const errorString = `Received unhandled promise rejection. Open browser console and click OK to see details.\nReason: ${event.reason}`;
|
||||||
console.error(event.reason);
|
console.error(event.reason);
|
||||||
//alert(errorString);
|
//alert(errorString);
|
||||||
});
|
});
|
||||||
|
@ -1431,13 +1431,13 @@ let modifierPoolThresholds = {};
|
|||||||
let ignoredPoolIndexes = {};
|
let ignoredPoolIndexes = {};
|
||||||
|
|
||||||
let dailyStarterModifierPoolThresholds = {};
|
let dailyStarterModifierPoolThresholds = {};
|
||||||
let ignoredDailyStarterPoolIndexes = {};
|
let ignoredDailyStarterPoolIndexes = {}; // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||||
|
|
||||||
let enemyModifierPoolThresholds = {};
|
let enemyModifierPoolThresholds = {};
|
||||||
let enemyIgnoredPoolIndexes = {};
|
let enemyIgnoredPoolIndexes = {}; // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||||
|
|
||||||
let enemyBuffModifierPoolThresholds = {};
|
let enemyBuffModifierPoolThresholds = {};
|
||||||
let enemyBuffIgnoredPoolIndexes = {};
|
let enemyBuffIgnoredPoolIndexes = {}; // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||||
|
|
||||||
export function getModifierPoolForType(poolType: ModifierPoolType): ModifierPool {
|
export function getModifierPoolForType(poolType: ModifierPoolType): ModifierPool {
|
||||||
let pool: ModifierPool;
|
let pool: ModifierPool;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import BattleScene, { AnySound, bypassLogin, startingWave } from './battle-scene';
|
import BattleScene, { bypassLogin } from './battle-scene';
|
||||||
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from './field/pokemon';
|
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, 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 { 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, BypassRedirectAttr, FixedDamageAttr, PostVictoryStatChangeAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr, SacrificialAttr, IncrementMovePriorityAttr } from './data/move';
|
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, BypassRedirectAttr, FixedDamageAttr, PostVictoryStatChangeAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr, IncrementMovePriorityAttr } from './data/move';
|
||||||
import { Mode } from './ui/ui';
|
import { Mode } from './ui/ui';
|
||||||
import { Command } from './ui/command-ui-handler';
|
import { Command } from './ui/command-ui-handler';
|
||||||
import { Stat } from './data/pokemon-stat';
|
import { Stat } from './data/pokemon-stat';
|
||||||
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, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems, BypassSpeedChanceModifier } from './modifier/modifier';
|
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems, BypassSpeedChanceModifier } from './modifier/modifier';
|
||||||
import PartyUiHandler, { PartyOption, PartyUiMode } from './ui/party-ui-handler';
|
import PartyUiHandler, { PartyOption, PartyUiMode } from './ui/party-ui-handler';
|
||||||
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from './data/pokeball';
|
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from './data/pokeball';
|
||||||
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from './data/battle-anims';
|
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from './data/battle-anims';
|
||||||
@ -37,7 +37,7 @@ import { BattleType, BattlerIndex, TurnCommand } from './battle';
|
|||||||
import { BattleSpec } from './enums/battle-spec';
|
import { BattleSpec } from './enums/battle-spec';
|
||||||
import { Species } from './data/enums/species';
|
import { Species } from './data/enums/species';
|
||||||
import { HealAchv, LevelAchv, achvs } from './system/achv';
|
import { HealAchv, LevelAchv, achvs } from './system/achv';
|
||||||
import { TrainerConfig, TrainerSlot, trainerConfigs } from './data/trainer-config';
|
import { TrainerSlot, trainerConfigs } from './data/trainer-config';
|
||||||
import { TrainerType } from './data/enums/trainer-type';
|
import { TrainerType } from './data/enums/trainer-type';
|
||||||
import { EggHatchPhase } from './egg-hatch-phase';
|
import { EggHatchPhase } from './egg-hatch-phase';
|
||||||
import { Egg } from './data/egg';
|
import { Egg } from './data/egg';
|
||||||
@ -55,7 +55,7 @@ import { OptionSelectConfig, OptionSelectItem } from './ui/abstact-option-select
|
|||||||
import { SaveSlotUiMode } from './ui/save-slot-select-ui-handler';
|
import { SaveSlotUiMode } from './ui/save-slot-select-ui-handler';
|
||||||
import { fetchDailyRunSeed, getDailyRunStarters } from './data/daily-run';
|
import { fetchDailyRunSeed, getDailyRunStarters } from './data/daily-run';
|
||||||
import { GameModes, gameModes } from './game-mode';
|
import { GameModes, gameModes } from './game-mode';
|
||||||
import PokemonSpecies, { getPokemonSpecies, getPokemonSpeciesForm, speciesStarters } from './data/pokemon-species';
|
import PokemonSpecies, { getPokemonSpecies, speciesStarters } from './data/pokemon-species';
|
||||||
import i18next from './plugins/i18n';
|
import i18next from './plugins/i18n';
|
||||||
import { Abilities } from './data/enums/abilities';
|
import { Abilities } from './data/enums/abilities';
|
||||||
import * as Overrides from './overrides';
|
import * as Overrides from './overrides';
|
||||||
@ -2274,7 +2274,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
//Check if this move is immune to being redirected, and restore its target to the intended target if it is.
|
//Check if this move is immune to being redirected, and restore its target to the intended target if it is.
|
||||||
if ((this.pokemon.hasAbilityWithAttr(BlockRedirectAbAttr) || this.move.getMove().getAttrs(BypassRedirectAttr).length)) {
|
if ((this.pokemon.hasAbilityWithAttr(BlockRedirectAbAttr) || this.move.getMove().getAttrs(BypassRedirectAttr).length)) {
|
||||||
//If an ability prevented this move from being redirected, display its ability pop up.
|
//If an ability prevented this move from being redirected, display its ability pop up.
|
||||||
if ((this.pokemon.hasAbilityWithAttr(BlockRedirectAbAttr) && !this.move.getMove().getAttrs(BypassRedirectAttr).length) && oldTarget != moveTarget.value) {
|
if ((this.pokemon.hasAbilityWithAttr(BlockRedirectAbAttr) && !this.move.getMove().getAttrs(BypassRedirectAttr).length) && oldTarget !== moveTarget.value) {
|
||||||
this.scene.unshiftPhase(new ShowAbilityPhase(this.scene, this.pokemon.getBattlerIndex(), this.pokemon.getPassiveAbility().hasAttr(BlockRedirectAbAttr)));
|
this.scene.unshiftPhase(new ShowAbilityPhase(this.scene, this.pokemon.getBattlerIndex(), this.pokemon.getPassiveAbility().hasAttr(BlockRedirectAbAttr)));
|
||||||
}
|
}
|
||||||
moveTarget.value = oldTarget;
|
moveTarget.value = oldTarget;
|
||||||
@ -2366,7 +2366,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
success = false;
|
success = false;
|
||||||
else if (success && this.scene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, this.move.getMove())) {
|
else if (success && this.scene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, this.move.getMove())) {
|
||||||
success = false;
|
success = false;
|
||||||
if (failedText == null)
|
if (failedText === null)
|
||||||
failedText = getTerrainBlockMessage(targets[0], this.scene.arena.terrain.terrainType);
|
failedText = getTerrainBlockMessage(targets[0], this.scene.arena.terrain.terrainType);
|
||||||
}
|
}
|
||||||
if (success)
|
if (success)
|
||||||
@ -3647,7 +3647,7 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
for (const pokemon of this.scene.getParty()) {
|
for (const pokemon of this.scene.getParty()) {
|
||||||
this.awardRibbon(pokemon);
|
this.awardRibbon(pokemon);
|
||||||
|
|
||||||
if (pokemon.species.getRootSpeciesId() != pokemon.species.getRootSpeciesId(true)) {
|
if (pokemon.species.getRootSpeciesId() !== pokemon.species.getRootSpeciesId(true)) {
|
||||||
this.awardRibbon(pokemon, true);
|
this.awardRibbon(pokemon, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3884,9 +3884,8 @@ export class ExpPhase extends PlayerPartyMemberPokemonPhase {
|
|||||||
exp.value = Math.floor(exp.value);
|
exp.value = Math.floor(exp.value);
|
||||||
this.scene.ui.showText(i18next.t('battle:expGain', { pokemonName: pokemon.name, exp: exp.value }), null, () => {
|
this.scene.ui.showText(i18next.t('battle:expGain', { pokemonName: pokemon.name, exp: exp.value }), null, () => {
|
||||||
const lastLevel = pokemon.level;
|
const lastLevel = pokemon.level;
|
||||||
let newLevel: integer;
|
|
||||||
pokemon.addExp(exp.value);
|
pokemon.addExp(exp.value);
|
||||||
newLevel = pokemon.level;
|
const newLevel = pokemon.level;
|
||||||
if (newLevel > lastLevel)
|
if (newLevel > lastLevel)
|
||||||
this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel, newLevel));
|
this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel, newLevel));
|
||||||
pokemon.updateInfo().then(() => this.end());
|
pokemon.updateInfo().then(() => this.end());
|
||||||
@ -3912,9 +3911,8 @@ export class ShowPartyExpBarPhase extends PlayerPartyMemberPokemonPhase {
|
|||||||
exp.value = Math.floor(exp.value);
|
exp.value = Math.floor(exp.value);
|
||||||
|
|
||||||
const lastLevel = pokemon.level;
|
const lastLevel = pokemon.level;
|
||||||
let newLevel: integer;
|
|
||||||
pokemon.addExp(exp.value);
|
pokemon.addExp(exp.value);
|
||||||
newLevel = pokemon.level;
|
const newLevel = pokemon.level;
|
||||||
if (newLevel > lastLevel)
|
if (newLevel > lastLevel)
|
||||||
this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel, newLevel));
|
this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, lastLevel, newLevel));
|
||||||
this.scene.unshiftPhase(new HidePartyExpBarPhase(this.scene));
|
this.scene.unshiftPhase(new HidePartyExpBarPhase(this.scene));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import BattleScene from '../battle-scene';
|
import BattleScene from '../battle-scene';
|
||||||
import { variantColorCache, variantData } from '#app/data/variant';
|
import { variantColorCache } from '#app/data/variant';
|
||||||
import Pokemon from '../field/pokemon';
|
import Pokemon from '../field/pokemon';
|
||||||
import Trainer from '../field/trainer';
|
import Trainer from '../field/trainer';
|
||||||
import FieldSpritePipeline from './field-sprite';
|
import FieldSpritePipeline from './field-sprite';
|
||||||
|
@ -603,7 +603,7 @@ export class GameData {
|
|||||||
score: scene.score,
|
score: scene.score,
|
||||||
waveIndex: scene.currentBattle.waveIndex,
|
waveIndex: scene.currentBattle.waveIndex,
|
||||||
battleType: scene.currentBattle.battleType,
|
battleType: scene.currentBattle.battleType,
|
||||||
trainer: scene.currentBattle.battleType == BattleType.TRAINER ? new TrainerData(scene.currentBattle.trainer) : null,
|
trainer: scene.currentBattle.battleType === BattleType.TRAINER ? new TrainerData(scene.currentBattle.trainer) : null,
|
||||||
gameVersion: scene.game.config.gameVersion,
|
gameVersion: scene.game.config.gameVersion,
|
||||||
timestamp: new Date().getTime()
|
timestamp: new Date().getTime()
|
||||||
} as SessionSaveData;
|
} as SessionSaveData;
|
||||||
@ -790,7 +790,7 @@ export class GameData {
|
|||||||
const seed = sessionData.seed;
|
const seed = sessionData.seed;
|
||||||
let daily: string[] = [];
|
let daily: string[] = [];
|
||||||
|
|
||||||
if (sessionData.gameMode == GameModes.DAILY) {
|
if (sessionData.gameMode === GameModes.DAILY) {
|
||||||
if (localStorage.hasOwnProperty('daily')) {
|
if (localStorage.hasOwnProperty('daily')) {
|
||||||
daily = JSON.parse(atob(localStorage.getItem('daily')));
|
daily = JSON.parse(atob(localStorage.getItem('daily')));
|
||||||
if (daily.includes(seed)) {
|
if (daily.includes(seed)) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import BattleScene from '../battle-scene';
|
import BattleScene from '../battle-scene';
|
||||||
import { TrainerType } from '../data/enums/trainer-type';
|
import { TrainerType } from '../data/enums/trainer-type';
|
||||||
import { ModifierTier } from '../modifier/modifier-tier';
|
|
||||||
import { Achv, AchvTier, achvs } from './achv';
|
import { Achv, AchvTier, achvs } from './achv';
|
||||||
import i18next from '../plugins/i18n';
|
import i18next from '../plugins/i18n';
|
||||||
|
|
||||||
|
@ -48,12 +48,12 @@ function simulateKeyboardEvent(eventType, button, buttonMap) {
|
|||||||
* @param {string} key Key to simulate
|
* @param {string} key Key to simulate
|
||||||
* @param {object} buttonMap Map of buttons to key objects
|
* @param {object} buttonMap Map of buttons to key objects
|
||||||
*/
|
*/
|
||||||
function simulateKeyboardInput(key, buttonMap) {
|
// function simulateKeyboardInput(key, buttonMap) {
|
||||||
simulateKeyboardEvent('keydown', key, buttonMap);
|
// simulateKeyboardEvent('keydown', key, buttonMap);
|
||||||
window.setTimeout(() => {
|
// window.setTimeout(() => {
|
||||||
simulateKeyboardEvent('keyup', key, buttonMap);
|
// simulateKeyboardEvent('keyup', key, buttonMap);
|
||||||
}, 100);
|
// }, 100);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bind a node by a specific key to simulate on touch
|
* Bind a node by a specific key to simulate on touch
|
||||||
|
@ -3,8 +3,7 @@ import { Mode } from './ui';
|
|||||||
import PokemonIconAnimHandler, { PokemonIconAnimMode } from './pokemon-icon-anim-handler';
|
import PokemonIconAnimHandler, { PokemonIconAnimMode } from './pokemon-icon-anim-handler';
|
||||||
import { TextStyle, addTextObject } from './text';
|
import { TextStyle, addTextObject } from './text';
|
||||||
import MessageUiHandler from './message-ui-handler';
|
import MessageUiHandler from './message-ui-handler';
|
||||||
import { EGG_SEED, Egg, GachaType, getEggGachaTypeDescriptor, getEggHatchWavesMessage, getEggDescriptor } from '../data/egg';
|
import { Egg, getEggGachaTypeDescriptor, getEggHatchWavesMessage, getEggDescriptor } from '../data/egg';
|
||||||
import * as Utils from '../utils';
|
|
||||||
import { addWindow } from './ui-theme';
|
import { addWindow } from './ui-theme';
|
||||||
import {Button} from '../enums/buttons';
|
import {Button} from '../enums/buttons';
|
||||||
import i18next from '../plugins/i18n';
|
import i18next from '../plugins/i18n';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import BattleScene from '../battle-scene';
|
import BattleScene from '../battle-scene';
|
||||||
import { TextStyle, addTextObject, getTextColor } from './text';
|
import { TextStyle, addTextObject } from './text';
|
||||||
import { Mode } from './ui';
|
import { Mode } from './ui';
|
||||||
import UiHandler from './ui-handler';
|
import UiHandler from './ui-handler';
|
||||||
import { addWindow } from './ui-theme';
|
import { addWindow } from './ui-theme';
|
||||||
|
@ -1842,7 +1842,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkIconId(icon: Phaser.GameObjects.Sprite, species: PokemonSpecies, female, formIndex, shiny, variant) {
|
checkIconId(icon: Phaser.GameObjects.Sprite, species: PokemonSpecies, female, formIndex, shiny, variant) {
|
||||||
if (icon.frame.name != species.getIconId(female, formIndex, shiny, variant)) {
|
if (icon.frame.name !== species.getIconId(female, formIndex, shiny, variant)) {
|
||||||
console.log(`${species.name}'s variant icon does not exist. Replacing with default.`);
|
console.log(`${species.name}'s variant icon does not exist. Replacing with default.`);
|
||||||
icon.setTexture(species.getIconAtlasKey(formIndex, false, variant));
|
icon.setTexture(species.getIconAtlasKey(formIndex, false, variant));
|
||||||
icon.setFrame(species.getIconId(female, formIndex, false, variant));
|
icon.setFrame(species.getIconId(female, formIndex, false, variant));
|
||||||
|
@ -3,10 +3,10 @@ import { Mode } from './ui';
|
|||||||
import UiHandler from './ui-handler';
|
import UiHandler from './ui-handler';
|
||||||
import * as Utils from '../utils';
|
import * as Utils from '../utils';
|
||||||
import { PlayerPokemon } from '../field/pokemon';
|
import { PlayerPokemon } from '../field/pokemon';
|
||||||
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from '../data/pokemon-species';
|
import { getStarterValueFriendshipCap, speciesStarters } from '../data/pokemon-species';
|
||||||
import { argbFromRgba } from '@material/material-color-utilities';
|
import { argbFromRgba } from '@material/material-color-utilities';
|
||||||
import { Type, getTypeRgb } from '../data/type';
|
import { Type, getTypeRgb } from '../data/type';
|
||||||
import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag, getTextColor } from './text';
|
import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag } from './text';
|
||||||
import Move, { MoveCategory } from '../data/move';
|
import Move, { MoveCategory } from '../data/move';
|
||||||
import { getPokeballAtlasKey } from '../data/pokeball';
|
import { getPokeballAtlasKey } from '../data/pokeball';
|
||||||
import { getGenderColor, getGenderSymbol } from '../data/gender';
|
import { getGenderColor, getGenderSymbol } from '../data/gender';
|
||||||
@ -796,7 +796,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
|
|
||||||
const natureStatMultiplier = getNatureStatMultiplier(this.pokemon.getNature(), s);
|
const natureStatMultiplier = getNatureStatMultiplier(this.pokemon.getNature(), s);
|
||||||
|
|
||||||
const statLabel = addTextObject(this.scene, 27 + 115 * colIndex + (colIndex == 1 ? 5 : 0), 56 + 16 * rowIndex, statName, natureStatMultiplier === 1 ? TextStyle.SUMMARY : natureStatMultiplier > 1 ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE);
|
const statLabel = addTextObject(this.scene, 27 + 115 * colIndex + (colIndex === 1 ? 5 : 0), 56 + 16 * rowIndex, statName, natureStatMultiplier === 1 ? TextStyle.SUMMARY : natureStatMultiplier > 1 ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE);
|
||||||
statLabel.setOrigin(0.5, 0);
|
statLabel.setOrigin(0.5, 0);
|
||||||
statsContainer.add(statLabel);
|
statsContainer.add(statLabel);
|
||||||
|
|
||||||
|
@ -85,7 +85,6 @@ export function addTextInputObject(scene: Phaser.Scene, x: number, y: number, wi
|
|||||||
|
|
||||||
function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): [ Phaser.Types.GameObjects.Text.TextStyle | InputText.IConfig, string, integer ] {
|
function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): [ Phaser.Types.GameObjects.Text.TextStyle | InputText.IConfig, string, integer ] {
|
||||||
const lang = i18next.language;
|
const lang = i18next.language;
|
||||||
let shadowColor: string;
|
|
||||||
let shadowXpos = 4;
|
let shadowXpos = 4;
|
||||||
let shadowYpos = 5;
|
let shadowYpos = 5;
|
||||||
|
|
||||||
@ -138,7 +137,7 @@ function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraStyleOptio
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowColor = getTextColor(style, true, uiTheme);
|
const shadowColor = getTextColor(style, true, uiTheme);
|
||||||
|
|
||||||
if (extraStyleOptions) {
|
if (extraStyleOptions) {
|
||||||
if (extraStyleOptions.fontSize) {
|
if (extraStyleOptions.fontSize) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import BattleScene from '../battle-scene';
|
import BattleScene from '../battle-scene';
|
||||||
import { TextStyle, getTextColor } from './text';
|
import { TextStyle, getTextColor } from './text';
|
||||||
import UI, { Mode } from './ui';
|
import { Mode } from './ui';
|
||||||
import {Button} from '../enums/buttons';
|
import {Button} from '../enums/buttons';
|
||||||
|
|
||||||
export default abstract class UiHandler {
|
export default abstract class UiHandler {
|
||||||
|
Loading…
Reference in New Issue
Block a user