Merge remote-tracking branch 'upstream/beta' into flying-press-fix
7
.dockerignore
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# .dockerignore
|
||||||
|
node_modules
|
||||||
|
*.log
|
||||||
|
*.md
|
||||||
|
.gitignore
|
||||||
|
Dockerfile
|
||||||
|
.env
|
12
.github/workflows/create-release.yml
vendored
@ -55,15 +55,15 @@ jobs:
|
|||||||
- name: Create release branch
|
- name: Create release branch
|
||||||
run: git checkout -b release
|
run: git checkout -b release
|
||||||
|
|
||||||
# In order to be able to open a PR into beta, we need the branch to have at least one change.
|
# In order to be able to open a PR into beta, we need the branch to have at least one commit.
|
||||||
- name: Overwrite RELEASE file
|
# The first commit is _usually_ just bumping the version number, so we can kill 2 birds with 1 stone here
|
||||||
|
- name: Bump release version
|
||||||
run: |
|
run: |
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
echo "Release v${{ github.event.inputs.versionName }}" > RELEASE
|
pnpm --no-git-tag-version version ${{ github.events.inputs.versionName }}
|
||||||
git add RELEASE
|
git commit -am "Stage release for v${{ github.events.inputs.versionName }}"
|
||||||
git commit -m "Stage release v${{ github.event.inputs.versionName }}"
|
|
||||||
|
|
||||||
- name: Push new branch
|
- name: Push new branch
|
||||||
run: git push origin release
|
run: git push origin release
|
||||||
|
|
||||||
|
2
.github/workflows/deploy-beta.yml
vendored
@ -22,8 +22,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
|
||||||
version: 10
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/deploy.yml
vendored
@ -20,8 +20,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
|
||||||
version: 10
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
16
.github/workflows/github-pages.yml
vendored
@ -27,20 +27,18 @@ jobs:
|
|||||||
# Only push docs when running on pushes to main/beta
|
# Only push docs when running on pushes to main/beta
|
||||||
DRY_RUN: ${{github.event_name != 'push' || (github.ref_name != 'beta' && github.ref_name != 'main')}}
|
DRY_RUN: ${{github.event_name != 'push' || (github.ref_name != 'beta' && github.ref_name != 'main')}}
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository for Typedoc
|
- name: Checkout repository for Typedoc
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
|
||||||
path: pokerogue_docs
|
path: pokerogue_docs
|
||||||
|
sparse-checkout: |
|
||||||
- name: Install OS package
|
/*
|
||||||
run: |
|
!/public/
|
||||||
sudo apt update
|
/public/images/pokemon/variant/_exp_masterlist.json
|
||||||
sudo apt install -y git openssh-client
|
/public/images/pokemon/variant/_masterlist.json
|
||||||
|
/public/images/logo.png
|
||||||
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
2
.github/workflows/linting.yml
vendored
@ -30,8 +30,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
|
||||||
version: 10
|
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
2
.github/workflows/test-shard-template.yml
vendored
@ -32,8 +32,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
|
||||||
version: 10
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
4
.github/workflows/tests.yml
vendored
@ -28,6 +28,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
sparse-checkout: |
|
||||||
|
.github/test-filters.yml
|
||||||
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
|
||||||
id: filter
|
id: filter
|
||||||
|
@ -80,7 +80,8 @@ Notable topics include:
|
|||||||
- [Commenting your code](./docs/comments.md)
|
- [Commenting your code](./docs/comments.md)
|
||||||
- [Linting & Formatting](./docs/linting.md)
|
- [Linting & Formatting](./docs/linting.md)
|
||||||
- [Localization](./docs/localization.md)
|
- [Localization](./docs/localization.md)
|
||||||
- [Enemy AI move selection](./docs/enemy-ai.md)
|
- [Enemy AI move selection](./docs/enemy-ai.md)
|
||||||
|
- [Running with Podman](./docs/podman.md)
|
||||||
|
|
||||||
Again, if you have unanswered questions please feel free to ask!
|
Again, if you have unanswered questions please feel free to ask!
|
||||||
|
|
||||||
|
47
Dockerfile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
ARG NODE_VERSION=22.14
|
||||||
|
ARG OS=alpine
|
||||||
|
|
||||||
|
FROM node:${NODE_VERSION}-${OS}
|
||||||
|
|
||||||
|
# Create non-root user
|
||||||
|
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
||||||
|
|
||||||
|
# Install git (for potential runtime needs)
|
||||||
|
RUN apk add --no-cache git
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Enable and prepare pnpm
|
||||||
|
RUN corepack enable && corepack prepare pnpm@10.14.0 --activate
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Copy package files
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
|
||||||
|
# Install all dependencies
|
||||||
|
RUN --mount=type=cache,target=/home/appuser/.pnpm-store \
|
||||||
|
pnpm install --frozen-lockfile && \
|
||||||
|
rm -rf /home/appuser/.pnpm-store/*
|
||||||
|
|
||||||
|
# Change ownership
|
||||||
|
RUN chown -R appuser:appgroup /app
|
||||||
|
|
||||||
|
# Switch to non-root user
|
||||||
|
USER appuser
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV VITE_BYPASS_LOGIN=1 \
|
||||||
|
VITE_BYPASS_TUTORIAL=0 \
|
||||||
|
NEXT_TELEMETRY_DISABLED=1 \
|
||||||
|
PNP_HOME=/home/appuser/.shrc \
|
||||||
|
NODE_ENV=development \
|
||||||
|
PORT=8000
|
||||||
|
|
||||||
|
# Expose port
|
||||||
|
EXPOSE $PORT
|
||||||
|
|
||||||
|
# Start the app in development mode
|
||||||
|
CMD ["pnpm", "run", "start:podman"]
|
27
biome.jsonc
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
@ -98,7 +98,9 @@
|
|||||||
"useTrimStartEnd": "error",
|
"useTrimStartEnd": "error",
|
||||||
"useReadonlyClassProperties": {
|
"useReadonlyClassProperties": {
|
||||||
"level": "info", // TODO: Graduate to error eventually
|
"level": "info", // TODO: Graduate to error eventually
|
||||||
"options": { "checkAllProperties": true }
|
// NOTE: "checkAllProperties" has an immature implementation that
|
||||||
|
// causes many false positives across files. Enable if/when maturity improves
|
||||||
|
"options": { "checkAllProperties": false }
|
||||||
},
|
},
|
||||||
"useConsistentObjectDefinitions": {
|
"useConsistentObjectDefinitions": {
|
||||||
"level": "error",
|
"level": "error",
|
||||||
@ -209,11 +211,15 @@
|
|||||||
"nursery": {
|
"nursery": {
|
||||||
"noUselessUndefined": "error",
|
"noUselessUndefined": "error",
|
||||||
"useMaxParams": {
|
"useMaxParams": {
|
||||||
"level": "warn", // TODO: Change to "error"... eventually...
|
"level": "info", // TODO: Change to "error"... eventually...
|
||||||
"options": { "max": 4 } // A lot of stuff has a few params, but
|
"options": { "max": 7 }
|
||||||
},
|
},
|
||||||
"noShadow": "warn", // TODO: refactor and make "error"
|
"noShadow": "warn", // TODO: refactor and make "error"
|
||||||
"noNonNullAssertedOptionalChain": "warn" // TODO: refactor and make "error"
|
"noNonNullAssertedOptionalChain": "warn", // TODO: refactor and make "error"
|
||||||
|
"noDuplicateDependencies": "error",
|
||||||
|
"noImportCycles": "error",
|
||||||
|
// TODO: Change to error once promises are used properly
|
||||||
|
"noMisusedPromises": "info"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -248,16 +254,9 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Overrides to prevent unused import removal inside `overrides.ts`, enums & `.d.ts` files (for TSDoc linkcodes),
|
// Overrides to prevent unused import removal inside `overrides.ts`, enums & `.d.ts` files (for TSDoc linkcodes),
|
||||||
// as well as inside script boilerplate files.
|
// as well as inside script boilerplate files (whose imports will _presumably_ be used in the generated file).
|
||||||
{
|
{
|
||||||
// TODO: Rename existing boilerplates in the folder and remove this last alias
|
"includes": ["**/src/overrides.ts", "**/src/enums/**/*", "**/*.d.ts", "scripts/**/*.boilerplate.ts"],
|
||||||
"includes": [
|
|
||||||
"**/src/overrides.ts",
|
|
||||||
"**/src/enums/**/*",
|
|
||||||
"**/*.d.ts",
|
|
||||||
"scripts/**/*.boilerplate.ts",
|
|
||||||
"**/boilerplates/*.ts"
|
|
||||||
],
|
|
||||||
"linter": {
|
"linter": {
|
||||||
"rules": {
|
"rules": {
|
||||||
"correctness": {
|
"correctness": {
|
||||||
|
27
docs/podman.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Using Podman
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
* `podman >=5.x`
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
|
||||||
|
1. `podman build -t pokerogue -f Dockerfile .`
|
||||||
|
2. `podman create --name temp-pokerogue localhost/pokerogue`
|
||||||
|
3. `podman cp temp-pokerogue:/app/node_modules ./`
|
||||||
|
4. `podman cp temp-pokerogue:/app/public/locales ./public/`
|
||||||
|
5. `podman rm temp-pokerogue`
|
||||||
|
6. `podman run --rm -p 8000:8000 -v $(pwd):/app:Z --userns=keep-id -u $(id -u):$(id -g) localhost/pokerogue`
|
||||||
|
7. Visit `http://localhost:8000/`
|
||||||
|
|
||||||
|
Note:
|
||||||
|
|
||||||
|
1. Steps 2,3,4 are required because mounting working directory without installed `node_modules/` and assets locally will be empty,
|
||||||
|
this way we prevent it by copying them from the container itself to local directory
|
||||||
|
|
||||||
|
2. `podman run` may take a couple of minutes to mount the working directory
|
||||||
|
|
||||||
|
### Running tests inside container
|
||||||
|
|
||||||
|
`podman run --rm -p 8000:8000 -v $(pwd):/app:Z --userns=keep-id -u $(id -u):$(id -g) localhost/pokerogue pnpm test:silent
|
||||||
|
`
|
13
package.json
@ -7,8 +7,10 @@
|
|||||||
"start:prod": "vite --mode production",
|
"start:prod": "vite --mode production",
|
||||||
"start:beta": "vite --mode beta",
|
"start:beta": "vite --mode beta",
|
||||||
"start:dev": "vite --mode development",
|
"start:dev": "vite --mode development",
|
||||||
|
"start:podman": "vite --mode development --host 0.0.0.0 --port $PORT",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"build:beta": "vite build --mode beta",
|
"build:beta": "vite build --mode beta",
|
||||||
|
"build:dev": "vite build --mode development",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"test": "vitest run --no-isolate",
|
"test": "vitest run --no-isolate",
|
||||||
"test:cov": "vitest run --coverage --no-isolate",
|
"test:cov": "vitest run --coverage --no-isolate",
|
||||||
@ -31,7 +33,7 @@
|
|||||||
"update-locales:remote": "git submodule update --progress --init --recursive --force --remote"
|
"update-locales:remote": "git submodule update --progress --init --recursive --force --remote"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "2.2.3",
|
"@biomejs/biome": "2.2.4",
|
||||||
"@ls-lint/ls-lint": "2.3.1",
|
"@ls-lint/ls-lint": "2.3.1",
|
||||||
"@types/crypto-js": "^4.2.0",
|
"@types/crypto-js": "^4.2.0",
|
||||||
"@types/jsdom": "^21.1.7",
|
"@types/jsdom": "^21.1.7",
|
||||||
@ -46,12 +48,12 @@
|
|||||||
"lefthook": "^1.12.2",
|
"lefthook": "^1.12.2",
|
||||||
"msw": "^2.10.4",
|
"msw": "^2.10.4",
|
||||||
"phaser3spectorjs": "^0.0.8",
|
"phaser3spectorjs": "^0.0.8",
|
||||||
"typedoc": "^0.28.8",
|
"typedoc": "^0.28.13",
|
||||||
"typedoc-github-theme": "^0.3.1",
|
"typedoc-github-theme": "^0.3.1",
|
||||||
"typedoc-plugin-coverage": "^4.0.1",
|
"typedoc-plugin-coverage": "^4.0.1",
|
||||||
"typedoc-plugin-mdn-links": "^5.0.9",
|
"typedoc-plugin-mdn-links": "^5.0.9",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.9.2",
|
||||||
"vite": "^7.0.6",
|
"vite": "^7.0.7",
|
||||||
"vite-tsconfig-paths": "^5.1.4",
|
"vite-tsconfig-paths": "^5.1.4",
|
||||||
"vitest": "^3.2.4",
|
"vitest": "^3.2.4",
|
||||||
"vitest-canvas-mock": "^0.3.3"
|
"vitest-canvas-mock": "^0.3.3"
|
||||||
@ -71,5 +73,6 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.0.0"
|
"node": ">=22.0.0"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.17.0"
|
||||||
}
|
}
|
||||||
|
659
pnpm-lock.yaml
BIN
public/images/ui/language_icon.png
Normal file
After Width: | Height: | Size: 294 B |
BIN
public/images/ui/legacy/language_icon.png
Normal file
After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 169 B |
@ -1 +1 @@
|
|||||||
Subproject commit 090bfefaf7e9d4efcbca61fa78a9cdf5d701830b
|
Subproject commit 74de730a64272c8e9ca0a4cdcf3426cbf1b0aeda
|
@ -1,7 +1,10 @@
|
|||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
|
import { BattlerIndex } from "#enums/battler-index";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
|
import { MoveResult } from "#enums/move-result";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { GameManager } from "#test/test-utils/game-manager";
|
import { GameManager } from "#test/test-utils/game-manager";
|
||||||
|
import i18next from "i18next";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
@ -32,12 +35,18 @@ describe("{{description}}", () => {
|
|||||||
.enemyLevel(100);
|
.enemyLevel(100);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Find more awesome utility functions inside `#test/test-utils`!
|
||||||
it("should do XYZ", async () => {
|
it("should do XYZ", async () => {
|
||||||
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
await game.classicMode.startBattle([SpeciesId.FEEBAS]);
|
||||||
|
|
||||||
|
const feebas = game.field.getPlayerPokemon();
|
||||||
|
|
||||||
game.move.use(MoveId.SPLASH);
|
game.move.use(MoveId.SPLASH);
|
||||||
|
await game.move.forceEnemyMove(MoveId.CELEBRATE);
|
||||||
|
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
|
||||||
await game.toEndOfTurn();
|
await game.toEndOfTurn();
|
||||||
|
|
||||||
expect(true).toBe(true);
|
expect(feebas).toHaveUsedMove({ move: MoveId.SPLASH, result: MoveResult.SUCCESS });
|
||||||
|
expect(game).toHaveShownMessage(i18next.t("moveTriggers:splash"));
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -102,9 +102,9 @@ async function promptFileName(selectedType) {
|
|||||||
function getBoilerplatePath(choiceType) {
|
function getBoilerplatePath(choiceType) {
|
||||||
switch (choiceType) {
|
switch (choiceType) {
|
||||||
// case "Reward":
|
// case "Reward":
|
||||||
// return path.join(__dirname, "boilerplates/reward.ts");
|
// return path.join(__dirname, "boilerplates/reward.boilerplate.ts");
|
||||||
default:
|
default:
|
||||||
return path.join(__dirname, "boilerplates/default.ts");
|
return path.join(__dirname, "boilerplates/default.boilerplate.ts");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { ScoreboardCategory } from "#ui/containers/daily-run-scoreboard";
|
import type { ScoreboardCategory } from "#ui/daily-run-scoreboard";
|
||||||
|
|
||||||
export interface GetDailyRankingsRequest {
|
export interface GetDailyRankingsRequest {
|
||||||
category: ScoreboardCategory;
|
category: ScoreboardCategory;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { SessionSaveData, SystemSaveData } from "#system/game-data";
|
import type { SessionSaveData, SystemSaveData } from "#types/save-data";
|
||||||
|
|
||||||
export interface UpdateAllSavedataRequest {
|
export interface UpdateAllSavedataRequest {
|
||||||
system: SystemSaveData;
|
system: SystemSaveData;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { SystemSaveData } from "#system/game-data";
|
import type { SystemSaveData } from "#types/save-data";
|
||||||
|
|
||||||
export interface GetSystemSavedataRequest {
|
export interface GetSystemSavedataRequest {
|
||||||
clientSessionId: string;
|
clientSessionId: string;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import type { ArenaTagTypeMap } from "#data/arena-tag";
|
import type { ArenaTagTypeMap } from "#data/arena-tag";
|
||||||
import type { ArenaTagType } from "#enums/arena-tag-type";
|
import type { ArenaTagType } from "#enums/arena-tag-type";
|
||||||
// biome-ignore lint/correctness/noUnusedImports: TSDocs
|
// biome-ignore lint/correctness/noUnusedImports: TSDocs
|
||||||
import type { SessionSaveData } from "#system/game-data";
|
import type { SessionSaveData } from "#types/save-data";
|
||||||
import type { ObjectValues } from "#types/type-helpers";
|
import type { ObjectValues } from "#types/type-helpers";
|
||||||
|
|
||||||
/** Subset of {@linkcode ArenaTagType}s that apply some negative effect to pokemon that switch in ({@link https://bulbapedia.bulbagarden.net/wiki/List_of_moves_that_cause_entry_hazards#List_of_traps | entry hazards} and Imprison. */
|
/** Subset of {@linkcode ArenaTagType}s that apply some negative effect to pokemon that switch in ({@link https://bulbapedia.bulbagarden.net/wiki/List_of_moves_that_cause_entry_hazards#List_of_traps | entry hazards} and Imprison. */
|
||||||
@ -38,6 +38,7 @@ type SerializableArenaTagTypeMap = Pick<ArenaTagTypeMap, SerializableArenaTagTyp
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Type mapping all `ArenaTag`s to type-safe representations of their serialized forms.
|
* Type mapping all `ArenaTag`s to type-safe representations of their serialized forms.
|
||||||
|
*
|
||||||
* @interface
|
* @interface
|
||||||
*/
|
*/
|
||||||
export type ArenaTagDataMap = {
|
export type ArenaTagDataMap = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// biome-ignore-start lint/correctness/noUnusedImports: Used in a TSDoc comment
|
// biome-ignore-start lint/correctness/noUnusedImports: Used in a TSDoc comment
|
||||||
import type { AbilityBattlerTag, BattlerTagTypeMap, SerializableBattlerTag, TypeBoostTag } from "#data/battler-tags";
|
import type { AbilityBattlerTag, BattlerTagTypeMap, SerializableBattlerTag, TypeBoostTag } from "#data/battler-tags";
|
||||||
import type { AbilityId } from "#enums/ability-id";
|
import type { AbilityId } from "#enums/ability-id";
|
||||||
import type { SessionSaveData } from "#system/game-data";
|
import type { SessionSaveData } from "#types/save-data";
|
||||||
// biome-ignore-end lint/correctness/noUnusedImports: Used in a TSDoc comment
|
// biome-ignore-end lint/correctness/noUnusedImports: Used in a TSDoc comment
|
||||||
|
|
||||||
import type { BattlerTagType } from "#enums/battler-tag-type";
|
import type { BattlerTagType } from "#enums/battler-tag-type";
|
||||||
@ -89,7 +89,8 @@ export type AbilityBattlerTagType =
|
|||||||
| BattlerTagType.QUARK_DRIVE
|
| BattlerTagType.QUARK_DRIVE
|
||||||
| BattlerTagType.UNBURDEN
|
| BattlerTagType.UNBURDEN
|
||||||
| BattlerTagType.SLOW_START
|
| BattlerTagType.SLOW_START
|
||||||
| BattlerTagType.TRUANT;
|
| BattlerTagType.TRUANT
|
||||||
|
| BattlerTagType.SUPREME_OVERLORD;
|
||||||
|
|
||||||
/** Subset of {@linkcode BattlerTagType}s that provide type boosts */
|
/** Subset of {@linkcode BattlerTagType}s that provide type boosts */
|
||||||
export type TypeBoostTagType = BattlerTagType.FIRE_BOOST | BattlerTagType.CHARGED;
|
export type TypeBoostTagType = BattlerTagType.FIRE_BOOST | BattlerTagType.CHARGED;
|
||||||
|