diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 05a6e699c48..db9ba1b2828 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -129,6 +129,7 @@ export default class BattleScene extends SceneBase { public fusionPaletteSwaps: boolean = true; public enableTouchControls: boolean = false; public enableVibration: boolean = false; + public gamepadSupport: boolean = false; public abSwapped: boolean = false; public disableMenu: boolean = false; @@ -300,7 +301,7 @@ export default class BattleScene extends SceneBase { this.fieldUI = fieldUI; - const transition = this.make.rexTransitionImagePack({ + const transition = (this.make as any).rexTransitionImagePack({ x: 0, y: 0, scale: 6, diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index c95cf2bd939..8c9b979c7fa 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -566,7 +566,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali catchRate: integer, baseFriendship: integer, baseExp: integer, growthRate: GrowthRate, malePercent: number, genderDiffs: boolean, canChangeForm?: boolean, ...forms: PokemonForm[]) { super(type1, type2, height, weight, ability1, ability2, abilityHidden, baseTotal, baseHp, baseAtk, baseDef, baseSpatk, baseSpdef, baseSpd, - catchRate, baseFriendship, baseExp, genderDiffs); + catchRate, baseFriendship, baseExp, genderDiffs, false); this.speciesId = id; this.formIndex = 0; this.generation = generation; diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 99e013dc00e..11671110611 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -691,7 +691,7 @@ export class TrainerConfig { initI18n(); } // Check if the female version exists in the i18n file - if (i18next.exists(`trainerClasses:${this.name.toLowerCase().replace()}`)) { + if (i18next.exists(`trainerClasses:${this.name.toLowerCase()}`)) { // If it does, return return ret + "_female"; } else { diff --git a/src/field/trainer.ts b/src/field/trainer.ts index dea8dd8182b..3e59eaf7832 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -421,7 +421,7 @@ export default class Trainer extends Phaser.GameObjects.Container { this.scene.arena.findTagsOnSide(t => t instanceof ArenaTrapTag, ArenaTagSide.ENEMY).map(t => score *= (t as ArenaTrapTag).getMatchupScoreMultiplier(p)); } return [party.indexOf(p), score]; - }); + }) as [integer, integer][]; return partyMemberScores; } diff --git a/src/ui/ability-bar.ts b/src/ui/ability-bar.ts index 3e85077e07d..58717c3d2d0 100644 --- a/src/ui/ability-bar.ts +++ b/src/ui/ability-bar.ts @@ -12,7 +12,7 @@ export default class AbilityBar extends Phaser.GameObjects.Container { private abilityNameText: Phaser.GameObjects.Text; private tween: Phaser.Tweens.Tween; - private autoHideTimer: number; + private autoHideTimer: NodeJS.Timeout; public shown: boolean; diff --git a/src/ui/candy-bar.ts b/src/ui/candy-bar.ts index aa08ed58e60..84d1c2f70e7 100644 --- a/src/ui/candy-bar.ts +++ b/src/ui/candy-bar.ts @@ -12,7 +12,7 @@ export default class CandyBar extends Phaser.GameObjects.Container { private speciesId: Species; private tween: Phaser.Tweens.Tween; - private autoHideTimer: number; + private autoHideTimer: NodeJS.Timeout; public shown: boolean; diff --git a/src/ui/text.ts b/src/ui/text.ts index e3bfb1445aa..5c11f1cfbd1 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -87,7 +87,7 @@ export function addTextInputObject(scene: Phaser.Scene, x: number, y: number, wi return ret; } -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, number, number ] { const lang = i18next.language; let shadowXpos = 4; let shadowYpos = 5; diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index a54d44dc91e..033327c0582 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -14,7 +14,7 @@ export default class TitleUiHandler extends OptionSelectUiHandler { private splashMessage: string; private splashMessageText: Phaser.GameObjects.Text; - private titleStatsTimer: number; + private titleStatsTimer: NodeJS.Timeout; constructor(scene: BattleScene, mode: Mode = Mode.TITLE) { super(scene, mode); diff --git a/src/ui/unavailable-modal-ui-handler.ts b/src/ui/unavailable-modal-ui-handler.ts index 96bf561003b..60d01a93c82 100644 --- a/src/ui/unavailable-modal-ui-handler.ts +++ b/src/ui/unavailable-modal-ui-handler.ts @@ -5,7 +5,7 @@ import { Mode } from "./ui"; import { updateUserInfo } from "#app/account"; export default class UnavailableModalUiHandler extends ModalUiHandler { - private reconnectTimer: number; + private reconnectTimer: NodeJS.Timeout; private reconnectDuration: number; private reconnectCallback: () => void;