Merge branch 'beta' into happiny-evo

This commit is contained in:
NightKev 2025-09-13 15:14:25 -07:00 committed by GitHub
commit fe4a0d53d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 79 additions and 47 deletions

View File

@ -1,5 +1,5 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json", "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"vcs": { "vcs": {
"enabled": true, "enabled": true,
"clientKind": "git", "clientKind": "git",
@ -98,7 +98,9 @@
"useTrimStartEnd": "error", "useTrimStartEnd": "error",
"useReadonlyClassProperties": { "useReadonlyClassProperties": {
"level": "info", // TODO: Graduate to error eventually "level": "info", // TODO: Graduate to error eventually
"options": { "checkAllProperties": true } // NOTE: "checkAllProperties" has an immature implementation that
// causes many false positives across files. Enable if/when maturity improves
"options": { "checkAllProperties": false }
}, },
"useConsistentObjectDefinitions": { "useConsistentObjectDefinitions": {
"level": "error", "level": "error",
@ -209,11 +211,15 @@
"nursery": { "nursery": {
"noUselessUndefined": "error", "noUselessUndefined": "error",
"useMaxParams": { "useMaxParams": {
"level": "warn", // TODO: Change to "error"... eventually... "level": "info", // TODO: Change to "error"... eventually...
"options": { "max": 4 } // A lot of stuff has a few params, but "options": { "max": 7 }
}, },
"noShadow": "warn", // TODO: refactor and make "error" "noShadow": "warn", // TODO: refactor and make "error"
"noNonNullAssertedOptionalChain": "warn" // TODO: refactor and make "error" "noNonNullAssertedOptionalChain": "warn", // TODO: refactor and make "error"
"noDuplicateDependencies": "error",
"noImportCycles": "error",
// TODO: Change to error once promises are used properly
"noMisusedPromises": "info"
} }
} }
}, },

View File

@ -33,7 +33,7 @@
"update-locales:remote": "git submodule update --progress --init --recursive --force --remote" "update-locales:remote": "git submodule update --progress --init --recursive --force --remote"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "2.2.3", "@biomejs/biome": "2.2.4",
"@ls-lint/ls-lint": "2.3.1", "@ls-lint/ls-lint": "2.3.1",
"@types/crypto-js": "^4.2.0", "@types/crypto-js": "^4.2.0",
"@types/jsdom": "^21.1.7", "@types/jsdom": "^21.1.7",
@ -74,5 +74,5 @@
"engines": { "engines": {
"node": ">=22.0.0" "node": ">=22.0.0"
}, },
"packageManager": "pnpm@10.14.0" "packageManager": "pnpm@10.16.1"
} }

View File

@ -43,8 +43,8 @@ importers:
version: 1.80.16(graphology-types@0.24.8) version: 1.80.16(graphology-types@0.24.8)
devDependencies: devDependencies:
'@biomejs/biome': '@biomejs/biome':
specifier: 2.2.3 specifier: 2.2.4
version: 2.2.3 version: 2.2.4
'@ls-lint/ls-lint': '@ls-lint/ls-lint':
specifier: 2.3.1 specifier: 2.3.1
version: 2.3.1 version: 2.3.1
@ -195,55 +195,55 @@ packages:
resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
'@biomejs/biome@2.2.3': '@biomejs/biome@2.2.4':
resolution: {integrity: sha512-9w0uMTvPrIdvUrxazZ42Ib7t8Y2yoGLKLdNne93RLICmaHw7mcLv4PPb5LvZLJF3141gQHiCColOh/v6VWlWmg==} resolution: {integrity: sha512-TBHU5bUy/Ok6m8c0y3pZiuO/BZoY/OcGxoLlrfQof5s8ISVwbVBdFINPQZyFfKwil8XibYWb7JMwnT8wT4WVPg==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
hasBin: true hasBin: true
'@biomejs/cli-darwin-arm64@2.2.3': '@biomejs/cli-darwin-arm64@2.2.4':
resolution: {integrity: sha512-OrqQVBpadB5eqzinXN4+Q6honBz+tTlKVCsbEuEpljK8ASSItzIRZUA02mTikl3H/1nO2BMPFiJ0nkEZNy3B1w==} resolution: {integrity: sha512-RJe2uiyaloN4hne4d2+qVj3d3gFJFbmrr5PYtkkjei1O9c+BjGXgpUPVbi8Pl8syumhzJjFsSIYkcLt2VlVLMA==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
'@biomejs/cli-darwin-x64@2.2.3': '@biomejs/cli-darwin-x64@2.2.4':
resolution: {integrity: sha512-OCdBpb1TmyfsTgBAM1kPMXyYKTohQ48WpiN9tkt9xvU6gKVKHY4oVwteBebiOqyfyzCNaSiuKIPjmHjUZ2ZNMg==} resolution: {integrity: sha512-cFsdB4ePanVWfTnPVaUX+yr8qV8ifxjBKMkZwN7gKb20qXPxd/PmwqUH8mY5wnM9+U0QwM76CxFyBRJhC9tQwg==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
'@biomejs/cli-linux-arm64-musl@2.2.3': '@biomejs/cli-linux-arm64-musl@2.2.4':
resolution: {integrity: sha512-q3w9jJ6JFPZPeqyvwwPeaiS/6NEszZ+pXKF+IczNo8Xj6fsii45a4gEEicKyKIytalV+s829ACZujQlXAiVLBQ==} resolution: {integrity: sha512-7TNPkMQEWfjvJDaZRSkDCPT/2r5ESFPKx+TEev+I2BXDGIjfCZk2+b88FOhnJNHtksbOZv8ZWnxrA5gyTYhSsQ==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
'@biomejs/cli-linux-arm64@2.2.3': '@biomejs/cli-linux-arm64@2.2.4':
resolution: {integrity: sha512-g/Uta2DqYpECxG+vUmTAmUKlVhnGEcY7DXWgKP8ruLRa8Si1QHsWknPY3B/wCo0KgYiFIOAZ9hjsHfNb9L85+g==} resolution: {integrity: sha512-M/Iz48p4NAzMXOuH+tsn5BvG/Jb07KOMTdSVwJpicmhN309BeEyRyQX+n1XDF0JVSlu28+hiTQ2L4rZPvu7nMw==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
'@biomejs/cli-linux-x64-musl@2.2.3': '@biomejs/cli-linux-x64-musl@2.2.4':
resolution: {integrity: sha512-y76Dn4vkP1sMRGPFlNc+OTETBhGPJ90jY3il6jAfur8XWrYBQV3swZ1Jo0R2g+JpOeeoA0cOwM7mJG6svDz79w==} resolution: {integrity: sha512-m41nFDS0ksXK2gwXL6W6yZTYPMH0LughqbsxInSKetoH6morVj43szqKx79Iudkp8WRT5SxSh7qVb8KCUiewGg==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
'@biomejs/cli-linux-x64@2.2.3': '@biomejs/cli-linux-x64@2.2.4':
resolution: {integrity: sha512-LEtyYL1fJsvw35CxrbQ0gZoxOG3oZsAjzfRdvRBRHxOpQ91Q5doRVjvWW/wepgSdgk5hlaNzfeqpyGmfSD0Eyw==} resolution: {integrity: sha512-orr3nnf2Dpb2ssl6aihQtvcKtLySLta4E2UcXdp7+RTa7mfJjBgIsbS0B9GC8gVu0hjOu021aU8b3/I1tn+pVQ==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
'@biomejs/cli-win32-arm64@2.2.3': '@biomejs/cli-win32-arm64@2.2.4':
resolution: {integrity: sha512-Ms9zFYzjcJK7LV+AOMYnjN3pV3xL8Prxf9aWdDVL74onLn5kcvZ1ZMQswE5XHtnd/r/0bnUd928Rpbs14BzVmA==} resolution: {integrity: sha512-NXnfTeKHDFUWfxAefa57DiGmu9VyKi0cDqFpdI+1hJWQjGJhJutHPX0b5m+eXvTKOaf+brU+P0JrQAZMb5yYaQ==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
'@biomejs/cli-win32-x64@2.2.3': '@biomejs/cli-win32-x64@2.2.4':
resolution: {integrity: sha512-gvCpewE7mBwBIpqk1YrUqNR4mCiyJm6UI3YWQQXkedSSEwzRdodRpaKhbdbHw1/hmTWOVXQ+Eih5Qctf4TCVOQ==} resolution: {integrity: sha512-3Y4V4zVRarVh/B/eSHczR4LYoSVyv3Dfuvm3cWs5w/HScccS0+Wt/lHOcDTRYeHjQmMYVC3rIRWqyN2EI52+zg==}
engines: {node: '>=14.21.3'} engines: {node: '>=14.21.3'}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
@ -2164,39 +2164,39 @@ snapshots:
'@babel/helper-string-parser': 7.27.1 '@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.27.1 '@babel/helper-validator-identifier': 7.27.1
'@biomejs/biome@2.2.3': '@biomejs/biome@2.2.4':
optionalDependencies: optionalDependencies:
'@biomejs/cli-darwin-arm64': 2.2.3 '@biomejs/cli-darwin-arm64': 2.2.4
'@biomejs/cli-darwin-x64': 2.2.3 '@biomejs/cli-darwin-x64': 2.2.4
'@biomejs/cli-linux-arm64': 2.2.3 '@biomejs/cli-linux-arm64': 2.2.4
'@biomejs/cli-linux-arm64-musl': 2.2.3 '@biomejs/cli-linux-arm64-musl': 2.2.4
'@biomejs/cli-linux-x64': 2.2.3 '@biomejs/cli-linux-x64': 2.2.4
'@biomejs/cli-linux-x64-musl': 2.2.3 '@biomejs/cli-linux-x64-musl': 2.2.4
'@biomejs/cli-win32-arm64': 2.2.3 '@biomejs/cli-win32-arm64': 2.2.4
'@biomejs/cli-win32-x64': 2.2.3 '@biomejs/cli-win32-x64': 2.2.4
'@biomejs/cli-darwin-arm64@2.2.3': '@biomejs/cli-darwin-arm64@2.2.4':
optional: true optional: true
'@biomejs/cli-darwin-x64@2.2.3': '@biomejs/cli-darwin-x64@2.2.4':
optional: true optional: true
'@biomejs/cli-linux-arm64-musl@2.2.3': '@biomejs/cli-linux-arm64-musl@2.2.4':
optional: true optional: true
'@biomejs/cli-linux-arm64@2.2.3': '@biomejs/cli-linux-arm64@2.2.4':
optional: true optional: true
'@biomejs/cli-linux-x64-musl@2.2.3': '@biomejs/cli-linux-x64-musl@2.2.4':
optional: true optional: true
'@biomejs/cli-linux-x64@2.2.3': '@biomejs/cli-linux-x64@2.2.4':
optional: true optional: true
'@biomejs/cli-win32-arm64@2.2.3': '@biomejs/cli-win32-arm64@2.2.4':
optional: true optional: true
'@biomejs/cli-win32-x64@2.2.3': '@biomejs/cli-win32-x64@2.2.4':
optional: true optional: true
'@bundled-es-modules/cookie@2.0.1': '@bundled-es-modules/cookie@2.0.1':

View File

@ -6909,7 +6909,7 @@ export class EnemyPokemon extends Pokemon {
const segmentSize = this.getMaxHp() / this.bossSegments; const segmentSize = this.getMaxHp() / this.bossSegments;
clearedBossSegmentIndex = Math.ceil(this.hp / segmentSize); clearedBossSegmentIndex = Math.ceil(this.hp / segmentSize);
} }
if (clearedBossSegmentIndex <= this.bossSegmentIndex) { if (clearedBossSegmentIndex <= this.bossSegmentIndex && !this.hasTrainer()) {
this.handleBossSegmentCleared(clearedBossSegmentIndex); this.handleBossSegmentCleared(clearedBossSegmentIndex);
} }
this.battleInfo.updateBossSegments(this); this.battleInfo.updateBossSegments(this);

View File

@ -1,4 +1,4 @@
import { type PokeballCounts } from "#app/battle-scene"; import type { PokeballCounts } from "#app/battle-scene";
import { EvolutionItem } from "#balance/pokemon-evolutions"; import { EvolutionItem } from "#balance/pokemon-evolutions";
import { Gender } from "#data/gender"; import { Gender } from "#data/gender";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
@ -21,7 +21,7 @@ import { TrainerType } from "#enums/trainer-type";
import { Unlockables } from "#enums/unlockables"; import { Unlockables } from "#enums/unlockables";
import { VariantTier } from "#enums/variant-tier"; import { VariantTier } from "#enums/variant-tier";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
import { type ModifierOverride } from "#modifiers/modifier-type"; import type { ModifierOverride } from "#modifiers/modifier-type";
import { Variant } from "#sprites/variant"; import { Variant } from "#sprites/variant";
/** /**

26
src/utils/anim-utils.ts Normal file
View File

@ -0,0 +1,26 @@
import { globalScene } from "#app/global-scene";
import type { SceneBase } from "#app/scene-base";
/**
* Plays a Tween animation, resolving once the animation completes.
* @param config - The config for a single Tween
* @param scene - The {@linkcode SceneBase} on which the Tween plays; default {@linkcode globalScene}
* @returns A Promise that resolves once the Tween has been played.
*
* @privateRemarks
* The `config` input should not include an `onComplete` field as that callback is
* used to resolve the Promise containing the Tween animation.
* However, `config`'s type cannot be changed to something like `Omit<TweenBuilderConfig, "onComplete">`
* due to how the type for `TweenBuilderConfig` is defined.
*/
export async function playTween(
config: Phaser.Types.Tweens.TweenBuilderConfig,
scene: SceneBase = globalScene,
): Promise<void> {
await new Promise(resolve =>
scene.tweens.add({
...config,
onComplete: resolve,
}),
);
}