Merge branch 'main' into plates_memories

This commit is contained in:
Madmadness65 2024-05-26 00:49:32 -05:00 committed by GitHub
commit eaf25551c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
260 changed files with 23579 additions and 3440 deletions

View File

@ -22,7 +22,13 @@
"@typescript-eslint/no-extra-semi": ["error"], // Disallows unnecessary semicolons for TypeScript-specific syntax "@typescript-eslint/no-extra-semi": ["error"], // Disallows unnecessary semicolons for TypeScript-specific syntax
"brace-style": "off", // Note: you must disable the base rule as it can report incorrect errors "brace-style": "off", // Note: you must disable the base rule as it can report incorrect errors
"curly": ["error", "all"], // Enforces the use of curly braces for all control statements "curly": ["error", "all"], // Enforces the use of curly braces for all control statements
"@typescript-eslint/brace-style": ["error", "1tbs"] "@typescript-eslint/brace-style": ["error", "1tbs"],
"no-trailing-spaces": ["error", { // Disallows trailing whitespace at the end of lines
"skipBlankLines": false, // Enforces the rule even on blank lines
"ignoreComments": false // Enforces the rule on lines containing comments
}],
"space-before-blocks": ["error", "always"], // Enforces a space before blocks
"keyword-spacing": ["error", { "before": true, "after": true }] // Enforces spacing before and after keywords
} }
} }
] ]

View File

@ -6,6 +6,7 @@ on:
jobs: jobs:
deploy: deploy:
if: github.repository == 'pagefaultgames/pokerogue'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

3
.gitignore vendored
View File

@ -24,9 +24,6 @@ dist-ssr
*.sln *.sln
*.sw? *.sw?
# Docummentation
docs/*
public/images/trainer/convert/* public/images/trainer/convert/*
public/images/battle_anims/input/*.png public/images/battle_anims/input/*.png
public/images/pokemon/input/*.png public/images/pokemon/input/*.png

View File

@ -8,7 +8,7 @@ If you have the motivation and experience with Typescript/Javascript (or are wil
### 💻 Environment Setup ### 💻 Environment Setup
#### Prerequisites #### Prerequisites
- node: 18.3.0 - node: 20.13.1
- npm: [how to install](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - npm: [how to install](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
#### Running Locally #### Running Locally
@ -16,6 +16,9 @@ If you have the motivation and experience with Typescript/Javascript (or are wil
- *if you run into any errors, reach out in the **#dev-corner** channel in discord* - *if you run into any errors, reach out in the **#dev-corner** channel in discord*
2. Run `npm run start:dev` to locally run the project in `localhost:8000` 2. Run `npm run start:dev` to locally run the project in `localhost:8000`
#### Linting
We're using ESLint as our common linter and formatter. It will run automatically during the pre-commit hook but if you would like to manually run it, use the `npm run eslint` script.
### ❔ FAQ ### ❔ FAQ
**How do I test a new _______?** **How do I test a new _______?**

40
docs/linting.md Normal file
View File

@ -0,0 +1,40 @@
# ESLint
## Key Features
1. **Automation**:
- A pre-commit hook has been added to automatically run ESLint on the added or modified files, ensuring code quality before commits.
2. **Manual Usage**:
- If you prefer not to use the pre-commit hook, you can manually run ESLint to automatically fix issues using the command:
```sh
npx eslint --fix . or npm run eslint
```
- Running this command will lint all files in the repository.
3. **GitHub Action**:
- A GitHub Action has been added to automatically run ESLint on every push and pull request, ensuring code quality in the CI/CD pipeline.
## Summary of ESLint Rules
1. **General Rules**:
- **Equality**: Use `===` and `!==` instead of `==` and `!=` (`eqeqeq`).
- **Indentation**: Enforce 2-space indentation (`indent`).
- **Quotes**: Use doublequotes for strings (`quotes`).
- **Variable Declarations**:
- Disallow `var`; use `let` or `const` (`no-var`).
- Prefer `const` for variables that are never reassigned (`prefer-const`).
- **Unused Variables**: Allow unused function parameters but enforce error for other unused variables (`@typescript-eslint/no-unused-vars`).
- **End of Line**: Ensure at least one newline at the end of files (`eol-last`).
- **Curly Braces**: Enforce the use of curly braces for all control statements (`curly`).
- **Brace Style**: Use one true brace style (`1tbs`) for TypeScript-specific syntax (`@typescript-eslint/brace-style`).
2. **TypeScript-Specific Rules**:
- **Semicolons**:
- Enforce semicolons for TypeScript-specific syntax (`@typescript-eslint/semi`).
- Disallow unnecessary semicolons (`@typescript-eslint/no-extra-semi`).
## Benefits
- **Consistency**: Ensures consistent coding style across the project.
- **Code Quality**: Helps catch potential errors and improve overall code quality.
- **Readability**: Makes the codebase easier to read and maintain.

6111
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@
"phaser3-rex-plugins": "^1.1.84" "phaser3-rex-plugins": "^1.1.84"
}, },
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=20.0.0"
}, },
"imports": { "imports": {
"#app": "./src/main.js", "#app": "./src/main.js",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 965 B

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
{
"1": {
"1b2627": "1b2627",
"474749": "156a66",
"010101": "010101",
"303034": "094448",
"f5f5f6": "f5ffea",
"b2b3b2": "90c093",
"949496": "1c8155",
"282730": "002729",
"242428": "001b1a",
"6f7071": "01473a",
"df84ad": "ff69fa",
"9b4f69": "d414dd",
"fcfcfc": "fcfcfc"
},
"2": {
"1b2627": "060724",
"474749": "8655e1",
"010101": "010101",
"303034": "5a3eb9",
"f5f5f6": "342d4c",
"b2b3b2": "18133d",
"949496": "302e89",
"282730": "180c46",
"242428": "161058",
"6f7071": "2e1d7b",
"df84ad": "54f1ff",
"9b4f69": "0099ce",
"fcfcfc": "fcfcfc"
}
}

View File

@ -1220,7 +1220,7 @@
1 1
], ],
"623": [ "623": [
1, 2,
1, 1,
1 1
], ],
@ -1754,6 +1754,11 @@
1, 1,
1 1
], ],
"862": [
0,
1,
1
],
"863": [ "863": [
0, 0,
1, 1,
@ -1796,8 +1801,8 @@
], ],
"890-eternamax": [ "890-eternamax": [
0, 0,
2, 1,
2 1
], ],
"890": [ "890": [
0, 0,
@ -2499,7 +2504,7 @@
], ],
"212-mega": [ "212-mega": [
1, 1,
1, 2,
1 1
], ],
"212": [ "212": [
@ -2920,7 +2925,7 @@
"426": [ "426": [
0, 0,
1, 1,
1 2
], ],
"427": [ "427": [
0, 0,
@ -3323,7 +3328,7 @@
1 1
], ],
"623": [ "623": [
1, 2,
1, 1,
1 1
], ],
@ -3857,6 +3862,11 @@
1, 1,
1 1
], ],
"862": [
0,
1,
1
],
"863": [ "863": [
0, 0,
1, 1,
@ -4175,7 +4185,7 @@
], ],
"399": [ "399": [
0, 0,
1, 2,
1 1
], ],
"400": [ "400": [
@ -4249,7 +4259,7 @@
"212-mega": [ "212-mega": [
1, 1,
1, 1,
1 2
], ],
"282-mega": [ "282-mega": [
0, 0,
@ -4473,7 +4483,7 @@
], ],
"696": [ "696": [
0, 0,
1, 2,
2 2
], ],
"697": [ "697": [
@ -4553,8 +4563,8 @@
], ],
"729": [ "729": [
0, 0,
1, 2,
1 2
], ],
"730": [ "730": [
0, 0,
@ -4564,7 +4574,7 @@
"747": [ "747": [
0, 0,
2, 2,
1 2
], ],
"748": [ "748": [
0, 0,
@ -4578,8 +4588,8 @@
], ],
"754": [ "754": [
0, 0,
1, 2,
1 2
], ],
"755": [ "755": [
0, 0,
@ -4746,6 +4756,11 @@
1, 1,
1 1
], ],
"862": [
0,
1,
1
],
"863": [ "863": [
0, 0,
1, 1,
@ -4789,7 +4804,12 @@
"890": [ "890": [
0, 0,
2, 2,
2 1
],
"890-eternamax": [
0,
1,
1
], ],
"900": [ "900": [
0, 0,
@ -5070,8 +5090,8 @@
], ],
"212-mega": [ "212-mega": [
1, 1,
1, 2,
1 2
], ],
"282-mega": [ "282-mega": [
0, 0,
@ -5400,7 +5420,7 @@
], ],
"754": [ "754": [
0, 0,
1, 2,
2 2
], ],
"755": [ "755": [
@ -5563,6 +5583,11 @@
1, 1,
1 1
], ],
"862": [
0,
1,
1
],
"863": [ "863": [
0, 0,
1, 1,
@ -5725,8 +5750,8 @@
], ],
"970": [ "970": [
0, 0,
2, 1,
2 1
], ],
"973": [ "973": [
1, 1,

View File

@ -0,0 +1,41 @@
{
"textures": [
{
"image": "212-mega_2.png",
"format": "RGBA8888",
"size": {
"w": 86,
"h": 86
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 72,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 72,
"h": 86
},
"frame": {
"x": 0,
"y": 0,
"w": 72,
"h": 86
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:3fba14a8cd6c5a8717bb5ccf414ed76d:5ebfc3bcaa77a0ff9d55a9b15383f0ef:d0a607721d6bb74ae9b6d486116d85e3$"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
{
"1": {
"1b2627": "1b2627",
"010101": "010101",
"474749": "156a66",
"303034": "094448",
"6f7071": "01473a",
"b2b3b2": "90c093",
"463f39": "001b1a",
"949496": "1c8155",
"f5f5f6": "f5ffea",
"9b4f69": "d414dd",
"df84ad": "ff69fa",
"2b2d2e": "052332",
"fcfcfc": "fcfcfc"
},
"2": {
"1b2627": "180c46",
"010101": "010101",
"474749": "8655e1",
"303034": "5a3eb9",
"6f7071": "2e1d7b",
"b2b3b2": "1f1a43",
"463f39": "161058",
"949496": "302e89",
"f5f5f6": "342d4c",
"9b4f69": "0099ce",
"df84ad": "54f1ff",
"2b2d2e": "060429",
"fcfcfc": "fcfcfc"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,692 @@
{
"textures": [
{
"image": "696_2.png",
"format": "RGBA8888",
"size": {
"w": 135,
"h": 135
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0009.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0010.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0017.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0018.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0003.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0004.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0015.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0016.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0019.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0020.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0031.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0032.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 53,
"y": 0,
"w": 53,
"h": 46
}
},
{
"filename": "0011.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 46,
"w": 53,
"h": 46
}
},
{
"filename": "0012.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 53,
"h": 46
},
"frame": {
"x": 0,
"y": 46,
"w": 53,
"h": 46
}
},
{
"filename": "0025.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 3,
"w": 53,
"h": 43
},
"frame": {
"x": 0,
"y": 92,
"w": 53,
"h": 43
}
},
{
"filename": "0026.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 3,
"w": 53,
"h": 43
},
"frame": {
"x": 0,
"y": 92,
"w": 53,
"h": 43
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0013.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0014.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0021.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0022.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0029.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0030.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 53,
"h": 45
},
"frame": {
"x": 53,
"y": 46,
"w": 53,
"h": 45
}
},
{
"filename": "0023.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 2,
"w": 53,
"h": 44
},
"frame": {
"x": 53,
"y": 91,
"w": 53,
"h": 44
}
},
{
"filename": "0024.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 2,
"w": 53,
"h": 44
},
"frame": {
"x": 53,
"y": 91,
"w": 53,
"h": 44
}
},
{
"filename": "0027.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 2,
"w": 53,
"h": 44
},
"frame": {
"x": 53,
"y": 91,
"w": 53,
"h": 44
}
},
{
"filename": "0028.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 53,
"h": 46
},
"spriteSourceSize": {
"x": 0,
"y": 2,
"w": 53,
"h": 44
},
"frame": {
"x": 53,
"y": 91,
"w": 53,
"h": 44
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:f6c90e8287d3ce2aa68c9fef98f6e12f:24cf84ba4764bd88b4e751ca1911a8d5:58b7763fb9abdd043e9bfa400cfafdef$"
}
}

View File

@ -0,0 +1,272 @@
{
"textures": [
{
"image": "729_2.png",
"format": "RGBA8888",
"size": {
"w": 141,
"h": 141
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 49,
"h": 51
},
"frame": {
"x": 0,
"y": 0,
"w": 49,
"h": 51
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 49,
"h": 51
},
"frame": {
"x": 0,
"y": 51,
"w": 49,
"h": 51
}
},
{
"filename": "0012.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 49,
"h": 51
},
"frame": {
"x": 0,
"y": 51,
"w": 49,
"h": 51
}
},
{
"filename": "0003.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 48,
"h": 50
},
"frame": {
"x": 49,
"y": 0,
"w": 48,
"h": 50
}
},
{
"filename": "0011.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 48,
"h": 50
},
"frame": {
"x": 49,
"y": 0,
"w": 48,
"h": 50
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 42,
"h": 47
},
"frame": {
"x": 97,
"y": 0,
"w": 42,
"h": 47
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 42,
"h": 47
},
"frame": {
"x": 97,
"y": 0,
"w": 42,
"h": 47
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 40,
"h": 47
},
"frame": {
"x": 97,
"y": 47,
"w": 40,
"h": 47
}
},
{
"filename": "0004.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 3,
"w": 46,
"h": 48
},
"frame": {
"x": 49,
"y": 50,
"w": 46,
"h": 48
}
},
{
"filename": "0010.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 3,
"w": 46,
"h": 48
},
"frame": {
"x": 49,
"y": 50,
"w": 46,
"h": 48
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 45,
"h": 47
},
"frame": {
"x": 95,
"y": 94,
"w": 45,
"h": 47
}
},
{
"filename": "0009.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 45,
"h": 47
},
"frame": {
"x": 95,
"y": 94,
"w": 45,
"h": 47
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:4df3ec883b357e664a50e3015060795f:29a8d34f9df9fa51691fda1da5961207:b2d5dd692ec79c7357afdffa7b3670a9$"
}
}

View File

@ -0,0 +1,272 @@
{
"textures": [
{
"image": "729_3.png",
"format": "RGBA8888",
"size": {
"w": 141,
"h": 141
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 49,
"h": 51
},
"frame": {
"x": 0,
"y": 0,
"w": 49,
"h": 51
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 49,
"h": 51
},
"frame": {
"x": 0,
"y": 51,
"w": 49,
"h": 51
}
},
{
"filename": "0012.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 49,
"h": 51
},
"frame": {
"x": 0,
"y": 51,
"w": 49,
"h": 51
}
},
{
"filename": "0003.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 48,
"h": 50
},
"frame": {
"x": 49,
"y": 0,
"w": 48,
"h": 50
}
},
{
"filename": "0011.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 48,
"h": 50
},
"frame": {
"x": 49,
"y": 0,
"w": 48,
"h": 50
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 42,
"h": 47
},
"frame": {
"x": 97,
"y": 0,
"w": 42,
"h": 47
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 42,
"h": 47
},
"frame": {
"x": 97,
"y": 0,
"w": 42,
"h": 47
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 40,
"h": 47
},
"frame": {
"x": 97,
"y": 47,
"w": 40,
"h": 47
}
},
{
"filename": "0004.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 3,
"w": 46,
"h": 48
},
"frame": {
"x": 49,
"y": 50,
"w": 46,
"h": 48
}
},
{
"filename": "0010.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 3,
"w": 46,
"h": 48
},
"frame": {
"x": 49,
"y": 50,
"w": 46,
"h": 48
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 45,
"h": 47
},
"frame": {
"x": 95,
"y": 94,
"w": 45,
"h": 47
}
},
{
"filename": "0009.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 50,
"h": 51
},
"spriteSourceSize": {
"x": 0,
"y": 4,
"w": 45,
"h": 47
},
"frame": {
"x": 95,
"y": 94,
"w": 45,
"h": 47
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:4df3ec883b357e664a50e3015060795f:29a8d34f9df9fa51691fda1da5961207:b2d5dd692ec79c7357afdffa7b3670a9$"
}
}

View File

@ -0,0 +1,188 @@
{
"textures": [
{
"image": "747_3.png",
"format": "RGBA8888",
"size": {
"w": 110,
"h": 110
},
"scale": 1,
"frames": [
{
"filename": "0003.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
},
"frame": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
}
},
{
"filename": "0004.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
},
"frame": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
},
"frame": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
},
"frame": {
"x": 0,
"y": 0,
"w": 55,
"h": 47
}
},
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 55,
"h": 46
},
"frame": {
"x": 55,
"y": 0,
"w": 55,
"h": 46
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 55,
"h": 46
},
"frame": {
"x": 55,
"y": 0,
"w": 55,
"h": 46
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 55,
"h": 46
},
"frame": {
"x": 55,
"y": 46,
"w": 55,
"h": 46
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 55,
"h": 47
},
"spriteSourceSize": {
"x": 0,
"y": 1,
"w": 55,
"h": 46
},
"frame": {
"x": 55,
"y": 46,
"w": 55,
"h": 46
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:e4c4f790c4f0286f608dcdb15a609059:464f7ae7db1c0d034c2a1a65612b0da8:b26f7254994561969f00f765318acf1c$"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
{
"1": {
"1b2627": "1b2627",
"474749": "156a66",
"010101": "010101",
"f5f5f6": "f5ffea",
"b2b3b2": "90c093",
"303034": "094448",
"949496": "1c8155",
"463f39": "156a66",
"6f7071": "01473a",
"df84ad": "ff69fa",
"9b4f69": "d414dd",
"fcfcfc": "fcfcfc",
"494d56": "156a66"
},
"2": {
"1b2627": "060724",
"474749": "8655e1",
"010101": "010101",
"f5f5f6": "342d4c",
"b2b3b2": "18133d",
"303034": "5a3eb9",
"949496": "302e89",
"463f39": "8655e1",
"6f7071": "2e1d7b",
"df84ad": "54f1ff",
"9b4f69": "0099ce",
"fcfcfc": "fcfcfc",
"494d56": "8655e1"
}
}

View File

@ -0,0 +1,28 @@
{
"1": {
"25134c": "162a52",
"010101": "010101",
"3622a7": "406d89",
"6461ba": "4989a6",
"31245f": "264864",
"ab2a4c": "0d6fae",
"ffb6b6": "a6fbff",
"ff5657": "45c5e5",
"ffdfdf": "f1faff",
"e23434": "1c98c7",
"ff8c8c": "6ee7f8"
},
"2": {
"25134c": "354e95",
"010101": "010101",
"3622a7": "bfd1fa",
"6461ba": "e1ecff",
"31245f": "87a3dd",
"ab2a4c": "ac4709",
"ffb6b6": "ffd456",
"ff5657": "d47823",
"ffdfdf": "ffee85",
"e23434": "c86016",
"ff8c8c": "ed972e"
}
}

View File

@ -0,0 +1,19 @@
{
"2": {
"26124d": "4963af",
"3a15bc": "bfd1fa",
"010101": "010101",
"b21833": "7b2f0e",
"eb1533": "cb7622",
"9a2433": "732208",
"3d2871": "87a3dd",
"f46d70": "f1bd4b",
"fb2553": "934516",
"675cc5": "675cc5",
"ffbcbc": "de9335",
"12042d": "12042d",
"e22dbc": "298fb9",
"f18cd5": "73e5dc",
"fefefe": "fefefe"
}
}

View File

@ -0,0 +1,440 @@
{
"textures": [
{
"image": "212-mega_2.png",
"format": "RGBA8888",
"size": {
"w": 344,
"h": 344
},
"scale": 1,
"frames": [
{
"filename": "0004.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 0,
"w": 76,
"h": 86
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 0,
"w": 76,
"h": 86
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 3,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 86,
"w": 76,
"h": 86
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 3,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 172,
"w": 76,
"h": 86
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 3,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 258,
"w": 76,
"h": 86
}
},
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0010.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0003.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 224,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0009.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0011.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 172,
"w": 74,
"h": 86
}
},
{
"filename": "0012.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 258,
"w": 74,
"h": 86
}
},
{
"filename": "0020.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 258,
"w": 74,
"h": 86
}
},
{
"filename": "0013.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0014.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 224,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0018.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 224,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0019.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 172,
"w": 74,
"h": 86
}
},
{
"filename": "0015.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 72,
"h": 86
},
"frame": {
"x": 150,
"y": 258,
"w": 72,
"h": 86
}
},
{
"filename": "0017.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 72,
"h": 86
},
"frame": {
"x": 222,
"y": 258,
"w": 72,
"h": 86
}
},
{
"filename": "0016.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 71,
"h": 86
},
"frame": {
"x": 224,
"y": 172,
"w": 71,
"h": 86
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:1b7ede0d536069418738b9c0f67f14fd:7b469c796eb673d31bdab8ad7b99b881:d0a607721d6bb74ae9b6d486116d85e3$"
}
}

View File

@ -0,0 +1,440 @@
{
"textures": [
{
"image": "212-mega_3.png",
"format": "RGBA8888",
"size": {
"w": 344,
"h": 344
},
"scale": 1,
"frames": [
{
"filename": "0004.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 0,
"w": 76,
"h": 86
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 0,
"w": 76,
"h": 86
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 3,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 86,
"w": 76,
"h": 86
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 3,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 172,
"w": 76,
"h": 86
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 3,
"y": 0,
"w": 76,
"h": 86
},
"frame": {
"x": 0,
"y": 258,
"w": 76,
"h": 86
}
},
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0010.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0003.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 224,
"y": 0,
"w": 74,
"h": 86
}
},
{
"filename": "0009.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 2,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0011.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 172,
"w": 74,
"h": 86
}
},
{
"filename": "0012.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 258,
"w": 74,
"h": 86
}
},
{
"filename": "0020.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 76,
"y": 258,
"w": 74,
"h": 86
}
},
{
"filename": "0013.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0014.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 224,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0018.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 224,
"y": 86,
"w": 74,
"h": 86
}
},
{
"filename": "0019.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 74,
"h": 86
},
"frame": {
"x": 150,
"y": 172,
"w": 74,
"h": 86
}
},
{
"filename": "0015.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 72,
"h": 86
},
"frame": {
"x": 150,
"y": 258,
"w": 72,
"h": 86
}
},
{
"filename": "0017.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 72,
"h": 86
},
"frame": {
"x": 222,
"y": 258,
"w": 72,
"h": 86
}
},
{
"filename": "0016.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 79,
"h": 86
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 71,
"h": 86
},
"frame": {
"x": 224,
"y": 172,
"w": 71,
"h": 86
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:1b7ede0d536069418738b9c0f67f14fd:7b469c796eb673d31bdab8ad7b99b881:d0a607721d6bb74ae9b6d486116d85e3$"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
{
"1": {
"010101": "010101",
"1b2627": "1b2627",
"474749": "156a66",
"303034": "094448",
"6f7071": "01473a",
"b2b3b2": "90c093",
"463f39": "001b1a",
"f5f5f6": "f5ffea",
"949496": "1c8155",
"9b4f69": "d414dd",
"df84ad": "ff69fa",
"fcfcfc": "fcfcfc"
},
"2": {
"010101": "010101",
"1b2627": "180c46",
"474749": "8655e1",
"303034": "5a3eb9",
"6f7071": "2e1d7b",
"b2b3b2": "1f1a43",
"463f39": "161058",
"f5f5f6": "342d4c",
"949496": "302e89",
"9b4f69": "0099ce",
"df84ad": "54f1ff",
"fcfcfc": "fcfcfc"
}
}

View File

@ -0,0 +1,26 @@
{
"1": {
"242737": "242737",
"366956": "521d0c",
"41968b": "c57833",
"5de0aa": "fbce5d",
"262b6b": "323b51",
"3253d6": "577b81",
"2c369a": "435469",
"a02c75": "3f4a6f",
"fd84ba": "bbe3ee",
"e0548f": "758eb4"
},
"2": {
"242737": "2e1d1a",
"366956": "6d171f",
"41968b": "b21a1a",
"5de0aa": "d95e3e",
"262b6b": "b07963",
"3253d6": "ffe6ca",
"2c369a": "d9aa8a",
"a02c75": "153532",
"fd84ba": "429d72",
"e0548f": "28625e"
}
}

View File

@ -5979,6 +5979,6 @@
"meta": { "meta": {
"app": "https://www.codeandweb.com/texturepacker", "app": "https://www.codeandweb.com/texturepacker",
"version": "3.0", "version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:8e8bd4d6d941cb88610eb6155fd86133:38ee262ea69421a5e49109e3abfe85dd:2e7c5873ead8fd8fce82a0b3fcc86b42$" "smartupdate": "$TexturePacker:SmartUpdate:a4de8d1c4f7d4f58c929b8b5479e03f1:3c8ac308e19a7f9420a4df8a78188490:2e7c5873ead8fd8fce82a0b3fcc86b42$"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -7365,6 +7365,6 @@
"meta": { "meta": {
"app": "https://www.codeandweb.com/texturepacker", "app": "https://www.codeandweb.com/texturepacker",
"version": "3.0", "version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:c7db0232f46f4f968b13cb4a8cdb7bce:bcba724c9d58839d9045773dbcc992bc:8190d2ecf16422e962cfb1a751b5e1fc$" "smartupdate": "$TexturePacker:SmartUpdate:4716314f809733c6bcb221809776ba11:4fb09375a87d8a348dc0e609db8a95fd:8190d2ecf16422e962cfb1a751b5e1fc$"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -0,0 +1,76 @@
import Move from "./data/move";
/** Alias for all {@linkcode BattleScene} events */
export enum BattleSceneEventType {
/**
* Triggers when a move is successfully used
* @see {@linkcode MoveUsedEvent}
*/
MOVE_USED = "onMoveUsed",
/**
* Triggers on the first turn of a new battle
* @see {@linkcode TurnInitEvent}
*/
TURN_INIT = "onTurnInit",
/**
* Triggers after a turn ends in battle
* @see {@linkcode TurnEndEvent}
*/
TURN_END = "onTurnEnd",
/**
* Triggers when a new {@linkcode Arena} is created during initialization
* @see {@linkcode NewArenaEvent}
*/
NEW_ARENA = "onNewArena",
}
/**
* Container class for {@linkcode BattleSceneEventType.MOVE_USED} events
* @extends Event
*/
export class MoveUsedEvent extends Event {
/** The ID of the {@linkcode Pokemon} that used the {@linkcode Move} */
public userId: number;
/** The {@linkcode Move} used */
public move: Move;
/** The amount of PP used on the {@linkcode Move} this turn */
public ppUsed: number;
constructor(userId: number, move: Move, ppUsed: number) {
super(BattleSceneEventType.MOVE_USED);
this.userId = userId;
this.move = move;
this.ppUsed = ppUsed;
}
}
/**
* Container class for {@linkcode BattleSceneEventType.TURN_INIT} events
* @extends Event
*/
export class TurnInitEvent extends Event {
constructor() {
super(BattleSceneEventType.TURN_INIT);
}
}
/**
* Container class for {@linkcode BattleSceneEventType.TURN_END} events
* @extends Event
*/
export class TurnEndEvent extends Event {
/** The amount of turns in the current battle */
public turnCount: number;
constructor(turnCount: number) {
super(BattleSceneEventType.TURN_END);
this.turnCount = turnCount;
}
}
/**
* Container class for {@linkcode BattleSceneEventType.NEW_ARENA} events
* @extends Event
*/
export class NewArenaEvent extends Event {
constructor() {
super(BattleSceneEventType.NEW_ARENA);
}
}

View File

@ -2,7 +2,7 @@ import Phaser from "phaser";
import UI from "./ui/ui"; import UI from "./ui/ui";
import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, MovePhase, TitlePhase, SwitchPhase } from "./phases"; import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, MovePhase, TitlePhase, SwitchPhase } from "./phases";
import Pokemon, { PlayerPokemon, EnemyPokemon } from "./field/pokemon"; import Pokemon, { PlayerPokemon, EnemyPokemon } from "./field/pokemon";
import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from "./data/pokemon-species"; import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies } from "./data/pokemon-species";
import * as Utils from "./utils"; import * as Utils from "./utils";
import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier, overrideModifiers, overrideHeldItems } from "./modifier/modifier"; import { Modifier, ModifierBar, ConsumablePokemonModifier, ConsumableModifier, PokemonHpRestoreModifier, HealingBoosterModifier, PersistentModifier, PokemonHeldItemModifier, ModifierPredicate, DoubleBattleChanceBoosterModifier, FusePokemonModifier, PokemonFormChangeItemModifier, TerastallizeModifier, overrideModifiers, overrideHeldItems } from "./modifier/modifier";
import { PokeballType } from "./data/pokeball"; import { PokeballType } from "./data/pokeball";
@ -15,10 +15,9 @@ import { GameData, PlayerGender } from "./system/game-data";
import { TextStyle, addTextObject } from "./ui/text"; import { TextStyle, addTextObject } from "./ui/text";
import { Moves } from "./data/enums/moves"; import { Moves } from "./data/enums/moves";
import { allMoves } from "./data/move"; import { allMoves } from "./data/move";
import { initMoves } from "./data/move";
import { ModifierPoolType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getPartyLuckValue } from "./modifier/modifier-type"; import { ModifierPoolType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getPartyLuckValue } from "./modifier/modifier-type";
import AbilityBar from "./ui/ability-bar"; import AbilityBar from "./ui/ability-bar";
import { BlockItemTheftAbAttr, DoubleBattleChanceAbAttr, IncrementMovePriorityAbAttr, applyAbAttrs, initAbilities } from "./data/ability"; import { BlockItemTheftAbAttr, DoubleBattleChanceAbAttr, IncrementMovePriorityAbAttr, applyAbAttrs } from "./data/ability";
import { allAbilities } from "./data/ability"; import { allAbilities } from "./data/ability";
import Battle, { BattleType, FixedBattleConfig, fixedBattles } from "./battle"; import Battle, { BattleType, FixedBattleConfig, fixedBattles } from "./battle";
import { GameMode, GameModes, gameModes } from "./game-mode"; import { GameMode, GameModes, gameModes } from "./game-mode";
@ -57,6 +56,7 @@ import { Localizable } from "./plugins/i18n";
import * as Overrides from "./overrides"; import * as Overrides from "./overrides";
import {InputsController} from "./inputs-controller"; import {InputsController} from "./inputs-controller";
import {UiInputs} from "./ui-inputs"; import {UiInputs} from "./ui-inputs";
import { NewArenaEvent } from "./battle-scene-events";
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
@ -152,7 +152,8 @@ export default class BattleScene extends SceneBase {
public money: integer; public money: integer;
public pokemonInfoContainer: PokemonInfoContainer; public pokemonInfoContainer: PokemonInfoContainer;
private party: PlayerPokemon[]; private party: PlayerPokemon[];
private waveCountText: Phaser.GameObjects.Text; /** Combined Biome and Wave count text */
private biomeWaveText: Phaser.GameObjects.Text;
private moneyText: Phaser.GameObjects.Text; private moneyText: Phaser.GameObjects.Text;
private scoreText: Phaser.GameObjects.Text; private scoreText: Phaser.GameObjects.Text;
private luckLabelText: Phaser.GameObjects.Text; private luckLabelText: Phaser.GameObjects.Text;
@ -185,13 +186,16 @@ export default class BattleScene extends SceneBase {
public rngSeedOverride: string = ""; public rngSeedOverride: string = "";
public rngOffset: integer = 0; public rngOffset: integer = 0;
/**
* Allows subscribers to listen for events
*
* Current Events:
* - {@linkcode BattleSceneEventType.MOVE_USED} {@linkcode MoveUsedEvent}
*/
public readonly eventTarget: EventTarget = new EventTarget();
constructor() { constructor() {
super("battle"); super("battle");
initSpecies();
initMoves();
initAbilities();
this.phaseQueue = []; this.phaseQueue = [];
this.phaseQueuePrepend = []; this.phaseQueuePrepend = [];
this.phaseQueuePrependSpliceIndex = -1; this.phaseQueuePrependSpliceIndex = -1;
@ -348,9 +352,9 @@ export default class BattleScene extends SceneBase {
this.candyBar.setup(); this.candyBar.setup();
this.fieldUI.add(this.candyBar); this.fieldUI.add(this.candyBar);
this.waveCountText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, startingWave.toString(), TextStyle.BATTLE_INFO); this.biomeWaveText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, startingWave.toString(), TextStyle.BATTLE_INFO);
this.waveCountText.setOrigin(1, 0); this.biomeWaveText.setOrigin(1, 0);
this.fieldUI.add(this.waveCountText); this.fieldUI.add(this.biomeWaveText);
this.moneyText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "", TextStyle.MONEY); this.moneyText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "", TextStyle.MONEY);
this.moneyText.setOrigin(1, 0); this.moneyText.setOrigin(1, 0);
@ -478,7 +482,7 @@ export default class BattleScene extends SceneBase {
} }
}); });
this.updateWaveCountText(); this.updateBiomeWaveText();
this.updateMoneyText(); this.updateMoneyText();
this.updateScoreText(); this.updateScoreText();
} }
@ -792,8 +796,8 @@ export default class BattleScene extends SceneBase {
this.currentBattle = null; this.currentBattle = null;
this.waveCountText.setText(startingWave.toString()); this.biomeWaveText.setText(startingWave.toString());
this.waveCountText.setVisible(false); this.biomeWaveText.setVisible(false);
this.updateMoneyText(); this.updateMoneyText();
this.moneyText.setVisible(false); this.moneyText.setVisible(false);
@ -992,6 +996,7 @@ export default class BattleScene extends SceneBase {
newArena(biome: Biome): Arena { newArena(biome: Biome): Arena {
this.arena = new Arena(this, biome, Biome[biome].toLowerCase()); this.arena = new Arena(this, biome, Biome[biome].toLowerCase());
this.eventTarget.dispatchEvent(new NewArenaEvent());
this.arenaBg.pipelineData = { terrainColorRatio: this.arena.getBgTerrainColorRatioForBiome() }; this.arenaBg.pipelineData = { terrainColorRatio: this.arena.getBgTerrainColorRatioForBiome() };
@ -1242,16 +1247,17 @@ export default class BattleScene extends SceneBase {
}); });
} }
updateWaveCountText(): void { updateBiomeWaveText(): void {
const isBoss = !(this.currentBattle.waveIndex % 10); const isBoss = !(this.currentBattle.waveIndex % 10);
this.waveCountText.setText(this.currentBattle.waveIndex.toString()); const biomeString: string = getBiomeName(this.arena.biomeType);
this.waveCountText.setColor(!isBoss ? "#404040" : "#f89890"); this.biomeWaveText.setText( biomeString + " - " + this.currentBattle.waveIndex.toString());
this.waveCountText.setShadowColor(!isBoss ? "#ded6b5" : "#984038"); this.biomeWaveText.setColor(!isBoss ? "#ffffff" : "#f89890");
this.waveCountText.setVisible(true); this.biomeWaveText.setShadowColor(!isBoss ? "#636363" : "#984038");
this.biomeWaveText.setVisible(true);
} }
updateMoneyText(): void { updateMoneyText(): void {
this.moneyText.setText(`${this.money.toLocaleString("en-US")}`); this.moneyText.setText(`${Utils.formatLargeNumber(this.money, 1000)}`);
this.moneyText.setVisible(true); this.moneyText.setVisible(true);
} }
@ -1295,8 +1301,8 @@ export default class BattleScene extends SceneBase {
updateUIPositions(): void { updateUIPositions(): void {
const enemyModifierCount = this.enemyModifiers.filter(m => m.isIconVisible(this)).length; const enemyModifierCount = this.enemyModifiers.filter(m => m.isIconVisible(this)).length;
this.waveCountText.setY(-(this.game.canvas.height / 6) + (enemyModifierCount ? enemyModifierCount <= 12 ? 15 : 24 : 0)); this.biomeWaveText.setY(-(this.game.canvas.height / 6) + (enemyModifierCount ? enemyModifierCount <= 12 ? 15 : 24 : 0));
this.moneyText.setY(this.waveCountText.y + 10); this.moneyText.setY(this.biomeWaveText.y + 10);
this.scoreText.setY(this.moneyText.y + 10); this.scoreText.setY(this.moneyText.y + 10);
[ this.luckLabelText, this.luckText ].map(l => l.setY((this.scoreText.visible ? this.scoreText : this.moneyText).y + 10)); [ this.luckLabelText, this.luckText ].map(l => l.setY((this.scoreText.visible ? this.scoreText : this.moneyText).y + 10));
const offsetY = (this.scoreText.visible ? this.scoreText : this.moneyText).y + 15; const offsetY = (this.scoreText.visible ? this.scoreText : this.moneyText).y + 15;

View File

@ -11,6 +11,7 @@ import { BattleSpec } from "./enums/battle-spec";
import { PlayerGender } from "./system/game-data"; import { PlayerGender } from "./system/game-data";
import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/modifier"; import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/modifier";
import { PokeballType } from "./data/pokeball"; import { PokeballType } from "./data/pokeball";
import {trainerConfigs} from "#app/data/trainer-config";
export enum BattleType { export enum BattleType {
WILD, WILD,
@ -309,6 +310,10 @@ function getRandomTrainerFunc(trainerPool: (TrainerType | TrainerType[])[]): Get
: trainerPoolEntry; : trainerPoolEntry;
trainerTypes.push(trainerType); trainerTypes.push(trainerType);
} }
// If the trainer type has a double variant, there's a 33% chance of it being a double battle
if (trainerConfigs[trainerTypes[rand]].trainerTypeDouble) {
return new Trainer(scene, trainerTypes[rand], Utils.randSeedInt(3) ? TrainerVariant.DOUBLE : TrainerVariant.DEFAULT);
}
return new Trainer(scene, trainerTypes[rand], TrainerVariant.DEFAULT); return new Trainer(scene, trainerTypes[rand], TrainerVariant.DEFAULT);
}; };
} }
@ -331,15 +336,15 @@ export const fixedBattles: FixedBattleConfigs = {
[145]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) [145]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
.setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_5, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)), .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_5, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)),
[182]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) [182]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LORELEI, TrainerType.WILL, TrainerType.SIDNEY, TrainerType.AARON, TrainerType.SHAUNTAL, TrainerType.MALVA, [ TrainerType.HALA, TrainerType.MOLAYNE ], TrainerType.RIKA, TrainerType.CRISPIN ])), .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LORELEI, TrainerType.WILL, TrainerType.SIDNEY, TrainerType.AARON, TrainerType.SHAUNTAL, TrainerType.MALVA, [ TrainerType.HALA, TrainerType.MOLAYNE ],TrainerType.MARNIE_ELITE, TrainerType.RIKA, TrainerType.CRISPIN ])),
[184]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182) [184]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BRUNO, TrainerType.KOGA, TrainerType.PHOEBE, TrainerType.BERTHA, TrainerType.MARSHAL, TrainerType.SIEBOLD, TrainerType.OLIVIA, TrainerType.POPPY, TrainerType.AMARYS ])), .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BRUNO, TrainerType.KOGA, TrainerType.PHOEBE, TrainerType.BERTHA, TrainerType.MARSHAL, TrainerType.SIEBOLD, TrainerType.OLIVIA, TrainerType.NESSA_ELITE, TrainerType.POPPY, TrainerType.AMARYS ])),
[186]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182) [186]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.AGATHA, TrainerType.BRUNO, TrainerType.GLACIA, TrainerType.FLINT, TrainerType.GRIMSLEY, TrainerType.WIKSTROM, TrainerType.ACEROLA, TrainerType.LARRY_ELITE, TrainerType.LACEY ])), .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.AGATHA, TrainerType.BRUNO, TrainerType.GLACIA, TrainerType.FLINT, TrainerType.GRIMSLEY, TrainerType.WIKSTROM, TrainerType.ACEROLA, [TrainerType.BEA_ELITE,TrainerType.ALLISTER_ELITE], TrainerType.LARRY_ELITE, TrainerType.LACEY ])),
[188]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182) [188]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI, TrainerType.HASSEL, TrainerType.DRAYTON ])), .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI,TrainerType.RAIHAN_ELITE, TrainerType.HASSEL, TrainerType.DRAYTON ])),
[190]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182) [190]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182)
.setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BLUE, [ TrainerType.RED, TrainerType.LANCE_CHAMPION ], [ TrainerType.STEVEN, TrainerType.WALLACE ], TrainerType.CYNTHIA, [ TrainerType.ALDER, TrainerType.IRIS ], TrainerType.DIANTHA, TrainerType.HAU, [ TrainerType.GEETA, TrainerType.NEMONA ], TrainerType.KIERAN, TrainerType.LEON ])), .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BLUE, [ TrainerType.RED, TrainerType.LANCE_CHAMPION ], [ TrainerType.STEVEN, TrainerType.WALLACE ], TrainerType.CYNTHIA, [ TrainerType.ALDER, TrainerType.IRIS ], TrainerType.DIANTHA, TrainerType.HAU,TrainerType.LEON, [ TrainerType.GEETA, TrainerType.NEMONA ], TrainerType.KIERAN])),
[195]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) [195]: new FixedBattleConfig().setBattleType(BattleType.TRAINER)
.setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_6, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_6, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT))
}; };

View File

@ -2,14 +2,14 @@ import Pokemon, { HitResult, PokemonMove } from "../field/pokemon";
import { Type } from "./type"; import { Type } from "./type";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { BattleStat, getBattleStatName } from "./battle-stat"; import { BattleStat, getBattleStatName } from "./battle-stat";
import { PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases"; import { MovePhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases";
import { getPokemonMessage, getPokemonPrefix } from "../messages"; import { getPokemonMessage, getPokemonPrefix } from "../messages";
import { Weather, WeatherType } from "./weather"; import { Weather, WeatherType } from "./weather";
import { BattlerTag } from "./battler-tags"; import { BattlerTag } from "./battler-tags";
import { BattlerTagType } from "./enums/battler-tag-type"; import { BattlerTagType } from "./enums/battler-tag-type";
import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect"; import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect";
import { Gender } from "./gender"; import { Gender } from "./gender";
import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves, StatusMove, VariablePowerAttr, applyMoveAttrs, IncrementMovePriorityAttr } from "./move"; import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves, StatusMove, SelfStatusMove, VariablePowerAttr, applyMoveAttrs, IncrementMovePriorityAttr } from "./move";
import { ArenaTagSide, ArenaTrapTag } from "./arena-tag"; import { ArenaTagSide, ArenaTrapTag } from "./arena-tag";
import { ArenaTagType } from "./enums/arena-tag-type"; import { ArenaTagType } from "./enums/arena-tag-type";
import { Stat } from "./pokemon-stat"; import { Stat } from "./pokemon-stat";
@ -20,8 +20,10 @@ import { SpeciesFormChangeManualTrigger } from "./pokemon-forms";
import { Abilities } from "./enums/abilities"; import { Abilities } from "./enums/abilities";
import i18next, { Localizable } from "#app/plugins/i18n.js"; import i18next, { Localizable } from "#app/plugins/i18n.js";
import { Command } from "../ui/command-ui-handler"; import { Command } from "../ui/command-ui-handler";
import { getPokeballName } from "./pokeball";
import { BerryModifierType } from "#app/modifier/modifier-type"; import { BerryModifierType } from "#app/modifier/modifier-type";
import { getPokeballName } from "./pokeball";
import { Species } from "./enums/species";
import {BattlerIndex} from "#app/battle";
export class Ability implements Localizable { export class Ability implements Localizable {
public id: Abilities; public id: Abilities;
@ -254,7 +256,7 @@ export class PreDefendFullHpEndureAbAttr extends PreDefendAbAttr {
applyPreDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, cancelled: Utils.BooleanHolder, args: any[]): boolean { applyPreDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, cancelled: Utils.BooleanHolder, args: any[]): boolean {
if (pokemon.hp === pokemon.getMaxHp() && if (pokemon.hp === pokemon.getMaxHp() &&
pokemon.getMaxHp() > 1 && //Checks if pokemon has wonder_guard (which forces 1hp) pokemon.getMaxHp() > 1 && //Checks if pokemon has wonder_guard (which forces 1hp)
(args[0] as Utils.NumberHolder).value >= pokemon.hp){ //Damage >= hp (args[0] as Utils.NumberHolder).value >= pokemon.hp) { //Damage >= hp
return pokemon.addTag(BattlerTagType.STURDY, 1); return pokemon.addTag(BattlerTagType.STURDY, 1);
} }
@ -499,11 +501,11 @@ export class FieldPriorityMoveImmunityAbAttr extends PreDefendAbAttr {
applyMoveAttrs(IncrementMovePriorityAttr,attacker,null,move.getMove(),attackPriority); applyMoveAttrs(IncrementMovePriorityAttr,attacker,null,move.getMove(),attackPriority);
applyAbAttrs(IncrementMovePriorityAbAttr, attacker, null, move.getMove(), attackPriority); applyAbAttrs(IncrementMovePriorityAbAttr, attacker, null, move.getMove(), attackPriority);
if(move.getMove().moveTarget===MoveTarget.USER) { if (move.getMove().moveTarget===MoveTarget.USER) {
return false; return false;
} }
if(attackPriority.value > 0 && !move.getMove().isMultiTarget()) { if (attackPriority.value > 0 && !move.getMove().isMultiTarget()) {
cancelled.value = true; cancelled.value = true;
return true; return true;
} }
@ -554,7 +556,10 @@ export class MoveImmunityStatChangeAbAttr extends MoveImmunityAbAttr {
applyPreDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, cancelled: Utils.BooleanHolder, args: any[]): boolean { applyPreDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, cancelled: Utils.BooleanHolder, args: any[]): boolean {
const ret = super.applyPreDefend(pokemon, passive, attacker, move, cancelled, args); const ret = super.applyPreDefend(pokemon, passive, attacker, move, cancelled, args);
if (ret) { if (ret) {
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.levels)); const simulated = args.length > 1 && args[1];
if (!simulated) {
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ this.stat ], this.levels));
}
} }
return ret; return ret;
@ -955,7 +960,7 @@ export class MoveTypeChangePowerMultiplierAbAttr extends VariableMoveTypeAbAttr
private newType: Type; private newType: Type;
private powerMultiplier: number; private powerMultiplier: number;
constructor(matchType: Type, newType: Type, powerMultiplier: number){ constructor(matchType: Type, newType: Type, powerMultiplier: number) {
super(true); super(true);
this.matchType = matchType; this.matchType = matchType;
this.newType = newType; this.newType = newType;
@ -986,7 +991,7 @@ export class MoveTypeChangeAttr extends PreAttackAbAttr {
private powerMultiplier: number; private powerMultiplier: number;
private condition: PokemonAttackCondition; private condition: PokemonAttackCondition;
constructor(newType: Type, powerMultiplier: number, condition: PokemonAttackCondition){ constructor(newType: Type, powerMultiplier: number, condition: PokemonAttackCondition) {
super(true); super(true);
this.newType = newType; this.newType = newType;
this.powerMultiplier = powerMultiplier; this.powerMultiplier = powerMultiplier;
@ -1015,7 +1020,7 @@ export class DamageBoostAbAttr extends PreAttackAbAttr {
private damageMultiplier: number; private damageMultiplier: number;
private condition: PokemonAttackCondition; private condition: PokemonAttackCondition;
constructor(damageMultiplier: number, condition: PokemonAttackCondition){ constructor(damageMultiplier: number, condition: PokemonAttackCondition) {
super(true); super(true);
this.damageMultiplier = damageMultiplier; this.damageMultiplier = damageMultiplier;
this.condition = condition; this.condition = condition;
@ -1777,6 +1782,39 @@ export class ProtectStatAbAttr extends PreStatChangeAbAttr {
} }
} }
/**
* This attribute applies confusion to the target whenever the user
* directly poisons them with a move, e.g. Poison Puppeteer.
* Called in {@linkcode StatusEffectAttr}.
* @extends PostAttackAbAttr
* @see {@linkcode applyPostAttack}
*/
export class ConfusionOnStatusEffectAbAttr extends PostAttackAbAttr {
/** List of effects to apply confusion after */
private effects: StatusEffect[];
constructor(...effects: StatusEffect[]) {
super();
this.effects = effects;
}
/**
* Applies confusion to the target pokemon.
* @param pokemon {@link Pokemon} attacking
* @param passive N/A
* @param defender {@link Pokemon} defending
* @param move {@link Move} used to apply status effect and confusion
* @param hitResult N/A
* @param args [0] {@linkcode StatusEffect} applied by move
* @returns true if defender is confused
*/
applyPostAttack(pokemon: Pokemon, passive: boolean, defender: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
if (this.effects.indexOf(args[0]) > -1 && !defender.isFainted()) {
return defender.addTag(BattlerTagType.CONFUSED, pokemon.randSeedInt(3,2), move.moveId, defender.id);
}
return false;
}
}
export class PreSetStatusAbAttr extends AbAttr { export class PreSetStatusAbAttr extends AbAttr {
applyPreSetStatus(pokemon: Pokemon, passive: boolean, effect: StatusEffect, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise<boolean> { applyPreSetStatus(pokemon: Pokemon, passive: boolean, effect: StatusEffect, cancelled: Utils.BooleanHolder, args: any[]): boolean | Promise<boolean> {
return false; return false;
@ -1860,7 +1898,7 @@ export class MultCritAbAttr extends AbAttr {
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
const critMult = args[0] as Utils.NumberHolder; const critMult = args[0] as Utils.NumberHolder;
if (critMult.value > 1){ if (critMult.value > 1) {
critMult.value *= this.multAmount; critMult.value *= this.multAmount;
return true; return true;
} }
@ -1892,7 +1930,7 @@ export class ConditionalCritAbAttr extends AbAttr {
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean { apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
const target = (args[1] as Pokemon); const target = (args[1] as Pokemon);
const move = (args[2] as Move); const move = (args[2] as Move);
if(!this.condition(pokemon,target,move)) { if (!this.condition(pokemon,target,move)) {
return false; return false;
} }
@ -2410,8 +2448,8 @@ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr {
*/ */
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise<boolean> { applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise<boolean> {
let hadEffect: boolean = false; let hadEffect: boolean = false;
for(const opp of pokemon.getOpponents()) { for (const opp of pokemon.getOpponents()) {
if(opp.status !== undefined && opp.status.effect === StatusEffect.SLEEP) { if (opp.status !== undefined && opp.status.effect === StatusEffect.SLEEP) {
opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER); opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER);
pokemon.scene.queueMessage(i18next.t("abilityTriggers:badDreams", {pokemonName: `${getPokemonPrefix(opp)}${opp.name}`})); pokemon.scene.queueMessage(i18next.t("abilityTriggers:badDreams", {pokemonName: `${getPokemonPrefix(opp)}${opp.name}`}));
hadEffect = true; hadEffect = true;
@ -2440,7 +2478,7 @@ export class FetchBallAbAttr extends PostTurnAbAttr {
*/ */
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean { applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
const lastUsed = pokemon.scene.currentBattle.lastUsedPokeball; const lastUsed = pokemon.scene.currentBattle.lastUsedPokeball;
if(lastUsed !== null && pokemon.isPlayer) { if (lastUsed !== null && pokemon.isPlayer) {
pokemon.scene.pokeballCounts[lastUsed]++; pokemon.scene.pokeballCounts[lastUsed]++;
pokemon.scene.currentBattle.lastUsedPokeball = null; pokemon.scene.currentBattle.lastUsedPokeball = null;
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` found a\n${getPokeballName(lastUsed)}!`)); pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` found a\n${getPokeballName(lastUsed)}!`));
@ -2484,6 +2522,62 @@ export class PostBiomeChangeTerrainChangeAbAttr extends PostBiomeChangeAbAttr {
} }
} }
/**
* Triggers just after a move is used either by the opponent or the player
* @extends AbAttr
*/
export class PostMoveUsedAbAttr extends AbAttr {
applyPostMoveUsed(pokemon: Pokemon, move: PokemonMove, source: Pokemon, targets: BattlerIndex[], args: any[]): boolean | Promise<boolean> {
return false;
}
}
/**
* Triggers after a dance move is used either by the opponent or the player
* @extends PostMoveUsedAbAttr
*/
export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr {
/**
* Resolves the Dancer ability by replicating the move used by the source of the dance
* either on the source itself or on the target of the dance
* @param dancer {@linkcode Pokemon} with Dancer ability
* @param move {@linkcode PokemonMove} Dancing move used by the source
* @param source {@linkcode Pokemon} that used the dancing move
* @param targets {@linkcode BattlerIndex}Targets of the dancing move
* @param args N/A
*
* @return true if the Dancer ability was resolved
*/
applyPostMoveUsed(dancer: Pokemon, move: PokemonMove, source: Pokemon, targets: BattlerIndex[], args: any[]): boolean | Promise<boolean> {
// The move to replicate cannot come from the Dancer
if (source.getBattlerIndex() !== dancer.getBattlerIndex()) {
// If the move is an AttackMove or a StatusMove the Dancer must replicate the move on the source of the Dance
if (move.getMove() instanceof AttackMove || move.getMove() instanceof StatusMove) {
const target = this.getTarget(dancer, source, targets);
dancer.scene.unshiftPhase(new MovePhase(dancer.scene, dancer, target, move, true));
} else if (move.getMove() instanceof SelfStatusMove) {
// If the move is a SelfStatusMove (ie. Swords Dance) the Dancer should replicate it on itself
dancer.scene.unshiftPhase(new MovePhase(dancer.scene, dancer, [dancer.getBattlerIndex()], move, true));
}
}
return true;
}
/**
* Get the correct targets of Dancer ability
*
* @param dancer {@linkcode Pokemon} Pokemon with Dancer ability
* @param source {@linkcode Pokemon} Source of the dancing move
* @param targets {@linkcode BattlerIndex} Targets of the dancing move
*/
getTarget(dancer: Pokemon, source: Pokemon, targets: BattlerIndex[]) : BattlerIndex[] {
if (dancer.isPlayer()) {
return source.isPlayer() ? targets : [source.getBattlerIndex()];
}
return source.isPlayer() ? [source.getBattlerIndex()] : targets;
}
}
export class StatChangeMultiplierAbAttr extends AbAttr { export class StatChangeMultiplierAbAttr extends AbAttr {
private multiplier: integer; private multiplier: integer;
@ -2575,7 +2669,7 @@ export class ArenaTrapAbAttr extends CheckTrappedAbAttr {
* @returns if enemy Pokemon is trapped or not * @returns if enemy Pokemon is trapped or not
*/ */
applyCheckTrapped(pokemon: Pokemon, passive: boolean, trapped: Utils.BooleanHolder, otherPokemon: Pokemon, args: any[]): boolean { applyCheckTrapped(pokemon: Pokemon, passive: boolean, trapped: Utils.BooleanHolder, otherPokemon: Pokemon, args: any[]): boolean {
if (otherPokemon.getTypes().includes(Type.GHOST)){ if (otherPokemon.getTypes().includes(Type.GHOST)) {
trapped.value = false; trapped.value = false;
return false; return false;
} }
@ -2641,7 +2735,7 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr {
if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) { if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) {
const cancelled = new Utils.BooleanHolder(false); const cancelled = new Utils.BooleanHolder(false);
pokemon.scene.getField(true).map(p=>applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled)); pokemon.scene.getField(true).map(p=>applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled));
if (cancelled) { if (cancelled.value) {
return false; return false;
} }
attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER); attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER);
@ -2918,6 +3012,29 @@ export class IgnoreTypeStatusEffectImmunityAbAttr extends AbAttr {
} }
} }
/**
* Gives money to the user after the battle.
*
* @extends PostBattleAbAttr
* @see {@linkcode applyPostBattle}
*/
export class MoneyAbAttr extends PostBattleAbAttr {
constructor() {
super();
}
/**
* @param pokemon {@linkcode Pokemon} that is the user of this ability.
* @param passive N/A
* @param args N/A
* @returns true
*/
applyPostBattle(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
pokemon.scene.currentBattle.moneyScattered += pokemon.scene.getWaveMoneyAmount(0.2);
return true;
}
}
function applyAbAttrsInternal<TAttr extends AbAttr>(attrType: { new(...args: any[]): TAttr }, function applyAbAttrsInternal<TAttr extends AbAttr>(attrType: { new(...args: any[]): TAttr },
pokemon: Pokemon, applyFunc: AbAttrApplyFunc<TAttr>, args: any[], isAsync: boolean = false, showAbilityInstant: boolean = false, quiet: boolean = false, passive: boolean = false): Promise<void> { pokemon: Pokemon, applyFunc: AbAttrApplyFunc<TAttr>, args: any[], isAsync: boolean = false, showAbilityInstant: boolean = false, quiet: boolean = false, passive: boolean = false): Promise<void> {
return new Promise(resolve => { return new Promise(resolve => {
@ -3013,6 +3130,11 @@ export function applyPostDefendAbAttrs(attrType: { new(...args: any[]): PostDefe
return applyAbAttrsInternal<PostDefendAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPostDefend(pokemon, passive, attacker, move, hitResult, args), args); return applyAbAttrsInternal<PostDefendAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPostDefend(pokemon, passive, attacker, move, hitResult, args), args);
} }
export function applyPostMoveUsedAbAttrs(attrType: { new(...args: any[]): PostMoveUsedAbAttr },
pokemon: Pokemon, move: PokemonMove, source: Pokemon, targets: BattlerIndex[], ...args: any[]): Promise<void> {
return applyAbAttrsInternal<PostMoveUsedAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPostMoveUsed(pokemon, move, source, targets, args), args);
}
export function applyBattleStatMultiplierAbAttrs(attrType: { new(...args: any[]): BattleStatMultiplierAbAttr }, export function applyBattleStatMultiplierAbAttrs(attrType: { new(...args: any[]): BattleStatMultiplierAbAttr },
pokemon: Pokemon, battleStat: BattleStat, statValue: Utils.NumberHolder, ...args: any[]): Promise<void> { pokemon: Pokemon, battleStat: BattleStat, statValue: Utils.NumberHolder, ...args: any[]): Promise<void> {
return applyAbAttrsInternal<BattleStatMultiplierAbAttr>(attrType, pokemon, (attr, passive) => attr.applyBattleStat(pokemon, passive, battleStat, statValue, args), args); return applyAbAttrsInternal<BattleStatMultiplierAbAttr>(attrType, pokemon, (attr, passive) => attr.applyBattleStat(pokemon, passive, battleStat, statValue, args), args);
@ -3458,7 +3580,7 @@ export function initAbilities() {
.attr(PostSummonWeatherChangeAbAttr, WeatherType.SNOW) .attr(PostSummonWeatherChangeAbAttr, WeatherType.SNOW)
.attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.SNOW), .attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.SNOW),
new Ability(Abilities.HONEY_GATHER, 4) new Ability(Abilities.HONEY_GATHER, 4)
.unimplemented(), .attr(MoneyAbAttr),
new Ability(Abilities.FRISK, 4) new Ability(Abilities.FRISK, 4)
.attr(FriskAbAttr), .attr(FriskAbAttr),
new Ability(Abilities.RECKLESS, 4) new Ability(Abilities.RECKLESS, 4)
@ -3769,7 +3891,7 @@ export function initAbilities() {
.attr(PostFaintHPDamageAbAttr) .attr(PostFaintHPDamageAbAttr)
.bypassFaint(), .bypassFaint(),
new Ability(Abilities.DANCER, 7) new Ability(Abilities.DANCER, 7)
.unimplemented(), .attr(PostDancingMoveAbAttr),
new Ability(Abilities.BATTERY, 7) new Ability(Abilities.BATTERY, 7)
.unimplemented(), .unimplemented(),
new Ability(Abilities.FLUFFY, 7) new Ability(Abilities.FLUFFY, 7)
@ -4091,6 +4213,6 @@ export function initAbilities() {
new Ability(Abilities.POISON_PUPPETEER, 9) new Ability(Abilities.POISON_PUPPETEER, 9)
.attr(UncopiableAbilityAbAttr) .attr(UncopiableAbilityAbAttr)
.attr(UnswappableAbilityAbAttr) .attr(UnswappableAbilityAbAttr)
.unimplemented(), .conditionalAttr(pokemon => pokemon.species.speciesId===Species.PECHARUNT,ConfusionOnStatusEffectAbAttr,StatusEffect.POISON,StatusEffect.TOXIC)
); );
} }

View File

@ -236,7 +236,7 @@ export async function printPokemon() {
let generationIndex = 0; let generationIndex = 0;
if (!region) { if (!region) {
while (++generationIndex < 9 && dexId > generationDexNumbers[generationIndex]){} while (++generationIndex < 9 && dexId > generationDexNumbers[generationIndex]) {}
} else { } else {
generationIndex = regionalForms.indexOf(region.toLowerCase()) + 6; generationIndex = regionalForms.indexOf(region.toLowerCase()) + 6;
} }

View File

@ -1,7 +1,7 @@
import { Arena } from "../field/arena"; import { Arena } from "../field/arena";
import { Type } from "./type"; import { Type } from "./type";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { MoveCategory, allMoves } from "./move"; import { MoveCategory, allMoves, MoveTarget } from "./move";
import { getPokemonMessage } from "../messages"; import { getPokemonMessage } from "../messages";
import Pokemon, { HitResult, PokemonMove } from "../field/pokemon"; import Pokemon, { HitResult, PokemonMove } from "../field/pokemon";
import { MoveEffectPhase, PokemonHealPhase, StatChangePhase} from "../phases"; import { MoveEffectPhase, PokemonHealPhase, StatChangePhase} from "../phases";
@ -11,6 +11,7 @@ import { Moves } from "./enums/moves";
import { ArenaTagType } from "./enums/arena-tag-type"; import { ArenaTagType } from "./enums/arena-tag-type";
import { BlockNonDirectDamageAbAttr, ProtectStatAbAttr, applyAbAttrs } from "./ability"; import { BlockNonDirectDamageAbAttr, ProtectStatAbAttr, applyAbAttrs } from "./ability";
import { BattleStat } from "./battle-stat"; import { BattleStat } from "./battle-stat";
import { CommonAnim, CommonBattleAnim } from "./battle-anims";
export enum ArenaTagSide { export enum ArenaTagSide {
BOTH, BOTH,
@ -146,6 +147,128 @@ class AuroraVeilTag extends WeakenMoveScreenTag {
} }
} }
type ProtectConditionFunc = (...args: any[]) => boolean;
/**
* Abstract class to implement conditional team protection
* applies protection based on the attributes of incoming moves
* @param protectConditionFunc: The function determining if an incoming move is negated
*/
abstract class ConditionalProtectTag extends ArenaTag {
protected protectConditionFunc: ProtectConditionFunc;
constructor(tagType: ArenaTagType, sourceMove: Moves, sourceId: integer, side: ArenaTagSide, condition: ProtectConditionFunc) {
super(tagType, 1, sourceMove, sourceId, side);
this.protectConditionFunc = condition;
}
onAdd(arena: Arena): void {
arena.scene.queueMessage(`${super.getMoveName()} protected${this.side === ArenaTagSide.PLAYER ? " your" : this.side === ArenaTagSide.ENEMY ? " the\nopposing" : ""} team!`);
}
// Removes default message for effect removal
onRemove(arena: Arena): void { }
/**
* apply(): Checks incoming moves against the condition function
* and protects the target if conditions are met
* @param arena The arena containing this tag
* @param args[0] (Utils.BooleanHolder) Signals if the move is cancelled
* @param args[1] (Pokemon) The intended target of the move
* @param args[2...] (any[]) The parameters to the condition function
* @returns
*/
apply(arena: Arena, args: any[]): boolean {
if ((args[0] as Utils.BooleanHolder).value) {
return false;
}
const target = args[1] as Pokemon;
if ((this.side === ArenaTagSide.PLAYER) === target.isPlayer()
&& this.protectConditionFunc(...args.slice(2))) {
(args[0] as Utils.BooleanHolder).value = true;
new CommonBattleAnim(CommonAnim.PROTECT, target).play(arena.scene);
arena.scene.queueMessage(`${super.getMoveName()} protected ${getPokemonMessage(target, "!")}`);
return true;
}
return false;
}
}
/**
* Arena Tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Quick_Guard_(move) Quick Guard}
* Condition: The incoming move has increased priority.
*/
class QuickGuardTag extends ConditionalProtectTag {
constructor(sourceId: integer, side: ArenaTagSide) {
super(ArenaTagType.QUICK_GUARD, Moves.QUICK_GUARD, sourceId, side,
(priority: integer) : boolean => {
return priority > 0;
}
);
}
}
/**
* Arena Tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Wide_Guard_(move) Wide Guard}
* Condition: The incoming move can target multiple Pokemon. The move's source
* can be an ally or enemy.
*/
class WideGuardTag extends ConditionalProtectTag {
constructor(sourceId: integer, side: ArenaTagSide) {
super(ArenaTagType.WIDE_GUARD, Moves.WIDE_GUARD, sourceId, side,
(moveTarget: MoveTarget) : boolean => {
switch (moveTarget) {
case MoveTarget.ALL_ENEMIES:
case MoveTarget.ALL_NEAR_ENEMIES:
case MoveTarget.ALL_OTHERS:
case MoveTarget.ALL_NEAR_OTHERS:
return true;
}
return false;
}
);
}
}
/**
* Arena Tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Mat_Block_(move) Mat Block}
* Condition: The incoming move is a Physical or Special attack move.
*/
class MatBlockTag extends ConditionalProtectTag {
constructor(sourceId: integer, side: ArenaTagSide) {
super(ArenaTagType.MAT_BLOCK, Moves.MAT_BLOCK, sourceId, side,
(moveCategory: MoveCategory) : boolean => {
return moveCategory !== MoveCategory.STATUS;
}
);
}
onAdd(arena: Arena) {
const source = arena.scene.getPokemonById(this.sourceId);
arena.scene.queueMessage(getPokemonMessage(source, " intends to flip up a mat\nand block incoming attacks!"));
}
}
/**
* Arena Tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Crafty_Shield_(move) Crafty Shield}
* Condition: The incoming move is a Status move, is not a hazard, and does
* not target all Pokemon or sides of the field.
*/
class CraftyShieldTag extends ConditionalProtectTag {
constructor(sourceId: integer, side: ArenaTagSide) {
super(ArenaTagType.CRAFTY_SHIELD, Moves.CRAFTY_SHIELD, sourceId, side,
(moveCategory: MoveCategory, moveTarget: MoveTarget) : boolean => {
return moveCategory === MoveCategory.STATUS
&& moveTarget !== MoveTarget.ENEMY_SIDE
&& moveTarget !== MoveTarget.BOTH_SIDES
&& moveTarget !== MoveTarget.ALL;
}
);
}
}
class WishTag extends ArenaTag { class WishTag extends ArenaTag {
private battlerIndex: BattlerIndex; private battlerIndex: BattlerIndex;
private triggerMessage: string; private triggerMessage: string;
@ -513,6 +636,14 @@ export function getArenaTag(tagType: ArenaTagType, turnCount: integer, sourceMov
switch (tagType) { switch (tagType) {
case ArenaTagType.MIST: case ArenaTagType.MIST:
return new MistTag(turnCount, sourceId, side); return new MistTag(turnCount, sourceId, side);
case ArenaTagType.QUICK_GUARD:
return new QuickGuardTag(sourceId, side);
case ArenaTagType.WIDE_GUARD:
return new WideGuardTag(sourceId, side);
case ArenaTagType.MAT_BLOCK:
return new MatBlockTag(sourceId, side);
case ArenaTagType.CRAFTY_SHIELD:
return new CraftyShieldTag(sourceId, side);
case ArenaTagType.MUD_SPORT: case ArenaTagType.MUD_SPORT:
return new MudSportTag(turnCount, sourceId); return new MudSportTag(turnCount, sourceId);
case ArenaTagType.WATER_SPORT: case ArenaTagType.WATER_SPORT:

View File

@ -178,7 +178,7 @@ export class FlinchedTag extends BattlerTag {
} }
export class InterruptedTag extends BattlerTag { export class InterruptedTag extends BattlerTag {
constructor(sourceMove: Moves){ constructor(sourceMove: Moves) {
super(BattlerTagType.INTERRUPTED, BattlerTagLapseType.PRE_MOVE, 0, sourceMove); super(BattlerTagType.INTERRUPTED, BattlerTagLapseType.PRE_MOVE, 0, sourceMove);
} }
@ -254,6 +254,51 @@ export class ConfusedTag extends BattlerTag {
} }
} }
/**
* Tag applied to the {@linkcode Move.DESTINY_BOND} user.
* @extends BattlerTag
* @see {@linkcode apply}
*/
export class DestinyBondTag extends BattlerTag {
constructor(sourceMove: Moves, sourceId: integer) {
super(BattlerTagType.DESTINY_BOND, BattlerTagLapseType.PRE_MOVE, 1, sourceMove, sourceId);
}
/**
* Lapses either before the user's move and does nothing
* or after receiving fatal damage. When the damage is fatal,
* the attacking Pokemon is taken down as well, unless it's a boss.
*
* @param {Pokemon} pokemon Pokemon that is attacking the Destiny Bond user.
* @param {BattlerTagLapseType} lapseType CUSTOM or PRE_MOVE
* @returns false if the tag source fainted or one turn has passed since the application
*/
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
if (lapseType !== BattlerTagLapseType.CUSTOM) {
return super.lapse(pokemon, lapseType);
}
const source = pokemon.scene.getPokemonById(this.sourceId);
if (!source.isFainted()) {
return true;
}
if (source.getAlly() === pokemon) {
return false;
}
const targetMessage = getPokemonMessage(pokemon, "");
if (pokemon.isBossImmune()) {
pokemon.scene.queueMessage(`${targetMessage} is unaffected\nby the effects of Destiny Bond.`);
return false;
}
pokemon.scene.queueMessage(`${getPokemonMessage(source, ` took\n${targetMessage} down with it!`)}`);
pokemon.damageAndUpdate(pokemon.hp, HitResult.ONE_HIT_KO, false, false, true);
return false;
}
}
export class InfatuatedTag extends BattlerTag { export class InfatuatedTag extends BattlerTag {
constructor(sourceMove: integer, sourceId: integer) { constructor(sourceMove: integer, sourceId: integer) {
super(BattlerTagType.INFATUATED, BattlerTagLapseType.MOVE, 1, sourceMove, sourceId); super(BattlerTagType.INFATUATED, BattlerTagLapseType.MOVE, 1, sourceMove, sourceId);
@ -585,7 +630,7 @@ export class MinimizeTag extends BattlerTag {
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
//If a pokemon dynamaxes they lose minimized status //If a pokemon dynamaxes they lose minimized status
if(pokemon.isMax()){ if (pokemon.isMax()) {
return false; return false;
} }
return lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); return lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType);
@ -1416,6 +1461,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new MagnetRisenTag(tagType, sourceMove); return new MagnetRisenTag(tagType, sourceMove);
case BattlerTagType.MINIMIZED: case BattlerTagType.MINIMIZED:
return new MinimizeTag(); return new MinimizeTag();
case BattlerTagType.DESTINY_BOND:
return new DestinyBondTag(sourceMove, sourceId);
case BattlerTagType.NONE: case BattlerTagType.NONE:
default: default:
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);

View File

@ -137,7 +137,7 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
pokemon.battleData.berriesEaten.push(berryType); pokemon.battleData.berriesEaten.push(berryType);
} }
const ppRestoreMove = pokemon.getMoveset().find(m => !m.getPpRatio()) ? pokemon.getMoveset().find(m => !m.getPpRatio()) : pokemon.getMoveset().find(m => m.getPpRatio() < 1); const ppRestoreMove = pokemon.getMoveset().find(m => !m.getPpRatio()) ? pokemon.getMoveset().find(m => !m.getPpRatio()) : pokemon.getMoveset().find(m => m.getPpRatio() < 1);
if(ppRestoreMove !== undefined){ if (ppRestoreMove !== undefined) {
ppRestoreMove.ppUsed = Math.max(ppRestoreMove.ppUsed - 10, 0); ppRestoreMove.ppUsed = Math.max(ppRestoreMove.ppUsed - 10, 0);
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` restored PP to its move ${ppRestoreMove.getName()}\nusing its ${getBerryName(berryType)}!`)); pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` restored PP to its move ${ppRestoreMove.getName()}\nusing its ${getBerryName(berryType)}!`));
} }

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