diff --git a/eslint.config.js b/eslint.config.js index 2003082cbc1..61a96031fed 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -18,9 +18,9 @@ export default tseslint.config( "@typescript-eslint": tseslint.plugin, }, rules: { - // Prevent fallthrough on switch without an explicit "falls through" comment. + // Prevent fallthrough on switch without an explicit "falls through" comment with explanatino. // Note: Move to biome if/when they add "falls through" comments - "no-fallthrough": ["error", { commentPattern: "falls through" }], + "no-fallthrough": ["error", { commentPattern: "^ falls through" }], "no-undef": "off", // Disables the rule that disallows the use of undeclared variables (TypeScript handles this) "no-extra-semi": "error", // Disallows unnecessary semicolons for TypeScript-specific syntax "import-x/extensions": ["error", "never", { json: "always" }], // Enforces no extension for imports unless json diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index 903b2726676..42a78ecf5a8 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -652,7 +652,7 @@ export default class Move implements Localizable { break; case MoveFlags.IGNORE_ABILITIES: if (user.hasAbilityWithAttr(MoveAbilityBypassAbAttr)) { - const abilityEffectsIgnored = new BooleanHolder(false); + const abilityEffectsIgnored = new BooleanHolder(false); applyAbAttrs(MoveAbilityBypassAbAttr, user, abilityEffectsIgnored, false, this); if (abilityEffectsIgnored.value) { return true; @@ -1512,7 +1512,7 @@ export class TargetHalfHpDamageAttr extends FixedDamageAttr { switch (user.turnData.hitCount - user.turnData.hitsLeft) { case 0: // first hit of move; update initialHp tracker - this.initialHp = target.hp; + this.initialHp = target.hp; // falls through default: // multi lens added hit; use initialHp tracker to ensure correct damage (args[0] as NumberHolder).value = toDmgValue(this.initialHp / 2); @@ -3160,7 +3160,7 @@ export class StatStageChangeAttr extends MoveEffectAttr { private get showMessage () { return this.options?.showMessage ?? true; } - + /** * Attempts to change stats of the user or target (depending on value of selfTarget) if conditions are met * @param user {@linkcode Pokemon} the user of the move @@ -6326,11 +6326,11 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { if (!allyPokemon?.isActive(true) && switchOutTarget.hp) { globalScene.pushPhase(new BattleEndPhase(false)); - + if (globalScene.gameMode.hasRandomBiomes || globalScene.isNewBiome()) { globalScene.pushPhase(new SelectBiomePhase()); } - + globalScene.pushPhase(new NewBattlePhase()); } } diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index 01085834ba5..fe164cd9e99 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -222,6 +222,7 @@ export class MoveEffectPhase extends PokemonPhase { pokemonName: getPokemonNameWithAffix(target), }), ); + // falls through to play msg case HitCheckResult.NO_EFFECT_NO_MESSAGE: case HitCheckResult.PROTECTED: case HitCheckResult.TARGET_NOT_ON_FIELD: