Merge branch 'beta' into intim-tests

This commit is contained in:
Bertie690 2025-06-01 18:49:27 -04:00 committed by GitHub
commit e975d78e1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
201 changed files with 3754 additions and 1106 deletions

View File

@ -1,7 +1,8 @@
all:
- "src/**"
- "test/**"
- "public/**"
# Negations syntax from https://github.com/dorny/paths-filter/issues/184#issuecomment-2786521554
- "src/**/!(*.{md,py,sh,gitkeep,gitignore})"
- "test/**/!(*.{md,py,sh,gitkeep,gitignore})"
- "public/**/!(*.{md,py,sh,gitkeep,gitignore})"
# Workflows that can impact tests
- ".github/workflows/test*.yml"
- ".github/test-filters.yml"
@ -11,9 +12,4 @@ all:
- "vite*" # vite.config.ts, vite.vitest.config.ts, vitest.workspace.ts
- "tsconfig*.json" # tsconfig.json tweaking can impact compilation
- "global.d.ts"
- ".env*"
# Blanket negations for files that cannot impact tests
- "!**/*.py" # No .py files
- "!**/*.sh" # No .sh files
- "!**/*.md" # No .md files
- "!**/.git*" # .gitkeep and family
- ".env*"

View File

@ -19,19 +19,20 @@ on:
jobs:
test:
name: Shard ${{ inputs.shard }} of ${{ inputs.totalShards }}
# We can't use dynmically named jobs until https://github.com/orgs/community/discussions/13261 is implemented
name: Shard
runs-on: ubuntu-latest
if: ${{ !inputs.skip }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4.2.2
with:
submodules: 'recursive'
submodules: "recursive"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"
- name: Install Node.js dependencies
run: npm ci
- name: Run tests

View File

@ -25,6 +25,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: .github/test-filters.yml
@ -33,10 +34,10 @@ jobs:
needs: check-path-change-filter
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
shard: [1, 2, 3, 4, 5]
uses: ./.github/workflows/test-shard-template.yml
with:
project: main
shard: ${{ matrix.shard }}
totalShards: 10
skip: ${{ needs.check-path-change-filter.outputs.all == 'false'}}
totalShards: 5
skip: ${{ needs.check-path-change-filter.outputs.all != 'true'}}

View File

@ -1,7 +1,7 @@
{
"textures": [
{
"image": "statuses_ca_ES.png",
"image": "statuses_ca.png",
"format": "RGBA8888",
"size": {
"w": 22,

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,188 @@
{
"textures": [
{
"image": "statuses_da.png",
"format": "RGBA8888",
"size": {
"w": 22,
"h": 64
},
"scale": 1,
"frames": [
{
"filename": "pokerus",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 22,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
},
"frame": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
}
},
{
"filename": "burn",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 8,
"w": 20,
"h": 8
}
},
{
"filename": "faint",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 16,
"w": 20,
"h": 8
}
},
{
"filename": "freeze",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 24,
"w": 20,
"h": 8
}
},
{
"filename": "paralysis",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 32,
"w": 20,
"h": 8
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 40,
"w": 20,
"h": 8
}
},
{
"filename": "sleep",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 48,
"w": 20,
"h": 8
}
},
{
"filename": "toxic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 56,
"w": 20,
"h": 8
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:37686e85605d17b806f22d43081c1139:70535ffee63ba61b3397d8470c2c8982:e6649238c018d3630e55681417c698ca$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,188 @@
{
"textures": [
{
"image": "statuses_ro.png",
"format": "RGBA8888",
"size": {
"w": 22,
"h": 64
},
"scale": 1,
"frames": [
{
"filename": "pokerus",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 22,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
},
"frame": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
}
},
{
"filename": "burn",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 8,
"w": 20,
"h": 8
}
},
{
"filename": "faint",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 16,
"w": 20,
"h": 8
}
},
{
"filename": "freeze",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 24,
"w": 20,
"h": 8
}
},
{
"filename": "paralysis",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 32,
"w": 20,
"h": 8
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 40,
"w": 20,
"h": 8
}
},
{
"filename": "sleep",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 48,
"w": 20,
"h": 8
}
},
{
"filename": "toxic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 56,
"w": 20,
"h": 8
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:37686e85605d17b806f22d43081c1139:70535ffee63ba61b3397d8470c2c8982:e6649238c018d3630e55681417c698ca$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,188 @@
{
"textures": [
{
"image": "statuses_ru.png",
"format": "RGBA8888",
"size": {
"w": 22,
"h": 64
},
"scale": 1,
"frames": [
{
"filename": "pokerus",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 22,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
},
"frame": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
}
},
{
"filename": "burn",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 8,
"w": 20,
"h": 8
}
},
{
"filename": "faint",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 16,
"w": 20,
"h": 8
}
},
{
"filename": "freeze",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 24,
"w": 20,
"h": 8
}
},
{
"filename": "paralysis",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 32,
"w": 20,
"h": 8
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 40,
"w": 20,
"h": 8
}
},
{
"filename": "sleep",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 48,
"w": 20,
"h": 8
}
},
{
"filename": "toxic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 56,
"w": 20,
"h": 8
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:37686e85605d17b806f22d43081c1139:70535ffee63ba61b3397d8470c2c8982:e6649238c018d3630e55681417c698ca$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,188 @@
{
"textures": [
{
"image": "statuses_tr.png",
"format": "RGBA8888",
"size": {
"w": 22,
"h": 64
},
"scale": 1,
"frames": [
{
"filename": "pokerus",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 22,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
},
"frame": {
"x": 0,
"y": 0,
"w": 22,
"h": 8
}
},
{
"filename": "burn",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 8,
"w": 20,
"h": 8
}
},
{
"filename": "faint",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 16,
"w": 20,
"h": 8
}
},
{
"filename": "freeze",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 24,
"w": 20,
"h": 8
}
},
{
"filename": "paralysis",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 32,
"w": 20,
"h": 8
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 40,
"w": 20,
"h": 8
}
},
{
"filename": "sleep",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 48,
"w": 20,
"h": 8
}
},
{
"filename": "toxic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 20,
"h": 8
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 20,
"h": 8
},
"frame": {
"x": 0,
"y": 56,
"w": 20,
"h": 8
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:37686e85605d17b806f22d43081c1139:70535ffee63ba61b3397d8470c2c8982:e6649238c018d3630e55681417c698ca$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

View File

@ -1,7 +1,7 @@
{
"textures": [
{
"image": "types_ca-ES.png",
"image": "types_ca.png",
"format": "RGBA8888",
"size": {
"w": 32,

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

440
public/images/types_da.json Normal file
View File

@ -0,0 +1,440 @@
{
"textures": [
{
"image": "types_da.png",
"format": "RGBA8888",
"size": {
"w": 32,
"h": 280
},
"scale": 1,
"frames": [
{
"filename": "unknown",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
}
},
{
"filename": "bug",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 14,
"w": 32,
"h": 14
}
},
{
"filename": "dark",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 28,
"w": 32,
"h": 14
}
},
{
"filename": "dragon",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 42,
"w": 32,
"h": 14
}
},
{
"filename": "electric",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 56,
"w": 32,
"h": 14
}
},
{
"filename": "fairy",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 70,
"w": 32,
"h": 14
}
},
{
"filename": "fighting",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 84,
"w": 32,
"h": 14
}
},
{
"filename": "fire",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 98,
"w": 32,
"h": 14
}
},
{
"filename": "flying",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 112,
"w": 32,
"h": 14
}
},
{
"filename": "ghost",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 126,
"w": 32,
"h": 14
}
},
{
"filename": "grass",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 140,
"w": 32,
"h": 14
}
},
{
"filename": "ground",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 154,
"w": 32,
"h": 14
}
},
{
"filename": "ice",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 168,
"w": 32,
"h": 14
}
},
{
"filename": "normal",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 182,
"w": 32,
"h": 14
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 196,
"w": 32,
"h": 14
}
},
{
"filename": "psychic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 210,
"w": 32,
"h": 14
}
},
{
"filename": "rock",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 224,
"w": 32,
"h": 14
}
},
{
"filename": "steel",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 238,
"w": 32,
"h": 14
}
},
{
"filename": "water",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 252,
"w": 32,
"h": 14
}
},
{
"filename": "stellar",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 266,
"w": 32,
"h": 14
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$"
}
}

BIN
public/images/types_da.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

440
public/images/types_ro.json Normal file
View File

@ -0,0 +1,440 @@
{
"textures": [
{
"image": "types_ro.png",
"format": "RGBA8888",
"size": {
"w": 32,
"h": 280
},
"scale": 1,
"frames": [
{
"filename": "unknown",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
}
},
{
"filename": "bug",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 14,
"w": 32,
"h": 14
}
},
{
"filename": "dark",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 28,
"w": 32,
"h": 14
}
},
{
"filename": "dragon",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 42,
"w": 32,
"h": 14
}
},
{
"filename": "electric",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 56,
"w": 32,
"h": 14
}
},
{
"filename": "fairy",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 70,
"w": 32,
"h": 14
}
},
{
"filename": "fighting",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 84,
"w": 32,
"h": 14
}
},
{
"filename": "fire",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 98,
"w": 32,
"h": 14
}
},
{
"filename": "flying",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 112,
"w": 32,
"h": 14
}
},
{
"filename": "ghost",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 126,
"w": 32,
"h": 14
}
},
{
"filename": "grass",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 140,
"w": 32,
"h": 14
}
},
{
"filename": "ground",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 154,
"w": 32,
"h": 14
}
},
{
"filename": "ice",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 168,
"w": 32,
"h": 14
}
},
{
"filename": "normal",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 182,
"w": 32,
"h": 14
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 196,
"w": 32,
"h": 14
}
},
{
"filename": "psychic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 210,
"w": 32,
"h": 14
}
},
{
"filename": "rock",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 224,
"w": 32,
"h": 14
}
},
{
"filename": "steel",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 238,
"w": 32,
"h": 14
}
},
{
"filename": "water",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 252,
"w": 32,
"h": 14
}
},
{
"filename": "stellar",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 266,
"w": 32,
"h": 14
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$"
}
}

BIN
public/images/types_ro.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

440
public/images/types_ru.json Normal file
View File

@ -0,0 +1,440 @@
{
"textures": [
{
"image": "types_ru.png",
"format": "RGBA8888",
"size": {
"w": 32,
"h": 280
},
"scale": 1,
"frames": [
{
"filename": "unknown",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
}
},
{
"filename": "bug",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 14,
"w": 32,
"h": 14
}
},
{
"filename": "dark",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 28,
"w": 32,
"h": 14
}
},
{
"filename": "dragon",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 42,
"w": 32,
"h": 14
}
},
{
"filename": "electric",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 56,
"w": 32,
"h": 14
}
},
{
"filename": "fairy",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 70,
"w": 32,
"h": 14
}
},
{
"filename": "fighting",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 84,
"w": 32,
"h": 14
}
},
{
"filename": "fire",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 98,
"w": 32,
"h": 14
}
},
{
"filename": "flying",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 112,
"w": 32,
"h": 14
}
},
{
"filename": "ghost",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 126,
"w": 32,
"h": 14
}
},
{
"filename": "grass",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 140,
"w": 32,
"h": 14
}
},
{
"filename": "ground",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 154,
"w": 32,
"h": 14
}
},
{
"filename": "ice",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 168,
"w": 32,
"h": 14
}
},
{
"filename": "normal",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 182,
"w": 32,
"h": 14
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 196,
"w": 32,
"h": 14
}
},
{
"filename": "psychic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 210,
"w": 32,
"h": 14
}
},
{
"filename": "rock",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 224,
"w": 32,
"h": 14
}
},
{
"filename": "steel",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 238,
"w": 32,
"h": 14
}
},
{
"filename": "water",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 252,
"w": 32,
"h": 14
}
},
{
"filename": "stellar",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 266,
"w": 32,
"h": 14
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$"
}
}

BIN
public/images/types_ru.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

440
public/images/types_tr.json Normal file
View File

@ -0,0 +1,440 @@
{
"textures": [
{
"image": "types_tr.png",
"format": "RGBA8888",
"size": {
"w": 32,
"h": 280
},
"scale": 1,
"frames": [
{
"filename": "unknown",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
}
},
{
"filename": "bug",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 14,
"w": 32,
"h": 14
}
},
{
"filename": "dark",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 28,
"w": 32,
"h": 14
}
},
{
"filename": "dragon",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 42,
"w": 32,
"h": 14
}
},
{
"filename": "electric",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 56,
"w": 32,
"h": 14
}
},
{
"filename": "fairy",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 70,
"w": 32,
"h": 14
}
},
{
"filename": "fighting",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 84,
"w": 32,
"h": 14
}
},
{
"filename": "fire",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 98,
"w": 32,
"h": 14
}
},
{
"filename": "flying",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 112,
"w": 32,
"h": 14
}
},
{
"filename": "ghost",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 126,
"w": 32,
"h": 14
}
},
{
"filename": "grass",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 140,
"w": 32,
"h": 14
}
},
{
"filename": "ground",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 154,
"w": 32,
"h": 14
}
},
{
"filename": "ice",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 168,
"w": 32,
"h": 14
}
},
{
"filename": "normal",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 182,
"w": 32,
"h": 14
}
},
{
"filename": "poison",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 196,
"w": 32,
"h": 14
}
},
{
"filename": "psychic",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 210,
"w": 32,
"h": 14
}
},
{
"filename": "rock",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 224,
"w": 32,
"h": 14
}
},
{
"filename": "steel",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 238,
"w": 32,
"h": 14
}
},
{
"filename": "water",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 252,
"w": 32,
"h": 14
}
},
{
"filename": "stellar",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 32,
"h": 14
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 32,
"h": 14
},
"frame": {
"x": 0,
"y": 266,
"w": 32,
"h": 14
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$"
}
}

BIN
public/images/types_tr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -1 +1 @@
Subproject commit e9ccbadb6eaa3b797f3dec919745befda2ec74bd
Subproject commit 4dab23d6a78b6cf32db43c9953e3c2000f448007

View File

@ -7425,7 +7425,12 @@ export function initAbilities() {
.uncopiable()
.attr(NoTransformAbilityAbAttr),
new Ability(Abilities.GOOD_AS_GOLD, 9)
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS && ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget))
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) =>
pokemon !== attacker
&& move.category === MoveCategory.STATUS
&& ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget)
)
.edgeCase() // Heal Bell should not cure the status of a Pokemon with Good As Gold
.ignorable(),
new Ability(Abilities.VESSEL_OF_RUIN, 9)
.attr(FieldMultiplyStatAbAttr, Stat.SPATK, 0.75)

View File

@ -0,0 +1,9 @@
export enum DropDownColumn {
GEN,
TYPES,
BIOME,
CAUGHT,
UNLOCKS,
MISC,
SORT
}

View File

@ -7,7 +7,7 @@ import type PokemonSpecies from "./data/pokemon-species";
import { allSpecies } from "./data/pokemon-species";
import type { Arena } from "./field/arena";
import Overrides from "#app/overrides";
import { randSeedInt, randSeedItem } from "#app/utils/common";
import { isNullOrUndefined, randSeedInt, randSeedItem } from "#app/utils/common";
import { Biome } from "#enums/biome";
import { Species } from "#enums/species";
import { Challenges } from "./enums/challenges";
@ -124,16 +124,20 @@ export class GameMode implements GameModeConfig {
/**
* @returns either:
* - random biome for Daily mode
* - override from overrides.ts
* - random biome for Daily mode
* - Town
*/
getStartingBiome(): Biome {
if (!isNullOrUndefined(Overrides.STARTING_BIOME_OVERRIDE)) {
return Overrides.STARTING_BIOME_OVERRIDE;
}
switch (this.modeId) {
case GameModes.DAILY:
return getDailyStartingBiome();
default:
return Overrides.STARTING_BIOME_OVERRIDE || Biome.TOWN;
return Biome.TOWN;
}
}

View File

@ -73,7 +73,7 @@ class DefaultOverrides {
*/
readonly BATTLE_STYLE_OVERRIDE: BattleStyle | null = null;
readonly STARTING_WAVE_OVERRIDE: number = 0;
readonly STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
readonly STARTING_BIOME_OVERRIDE: Biome | null = null;
readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null;
/** Multiplies XP gained by this value including 0. Set to null to ignore the override. */
readonly XP_MULTIPLIER_OVERRIDE: number | null = null;

View File

@ -65,14 +65,14 @@ const fonts: Array<LoadingFontFaceProperty> = [
unicodeRange: rangesByLanguage.chinese,
}),
extraOptions: { sizeAdjust: "70%", format: "woff2" },
only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca"],
only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca", "da", "tr", "ro", "ru"],
},
{
face: new FontFace("pkmnems", "url(./fonts/unifont-15.1.05.subset.woff2)", {
unicodeRange: rangesByLanguage.chinese,
}),
extraOptions: { format: "woff2" },
only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca"],
only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca", "da", "tr", "ro", "ru"],
},
// japanese
{
@ -174,7 +174,7 @@ export async function initI18n(): Promise<void> {
"es-MX": ["es-ES", "en"],
default: ["en"],
},
supportedLngs: ["en", "es-ES", "es-MX", "fr", "it", "de", "zh-CN", "zh-TW", "pt-BR", "ko", "ja", "ca-ES"],
supportedLngs: ["en", "es-ES", "es-MX", "fr", "it", "de", "zh-CN", "zh-TW", "pt-BR", "ko", "ja", "ca", "da", "tr", "ro", "ru"],
backend: {
loadPath(lng: string, [ns]: string[]) {
let fileName: string;

View File

@ -193,35 +193,35 @@ export const Setting: Array<Setting> = [
options: [
{
value: "1",
label: "1x",
label: i18next.t("settings:gameSpeed1x"),
},
{
value: "1.25",
label: "1.25x",
label: i18next.t("settings:gameSpeed1_25x"),
},
{
value: "1.5",
label: "1.5x",
label: i18next.t("settings:gameSpeed1_5x"),
},
{
value: "2",
label: "2x",
label: i18next.t("settings:gameSpeed2x"),
},
{
value: "2.5",
label: "2.5x",
label: i18next.t("settings:gameSpeed2_5x"),
},
{
value: "3",
label: "3x",
label: i18next.t("settings:gameSpeed3x"),
},
{
value: "4",
label: "4x",
label: i18next.t("settings:gameSpeed4x"),
},
{
value: "5",
label: "5x",
label: i18next.t("settings:gameSpeed5x"),
},
],
default: 3,
@ -921,10 +921,6 @@ export function setSetting(setting: string, value: number): boolean {
label: "Español (LATAM)",
handler: () => changeLocaleHandler("es-MX"),
},
{
label: "Italiano",
handler: () => changeLocaleHandler("it"),
},
{
label: "Français",
handler: () => changeLocaleHandler("fr"),
@ -933,18 +929,14 @@ export function setSetting(setting: string, value: number): boolean {
label: "Deutsch",
handler: () => changeLocaleHandler("de"),
},
{
label: "Italiano",
handler: () => changeLocaleHandler("it"),
},
{
label: "Português (BR)",
handler: () => changeLocaleHandler("pt-BR"),
},
{
label: "简体中文",
handler: () => changeLocaleHandler("zh-CN"),
},
{
label: "繁體中文",
handler: () => changeLocaleHandler("zh-TW"),
},
{
label: "한국어",
handler: () => changeLocaleHandler("ko"),
@ -954,8 +946,32 @@ export function setSetting(setting: string, value: number): boolean {
handler: () => changeLocaleHandler("ja"),
},
{
label: "Català",
handler: () => changeLocaleHandler("ca-ES"),
label: "简体中文",
handler: () => changeLocaleHandler("zh-CN"),
},
{
label: "繁體中文",
handler: () => changeLocaleHandler("zh-TW"),
},
{
label: "Català (Needs Help)",
handler: () => changeLocaleHandler("ca"),
},
{
label: "Türkçe (Needs Help)",
handler: () => changeLocaleHandler("tr")
},
{
label: "Русский (Needs Help)",
handler: () => changeLocaleHandler("ru"),
},
{
label: "Dansk (Needs Help)",
handler: () => changeLocaleHandler("da")
},
{
label: "Română (Needs Help)",
handler: () => changeLocaleHandler("ro")
},
{
label: i18next.t("settings:back"),

View File

@ -230,7 +230,7 @@ export default abstract class BattleInfo extends Phaser.GameObjects.Container {
this.box = globalScene.add.sprite(0, 0, this.getTextureName()).setName("box").setOrigin(1, 0.5);
this.add(this.box);
this.nameText = addTextObject(player ? -115 : -124, player ? -15.2 : -11.2, "", TextStyle.BATTLE_INFO)
this.nameText = addTextObject(posParams.nameTextX, posParams.nameTextY, "", TextStyle.BATTLE_INFO)
.setName("text_name")
.setOrigin(0);
this.add(this.nameText);

View File

@ -29,7 +29,7 @@ export class EnemyBattleInfo extends BattleInfo {
}
override getTextureName(): string {
return this.boss ? "pbinfo_enemy_boss_mini" : "pbinfo_enemy_mini";
return this.boss ? "pbinfo_enemy_boss" : "pbinfo_enemy_mini";
}
override constructTypeIcons(): void {

View File

@ -43,14 +43,13 @@ export default class EggCounterContainer extends Phaser.GameObjects.Container {
this.add(this.eggCountWindow);
const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0");
eggSprite.setScale(0.32);
const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0").setScale(0.32);
this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" });
this.eggCountText.setName("text-egg-count");
this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }).setName(
"text-egg-count",
);
this.add(eggSprite);
this.add(this.eggCountText);
this.add([eggSprite, this.eggCountText]);
}
/**

View File

@ -22,18 +22,12 @@ export default class EvolutionSceneHandler extends MessageUiHandler {
const ui = this.getUi();
this.evolutionContainer = globalScene.add.container(0, -globalScene.game.canvas.height / 6);
ui.add(this.evolutionContainer);
const messageBg = globalScene.add.sprite(0, 0, "bg", globalScene.windowType);
messageBg.setOrigin(0, 1);
messageBg.setVisible(false);
ui.add(messageBg);
const messageBg = globalScene.add.sprite(0, 0, "bg", globalScene.windowType).setOrigin(0, 1).setVisible(false);
this.messageBg = messageBg;
this.messageContainer = globalScene.add.container(12, -39);
this.messageContainer.setVisible(false);
ui.add(this.messageContainer);
this.messageContainer = globalScene.add.container(12, -39).setVisible(false);
const message = addTextObject(0, 0, "", TextStyle.MESSAGE, {
maxLines: 2,
@ -43,6 +37,8 @@ export default class EvolutionSceneHandler extends MessageUiHandler {
});
this.messageContainer.add(message);
ui.add([this.evolutionContainer, this.messageBg, this.messageContainer]);
this.message = message;
this.initPromptSprite(this.messageContainer);
@ -52,10 +48,8 @@ export default class EvolutionSceneHandler extends MessageUiHandler {
super.show(_args);
globalScene.ui.bringToTop(this.evolutionContainer);
globalScene.ui.bringToTop(this.messageBg);
globalScene.ui.bringToTop(this.messageContainer);
this.messageBg.setVisible(true);
this.messageContainer.setVisible(true);
globalScene.ui.bringToTop(this.messageBg.setVisible(true));
globalScene.ui.bringToTop(this.messageContainer.setVisible(true));
return true;
}

View File

@ -292,7 +292,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle {
this.accuracyText.setVisible(hasMove);
this.moveCategoryIcon.setVisible(hasMove);
this.cursorObj.setPosition(13 + (cursor % 2 === 1 ? 100 : 0), -31 + (cursor >= 2 ? 15 : 0));
this.cursorObj.setPosition(13 + (cursor % 2 === 1 ? 114 : 0), -31 + (cursor >= 2 ? 15 : 0));
return changed;
}
@ -322,7 +322,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle {
const moveset = pokemon.getMoveset();
for (let moveIndex = 0; moveIndex < 4; moveIndex++) {
const moveText = addTextObject(moveIndex % 2 === 0 ? 0 : 100, moveIndex < 2 ? 0 : 16, "-", TextStyle.WINDOW);
const moveText = addTextObject(moveIndex % 2 === 0 ? 0 : 114, moveIndex < 2 ? 0 : 16, "-", TextStyle.WINDOW);
moveText.setName("text-empty-move");
if (moveIndex < moveset.length) {

View File

@ -5,16 +5,7 @@ import { addTextObject, getTextColor, TextStyle } from "./text";
import type { UiTheme } from "#enums/ui-theme";
import { addWindow, WindowVariant } from "./ui-theme";
import { globalScene } from "#app/global-scene";
export enum DropDownColumn {
GEN,
TYPES,
BIOME,
CAUGHT,
UNLOCKS,
MISC,
SORT,
}
import type { DropDownColumn } from "#enums/drop-down-column";
export class FilterBar extends Phaser.GameObjects.Container {
private window: Phaser.GameObjects.NineSlice;
@ -49,13 +40,9 @@ export class FilterBar extends Phaser.GameObjects.Container {
this.cursorOffset = cursorOffset;
this.window = addWindow(0, 0, width, height, false, false, undefined, undefined, WindowVariant.THIN);
this.add(this.window);
this.cursorObj = globalScene.add.image(1, 1, "cursor");
this.cursorObj.setScale(0.5);
this.cursorObj.setVisible(false);
this.cursorObj.setOrigin(0, 0);
this.add(this.cursorObj);
this.cursorObj = globalScene.add.image(1, 1, "cursor").setScale(0.5).setVisible(false).setOrigin(0);
this.add([this.window, this.cursorObj]);
}
/**

View File

@ -23,7 +23,8 @@ import type { Species } from "#enums/species";
import { Button } from "#enums/buttons";
import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown";
import { PokedexMonContainer } from "#app/ui/pokedex-mon-container";
import { DropDownColumn, FilterBar } from "#app/ui/filter-bar";
import { FilterBar } from "#app/ui/filter-bar";
import { DropDownColumn } from "#enums/drop-down-column";
import { ScrollBar } from "#app/ui/scroll-bar";
import { Abilities } from "#enums/abilities";
import {

View File

@ -39,12 +39,6 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler
label: "Español (LATAM)",
};
break;
case "it":
this.settings[languageIndex].options[0] = {
value: "Italiano",
label: "Italiano",
};
break;
case "fr":
this.settings[languageIndex].options[0] = {
value: "Français",
@ -57,24 +51,18 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler
label: "Deutsch",
};
break;
case "it":
this.settings[languageIndex].options[0] = {
value: "Italiano",
label: "Italiano",
};
break;
case "pt-BR":
this.settings[languageIndex].options[0] = {
value: "Português (BR)",
label: "Português (BR)",
};
break;
case "zh-CN":
this.settings[languageIndex].options[0] = {
value: "简体中文",
label: "简体中文",
};
break;
case "zh-TW":
this.settings[languageIndex].options[0] = {
value: "繁體中文",
label: "繁體中文",
};
break;
case "ko":
case "ko-KR":
this.settings[languageIndex].options[0] = {
@ -88,10 +76,46 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler
label: "日本語",
};
break;
case "ca-ES":
case "zh-CN":
this.settings[languageIndex].options[0] = {
value: "简体中文",
label: "简体中文",
};
break;
case "zh-TW":
this.settings[languageIndex].options[0] = {
value: "繁體中文",
label: "繁體中文",
};
break;
case "ca":
this.settings[languageIndex].options[0] = {
value: "Català",
label: "Català",
label: "Català (Needs Help)",
};
break;
case "tr":
this.settings[languageIndex].options[0] = {
value: "Türkçe",
label: "Türkçe (Needs Help)",
};
break;
case "ru":
this.settings[languageIndex].options[0] = {
value: "Русский",
label: "Русский (Needs Help)",
};
break;
case "da":
this.settings[languageIndex].options[0] = {
value: "Dansk",
label: "Dansk (Needs Help)",
};
break;
case "ro":
this.settings[languageIndex].options[0] = {
value: "Română",
label: "Română (Needs Help)",
};
break;
default:

View File

@ -53,7 +53,8 @@ import { Button } from "#enums/buttons";
import { EggSourceType } from "#enums/egg-source-types";
import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown";
import { StarterContainer } from "#app/ui/starter-container";
import { DropDownColumn, FilterBar } from "#app/ui/filter-bar";
import { FilterBar } from "#app/ui/filter-bar";
import { DropDownColumn } from "#enums/drop-down-column";
import { ScrollBar } from "#app/ui/scroll-bar";
import { SelectChallengePhase } from "#app/phases/select-challenge-phase";
import { EncounterPhase } from "#app/phases/encounter-phase";
@ -161,6 +162,24 @@ const languageSettings: { [key: string]: LanguageSetting } = {
starterInfoYOffset: 0.5,
starterInfoXPos: 29,
},
da:{
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
tr:{
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
ro:{
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
ru: {
starterInfoTextSize: "46px",
instructionTextSize: "38px",
starterInfoYOffset: 0.5,
starterInfoXPos: 26,
},
};
const valueReductionMax = 2;

View File

@ -1239,7 +1239,7 @@ export default class SummaryUiHandler extends UiHandler {
this.moveSelect = true;
this.extraMoveRowContainer.setVisible(true);
this.selectedMoveIndex = -1;
this.setCursor(0);
this.setCursor(this.summaryUiMode === SummaryUiMode.LEARN_MOVE ? 4 : 0);
this.showMoveEffect();
}

View File

@ -435,14 +435,18 @@ export function hasAllLocalizedSprites(lang?: string): boolean {
case "es-ES":
case "es-MX":
case "fr":
case "da":
case "de":
case "it":
case "zh-CN":
case "zh-TW":
case "pt-BR":
case "ro":
case "tr":
case "ko":
case "ja":
case "ca-ES":
case "ca":
case "ru":
return true;
default:
return false;

View File

@ -40,7 +40,7 @@ describe("Moves - Aroma Veil", () => {
game.move.select(Moves.GROWL);
game.move.select(Moves.GROWL);
await game.forceEnemyMove(Moves.HEAL_BLOCK);
await game.move.selectEnemyMove(Moves.HEAL_BLOCK);
await game.toNextTurn();
party.forEach(p => {
expect(p.getTag(BattlerTagType.HEAL_BLOCK)).toBeUndefined();
@ -54,8 +54,8 @@ describe("Moves - Aroma Veil", () => {
game.move.select(Moves.GROWL);
game.move.select(Moves.GROWL, 1);
await game.forceEnemyMove(Moves.IMPRISON, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.IMPRISON, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
expect(game.scene.arena.getTag(ArenaTagType.IMPRISON)).toBeDefined();
party.forEach(p => {

View File

@ -24,11 +24,12 @@ describe("Abilities - Aura Break", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("single");
game.override.moveset([Moves.MOONBLAST, Moves.DARK_PULSE, Moves.MOONBLAST, Moves.DARK_PULSE]);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.AURA_BREAK);
game.override.enemySpecies(Species.SHUCKLE);
game.override
.battleStyle("single")
.moveset([Moves.MOONBLAST, Moves.DARK_PULSE])
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.AURA_BREAK)
.enemySpecies(Species.SHUCKLE);
});
it("reverses the effect of Fairy Aura", async () => {

View File

@ -39,7 +39,7 @@ describe("Abilities - Battery", () => {
vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.PIKACHU, Species.CHARJABUG]);
await game.classicMode.startBattle([Species.PIKACHU, Species.CHARJABUG]);
game.move.select(Moves.DAZZLING_GLEAM);
game.move.select(Moves.SPLASH, 1);
@ -54,7 +54,7 @@ describe("Abilities - Battery", () => {
vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.PIKACHU, Species.CHARJABUG]);
await game.classicMode.startBattle([Species.PIKACHU, Species.CHARJABUG]);
game.move.select(Moves.BREAKING_SWIPE);
game.move.select(Moves.SPLASH, 1);
@ -69,7 +69,7 @@ describe("Abilities - Battery", () => {
vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.CHARJABUG, Species.PIKACHU]);
await game.classicMode.startBattle([Species.CHARJABUG, Species.PIKACHU]);
game.move.select(Moves.DAZZLING_GLEAM);
game.move.select(Moves.SPLASH, 1);

View File

@ -59,8 +59,8 @@ describe("Abilities - Commander", () => {
expect(game.scene.currentBattle.turnCommands[0]?.skip).toBeTruthy();
// Force both enemies to target the Tatsugiri
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.phaseInterceptor.to("BerryPhase", false);
game.scene.getEnemyField().forEach(enemy => expect(enemy.getLastXMoves(1)[0].result).toBe(MoveResult.MISS));
@ -100,8 +100,8 @@ describe("Abilities - Commander", () => {
expect(game.scene.currentBattle.turnCommands[0]?.skip).toBeTruthy();
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER]);
@ -183,8 +183,8 @@ describe("Abilities - Commander", () => {
expect(game.scene.currentBattle.turnCommands[0]?.skip).toBeTruthy();
await game.forceEnemyMove(Moves.WHIRLWIND, BattlerIndex.PLAYER_2);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.WHIRLWIND, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH);
// Test may time out here if Whirlwind forced out a Pokemon
await game.phaseInterceptor.to("TurnEndPhase");

View File

@ -54,10 +54,7 @@ describe("Abilities - Contrary", () => {
});
it("should block negative effects", async () => {
game.override
.enemyPassiveAbility(Abilities.CLEAR_BODY)
.enemyMoveset([Moves.HOWL, Moves.HOWL, Moves.HOWL, Moves.HOWL])
.moveset([Moves.SPLASH]);
game.override.enemyPassiveAbility(Abilities.CLEAR_BODY).enemyMoveset(Moves.HOWL).moveset([Moves.SPLASH]);
await game.classicMode.startBattle([Species.SLOWBRO]);
const enemyPokemon = game.scene.getEnemyPokemon()!;

View File

@ -33,7 +33,7 @@ describe("Abilities - COSTAR", () => {
test("ability copies positive stat stages", async () => {
game.override.enemyAbility(Abilities.BALL_FETCH);
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
let [leftPokemon, rightPokemon] = game.scene.getPlayerField();
@ -58,7 +58,7 @@ describe("Abilities - COSTAR", () => {
test("ability copies negative stat stages", async () => {
game.override.enemyAbility(Abilities.INTIMIDATE);
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
let [leftPokemon, rightPokemon] = game.scene.getPlayerField();

View File

@ -76,7 +76,7 @@ describe("Abilities - Cud Chew", () => {
farigiraf.hp = farigiraf.getMaxHp() / 2 - 1;
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase");
// doesn't trigger since cud chew hasn't eaten berry yet
@ -86,7 +86,7 @@ describe("Abilities - Cud Chew", () => {
// get heal pulsed back to full before the cud chew proc
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.HEAL_PULSE);
await game.move.selectEnemyMove(Moves.HEAL_PULSE);
await game.phaseInterceptor.to("TurnEndPhase");
// globalScene.queueAbilityDisplay should be called twice:

View File

@ -77,8 +77,8 @@ describe("Abilities - Dancer", () => {
game.move.select(Moves.REVELATION_DANCE, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2);
game.move.select(Moves.FIERY_DANCE, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2);
await game.forceEnemyMove(Moves.INSTRUCT, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.MIRROR_MOVE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.INSTRUCT, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.MIRROR_MOVE, BattlerIndex.PLAYER);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to("MovePhase"); // Oricorio rev dance
await game.phaseInterceptor.to("MovePhase"); // Feebas fiery dance

View File

@ -50,8 +50,8 @@ describe("Abilities - Desolate Land", () => {
game.move.select(Moves.SPLASH, 0, 2);
game.move.select(Moves.SPLASH, 1, 2);
await game.forceEnemyMove(Moves.ROAR, 0);
await game.forceEnemyMove(Moves.SPLASH, 1);
await game.move.selectEnemyMove(Moves.ROAR, 0);
await game.move.selectEnemyMove(Moves.SPLASH, 1);
await game.phaseInterceptor.to("TurnEndPhase");
@ -66,8 +66,8 @@ describe("Abilities - Desolate Land", () => {
game.move.select(Moves.SPLASH, 0, 2);
game.move.select(Moves.SPLASH, 1, 2);
await game.forceEnemyMove(Moves.ROAR, 1);
await game.forceEnemyMove(Moves.SPLASH, 0);
await game.move.selectEnemyMove(Moves.ROAR, 1);
await game.move.selectEnemyMove(Moves.SPLASH, 0);
await game.phaseInterceptor.to("TurnEndPhase");
@ -103,8 +103,8 @@ describe("Abilities - Desolate Land", () => {
game.move.select(Moves.SPLASH, 0, 2);
game.move.select(Moves.SPLASH, 1, 2);
await game.forceEnemyMove(Moves.MEMENTO, 0);
await game.forceEnemyMove(Moves.MEMENTO, 1);
await game.move.selectEnemyMove(Moves.MEMENTO, 0);
await game.move.selectEnemyMove(Moves.MEMENTO, 1);
await game.phaseInterceptor.to("TurnEndPhase");

View File

@ -67,8 +67,8 @@ describe("Abilities - Flower Gift", () => {
// turn 1
game.move.select(Moves.SUNNY_DAY, 0);
game.move.select(ally_move, 1, ally_target);
await game.forceEnemyMove(enemy_move, BattlerIndex.PLAYER_2);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(enemy_move, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH);
// Ensure sunny day is used last.
await game.setTurnOrder([attacker_index, target_index, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to(TurnEndPhase);
@ -79,8 +79,8 @@ describe("Abilities - Flower Gift", () => {
// turn 2. Make target use recover to reset hp calculation.
game.move.select(Moves.SPLASH, 0, target_index);
game.move.select(ally_move, 1, ally_target);
await game.forceEnemyMove(enemy_move, BattlerIndex.PLAYER_2);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(enemy_move, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY_2, target_index, attacker_index]);
await game.phaseInterceptor.to(TurnEndPhase);
const damageWithGift = initialHp - target.hp;

View File

@ -49,7 +49,7 @@ describe("Abilities - Flower Veil", () => {
await game.classicMode.startBattle([Species.BULBASAUR]);
const user = game.scene.getPlayerPokemon()!;
game.move.select(Moves.REST);
await game.forceEnemyMove(Moves.TACKLE);
await game.move.selectEnemyMove(Moves.TACKLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextTurn();
expect(user.status?.effect).toBe(StatusEffect.SLEEP);
@ -57,7 +57,7 @@ describe("Abilities - Flower Veil", () => {
// remove sleep status so we can get burn from the orb
user.resetStatus();
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
expect(user.status?.effect).toBe(StatusEffect.BURN);
});
@ -71,8 +71,8 @@ describe("Abilities - Flower Veil", () => {
vi.spyOn(ally, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]);
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.YAWN, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.YAWN, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.YAWN, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.YAWN, BattlerIndex.PLAYER_2);
await game.phaseInterceptor.to("BerryPhase");
const user = game.scene.getPlayerPokemon()!;
@ -86,7 +86,7 @@ describe("Abilities - Flower Veil", () => {
await game.classicMode.startBattle([Species.BULBASAUR]);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.THUNDER_WAVE);
await game.move.selectEnemyMove(Moves.THUNDER_WAVE);
await game.toNextTurn();
expect(game.scene.getPlayerPokemon()!.status).toBeUndefined();
vi.spyOn(allMoves[Moves.THUNDER_WAVE], "accuracy", "get").mockClear();
@ -101,8 +101,8 @@ describe("Abilities - Flower Veil", () => {
vi.spyOn(ally, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]);
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER_2);
await game.phaseInterceptor.to("BerryPhase");
expect(user.status?.effect).toBe(StatusEffect.PARALYSIS);
expect(ally.status?.effect).toBe(StatusEffect.PARALYSIS);

View File

@ -30,7 +30,7 @@ describe("Abilities - Forecast", () => {
*/
const testWeatherFormChange = async (game: GameManager, weather: WeatherType, form: number, initialForm?: number) => {
game.override.weather(weather).starterForms({ [Species.CASTFORM]: initialForm });
await game.startBattle([Species.CASTFORM]);
await game.classicMode.startBattle([Species.CASTFORM]);
game.move.select(Moves.SPLASH);
@ -44,7 +44,7 @@ describe("Abilities - Forecast", () => {
*/
const testRevertFormAgainstAbility = async (game: GameManager, ability: Abilities) => {
game.override.starterForms({ [Species.CASTFORM]: SUNNY_FORM }).enemyAbility(ability);
await game.startBattle([Species.CASTFORM]);
await game.classicMode.startBattle([Species.CASTFORM]);
game.move.select(Moves.SPLASH);
@ -81,7 +81,7 @@ describe("Abilities - Forecast", () => {
[Species.GROUDON]: 1,
[Species.RAYQUAZA]: 1,
});
await game.startBattle([
await game.classicMode.startBattle([
Species.CASTFORM,
Species.FEEBAS,
Species.KYOGRE,
@ -201,7 +201,7 @@ describe("Abilities - Forecast", () => {
it("has no effect on Pokémon other than Castform", async () => {
game.override.enemyAbility(Abilities.FORECAST).enemySpecies(Species.SHUCKLE);
await game.startBattle([Species.CASTFORM]);
await game.classicMode.startBattle([Species.CASTFORM]);
game.move.select(Moves.RAIN_DANCE);
await game.phaseInterceptor.to(TurnEndPhase);
@ -212,7 +212,7 @@ describe("Abilities - Forecast", () => {
it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => {
game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN);
await game.startBattle([Species.CASTFORM, Species.PIKACHU]);
await game.classicMode.startBattle([Species.CASTFORM, Species.PIKACHU]);
const castform = game.scene.getPlayerPokemon()!;
expect(castform.formIndex).toBe(RAINY_FORM);
@ -243,7 +243,7 @@ describe("Abilities - Forecast", () => {
it("does not change Castform's form until after Stealth Rock deals damage", async () => {
game.override.weather(WeatherType.RAIN).enemyMoveset([Moves.STEALTH_ROCK]);
await game.startBattle([Species.PIKACHU, Species.CASTFORM]);
await game.classicMode.startBattle([Species.PIKACHU, Species.CASTFORM]);
// First turn - set up stealth rock
game.move.select(Moves.SPLASH);
@ -267,7 +267,7 @@ describe("Abilities - Forecast", () => {
it("should be in Normal Form after the user is switched out", async () => {
game.override.weather(WeatherType.RAIN);
await game.startBattle([Species.CASTFORM, Species.MAGIKARP]);
await game.classicMode.startBattle([Species.CASTFORM, Species.MAGIKARP]);
const castform = game.scene.getPlayerPokemon()!;
expect(castform.formIndex).toBe(RAINY_FORM);

View File

@ -43,8 +43,8 @@ describe("Moves - Friend Guard", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
// Get the last return value from `getAttackDamage`
@ -60,8 +60,8 @@ describe("Moves - Friend Guard", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
// Get the last return value from `getAttackDamage`
@ -83,8 +83,8 @@ describe("Moves - Friend Guard", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
const turn1Damage = spy.mock.results[spy.mock.results.length - 1].value.damage;
@ -93,8 +93,8 @@ describe("Moves - Friend Guard", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
const turn2Damage = spy.mock.results[spy.mock.results.length - 1].value.damage;
@ -109,8 +109,8 @@ describe("Moves - Friend Guard", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
const turn1Damage = spy.mock.results[spy.mock.results.length - 1].value.damage;
@ -120,8 +120,8 @@ describe("Moves - Friend Guard", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
const turn2Damage = spy.mock.results[spy.mock.results.length - 1].value.damage;

View File

@ -1,6 +1,6 @@
import { BattlerIndex } from "#app/battle";
import { allAbilities } from "#app/data/data-lists";
import { ArenaTagSide } from "#app/data/arena-tag";
import { allAbilities } from "#app/data/data-lists";
import { ArenaTagType } from "#app/enums/arena-tag-type";
import { BattlerTagType } from "#app/enums/battler-tag-type";
import { Stat } from "#app/enums/stat";
@ -74,8 +74,8 @@ describe("Abilities - Good As Gold", () => {
game.move.select(Moves.SWORDS_DANCE, 0);
game.move.select(Moves.SAFEGUARD, 1);
await game.forceEnemyMove(Moves.STEALTH_ROCK);
await game.forceEnemyMove(Moves.HAZE);
await game.move.selectEnemyMove(Moves.STEALTH_ROCK);
await game.move.selectEnemyMove(Moves.HAZE);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("BerryPhase");
expect(good_as_gold.getAbility().id).toBe(Abilities.GOOD_AS_GOLD);
@ -107,35 +107,33 @@ describe("Abilities - Good As Gold", () => {
expect(game.scene.getPlayerField()[1].getTag(BattlerTagType.HELPING_HAND)).toBeUndefined();
});
it("should block the ally's heal bell, but only if the good as gold user is on the field", async () => {
game.override.battleStyle("double");
game.override.moveset([Moves.HEAL_BELL, Moves.SPLASH]);
game.override.statusEffect(StatusEffect.BURN);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS, Species.ABRA]);
const [good_as_gold, ball_fetch] = game.scene.getPlayerField();
// Force second pokemon to have ball fetch to isolate to a single mon.
vi.spyOn(ball_fetch, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]);
// TODO: re-enable when heal bell is fixed
it.todo("should block the ally's heal bell, but only if the good as gold user is on the field", async () => {
game.override.battleStyle("double").statusEffect(StatusEffect.BURN);
await game.classicMode.startBattle([Species.MILOTIC, Species.FEEBAS, Species.ABRA]);
const [milotic, feebas, abra] = game.scene.getPlayerParty();
game.field.mockAbility(milotic, Abilities.GOOD_AS_GOLD);
game.field.mockAbility(feebas, Abilities.BALL_FETCH);
game.field.mockAbility(abra, Abilities.BALL_FETCH);
// turn 1
game.move.select(Moves.SPLASH, 0);
game.move.select(Moves.HEAL_BELL, 1);
game.move.use(Moves.SPLASH, 0);
game.move.use(Moves.HEAL_BELL, 1);
await game.toNextTurn();
expect(good_as_gold.status?.effect).toBe(StatusEffect.BURN);
expect(milotic.status?.effect).toBe(StatusEffect.BURN);
game.doSwitchPokemon(2);
game.move.select(Moves.HEAL_BELL, 0);
game.move.use(Moves.HEAL_BELL, 1);
await game.toNextTurn();
expect(good_as_gold.status?.effect).toBeUndefined();
expect(milotic.status?.effect).toBeUndefined();
});
it("should not block field targeted effects like rain dance", async () => {
game.override.battleStyle("single");
game.override.enemyMoveset([Moves.RAIN_DANCE]);
game.override.weather(WeatherType.NONE);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(Moves.SPLASH, 0);
game.move.use(Moves.SPLASH, 0);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.RAIN);

View File

@ -39,7 +39,7 @@ describe("Abilities - Gorilla Tactics", () => {
const initialAtkStat = darmanitan.getStat(Stat.ATK);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase");
@ -57,13 +57,13 @@ describe("Abilities - Gorilla Tactics", () => {
// First turn, lock move to Growl
game.move.select(Moves.GROWL);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
// Second turn, Growl is interrupted by Disable
await game.toNextTurn();
game.move.select(Moves.GROWL);
await game.forceEnemyMove(Moves.DISABLE);
await game.move.selectEnemyMove(Moves.DISABLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("TurnEndPhase");

View File

@ -241,13 +241,13 @@ describe("Abilities - Gulp Missile", () => {
await game.classicMode.startBattle([Species.CRAMORANT]);
game.move.select(Moves.SURF);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
expect(game.scene.getPlayerPokemon()!.formIndex).toBe(GULPING_FORM);
game.move.select(Moves.SUBSTITUTE);
await game.forceEnemyMove(Moves.POWER_TRIP);
await game.move.selectEnemyMove(Moves.POWER_TRIP);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toNextTurn();

View File

@ -61,7 +61,7 @@ describe("Abilities - Harvest", () => {
await game.classicMode.startBattle([Species.FEEBAS]);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.NUZZLE);
await game.move.selectEnemyMove(Moves.NUZZLE);
await game.phaseInterceptor.to("BerryPhase");
expect(getPlayerBerries()).toHaveLength(0);
expect(game.scene.getPlayerPokemon()?.battleData.berriesEaten).toHaveLength(1);
@ -87,7 +87,7 @@ describe("Abilities - Harvest", () => {
// Chug a few berries without harvest (should get tracked)
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.NUZZLE);
await game.move.selectEnemyMove(Moves.NUZZLE);
await game.toNextTurn();
expect(milotic.battleData.berriesEaten).toEqual(expect.arrayContaining([BerryType.ENIGMA, BerryType.LUM]));
@ -98,7 +98,7 @@ describe("Abilities - Harvest", () => {
vi.spyOn(PostTurnRestoreBerryAbAttr.prototype, "canApplyPostTurn").mockReturnValueOnce(false);
game.override.ability(Abilities.HARVEST);
game.move.select(Moves.GASTRO_ACID);
await game.forceEnemyMove(Moves.NUZZLE);
await game.move.selectEnemyMove(Moves.NUZZLE);
await game.toNextTurn();
@ -109,7 +109,7 @@ describe("Abilities - Harvest", () => {
// proc a high roll and we _should_ get a berry back!
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
expect(milotic.battleData.berriesEaten).toHaveLength(3);
@ -126,7 +126,7 @@ describe("Abilities - Harvest", () => {
regieleki.hp = 1;
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.doKillOpponents();
await game.phaseInterceptor.to("TurnEndPhase");
@ -154,7 +154,7 @@ describe("Abilities - Harvest", () => {
regieleki.hp = regieleki.getMaxHp() / 4 + 1;
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SUPER_FANG);
await game.move.selectEnemyMove(Moves.SUPER_FANG);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextTurn();
@ -165,7 +165,7 @@ describe("Abilities - Harvest", () => {
// heal up so harvest doesn't proc and kill enemy
game.move.select(Moves.EARTHQUAKE);
await game.forceEnemyMove(Moves.HEAL_PULSE);
await game.move.selectEnemyMove(Moves.HEAL_PULSE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextWave();
@ -191,7 +191,7 @@ describe("Abilities - Harvest", () => {
feebas.battleData.berriesEaten = [BerryType.LUM, BerryType.STARF];
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.phaseInterceptor.to("BerryPhase");
// Force RNG roll to hit the first berry we find that matches.
@ -219,7 +219,7 @@ describe("Abilities - Harvest", () => {
player.battleData.berriesEaten = [BerryType.LUM, BerryType.STARF];
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase");
expectBerriesContaining(...initBerries);
@ -231,7 +231,7 @@ describe("Abilities - Harvest", () => {
await game.classicMode.startBattle([Species.FEEBAS]);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.INCINERATE);
await game.move.selectEnemyMove(Moves.INCINERATE);
await game.phaseInterceptor.to("TurnEndPhase");
expect(game.scene.getPlayerPokemon()?.battleData.berriesEaten).toEqual([]);
@ -242,7 +242,7 @@ describe("Abilities - Harvest", () => {
await game.classicMode.startBattle([Species.FEEBAS]);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.KNOCK_OFF);
await game.move.selectEnemyMove(Moves.KNOCK_OFF);
await game.phaseInterceptor.to("TurnEndPhase");
expect(game.scene.getPlayerPokemon()?.battleData.berriesEaten).toEqual([]);
@ -308,7 +308,7 @@ describe("Abilities - Harvest", () => {
// steal a sitrus and immediately consume it
game.move.select(Moves.FALSE_SWIPE);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.phaseInterceptor.to("BerryPhase");
expect(player.battleData.berriesEaten).toEqual([BerryType.SITRUS]);

View File

@ -38,7 +38,7 @@ describe("Abilities - Heatproof", () => {
});
it("reduces Fire type damage by half", async () => {
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
const initialHP = 1000;
@ -61,7 +61,7 @@ describe("Abilities - Heatproof", () => {
it("reduces Burn damage by half", async () => {
game.override.enemyStatusEffect(StatusEffect.BURN).enemySpecies(Species.ABRA);
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;

View File

@ -34,7 +34,7 @@ describe("Abilities - Hyper Cutter", () => {
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability)
it("only prevents ATK drops", async () => {
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;

View File

@ -106,8 +106,7 @@ describe("Abilities - Ice Face", () => {
});
it("transforms to Ice Face when Hail or Snow starts", async () => {
game.override.moveset([Moves.QUICK_ATTACK]);
game.override.enemyMoveset([Moves.HAIL, Moves.HAIL, Moves.HAIL, Moves.HAIL]);
game.override.moveset([Moves.QUICK_ATTACK]).enemyMoveset(Moves.HAIL);
await game.classicMode.startBattle([Species.MAGIKARP]);
@ -128,8 +127,7 @@ describe("Abilities - Ice Face", () => {
});
it("transforms to Ice Face when summoned on arena with active Snow or Hail", async () => {
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override.moveset([Moves.SNOWSCAPE]);
game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.SNOWSCAPE]);
await game.classicMode.startBattle([Species.EISCUE, Species.NINJASK]);
@ -155,8 +153,7 @@ describe("Abilities - Ice Face", () => {
});
it("will not revert to its Ice Face if there is already Hail when it changes into Noice", async () => {
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override.enemySpecies(Species.SHUCKLE).enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([Species.EISCUE]);
@ -175,7 +172,7 @@ describe("Abilities - Ice Face", () => {
});
it("persists form change when switched out", async () => {
game.override.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK]);
game.override.enemyMoveset(Moves.QUICK_ATTACK);
await game.classicMode.startBattle([Species.EISCUE, Species.MAGIKARP]);

View File

@ -29,17 +29,18 @@ describe("Abilities - Libero", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("single");
game.override.ability(Abilities.LIBERO);
game.override.startingLevel(100);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);
game.override
.battleStyle("single")
.ability(Abilities.LIBERO)
.startingLevel(100)
.enemySpecies(Species.RATTATA)
.enemyMoveset(Moves.ENDURE);
});
test("ability applies and changes a pokemon's type", async () => {
game.override.moveset([Moves.SPLASH]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -54,7 +55,7 @@ describe("Abilities - Libero", () => {
test.skip("ability applies only once per switch in", async () => {
game.override.moveset([Moves.SPLASH, Moves.AGILITY]);
await game.startBattle([Species.MAGIKARP, Species.BULBASAUR]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.BULBASAUR]);
let leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -90,7 +91,7 @@ describe("Abilities - Libero", () => {
test("ability applies correctly even if the pokemon's move has a variable type", async () => {
game.override.moveset([Moves.WEATHER_BALL]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -110,7 +111,7 @@ describe("Abilities - Libero", () => {
game.override.moveset([Moves.TACKLE]);
game.override.passiveAbility(Abilities.REFRIGERATE);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -128,7 +129,7 @@ describe("Abilities - Libero", () => {
test("ability applies correctly even if the pokemon's move calls another move", async () => {
game.override.moveset([Moves.NATURE_POWER]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -143,7 +144,7 @@ describe("Abilities - Libero", () => {
test("ability applies correctly even if the pokemon's move is delayed / charging", async () => {
game.override.moveset([Moves.DIG]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -158,7 +159,7 @@ describe("Abilities - Libero", () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -173,10 +174,9 @@ describe("Abilities - Libero", () => {
});
test("ability applies correctly even if the pokemon's move is protected against", async () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.PROTECT);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -191,7 +191,7 @@ describe("Abilities - Libero", () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemySpecies(Species.GASTLY);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -205,7 +205,7 @@ describe("Abilities - Libero", () => {
test("ability is not applied if pokemon's type is the same as the move's type", async () => {
game.override.moveset([Moves.SPLASH]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -220,7 +220,7 @@ describe("Abilities - Libero", () => {
test("ability is not applied if pokemon is terastallized", async () => {
game.override.moveset([Moves.SPLASH]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -236,7 +236,7 @@ describe("Abilities - Libero", () => {
test("ability is not applied if pokemon uses struggle", async () => {
game.override.moveset([Moves.STRUGGLE]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -250,7 +250,7 @@ describe("Abilities - Libero", () => {
test("ability is not applied if the pokemon's move fails", async () => {
game.override.moveset([Moves.BURN_UP]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -265,7 +265,7 @@ describe("Abilities - Libero", () => {
game.override.moveset([Moves.TRICK_OR_TREAT]);
game.override.enemySpecies(Species.GASTLY);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -279,7 +279,7 @@ describe("Abilities - Libero", () => {
test("ability applies correctly and the pokemon curses itself", async () => {
game.override.moveset([Moves.CURSE]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);

View File

@ -52,7 +52,7 @@ describe("Abilities - Magic Bounce", () => {
game.override.enemyMoveset([Moves.FLY]);
game.move.select(Moves.GROWL);
await game.forceEnemyMove(Moves.FLY);
await game.move.selectEnemyMove(Moves.FLY);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("BerryPhase");
@ -183,7 +183,7 @@ describe("Abilities - Magic Bounce", () => {
// turn 1
game.move.select(Moves.ENCORE);
await game.forceEnemyMove(Moves.TACKLE);
await game.move.selectEnemyMove(Moves.TACKLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextTurn();
expect(enemyPokemon.getTag(BattlerTagType.ENCORE)!["moveId"]).toBe(Moves.TACKLE);
@ -209,7 +209,7 @@ describe("Abilities - Magic Bounce", () => {
// turn 1
game.move.select(Moves.GROWL);
await game.forceEnemyMove(Moves.TACKLE);
await game.move.selectEnemyMove(Moves.TACKLE);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextTurn();
@ -218,7 +218,7 @@ describe("Abilities - Magic Bounce", () => {
// turn 2
game.move.select(Moves.ENCORE);
await game.forceEnemyMove(Moves.TACKLE);
await game.move.selectEnemyMove(Moves.TACKLE);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to("BerryPhase");
expect(enemyPokemon.getTag(BattlerTagType.ENCORE)!["moveId"]).toBe(Moves.TACKLE);
@ -254,7 +254,7 @@ describe("Abilities - Magic Bounce", () => {
vi.spyOn(stomping_tantrum, "calculateBattlePower");
game.move.select(Moves.SPORE);
await game.forceEnemyMove(Moves.CHARM);
await game.move.selectEnemyMove(Moves.CHARM);
await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.getLastXMoves(1)[0].result).toBe("success");
@ -346,7 +346,7 @@ describe("Abilities - Magic Bounce", () => {
game.override.moveset([Moves.TOXIC, Moves.CHARM]);
await game.classicMode.startBattle([Species.BULBASAUR]);
game.move.select(Moves.TOXIC);
await game.forceEnemyMove(Moves.FLY);
await game.move.selectEnemyMove(Moves.FLY);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.getEnemyPokemon()!.status?.effect).toBe(StatusEffect.TOXIC);

View File

@ -46,7 +46,7 @@ describe("Abilities - Magic Guard", () => {
it("ability should prevent damage caused by weather", async () => {
game.override.weather(WeatherType.SANDSTORM);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -70,7 +70,7 @@ describe("Abilities - Magic Guard", () => {
//Toxic keeps track of the turn counters -> important that Magic Guard keeps track of post-Toxic turns
game.override.statusEffect(StatusEffect.POISON);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -91,7 +91,7 @@ describe("Abilities - Magic Guard", () => {
game.override.enemyMoveset([Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED]);
game.override.statusEffect(StatusEffect.POISON);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -110,7 +110,7 @@ describe("Abilities - Magic Guard", () => {
game.override.enemyStatusEffect(StatusEffect.BURN);
game.override.enemyAbility(Abilities.MAGIC_GUARD);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
@ -132,7 +132,7 @@ describe("Abilities - Magic Guard", () => {
game.override.enemyStatusEffect(StatusEffect.TOXIC);
game.override.enemyAbility(Abilities.MAGIC_GUARD);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
@ -159,7 +159,7 @@ describe("Abilities - Magic Guard", () => {
const newTag = getArenaTag(ArenaTagType.SPIKES, 5, Moves.SPIKES, 0, 0, ArenaTagSide.BOTH)!;
game.scene.arena.tags.push(newTag);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SPLASH);
@ -184,7 +184,7 @@ describe("Abilities - Magic Guard", () => {
game.scene.arena.tags.push(playerTag);
game.scene.arena.tags.push(enemyTag);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SPLASH);
@ -206,7 +206,7 @@ describe("Abilities - Magic Guard", () => {
});
it("Magic Guard prevents against damage from volatile status effects", async () => {
await game.startBattle([Species.DUSKULL]);
await game.classicMode.startBattle([Species.DUSKULL]);
game.override.moveset([Moves.CURSE]);
game.override.enemyAbility(Abilities.MAGIC_GUARD);
@ -231,7 +231,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents crash damage", async () => {
game.override.moveset([Moves.HIGH_JUMP_KICK]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -249,7 +249,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from recoil", async () => {
game.override.moveset([Moves.TAKE_DOWN]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -266,7 +266,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard does not prevent damage from Struggle's recoil", async () => {
game.override.moveset([Moves.STRUGGLE]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -284,7 +284,7 @@ describe("Abilities - Magic Guard", () => {
//This tests different move attributes than the recoil tests above
it("Magic Guard prevents self-damage from attacking moves", async () => {
game.override.moveset([Moves.STEEL_BEAM]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -301,7 +301,7 @@ describe("Abilities - Magic Guard", () => {
/*
it("Magic Guard does not prevent self-damage from confusion", async () => {
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(Moves.CHARM);
@ -311,7 +311,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard does not prevent self-damage from non-attacking moves", async () => {
game.override.moveset([Moves.BELLY_DRUM]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -333,7 +333,7 @@ describe("Abilities - Magic Guard", () => {
game.override.enemyMoveset([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]);
game.override.enemyAbility(Abilities.BAD_DREAMS);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -355,7 +355,7 @@ describe("Abilities - Magic Guard", () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyAbility(Abilities.AFTERMATH);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -379,7 +379,7 @@ describe("Abilities - Magic Guard", () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyAbility(Abilities.IRON_BARBS);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -402,7 +402,7 @@ describe("Abilities - Magic Guard", () => {
game.override.moveset([Moves.ABSORB]);
game.override.enemyAbility(Abilities.LIQUID_OOZE);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -425,7 +425,7 @@ describe("Abilities - Magic Guard", () => {
game.override.passiveAbility(Abilities.SOLAR_POWER);
game.override.weather(WeatherType.SUNNY);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);

View File

@ -55,7 +55,7 @@ describe("Abilities - Mimicry", () => {
const playerPokemon = game.scene.getPlayerPokemon();
game.move.select(Moves.TRANSFORM);
await game.forceEnemyMove(Moves.PSYCHIC_TERRAIN);
await game.move.selectEnemyMove(Moves.PSYCHIC_TERRAIN);
await game.toNextTurn();
expect(playerPokemon?.getTypes().includes(PokemonType.PSYCHIC)).toBe(true);
@ -64,7 +64,7 @@ describe("Abilities - Mimicry", () => {
}
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
expect(playerPokemon?.getTypes().includes(PokemonType.ELECTRIC)).toBe(true);
});
@ -75,13 +75,13 @@ describe("Abilities - Mimicry", () => {
const playerPokemon = game.scene.getPlayerPokemon();
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.FORESTS_CURSE);
await game.move.selectEnemyMove(Moves.FORESTS_CURSE);
await game.toNextTurn();
expect(playerPokemon?.summonData.addedType).toBe(PokemonType.GRASS);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.GRASSY_TERRAIN);
await game.move.selectEnemyMove(Moves.GRASSY_TERRAIN);
await game.phaseInterceptor.to("TurnEndPhase");
expect(playerPokemon?.summonData.addedType).toBeNull();

View File

@ -46,7 +46,7 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate, enemy should lose -1 atk
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1);
@ -63,7 +63,7 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate, enemy should lose -1 atk
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(userPokemon.getStatStage(Stat.ATK)).toBe(-1);
@ -82,8 +82,8 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate, enemy should lose -2 atk each
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.toNextTurn();
expect(enemy1.getStatStage(Stat.ATK)).toBe(-2);
@ -104,8 +104,8 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate, enemy should lose -1 atk
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.toNextTurn();
expect(enemy1.getStatStage(Stat.ATK)).toBe(0);
@ -124,7 +124,7 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate and uses tickle, enemy receives -2 atk and -1 defense
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(-1);
@ -144,8 +144,8 @@ describe("Ability - Mirror Armor", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER_2);
await game.toNextTurn();
expect(player1.getStatStage(Stat.ATK)).toBe(0);
@ -168,7 +168,7 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate and uses tickle, enemy receives -2 atk and -1 defense
game.move.select(Moves.TICKLE);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(userPokemon.getStatStage(Stat.DEF)).toBe(-1);
@ -187,7 +187,7 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate and uses tickle, enemy has white smoke, no one loses stats
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0);
@ -206,7 +206,7 @@ describe("Ability - Mirror Armor", () => {
// Enemy has intimidate and uses tickle, enemy has white smoke, no one loses stats
game.move.select(Moves.TICKLE);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0);
@ -224,7 +224,7 @@ describe("Ability - Mirror Armor", () => {
// Enemy uses octolock, player loses stats at end of turn
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.OCTOLOCK, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.OCTOLOCK, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0);
@ -242,7 +242,7 @@ describe("Ability - Mirror Armor", () => {
// Player uses octolock, enemy loses stats at end of turn
game.move.select(Moves.OCTOLOCK);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(userPokemon.getStatStage(Stat.DEF)).toBe(0);
@ -261,7 +261,7 @@ describe("Ability - Mirror Armor", () => {
const userPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(userPokemon.getStatStage(Stat.ATK)).toBe(-1);
@ -276,11 +276,11 @@ describe("Ability - Mirror Armor", () => {
const userPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER);
await game.toNextTurn();
game.doSwitchPokemon(1);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.toNextTurn();
expect(userPokemon.getStatStage(Stat.SPD)).toBe(0);
@ -297,14 +297,14 @@ describe("Ability - Mirror Armor", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.toNextTurn();
game.doSwitchPokemon(2);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.toNextTurn();
expect(enemy1.getStatStage(Stat.SPD)).toBe(-1);

View File

@ -38,7 +38,7 @@ describe("Abilities - Moxie", () => {
it("should raise ATK stat stage by 1 when winning a battle", async () => {
const moveToUse = Moves.AERIAL_ACE;
await game.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]);
await game.classicMode.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]);
const playerPokemon = game.scene.getPlayerPokemon()!;
@ -56,7 +56,7 @@ describe("Abilities - Moxie", () => {
async () => {
game.override.battleStyle("double");
const moveToUse = Moves.AERIAL_ACE;
await game.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]);
await game.classicMode.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]);
const [firstPokemon, secondPokemon] = game.scene.getPlayerField();

View File

@ -24,13 +24,15 @@ describe("Abilities - Mycelium Might", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("single");
game.override.disableCrits();
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.CLEAR_BODY);
game.override.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK]);
game.override.ability(Abilities.MYCELIUM_MIGHT);
game.override.moveset([Moves.QUICK_ATTACK, Moves.BABY_DOLL_EYES]);
game.override
.battleStyle("single")
.disableCrits()
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.CLEAR_BODY)
.enemyMoveset(Moves.QUICK_ATTACK)
.ability(Abilities.MYCELIUM_MIGHT)
.moveset([Moves.QUICK_ATTACK, Moves.BABY_DOLL_EYES]);
});
/**
@ -41,7 +43,7 @@ describe("Abilities - Mycelium Might", () => {
**/
it("will move last in its priority bracket and ignore protective abilities", async () => {
await game.startBattle([Species.REGIELEKI]);
await game.classicMode.startBattle([Species.REGIELEKI]);
const enemyPokemon = game.scene.getEnemyPokemon();
const playerIndex = game.scene.getPlayerPokemon()?.getBattlerIndex();
@ -64,8 +66,8 @@ describe("Abilities - Mycelium Might", () => {
}, 20000);
it("will still go first if a status move that is in a higher priority bracket than the opponent's move is used", async () => {
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
await game.startBattle([Species.REGIELEKI]);
game.override.enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([Species.REGIELEKI]);
const enemyPokemon = game.scene.getEnemyPokemon();
const playerIndex = game.scene.getPlayerPokemon()?.getBattlerIndex();
@ -87,7 +89,7 @@ describe("Abilities - Mycelium Might", () => {
}, 20000);
it("will not affect non-status moves", async () => {
await game.startBattle([Species.REGIELEKI]);
await game.classicMode.startBattle([Species.REGIELEKI]);
const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex();
const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex();

View File

@ -110,16 +110,16 @@ describe("Abilities - Neutralizing Gas", () => {
await game.classicMode.startBattle([Species.ACCELGOR, Species.ACCELGOR]);
game.move.select(Moves.SPLASH, 0);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeDefined(); // Now one neut gas user is left
game.move.select(Moves.SPLASH, 0);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER_2);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER_2);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeUndefined(); // No neut gas users are left

View File

@ -34,7 +34,7 @@ describe("Abilities - Pastel Veil", () => {
});
it("prevents the user and its allies from being afflicted by poison", async () => {
await game.startBattle([Species.MAGIKARP, Species.GALAR_PONYTA]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.GALAR_PONYTA]);
const ponyta = game.scene.getPlayerField()[1];
const magikarp = game.scene.getPlayerField()[0];
ponyta.abilityIndex = 1;
@ -50,7 +50,7 @@ describe("Abilities - Pastel Veil", () => {
});
it("it heals the poisoned status condition of allies if user is sent out into battle", async () => {
await game.startBattle([Species.MAGIKARP, Species.FEEBAS, Species.GALAR_PONYTA]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS, Species.GALAR_PONYTA]);
const ponyta = game.scene.getPlayerParty()[2];
const magikarp = game.scene.getPlayerField()[0];
ponyta.abilityIndex = 1;

View File

@ -64,14 +64,14 @@ describe("Abilities - Perish Song", () => {
const magikarp = game.scene.getEnemyPokemon();
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.PERISH_SONG);
await game.move.selectEnemyMove(Moves.PERISH_SONG);
await game.toNextTurn();
expect(feebas?.summonData.tags[0].turnCount).toBe(3);
expect(magikarp?.summonData.tags[0].turnCount).toBe(3);
game.doSwitchPokemon(1);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
const cursola = game.scene.getPlayerPokemon();
@ -79,7 +79,7 @@ describe("Abilities - Perish Song", () => {
expect(magikarp?.summonData.tags[0].turnCount).toBe(2);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.AQUA_JET);
await game.move.selectEnemyMove(Moves.AQUA_JET);
await game.toNextTurn();
expect(cursola?.summonData.tags.length).toBe(0);
@ -94,7 +94,7 @@ describe("Abilities - Perish Song", () => {
const cursola = game.scene.getPlayerPokemon();
game.move.select(Moves.WHIRLWIND);
await game.forceEnemyMove(Moves.PERISH_SONG);
await game.move.selectEnemyMove(Moves.PERISH_SONG);
await game.toNextTurn();
const magikarp = game.scene.getEnemyPokemon();
@ -102,7 +102,7 @@ describe("Abilities - Perish Song", () => {
expect(magikarp?.summonData.tags.length).toBe(0);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.AQUA_JET);
await game.move.selectEnemyMove(Moves.AQUA_JET);
await game.toNextTurn();
expect(cursola?.summonData.tags[0].turnCount).toBe(2);

View File

@ -25,10 +25,11 @@ describe("Abilities - POWER CONSTRUCT", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH;
game.override.battleStyle("single");
game.override.ability(Abilities.POWER_CONSTRUCT);
game.override.moveset([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override
.battleStyle("single")
.ability(Abilities.POWER_CONSTRUCT)
.moveset([moveToUse])
.enemyMoveset(Moves.TACKLE);
});
test("check if fainted 50% Power Construct Pokemon switches to base form on arena reset", async () => {

View File

@ -39,7 +39,7 @@ describe("Abilities - Power Spot", () => {
vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.REGIELEKI, Species.STONJOURNER]);
await game.classicMode.startBattle([Species.REGIELEKI, Species.STONJOURNER]);
game.move.select(Moves.DAZZLING_GLEAM);
game.move.select(Moves.SPLASH, 1);
await game.phaseInterceptor.to(MoveEffectPhase);
@ -53,7 +53,7 @@ describe("Abilities - Power Spot", () => {
vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.REGIELEKI, Species.STONJOURNER]);
await game.classicMode.startBattle([Species.REGIELEKI, Species.STONJOURNER]);
game.move.select(Moves.BREAKING_SWIPE);
game.move.select(Moves.SPLASH, 1);
await game.phaseInterceptor.to(MoveEffectPhase);
@ -67,7 +67,7 @@ describe("Abilities - Power Spot", () => {
vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.STONJOURNER, Species.REGIELEKI]);
await game.classicMode.startBattle([Species.STONJOURNER, Species.REGIELEKI]);
game.move.select(Moves.BREAKING_SWIPE);
game.move.select(Moves.SPLASH, 1);
await game.phaseInterceptor.to(TurnEndPhase);

View File

@ -29,17 +29,18 @@ describe("Abilities - Protean", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("single");
game.override.ability(Abilities.PROTEAN);
game.override.startingLevel(100);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);
game.override
.battleStyle("single")
.ability(Abilities.PROTEAN)
.startingLevel(100)
.enemySpecies(Species.RATTATA)
.enemyMoveset(Moves.ENDURE);
});
test("ability applies and changes a pokemon's type", async () => {
game.override.moveset([Moves.SPLASH]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -54,7 +55,7 @@ describe("Abilities - Protean", () => {
test.skip("ability applies only once per switch in", async () => {
game.override.moveset([Moves.SPLASH, Moves.AGILITY]);
await game.startBattle([Species.MAGIKARP, Species.BULBASAUR]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.BULBASAUR]);
let leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -90,7 +91,7 @@ describe("Abilities - Protean", () => {
test("ability applies correctly even if the pokemon's move has a variable type", async () => {
game.override.moveset([Moves.WEATHER_BALL]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -110,7 +111,7 @@ describe("Abilities - Protean", () => {
game.override.moveset([Moves.TACKLE]);
game.override.passiveAbility(Abilities.REFRIGERATE);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -128,7 +129,7 @@ describe("Abilities - Protean", () => {
test("ability applies correctly even if the pokemon's move calls another move", async () => {
game.override.moveset([Moves.NATURE_POWER]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -143,7 +144,7 @@ describe("Abilities - Protean", () => {
test("ability applies correctly even if the pokemon's move is delayed / charging", async () => {
game.override.moveset([Moves.DIG]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -158,7 +159,7 @@ describe("Abilities - Protean", () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -173,10 +174,9 @@ describe("Abilities - Protean", () => {
});
test("ability applies correctly even if the pokemon's move is protected against", async () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.PROTECT);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -191,7 +191,7 @@ describe("Abilities - Protean", () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemySpecies(Species.GASTLY);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -205,7 +205,7 @@ describe("Abilities - Protean", () => {
test("ability is not applied if pokemon's type is the same as the move's type", async () => {
game.override.moveset([Moves.SPLASH]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -220,7 +220,7 @@ describe("Abilities - Protean", () => {
test("ability is not applied if pokemon is terastallized", async () => {
game.override.moveset([Moves.SPLASH]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -236,7 +236,7 @@ describe("Abilities - Protean", () => {
test("ability is not applied if pokemon uses struggle", async () => {
game.override.moveset([Moves.STRUGGLE]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -250,7 +250,7 @@ describe("Abilities - Protean", () => {
test("ability is not applied if the pokemon's move fails", async () => {
game.override.moveset([Moves.BURN_UP]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -265,7 +265,7 @@ describe("Abilities - Protean", () => {
game.override.moveset([Moves.TRICK_OR_TREAT]);
game.override.enemySpecies(Species.GASTLY);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);
@ -279,7 +279,7 @@ describe("Abilities - Protean", () => {
test("ability applies correctly and the pokemon curses itself", async () => {
game.override.moveset([Moves.CURSE]);
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
expect(leadPokemon).not.toBe(undefined);

View File

@ -41,7 +41,7 @@ describe("Abilities - Quick Draw", () => {
});
test("makes pokemon going first in its priority bracket", async () => {
await game.startBattle();
await game.classicMode.startBattle();
const pokemon = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!;
@ -63,7 +63,7 @@ describe("Abilities - Quick Draw", () => {
retry: 5,
},
async () => {
await game.startBattle();
await game.classicMode.startBattle();
const pokemon = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!;
@ -83,7 +83,7 @@ describe("Abilities - Quick Draw", () => {
test("does not increase priority", async () => {
game.override.enemyMoveset([Moves.EXTREME_SPEED]);
await game.startBattle();
await game.classicMode.startBattle();
const pokemon = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!;

View File

@ -28,17 +28,19 @@ describe("Abilities - Sand Veil", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.moveset([Moves.SPLASH]);
game.override.enemySpecies(Species.MEOWSCARADA);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset([Moves.TWISTER, Moves.TWISTER, Moves.TWISTER, Moves.TWISTER]);
game.override.startingLevel(100);
game.override.enemyLevel(100);
game.override.weather(WeatherType.SANDSTORM).battleStyle("double");
game.override
.moveset([Moves.SPLASH])
.enemySpecies(Species.MEOWSCARADA)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Moves.TWISTER)
.startingLevel(100)
.enemyLevel(100)
.weather(WeatherType.SANDSTORM)
.battleStyle("double");
});
test("ability should increase the evasiveness of the source", async () => {
await game.startBattle([Species.SNORLAX, Species.BLISSEY]);
await game.classicMode.startBattle([Species.SNORLAX, Species.BLISSEY]);
const leadPokemon = game.scene.getPlayerField();

View File

@ -25,10 +25,7 @@ describe("Abilities - SCHOOLING", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH;
game.override.battleStyle("single");
game.override.ability(Abilities.SCHOOLING);
game.override.moveset([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override.battleStyle("single").ability(Abilities.SCHOOLING).moveset([moveToUse]).enemyMoveset(Moves.TACKLE);
});
test("check if fainted pokemon switches to base form on arena reset", async () => {
@ -39,7 +36,7 @@ describe("Abilities - SCHOOLING", () => {
[Species.WISHIWASHI]: schoolForm,
});
await game.startBattle([Species.MAGIKARP, Species.WISHIWASHI]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.WISHIWASHI]);
const wishiwashi = game.scene.getPlayerParty().find(p => p.species.speciesId === Species.WISHIWASHI)!;
expect(wishiwashi).not.toBe(undefined);

View File

@ -30,10 +30,9 @@ describe("Abilities - Screen Cleaner", () => {
});
it("removes Aurora Veil", async () => {
game.override.moveset([Moves.HAIL]);
game.override.enemyMoveset([Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL]);
game.override.moveset([Moves.HAIL]).enemyMoveset(Moves.AURORA_VEIL);
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.select(Moves.HAIL);
await game.phaseInterceptor.to(TurnEndPhase);
@ -48,9 +47,9 @@ describe("Abilities - Screen Cleaner", () => {
});
it("removes Light Screen", async () => {
game.override.enemyMoveset([Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN]);
game.override.enemyMoveset(Moves.LIGHT_SCREEN);
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
@ -65,9 +64,9 @@ describe("Abilities - Screen Cleaner", () => {
});
it("removes Reflect", async () => {
game.override.enemyMoveset([Moves.REFLECT, Moves.REFLECT, Moves.REFLECT, Moves.REFLECT]);
game.override.enemyMoveset(Moves.REFLECT);
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);

View File

@ -76,7 +76,7 @@ describe("Abilities - SHIELDS DOWN", () => {
await game.classicMode.startBattle([Species.MINIOR]);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.SPORE);
await game.move.selectEnemyMove(Moves.SPORE);
await game.phaseInterceptor.to(TurnEndPhase);
expect(game.scene.getPlayerPokemon()!.status).toBe(undefined);
@ -115,12 +115,12 @@ describe("Abilities - SHIELDS DOWN", () => {
// turn 1
game.move.select(Moves.GRAVITY);
await game.forceEnemyMove(Moves.TOXIC_SPIKES);
await game.move.selectEnemyMove(Moves.TOXIC_SPIKES);
await game.toNextTurn();
// turn 2
game.doSwitchPokemon(1);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.MINIOR);
@ -134,7 +134,7 @@ describe("Abilities - SHIELDS DOWN", () => {
await game.classicMode.startBattle([Species.MAGIKARP, Species.MINIOR]);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.YAWN);
await game.move.selectEnemyMove(Moves.YAWN);
await game.phaseInterceptor.to(TurnEndPhase);
expect(game.scene.getPlayerPokemon()!.findTag(tag => tag.tagType === BattlerTagType.DROWSY)).toBe(undefined);
@ -146,7 +146,7 @@ describe("Abilities - SHIELDS DOWN", () => {
await game.classicMode.startBattle([Species.MINIOR]);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.CONFUSE_RAY);
await game.move.selectEnemyMove(Moves.CONFUSE_RAY);
await game.phaseInterceptor.to(TurnEndPhase);
@ -162,7 +162,7 @@ describe("Abilities - SHIELDS DOWN", () => {
await game.classicMode.startBattle([Species.MINIOR]);
game.move.select(Moves.SPORE);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
expect(game.scene.getEnemyPokemon()!.status?.effect).toBe(StatusEffect.SLEEP);

View File

@ -31,7 +31,7 @@ describe("Abilities - Simple", () => {
});
it("should double stat changes when applied", async () => {
await game.startBattle([Species.SLOWBRO]);
await game.classicMode.startBattle([Species.SLOWBRO]);
const enemyPokemon = game.scene.getEnemyPokemon()!;

View File

@ -42,7 +42,7 @@ describe("Abilities - Stakeout", () => {
const [enemy1] = game.scene.getEnemyParty();
game.move.select(Moves.SURF);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
const damage1 = enemy1.getInverseHp();
enemy1.hp = enemy1.getMaxHp();
@ -65,17 +65,17 @@ describe("Abilities - Stakeout", () => {
const [enemy1] = game.scene.getEnemyParty();
game.move.select(Moves.SURF);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
const damage1 = enemy1.getInverseHp();
enemy1.hp = enemy1.getMaxHp();
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.FLIP_TURN);
await game.move.selectEnemyMove(Moves.FLIP_TURN);
await game.toNextTurn();
game.move.select(Moves.SURF);
await game.forceEnemyMove(Moves.FLIP_TURN);
await game.move.selectEnemyMove(Moves.FLIP_TURN);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.toNextTurn();

View File

@ -22,12 +22,13 @@ describe("Abilities - Stall", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("single");
game.override.disableCrits();
game.override.enemySpecies(Species.REGIELEKI);
game.override.enemyAbility(Abilities.STALL);
game.override.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK]);
game.override.moveset([Moves.QUICK_ATTACK, Moves.TACKLE]);
game.override
.battleStyle("single")
.disableCrits()
.enemySpecies(Species.REGIELEKI)
.enemyAbility(Abilities.STALL)
.enemyMoveset(Moves.QUICK_ATTACK)
.moveset([Moves.QUICK_ATTACK, Moves.TACKLE]);
});
/**
@ -37,7 +38,7 @@ describe("Abilities - Stall", () => {
**/
it("Pokemon with Stall should move last in its priority bracket regardless of speed", async () => {
await game.startBattle([Species.SHUCKLE]);
await game.classicMode.startBattle([Species.SHUCKLE]);
const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex();
const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex();
@ -55,7 +56,7 @@ describe("Abilities - Stall", () => {
}, 20000);
it("Pokemon with Stall will go first if a move that is in a higher priority bracket than the opponent's move is used", async () => {
await game.startBattle([Species.SHUCKLE]);
await game.classicMode.startBattle([Species.SHUCKLE]);
const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex();
const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex();
@ -74,7 +75,7 @@ describe("Abilities - Stall", () => {
it("If both Pokemon have stall and use the same move, speed is used to determine who goes first.", async () => {
game.override.ability(Abilities.STALL);
await game.startBattle([Species.SHUCKLE]);
await game.classicMode.startBattle([Species.SHUCKLE]);
const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex();
const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex();

View File

@ -36,14 +36,14 @@ describe("Abilities - Sturdy", () => {
});
test("Sturdy activates when user is at full HP", async () => {
await game.startBattle();
await game.classicMode.startBattle();
game.move.select(Moves.CLOSE_COMBAT);
await game.phaseInterceptor.to(MoveEndPhase);
expect(game.scene.getEnemyParty()[0].hp).toBe(1);
});
test("Sturdy doesn't activate when user is not at full HP", async () => {
await game.startBattle();
await game.classicMode.startBattle();
const enemyPokemon: EnemyPokemon = game.scene.getEnemyParty()[0];
enemyPokemon.hp = enemyPokemon.getMaxHp() - 1;
@ -56,7 +56,7 @@ describe("Abilities - Sturdy", () => {
});
test("Sturdy pokemon should be immune to OHKO moves", async () => {
await game.startBattle();
await game.classicMode.startBattle();
game.move.select(Moves.FISSURE);
await game.phaseInterceptor.to(MoveEndPhase);
@ -67,7 +67,7 @@ describe("Abilities - Sturdy", () => {
test("Sturdy is ignored by pokemon with `Abilities.MOLD_BREAKER`", async () => {
game.override.ability(Abilities.MOLD_BREAKER);
await game.startBattle();
await game.classicMode.startBattle();
game.move.select(Moves.CLOSE_COMBAT);
await game.phaseInterceptor.to(DamageAnimPhase);

View File

@ -44,7 +44,7 @@ describe("Abilities - Supreme Overlord", () => {
});
it("should increase Power by 20% if 2 Pokemon are fainted in the party", async () => {
await game.startBattle([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE]);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE]);
game.move.select(Moves.EXPLOSION);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);

View File

@ -25,15 +25,16 @@ describe("Abilities - Sweet Veil", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("double");
game.override.moveset([Moves.SPLASH, Moves.REST, Moves.YAWN]);
game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset([Moves.POWDER, Moves.POWDER, Moves.POWDER, Moves.POWDER]);
game.override
.battleStyle("double")
.moveset([Moves.SPLASH, Moves.REST, Moves.YAWN])
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Moves.POWDER);
});
it("prevents the user and its allies from falling asleep", async () => {
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
await game.classicMode.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
@ -45,7 +46,7 @@ describe("Abilities - Sweet Veil", () => {
it("causes Rest to fail when used by the user or its allies", async () => {
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
await game.classicMode.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
game.move.select(Moves.REST, 1);
@ -56,8 +57,8 @@ describe("Abilities - Sweet Veil", () => {
});
it("causes Yawn to fail if used on the user or its allies", async () => {
game.override.enemyMoveset([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]);
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.override.enemyMoveset(Moves.YAWN);
await game.classicMode.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
@ -73,7 +74,7 @@ describe("Abilities - Sweet Veil", () => {
game.override.startingLevel(5);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]);
await game.classicMode.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]);
game.move.select(Moves.SPLASH);
game.move.select(Moves.YAWN, 1, BattlerIndex.PLAYER);

View File

@ -66,10 +66,7 @@ describe("Abilities - Synchronize", () => {
});
it("does not trigger when Pokemon is statused by Toxic Spikes", async () => {
game.override
.ability(Abilities.SYNCHRONIZE)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Array(4).fill(Moves.TOXIC_SPIKES));
game.override.ability(Abilities.SYNCHRONIZE).enemyAbility(Abilities.BALL_FETCH).enemyMoveset(Moves.TOXIC_SPIKES);
await game.classicMode.startBattle([Species.FEEBAS, Species.MILOTIC]);

View File

@ -244,8 +244,8 @@ describe("Abilities - Unburden", () => {
// Turn 1: Treecko gets hit by False Swipe and eats Sitrus Berry, activating Unburden
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.FALSE_SWIPE, 0);
await game.forceEnemyMove(Moves.FALSE_SWIPE, 0);
await game.move.selectEnemyMove(Moves.FALSE_SWIPE, 0);
await game.move.selectEnemyMove(Moves.FALSE_SWIPE, 0);
await game.phaseInterceptor.to("TurnEndPhase");
expect(getHeldItemCount(treecko)).toBeLessThan(playerHeldItems);
@ -302,7 +302,7 @@ describe("Abilities - Unburden", () => {
// Turn 1: Get hit by False Swipe and eat Sitrus Berry, activating Unburden
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.FALSE_SWIPE);
await game.move.selectEnemyMove(Moves.FALSE_SWIPE);
await game.toNextTurn();
expect(getHeldItemCount(playerPokemon)).toBeLessThan(playerHeldItems);
@ -310,7 +310,7 @@ describe("Abilities - Unburden", () => {
// Turn 2: Get hit by Worry Seed, deactivating Unburden
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.WORRY_SEED);
await game.move.selectEnemyMove(Moves.WORRY_SEED);
await game.toNextTurn();
expect(getHeldItemCount(playerPokemon)).toBeLessThan(playerHeldItems);
@ -343,13 +343,13 @@ describe("Abilities - Unburden", () => {
const initialSpeed = treecko.getStat(Stat.SPD);
game.move.select(Moves.SPLASH);
await game.forceEnemyMove(Moves.THIEF);
await game.move.selectEnemyMove(Moves.THIEF);
game.doSelectPartyPokemon(1);
await game.toNextTurn();
game.doRevivePokemon(1);
game.doSwitchPokemon(1);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.toNextTurn();
expect(game.scene.getPlayerPokemon()!).toBe(treecko);
@ -372,8 +372,8 @@ describe("Abilities - Unburden", () => {
game.move.select(Moves.SPLASH);
game.move.select(Moves.REVIVAL_BLESSING, 1);
await game.forceEnemyMove(Moves.THIEF, BattlerIndex.PLAYER);
await game.forceEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.THIEF, BattlerIndex.PLAYER);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2]);
game.doSelectPartyPokemon(0, "RevivalBlessingPhase");
await game.toNextTurn();

View File

@ -24,12 +24,13 @@ describe("Abilities - Unseen Fist", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("single");
game.override.starterSpecies(Species.URSHIFU);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
game.override.startingLevel(100);
game.override.enemyLevel(100);
game.override
.battleStyle("single")
.starterSpecies(Species.URSHIFU)
.enemySpecies(Species.SNORLAX)
.enemyMoveset(Moves.PROTECT)
.startingLevel(100)
.enemyLevel(100);
});
it("should cause a contact move to ignore Protect", async () =>
@ -73,8 +74,7 @@ async function testUnseenFistHitResult(
protectMove: Moves,
shouldSucceed = true,
): Promise<void> {
game.override.moveset([attackMove]);
game.override.enemyMoveset([protectMove, protectMove, protectMove, protectMove]);
game.override.moveset([attackMove]).enemyMoveset(protectMove);
await game.classicMode.startBattle();

View File

@ -544,8 +544,8 @@ describe("Abilities - Wimp Out", () => {
// turn 1
game.move.select(Moves.DRAGON_ENERGY, 0);
game.move.select(Moves.SPLASH, 1);
await game.forceEnemyMove(Moves.SPLASH);
await game.forceEnemyMove(Moves.ENDURE);
await game.move.selectEnemyMove(Moves.SPLASH);
await game.move.selectEnemyMove(Moves.ENDURE);
await game.phaseInterceptor.to("SelectModifierPhase");
expect(game.scene.currentBattle.waveIndex).toBe(wave + 1);

View File

@ -31,7 +31,7 @@ describe("Abilities - Wind Power", () => {
});
it("it becomes charged when hit by wind moves", async () => {
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const shiftry = game.scene.getEnemyPokemon()!;
expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined();
@ -46,7 +46,7 @@ describe("Abilities - Wind Power", () => {
game.override.ability(Abilities.WIND_POWER);
game.override.enemySpecies(Species.MAGIKARP);
await game.startBattle([Species.SHIFTRY]);
await game.classicMode.startBattle([Species.SHIFTRY]);
const shiftry = game.scene.getPlayerPokemon()!;
expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined();
@ -61,7 +61,7 @@ describe("Abilities - Wind Power", () => {
game.override.enemySpecies(Species.MAGIKARP);
game.override.ability(Abilities.WIND_POWER);
await game.startBattle([Species.SHIFTRY]);
await game.classicMode.startBattle([Species.SHIFTRY]);
const magikarp = game.scene.getEnemyPokemon()!;
const shiftry = game.scene.getPlayerPokemon()!;
@ -79,7 +79,7 @@ describe("Abilities - Wind Power", () => {
it("does not interact with Sandstorm", async () => {
game.override.enemySpecies(Species.MAGIKARP);
await game.startBattle([Species.SHIFTRY]);
await game.classicMode.startBattle([Species.SHIFTRY]);
const shiftry = game.scene.getPlayerPokemon()!;
expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined();

View File

@ -36,7 +36,7 @@ describe("Abilities - Wonder Skin", () => {
vi.spyOn(moveToCheck, "calculateBattleAccuracy");
await game.startBattle([Species.PIKACHU]);
await game.classicMode.startBattle([Species.PIKACHU]);
game.move.select(Moves.CHARM);
await game.phaseInterceptor.to(MoveEffectPhase);
@ -48,7 +48,7 @@ describe("Abilities - Wonder Skin", () => {
vi.spyOn(moveToCheck, "calculateBattleAccuracy");
await game.startBattle([Species.PIKACHU]);
await game.classicMode.startBattle([Species.PIKACHU]);
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.to(MoveEffectPhase);

View File

@ -39,7 +39,7 @@ describe("Abilities - ZERO TO HERO", () => {
[Species.PALAFIN]: heroForm,
});
await game.startBattle([Species.FEEBAS, Species.PALAFIN, Species.PALAFIN]);
await game.classicMode.startBattle([Species.FEEBAS, Species.PALAFIN, Species.PALAFIN]);
const palafin1 = game.scene.getPlayerParty()[1];
const palafin2 = game.scene.getPlayerParty()[2];
@ -61,7 +61,7 @@ describe("Abilities - ZERO TO HERO", () => {
});
it("should swap to Hero form when switching out during a battle", async () => {
await game.startBattle([Species.PALAFIN, Species.FEEBAS]);
await game.classicMode.startBattle([Species.PALAFIN, Species.FEEBAS]);
const palafin = game.scene.getPlayerPokemon()!;
expect(palafin.formIndex).toBe(baseForm);
@ -72,7 +72,7 @@ describe("Abilities - ZERO TO HERO", () => {
});
it("should not swap to Hero form if switching due to faint", async () => {
await game.startBattle([Species.PALAFIN, Species.FEEBAS]);
await game.classicMode.startBattle([Species.PALAFIN, Species.FEEBAS]);
const palafin = game.scene.getPlayerPokemon()!;
expect(palafin.formIndex).toBe(baseForm);
@ -89,7 +89,7 @@ describe("Abilities - ZERO TO HERO", () => {
[Species.PALAFIN]: heroForm,
});
await game.startBattle([Species.PALAFIN, Species.FEEBAS]);
await game.classicMode.startBattle([Species.PALAFIN, Species.FEEBAS]);
const palafin = game.scene.getPlayerPokemon()!;
expect(palafin.formIndex).toBe(heroForm);

View File

@ -37,7 +37,7 @@ describe("Weather - Fog", () => {
vi.spyOn(moveToCheck, "calculateBattleAccuracy");
await game.startBattle([Species.MAGIKARP]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.to(MoveEffectPhase);

View File

@ -32,7 +32,7 @@ describe("Battle order", () => {
});
it("opponent faster than player 50 vs 150", async () => {
await game.startBattle([Species.BULBASAUR]);
await game.classicMode.startBattle([Species.BULBASAUR]);
const playerPokemon = game.scene.getPlayerPokemon()!;
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -51,7 +51,7 @@ describe("Battle order", () => {
}, 20000);
it("Player faster than opponent 150 vs 50", async () => {
await game.startBattle([Species.BULBASAUR]);
await game.classicMode.startBattle([Species.BULBASAUR]);
const playerPokemon = game.scene.getPlayerPokemon()!;
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -71,7 +71,7 @@ describe("Battle order", () => {
it("double - both opponents faster than player 50/50 vs 150/150", async () => {
game.override.battleStyle("double");
await game.startBattle([Species.BULBASAUR, Species.BLASTOISE]);
await game.classicMode.startBattle([Species.BULBASAUR, Species.BLASTOISE]);
const playerPokemon = game.scene.getPlayerField();
const enemyPokemon = game.scene.getEnemyField();
@ -95,7 +95,7 @@ describe("Battle order", () => {
it("double - speed tie except 1 - 100/100 vs 100/150", async () => {
game.override.battleStyle("double");
await game.startBattle([Species.BULBASAUR, Species.BLASTOISE]);
await game.classicMode.startBattle([Species.BULBASAUR, Species.BLASTOISE]);
const playerPokemon = game.scene.getPlayerField();
const enemyPokemon = game.scene.getEnemyField();
@ -119,7 +119,7 @@ describe("Battle order", () => {
it("double - speed tie 100/150 vs 100/150", async () => {
game.override.battleStyle("double");
await game.startBattle([Species.BULBASAUR, Species.BLASTOISE]);
await game.classicMode.startBattle([Species.BULBASAUR, Species.BLASTOISE]);
const playerPokemon = game.scene.getPlayerField();
const enemyPokemon = game.scene.getEnemyField();

View File

@ -85,7 +85,7 @@ describe("Test Battle Phase", () => {
}, 20000);
it("newGame one-liner", async () => {
await game.startBattle();
await game.classicMode.startBattle();
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
@ -98,7 +98,7 @@ describe("Test Battle Phase", () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyAbility(Abilities.HYDRATION);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
await game.startBattle();
await game.classicMode.startBattle();
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(SelectModifierPhase, false);
}, 20000);
@ -112,7 +112,7 @@ describe("Test Battle Phase", () => {
game.override.enemyAbility(Abilities.HYDRATION);
game.override.enemyMoveset([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP]);
game.override.battleStyle("single");
await game.startBattle();
await game.classicMode.startBattle();
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false);
}, 20000);
@ -127,7 +127,7 @@ describe("Test Battle Phase", () => {
}, 20000);
it("start battle with selected team", async () => {
await game.startBattle([Species.CHARIZARD, Species.CHANSEY, Species.MEW]);
await game.classicMode.startBattle([Species.CHARIZARD, Species.CHANSEY, Species.MEW]);
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.CHARIZARD);
expect(game.scene.getPlayerParty()[1].species.speciesId).toBe(Species.CHANSEY);
expect(game.scene.getPlayerParty()[2].species.speciesId).toBe(Species.MEW);
@ -207,7 +207,7 @@ describe("Test Battle Phase", () => {
game.override.enemySpecies(Species.MIGHTYENA);
game.override.enemyAbility(Abilities.HYDRATION);
game.override.ability(Abilities.HYDRATION);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
@ -217,7 +217,7 @@ describe("Test Battle Phase", () => {
game.override.enemySpecies(Species.MIGHTYENA);
game.override.enemyAbility(Abilities.HYDRATION);
game.override.ability(Abilities.HYDRATION);
await game.startBattle([Species.BLASTOISE]);
await game.classicMode.startBattle([Species.BLASTOISE]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
@ -228,7 +228,7 @@ describe("Test Battle Phase", () => {
game.override.enemyAbility(Abilities.HYDRATION);
game.override.ability(Abilities.HYDRATION);
game.override.startingWave(3);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
@ -239,7 +239,7 @@ describe("Test Battle Phase", () => {
game.override.enemyAbility(Abilities.HYDRATION);
game.override.ability(Abilities.HYDRATION);
game.override.startingWave(3);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
@ -255,7 +255,7 @@ describe("Test Battle Phase", () => {
game.override.startingWave(3);
game.override.moveset([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
await game.startBattle([Species.DARMANITAN, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.DARMANITAN, Species.CHARIZARD]);
game.move.select(moveToUse);
await game.phaseInterceptor.to(DamageAnimPhase, false);
@ -275,7 +275,7 @@ describe("Test Battle Phase", () => {
game.override.startingWave(3);
game.override.moveset([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
await game.startBattle();
await game.classicMode.startBattle();
const turn = game.scene.currentBattle.turn;
game.move.select(moveToUse);
await game.toNextTurn();
@ -318,7 +318,7 @@ describe("Test Battle Phase", () => {
.enemyMoveset(Moves.SPLASH)
.startingHeldItems([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]);
await game.startBattle();
await game.classicMode.startBattle();
game.scene.getPlayerPokemon()!.hp = 1;
game.move.select(moveToUse);

View File

@ -34,7 +34,7 @@ describe("Double Battles", () => {
// (There were bugs that either only summon one when can summon two, player stuck in switchPhase etc)
it("3v2 edge case: player summons 2 pokemon on the next battle after being fainted and revived", async () => {
game.override.battleStyle("double").enemyMoveset(Moves.SPLASH).moveset(Moves.SPLASH);
await game.startBattle([Species.BULBASAUR, Species.CHARIZARD, Species.SQUIRTLE]);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARIZARD, Species.SQUIRTLE]);
game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH, 1);

View File

@ -188,9 +188,7 @@ describe("Inverse Battle", () => {
});
it("Conversion 2 should change the type to the resistive type - Conversion 2 against Dragonite", async () => {
game.override
.moveset([Moves.CONVERSION_2])
.enemyMoveset([Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW]);
game.override.moveset([Moves.CONVERSION_2]).enemyMoveset(Moves.DRAGON_CLAW);
await game.challengeMode.startBattle();

View File

@ -23,73 +23,74 @@ describe("Test Battle Phase", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.enemySpecies(Species.RATTATA);
game.override.startingLevel(2000);
game.override.moveset([Moves.TACKLE]);
game.override.enemyAbility(Abilities.HYDRATION);
game.override.ability(Abilities.HYDRATION);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override
.enemySpecies(Species.RATTATA)
.startingLevel(2000)
.moveset([Moves.TACKLE])
.enemyAbility(Abilities.HYDRATION)
.ability(Abilities.HYDRATION)
.enemyMoveset(Moves.TACKLE);
});
it("startBattle 2vs1 boss", async () => {
game.override.battleStyle("single").startingWave(10);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 2vs2 boss", async () => {
game.override.battleStyle("double").startingWave(10);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 2vs2 trainer", async () => {
game.override.battleStyle("double").startingWave(5);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 2vs1 trainer", async () => {
game.override.battleStyle("single").startingWave(5);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 2vs1 rival", async () => {
game.override.battleStyle("single").startingWave(8);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 2vs2 rival", async () => {
game.override.battleStyle("double").startingWave(8);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 1vs1 trainer", async () => {
game.override.battleStyle("single").startingWave(5);
await game.startBattle([Species.BLASTOISE]);
await game.classicMode.startBattle([Species.BLASTOISE]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 2vs2 trainer", async () => {
game.override.battleStyle("double").startingWave(5);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);
it("startBattle 4vs2 trainer", async () => {
game.override.battleStyle("double").startingWave(5);
await game.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]);
await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
}, 20000);

View File

@ -30,7 +30,7 @@ describe("Daily Mode", () => {
});
it("should initialize properly", async () => {
await game.dailyMode.runToSummon();
await game.dailyMode.startBattle();
const party = game.scene.getPlayerParty();
expect(party).toHaveLength(3);

View File

@ -110,7 +110,7 @@ describe("Evolution", () => {
.startingLevel(16)
.enemyLevel(50);
await game.startBattle([Species.TOTODILE]);
await game.classicMode.startBattle([Species.TOTODILE]);
const totodile = game.scene.getPlayerPokemon()!;
const hpBefore = totodile.hp;
@ -138,7 +138,7 @@ describe("Evolution", () => {
.startingLevel(13)
.enemyLevel(30);
await game.startBattle([Species.CYNDAQUIL]);
await game.classicMode.startBattle([Species.CYNDAQUIL]);
const cyndaquil = game.scene.getPlayerPokemon()!;
cyndaquil.hp = Math.floor(cyndaquil.getMaxHp() / 2);
@ -171,7 +171,7 @@ describe("Evolution", () => {
* If the value is 0, it's a 3 family maushold, whereas if the value is
* 1, 2 or 3, it's a 4 family maushold
*/
await game.startBattle([Species.TANDEMAUS]); // starts us off with a tandemaus
await game.classicMode.startBattle([Species.TANDEMAUS]); // starts us off with a tandemaus
const playerPokemon = game.scene.getPlayerPokemon()!;
playerPokemon.level = 25; // tandemaus evolves at level 25
vi.spyOn(Utils, "randSeedInt").mockReturnValue(0); // setting the random generator to be 0 to force a three family maushold

Some files were not shown because too many files have changed in this diff Show More