Merge branch 'beta' into namespaces-i18n-plugin
@ -1,5 +1,5 @@
|
||||
import tseslint from '@typescript-eslint/eslint-plugin';
|
||||
import stylisticTs from '@stylistic/eslint-plugin-ts'
|
||||
import stylisticTs from '@stylistic/eslint-plugin-ts';
|
||||
import parser from '@typescript-eslint/parser';
|
||||
import importX from 'eslint-plugin-import-x';
|
||||
|
||||
@ -16,15 +16,15 @@ export default [
|
||||
'@typescript-eslint': tseslint
|
||||
},
|
||||
rules: {
|
||||
"eqeqeq": ["error", "always"], // Enforces the use of === and !== instead of == and !=
|
||||
"indent": ["error", 2], // Enforces a 2-space indentation
|
||||
"eqeqeq": ["error", "always"], // Enforces the use of `===` and `!==` instead of `==` and `!=`
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }], // Enforces a 2-space indentation, enforces indentation of `case ...:` statements
|
||||
"quotes": ["error", "double"], // Enforces the use of double quotes for strings
|
||||
"no-var": "error", // Disallows the use of var, enforcing let or const instead
|
||||
"prefer-const": "error", // Prefers the use of const for variables that are never reassigned
|
||||
"no-var": "error", // Disallows the use of `var`, enforcing `let` or `const` instead
|
||||
"prefer-const": "error", // Enforces the use of `const` for variables that are never reassigned
|
||||
"no-undef": "off", // Disables the rule that disallows the use of undeclared variables (TypeScript handles this)
|
||||
"@typescript-eslint/no-unused-vars": [ "error", {
|
||||
"args": "none", // Allows unused function parameters. Useful for functions with specific signatures where not all parameters are always used.
|
||||
"ignoreRestSiblings": true // Allows unused variables that are part of a rest property in object destructuring. Useful for excluding certain properties from an object while using the rest.
|
||||
"ignoreRestSiblings": true // Allows unused variables that are part of a rest property in object destructuring. Useful for excluding certain properties from an object while using the others.
|
||||
}],
|
||||
"eol-last": ["error", "always"], // Enforces at least one newline at the end of files
|
||||
"@stylistic/ts/semi": ["error", "always"], // Requires semicolons for TypeScript-specific syntax
|
||||
@ -32,14 +32,14 @@ export default [
|
||||
"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
|
||||
"curly": ["error", "all"], // Enforces the use of curly braces for all control statements
|
||||
"@stylistic/ts/brace-style": ["error", "1tbs"],
|
||||
"@stylistic/ts/brace-style": ["error", "1tbs"], // Enforces the following brace style: https://eslint.style/rules/js/brace-style#_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
|
||||
"comma-spacing": ["error", { "before": false, "after": true }], // Enforces spacing after comma
|
||||
"comma-spacing": ["error", { "before": false, "after": true }], // Enforces spacing after commas
|
||||
"import-x/extensions": ["error", "never", { "json": "always" }], // Enforces no extension for imports unless json
|
||||
"array-bracket-spacing": ["error", "always", { "objectsInArrays": false, "arraysInArrays": false }], // Enforces consistent spacing inside array brackets
|
||||
"object-curly-spacing": ["error", "always", { "arraysInObjects": false, "objectsInObjects": false }], // Enforces consistent spacing inside braces of object literals, destructuring assignments, and import/export specifiers
|
||||
|
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "pokemon-rogue-battle",
|
||||
"version": "1.0.4",
|
||||
"version": "1.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pokemon-rogue-battle",
|
||||
"version": "1.0.4",
|
||||
"version": "1.1.0",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@material/material-color-utilities": "^0.2.7",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "pokemon-rogue-battle",
|
||||
"private": true,
|
||||
"version": "1.0.4",
|
||||
"version": "1.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
@ -20,7 +20,7 @@
|
||||
"depcruise": "depcruise src",
|
||||
"depcruise:graph": "depcruise src --output-type dot | node dependency-graph.js > dependency-graph.svg",
|
||||
"create-test": "node ./create-test-boilerplate.js",
|
||||
"postinstall": "npx lefthook install && npx lefthook run post-merge"
|
||||
"postinstall": "npx lefthook install && npx lefthook run post-merge"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.3.0",
|
||||
|
BIN
public/audio/cry/718-10-complete.m4a
Normal file
@ -3416,12 +3416,12 @@
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 24,
|
||||
"h": 24
|
||||
"w": 32,
|
||||
"h": 32
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"x": 5,
|
||||
"y": 7,
|
||||
"w": 22,
|
||||
"h": 19
|
||||
},
|
||||
@ -8415,6 +8415,6 @@
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:934ea4080bad980d4fea720cc771f133:ed564bc47b79b15a763de57045178e88:110e074689c9edd2c54833ce2e4d9270$"
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:9ef21166268f7487fc9ff8d0f9b996e4:82658ac7bdd4c2b417e1f59168179262:110e074689c9edd2c54833ce2e4d9270$"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 879 B After Width: | Height: | Size: 942 B |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
40
public/images/pokemon/variant/6706.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"1": {
|
||||
"566678": "0e6296",
|
||||
"e0e4f4": "513981",
|
||||
"625287": "4e4094",
|
||||
"536273": "1f1233",
|
||||
"988b98": "b24c86",
|
||||
"9170b9": "8b69c3",
|
||||
"c4cce1": "3b235c",
|
||||
"e6d3e9": "f1a4c5",
|
||||
"bfacc1": "da75a5",
|
||||
"515f70": "197497",
|
||||
"c5cee3": "63cee1",
|
||||
"8e96aa": "301848",
|
||||
"8b93a6": "3aa8c4",
|
||||
"80737f": "8a2166",
|
||||
"4b454f": "6f1357",
|
||||
"36404c": "0c5474",
|
||||
"b791f2": "c7a1e5"
|
||||
},
|
||||
"2": {
|
||||
"566678": "8e480b",
|
||||
"e0e4f4": "176463",
|
||||
"625287": "274159",
|
||||
"536273": "02262c",
|
||||
"988b98": "2a6563",
|
||||
"9170b9": "2f667c",
|
||||
"c4cce1": "0d484a",
|
||||
"e6d3e9": "9cead8",
|
||||
"bfacc1": "5db6a9",
|
||||
"515f70": "a34205",
|
||||
"c5cee3": "f7af58",
|
||||
"8e96aa": "073338",
|
||||
"8b93a6": "d27e26",
|
||||
"80737f": "2b736f",
|
||||
"4b454f": "194f51",
|
||||
"36404c": "842401",
|
||||
"b791f2": "4a9699"
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "6706_2.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 82,
|
||||
"h": 82
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:02eb46aa66ac70df612e129b7801a85c:a77cca14b23f4f3aece64d1a82449a0f:d60cc2e5ae2bd18de8ee3ab0649593ee$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 5.0 KiB |
@ -1,41 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "6706_3.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 82,
|
||||
"h": 82
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:02eb46aa66ac70df612e129b7801a85c:a77cca14b23f4f3aece64d1a82449a0f:d60cc2e5ae2bd18de8ee3ab0649593ee$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 5.1 KiB |
@ -3721,8 +3721,8 @@
|
||||
],
|
||||
"6706": [
|
||||
0,
|
||||
2,
|
||||
2
|
||||
1,
|
||||
1
|
||||
],
|
||||
"6713": [
|
||||
0,
|
||||
@ -7754,8 +7754,8 @@
|
||||
],
|
||||
"6706": [
|
||||
0,
|
||||
2,
|
||||
2
|
||||
1,
|
||||
1
|
||||
],
|
||||
"6713": [
|
||||
0,
|
||||
@ -8493,8 +8493,8 @@
|
||||
],
|
||||
"705": [
|
||||
0,
|
||||
2,
|
||||
2
|
||||
1,
|
||||
1
|
||||
],
|
||||
"706": [
|
||||
0,
|
||||
@ -9568,8 +9568,8 @@
|
||||
],
|
||||
"6706": [
|
||||
0,
|
||||
2,
|
||||
2
|
||||
1,
|
||||
1
|
||||
],
|
||||
"female": {},
|
||||
"back": {
|
||||
@ -11095,8 +11095,8 @@
|
||||
],
|
||||
"6706": [
|
||||
0,
|
||||
2,
|
||||
2
|
||||
1,
|
||||
1
|
||||
],
|
||||
"6713": [
|
||||
0,
|
||||
|
38
public/images/pokemon/variant/back/6706.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"1": {
|
||||
"566678": "197497",
|
||||
"8e96aa": "3b235c",
|
||||
"929aad": "3aa8c4",
|
||||
"625287": "4e4094",
|
||||
"536273": "301848",
|
||||
"988b98": "b24c86",
|
||||
"36404c": "0c5474",
|
||||
"c4cce1": "513981",
|
||||
"e6d3e9": "f1a4c5",
|
||||
"bfacc1": "d074a0",
|
||||
"546475": "0e6296",
|
||||
"c5cee3": "63cee1",
|
||||
"80737f": "8a2166",
|
||||
"4b454f": "6f1357",
|
||||
"9170b9": "8b69c3",
|
||||
"b791f2": "c7a1e5"
|
||||
},
|
||||
"2": {
|
||||
"566678": "a34205",
|
||||
"8e96aa": "073338",
|
||||
"929aad": "d27e26",
|
||||
"625287": "0e3f47",
|
||||
"536273": "042329",
|
||||
"988b98": "2b736f",
|
||||
"36404c": "842401",
|
||||
"c4cce1": "0d484a",
|
||||
"e6d3e9": "9cead8",
|
||||
"bfacc1": "5db6a9",
|
||||
"546475": "8e480b",
|
||||
"c5cee3": "f7af58",
|
||||
"80737f": "194f51",
|
||||
"4b454f": "274159",
|
||||
"9170b9": "2f667c",
|
||||
"b791f2": "4a9699"
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "6706_2.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 79,
|
||||
"h": 79
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 79,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 79,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 79,
|
||||
"h": 73
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:64f7e6dfa489012922487e45ba53d557:4d24652b372939abe499497c4b6647b0:d60cc2e5ae2bd18de8ee3ab0649593ee$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.7 KiB |
@ -1,41 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "6706_3.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 79,
|
||||
"h": 79
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 79,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 79,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 79,
|
||||
"h": 73
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:64f7e6dfa489012922487e45ba53d557:4d24652b372939abe499497c4b6647b0:d60cc2e5ae2bd18de8ee3ab0649593ee$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.7 KiB |
40
public/images/pokemon/variant/exp/6706.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"1": {
|
||||
"566678": "0e6296",
|
||||
"e0e4f4": "513981",
|
||||
"625287": "4e4094",
|
||||
"536273": "1f1233",
|
||||
"988b98": "b24c86",
|
||||
"36404c": "0c5474",
|
||||
"c4cce1": "3b235c",
|
||||
"e6d3e9": "f1a4c5",
|
||||
"bfacc1": "da75a5",
|
||||
"515f70": "197497",
|
||||
"c5cee3": "63cee1",
|
||||
"b791f2": "c7a1e5",
|
||||
"8b93a6": "3aa8c4",
|
||||
"80737f": "8a2166",
|
||||
"4b454f": "6f1357",
|
||||
"9170b9": "8b69c3",
|
||||
"8e96aa": "301848"
|
||||
},
|
||||
"2": {
|
||||
"566678": "8e480b",
|
||||
"e0e4f4": "176463",
|
||||
"625287": "274159",
|
||||
"536273": "02262c",
|
||||
"988b98": "2a6563",
|
||||
"36404c": "842401",
|
||||
"c4cce1": "0d484a",
|
||||
"e6d3e9": "9cead8",
|
||||
"bfacc1": "5db6a9",
|
||||
"515f70": "a34205",
|
||||
"c5cee3": "f7af58",
|
||||
"b791f2": "4a9699",
|
||||
"8b93a6": "d27e26",
|
||||
"80737f": "2b736f",
|
||||
"4b454f": "194f51",
|
||||
"9170b9": "2f667c",
|
||||
"8e96aa": "073338"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 55 KiB |
33
public/images/pokemon/variant/exp/705.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"1": {
|
||||
"101010":"101010",
|
||||
"4d454d":"8a2166",
|
||||
"807380":"b93f84",
|
||||
"bfacbf":"e56ca6",
|
||||
"f2daf2":"fbb3d2",
|
||||
"665980":"4e4094",
|
||||
"8f7db3":"8b69c3",
|
||||
"b8a1e5":"c7a1e5",
|
||||
"4d993d":"aa6a00",
|
||||
"66cc52":"ffd047",
|
||||
"4e9c3e":"0c5474",
|
||||
"67cf53":"3aa8c4",
|
||||
"b6f2aa":"63cee1"
|
||||
},
|
||||
"2": {
|
||||
"101010":"101010",
|
||||
"4d454d":"194f51",
|
||||
"807380":"2b736f",
|
||||
"bfacbf":"5db6a9",
|
||||
"f2daf2":"9cead8",
|
||||
"665980":"274159",
|
||||
"8f7db3":"2f667c",
|
||||
"b8a1e5":"4a9699",
|
||||
"4d993d":"007d61",
|
||||
"66cc52":"49ffbf",
|
||||
"4e9c3e":"842401",
|
||||
"67cf53":"a34205",
|
||||
"b6f2aa":"d27e26"
|
||||
}
|
||||
}
|
||||
|
@ -1,272 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "705_2.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 154,
|
||||
"h": 154
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0006.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0008.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0005.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 46,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0009.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 46,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0007.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 91,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0004.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 0,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 58,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0010.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 0,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 58,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0003.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 42,
|
||||
"y": 58,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0011.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 42,
|
||||
"y": 58,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0002.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 58,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0012.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 58,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 35,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 119,
|
||||
"y": 58,
|
||||
"w": 35,
|
||||
"h": 58
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:4bf155254b23c88780e7eee282256589:82bb727988054c3064e203b6908ff464:6b57e983626c7fc9144ab67f30c66814$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.0 KiB |
@ -1,272 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "705_3.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 154,
|
||||
"h": 154
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0006.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0008.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 46,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0005.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 46,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0009.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 46,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0007.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 91,
|
||||
"y": 0,
|
||||
"w": 45,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0004.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 0,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 58,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0010.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 0,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 58,
|
||||
"w": 42,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0003.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 42,
|
||||
"y": 58,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0011.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 42,
|
||||
"y": 58,
|
||||
"w": 41,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0002.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 58,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0012.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 58,
|
||||
"w": 36,
|
||||
"h": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 49,
|
||||
"h": 58
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 35,
|
||||
"h": 58
|
||||
},
|
||||
"frame": {
|
||||
"x": 119,
|
||||
"y": 58,
|
||||
"w": 35,
|
||||
"h": 58
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:4bf155254b23c88780e7eee282256589:82bb727988054c3064e203b6908ff464:6b57e983626c7fc9144ab67f30c66814$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.0 KiB |
38
public/images/pokemon/variant/exp/back/6706.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"1": {
|
||||
"566678": "197497",
|
||||
"8e96aa": "3b235c",
|
||||
"929aad": "3aa8c4",
|
||||
"625287": "4e4094",
|
||||
"536273": "301848",
|
||||
"988b98": "b24c86",
|
||||
"36404c": "0c5474",
|
||||
"c4cce1": "513981",
|
||||
"e6d3e9": "f1a4c5",
|
||||
"bfacc1": "d074a0",
|
||||
"546475": "0e6296",
|
||||
"c5cee3": "63cee1",
|
||||
"80737f": "8a2166",
|
||||
"4b454f": "6f1357",
|
||||
"9170b9": "8b69c3",
|
||||
"b791f2": "c7a1e5"
|
||||
},
|
||||
"2": {
|
||||
"566678": "a34205",
|
||||
"8e96aa": "073338",
|
||||
"929aad": "d27e26",
|
||||
"625287": "0e3f47",
|
||||
"536273": "042329",
|
||||
"988b98": "2b736f",
|
||||
"36404c": "842401",
|
||||
"c4cce1": "0d484a",
|
||||
"e6d3e9": "9cead8",
|
||||
"bfacc1": "5db6a9",
|
||||
"546475": "8e480b",
|
||||
"c5cee3": "f7af58",
|
||||
"80737f": "194f51",
|
||||
"4b454f": "274159",
|
||||
"9170b9": "2f667c",
|
||||
"b791f2": "4a9699"
|
||||
}
|
||||
}
|
@ -1,776 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "6706_2.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 358,
|
||||
"h": 358
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0002.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0005.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 1,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 84,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0006.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 1,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 84,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0034.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 1,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 69,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0003.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0004.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0035.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 250,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0036.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 250,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0007.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0008.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0013.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 72,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0014.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 72,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0025.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 141,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0026.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 141,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0027.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 141,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0032.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 249,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0033.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 249,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0011.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0012.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0017.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0018.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0028.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0029.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0021.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0022.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0015.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 165,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0016.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 165,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0023.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 247,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0024.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 247,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0009.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0010.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0019.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 3,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 288,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0020.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 3,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 288,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0030.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 242,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0031.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 242,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:5d65e2c5a6a97b7c7014a175ce3592af:3255e87f637a475d82734fc7d93baf71:d60cc2e5ae2bd18de8ee3ab0649593ee$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 22 KiB |
@ -1,776 +0,0 @@
|
||||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "6706_3.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 358,
|
||||
"h": 358
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0002.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 84,
|
||||
"h": 69
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0005.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 1,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 84,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0006.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 1,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 84,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0034.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 1,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 69,
|
||||
"w": 83,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0003.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0004.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0035.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 250,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0036.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 250,
|
||||
"y": 0,
|
||||
"w": 83,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0007.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0008.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 167,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0013.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 72,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0014.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 83,
|
||||
"y": 72,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0025.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 141,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0026.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 141,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0027.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 141,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0032.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 249,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0033.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 4,
|
||||
"y": 0,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 249,
|
||||
"y": 70,
|
||||
"w": 82,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0011.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0012.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0017.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0018.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0028.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0029.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 5,
|
||||
"y": 0,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 214,
|
||||
"w": 81,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0021.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0022.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 1,
|
||||
"y": 2,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
},
|
||||
"frame": {
|
||||
"x": 81,
|
||||
"y": 287,
|
||||
"w": 81,
|
||||
"h": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0015.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 165,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0016.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 165,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0023.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 247,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0024.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 2,
|
||||
"y": 1,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
},
|
||||
"frame": {
|
||||
"x": 247,
|
||||
"y": 143,
|
||||
"w": 82,
|
||||
"h": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0009.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0010.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0019.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 3,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 288,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0020.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 3,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
},
|
||||
"frame": {
|
||||
"x": 162,
|
||||
"y": 288,
|
||||
"w": 81,
|
||||
"h": 70
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0030.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 242,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
},
|
||||
{
|
||||
"filename": "0031.png",
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"sourceSize": {
|
||||
"w": 86,
|
||||
"h": 73
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
},
|
||||
"frame": {
|
||||
"x": 242,
|
||||
"y": 215,
|
||||
"w": 80,
|
||||
"h": 73
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:5d65e2c5a6a97b7c7014a175ce3592af:3255e87f637a475d82734fc7d93baf71:d60cc2e5ae2bd18de8ee3ab0649593ee$"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 6.2 KiB |
@ -4,7 +4,7 @@ import Pokemon, { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
|
||||
import PokemonSpecies, { allSpecies, getPokemonSpecies, PokemonSpeciesFilter } from "#app/data/pokemon-species";
|
||||
import { Constructor, isNullOrUndefined, randSeedInt } from "#app/utils";
|
||||
import * as Utils from "#app/utils";
|
||||
import { ConsumableModifier, ConsumablePokemonModifier, DoubleBattleChanceBoosterModifier, ExpBalanceModifier, ExpShareModifier, FusePokemonModifier, HealingBoosterModifier, Modifier, ModifierBar, ModifierPredicate, MultipleParticipantExpBonusModifier, overrideHeldItems, overrideModifiers, PersistentModifier, PokemonExpBoosterModifier, PokemonFormChangeItemModifier, PokemonHeldItemModifier, PokemonHpRestoreModifier, PokemonIncrementingStatModifier, TerastallizeModifier, TurnHeldItemTransferModifier } from "./modifier/modifier";
|
||||
import { ConsumableModifier, ConsumablePokemonModifier, DoubleBattleChanceBoosterModifier, ExpBalanceModifier, ExpShareModifier, FusePokemonModifier, HealingBoosterModifier, Modifier, ModifierBar, ModifierPredicate, MultipleParticipantExpBonusModifier, overrideHeldItems, overrideModifiers, PersistentModifier, PokemonExpBoosterModifier, PokemonFormChangeItemModifier, PokemonHeldItemModifier, PokemonHpRestoreModifier, PokemonIncrementingStatModifier, RememberMoveModifier, TerastallizeModifier, TurnHeldItemTransferModifier } from "./modifier/modifier";
|
||||
import { PokeballType } from "#app/data/pokeball";
|
||||
import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets, populateAnims } from "#app/data/battle-anims";
|
||||
import { Phase } from "#app/phase";
|
||||
@ -86,7 +86,7 @@ import { ToggleDoublePositionPhase } from "#app/phases/toggle-double-position-ph
|
||||
import { TurnInitPhase } from "#app/phases/turn-init-phase";
|
||||
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
||||
import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter";
|
||||
import { allMysteryEncounters, ANTI_VARIANCE_WEIGHT_MODIFIER, AVERAGE_ENCOUNTERS_PER_RUN_TARGET, BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT, MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT, mysteryEncountersByBiome, WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/data/mystery-encounters/mystery-encounters";
|
||||
import { allMysteryEncounters, ANTI_VARIANCE_WEIGHT_MODIFIER, AVERAGE_ENCOUNTERS_PER_RUN_TARGET, BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT, MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT, mysteryEncountersByBiome } from "#app/data/mystery-encounters/mystery-encounters";
|
||||
import { MysteryEncounterSaveData } from "#app/data/mystery-encounters/mystery-encounter-save-data";
|
||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||
@ -95,6 +95,7 @@ import { ExpPhase } from "#app/phases/exp-phase";
|
||||
import { ShowPartyExpBarPhase } from "#app/phases/show-party-exp-bar-phase";
|
||||
import { MysteryEncounterMode } from "#enums/mystery-encounter-mode";
|
||||
import { ExpGainsSpeed } from "#enums/exp-gains-speed";
|
||||
import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#app/data/balance/starters";
|
||||
|
||||
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
||||
|
||||
@ -789,7 +790,7 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
|
||||
getEnemyParty(): EnemyPokemon[] {
|
||||
return this.currentBattle?.enemyParty || [];
|
||||
return this.currentBattle?.enemyParty ?? [];
|
||||
}
|
||||
|
||||
getEnemyPokemon(): EnemyPokemon | undefined {
|
||||
@ -1190,10 +1191,7 @@ export default class BattleScene extends SceneBase {
|
||||
if (trainerConfigs[trainerType].doubleOnly) {
|
||||
doubleTrainer = true;
|
||||
} else if (trainerConfigs[trainerType].hasDouble) {
|
||||
const doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8);
|
||||
this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance);
|
||||
playerField.forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, false, doubleChance));
|
||||
doubleTrainer = !Utils.randSeedInt(doubleChance.value);
|
||||
doubleTrainer = !Utils.randSeedInt(this.getDoubleBattleChance(newWaveIndex, playerField));
|
||||
// Add a check that special trainers can't be double except for tate and liza - they should use the normal double chance
|
||||
if (trainerConfigs[trainerType].trainerTypeDouble && ![ TrainerType.TATE, TrainerType.LIZA ].includes(trainerType)) {
|
||||
doubleTrainer = false;
|
||||
@ -1206,12 +1204,10 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
// Check for mystery encounter
|
||||
// Can only occur in place of a standard (non-boss) wild battle, waves 10-180
|
||||
if (this.isWaveMysteryEncounter(newBattleType, newWaveIndex, mysteryEncounterType) || newBattleType === BattleType.MYSTERY_ENCOUNTER) {
|
||||
if (this.isWaveMysteryEncounter(newBattleType, newWaveIndex) || newBattleType === BattleType.MYSTERY_ENCOUNTER) {
|
||||
newBattleType = BattleType.MYSTERY_ENCOUNTER;
|
||||
// Reset base spawn weight
|
||||
// Reset to base spawn weight
|
||||
this.mysteryEncounterSaveData.encounterSpawnChance = BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT;
|
||||
} else if (newBattleType === BattleType.WILD) {
|
||||
this.mysteryEncounterSaveData.encounterSpawnChance += WEIGHT_INCREMENT_ON_SPAWN_MISS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1358,69 +1354,69 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
|
||||
switch (species.speciesId) {
|
||||
case Species.UNOWN:
|
||||
case Species.SHELLOS:
|
||||
case Species.GASTRODON:
|
||||
case Species.BASCULIN:
|
||||
case Species.DEERLING:
|
||||
case Species.SAWSBUCK:
|
||||
case Species.FROAKIE:
|
||||
case Species.FROGADIER:
|
||||
case Species.SCATTERBUG:
|
||||
case Species.SPEWPA:
|
||||
case Species.VIVILLON:
|
||||
case Species.FLABEBE:
|
||||
case Species.FLOETTE:
|
||||
case Species.FLORGES:
|
||||
case Species.FURFROU:
|
||||
case Species.PUMPKABOO:
|
||||
case Species.GOURGEIST:
|
||||
case Species.ORICORIO:
|
||||
case Species.MAGEARNA:
|
||||
case Species.ZARUDE:
|
||||
case Species.SQUAWKABILLY:
|
||||
case Species.TATSUGIRI:
|
||||
case Species.PALDEA_TAUROS:
|
||||
return Utils.randSeedInt(species.forms.length);
|
||||
case Species.PIKACHU:
|
||||
return Utils.randSeedInt(8);
|
||||
case Species.EEVEE:
|
||||
return Utils.randSeedInt(2);
|
||||
case Species.GRENINJA:
|
||||
return Utils.randSeedInt(2);
|
||||
case Species.ZYGARDE:
|
||||
return Utils.randSeedInt(3);
|
||||
case Species.MINIOR:
|
||||
return Utils.randSeedInt(6);
|
||||
case Species.ALCREMIE:
|
||||
return Utils.randSeedInt(9);
|
||||
case Species.MEOWSTIC:
|
||||
case Species.INDEEDEE:
|
||||
case Species.BASCULEGION:
|
||||
case Species.OINKOLOGNE:
|
||||
return gender === Gender.FEMALE ? 1 : 0;
|
||||
case Species.TOXTRICITY:
|
||||
const lowkeyNatures = [ Nature.LONELY, Nature.BOLD, Nature.RELAXED, Nature.TIMID, Nature.SERIOUS, Nature.MODEST, Nature.MILD, Nature.QUIET, Nature.BASHFUL, Nature.CALM, Nature.GENTLE, Nature.CAREFUL ];
|
||||
if (nature !== undefined && lowkeyNatures.indexOf(nature) > -1) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
case Species.GIMMIGHOUL:
|
||||
// Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs
|
||||
if (this.gameMode.hasMysteryEncounters) {
|
||||
return 1; // Wandering form
|
||||
} else {
|
||||
case Species.UNOWN:
|
||||
case Species.SHELLOS:
|
||||
case Species.GASTRODON:
|
||||
case Species.BASCULIN:
|
||||
case Species.DEERLING:
|
||||
case Species.SAWSBUCK:
|
||||
case Species.FROAKIE:
|
||||
case Species.FROGADIER:
|
||||
case Species.SCATTERBUG:
|
||||
case Species.SPEWPA:
|
||||
case Species.VIVILLON:
|
||||
case Species.FLABEBE:
|
||||
case Species.FLOETTE:
|
||||
case Species.FLORGES:
|
||||
case Species.FURFROU:
|
||||
case Species.PUMPKABOO:
|
||||
case Species.GOURGEIST:
|
||||
case Species.ORICORIO:
|
||||
case Species.MAGEARNA:
|
||||
case Species.ZARUDE:
|
||||
case Species.SQUAWKABILLY:
|
||||
case Species.TATSUGIRI:
|
||||
case Species.PALDEA_TAUROS:
|
||||
return Utils.randSeedInt(species.forms.length);
|
||||
}
|
||||
case Species.PIKACHU:
|
||||
return Utils.randSeedInt(8);
|
||||
case Species.EEVEE:
|
||||
return Utils.randSeedInt(2);
|
||||
case Species.GRENINJA:
|
||||
return Utils.randSeedInt(2);
|
||||
case Species.ZYGARDE:
|
||||
return Utils.randSeedInt(4);
|
||||
case Species.MINIOR:
|
||||
return Utils.randSeedInt(6);
|
||||
case Species.ALCREMIE:
|
||||
return Utils.randSeedInt(9);
|
||||
case Species.MEOWSTIC:
|
||||
case Species.INDEEDEE:
|
||||
case Species.BASCULEGION:
|
||||
case Species.OINKOLOGNE:
|
||||
return gender === Gender.FEMALE ? 1 : 0;
|
||||
case Species.TOXTRICITY:
|
||||
const lowkeyNatures = [ Nature.LONELY, Nature.BOLD, Nature.RELAXED, Nature.TIMID, Nature.SERIOUS, Nature.MODEST, Nature.MILD, Nature.QUIET, Nature.BASHFUL, Nature.CALM, Nature.GENTLE, Nature.CAREFUL ];
|
||||
if (nature !== undefined && lowkeyNatures.indexOf(nature) > -1) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
case Species.GIMMIGHOUL:
|
||||
// Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs
|
||||
if (this.gameMode.hasMysteryEncounters) {
|
||||
return 1; // Wandering form
|
||||
} else {
|
||||
return Utils.randSeedInt(species.forms.length);
|
||||
}
|
||||
}
|
||||
|
||||
if (ignoreArena) {
|
||||
switch (species.speciesId) {
|
||||
case Species.BURMY:
|
||||
case Species.WORMADAM:
|
||||
case Species.ROTOM:
|
||||
case Species.LYCANROC:
|
||||
return Utils.randSeedInt(species.forms.length);
|
||||
case Species.BURMY:
|
||||
case Species.WORMADAM:
|
||||
case Species.ROTOM:
|
||||
case Species.LYCANROC:
|
||||
return Utils.randSeedInt(species.forms.length);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1885,17 +1881,17 @@ export default class BattleScene extends SceneBase {
|
||||
const soundDetails = sound.key.split("/");
|
||||
switch (soundDetails[0]) {
|
||||
|
||||
case "battle_anims":
|
||||
case "cry":
|
||||
if (soundDetails[1].startsWith("PRSFX- ")) {
|
||||
sound.setVolume(this.masterVolume * this.fieldVolume * 0.5);
|
||||
} else {
|
||||
sound.setVolume(this.masterVolume * this.fieldVolume);
|
||||
}
|
||||
break;
|
||||
case "se":
|
||||
case "ui":
|
||||
sound.setVolume(this.masterVolume * this.seVolume);
|
||||
case "battle_anims":
|
||||
case "cry":
|
||||
if (soundDetails[1].startsWith("PRSFX- ")) {
|
||||
sound.setVolume(this.masterVolume * this.fieldVolume * 0.5);
|
||||
} else {
|
||||
sound.setVolume(this.masterVolume * this.fieldVolume);
|
||||
}
|
||||
break;
|
||||
case "se":
|
||||
case "ui":
|
||||
sound.setVolume(this.masterVolume * this.seVolume);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1935,31 +1931,31 @@ export default class BattleScene extends SceneBase {
|
||||
const keyDetails = key.split("/");
|
||||
config["volume"] = config["volume"] ?? 1;
|
||||
switch (keyDetails[0]) {
|
||||
case "level_up_fanfare":
|
||||
case "item_fanfare":
|
||||
case "minor_fanfare":
|
||||
case "heal":
|
||||
case "evolution":
|
||||
case "evolution_fanfare":
|
||||
case "level_up_fanfare":
|
||||
case "item_fanfare":
|
||||
case "minor_fanfare":
|
||||
case "heal":
|
||||
case "evolution":
|
||||
case "evolution_fanfare":
|
||||
// These sounds are loaded in as BGM, but played as sound effects
|
||||
// When these sounds are updated in updateVolume(), they are treated as BGM however because they are placed in the BGM Cache through being called by playSoundWithoutBGM()
|
||||
config["volume"] *= (this.masterVolume * this.bgmVolume);
|
||||
break;
|
||||
case "battle_anims":
|
||||
case "cry":
|
||||
config["volume"] *= (this.masterVolume * this.fieldVolume);
|
||||
//PRSFX sound files are unusually loud
|
||||
if (keyDetails[1].startsWith("PRSFX- ")) {
|
||||
config["volume"] *= 0.5;
|
||||
}
|
||||
break;
|
||||
case "ui":
|
||||
config["volume"] *= (this.masterVolume * this.bgmVolume);
|
||||
break;
|
||||
case "battle_anims":
|
||||
case "cry":
|
||||
config["volume"] *= (this.masterVolume * this.fieldVolume);
|
||||
//PRSFX sound files are unusually loud
|
||||
if (keyDetails[1].startsWith("PRSFX- ")) {
|
||||
config["volume"] *= 0.5;
|
||||
}
|
||||
break;
|
||||
case "ui":
|
||||
//As of, right now this applies to the "select", "menu_open", "error" sound effects
|
||||
config["volume"] *= (this.masterVolume * this.uiVolume);
|
||||
break;
|
||||
case "se":
|
||||
config["volume"] *= (this.masterVolume * this.seVolume);
|
||||
break;
|
||||
config["volume"] *= (this.masterVolume * this.uiVolume);
|
||||
break;
|
||||
case "se":
|
||||
config["volume"] *= (this.masterVolume * this.seVolume);
|
||||
break;
|
||||
}
|
||||
this.sound.play(key, config);
|
||||
return this.sound.get(key) as AnySound;
|
||||
@ -1988,208 +1984,208 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
getBgmLoopPoint(bgmName: string): number {
|
||||
switch (bgmName) {
|
||||
case "battle_kanto_champion": //B2W2 Kanto Champion Battle
|
||||
return 13.950;
|
||||
case "battle_johto_champion": //B2W2 Johto Champion Battle
|
||||
return 23.498;
|
||||
case "battle_hoenn_champion_g5": //B2W2 Hoenn Champion Battle
|
||||
return 11.328;
|
||||
case "battle_hoenn_champion_g6": //ORAS Hoenn Champion Battle
|
||||
return 11.762;
|
||||
case "battle_sinnoh_champion": //B2W2 Sinnoh Champion Battle
|
||||
return 12.235;
|
||||
case "battle_champion_alder": //BW Unova Champion Battle
|
||||
return 27.653;
|
||||
case "battle_champion_iris": //B2W2 Unova Champion Battle
|
||||
return 10.145;
|
||||
case "battle_kalos_champion": //XY Kalos Champion Battle
|
||||
return 10.380;
|
||||
case "battle_alola_champion": //USUM Alola Champion Battle
|
||||
return 13.025;
|
||||
case "battle_galar_champion": //SWSH Galar Champion Battle
|
||||
return 61.635;
|
||||
case "battle_champion_geeta": //SV Champion Geeta Battle
|
||||
return 37.447;
|
||||
case "battle_champion_nemona": //SV Champion Nemona Battle
|
||||
return 14.914;
|
||||
case "battle_champion_kieran": //SV Champion Kieran Battle
|
||||
return 7.206;
|
||||
case "battle_hoenn_elite": //ORAS Elite Four Battle
|
||||
return 11.350;
|
||||
case "battle_unova_elite": //BW Elite Four Battle
|
||||
return 17.730;
|
||||
case "battle_kalos_elite": //XY Elite Four Battle
|
||||
return 12.340;
|
||||
case "battle_alola_elite": //SM Elite Four Battle
|
||||
return 19.212;
|
||||
case "battle_galar_elite": //SWSH League Tournament Battle
|
||||
return 164.069;
|
||||
case "battle_paldea_elite": //SV Elite Four Battle
|
||||
return 12.770;
|
||||
case "battle_bb_elite": //SV BB League Elite Four Battle
|
||||
return 19.434;
|
||||
case "battle_final_encounter": //PMD RTDX Rayquaza's Domain
|
||||
return 19.159;
|
||||
case "battle_final": //BW Ghetsis Battle
|
||||
return 16.453;
|
||||
case "battle_kanto_gym": //B2W2 Kanto Gym Battle
|
||||
return 13.857;
|
||||
case "battle_johto_gym": //B2W2 Johto Gym Battle
|
||||
return 12.911;
|
||||
case "battle_hoenn_gym": //B2W2 Hoenn Gym Battle
|
||||
return 12.379;
|
||||
case "battle_sinnoh_gym": //B2W2 Sinnoh Gym Battle
|
||||
return 13.122;
|
||||
case "battle_unova_gym": //BW Unova Gym Battle
|
||||
return 19.145;
|
||||
case "battle_kalos_gym": //XY Kalos Gym Battle
|
||||
return 44.810;
|
||||
case "battle_galar_gym": //SWSH Galar Gym Battle
|
||||
return 171.262;
|
||||
case "battle_paldea_gym": //SV Paldea Gym Battle
|
||||
return 127.489;
|
||||
case "battle_legendary_kanto": //XY Kanto Legendary Battle
|
||||
return 32.966;
|
||||
case "battle_legendary_raikou": //HGSS Raikou Battle
|
||||
return 12.632;
|
||||
case "battle_legendary_entei": //HGSS Entei Battle
|
||||
return 2.905;
|
||||
case "battle_legendary_suicune": //HGSS Suicune Battle
|
||||
return 12.636;
|
||||
case "battle_legendary_lugia": //HGSS Lugia Battle
|
||||
return 19.770;
|
||||
case "battle_legendary_ho_oh": //HGSS Ho-oh Battle
|
||||
return 17.668;
|
||||
case "battle_legendary_regis_g5": //B2W2 Legendary Titan Battle
|
||||
return 49.500;
|
||||
case "battle_legendary_regis_g6": //ORAS Legendary Titan Battle
|
||||
return 21.130;
|
||||
case "battle_legendary_gro_kyo": //ORAS Groudon & Kyogre Battle
|
||||
return 10.547;
|
||||
case "battle_legendary_rayquaza": //ORAS Rayquaza Battle
|
||||
return 10.495;
|
||||
case "battle_legendary_deoxys": //ORAS Deoxys Battle
|
||||
return 13.333;
|
||||
case "battle_legendary_lake_trio": //ORAS Lake Guardians Battle
|
||||
return 16.887;
|
||||
case "battle_legendary_sinnoh": //ORAS Sinnoh Legendary Battle
|
||||
return 22.770;
|
||||
case "battle_legendary_dia_pal": //ORAS Dialga & Palkia Battle
|
||||
return 16.009;
|
||||
case "battle_legendary_origin_forme": //LA Origin Dialga & Palkia Battle
|
||||
return 18.961;
|
||||
case "battle_legendary_giratina": //ORAS Giratina Battle
|
||||
return 10.451;
|
||||
case "battle_legendary_arceus": //HGSS Arceus Battle
|
||||
return 9.595;
|
||||
case "battle_legendary_unova": //BW Unova Legendary Battle
|
||||
return 13.855;
|
||||
case "battle_legendary_kyurem": //BW Kyurem Battle
|
||||
return 18.314;
|
||||
case "battle_legendary_res_zek": //BW Reshiram & Zekrom Battle
|
||||
return 18.329;
|
||||
case "battle_legendary_xern_yvel": //XY Xerneas & Yveltal Battle
|
||||
return 26.468;
|
||||
case "battle_legendary_tapu": //SM Tapu Battle
|
||||
return 0.000;
|
||||
case "battle_legendary_sol_lun": //SM Solgaleo & Lunala Battle
|
||||
return 6.525;
|
||||
case "battle_legendary_ub": //SM Ultra Beast Battle
|
||||
return 9.818;
|
||||
case "battle_legendary_dusk_dawn": //USUM Dusk Mane & Dawn Wings Necrozma Battle
|
||||
return 5.211;
|
||||
case "battle_legendary_ultra_nec": //USUM Ultra Necrozma Battle
|
||||
return 10.344;
|
||||
case "battle_legendary_zac_zam": //SWSH Zacian & Zamazenta Battle
|
||||
return 11.424;
|
||||
case "battle_legendary_glas_spec": //SWSH Glastrier & Spectrier Battle
|
||||
return 12.503;
|
||||
case "battle_legendary_calyrex": //SWSH Calyrex Battle
|
||||
return 50.641;
|
||||
case "battle_legendary_riders": //SWSH Ice & Shadow Rider Calyrex Battle
|
||||
return 18.155;
|
||||
case "battle_legendary_birds_galar": //SWSH Galarian Legendary Birds Battle
|
||||
return 0.175;
|
||||
case "battle_legendary_ruinous": //SV Treasures of Ruin Battle
|
||||
return 6.333;
|
||||
case "battle_legendary_kor_mir": //SV Depths of Area Zero Battle
|
||||
return 6.442;
|
||||
case "battle_legendary_loyal_three": //SV Loyal Three Battle
|
||||
return 6.500;
|
||||
case "battle_legendary_ogerpon": //SV Ogerpon Battle
|
||||
return 14.335;
|
||||
case "battle_legendary_terapagos": //SV Terapagos Battle
|
||||
return 24.377;
|
||||
case "battle_legendary_pecharunt": //SV Pecharunt Battle
|
||||
return 6.508;
|
||||
case "battle_rival": //BW Rival Battle
|
||||
return 14.110;
|
||||
case "battle_rival_2": //BW N Battle
|
||||
return 17.714;
|
||||
case "battle_rival_3": //BW Final N Battle
|
||||
return 17.586;
|
||||
case "battle_trainer": //BW Trainer Battle
|
||||
return 13.686;
|
||||
case "battle_wild": //BW Wild Battle
|
||||
return 12.703;
|
||||
case "battle_wild_strong": //BW Strong Wild Battle
|
||||
return 13.940;
|
||||
case "end_summit": //PMD RTDX Sky Tower Summit
|
||||
return 30.025;
|
||||
case "battle_rocket_grunt": //HGSS Team Rocket Battle
|
||||
return 12.707;
|
||||
case "battle_aqua_magma_grunt": //ORAS Team Aqua & Magma Battle
|
||||
return 12.062;
|
||||
case "battle_galactic_grunt": //BDSP Team Galactic Battle
|
||||
return 13.043;
|
||||
case "battle_plasma_grunt": //BW Team Plasma Battle
|
||||
return 12.974;
|
||||
case "battle_flare_grunt": //XY Team Flare Battle
|
||||
return 4.228;
|
||||
case "battle_aether_grunt": // SM Aether Foundation Battle
|
||||
return 16.00;
|
||||
case "battle_skull_grunt": // SM Team Skull Battle
|
||||
return 20.87;
|
||||
case "battle_macro_grunt": // SWSH Trainer Battle
|
||||
return 11.56;
|
||||
case "battle_star_grunt": //SV Team Star Battle
|
||||
return 133.362;
|
||||
case "battle_galactic_admin": //BDSP Team Galactic Admin Battle
|
||||
return 11.997;
|
||||
case "battle_skull_admin": //SM Team Skull Admin Battle
|
||||
return 15.463;
|
||||
case "battle_oleana": //SWSH Oleana Battle
|
||||
return 14.110;
|
||||
case "battle_star_admin": //SV Team Star Boss Battle
|
||||
return 9.493;
|
||||
case "battle_rocket_boss": //USUM Giovanni Battle
|
||||
return 9.115;
|
||||
case "battle_aqua_magma_boss": //ORAS Archie & Maxie Battle
|
||||
return 14.847;
|
||||
case "battle_galactic_boss": //BDSP Cyrus Battle
|
||||
return 106.962;
|
||||
case "battle_plasma_boss": //B2W2 Ghetsis Battle
|
||||
return 25.624;
|
||||
case "battle_flare_boss": //XY Lysandre Battle
|
||||
return 8.085;
|
||||
case "battle_aether_boss": //SM Lusamine Battle
|
||||
return 11.33;
|
||||
case "battle_skull_boss": //SM Guzma Battle
|
||||
return 13.13;
|
||||
case "battle_macro_boss": //SWSH Rose Battle
|
||||
return 11.42;
|
||||
case "battle_star_boss": //SV Cassiopeia Battle
|
||||
return 25.764;
|
||||
case "mystery_encounter_gen_5_gts": // BW GTS
|
||||
return 8.52;
|
||||
case "mystery_encounter_gen_6_gts": // XY GTS
|
||||
return 9.24;
|
||||
case "mystery_encounter_fun_and_games": // EoS Guildmaster Wigglytuff
|
||||
return 4.78;
|
||||
case "mystery_encounter_weird_dream": // EoS Temporal Spire
|
||||
return 41.42;
|
||||
case "mystery_encounter_delibirdy": // Firel Delibirdy
|
||||
return 82.28;
|
||||
case "battle_kanto_champion": //B2W2 Kanto Champion Battle
|
||||
return 13.950;
|
||||
case "battle_johto_champion": //B2W2 Johto Champion Battle
|
||||
return 23.498;
|
||||
case "battle_hoenn_champion_g5": //B2W2 Hoenn Champion Battle
|
||||
return 11.328;
|
||||
case "battle_hoenn_champion_g6": //ORAS Hoenn Champion Battle
|
||||
return 11.762;
|
||||
case "battle_sinnoh_champion": //B2W2 Sinnoh Champion Battle
|
||||
return 12.235;
|
||||
case "battle_champion_alder": //BW Unova Champion Battle
|
||||
return 27.653;
|
||||
case "battle_champion_iris": //B2W2 Unova Champion Battle
|
||||
return 10.145;
|
||||
case "battle_kalos_champion": //XY Kalos Champion Battle
|
||||
return 10.380;
|
||||
case "battle_alola_champion": //USUM Alola Champion Battle
|
||||
return 13.025;
|
||||
case "battle_galar_champion": //SWSH Galar Champion Battle
|
||||
return 61.635;
|
||||
case "battle_champion_geeta": //SV Champion Geeta Battle
|
||||
return 37.447;
|
||||
case "battle_champion_nemona": //SV Champion Nemona Battle
|
||||
return 14.914;
|
||||
case "battle_champion_kieran": //SV Champion Kieran Battle
|
||||
return 7.206;
|
||||
case "battle_hoenn_elite": //ORAS Elite Four Battle
|
||||
return 11.350;
|
||||
case "battle_unova_elite": //BW Elite Four Battle
|
||||
return 17.730;
|
||||
case "battle_kalos_elite": //XY Elite Four Battle
|
||||
return 12.340;
|
||||
case "battle_alola_elite": //SM Elite Four Battle
|
||||
return 19.212;
|
||||
case "battle_galar_elite": //SWSH League Tournament Battle
|
||||
return 164.069;
|
||||
case "battle_paldea_elite": //SV Elite Four Battle
|
||||
return 12.770;
|
||||
case "battle_bb_elite": //SV BB League Elite Four Battle
|
||||
return 19.434;
|
||||
case "battle_final_encounter": //PMD RTDX Rayquaza's Domain
|
||||
return 19.159;
|
||||
case "battle_final": //BW Ghetsis Battle
|
||||
return 16.453;
|
||||
case "battle_kanto_gym": //B2W2 Kanto Gym Battle
|
||||
return 13.857;
|
||||
case "battle_johto_gym": //B2W2 Johto Gym Battle
|
||||
return 12.911;
|
||||
case "battle_hoenn_gym": //B2W2 Hoenn Gym Battle
|
||||
return 12.379;
|
||||
case "battle_sinnoh_gym": //B2W2 Sinnoh Gym Battle
|
||||
return 13.122;
|
||||
case "battle_unova_gym": //BW Unova Gym Battle
|
||||
return 19.145;
|
||||
case "battle_kalos_gym": //XY Kalos Gym Battle
|
||||
return 44.810;
|
||||
case "battle_galar_gym": //SWSH Galar Gym Battle
|
||||
return 171.262;
|
||||
case "battle_paldea_gym": //SV Paldea Gym Battle
|
||||
return 127.489;
|
||||
case "battle_legendary_kanto": //XY Kanto Legendary Battle
|
||||
return 32.966;
|
||||
case "battle_legendary_raikou": //HGSS Raikou Battle
|
||||
return 12.632;
|
||||
case "battle_legendary_entei": //HGSS Entei Battle
|
||||
return 2.905;
|
||||
case "battle_legendary_suicune": //HGSS Suicune Battle
|
||||
return 12.636;
|
||||
case "battle_legendary_lugia": //HGSS Lugia Battle
|
||||
return 19.770;
|
||||
case "battle_legendary_ho_oh": //HGSS Ho-oh Battle
|
||||
return 17.668;
|
||||
case "battle_legendary_regis_g5": //B2W2 Legendary Titan Battle
|
||||
return 49.500;
|
||||
case "battle_legendary_regis_g6": //ORAS Legendary Titan Battle
|
||||
return 21.130;
|
||||
case "battle_legendary_gro_kyo": //ORAS Groudon & Kyogre Battle
|
||||
return 10.547;
|
||||
case "battle_legendary_rayquaza": //ORAS Rayquaza Battle
|
||||
return 10.495;
|
||||
case "battle_legendary_deoxys": //ORAS Deoxys Battle
|
||||
return 13.333;
|
||||
case "battle_legendary_lake_trio": //ORAS Lake Guardians Battle
|
||||
return 16.887;
|
||||
case "battle_legendary_sinnoh": //ORAS Sinnoh Legendary Battle
|
||||
return 22.770;
|
||||
case "battle_legendary_dia_pal": //ORAS Dialga & Palkia Battle
|
||||
return 16.009;
|
||||
case "battle_legendary_origin_forme": //LA Origin Dialga & Palkia Battle
|
||||
return 18.961;
|
||||
case "battle_legendary_giratina": //ORAS Giratina Battle
|
||||
return 10.451;
|
||||
case "battle_legendary_arceus": //HGSS Arceus Battle
|
||||
return 9.595;
|
||||
case "battle_legendary_unova": //BW Unova Legendary Battle
|
||||
return 13.855;
|
||||
case "battle_legendary_kyurem": //BW Kyurem Battle
|
||||
return 18.314;
|
||||
case "battle_legendary_res_zek": //BW Reshiram & Zekrom Battle
|
||||
return 18.329;
|
||||
case "battle_legendary_xern_yvel": //XY Xerneas & Yveltal Battle
|
||||
return 26.468;
|
||||
case "battle_legendary_tapu": //SM Tapu Battle
|
||||
return 0.000;
|
||||
case "battle_legendary_sol_lun": //SM Solgaleo & Lunala Battle
|
||||
return 6.525;
|
||||
case "battle_legendary_ub": //SM Ultra Beast Battle
|
||||
return 9.818;
|
||||
case "battle_legendary_dusk_dawn": //USUM Dusk Mane & Dawn Wings Necrozma Battle
|
||||
return 5.211;
|
||||
case "battle_legendary_ultra_nec": //USUM Ultra Necrozma Battle
|
||||
return 10.344;
|
||||
case "battle_legendary_zac_zam": //SWSH Zacian & Zamazenta Battle
|
||||
return 11.424;
|
||||
case "battle_legendary_glas_spec": //SWSH Glastrier & Spectrier Battle
|
||||
return 12.503;
|
||||
case "battle_legendary_calyrex": //SWSH Calyrex Battle
|
||||
return 50.641;
|
||||
case "battle_legendary_riders": //SWSH Ice & Shadow Rider Calyrex Battle
|
||||
return 18.155;
|
||||
case "battle_legendary_birds_galar": //SWSH Galarian Legendary Birds Battle
|
||||
return 0.175;
|
||||
case "battle_legendary_ruinous": //SV Treasures of Ruin Battle
|
||||
return 6.333;
|
||||
case "battle_legendary_kor_mir": //SV Depths of Area Zero Battle
|
||||
return 6.442;
|
||||
case "battle_legendary_loyal_three": //SV Loyal Three Battle
|
||||
return 6.500;
|
||||
case "battle_legendary_ogerpon": //SV Ogerpon Battle
|
||||
return 14.335;
|
||||
case "battle_legendary_terapagos": //SV Terapagos Battle
|
||||
return 24.377;
|
||||
case "battle_legendary_pecharunt": //SV Pecharunt Battle
|
||||
return 6.508;
|
||||
case "battle_rival": //BW Rival Battle
|
||||
return 14.110;
|
||||
case "battle_rival_2": //BW N Battle
|
||||
return 17.714;
|
||||
case "battle_rival_3": //BW Final N Battle
|
||||
return 17.586;
|
||||
case "battle_trainer": //BW Trainer Battle
|
||||
return 13.686;
|
||||
case "battle_wild": //BW Wild Battle
|
||||
return 12.703;
|
||||
case "battle_wild_strong": //BW Strong Wild Battle
|
||||
return 13.940;
|
||||
case "end_summit": //PMD RTDX Sky Tower Summit
|
||||
return 30.025;
|
||||
case "battle_rocket_grunt": //HGSS Team Rocket Battle
|
||||
return 12.707;
|
||||
case "battle_aqua_magma_grunt": //ORAS Team Aqua & Magma Battle
|
||||
return 12.062;
|
||||
case "battle_galactic_grunt": //BDSP Team Galactic Battle
|
||||
return 13.043;
|
||||
case "battle_plasma_grunt": //BW Team Plasma Battle
|
||||
return 12.974;
|
||||
case "battle_flare_grunt": //XY Team Flare Battle
|
||||
return 4.228;
|
||||
case "battle_aether_grunt": // SM Aether Foundation Battle
|
||||
return 16.00;
|
||||
case "battle_skull_grunt": // SM Team Skull Battle
|
||||
return 20.87;
|
||||
case "battle_macro_grunt": // SWSH Trainer Battle
|
||||
return 11.56;
|
||||
case "battle_star_grunt": //SV Team Star Battle
|
||||
return 133.362;
|
||||
case "battle_galactic_admin": //BDSP Team Galactic Admin Battle
|
||||
return 11.997;
|
||||
case "battle_skull_admin": //SM Team Skull Admin Battle
|
||||
return 15.463;
|
||||
case "battle_oleana": //SWSH Oleana Battle
|
||||
return 14.110;
|
||||
case "battle_star_admin": //SV Team Star Boss Battle
|
||||
return 9.493;
|
||||
case "battle_rocket_boss": //USUM Giovanni Battle
|
||||
return 9.115;
|
||||
case "battle_aqua_magma_boss": //ORAS Archie & Maxie Battle
|
||||
return 14.847;
|
||||
case "battle_galactic_boss": //BDSP Cyrus Battle
|
||||
return 106.962;
|
||||
case "battle_plasma_boss": //B2W2 Ghetsis Battle
|
||||
return 25.624;
|
||||
case "battle_flare_boss": //XY Lysandre Battle
|
||||
return 8.085;
|
||||
case "battle_aether_boss": //SM Lusamine Battle
|
||||
return 11.33;
|
||||
case "battle_skull_boss": //SM Guzma Battle
|
||||
return 13.13;
|
||||
case "battle_macro_boss": //SWSH Rose Battle
|
||||
return 11.42;
|
||||
case "battle_star_boss": //SV Cassiopeia Battle
|
||||
return 25.764;
|
||||
case "mystery_encounter_gen_5_gts": // BW GTS
|
||||
return 8.52;
|
||||
case "mystery_encounter_gen_6_gts": // XY GTS
|
||||
return 9.24;
|
||||
case "mystery_encounter_fun_and_games": // EoS Guildmaster Wigglytuff
|
||||
return 4.78;
|
||||
case "mystery_encounter_weird_dream": // EoS Temporal Spire
|
||||
return 41.42;
|
||||
case "mystery_encounter_delibirdy": // Firel Delibirdy
|
||||
return 82.28;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -2316,7 +2312,10 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
}
|
||||
|
||||
this.currentPhase?.start();
|
||||
if (this.currentPhase) {
|
||||
console.log(`%cStart Phase ${this.currentPhase.constructor.name}`, "color:green;");
|
||||
this.currentPhase.start();
|
||||
}
|
||||
}
|
||||
|
||||
overridePhase(phase: Phase): boolean {
|
||||
@ -2326,6 +2325,7 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
this.standbyPhase = this.currentPhase;
|
||||
this.currentPhase = phase;
|
||||
console.log(`%cStart Phase ${phase.constructor.name}`, "color:green;");
|
||||
phase.start();
|
||||
|
||||
return true;
|
||||
@ -2359,6 +2359,19 @@ export default class BattleScene extends SceneBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will search for a specific phase in {@linkcode phaseQueuePrepend} via filter, and remove the first result if a match is found.
|
||||
* @param phaseFilter filter function
|
||||
*/
|
||||
tryRemoveUnshiftedPhase(phaseFilter: (phase: Phase) => boolean): boolean {
|
||||
const phaseIndex = this.phaseQueuePrepend.findIndex(phaseFilter);
|
||||
if (phaseIndex > -1) {
|
||||
this.phaseQueuePrepend.splice(phaseIndex, 1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to add the input phase to index before target phase in the phaseQueue, else simply calls unshiftPhase()
|
||||
* @param phase {@linkcode Phase} the phase to be added
|
||||
@ -2421,7 +2434,7 @@ export default class BattleScene extends SceneBase {
|
||||
return Math.floor(moneyValue / 10) * 10;
|
||||
}
|
||||
|
||||
addModifier(modifier: Modifier | null, ignoreUpdate?: boolean, playSound?: boolean, virtual?: boolean, instant?: boolean): Promise<boolean> {
|
||||
addModifier(modifier: Modifier | null, ignoreUpdate?: boolean, playSound?: boolean, virtual?: boolean, instant?: boolean, cost?: number): Promise<boolean> {
|
||||
if (!modifier) {
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
@ -2478,6 +2491,8 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
} else if (modifier instanceof FusePokemonModifier) {
|
||||
args.push(this.getPokemonById(modifier.fusePokemonId) as PlayerPokemon);
|
||||
} else if (modifier instanceof RememberMoveModifier && !Utils.isNullOrUndefined(cost)) {
|
||||
args.push(cost);
|
||||
}
|
||||
|
||||
if (modifier.shouldApply(pokemon, ...args)) {
|
||||
@ -3048,7 +3063,7 @@ export default class BattleScene extends SceneBase {
|
||||
const pId = partyMember.id;
|
||||
const participated = participantIds.has(pId);
|
||||
if (participated && pokemonDefeated) {
|
||||
partyMember.addFriendship(2);
|
||||
partyMember.addFriendship(FRIENDSHIP_GAIN_FROM_BATTLE);
|
||||
const machoBraceModifier = partyMember.getHeldItems().find(m => m instanceof PokemonIncrementingStatModifier);
|
||||
if (machoBraceModifier && machoBraceModifier.stackCount < machoBraceModifier.getMaxStackCount(this)) {
|
||||
machoBraceModifier.stackCount++;
|
||||
@ -3118,18 +3133,26 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if a wave COULD spawn a {@linkcode MysteryEncounter}.
|
||||
* Even if returns `true`, does not guarantee that a wave will actually be a ME.
|
||||
* That check is made in {@linkcode BattleScene.isWaveMysteryEncounter} instead.
|
||||
*/
|
||||
isMysteryEncounterValidForWave(battleType: BattleType, waveIndex: number): boolean {
|
||||
const [ lowestMysteryEncounterWave, highestMysteryEncounterWave ] = this.gameMode.getMysteryEncounterLegalWaves();
|
||||
return this.gameMode.hasMysteryEncounters && battleType === BattleType.WILD && !this.gameMode.isBoss(waveIndex) && waveIndex < highestMysteryEncounterWave && waveIndex > lowestMysteryEncounterWave;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether a wave should randomly generate a {@linkcode MysteryEncounter}.
|
||||
* Currently, the only modes that MEs are allowed in are Classic and Challenge.
|
||||
* Additionally, MEs cannot spawn outside of waves 10-180 in those modes
|
||||
*
|
||||
* @param newBattleType
|
||||
* @param waveIndex
|
||||
* @param sessionDataEncounterType
|
||||
*/
|
||||
private isWaveMysteryEncounter(newBattleType: BattleType, waveIndex: number, sessionDataEncounterType?: MysteryEncounterType): boolean {
|
||||
private isWaveMysteryEncounter(newBattleType: BattleType, waveIndex: number): boolean {
|
||||
const [ lowestMysteryEncounterWave, highestMysteryEncounterWave ] = this.gameMode.getMysteryEncounterLegalWaves();
|
||||
if (this.gameMode.hasMysteryEncounters && newBattleType === BattleType.WILD && !this.gameMode.isBoss(waveIndex) && waveIndex < highestMysteryEncounterWave && waveIndex > lowestMysteryEncounterWave) {
|
||||
if (this.isMysteryEncounterValidForWave(newBattleType, waveIndex)) {
|
||||
// Base spawn weight is BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT/256, and increases by WEIGHT_INCREMENT_ON_SPAWN_MISS/256 for each missed attempt at spawning an encounter on a valid floor
|
||||
const sessionEncounterRate = this.mysteryEncounterSaveData.encounterSpawnChance;
|
||||
const encounteredEvents = this.mysteryEncounterSaveData.encounteredEvents;
|
||||
@ -3170,6 +3193,9 @@ export default class BattleScene extends SceneBase {
|
||||
let encounter: MysteryEncounter | null;
|
||||
if (!isNullOrUndefined(Overrides.MYSTERY_ENCOUNTER_OVERRIDE) && allMysteryEncounters.hasOwnProperty(Overrides.MYSTERY_ENCOUNTER_OVERRIDE)) {
|
||||
encounter = allMysteryEncounters[Overrides.MYSTERY_ENCOUNTER_OVERRIDE];
|
||||
if (canBypass) {
|
||||
return encounter;
|
||||
}
|
||||
} else if (canBypass) {
|
||||
encounter = allMysteryEncounters[encounterType ?? -1];
|
||||
return encounter;
|
||||
|
@ -118,6 +118,14 @@ export class Ability implements Localizable {
|
||||
this.nameAppend += " (N)";
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal flag used for developers to document edge cases. When using this, please be sure to document the edge case.
|
||||
* @returns the ability
|
||||
*/
|
||||
edgeCase(): this {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
type AbAttrApplyFunc<TAttr extends AbAttr> = (attr: TAttr, passive: boolean) => boolean | Promise<boolean>;
|
||||
@ -2571,24 +2579,24 @@ export class PreSwitchOutClearWeatherAbAttr extends PreSwitchOutAbAttr {
|
||||
|
||||
// Clear weather only if user's ability matches the weather and no other pokemon has the ability.
|
||||
switch (weatherType) {
|
||||
case (WeatherType.HARSH_SUN):
|
||||
if (pokemon.hasAbility(Abilities.DESOLATE_LAND)
|
||||
case (WeatherType.HARSH_SUN):
|
||||
if (pokemon.hasAbility(Abilities.DESOLATE_LAND)
|
||||
&& pokemon.scene.getField(true).filter(p => p !== pokemon).filter(p => p.hasAbility(Abilities.DESOLATE_LAND)).length === 0) {
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.HEAVY_RAIN):
|
||||
if (pokemon.hasAbility(Abilities.PRIMORDIAL_SEA)
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.HEAVY_RAIN):
|
||||
if (pokemon.hasAbility(Abilities.PRIMORDIAL_SEA)
|
||||
&& pokemon.scene.getField(true).filter(p => p !== pokemon).filter(p => p.hasAbility(Abilities.PRIMORDIAL_SEA)).length === 0) {
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.STRONG_WINDS):
|
||||
if (pokemon.hasAbility(Abilities.DELTA_STREAM)
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.STRONG_WINDS):
|
||||
if (pokemon.hasAbility(Abilities.DELTA_STREAM)
|
||||
&& pokemon.scene.getField(true).filter(p => p !== pokemon).filter(p => p.hasAbility(Abilities.DELTA_STREAM)).length === 0) {
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (simulated) {
|
||||
@ -4071,24 +4079,24 @@ export class PostFaintClearWeatherAbAttr extends PostFaintAbAttr {
|
||||
|
||||
// Clear weather only if user's ability matches the weather and no other pokemon has the ability.
|
||||
switch (weatherType) {
|
||||
case (WeatherType.HARSH_SUN):
|
||||
if (pokemon.hasAbility(Abilities.DESOLATE_LAND)
|
||||
case (WeatherType.HARSH_SUN):
|
||||
if (pokemon.hasAbility(Abilities.DESOLATE_LAND)
|
||||
&& pokemon.scene.getField(true).filter(p => p.hasAbility(Abilities.DESOLATE_LAND)).length === 0) {
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.HEAVY_RAIN):
|
||||
if (pokemon.hasAbility(Abilities.PRIMORDIAL_SEA)
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.HEAVY_RAIN):
|
||||
if (pokemon.hasAbility(Abilities.PRIMORDIAL_SEA)
|
||||
&& pokemon.scene.getField(true).filter(p => p.hasAbility(Abilities.PRIMORDIAL_SEA)).length === 0) {
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.STRONG_WINDS):
|
||||
if (pokemon.hasAbility(Abilities.DELTA_STREAM)
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
case (WeatherType.STRONG_WINDS):
|
||||
if (pokemon.hasAbility(Abilities.DELTA_STREAM)
|
||||
&& pokemon.scene.getField(true).filter(p => p.hasAbility(Abilities.DELTA_STREAM)).length === 0) {
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
turnOffWeather = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (simulated) {
|
||||
@ -4905,8 +4913,7 @@ export function initAbilities() {
|
||||
.attr(TypeImmunityAddBattlerTagAbAttr, Type.FIRE, BattlerTagType.FIRE_BOOST, 1)
|
||||
.ignorable(),
|
||||
new Ability(Abilities.SHIELD_DUST, 3)
|
||||
.attr(IgnoreMoveEffectsAbAttr)
|
||||
.partial(),
|
||||
.attr(IgnoreMoveEffectsAbAttr),
|
||||
new Ability(Abilities.OWN_TEMPO, 3)
|
||||
.attr(BattlerTagImmunityAbAttr, BattlerTagType.CONFUSED)
|
||||
.attr(IntimidateImmunityAbAttr)
|
||||
@ -4950,8 +4957,7 @@ export function initAbilities() {
|
||||
.attr(TypeImmunityStatStageChangeAbAttr, Type.ELECTRIC, Stat.SPATK, 1)
|
||||
.ignorable(),
|
||||
new Ability(Abilities.SERENE_GRACE, 3)
|
||||
.attr(MoveEffectChanceMultiplierAbAttr, 2)
|
||||
.partial(),
|
||||
.attr(MoveEffectChanceMultiplierAbAttr, 2),
|
||||
new Ability(Abilities.SWIFT_SWIM, 3)
|
||||
.attr(StatMultiplierAbAttr, Stat.SPD, 2)
|
||||
.condition(getWeatherCondition(WeatherType.RAIN, WeatherType.HEAVY_RAIN)),
|
||||
@ -5235,7 +5241,8 @@ export function initAbilities() {
|
||||
new Ability(Abilities.SHEER_FORCE, 5)
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => move.chance >= 1, 5461 / 4096)
|
||||
.attr(MoveEffectChanceMultiplierAbAttr, 0)
|
||||
.partial(),
|
||||
.edgeCase() // Should disable shell bell and Meloetta's relic song transformation
|
||||
.edgeCase(), // Should disable life orb, eject button, red card, kee/maranga berry if they get implemented
|
||||
new Ability(Abilities.CONTRARY, 5)
|
||||
.attr(StatStageChangeMultiplierAbAttr, -1)
|
||||
.ignorable(),
|
||||
@ -5278,7 +5285,7 @@ export function initAbilities() {
|
||||
/** Rate is doubled when under sun {@link https://dex.pokemonshowdown.com/abilities/harvest} */
|
||||
(pokemon) => 0.5 * (getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN)(pokemon) ? 2 : 1)
|
||||
)
|
||||
.partial(),
|
||||
.edgeCase(), // Cannot recover berries used up by fling or natural gift (unimplemented)
|
||||
new Ability(Abilities.TELEPATHY, 5)
|
||||
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon.getAlly() === attacker && move instanceof AttackMove)
|
||||
.ignorable(),
|
||||
@ -5357,7 +5364,7 @@ export function initAbilities() {
|
||||
.bypassFaint(),
|
||||
new Ability(Abilities.VICTORY_STAR, 5)
|
||||
.attr(StatMultiplierAbAttr, Stat.ACC, 1.1)
|
||||
.partial(),
|
||||
.partial(), // Does not boost ally's accuracy
|
||||
new Ability(Abilities.TURBOBLAZE, 5)
|
||||
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonTurboblaze", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
|
||||
.attr(MoveAbilityBypassAbAttr),
|
||||
@ -5468,7 +5475,7 @@ export function initAbilities() {
|
||||
.attr(UnsuppressableAbilityAbAttr)
|
||||
.attr(NoFusionAbilityAbAttr)
|
||||
.bypassFaint()
|
||||
.partial(),
|
||||
.partial(), // Meteor form should protect against status effects and yawn
|
||||
new Ability(Abilities.STAKEOUT, 7)
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => user?.scene.currentBattle.turnCommands[target?.getBattlerIndex() ?? BattlerIndex.ATTACKER]?.command === Command.POKEMON, 2),
|
||||
new Ability(Abilities.WATER_BUBBLE, 7)
|
||||
@ -5526,19 +5533,21 @@ export function initAbilities() {
|
||||
.attr(UnsuppressableAbilityAbAttr)
|
||||
.attr(NoFusionAbilityAbAttr)
|
||||
.bypassFaint(),
|
||||
new Ability(Abilities.POWER_CONSTRUCT, 7) // TODO: 10% Power Construct Zygarde isn't accounted for yet. If changed, update Zygarde's getSpeciesFormIndex entry accordingly
|
||||
.attr(PostBattleInitFormChangeAbAttr, () => 2)
|
||||
.attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "complete" ? 4 : 2)
|
||||
.attr(PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "complete" ? 4 : 2)
|
||||
new Ability(Abilities.POWER_CONSTRUCT, 7)
|
||||
.conditionalAttr(pokemon => pokemon.formIndex === 2 || pokemon.formIndex === 4, PostBattleInitFormChangeAbAttr, () => 2)
|
||||
.conditionalAttr(pokemon => pokemon.formIndex === 3 || pokemon.formIndex === 5, PostBattleInitFormChangeAbAttr, () => 3)
|
||||
.conditionalAttr(pokemon => pokemon.formIndex === 2 || pokemon.formIndex === 4, PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "complete" ? 4 : 2)
|
||||
.conditionalAttr(pokemon => pokemon.formIndex === 2 || pokemon.formIndex === 4, PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "complete" ? 4 : 2)
|
||||
.conditionalAttr(pokemon => pokemon.formIndex === 3 || pokemon.formIndex === 5, PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "10-complete" ? 5 : 3)
|
||||
.conditionalAttr(pokemon => pokemon.formIndex === 3 || pokemon.formIndex === 5, PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === "10-complete" ? 5 : 3)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(UnsuppressableAbilityAbAttr)
|
||||
.attr(NoFusionAbilityAbAttr)
|
||||
.bypassFaint()
|
||||
.partial(),
|
||||
new Ability(Abilities.CORROSION, 7) // TODO: Test Corrosion against Magic Bounce once it is implemented
|
||||
.bypassFaint(),
|
||||
new Ability(Abilities.CORROSION, 7)
|
||||
.attr(IgnoreTypeStatusEffectImmunityAbAttr, [ StatusEffect.POISON, StatusEffect.TOXIC ], [ Type.STEEL, Type.POISON ])
|
||||
.partial(),
|
||||
.edgeCase(), // Should interact correctly with magic coat/bounce (not yet implemented), fling with toxic orb (not implemented yet), and synchronize (not fully implemented yet)
|
||||
new Ability(Abilities.COMATOSE, 7)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
@ -5693,7 +5702,7 @@ export function initAbilities() {
|
||||
new Ability(Abilities.WANDERING_SPIRIT, 8)
|
||||
.attr(PostDefendAbilitySwapAbAttr)
|
||||
.bypassFaint()
|
||||
.partial(),
|
||||
.edgeCase(), // interacts incorrectly with rock head. It's meant to switch abilities before recoil would apply so that a pokemon with rock head would lose rock head first and still take the recoil
|
||||
new Ability(Abilities.GORILLA_TACTICS, 8)
|
||||
.attr(GorillaTacticsAbAttr),
|
||||
new Ability(Abilities.NEUTRALIZING_GAS, 8)
|
||||
@ -5702,7 +5711,7 @@ export function initAbilities() {
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(NoTransformAbilityAbAttr)
|
||||
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => i18next.t("abilityTriggers:postSummonNeutralizingGas", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }))
|
||||
.partial(),
|
||||
.partial(), // A bunch of weird interactions with other abilities being suppressed then unsuppressed
|
||||
new Ability(Abilities.PASTEL_VEIL, 8)
|
||||
.attr(PostSummonUserFieldRemoveStatusEffectAbAttr, StatusEffect.POISON, StatusEffect.TOXIC)
|
||||
.attr(UserFieldStatusEffectImmunityAbAttr, StatusEffect.POISON, StatusEffect.TOXIC)
|
||||
@ -5807,7 +5816,7 @@ export function initAbilities() {
|
||||
new Ability(Abilities.GOOD_AS_GOLD, 9)
|
||||
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS)
|
||||
.ignorable()
|
||||
.partial(),
|
||||
.partial(), // Lots of weird interactions with moves and abilities such as negating status moves that target the field
|
||||
new Ability(Abilities.VESSEL_OF_RUIN, 9)
|
||||
.attr(FieldMultiplyStatAbAttr, Stat.SPATK, 0.75)
|
||||
.attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonVesselOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.SPATK)) }))
|
||||
@ -5840,7 +5849,7 @@ export function initAbilities() {
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.SLICING_MOVE), 1.5),
|
||||
new Ability(Abilities.SUPREME_OVERLORD, 9)
|
||||
.attr(VariableMovePowerBoostAbAttr, (user, target, move) => 1 + 0.1 * Math.min(user.isPlayer() ? user.scene.currentBattle.playerFaints : user.scene.currentBattle.enemyFaints, 5))
|
||||
.partial(),
|
||||
.partial(), // Counter resets every wave
|
||||
new Ability(Abilities.COSTAR, 9)
|
||||
.attr(PostSummonCopyAllyStatsAbAttr),
|
||||
new Ability(Abilities.TOXIC_DEBRIS, 9)
|
||||
@ -5873,25 +5882,25 @@ export function initAbilities() {
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(NoTransformAbilityAbAttr)
|
||||
.partial(),
|
||||
.partial(), // Ogerpon tera interactions
|
||||
new Ability(Abilities.EMBODY_ASPECT_WELLSPRING, 9)
|
||||
.attr(PostBattleInitStatStageChangeAbAttr, [ Stat.SPDEF ], 1, true)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(NoTransformAbilityAbAttr)
|
||||
.partial(),
|
||||
.partial(), // Ogerpon tera interactions
|
||||
new Ability(Abilities.EMBODY_ASPECT_HEARTHFLAME, 9)
|
||||
.attr(PostBattleInitStatStageChangeAbAttr, [ Stat.ATK ], 1, true)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(NoTransformAbilityAbAttr)
|
||||
.partial(),
|
||||
.partial(), // Ogerpon tera interactions
|
||||
new Ability(Abilities.EMBODY_ASPECT_CORNERSTONE, 9)
|
||||
.attr(PostBattleInitStatStageChangeAbAttr, [ Stat.DEF ], 1, true)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(NoTransformAbilityAbAttr)
|
||||
.partial(),
|
||||
.partial(), // Ogerpon tera interactions
|
||||
new Ability(Abilities.TERA_SHIFT, 9)
|
||||
.attr(PostSummonFormChangeAbAttr, p => p.getFormKey() ? 0 : 1)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Arena } from "#app/field/arena";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
import { Type } from "#app/data/type";
|
||||
import * as Utils from "#app/utils";
|
||||
import { BooleanHolder, NumberHolder, toDmgValue } from "#app/utils";
|
||||
import { MoveCategory, allMoves, MoveTarget, IncrementMovePriorityAttr, applyMoveAttrs } from "#app/data/move";
|
||||
import { getPokemonNameWithAffix } from "#app/messages";
|
||||
import Pokemon, { HitResult, PlayerPokemon, PokemonMove, EnemyPokemon } from "#app/field/pokemon";
|
||||
import Pokemon, { HitResult, PokemonMove } from "#app/field/pokemon";
|
||||
import { StatusEffect } from "#app/data/status-effect";
|
||||
import { BattlerIndex } from "#app/battle";
|
||||
import { BlockNonDirectDamageAbAttr, ChangeMovePriorityAbAttr, ProtectStatAbAttr, applyAbAttrs } from "#app/data/ability";
|
||||
@ -36,7 +36,7 @@ export abstract class ArenaTag {
|
||||
public side: ArenaTagSide = ArenaTagSide.BOTH
|
||||
) {}
|
||||
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
apply(arena: Arena, simulated: boolean, ...args: unknown[]): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -71,6 +71,32 @@ export abstract class ArenaTag {
|
||||
this.sourceId = source.sourceId;
|
||||
this.side = source.side;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that retrieves the source Pokemon
|
||||
* @param scene medium to retrieve the source Pokemon
|
||||
* @returns The source {@linkcode Pokemon} or `null` if none is found
|
||||
*/
|
||||
public getSourcePokemon(scene: BattleScene): Pokemon | null {
|
||||
return this.sourceId ? scene.getPokemonById(this.sourceId) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that retrieves the Pokemon affected
|
||||
* @param scene - medium to retrieve the involved Pokemon
|
||||
* @returns list of PlayerPokemon or EnemyPokemon on the field
|
||||
*/
|
||||
public getAffectedPokemon(scene: BattleScene): Pokemon[] {
|
||||
switch (this.side) {
|
||||
case ArenaTagSide.PLAYER:
|
||||
return scene.getPlayerField() ?? [];
|
||||
case ArenaTagSide.ENEMY:
|
||||
return scene.getEnemyField() ?? [];
|
||||
case ArenaTagSide.BOTH:
|
||||
default:
|
||||
return scene.getField(true) ?? [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,10 +122,20 @@ export class MistTag extends ArenaTag {
|
||||
}
|
||||
}
|
||||
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
(args[0] as Utils.BooleanHolder).value = true;
|
||||
/**
|
||||
* Cancels the lowering of stats
|
||||
* @param arena the {@linkcode Arena} containing this effect
|
||||
* @param simulated `true` if the effect should be applied quietly
|
||||
* @param cancelled a {@linkcode BooleanHolder} whose value is set to `true`
|
||||
* to flag the stat reduction as cancelled
|
||||
* @returns `true` if a stat reduction was cancelled; `false` otherwise
|
||||
*/
|
||||
override apply(arena: Arena, simulated: boolean, cancelled: BooleanHolder): boolean {
|
||||
cancelled.value = true;
|
||||
|
||||
arena.scene.queueMessage(i18next.t("arenaTag:mistApply"));
|
||||
if (!simulated) {
|
||||
arena.scene.queueMessage(i18next.t("arenaTag:mistApply"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -131,17 +167,15 @@ export class WeakenMoveScreenTag extends ArenaTag {
|
||||
/**
|
||||
* Applies the weakening effect to the move.
|
||||
*
|
||||
* @param arena - The arena where the move is applied.
|
||||
* @param args - The arguments for the move application.
|
||||
* @param args[0] - The category of the move.
|
||||
* @param args[1] - A boolean indicating whether it is a double battle.
|
||||
* @param args[2] - An object of type `Utils.NumberHolder` that holds the damage multiplier
|
||||
*
|
||||
* @returns True if the move was weakened, otherwise false.
|
||||
* @param arena the {@linkcode Arena} where the move is applied.
|
||||
* @param simulated n/a
|
||||
* @param moveCategory the attacking move's {@linkcode MoveCategory}.
|
||||
* @param damageMultiplier A {@linkcode NumberHolder} containing the damage multiplier
|
||||
* @returns `true` if the attacking move was weakened; `false` otherwise.
|
||||
*/
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
if (this.weakenedCategories.includes((args[0] as MoveCategory))) {
|
||||
(args[2] as Utils.NumberHolder).value = (args[1] as boolean) ? 2732 / 4096 : 0.5;
|
||||
override apply(arena: Arena, simulated: boolean, moveCategory: MoveCategory, damageMultiplier: NumberHolder): boolean {
|
||||
if (this.weakenedCategories.includes(moveCategory)) {
|
||||
damageMultiplier.value = arena.scene.currentBattle.double ? 2732 / 4096 : 0.5;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -223,38 +257,34 @@ export class ConditionalProtectTag extends ArenaTag {
|
||||
onRemove(arena: Arena): void { }
|
||||
|
||||
/**
|
||||
* apply(): Checks incoming moves against the condition function
|
||||
* 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 Pokemon using the move
|
||||
* @param args\[2\] (Pokemon) The intended target of the move
|
||||
* @param args\[3\] (Moves) The parameters to the condition function
|
||||
* @param args\[4\] (Utils.BooleanHolder) Signals if the applied protection supercedes protection-ignoring effects
|
||||
* @returns
|
||||
* @param arena the {@linkcode Arena} containing this tag
|
||||
* @param simulated `true` if the tag is applied quietly; `false` otherwise.
|
||||
* @param isProtected a {@linkcode BooleanHolder} used to flag if the move is protected against
|
||||
* @param attacker the attacking {@linkcode Pokemon}
|
||||
* @param defender the defending {@linkcode Pokemon}
|
||||
* @param moveId the {@linkcode Moves | identifier} for the move being used
|
||||
* @param ignoresProtectBypass a {@linkcode BooleanHolder} used to flag if a protection effect supercedes effects that ignore protection
|
||||
* @returns `true` if this tag protected against the attack; `false` otherwise
|
||||
*/
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
const [ cancelled, user, target, moveId, ignoresBypass ] = args;
|
||||
override apply(arena: Arena, simulated: boolean, isProtected: BooleanHolder, attacker: Pokemon, defender: Pokemon,
|
||||
moveId: Moves, ignoresProtectBypass: BooleanHolder): boolean {
|
||||
|
||||
if (cancelled instanceof Utils.BooleanHolder
|
||||
&& user instanceof Pokemon
|
||||
&& target instanceof Pokemon
|
||||
&& typeof moveId === "number"
|
||||
&& ignoresBypass instanceof Utils.BooleanHolder) {
|
||||
if ((this.side === ArenaTagSide.PLAYER) === defender.isPlayer()
|
||||
&& this.protectConditionFunc(arena, moveId)) {
|
||||
if (!isProtected.value) {
|
||||
isProtected.value = true;
|
||||
if (!simulated) {
|
||||
attacker.stopMultiHit(defender);
|
||||
|
||||
if ((this.side === ArenaTagSide.PLAYER) === target.isPlayer()
|
||||
&& this.protectConditionFunc(arena, moveId)) {
|
||||
if (!cancelled.value) {
|
||||
cancelled.value = true;
|
||||
user.stopMultiHit(target);
|
||||
|
||||
new CommonBattleAnim(CommonAnim.PROTECT, target).play(arena.scene);
|
||||
arena.scene.queueMessage(i18next.t("arenaTag:conditionalProtectApply", { moveName: super.getMoveName(), pokemonNameWithAffix: getPokemonNameWithAffix(target) }));
|
||||
new CommonBattleAnim(CommonAnim.PROTECT, defender).play(arena.scene);
|
||||
arena.scene.queueMessage(i18next.t("arenaTag:conditionalProtectApply", { moveName: super.getMoveName(), pokemonNameWithAffix: getPokemonNameWithAffix(defender) }));
|
||||
}
|
||||
|
||||
ignoresBypass.value = ignoresBypass.value || this.ignoresBypass;
|
||||
return true;
|
||||
}
|
||||
|
||||
ignoresProtectBypass.value = ignoresProtectBypass.value || this.ignoresBypass;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -270,7 +300,7 @@ export class ConditionalProtectTag extends ArenaTag {
|
||||
*/
|
||||
const QuickGuardConditionFunc: ProtectConditionFunc = (arena, moveId) => {
|
||||
const move = allMoves[moveId];
|
||||
const priority = new Utils.NumberHolder(move.priority);
|
||||
const priority = new NumberHolder(move.priority);
|
||||
const effectPhase = arena.scene.getCurrentPhase();
|
||||
|
||||
if (effectPhase instanceof MoveEffectPhase) {
|
||||
@ -302,11 +332,11 @@ const WideGuardConditionFunc: ProtectConditionFunc = (arena, moveId) : boolean =
|
||||
const move = allMoves[moveId];
|
||||
|
||||
switch (move.moveTarget) {
|
||||
case MoveTarget.ALL_ENEMIES:
|
||||
case MoveTarget.ALL_NEAR_ENEMIES:
|
||||
case MoveTarget.ALL_OTHERS:
|
||||
case MoveTarget.ALL_NEAR_OTHERS:
|
||||
return true;
|
||||
case MoveTarget.ALL_ENEMIES:
|
||||
case MoveTarget.ALL_NEAR_ENEMIES:
|
||||
case MoveTarget.ALL_OTHERS:
|
||||
case MoveTarget.ALL_NEAR_OTHERS:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
@ -434,7 +464,7 @@ class WishTag extends ArenaTag {
|
||||
if (user) {
|
||||
this.battlerIndex = user.getBattlerIndex();
|
||||
this.triggerMessage = i18next.t("arenaTag:wishTagOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(user) });
|
||||
this.healHp = Utils.toDmgValue(user.getMaxHp() / 2);
|
||||
this.healHp = toDmgValue(user.getMaxHp() / 2);
|
||||
} else {
|
||||
console.warn("Failed to get source for WishTag onAdd");
|
||||
}
|
||||
@ -471,12 +501,19 @@ export class WeakenMoveTypeTag extends ArenaTag {
|
||||
this.weakenedType = type;
|
||||
}
|
||||
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
if ((args[0] as Type) === this.weakenedType) {
|
||||
(args[1] as Utils.NumberHolder).value *= 0.33;
|
||||
/**
|
||||
* Reduces an attack's power by 0.33x if it matches this tag's weakened type.
|
||||
* @param arena n/a
|
||||
* @param simulated n/a
|
||||
* @param type the attack's {@linkcode Type}
|
||||
* @param power a {@linkcode NumberHolder} containing the attack's power
|
||||
* @returns `true` if the attack's power was reduced; `false` otherwise.
|
||||
*/
|
||||
override apply(arena: Arena, simulated: boolean, type: Type, power: NumberHolder): boolean {
|
||||
if (type === this.weakenedType) {
|
||||
power.value *= 0.33;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -537,13 +574,12 @@ export class IonDelugeTag extends ArenaTag {
|
||||
/**
|
||||
* Converts Normal-type moves to Electric type
|
||||
* @param arena n/a
|
||||
* @param args
|
||||
* - `[0]` {@linkcode Utils.NumberHolder} A container with a move's {@linkcode Type}
|
||||
* @param simulated n/a
|
||||
* @param moveType a {@linkcode NumberHolder} containing a move's {@linkcode Type}
|
||||
* @returns `true` if the given move type changed; `false` otherwise.
|
||||
*/
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
const moveType = args[0];
|
||||
if (moveType instanceof Utils.NumberHolder && moveType.value === Type.NORMAL) {
|
||||
override apply(arena: Arena, simulated: boolean, moveType: NumberHolder): boolean {
|
||||
if (moveType.value === Type.NORMAL) {
|
||||
moveType.value = Type.ELECTRIC;
|
||||
return true;
|
||||
}
|
||||
@ -582,16 +618,22 @@ export class ArenaTrapTag extends ArenaTag {
|
||||
}
|
||||
}
|
||||
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
const pokemon = args[0] as Pokemon;
|
||||
if (this.sourceId === pokemon.id || (this.side === ArenaTagSide.PLAYER) !== pokemon.isPlayer()) {
|
||||
/**
|
||||
* Activates the hazard effect onto a Pokemon when it enters the field
|
||||
* @param arena the {@linkcode Arena} containing this tag
|
||||
* @param simulated if `true`, only checks if the hazard would activate.
|
||||
* @param pokemon the {@linkcode Pokemon} triggering this hazard
|
||||
* @returns `true` if this hazard affects the given Pokemon; `false` otherwise.
|
||||
*/
|
||||
override apply(arena: Arena, simulated: boolean, pokemon: Pokemon): boolean {
|
||||
if ((this.side === ArenaTagSide.PLAYER) !== pokemon.isPlayer()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.activateTrap(pokemon);
|
||||
return this.activateTrap(pokemon, simulated);
|
||||
}
|
||||
|
||||
activateTrap(pokemon: Pokemon): boolean {
|
||||
activateTrap(pokemon: Pokemon, simulated: boolean): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -625,14 +667,18 @@ class SpikesTag extends ArenaTrapTag {
|
||||
}
|
||||
}
|
||||
|
||||
activateTrap(pokemon: Pokemon): boolean {
|
||||
override activateTrap(pokemon: Pokemon, simulated: boolean): boolean {
|
||||
if (pokemon.isGrounded()) {
|
||||
const cancelled = new Utils.BooleanHolder(false);
|
||||
const cancelled = new BooleanHolder(false);
|
||||
applyAbAttrs(BlockNonDirectDamageAbAttr, pokemon, cancelled);
|
||||
|
||||
if (simulated) {
|
||||
return !cancelled.value;
|
||||
}
|
||||
|
||||
if (!cancelled.value) {
|
||||
const damageHpRatio = 1 / (10 - 2 * this.layers);
|
||||
const damage = Utils.toDmgValue(pokemon.getMaxHp() * damageHpRatio);
|
||||
const damage = toDmgValue(pokemon.getMaxHp() * damageHpRatio);
|
||||
|
||||
pokemon.scene.queueMessage(i18next.t("arenaTag:spikesActivateTrap", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
pokemon.damageAndUpdate(damage, HitResult.OTHER);
|
||||
@ -676,8 +722,11 @@ class ToxicSpikesTag extends ArenaTrapTag {
|
||||
}
|
||||
}
|
||||
|
||||
activateTrap(pokemon: Pokemon): boolean {
|
||||
override activateTrap(pokemon: Pokemon, simulated: boolean): boolean {
|
||||
if (pokemon.isGrounded()) {
|
||||
if (simulated) {
|
||||
return true;
|
||||
}
|
||||
if (pokemon.isOfType(Type.POISON)) {
|
||||
this.neutralized = true;
|
||||
if (pokemon.scene.arena.removeTag(this.tagType)) {
|
||||
@ -758,31 +807,31 @@ class StealthRockTag extends ArenaTrapTag {
|
||||
let damageHpRatio: number = 0;
|
||||
|
||||
switch (effectiveness) {
|
||||
case 0:
|
||||
damageHpRatio = 0;
|
||||
break;
|
||||
case 0.25:
|
||||
damageHpRatio = 0.03125;
|
||||
break;
|
||||
case 0.5:
|
||||
damageHpRatio = 0.0625;
|
||||
break;
|
||||
case 1:
|
||||
damageHpRatio = 0.125;
|
||||
break;
|
||||
case 2:
|
||||
damageHpRatio = 0.25;
|
||||
break;
|
||||
case 4:
|
||||
damageHpRatio = 0.5;
|
||||
break;
|
||||
case 0:
|
||||
damageHpRatio = 0;
|
||||
break;
|
||||
case 0.25:
|
||||
damageHpRatio = 0.03125;
|
||||
break;
|
||||
case 0.5:
|
||||
damageHpRatio = 0.0625;
|
||||
break;
|
||||
case 1:
|
||||
damageHpRatio = 0.125;
|
||||
break;
|
||||
case 2:
|
||||
damageHpRatio = 0.25;
|
||||
break;
|
||||
case 4:
|
||||
damageHpRatio = 0.5;
|
||||
break;
|
||||
}
|
||||
|
||||
return damageHpRatio;
|
||||
}
|
||||
|
||||
activateTrap(pokemon: Pokemon): boolean {
|
||||
const cancelled = new Utils.BooleanHolder(false);
|
||||
override activateTrap(pokemon: Pokemon, simulated: boolean): boolean {
|
||||
const cancelled = new BooleanHolder(false);
|
||||
applyAbAttrs(BlockNonDirectDamageAbAttr, pokemon, cancelled);
|
||||
|
||||
if (cancelled.value) {
|
||||
@ -792,12 +841,16 @@ class StealthRockTag extends ArenaTrapTag {
|
||||
const damageHpRatio = this.getDamageHpRatio(pokemon);
|
||||
|
||||
if (damageHpRatio) {
|
||||
const damage = Utils.toDmgValue(pokemon.getMaxHp() * damageHpRatio);
|
||||
if (simulated) {
|
||||
return true;
|
||||
}
|
||||
const damage = toDmgValue(pokemon.getMaxHp() * damageHpRatio);
|
||||
pokemon.scene.queueMessage(i18next.t("arenaTag:stealthRockActivateTrap", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
pokemon.damageAndUpdate(damage, HitResult.OTHER);
|
||||
if (pokemon.turnData) {
|
||||
pokemon.turnData.damageTaken += damage;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -827,14 +880,20 @@ class StickyWebTag extends ArenaTrapTag {
|
||||
}
|
||||
}
|
||||
|
||||
activateTrap(pokemon: Pokemon): boolean {
|
||||
override activateTrap(pokemon: Pokemon, simulated: boolean): boolean {
|
||||
if (pokemon.isGrounded()) {
|
||||
const cancelled = new Utils.BooleanHolder(false);
|
||||
const cancelled = new BooleanHolder(false);
|
||||
applyAbAttrs(ProtectStatAbAttr, pokemon, cancelled);
|
||||
|
||||
if (simulated) {
|
||||
return !cancelled.value;
|
||||
}
|
||||
|
||||
if (!cancelled.value) {
|
||||
pokemon.scene.queueMessage(i18next.t("arenaTag:stickyWebActivateTrap", { pokemonName: pokemon.getNameToRender() }));
|
||||
const stages = new Utils.NumberHolder(-1);
|
||||
const stages = new NumberHolder(-1);
|
||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, [ Stat.SPD ], stages.value));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -853,8 +912,15 @@ export class TrickRoomTag extends ArenaTag {
|
||||
super(ArenaTagType.TRICK_ROOM, turnCount, Moves.TRICK_ROOM, sourceId);
|
||||
}
|
||||
|
||||
apply(arena: Arena, args: any[]): boolean {
|
||||
const speedReversed = args[0] as Utils.BooleanHolder;
|
||||
/**
|
||||
* Reverses Speed-based turn order for all Pokemon on the field
|
||||
* @param arena n/a
|
||||
* @param simulated n/a
|
||||
* @param speedReversed a {@linkcode BooleanHolder} used to flag if Speed-based
|
||||
* turn order should be reversed.
|
||||
* @returns `true` if turn order is successfully reversed; `false` otherwise
|
||||
*/
|
||||
override apply(arena: Arena, simulated: boolean, speedReversed: BooleanHolder): boolean {
|
||||
speedReversed.value = !speedReversed.value;
|
||||
return true;
|
||||
}
|
||||
@ -885,7 +951,8 @@ export class GravityTag extends ArenaTag {
|
||||
arena.scene.queueMessage(i18next.t("arenaTag:gravityOnAdd"));
|
||||
arena.scene.getField(true).forEach((pokemon) => {
|
||||
if (pokemon !== null) {
|
||||
pokemon.removeTag(BattlerTagType.MAGNET_RISEN);
|
||||
pokemon.removeTag(BattlerTagType.FLOATING);
|
||||
pokemon.removeTag(BattlerTagType.TELEKINESIS);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -977,36 +1044,24 @@ class NoneTag extends ArenaTag {
|
||||
* Imprison will apply to any opposing Pokemon that switch onto the field as well.
|
||||
*/
|
||||
class ImprisonTag extends ArenaTrapTag {
|
||||
private source: Pokemon;
|
||||
|
||||
constructor(sourceId: number, side: ArenaTagSide) {
|
||||
super(ArenaTagType.IMPRISON, Moves.IMPRISON, sourceId, side, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that retrieves the Pokemon affected
|
||||
* @param {BattleScene} scene medium to retrieve the involved Pokemon
|
||||
* @returns list of PlayerPokemon or EnemyPokemon on the field
|
||||
*/
|
||||
private retrieveField(scene: BattleScene): PlayerPokemon[] | EnemyPokemon[] {
|
||||
if (!this.source.isPlayer()) {
|
||||
return scene.getPlayerField() ?? [];
|
||||
}
|
||||
return scene.getEnemyField() ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* This function applies the effects of Imprison to the opposing Pokemon already present on the field.
|
||||
* @param arena
|
||||
*/
|
||||
override onAdd({ scene }: Arena) {
|
||||
this.source = scene.getPokemonById(this.sourceId!)!;
|
||||
if (this.source) {
|
||||
const party = this.retrieveField(scene);
|
||||
party?.forEach((p: PlayerPokemon | EnemyPokemon ) => {
|
||||
p.addTag(BattlerTagType.IMPRISON, 1, Moves.IMPRISON, this.sourceId);
|
||||
const source = this.getSourcePokemon(scene);
|
||||
if (source) {
|
||||
const party = this.getAffectedPokemon(scene);
|
||||
party?.forEach((p: Pokemon ) => {
|
||||
if (p.isAllowedInBattle()) {
|
||||
p.addTag(BattlerTagType.IMPRISON, 1, Moves.IMPRISON, this.sourceId);
|
||||
}
|
||||
});
|
||||
scene.queueMessage(i18next.t("battlerTags:imprisonOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(this.source) }));
|
||||
scene.queueMessage(i18next.t("battlerTags:imprisonOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(source) }));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1015,8 +1070,9 @@ class ImprisonTag extends ArenaTrapTag {
|
||||
* @param _arena
|
||||
* @returns `true` if the source of the tag is still active on the field | `false` if not
|
||||
*/
|
||||
override lapse(_arena: Arena): boolean {
|
||||
return this.source.isActive(true);
|
||||
override lapse({ scene }: Arena): boolean {
|
||||
const source = this.getSourcePokemon(scene);
|
||||
return source ? source.isActive(true) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1025,7 +1081,8 @@ class ImprisonTag extends ArenaTrapTag {
|
||||
* @returns `true`
|
||||
*/
|
||||
override activateTrap(pokemon: Pokemon): boolean {
|
||||
if (this.source.isActive(true)) {
|
||||
const source = this.getSourcePokemon(pokemon.scene);
|
||||
if (source && source.isActive(true) && pokemon.isAllowedInBattle()) {
|
||||
pokemon.addTag(BattlerTagType.IMPRISON, 1, Moves.IMPRISON, this.sourceId);
|
||||
}
|
||||
return true;
|
||||
@ -1036,8 +1093,8 @@ class ImprisonTag extends ArenaTrapTag {
|
||||
* @param arena
|
||||
*/
|
||||
override onRemove({ scene }: Arena): void {
|
||||
const party = this.retrieveField(scene);
|
||||
party?.forEach((p: PlayerPokemon | EnemyPokemon) => {
|
||||
const party = this.getAffectedPokemon(scene);
|
||||
party?.forEach((p: Pokemon) => {
|
||||
p.removeTag(BattlerTagType.IMPRISON);
|
||||
});
|
||||
}
|
||||
@ -1070,7 +1127,7 @@ class FireGrassPledgeTag extends ArenaTag {
|
||||
pokemon.scene.queueMessage(i18next.t("arenaTag:fireGrassPledgeLapse", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
// TODO: Replace this with a proper animation
|
||||
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.getBattlerIndex(), pokemon.getBattlerIndex(), CommonAnim.MAGMA_STORM));
|
||||
pokemon.damageAndUpdate(Utils.toDmgValue(pokemon.getMaxHp() / 8));
|
||||
pokemon.damageAndUpdate(toDmgValue(pokemon.getMaxHp() / 8));
|
||||
});
|
||||
|
||||
return super.lapse(arena);
|
||||
@ -1094,8 +1151,15 @@ class WaterFirePledgeTag extends ArenaTag {
|
||||
arena.scene.queueMessage(i18next.t(`arenaTag:waterFirePledgeOnAdd${this.side === ArenaTagSide.PLAYER ? "Player" : this.side === ArenaTagSide.ENEMY ? "Enemy" : ""}`));
|
||||
}
|
||||
|
||||
override apply(arena: Arena, args: any[]): boolean {
|
||||
const moveChance = args[0] as Utils.NumberHolder;
|
||||
/**
|
||||
* Doubles the chance for the given move's secondary effect(s) to trigger
|
||||
* @param arena the {@linkcode Arena} containing this tag
|
||||
* @param simulated n/a
|
||||
* @param moveChance a {@linkcode NumberHolder} containing
|
||||
* the move's current effect chance
|
||||
* @returns `true` if the move's effect chance was doubled (currently always `true`)
|
||||
*/
|
||||
override apply(arena: Arena, simulated: boolean, moveChance: NumberHolder): boolean {
|
||||
moveChance.value *= 2;
|
||||
return true;
|
||||
}
|
||||
@ -1121,63 +1185,63 @@ class GrassWaterPledgeTag extends ArenaTag {
|
||||
// TODO: swap `sourceMove` and `sourceId` and make `sourceMove` an optional parameter
|
||||
export function getArenaTag(tagType: ArenaTagType, turnCount: number, sourceMove: Moves | undefined, sourceId: number, targetIndex?: BattlerIndex, side: ArenaTagSide = ArenaTagSide.BOTH): ArenaTag | null {
|
||||
switch (tagType) {
|
||||
case ArenaTagType.MIST:
|
||||
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.NO_CRIT:
|
||||
return new NoCritTag(turnCount, sourceMove!, sourceId, side); // TODO: is this bang correct?
|
||||
case ArenaTagType.MUD_SPORT:
|
||||
return new MudSportTag(turnCount, sourceId);
|
||||
case ArenaTagType.WATER_SPORT:
|
||||
return new WaterSportTag(turnCount, sourceId);
|
||||
case ArenaTagType.ION_DELUGE:
|
||||
return new IonDelugeTag(sourceMove);
|
||||
case ArenaTagType.SPIKES:
|
||||
return new SpikesTag(sourceId, side);
|
||||
case ArenaTagType.TOXIC_SPIKES:
|
||||
return new ToxicSpikesTag(sourceId, side);
|
||||
case ArenaTagType.FUTURE_SIGHT:
|
||||
case ArenaTagType.DOOM_DESIRE:
|
||||
return new DelayedAttackTag(tagType, sourceMove, sourceId, targetIndex!); // TODO:questionable bang
|
||||
case ArenaTagType.WISH:
|
||||
return new WishTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.STEALTH_ROCK:
|
||||
return new StealthRockTag(sourceId, side);
|
||||
case ArenaTagType.STICKY_WEB:
|
||||
return new StickyWebTag(sourceId, side);
|
||||
case ArenaTagType.TRICK_ROOM:
|
||||
return new TrickRoomTag(turnCount, sourceId);
|
||||
case ArenaTagType.GRAVITY:
|
||||
return new GravityTag(turnCount);
|
||||
case ArenaTagType.REFLECT:
|
||||
return new ReflectTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.LIGHT_SCREEN:
|
||||
return new LightScreenTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.AURORA_VEIL:
|
||||
return new AuroraVeilTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.TAILWIND:
|
||||
return new TailwindTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.HAPPY_HOUR:
|
||||
return new HappyHourTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.SAFEGUARD:
|
||||
return new SafeguardTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.IMPRISON:
|
||||
return new ImprisonTag(sourceId, side);
|
||||
case ArenaTagType.FIRE_GRASS_PLEDGE:
|
||||
return new FireGrassPledgeTag(sourceId, side);
|
||||
case ArenaTagType.WATER_FIRE_PLEDGE:
|
||||
return new WaterFirePledgeTag(sourceId, side);
|
||||
case ArenaTagType.GRASS_WATER_PLEDGE:
|
||||
return new GrassWaterPledgeTag(sourceId, side);
|
||||
default:
|
||||
return null;
|
||||
case ArenaTagType.MIST:
|
||||
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.NO_CRIT:
|
||||
return new NoCritTag(turnCount, sourceMove!, sourceId, side); // TODO: is this bang correct?
|
||||
case ArenaTagType.MUD_SPORT:
|
||||
return new MudSportTag(turnCount, sourceId);
|
||||
case ArenaTagType.WATER_SPORT:
|
||||
return new WaterSportTag(turnCount, sourceId);
|
||||
case ArenaTagType.ION_DELUGE:
|
||||
return new IonDelugeTag(sourceMove);
|
||||
case ArenaTagType.SPIKES:
|
||||
return new SpikesTag(sourceId, side);
|
||||
case ArenaTagType.TOXIC_SPIKES:
|
||||
return new ToxicSpikesTag(sourceId, side);
|
||||
case ArenaTagType.FUTURE_SIGHT:
|
||||
case ArenaTagType.DOOM_DESIRE:
|
||||
return new DelayedAttackTag(tagType, sourceMove, sourceId, targetIndex!); // TODO:questionable bang
|
||||
case ArenaTagType.WISH:
|
||||
return new WishTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.STEALTH_ROCK:
|
||||
return new StealthRockTag(sourceId, side);
|
||||
case ArenaTagType.STICKY_WEB:
|
||||
return new StickyWebTag(sourceId, side);
|
||||
case ArenaTagType.TRICK_ROOM:
|
||||
return new TrickRoomTag(turnCount, sourceId);
|
||||
case ArenaTagType.GRAVITY:
|
||||
return new GravityTag(turnCount);
|
||||
case ArenaTagType.REFLECT:
|
||||
return new ReflectTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.LIGHT_SCREEN:
|
||||
return new LightScreenTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.AURORA_VEIL:
|
||||
return new AuroraVeilTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.TAILWIND:
|
||||
return new TailwindTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.HAPPY_HOUR:
|
||||
return new HappyHourTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.SAFEGUARD:
|
||||
return new SafeguardTag(turnCount, sourceId, side);
|
||||
case ArenaTagType.IMPRISON:
|
||||
return new ImprisonTag(sourceId, side);
|
||||
case ArenaTagType.FIRE_GRASS_PLEDGE:
|
||||
return new FireGrassPledgeTag(sourceId, side);
|
||||
case ArenaTagType.WATER_FIRE_PLEDGE:
|
||||
return new WaterFirePledgeTag(sourceId, side);
|
||||
case ArenaTagType.GRASS_WATER_PLEDGE:
|
||||
return new GrassWaterPledgeTag(sourceId, side);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,14 +13,14 @@ export function getBiomeName(biome: Biome | -1) {
|
||||
return i18next.t("biome:unknownLocation");
|
||||
}
|
||||
switch (biome) {
|
||||
case Biome.GRASS:
|
||||
return i18next.t("biome:GRASS");
|
||||
case Biome.RUINS:
|
||||
return i18next.t("biome:RUINS");
|
||||
case Biome.END:
|
||||
return i18next.t("biome:END");
|
||||
default:
|
||||
return i18next.t(`biome:${Biome[biome].toUpperCase()}`);
|
||||
case Biome.GRASS:
|
||||
return i18next.t("biome:GRASS");
|
||||
case Biome.RUINS:
|
||||
return i18next.t("biome:RUINS");
|
||||
case Biome.END:
|
||||
return i18next.t("biome:END");
|
||||
default:
|
||||
return i18next.t(`biome:${Biome[biome].toUpperCase()}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,12 @@ import { Species } from "#enums/species";
|
||||
|
||||
export const POKERUS_STARTER_COUNT = 5;
|
||||
|
||||
// #region Friendship constants
|
||||
export const CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER = 2;
|
||||
export const FRIENDSHIP_GAIN_FROM_BATTLE = 2;
|
||||
export const FRIENDSHIP_GAIN_FROM_RARE_CANDY = 5;
|
||||
export const FRIENDSHIP_LOSS_FROM_FAINT = 10;
|
||||
|
||||
/**
|
||||
* Function to get the cumulative friendship threshold at which a candy is earned
|
||||
* @param starterCost The cost of the starter, found in {@linkcode speciesStarterCosts}
|
||||
@ -9,25 +15,25 @@ export const POKERUS_STARTER_COUNT = 5;
|
||||
*/
|
||||
export function getStarterValueFriendshipCap(starterCost: number): number {
|
||||
switch (starterCost) {
|
||||
case 1:
|
||||
return 20;
|
||||
case 2:
|
||||
return 40;
|
||||
case 3:
|
||||
return 60;
|
||||
case 4:
|
||||
return 100;
|
||||
case 5:
|
||||
return 140;
|
||||
case 6:
|
||||
return 200;
|
||||
case 7:
|
||||
return 280;
|
||||
case 8:
|
||||
case 9:
|
||||
return 450;
|
||||
default:
|
||||
return 600;
|
||||
case 1:
|
||||
return 20;
|
||||
case 2:
|
||||
return 40;
|
||||
case 3:
|
||||
return 60;
|
||||
case 4:
|
||||
return 100;
|
||||
case 5:
|
||||
return 140;
|
||||
case 6:
|
||||
return 200;
|
||||
case 7:
|
||||
return 280;
|
||||
case 8:
|
||||
case 9:
|
||||
return 450;
|
||||
default:
|
||||
return 600;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,15 +134,15 @@ export class AnimConfig {
|
||||
for (const te of frameTimedEvents[fte]) {
|
||||
let timedEvent: AnimTimedEvent | undefined;
|
||||
switch (te.eventType) {
|
||||
case "AnimTimedSoundEvent":
|
||||
timedEvent = new AnimTimedSoundEvent(te.frameIndex, te.resourceName, te);
|
||||
break;
|
||||
case "AnimTimedAddBgEvent":
|
||||
timedEvent = new AnimTimedAddBgEvent(te.frameIndex, te.resourceName, te);
|
||||
break;
|
||||
case "AnimTimedUpdateBgEvent":
|
||||
timedEvent = new AnimTimedUpdateBgEvent(te.frameIndex, te.resourceName, te);
|
||||
break;
|
||||
case "AnimTimedSoundEvent":
|
||||
timedEvent = new AnimTimedSoundEvent(te.frameIndex, te.resourceName, te);
|
||||
break;
|
||||
case "AnimTimedAddBgEvent":
|
||||
timedEvent = new AnimTimedAddBgEvent(te.frameIndex, te.resourceName, te);
|
||||
break;
|
||||
case "AnimTimedUpdateBgEvent":
|
||||
timedEvent = new AnimTimedUpdateBgEvent(te.frameIndex, te.resourceName, te);
|
||||
break;
|
||||
}
|
||||
|
||||
timedEvent && timedEvents.push(timedEvent);
|
||||
@ -243,12 +243,12 @@ class AnimFrame {
|
||||
if (!init) {
|
||||
let target = AnimFrameTarget.GRAPHIC;
|
||||
switch (pattern) {
|
||||
case -2:
|
||||
target = AnimFrameTarget.TARGET;
|
||||
break;
|
||||
case -1:
|
||||
target = AnimFrameTarget.USER;
|
||||
break;
|
||||
case -2:
|
||||
target = AnimFrameTarget.TARGET;
|
||||
break;
|
||||
case -1:
|
||||
target = AnimFrameTarget.USER;
|
||||
break;
|
||||
}
|
||||
this.target = target;
|
||||
this.graphicFrame = pattern >= 0 ? pattern : 0;
|
||||
@ -803,23 +803,23 @@ export abstract class BattleAnim {
|
||||
let scaleX = (frame.zoomX / 100) * (!frame.mirror ? 1 : -1);
|
||||
const scaleY = (frame.zoomY / 100);
|
||||
switch (frame.focus) {
|
||||
case AnimFocus.TARGET:
|
||||
x += targetInitialX - targetFocusX;
|
||||
y += (targetInitialY - targetHalfHeight) - targetFocusY;
|
||||
break;
|
||||
case AnimFocus.USER:
|
||||
x += userInitialX - userFocusX;
|
||||
y += (userInitialY - userHalfHeight) - userFocusY;
|
||||
break;
|
||||
case AnimFocus.USER_TARGET:
|
||||
const point = transformPoint(this.srcLine[0], this.srcLine[1], this.srcLine[2], this.srcLine[3],
|
||||
this.dstLine[0], this.dstLine[1] - userHalfHeight, this.dstLine[2], this.dstLine[3] - targetHalfHeight, x, y);
|
||||
x = point[0];
|
||||
y = point[1];
|
||||
if (frame.target === AnimFrameTarget.GRAPHIC && isReversed(this.srcLine[0], this.srcLine[2], this.dstLine[0], this.dstLine[2])) {
|
||||
scaleX = scaleX * -1;
|
||||
}
|
||||
break;
|
||||
case AnimFocus.TARGET:
|
||||
x += targetInitialX - targetFocusX;
|
||||
y += (targetInitialY - targetHalfHeight) - targetFocusY;
|
||||
break;
|
||||
case AnimFocus.USER:
|
||||
x += userInitialX - userFocusX;
|
||||
y += (userInitialY - userHalfHeight) - userFocusY;
|
||||
break;
|
||||
case AnimFocus.USER_TARGET:
|
||||
const point = transformPoint(this.srcLine[0], this.srcLine[1], this.srcLine[2], this.srcLine[3],
|
||||
this.dstLine[0], this.dstLine[1] - userHalfHeight, this.dstLine[2], this.dstLine[3] - targetHalfHeight, x, y);
|
||||
x = point[0];
|
||||
y = point[1];
|
||||
if (frame.target === AnimFrameTarget.GRAPHIC && isReversed(this.srcLine[0], this.srcLine[2], this.dstLine[0], this.dstLine[2])) {
|
||||
scaleX = scaleX * -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
const angle = -frame.angle;
|
||||
const key = frame.target === AnimFrameTarget.GRAPHIC ? g++ : frame.target === AnimFrameTarget.USER ? u++ : t++;
|
||||
@ -993,44 +993,44 @@ export abstract class BattleAnim {
|
||||
spritePriorities[graphicIndex] = frame.priority;
|
||||
const setSpritePriority = (priority: integer) => {
|
||||
switch (priority) {
|
||||
case 0:
|
||||
scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, scene.getNonSwitchedEnemyPokemon() || scene.getNonSwitchedPlayerPokemon()!); // This bang assumes that if (the EnemyPokemon is undefined, then the PlayerPokemon function must return an object), correct assumption?
|
||||
break;
|
||||
case 1:
|
||||
scene.field.moveTo(moveSprite, scene.field.getAll().length - 1);
|
||||
break;
|
||||
case 2:
|
||||
switch (frame.focus) {
|
||||
case AnimFocus.USER:
|
||||
if (this.bgSprite) {
|
||||
scene.field.moveAbove(moveSprite as Phaser.GameObjects.GameObject, this.bgSprite);
|
||||
} else {
|
||||
scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, this.user!); // TODO: is this bang correct?
|
||||
case 0:
|
||||
scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, scene.getNonSwitchedEnemyPokemon() || scene.getNonSwitchedPlayerPokemon()!); // This bang assumes that if (the EnemyPokemon is undefined, then the PlayerPokemon function must return an object), correct assumption?
|
||||
break;
|
||||
case 1:
|
||||
scene.field.moveTo(moveSprite, scene.field.getAll().length - 1);
|
||||
break;
|
||||
case 2:
|
||||
switch (frame.focus) {
|
||||
case AnimFocus.USER:
|
||||
if (this.bgSprite) {
|
||||
scene.field.moveAbove(moveSprite as Phaser.GameObjects.GameObject, this.bgSprite);
|
||||
} else {
|
||||
scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, this.user!); // TODO: is this bang correct?
|
||||
}
|
||||
break;
|
||||
case AnimFocus.TARGET:
|
||||
scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, this.target!); // TODO: is this bang correct?
|
||||
break;
|
||||
default:
|
||||
setSpritePriority(1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case AnimFocus.TARGET:
|
||||
scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, this.target!); // TODO: is this bang correct?
|
||||
case 3:
|
||||
switch (frame.focus) {
|
||||
case AnimFocus.USER:
|
||||
scene.field.moveAbove(moveSprite as Phaser.GameObjects.GameObject, this.user!); // TODO: is this bang correct?
|
||||
break;
|
||||
case AnimFocus.TARGET:
|
||||
scene.field.moveAbove(moveSprite as Phaser.GameObjects.GameObject, this.target!); // TODO: is this bang correct?
|
||||
break;
|
||||
default:
|
||||
setSpritePriority(1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
setSpritePriority(1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
switch (frame.focus) {
|
||||
case AnimFocus.USER:
|
||||
scene.field.moveAbove(moveSprite as Phaser.GameObjects.GameObject, this.user!); // TODO: is this bang correct?
|
||||
break;
|
||||
case AnimFocus.TARGET:
|
||||
scene.field.moveAbove(moveSprite as Phaser.GameObjects.GameObject, this.target!); // TODO: is this bang correct?
|
||||
break;
|
||||
default:
|
||||
setSpritePriority(1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
setSpritePriority(1);
|
||||
}
|
||||
};
|
||||
setSpritePriority(frame.priority);
|
||||
@ -1396,108 +1396,108 @@ export async function populateAnims() {
|
||||
const fieldName = field.slice(0, field.indexOf(":"));
|
||||
const fieldData = field.slice(fieldName.length + 1, field.lastIndexOf("\n")).trim();
|
||||
switch (fieldName) {
|
||||
case "array":
|
||||
const framesData = fieldData.split(" - - - ").slice(1);
|
||||
for (let fd = 0; fd < framesData.length; fd++) {
|
||||
anim.frames.push([]);
|
||||
const frameData = framesData[fd];
|
||||
const focusFramesData = frameData.split(" - - ");
|
||||
for (let tf = 0; tf < focusFramesData.length; tf++) {
|
||||
const values = focusFramesData[tf].replace(/ \- /g, "").split("\n");
|
||||
const targetFrame = new AnimFrame(parseFloat(values[0]), parseFloat(values[1]), parseFloat(values[2]), parseFloat(values[11]), parseFloat(values[3]),
|
||||
parseInt(values[4]) === 1, parseInt(values[6]) === 1, parseInt(values[5]), parseInt(values[7]), parseInt(values[8]), parseInt(values[12]), parseInt(values[13]),
|
||||
parseInt(values[14]), parseInt(values[15]), parseInt(values[16]), parseInt(values[17]), parseInt(values[18]), parseInt(values[19]),
|
||||
parseInt(values[21]), parseInt(values[22]), parseInt(values[23]), parseInt(values[24]), parseInt(values[20]) === 1, parseInt(values[25]), parseInt(values[26]) as AnimFocus);
|
||||
anim.frames[fd].push(targetFrame);
|
||||
case "array":
|
||||
const framesData = fieldData.split(" - - - ").slice(1);
|
||||
for (let fd = 0; fd < framesData.length; fd++) {
|
||||
anim.frames.push([]);
|
||||
const frameData = framesData[fd];
|
||||
const focusFramesData = frameData.split(" - - ");
|
||||
for (let tf = 0; tf < focusFramesData.length; tf++) {
|
||||
const values = focusFramesData[tf].replace(/ \- /g, "").split("\n");
|
||||
const targetFrame = new AnimFrame(parseFloat(values[0]), parseFloat(values[1]), parseFloat(values[2]), parseFloat(values[11]), parseFloat(values[3]),
|
||||
parseInt(values[4]) === 1, parseInt(values[6]) === 1, parseInt(values[5]), parseInt(values[7]), parseInt(values[8]), parseInt(values[12]), parseInt(values[13]),
|
||||
parseInt(values[14]), parseInt(values[15]), parseInt(values[16]), parseInt(values[17]), parseInt(values[18]), parseInt(values[19]),
|
||||
parseInt(values[21]), parseInt(values[22]), parseInt(values[23]), parseInt(values[24]), parseInt(values[20]) === 1, parseInt(values[25]), parseInt(values[26]) as AnimFocus);
|
||||
anim.frames[fd].push(targetFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "graphic":
|
||||
const graphic = fieldData !== "''" ? fieldData : "";
|
||||
anim.graphic = graphic.indexOf(".") > -1
|
||||
? graphic.slice(0, fieldData.indexOf("."))
|
||||
: graphic;
|
||||
break;
|
||||
case "timing":
|
||||
const timingEntries = fieldData.split("- !ruby/object:PBAnimTiming ").slice(1);
|
||||
for (let t = 0; t < timingEntries.length; t++) {
|
||||
const timingData = timingEntries[t].replace(/\n/g, " ").replace(/[ ]{2,}/g, " ").replace(/[a-z]+: ! '', /ig, "").replace(/name: (.*?),/, "name: \"$1\",")
|
||||
.replace(/flashColor: !ruby\/object:Color { alpha: ([\d\.]+), blue: ([\d\.]+), green: ([\d\.]+), red: ([\d\.]+)}/, "flashRed: $4, flashGreen: $3, flashBlue: $2, flashAlpha: $1");
|
||||
const frameIndex = parseInt(/frame: (\d+)/.exec(timingData)![1]); // TODO: is the bang correct?
|
||||
let resourceName = /name: "(.*?)"/.exec(timingData)![1].replace("''", ""); // TODO: is the bang correct?
|
||||
const timingType = parseInt(/timingType: (\d)/.exec(timingData)![1]); // TODO: is the bang correct?
|
||||
let timedEvent: AnimTimedEvent | undefined;
|
||||
switch (timingType) {
|
||||
case 0:
|
||||
if (resourceName && resourceName.indexOf(".") === -1) {
|
||||
let ext: string | undefined;
|
||||
[ "wav", "mp3", "m4a" ].every(e => {
|
||||
if (seNames.indexOf(`${resourceName}.${e}`) > -1) {
|
||||
ext = e;
|
||||
return false;
|
||||
break;
|
||||
case "graphic":
|
||||
const graphic = fieldData !== "''" ? fieldData : "";
|
||||
anim.graphic = graphic.indexOf(".") > -1
|
||||
? graphic.slice(0, fieldData.indexOf("."))
|
||||
: graphic;
|
||||
break;
|
||||
case "timing":
|
||||
const timingEntries = fieldData.split("- !ruby/object:PBAnimTiming ").slice(1);
|
||||
for (let t = 0; t < timingEntries.length; t++) {
|
||||
const timingData = timingEntries[t].replace(/\n/g, " ").replace(/[ ]{2,}/g, " ").replace(/[a-z]+: ! '', /ig, "").replace(/name: (.*?),/, "name: \"$1\",")
|
||||
.replace(/flashColor: !ruby\/object:Color { alpha: ([\d\.]+), blue: ([\d\.]+), green: ([\d\.]+), red: ([\d\.]+)}/, "flashRed: $4, flashGreen: $3, flashBlue: $2, flashAlpha: $1");
|
||||
const frameIndex = parseInt(/frame: (\d+)/.exec(timingData)![1]); // TODO: is the bang correct?
|
||||
let resourceName = /name: "(.*?)"/.exec(timingData)![1].replace("''", ""); // TODO: is the bang correct?
|
||||
const timingType = parseInt(/timingType: (\d)/.exec(timingData)![1]); // TODO: is the bang correct?
|
||||
let timedEvent: AnimTimedEvent | undefined;
|
||||
switch (timingType) {
|
||||
case 0:
|
||||
if (resourceName && resourceName.indexOf(".") === -1) {
|
||||
let ext: string | undefined;
|
||||
[ "wav", "mp3", "m4a" ].every(e => {
|
||||
if (seNames.indexOf(`${resourceName}.${e}`) > -1) {
|
||||
ext = e;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (!ext) {
|
||||
ext = ".wav";
|
||||
}
|
||||
resourceName += `.${ext}`;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (!ext) {
|
||||
ext = ".wav";
|
||||
timedEvent = new AnimTimedSoundEvent(frameIndex, resourceName);
|
||||
break;
|
||||
case 1:
|
||||
timedEvent = new AnimTimedAddBgEvent(frameIndex, resourceName.slice(0, resourceName.indexOf(".")));
|
||||
break;
|
||||
case 2:
|
||||
timedEvent = new AnimTimedUpdateBgEvent(frameIndex, resourceName.slice(0, resourceName.indexOf(".")));
|
||||
break;
|
||||
}
|
||||
if (!timedEvent) {
|
||||
continue;
|
||||
}
|
||||
const propPattern = /([a-z]+): (.*?)(?:,|\})/ig;
|
||||
let propMatch: RegExpExecArray;
|
||||
while ((propMatch = propPattern.exec(timingData)!)) { // TODO: is this bang correct?
|
||||
const prop = propMatch[1];
|
||||
let value: any = propMatch[2];
|
||||
switch (prop) {
|
||||
case "bgX":
|
||||
case "bgY":
|
||||
value = parseFloat(value);
|
||||
break;
|
||||
case "volume":
|
||||
case "pitch":
|
||||
case "opacity":
|
||||
case "colorRed":
|
||||
case "colorGreen":
|
||||
case "colorBlue":
|
||||
case "colorAlpha":
|
||||
case "duration":
|
||||
case "flashScope":
|
||||
case "flashRed":
|
||||
case "flashGreen":
|
||||
case "flashBlue":
|
||||
case "flashAlpha":
|
||||
case "flashDuration":
|
||||
value = parseInt(value);
|
||||
break;
|
||||
}
|
||||
if (timedEvent.hasOwnProperty(prop)) {
|
||||
timedEvent[prop] = value;
|
||||
}
|
||||
resourceName += `.${ext}`;
|
||||
}
|
||||
timedEvent = new AnimTimedSoundEvent(frameIndex, resourceName);
|
||||
break;
|
||||
case 1:
|
||||
timedEvent = new AnimTimedAddBgEvent(frameIndex, resourceName.slice(0, resourceName.indexOf(".")));
|
||||
break;
|
||||
case 2:
|
||||
timedEvent = new AnimTimedUpdateBgEvent(frameIndex, resourceName.slice(0, resourceName.indexOf(".")));
|
||||
break;
|
||||
}
|
||||
if (!timedEvent) {
|
||||
continue;
|
||||
}
|
||||
const propPattern = /([a-z]+): (.*?)(?:,|\})/ig;
|
||||
let propMatch: RegExpExecArray;
|
||||
while ((propMatch = propPattern.exec(timingData)!)) { // TODO: is this bang correct?
|
||||
const prop = propMatch[1];
|
||||
let value: any = propMatch[2];
|
||||
switch (prop) {
|
||||
case "bgX":
|
||||
case "bgY":
|
||||
value = parseFloat(value);
|
||||
break;
|
||||
case "volume":
|
||||
case "pitch":
|
||||
case "opacity":
|
||||
case "colorRed":
|
||||
case "colorGreen":
|
||||
case "colorBlue":
|
||||
case "colorAlpha":
|
||||
case "duration":
|
||||
case "flashScope":
|
||||
case "flashRed":
|
||||
case "flashGreen":
|
||||
case "flashBlue":
|
||||
case "flashAlpha":
|
||||
case "flashDuration":
|
||||
value = parseInt(value);
|
||||
break;
|
||||
if (!anim.frameTimedEvents.has(frameIndex)) {
|
||||
anim.frameTimedEvents.set(frameIndex, []);
|
||||
}
|
||||
if (timedEvent.hasOwnProperty(prop)) {
|
||||
timedEvent[prop] = value;
|
||||
}
|
||||
}
|
||||
if (!anim.frameTimedEvents.has(frameIndex)) {
|
||||
anim.frameTimedEvents.set(frameIndex, []);
|
||||
}
|
||||
anim.frameTimedEvents.get(frameIndex)!.push(timedEvent); // TODO: is this bang correct?
|
||||
}
|
||||
break;
|
||||
case "position":
|
||||
anim.position = parseInt(fieldData);
|
||||
break;
|
||||
case "hue":
|
||||
anim.hue = parseInt(fieldData);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "position":
|
||||
anim.position = parseInt(fieldData);
|
||||
break;
|
||||
case "hue":
|
||||
anim.hue = parseInt(fieldData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
|
||||
import { ShowAbilityPhase } from "#app/phases/show-ability-phase";
|
||||
import { StatStageChangePhase, StatStageChangeCallback } from "#app/phases/stat-stage-change-phase";
|
||||
import { PokemonAnimType } from "#app/enums/pokemon-anim-type";
|
||||
import BattleScene from "#app/battle-scene";
|
||||
|
||||
export enum BattlerTagLapseType {
|
||||
FAINT,
|
||||
@ -90,6 +91,15 @@ export class BattlerTag {
|
||||
this.sourceMove = source.sourceMove;
|
||||
this.sourceId = source.sourceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that retrieves the source Pokemon object
|
||||
* @param scene medium to retrieve the source Pokemon
|
||||
* @returns The source {@linkcode Pokemon} or `null` if none is found
|
||||
*/
|
||||
public getSourcePokemon(scene: BattleScene): Pokemon | null {
|
||||
return this.sourceId ? scene.getPokemonById(this.sourceId) : null;
|
||||
}
|
||||
}
|
||||
|
||||
export interface WeatherBattlerTag {
|
||||
@ -120,7 +130,7 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag {
|
||||
const phase = pokemon.scene.getCurrentPhase() as MovePhase;
|
||||
const move = phase.move;
|
||||
|
||||
if (this.isMoveRestricted(move.moveId)) {
|
||||
if (this.isMoveRestricted(move.moveId, pokemon)) {
|
||||
if (this.interruptedText(pokemon, move.moveId)) {
|
||||
pokemon.scene.queueMessage(this.interruptedText(pokemon, move.moveId));
|
||||
}
|
||||
@ -136,10 +146,11 @@ export abstract class MoveRestrictionBattlerTag extends BattlerTag {
|
||||
/**
|
||||
* Gets whether this tag is restricting a move.
|
||||
*
|
||||
* @param {Moves} move {@linkcode Moves} ID to check restriction for.
|
||||
* @returns {boolean} `true` if the move is restricted by this tag, otherwise `false`.
|
||||
* @param move - {@linkcode Moves} ID to check restriction for.
|
||||
* @param user - The {@linkcode Pokemon} involved
|
||||
* @returns `true` if the move is restricted by this tag, otherwise `false`.
|
||||
*/
|
||||
abstract isMoveRestricted(move: Moves): boolean;
|
||||
public abstract isMoveRestricted(move: Moves, user?: Pokemon): boolean;
|
||||
|
||||
/**
|
||||
* Checks if this tag is restricting a move based on a user's decisions during the target selection phase
|
||||
@ -327,6 +338,16 @@ export class GorillaTacticsTag extends MoveRestrictionBattlerTag {
|
||||
pokemon.setStat(Stat.ATK, pokemon.getStat(Stat.ATK, false) * 1.5, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the Gorilla Tactics Battler Tag along with its unique class variable moveId
|
||||
* @override
|
||||
* @param source Gorilla Tactics' {@linkcode BattlerTag} information
|
||||
*/
|
||||
public override loadTag(source: BattlerTag | any): void {
|
||||
super.loadTag(source);
|
||||
this.moveId = source.moveId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @override
|
||||
@ -898,14 +919,14 @@ export class EncoreTag extends BattlerTag {
|
||||
}
|
||||
|
||||
switch (repeatableMove.move) {
|
||||
case Moves.MIMIC:
|
||||
case Moves.MIRROR_MOVE:
|
||||
case Moves.TRANSFORM:
|
||||
case Moves.STRUGGLE:
|
||||
case Moves.SKETCH:
|
||||
case Moves.SLEEP_TALK:
|
||||
case Moves.ENCORE:
|
||||
return false;
|
||||
case Moves.MIMIC:
|
||||
case Moves.MIRROR_MOVE:
|
||||
case Moves.TRANSFORM:
|
||||
case Moves.STRUGGLE:
|
||||
case Moves.SKETCH:
|
||||
case Moves.SLEEP_TALK:
|
||||
case Moves.ENCORE:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (allMoves[repeatableMove.move].hasAttr(ChargeAttr) && repeatableMove.result === MoveResult.OTHER) {
|
||||
@ -1620,12 +1641,12 @@ export class HighestStatBoostTag extends AbilityBattlerTag {
|
||||
this.stat = highestStat;
|
||||
|
||||
switch (this.stat) {
|
||||
case Stat.SPD:
|
||||
this.multiplier = 1.5;
|
||||
break;
|
||||
default:
|
||||
this.multiplier = 1.3;
|
||||
break;
|
||||
case Stat.SPD:
|
||||
this.multiplier = 1.5;
|
||||
break;
|
||||
default:
|
||||
this.multiplier = 1.3;
|
||||
break;
|
||||
}
|
||||
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:highestStatBoostOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), statName: i18next.t(getStatKey(highestStat)) }), null, false, null, true);
|
||||
@ -1713,7 +1734,12 @@ export class TypeImmuneTag extends BattlerTag {
|
||||
}
|
||||
}
|
||||
|
||||
export class MagnetRisenTag extends TypeImmuneTag {
|
||||
/**
|
||||
* Battler Tag that lifts the affected Pokemon into the air and provides immunity to Ground type moves.
|
||||
* @see {@link https://bulbapedia.bulbagarden.net/wiki/Magnet_Rise_(move) | Moves.MAGNET_RISE}
|
||||
* @see {@link https://bulbapedia.bulbagarden.net/wiki/Telekinesis_(move) | Moves.TELEKINESIS}
|
||||
*/
|
||||
export class FloatingTag extends TypeImmuneTag {
|
||||
constructor(tagType: BattlerTagType, sourceMove: Moves) {
|
||||
super(tagType, sourceMove, Type.GROUND, 5);
|
||||
}
|
||||
@ -1721,13 +1747,17 @@ export class MagnetRisenTag extends TypeImmuneTag {
|
||||
onAdd(pokemon: Pokemon): void {
|
||||
super.onAdd(pokemon);
|
||||
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:magnetRisenOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
if (this.sourceMove === Moves.MAGNET_RISE) {
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:magnetRisenOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onRemove(pokemon: Pokemon): void {
|
||||
super.onRemove(pokemon);
|
||||
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:magnetRisenOnRemove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
if (this.sourceMove === Moves.MAGNET_RISE) {
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:magnetRisenOnRemove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2406,15 +2436,15 @@ export class SubstituteTag extends BattlerTag {
|
||||
|
||||
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
switch (lapseType) {
|
||||
case BattlerTagLapseType.PRE_MOVE:
|
||||
this.onPreMove(pokemon);
|
||||
break;
|
||||
case BattlerTagLapseType.AFTER_MOVE:
|
||||
this.onAfterMove(pokemon);
|
||||
break;
|
||||
case BattlerTagLapseType.HIT:
|
||||
this.onHit(pokemon);
|
||||
break;
|
||||
case BattlerTagLapseType.PRE_MOVE:
|
||||
this.onPreMove(pokemon);
|
||||
break;
|
||||
case BattlerTagLapseType.AFTER_MOVE:
|
||||
this.onAfterMove(pokemon);
|
||||
break;
|
||||
case BattlerTagLapseType.HIT:
|
||||
this.onHit(pokemon);
|
||||
break;
|
||||
}
|
||||
return lapseType !== BattlerTagLapseType.CUSTOM; // only remove this tag on custom lapse
|
||||
}
|
||||
@ -2501,8 +2531,6 @@ export class MysteryEncounterPostSummonTag extends BattlerTag {
|
||||
* Torment does not interrupt the move if the move is performed consecutively in the same turn and right after Torment is applied
|
||||
*/
|
||||
export class TormentTag extends MoveRestrictionBattlerTag {
|
||||
private target: Pokemon;
|
||||
|
||||
constructor(sourceId: number) {
|
||||
super(BattlerTagType.TORMENT, BattlerTagLapseType.AFTER_MOVE, 1, Moves.TORMENT, sourceId);
|
||||
}
|
||||
@ -2514,7 +2542,6 @@ export class TormentTag extends MoveRestrictionBattlerTag {
|
||||
*/
|
||||
override onAdd(pokemon: Pokemon) {
|
||||
super.onAdd(pokemon);
|
||||
this.target = pokemon;
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:tormentOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), 1500);
|
||||
}
|
||||
|
||||
@ -2533,15 +2560,18 @@ export class TormentTag extends MoveRestrictionBattlerTag {
|
||||
* @param {Moves} move the move under investigation
|
||||
* @returns `true` if there is valid consecutive usage | `false` if the moves are different from each other
|
||||
*/
|
||||
override isMoveRestricted(move: Moves): boolean {
|
||||
const lastMove = this.target.getLastXMoves(1)[0];
|
||||
public override isMoveRestricted(move: Moves, user: Pokemon): boolean {
|
||||
if (!user) {
|
||||
return false;
|
||||
}
|
||||
const lastMove = user.getLastXMoves(1)[0];
|
||||
if ( !lastMove ) {
|
||||
return false;
|
||||
}
|
||||
// This checks for locking / momentum moves like Rollout and Hydro Cannon + if the user is under the influence of BattlerTagType.FRENZY
|
||||
// Because Uproar's unique behavior is not implemented, it does not check for Uproar. Torment has been marked as partial in moves.ts
|
||||
const moveObj = allMoves[lastMove.move];
|
||||
const isUnaffected = moveObj.hasAttr(ConsecutiveUseDoublePowerAttr) || this.target.getTag(BattlerTagType.FRENZY) || moveObj.hasAttr(ChargeAttr);
|
||||
const isUnaffected = moveObj.hasAttr(ConsecutiveUseDoublePowerAttr) || user.getTag(BattlerTagType.FRENZY) || moveObj.hasAttr(ChargeAttr);
|
||||
const validLastMoveResult = (lastMove.result === MoveResult.SUCCESS) || (lastMove.result === MoveResult.MISS);
|
||||
if (lastMove.move === move && validLastMoveResult && lastMove.move !== Moves.STRUGGLE && !isUnaffected) {
|
||||
return true;
|
||||
@ -2593,37 +2623,39 @@ export class TauntTag extends MoveRestrictionBattlerTag {
|
||||
* The tag is only removed when the source-user is removed from the field.
|
||||
*/
|
||||
export class ImprisonTag extends MoveRestrictionBattlerTag {
|
||||
private source: Pokemon | null;
|
||||
|
||||
constructor(sourceId: number) {
|
||||
super(BattlerTagType.IMPRISON, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.AFTER_MOVE ], 1, Moves.IMPRISON, sourceId);
|
||||
}
|
||||
|
||||
override onAdd(pokemon: Pokemon) {
|
||||
if (this.sourceId) {
|
||||
this.source = pokemon.scene.getPokemonById(this.sourceId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the source of Imprison is still active
|
||||
* @param _pokemon
|
||||
* @param _lapseType
|
||||
* @override
|
||||
* @param pokemon The pokemon this tag is attached to
|
||||
* @returns `true` if the source is still active
|
||||
*/
|
||||
override lapse(_pokemon: Pokemon, _lapseType: BattlerTagLapseType): boolean {
|
||||
return this.source?.isActive(true) ?? false;
|
||||
public override lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
const source = this.getSourcePokemon(pokemon.scene);
|
||||
if (source) {
|
||||
if (lapseType === BattlerTagLapseType.PRE_MOVE) {
|
||||
return super.lapse(pokemon, lapseType) && source.isActive(true);
|
||||
} else {
|
||||
return source.isActive(true);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the source of the tag has the parameter move in its moveset and that the source is still active
|
||||
* @override
|
||||
* @param {Moves} move the move under investigation
|
||||
* @returns `false` if either condition is not met
|
||||
*/
|
||||
override isMoveRestricted(move: Moves): boolean {
|
||||
if (this.source) {
|
||||
const sourceMoveset = this.source.getMoveset().map(m => m!.moveId);
|
||||
return sourceMoveset?.includes(move) && this.source.isActive(true);
|
||||
public override isMoveRestricted(move: Moves, user: Pokemon): boolean {
|
||||
const source = this.getSourcePokemon(user.scene);
|
||||
if (source) {
|
||||
const sourceMoveset = source.getMoveset().map(m => m!.moveId);
|
||||
return sourceMoveset?.includes(move) && source.isActive(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -2676,6 +2708,60 @@ export class SyrupBombTag extends BattlerTag {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Telekinesis raises the target into the air for three turns and causes all moves used against the target (aside from OHKO moves) to hit the target unless the target is in a semi-invulnerable state from Fly/Dig.
|
||||
* The first effect is provided by {@linkcode FloatingTag}, the accuracy-bypass effect is provided by TelekinesisTag
|
||||
* The effects of Telekinesis can be baton passed to a teammate. Unlike the mainline games, Telekinesis can be baton-passed to Mega Gengar.
|
||||
* @see {@link https://bulbapedia.bulbagarden.net/wiki/Telekinesis_(move) | Moves.TELEKINESIS}
|
||||
*/
|
||||
export class TelekinesisTag extends BattlerTag {
|
||||
constructor(sourceMove: Moves) {
|
||||
super(BattlerTagType.TELEKINESIS, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.AFTER_MOVE ], 3, sourceMove, undefined, true);
|
||||
}
|
||||
|
||||
override onAdd(pokemon: Pokemon) {
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:telekinesisOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tag that swaps the user's base ATK stat with its base DEF stat.
|
||||
* @extends BattlerTag
|
||||
*/
|
||||
export class PowerTrickTag extends BattlerTag {
|
||||
constructor(sourceMove: Moves, sourceId: number) {
|
||||
super(BattlerTagType.POWER_TRICK, BattlerTagLapseType.CUSTOM, 0, sourceMove, sourceId, true);
|
||||
}
|
||||
|
||||
onAdd(pokemon: Pokemon): void {
|
||||
this.swapStat(pokemon);
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:powerTrickActive", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
}
|
||||
|
||||
onRemove(pokemon: Pokemon): void {
|
||||
this.swapStat(pokemon);
|
||||
pokemon.scene.queueMessage(i18next.t("battlerTags:powerTrickActive", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the Power Trick tag and reverts any stat changes if the tag is already applied.
|
||||
* @param {Pokemon} pokemon The {@linkcode Pokemon} that already has the Power Trick tag.
|
||||
*/
|
||||
onOverlap(pokemon: Pokemon): void {
|
||||
pokemon.removeTag(this.tagType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Swaps the user's base ATK stat with its base DEF stat.
|
||||
* @param {Pokemon} pokemon The {@linkcode Pokemon} whose stats will be swapped.
|
||||
*/
|
||||
swapStat(pokemon: Pokemon): void {
|
||||
const temp = pokemon.getStat(Stat.ATK, false);
|
||||
pokemon.setStat(Stat.ATK, pokemon.getStat(Stat.DEF, false), false);
|
||||
pokemon.setStat(Stat.DEF, temp, false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a {@linkcode BattlerTag} based on the provided tag type, turn count, source move, and source ID.
|
||||
* @param sourceId - The ID of the pokemon adding the tag
|
||||
@ -2683,175 +2769,179 @@ export class SyrupBombTag extends BattlerTag {
|
||||
*/
|
||||
export function getBattlerTag(tagType: BattlerTagType, turnCount: number, sourceMove: Moves, sourceId: number): BattlerTag {
|
||||
switch (tagType) {
|
||||
case BattlerTagType.RECHARGING:
|
||||
return new RechargingTag(sourceMove);
|
||||
case BattlerTagType.BEAK_BLAST_CHARGING:
|
||||
return new BeakBlastChargingTag();
|
||||
case BattlerTagType.SHELL_TRAP:
|
||||
return new ShellTrapTag();
|
||||
case BattlerTagType.FLINCHED:
|
||||
return new FlinchedTag(sourceMove);
|
||||
case BattlerTagType.INTERRUPTED:
|
||||
return new InterruptedTag(sourceMove);
|
||||
case BattlerTagType.CONFUSED:
|
||||
return new ConfusedTag(turnCount, sourceMove);
|
||||
case BattlerTagType.INFATUATED:
|
||||
return new InfatuatedTag(sourceMove, sourceId);
|
||||
case BattlerTagType.SEEDED:
|
||||
return new SeedTag(sourceId);
|
||||
case BattlerTagType.NIGHTMARE:
|
||||
return new NightmareTag();
|
||||
case BattlerTagType.FRENZY:
|
||||
return new FrenzyTag(turnCount, sourceMove, sourceId);
|
||||
case BattlerTagType.CHARGING:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, 1, sourceMove, sourceId);
|
||||
case BattlerTagType.ENCORE:
|
||||
return new EncoreTag(sourceId);
|
||||
case BattlerTagType.HELPING_HAND:
|
||||
return new HelpingHandTag(sourceId);
|
||||
case BattlerTagType.INGRAIN:
|
||||
return new IngrainTag(sourceId);
|
||||
case BattlerTagType.AQUA_RING:
|
||||
return new AquaRingTag();
|
||||
case BattlerTagType.DROWSY:
|
||||
return new DrowsyTag();
|
||||
case BattlerTagType.TRAPPED:
|
||||
return new TrappedTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||
case BattlerTagType.NO_RETREAT:
|
||||
return new NoRetreatTag(sourceId);
|
||||
case BattlerTagType.BIND:
|
||||
return new BindTag(turnCount, sourceId);
|
||||
case BattlerTagType.WRAP:
|
||||
return new WrapTag(turnCount, sourceId);
|
||||
case BattlerTagType.FIRE_SPIN:
|
||||
return new FireSpinTag(turnCount, sourceId);
|
||||
case BattlerTagType.WHIRLPOOL:
|
||||
return new WhirlpoolTag(turnCount, sourceId);
|
||||
case BattlerTagType.CLAMP:
|
||||
return new ClampTag(turnCount, sourceId);
|
||||
case BattlerTagType.SAND_TOMB:
|
||||
return new SandTombTag(turnCount, sourceId);
|
||||
case BattlerTagType.MAGMA_STORM:
|
||||
return new MagmaStormTag(turnCount, sourceId);
|
||||
case BattlerTagType.SNAP_TRAP:
|
||||
return new SnapTrapTag(turnCount, sourceId);
|
||||
case BattlerTagType.THUNDER_CAGE:
|
||||
return new ThunderCageTag(turnCount, sourceId);
|
||||
case BattlerTagType.INFESTATION:
|
||||
return new InfestationTag(turnCount, sourceId);
|
||||
case BattlerTagType.PROTECTED:
|
||||
return new ProtectedTag(sourceMove);
|
||||
case BattlerTagType.SPIKY_SHIELD:
|
||||
return new ContactDamageProtectedTag(sourceMove, 8);
|
||||
case BattlerTagType.KINGS_SHIELD:
|
||||
return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.ATK, -1);
|
||||
case BattlerTagType.OBSTRUCT:
|
||||
return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.DEF, -2);
|
||||
case BattlerTagType.SILK_TRAP:
|
||||
return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.SPD, -1);
|
||||
case BattlerTagType.BANEFUL_BUNKER:
|
||||
return new ContactPoisonProtectedTag(sourceMove);
|
||||
case BattlerTagType.BURNING_BULWARK:
|
||||
return new ContactBurnProtectedTag(sourceMove);
|
||||
case BattlerTagType.ENDURING:
|
||||
return new EnduringTag(sourceMove);
|
||||
case BattlerTagType.STURDY:
|
||||
return new SturdyTag(sourceMove);
|
||||
case BattlerTagType.PERISH_SONG:
|
||||
return new PerishSongTag(turnCount);
|
||||
case BattlerTagType.CENTER_OF_ATTENTION:
|
||||
return new CenterOfAttentionTag(sourceMove);
|
||||
case BattlerTagType.TRUANT:
|
||||
return new TruantTag();
|
||||
case BattlerTagType.SLOW_START:
|
||||
return new SlowStartTag();
|
||||
case BattlerTagType.PROTOSYNTHESIS:
|
||||
return new WeatherHighestStatBoostTag(tagType, Abilities.PROTOSYNTHESIS, WeatherType.SUNNY, WeatherType.HARSH_SUN);
|
||||
case BattlerTagType.QUARK_DRIVE:
|
||||
return new TerrainHighestStatBoostTag(tagType, Abilities.QUARK_DRIVE, TerrainType.ELECTRIC);
|
||||
case BattlerTagType.FLYING:
|
||||
case BattlerTagType.UNDERGROUND:
|
||||
case BattlerTagType.UNDERWATER:
|
||||
case BattlerTagType.HIDDEN:
|
||||
return new SemiInvulnerableTag(tagType, turnCount, sourceMove);
|
||||
case BattlerTagType.FIRE_BOOST:
|
||||
return new TypeBoostTag(tagType, sourceMove, Type.FIRE, 1.5, false);
|
||||
case BattlerTagType.CRIT_BOOST:
|
||||
return new CritBoostTag(tagType, sourceMove);
|
||||
case BattlerTagType.DRAGON_CHEER:
|
||||
return new DragonCheerTag();
|
||||
case BattlerTagType.ALWAYS_CRIT:
|
||||
case BattlerTagType.IGNORE_ACCURACY:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, 2, sourceMove);
|
||||
case BattlerTagType.ALWAYS_GET_HIT:
|
||||
case BattlerTagType.RECEIVE_DOUBLE_DAMAGE:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.PRE_MOVE, 1, sourceMove);
|
||||
case BattlerTagType.BYPASS_SLEEP:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
|
||||
case BattlerTagType.IGNORE_FLYING:
|
||||
return new GroundedTag(tagType, BattlerTagLapseType.CUSTOM, sourceMove);
|
||||
case BattlerTagType.ROOSTED:
|
||||
return new RoostedTag();
|
||||
case BattlerTagType.BURNED_UP:
|
||||
return new RemovedTypeTag(tagType, BattlerTagLapseType.CUSTOM, sourceMove);
|
||||
case BattlerTagType.DOUBLE_SHOCKED:
|
||||
return new RemovedTypeTag(tagType, BattlerTagLapseType.CUSTOM, sourceMove);
|
||||
case BattlerTagType.SALT_CURED:
|
||||
return new SaltCuredTag(sourceId);
|
||||
case BattlerTagType.CURSED:
|
||||
return new CursedTag(sourceId);
|
||||
case BattlerTagType.CHARGED:
|
||||
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true);
|
||||
case BattlerTagType.MAGNET_RISEN:
|
||||
return new MagnetRisenTag(tagType, sourceMove);
|
||||
case BattlerTagType.MINIMIZED:
|
||||
return new MinimizeTag();
|
||||
case BattlerTagType.DESTINY_BOND:
|
||||
return new DestinyBondTag(sourceMove, sourceId);
|
||||
case BattlerTagType.ICE_FACE:
|
||||
return new IceFaceBlockDamageTag(tagType);
|
||||
case BattlerTagType.DISGUISE:
|
||||
return new FormBlockDamageTag(tagType);
|
||||
case BattlerTagType.STOCKPILING:
|
||||
return new StockpilingTag(sourceMove);
|
||||
case BattlerTagType.OCTOLOCK:
|
||||
return new OctolockTag(sourceId);
|
||||
case BattlerTagType.DISABLED:
|
||||
return new DisabledTag(sourceId);
|
||||
case BattlerTagType.IGNORE_GHOST:
|
||||
return new ExposedTag(tagType, sourceMove, Type.GHOST, [ Type.NORMAL, Type.FIGHTING ]);
|
||||
case BattlerTagType.IGNORE_DARK:
|
||||
return new ExposedTag(tagType, sourceMove, Type.DARK, [ Type.PSYCHIC ]);
|
||||
case BattlerTagType.GULP_MISSILE_ARROKUDA:
|
||||
case BattlerTagType.GULP_MISSILE_PIKACHU:
|
||||
return new GulpMissileTag(tagType, sourceMove);
|
||||
case BattlerTagType.TAR_SHOT:
|
||||
return new TarShotTag();
|
||||
case BattlerTagType.ELECTRIFIED:
|
||||
return new ElectrifiedTag();
|
||||
case BattlerTagType.THROAT_CHOPPED:
|
||||
return new ThroatChoppedTag();
|
||||
case BattlerTagType.GORILLA_TACTICS:
|
||||
return new GorillaTacticsTag();
|
||||
case BattlerTagType.SUBSTITUTE:
|
||||
return new SubstituteTag(sourceMove, sourceId);
|
||||
case BattlerTagType.AUTOTOMIZED:
|
||||
return new AutotomizedTag();
|
||||
case BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON:
|
||||
return new MysteryEncounterPostSummonTag();
|
||||
case BattlerTagType.HEAL_BLOCK:
|
||||
return new HealBlockTag(turnCount, sourceMove);
|
||||
case BattlerTagType.TORMENT:
|
||||
return new TormentTag(sourceId);
|
||||
case BattlerTagType.TAUNT:
|
||||
return new TauntTag();
|
||||
case BattlerTagType.IMPRISON:
|
||||
return new ImprisonTag(sourceId);
|
||||
case BattlerTagType.SYRUP_BOMB:
|
||||
return new SyrupBombTag(sourceId);
|
||||
case BattlerTagType.NONE:
|
||||
default:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||
case BattlerTagType.RECHARGING:
|
||||
return new RechargingTag(sourceMove);
|
||||
case BattlerTagType.BEAK_BLAST_CHARGING:
|
||||
return new BeakBlastChargingTag();
|
||||
case BattlerTagType.SHELL_TRAP:
|
||||
return new ShellTrapTag();
|
||||
case BattlerTagType.FLINCHED:
|
||||
return new FlinchedTag(sourceMove);
|
||||
case BattlerTagType.INTERRUPTED:
|
||||
return new InterruptedTag(sourceMove);
|
||||
case BattlerTagType.CONFUSED:
|
||||
return new ConfusedTag(turnCount, sourceMove);
|
||||
case BattlerTagType.INFATUATED:
|
||||
return new InfatuatedTag(sourceMove, sourceId);
|
||||
case BattlerTagType.SEEDED:
|
||||
return new SeedTag(sourceId);
|
||||
case BattlerTagType.NIGHTMARE:
|
||||
return new NightmareTag();
|
||||
case BattlerTagType.FRENZY:
|
||||
return new FrenzyTag(turnCount, sourceMove, sourceId);
|
||||
case BattlerTagType.CHARGING:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, 1, sourceMove, sourceId);
|
||||
case BattlerTagType.ENCORE:
|
||||
return new EncoreTag(sourceId);
|
||||
case BattlerTagType.HELPING_HAND:
|
||||
return new HelpingHandTag(sourceId);
|
||||
case BattlerTagType.INGRAIN:
|
||||
return new IngrainTag(sourceId);
|
||||
case BattlerTagType.AQUA_RING:
|
||||
return new AquaRingTag();
|
||||
case BattlerTagType.DROWSY:
|
||||
return new DrowsyTag();
|
||||
case BattlerTagType.TRAPPED:
|
||||
return new TrappedTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||
case BattlerTagType.NO_RETREAT:
|
||||
return new NoRetreatTag(sourceId);
|
||||
case BattlerTagType.BIND:
|
||||
return new BindTag(turnCount, sourceId);
|
||||
case BattlerTagType.WRAP:
|
||||
return new WrapTag(turnCount, sourceId);
|
||||
case BattlerTagType.FIRE_SPIN:
|
||||
return new FireSpinTag(turnCount, sourceId);
|
||||
case BattlerTagType.WHIRLPOOL:
|
||||
return new WhirlpoolTag(turnCount, sourceId);
|
||||
case BattlerTagType.CLAMP:
|
||||
return new ClampTag(turnCount, sourceId);
|
||||
case BattlerTagType.SAND_TOMB:
|
||||
return new SandTombTag(turnCount, sourceId);
|
||||
case BattlerTagType.MAGMA_STORM:
|
||||
return new MagmaStormTag(turnCount, sourceId);
|
||||
case BattlerTagType.SNAP_TRAP:
|
||||
return new SnapTrapTag(turnCount, sourceId);
|
||||
case BattlerTagType.THUNDER_CAGE:
|
||||
return new ThunderCageTag(turnCount, sourceId);
|
||||
case BattlerTagType.INFESTATION:
|
||||
return new InfestationTag(turnCount, sourceId);
|
||||
case BattlerTagType.PROTECTED:
|
||||
return new ProtectedTag(sourceMove);
|
||||
case BattlerTagType.SPIKY_SHIELD:
|
||||
return new ContactDamageProtectedTag(sourceMove, 8);
|
||||
case BattlerTagType.KINGS_SHIELD:
|
||||
return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.ATK, -1);
|
||||
case BattlerTagType.OBSTRUCT:
|
||||
return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.DEF, -2);
|
||||
case BattlerTagType.SILK_TRAP:
|
||||
return new ContactStatStageChangeProtectedTag(sourceMove, tagType, Stat.SPD, -1);
|
||||
case BattlerTagType.BANEFUL_BUNKER:
|
||||
return new ContactPoisonProtectedTag(sourceMove);
|
||||
case BattlerTagType.BURNING_BULWARK:
|
||||
return new ContactBurnProtectedTag(sourceMove);
|
||||
case BattlerTagType.ENDURING:
|
||||
return new EnduringTag(sourceMove);
|
||||
case BattlerTagType.STURDY:
|
||||
return new SturdyTag(sourceMove);
|
||||
case BattlerTagType.PERISH_SONG:
|
||||
return new PerishSongTag(turnCount);
|
||||
case BattlerTagType.CENTER_OF_ATTENTION:
|
||||
return new CenterOfAttentionTag(sourceMove);
|
||||
case BattlerTagType.TRUANT:
|
||||
return new TruantTag();
|
||||
case BattlerTagType.SLOW_START:
|
||||
return new SlowStartTag();
|
||||
case BattlerTagType.PROTOSYNTHESIS:
|
||||
return new WeatherHighestStatBoostTag(tagType, Abilities.PROTOSYNTHESIS, WeatherType.SUNNY, WeatherType.HARSH_SUN);
|
||||
case BattlerTagType.QUARK_DRIVE:
|
||||
return new TerrainHighestStatBoostTag(tagType, Abilities.QUARK_DRIVE, TerrainType.ELECTRIC);
|
||||
case BattlerTagType.FLYING:
|
||||
case BattlerTagType.UNDERGROUND:
|
||||
case BattlerTagType.UNDERWATER:
|
||||
case BattlerTagType.HIDDEN:
|
||||
return new SemiInvulnerableTag(tagType, turnCount, sourceMove);
|
||||
case BattlerTagType.FIRE_BOOST:
|
||||
return new TypeBoostTag(tagType, sourceMove, Type.FIRE, 1.5, false);
|
||||
case BattlerTagType.CRIT_BOOST:
|
||||
return new CritBoostTag(tagType, sourceMove);
|
||||
case BattlerTagType.DRAGON_CHEER:
|
||||
return new DragonCheerTag();
|
||||
case BattlerTagType.ALWAYS_CRIT:
|
||||
case BattlerTagType.IGNORE_ACCURACY:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, 2, sourceMove);
|
||||
case BattlerTagType.ALWAYS_GET_HIT:
|
||||
case BattlerTagType.RECEIVE_DOUBLE_DAMAGE:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.PRE_MOVE, 1, sourceMove);
|
||||
case BattlerTagType.BYPASS_SLEEP:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.TURN_END, turnCount, sourceMove);
|
||||
case BattlerTagType.IGNORE_FLYING:
|
||||
return new GroundedTag(tagType, BattlerTagLapseType.CUSTOM, sourceMove);
|
||||
case BattlerTagType.ROOSTED:
|
||||
return new RoostedTag();
|
||||
case BattlerTagType.BURNED_UP:
|
||||
return new RemovedTypeTag(tagType, BattlerTagLapseType.CUSTOM, sourceMove);
|
||||
case BattlerTagType.DOUBLE_SHOCKED:
|
||||
return new RemovedTypeTag(tagType, BattlerTagLapseType.CUSTOM, sourceMove);
|
||||
case BattlerTagType.SALT_CURED:
|
||||
return new SaltCuredTag(sourceId);
|
||||
case BattlerTagType.CURSED:
|
||||
return new CursedTag(sourceId);
|
||||
case BattlerTagType.CHARGED:
|
||||
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true);
|
||||
case BattlerTagType.FLOATING:
|
||||
return new FloatingTag(tagType, sourceMove);
|
||||
case BattlerTagType.MINIMIZED:
|
||||
return new MinimizeTag();
|
||||
case BattlerTagType.DESTINY_BOND:
|
||||
return new DestinyBondTag(sourceMove, sourceId);
|
||||
case BattlerTagType.ICE_FACE:
|
||||
return new IceFaceBlockDamageTag(tagType);
|
||||
case BattlerTagType.DISGUISE:
|
||||
return new FormBlockDamageTag(tagType);
|
||||
case BattlerTagType.STOCKPILING:
|
||||
return new StockpilingTag(sourceMove);
|
||||
case BattlerTagType.OCTOLOCK:
|
||||
return new OctolockTag(sourceId);
|
||||
case BattlerTagType.DISABLED:
|
||||
return new DisabledTag(sourceId);
|
||||
case BattlerTagType.IGNORE_GHOST:
|
||||
return new ExposedTag(tagType, sourceMove, Type.GHOST, [ Type.NORMAL, Type.FIGHTING ]);
|
||||
case BattlerTagType.IGNORE_DARK:
|
||||
return new ExposedTag(tagType, sourceMove, Type.DARK, [ Type.PSYCHIC ]);
|
||||
case BattlerTagType.GULP_MISSILE_ARROKUDA:
|
||||
case BattlerTagType.GULP_MISSILE_PIKACHU:
|
||||
return new GulpMissileTag(tagType, sourceMove);
|
||||
case BattlerTagType.TAR_SHOT:
|
||||
return new TarShotTag();
|
||||
case BattlerTagType.ELECTRIFIED:
|
||||
return new ElectrifiedTag();
|
||||
case BattlerTagType.THROAT_CHOPPED:
|
||||
return new ThroatChoppedTag();
|
||||
case BattlerTagType.GORILLA_TACTICS:
|
||||
return new GorillaTacticsTag();
|
||||
case BattlerTagType.SUBSTITUTE:
|
||||
return new SubstituteTag(sourceMove, sourceId);
|
||||
case BattlerTagType.AUTOTOMIZED:
|
||||
return new AutotomizedTag();
|
||||
case BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON:
|
||||
return new MysteryEncounterPostSummonTag();
|
||||
case BattlerTagType.HEAL_BLOCK:
|
||||
return new HealBlockTag(turnCount, sourceMove);
|
||||
case BattlerTagType.TORMENT:
|
||||
return new TormentTag(sourceId);
|
||||
case BattlerTagType.TAUNT:
|
||||
return new TauntTag();
|
||||
case BattlerTagType.IMPRISON:
|
||||
return new ImprisonTag(sourceId);
|
||||
case BattlerTagType.SYRUP_BOMB:
|
||||
return new SyrupBombTag(sourceId);
|
||||
case BattlerTagType.TELEKINESIS:
|
||||
return new TelekinesisTag(sourceMove);
|
||||
case BattlerTagType.POWER_TRICK:
|
||||
return new PowerTrickTag(sourceMove, sourceId);
|
||||
case BattlerTagType.NONE:
|
||||
default:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,42 +22,42 @@ export type BerryPredicate = (pokemon: Pokemon) => boolean;
|
||||
|
||||
export function getBerryPredicate(berryType: BerryType): BerryPredicate {
|
||||
switch (berryType) {
|
||||
case BerryType.SITRUS:
|
||||
return (pokemon: Pokemon) => pokemon.getHpRatio() < 0.5;
|
||||
case BerryType.LUM:
|
||||
return (pokemon: Pokemon) => !!pokemon.status || !!pokemon.getTag(BattlerTagType.CONFUSED);
|
||||
case BerryType.ENIGMA:
|
||||
return (pokemon: Pokemon) => !!pokemon.turnData.attacksReceived.filter(a => a.result === HitResult.SUPER_EFFECTIVE).length;
|
||||
case BerryType.LIECHI:
|
||||
case BerryType.GANLON:
|
||||
case BerryType.PETAYA:
|
||||
case BerryType.APICOT:
|
||||
case BerryType.SALAC:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
// Offset BerryType such that LIECHI -> Stat.ATK = 1, GANLON -> Stat.DEF = 2, so on and so forth
|
||||
const stat: BattleStat = berryType - BerryType.ENIGMA;
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return pokemon.getHpRatio() < threshold.value && pokemon.getStatStage(stat) < 6;
|
||||
};
|
||||
case BerryType.LANSAT:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return pokemon.getHpRatio() < 0.25 && !pokemon.getTag(BattlerTagType.CRIT_BOOST);
|
||||
};
|
||||
case BerryType.STARF:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return pokemon.getHpRatio() < 0.25;
|
||||
};
|
||||
case BerryType.LEPPA:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return !!pokemon.getMoveset().find(m => !m?.getPpRatio());
|
||||
};
|
||||
case BerryType.SITRUS:
|
||||
return (pokemon: Pokemon) => pokemon.getHpRatio() < 0.5;
|
||||
case BerryType.LUM:
|
||||
return (pokemon: Pokemon) => !!pokemon.status || !!pokemon.getTag(BattlerTagType.CONFUSED);
|
||||
case BerryType.ENIGMA:
|
||||
return (pokemon: Pokemon) => !!pokemon.turnData.attacksReceived.filter(a => a.result === HitResult.SUPER_EFFECTIVE).length;
|
||||
case BerryType.LIECHI:
|
||||
case BerryType.GANLON:
|
||||
case BerryType.PETAYA:
|
||||
case BerryType.APICOT:
|
||||
case BerryType.SALAC:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
// Offset BerryType such that LIECHI -> Stat.ATK = 1, GANLON -> Stat.DEF = 2, so on and so forth
|
||||
const stat: BattleStat = berryType - BerryType.ENIGMA;
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return pokemon.getHpRatio() < threshold.value && pokemon.getStatStage(stat) < 6;
|
||||
};
|
||||
case BerryType.LANSAT:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return pokemon.getHpRatio() < 0.25 && !pokemon.getTag(BattlerTagType.CRIT_BOOST);
|
||||
};
|
||||
case BerryType.STARF:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return pokemon.getHpRatio() < 0.25;
|
||||
};
|
||||
case BerryType.LEPPA:
|
||||
return (pokemon: Pokemon) => {
|
||||
const threshold = new Utils.NumberHolder(0.25);
|
||||
applyAbAttrs(ReduceBerryUseThresholdAbAttr, pokemon, null, false, threshold);
|
||||
return !!pokemon.getMoveset().find(m => !m?.getPpRatio());
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,70 +65,70 @@ export type BerryEffectFunc = (pokemon: Pokemon) => void;
|
||||
|
||||
export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
|
||||
switch (berryType) {
|
||||
case BerryType.SITRUS:
|
||||
case BerryType.ENIGMA:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
const hpHealed = new Utils.NumberHolder(Utils.toDmgValue(pokemon.getMaxHp() / 4));
|
||||
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, hpHealed);
|
||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
|
||||
hpHealed.value, i18next.t("battle:hpHealBerry", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), berryName: getBerryName(berryType) }), true));
|
||||
};
|
||||
case BerryType.LUM:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
if (pokemon.status) {
|
||||
pokemon.scene.queueMessage(getStatusEffectHealText(pokemon.status.effect, getPokemonNameWithAffix(pokemon)));
|
||||
}
|
||||
pokemon.resetStatus(true, true);
|
||||
pokemon.updateInfo();
|
||||
};
|
||||
case BerryType.LIECHI:
|
||||
case BerryType.GANLON:
|
||||
case BerryType.PETAYA:
|
||||
case BerryType.APICOT:
|
||||
case BerryType.SALAC:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
// Offset BerryType such that LIECHI -> Stat.ATK = 1, GANLON -> Stat.DEF = 2, so on and so forth
|
||||
const stat: BattleStat = berryType - BerryType.ENIGMA;
|
||||
const statStages = new Utils.NumberHolder(1);
|
||||
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, statStages);
|
||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], statStages.value));
|
||||
};
|
||||
case BerryType.LANSAT:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
pokemon.addTag(BattlerTagType.CRIT_BOOST);
|
||||
};
|
||||
case BerryType.STARF:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
const randStat = Utils.randSeedInt(Stat.SPD, Stat.ATK);
|
||||
const stages = new Utils.NumberHolder(2);
|
||||
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, stages);
|
||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ randStat ], stages.value));
|
||||
};
|
||||
case BerryType.LEPPA:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
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); // TODO: is this bang correct?
|
||||
if (ppRestoreMove !== undefined) {
|
||||
case BerryType.SITRUS:
|
||||
case BerryType.ENIGMA:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
const hpHealed = new Utils.NumberHolder(Utils.toDmgValue(pokemon.getMaxHp() / 4));
|
||||
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, hpHealed);
|
||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
|
||||
hpHealed.value, i18next.t("battle:hpHealBerry", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), berryName: getBerryName(berryType) }), true));
|
||||
};
|
||||
case BerryType.LUM:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
if (pokemon.status) {
|
||||
pokemon.scene.queueMessage(getStatusEffectHealText(pokemon.status.effect, getPokemonNameWithAffix(pokemon)));
|
||||
}
|
||||
pokemon.resetStatus(true, true);
|
||||
pokemon.updateInfo();
|
||||
};
|
||||
case BerryType.LIECHI:
|
||||
case BerryType.GANLON:
|
||||
case BerryType.PETAYA:
|
||||
case BerryType.APICOT:
|
||||
case BerryType.SALAC:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
// Offset BerryType such that LIECHI -> Stat.ATK = 1, GANLON -> Stat.DEF = 2, so on and so forth
|
||||
const stat: BattleStat = berryType - BerryType.ENIGMA;
|
||||
const statStages = new Utils.NumberHolder(1);
|
||||
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, statStages);
|
||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ stat ], statStages.value));
|
||||
};
|
||||
case BerryType.LANSAT:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
pokemon.addTag(BattlerTagType.CRIT_BOOST);
|
||||
};
|
||||
case BerryType.STARF:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
pokemon.battleData.berriesEaten.push(berryType);
|
||||
}
|
||||
const randStat = Utils.randSeedInt(Stat.SPD, Stat.ATK);
|
||||
const stages = new Utils.NumberHolder(2);
|
||||
applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, false, stages);
|
||||
pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ randStat ], stages.value));
|
||||
};
|
||||
case BerryType.LEPPA:
|
||||
return (pokemon: Pokemon) => {
|
||||
if (pokemon.battleData) {
|
||||
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); // TODO: is this bang correct?
|
||||
if (ppRestoreMove !== undefined) {
|
||||
ppRestoreMove!.ppUsed = Math.max(ppRestoreMove!.ppUsed - 10, 0);
|
||||
pokemon.scene.queueMessage(i18next.t("battle:ppHealBerry", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: ppRestoreMove!.getName(), berryName: getBerryName(berryType) }));
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -448,21 +448,21 @@ export class SingleGenerationChallenge extends Challenge {
|
||||
applyFixedBattle(waveIndex: Number, battleConfig: FixedBattleConfig): boolean {
|
||||
let trainerTypes: TrainerType[] = [];
|
||||
switch (waveIndex) {
|
||||
case 182:
|
||||
trainerTypes = [ TrainerType.LORELEI, TrainerType.WILL, TrainerType.SIDNEY, TrainerType.AARON, TrainerType.SHAUNTAL, TrainerType.MALVA, Utils.randSeedItem([ TrainerType.HALA, TrainerType.MOLAYNE ]), TrainerType.MARNIE_ELITE, TrainerType.RIKA ];
|
||||
break;
|
||||
case 184:
|
||||
trainerTypes = [ TrainerType.BRUNO, TrainerType.KOGA, TrainerType.PHOEBE, TrainerType.BERTHA, TrainerType.MARSHAL, TrainerType.SIEBOLD, TrainerType.OLIVIA, TrainerType.NESSA_ELITE, TrainerType.POPPY ];
|
||||
break;
|
||||
case 186:
|
||||
trainerTypes = [ TrainerType.AGATHA, TrainerType.BRUNO, TrainerType.GLACIA, TrainerType.FLINT, TrainerType.GRIMSLEY, TrainerType.WIKSTROM, TrainerType.ACEROLA, Utils.randSeedItem([ TrainerType.BEA_ELITE, TrainerType.ALLISTER_ELITE ]), TrainerType.LARRY_ELITE ];
|
||||
break;
|
||||
case 188:
|
||||
trainerTypes = [ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI, TrainerType.RAIHAN_ELITE, TrainerType.HASSEL ];
|
||||
break;
|
||||
case 190:
|
||||
trainerTypes = [ TrainerType.BLUE, Utils.randSeedItem([ TrainerType.RED, TrainerType.LANCE_CHAMPION ]), Utils.randSeedItem([ TrainerType.STEVEN, TrainerType.WALLACE ]), TrainerType.CYNTHIA, Utils.randSeedItem([ TrainerType.ALDER, TrainerType.IRIS ]), TrainerType.DIANTHA, TrainerType.HAU, TrainerType.LEON, Utils.randSeedItem([ TrainerType.GEETA, TrainerType.NEMONA ]) ];
|
||||
break;
|
||||
case 182:
|
||||
trainerTypes = [ TrainerType.LORELEI, TrainerType.WILL, TrainerType.SIDNEY, TrainerType.AARON, TrainerType.SHAUNTAL, TrainerType.MALVA, Utils.randSeedItem([ TrainerType.HALA, TrainerType.MOLAYNE ]), TrainerType.MARNIE_ELITE, TrainerType.RIKA ];
|
||||
break;
|
||||
case 184:
|
||||
trainerTypes = [ TrainerType.BRUNO, TrainerType.KOGA, TrainerType.PHOEBE, TrainerType.BERTHA, TrainerType.MARSHAL, TrainerType.SIEBOLD, TrainerType.OLIVIA, TrainerType.NESSA_ELITE, TrainerType.POPPY ];
|
||||
break;
|
||||
case 186:
|
||||
trainerTypes = [ TrainerType.AGATHA, TrainerType.BRUNO, TrainerType.GLACIA, TrainerType.FLINT, TrainerType.GRIMSLEY, TrainerType.WIKSTROM, TrainerType.ACEROLA, Utils.randSeedItem([ TrainerType.BEA_ELITE, TrainerType.ALLISTER_ELITE ]), TrainerType.LARRY_ELITE ];
|
||||
break;
|
||||
case 188:
|
||||
trainerTypes = [ TrainerType.LANCE, TrainerType.KAREN, TrainerType.DRAKE, TrainerType.LUCIAN, TrainerType.CAITLIN, TrainerType.DRASNA, TrainerType.KAHILI, TrainerType.RAIHAN_ELITE, TrainerType.HASSEL ];
|
||||
break;
|
||||
case 190:
|
||||
trainerTypes = [ TrainerType.BLUE, Utils.randSeedItem([ TrainerType.RED, TrainerType.LANCE_CHAMPION ]), Utils.randSeedItem([ TrainerType.STEVEN, TrainerType.WALLACE ]), TrainerType.CYNTHIA, Utils.randSeedItem([ TrainerType.ALDER, TrainerType.IRIS ]), TrainerType.DIANTHA, TrainerType.HAU, TrainerType.LEON, Utils.randSeedItem([ TrainerType.GEETA, TrainerType.NEMONA ]) ];
|
||||
break;
|
||||
}
|
||||
if (trainerTypes.length === 0) {
|
||||
return false;
|
||||
@ -891,45 +891,45 @@ export function applyChallenges(gameMode: GameMode, challengeType: ChallengeType
|
||||
gameMode.challenges.forEach(c => {
|
||||
if (c.value !== 0) {
|
||||
switch (challengeType) {
|
||||
case ChallengeType.STARTER_CHOICE:
|
||||
ret ||= c.applyStarterChoice(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case ChallengeType.STARTER_POINTS:
|
||||
ret ||= c.applyStarterPoints(args[0]);
|
||||
break;
|
||||
case ChallengeType.STARTER_COST:
|
||||
ret ||= c.applyStarterCost(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.STARTER_MODIFY:
|
||||
ret ||= c.applyStarterModify(args[0]);
|
||||
break;
|
||||
case ChallengeType.POKEMON_IN_BATTLE:
|
||||
ret ||= c.applyPokemonInBattle(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.FIXED_BATTLES:
|
||||
ret ||= c.applyFixedBattle(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.TYPE_EFFECTIVENESS:
|
||||
ret ||= c.applyTypeEffectiveness(args[0]);
|
||||
break;
|
||||
case ChallengeType.AI_LEVEL:
|
||||
ret ||= c.applyLevelChange(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case ChallengeType.AI_MOVE_SLOTS:
|
||||
ret ||= c.applyMoveSlot(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.PASSIVE_ACCESS:
|
||||
ret ||= c.applyPassiveAccess(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.GAME_MODE_MODIFY:
|
||||
ret ||= c.applyGameModeModify(gameMode);
|
||||
break;
|
||||
case ChallengeType.MOVE_ACCESS:
|
||||
ret ||= c.applyMoveAccessLevel(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case ChallengeType.MOVE_WEIGHT:
|
||||
ret ||= c.applyMoveWeight(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case ChallengeType.STARTER_CHOICE:
|
||||
ret ||= c.applyStarterChoice(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case ChallengeType.STARTER_POINTS:
|
||||
ret ||= c.applyStarterPoints(args[0]);
|
||||
break;
|
||||
case ChallengeType.STARTER_COST:
|
||||
ret ||= c.applyStarterCost(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.STARTER_MODIFY:
|
||||
ret ||= c.applyStarterModify(args[0]);
|
||||
break;
|
||||
case ChallengeType.POKEMON_IN_BATTLE:
|
||||
ret ||= c.applyPokemonInBattle(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.FIXED_BATTLES:
|
||||
ret ||= c.applyFixedBattle(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.TYPE_EFFECTIVENESS:
|
||||
ret ||= c.applyTypeEffectiveness(args[0]);
|
||||
break;
|
||||
case ChallengeType.AI_LEVEL:
|
||||
ret ||= c.applyLevelChange(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case ChallengeType.AI_MOVE_SLOTS:
|
||||
ret ||= c.applyMoveSlot(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.PASSIVE_ACCESS:
|
||||
ret ||= c.applyPassiveAccess(args[0], args[1]);
|
||||
break;
|
||||
case ChallengeType.GAME_MODE_MODIFY:
|
||||
ret ||= c.applyGameModeModify(gameMode);
|
||||
break;
|
||||
case ChallengeType.MOVE_ACCESS:
|
||||
ret ||= c.applyMoveAccessLevel(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case ChallengeType.MOVE_WEIGHT:
|
||||
ret ||= c.applyMoveWeight(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -943,18 +943,18 @@ export function applyChallenges(gameMode: GameMode, challengeType: ChallengeType
|
||||
*/
|
||||
export function copyChallenge(source: Challenge | any): Challenge {
|
||||
switch (source.id) {
|
||||
case Challenges.SINGLE_GENERATION:
|
||||
return SingleGenerationChallenge.loadChallenge(source);
|
||||
case Challenges.SINGLE_TYPE:
|
||||
return SingleTypeChallenge.loadChallenge(source);
|
||||
case Challenges.LOWER_MAX_STARTER_COST:
|
||||
return LowerStarterMaxCostChallenge.loadChallenge(source);
|
||||
case Challenges.LOWER_STARTER_POINTS:
|
||||
return LowerStarterPointsChallenge.loadChallenge(source);
|
||||
case Challenges.FRESH_START:
|
||||
return FreshStartChallenge.loadChallenge(source);
|
||||
case Challenges.INVERSE_BATTLE:
|
||||
return InverseBattleChallenge.loadChallenge(source);
|
||||
case Challenges.SINGLE_GENERATION:
|
||||
return SingleGenerationChallenge.loadChallenge(source);
|
||||
case Challenges.SINGLE_TYPE:
|
||||
return SingleTypeChallenge.loadChallenge(source);
|
||||
case Challenges.LOWER_MAX_STARTER_COST:
|
||||
return LowerStarterMaxCostChallenge.loadChallenge(source);
|
||||
case Challenges.LOWER_STARTER_POINTS:
|
||||
return LowerStarterPointsChallenge.loadChallenge(source);
|
||||
case Challenges.FRESH_START:
|
||||
return FreshStartChallenge.loadChallenge(source);
|
||||
case Challenges.INVERSE_BATTLE:
|
||||
return InverseBattleChallenge.loadChallenge(source);
|
||||
}
|
||||
throw new Error("Unknown challenge copied");
|
||||
}
|
||||
|
@ -1,18 +1,20 @@
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { Type } from "#app/data/type";
|
||||
import { isNullOrUndefined } from "#app/utils";
|
||||
import { Nature } from "#enums/nature";
|
||||
|
||||
/**
|
||||
* Data that can customize a Pokemon in non-standard ways from its Species
|
||||
* Currently only used by Mystery Encounters, may need to be renamed if it becomes more widely used
|
||||
* Currently only used by Mystery Encounters and Mints.
|
||||
*/
|
||||
export class MysteryEncounterPokemonData {
|
||||
export class CustomPokemonData {
|
||||
public spriteScale: number;
|
||||
public ability: Abilities | -1;
|
||||
public passive: Abilities | -1;
|
||||
public nature: Nature | -1;
|
||||
public types: Type[];
|
||||
|
||||
constructor(data?: MysteryEncounterPokemonData | Partial<MysteryEncounterPokemonData>) {
|
||||
constructor(data?: CustomPokemonData | Partial<CustomPokemonData>) {
|
||||
if (!isNullOrUndefined(data)) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
@ -20,6 +22,7 @@ export class MysteryEncounterPokemonData {
|
||||
this.spriteScale = this.spriteScale ?? -1;
|
||||
this.ability = this.ability ?? -1;
|
||||
this.passive = this.passive ?? -1;
|
||||
this.nature = this.nature ?? -1;
|
||||
this.types = this.types ?? [];
|
||||
}
|
||||
}
|
136
src/data/egg.ts
@ -262,14 +262,14 @@ export class Egg {
|
||||
return "Manaphy";
|
||||
}
|
||||
switch (this.tier) {
|
||||
case EggTier.RARE:
|
||||
return i18next.t("egg:greatTier");
|
||||
case EggTier.EPIC:
|
||||
return i18next.t("egg:ultraTier");
|
||||
case EggTier.LEGENDARY:
|
||||
return i18next.t("egg:masterTier");
|
||||
default:
|
||||
return i18next.t("egg:defaultTier");
|
||||
case EggTier.RARE:
|
||||
return i18next.t("egg:greatTier");
|
||||
case EggTier.EPIC:
|
||||
return i18next.t("egg:ultraTier");
|
||||
case EggTier.LEGENDARY:
|
||||
return i18next.t("egg:masterTier");
|
||||
default:
|
||||
return i18next.t("egg:defaultTier");
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,19 +288,19 @@ export class Egg {
|
||||
|
||||
public getEggTypeDescriptor(scene: BattleScene): string {
|
||||
switch (this.sourceType) {
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
return this._eggDescriptor ?? i18next.t("egg:sameSpeciesEgg", { species: getPokemonSpecies(this._species).getName() });
|
||||
case EggSourceType.GACHA_LEGENDARY:
|
||||
return this._eggDescriptor ?? `${i18next.t("egg:gachaTypeLegendary")} (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, this.timestamp)).getName()})`;
|
||||
case EggSourceType.GACHA_SHINY:
|
||||
return this._eggDescriptor ?? i18next.t("egg:gachaTypeShiny");
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
return this._eggDescriptor ?? i18next.t("egg:gachaTypeMove");
|
||||
case EggSourceType.EVENT:
|
||||
return this._eggDescriptor ?? i18next.t("egg:eventType");
|
||||
default:
|
||||
console.warn("getEggTypeDescriptor case not defined. Returning default empty string");
|
||||
return "";
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
return this._eggDescriptor ?? i18next.t("egg:sameSpeciesEgg", { species: getPokemonSpecies(this._species).getName() });
|
||||
case EggSourceType.GACHA_LEGENDARY:
|
||||
return this._eggDescriptor ?? `${i18next.t("egg:gachaTypeLegendary")} (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, this.timestamp)).getName()})`;
|
||||
case EggSourceType.GACHA_SHINY:
|
||||
return this._eggDescriptor ?? i18next.t("egg:gachaTypeShiny");
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
return this._eggDescriptor ?? i18next.t("egg:gachaTypeMove");
|
||||
case EggSourceType.EVENT:
|
||||
return this._eggDescriptor ?? i18next.t("egg:eventType");
|
||||
default:
|
||||
console.warn("getEggTypeDescriptor case not defined. Returning default empty string");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,14 +315,14 @@ export class Egg {
|
||||
private rollEggMoveIndex() {
|
||||
let baseChance = GACHA_DEFAULT_RARE_EGGMOVE_RATE;
|
||||
switch (this._sourceType) {
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
baseChance = SAME_SPECIES_EGG_RARE_EGGMOVE_RATE;
|
||||
break;
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
baseChance = GACHA_MOVE_UP_RARE_EGGMOVE_RATE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
baseChance = SAME_SPECIES_EGG_RARE_EGGMOVE_RATE;
|
||||
break;
|
||||
case EggSourceType.GACHA_MOVE:
|
||||
baseChance = GACHA_MOVE_UP_RARE_EGGMOVE_RATE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
const tierMultiplier = this.isManaphyEgg() ? 2 : Math.pow(2, 3 - this.tier);
|
||||
@ -335,12 +335,12 @@ export class Egg {
|
||||
}
|
||||
|
||||
switch (eggTier ?? this._tier) {
|
||||
case EggTier.COMMON:
|
||||
return HATCH_WAVES_COMMON_EGG;
|
||||
case EggTier.RARE:
|
||||
return HATCH_WAVES_RARE_EGG;
|
||||
case EggTier.EPIC:
|
||||
return HATCH_WAVES_EPIC_EGG;
|
||||
case EggTier.COMMON:
|
||||
return HATCH_WAVES_COMMON_EGG;
|
||||
case EggTier.RARE:
|
||||
return HATCH_WAVES_RARE_EGG;
|
||||
case EggTier.EPIC:
|
||||
return HATCH_WAVES_EPIC_EGG;
|
||||
}
|
||||
return HATCH_WAVES_LEGENDARY_EGG;
|
||||
}
|
||||
@ -379,22 +379,22 @@ export class Egg {
|
||||
let maxStarterValue: integer;
|
||||
|
||||
switch (this.tier) {
|
||||
case EggTier.RARE:
|
||||
minStarterValue = 4;
|
||||
maxStarterValue = 5;
|
||||
break;
|
||||
case EggTier.EPIC:
|
||||
minStarterValue = 6;
|
||||
maxStarterValue = 7;
|
||||
break;
|
||||
case EggTier.LEGENDARY:
|
||||
minStarterValue = 8;
|
||||
maxStarterValue = 9;
|
||||
break;
|
||||
default:
|
||||
minStarterValue = 1;
|
||||
maxStarterValue = 3;
|
||||
break;
|
||||
case EggTier.RARE:
|
||||
minStarterValue = 4;
|
||||
maxStarterValue = 5;
|
||||
break;
|
||||
case EggTier.EPIC:
|
||||
minStarterValue = 6;
|
||||
maxStarterValue = 7;
|
||||
break;
|
||||
case EggTier.LEGENDARY:
|
||||
minStarterValue = 8;
|
||||
maxStarterValue = 9;
|
||||
break;
|
||||
default:
|
||||
minStarterValue = 1;
|
||||
maxStarterValue = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
const ignoredSpecies = [ Species.PHIONE, Species.MANAPHY, Species.ETERNATUS ];
|
||||
@ -469,14 +469,14 @@ export class Egg {
|
||||
private rollShiny(): boolean {
|
||||
let shinyChance = GACHA_DEFAULT_SHINY_RATE;
|
||||
switch (this._sourceType) {
|
||||
case EggSourceType.GACHA_SHINY:
|
||||
shinyChance = GACHA_SHINY_UP_SHINY_RATE;
|
||||
break;
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
shinyChance = SAME_SPECIES_EGG_SHINY_RATE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case EggSourceType.GACHA_SHINY:
|
||||
shinyChance = GACHA_SHINY_UP_SHINY_RATE;
|
||||
break;
|
||||
case EggSourceType.SAME_SPECIES_EGG:
|
||||
shinyChance = SAME_SPECIES_EGG_SHINY_RATE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return !Utils.randSeedInt(shinyChance);
|
||||
@ -523,15 +523,15 @@ export class Egg {
|
||||
return;
|
||||
}
|
||||
switch (this.tier) {
|
||||
case EggTier.RARE:
|
||||
scene.gameData.gameStats.rareEggsPulled++;
|
||||
break;
|
||||
case EggTier.EPIC:
|
||||
scene.gameData.gameStats.epicEggsPulled++;
|
||||
break;
|
||||
case EggTier.LEGENDARY:
|
||||
scene.gameData.gameStats.legendaryEggsPulled++;
|
||||
break;
|
||||
case EggTier.RARE:
|
||||
scene.gameData.gameStats.rareEggsPulled++;
|
||||
break;
|
||||
case EggTier.EPIC:
|
||||
scene.gameData.gameStats.epicEggsPulled++;
|
||||
break;
|
||||
case EggTier.LEGENDARY:
|
||||
scene.gameData.gameStats.legendaryEggsPulled++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,24 +28,24 @@ export function getLevelTotalExp(level: integer, growthRate: GrowthRate): intege
|
||||
let ret: integer;
|
||||
|
||||
switch (growthRate) {
|
||||
case GrowthRate.ERRATIC:
|
||||
ret = (Math.pow(level, 4) + (Math.pow(level, 3) * 2000)) / 3500;
|
||||
break;
|
||||
case GrowthRate.FAST:
|
||||
ret = Math.pow(level, 3) * 4 / 5;
|
||||
break;
|
||||
case GrowthRate.MEDIUM_FAST:
|
||||
ret = Math.pow(level, 3);
|
||||
break;
|
||||
case GrowthRate.MEDIUM_SLOW:
|
||||
ret = (Math.pow(level, 3) * 6 / 5) - (15 * Math.pow(level, 2)) + (100 * level) - 140;
|
||||
break;
|
||||
case GrowthRate.SLOW:
|
||||
ret = Math.pow(level, 3) * 5 / 4;
|
||||
break;
|
||||
case GrowthRate.FLUCTUATING:
|
||||
ret = (Math.pow(level, 3) * ((level / 2) + 8)) * 4 / (100 + level);
|
||||
break;
|
||||
case GrowthRate.ERRATIC:
|
||||
ret = (Math.pow(level, 4) + (Math.pow(level, 3) * 2000)) / 3500;
|
||||
break;
|
||||
case GrowthRate.FAST:
|
||||
ret = Math.pow(level, 3) * 4 / 5;
|
||||
break;
|
||||
case GrowthRate.MEDIUM_FAST:
|
||||
ret = Math.pow(level, 3);
|
||||
break;
|
||||
case GrowthRate.MEDIUM_SLOW:
|
||||
ret = (Math.pow(level, 3) * 6 / 5) - (15 * Math.pow(level, 2)) + (100 * level) - 140;
|
||||
break;
|
||||
case GrowthRate.SLOW:
|
||||
ret = Math.pow(level, 3) * 5 / 4;
|
||||
break;
|
||||
case GrowthRate.FLUCTUATING:
|
||||
ret = (Math.pow(level, 3) * ((level / 2) + 8)) * 4 / (100 + level);
|
||||
break;
|
||||
}
|
||||
|
||||
if (growthRate !== GrowthRate.MEDIUM_FAST) {
|
||||
@ -61,17 +61,17 @@ export function getLevelRelExp(level: integer, growthRate: GrowthRate): number {
|
||||
|
||||
export function getGrowthRateColor(growthRate: GrowthRate, shadow?: boolean) {
|
||||
switch (growthRate) {
|
||||
case GrowthRate.ERRATIC:
|
||||
return !shadow ? "#f85888" : "#906060";
|
||||
case GrowthRate.FAST:
|
||||
return !shadow ? "#f8d030" : "#b8a038";
|
||||
case GrowthRate.MEDIUM_FAST:
|
||||
return !shadow ? "#78c850" : "#588040";
|
||||
case GrowthRate.MEDIUM_SLOW:
|
||||
return !shadow ? "#6890f0" : "#807870";
|
||||
case GrowthRate.SLOW:
|
||||
return !shadow ? "#f08030" : "#c03028";
|
||||
case GrowthRate.FLUCTUATING:
|
||||
return !shadow ? "#a040a0" : "#483850";
|
||||
case GrowthRate.ERRATIC:
|
||||
return !shadow ? "#f85888" : "#906060";
|
||||
case GrowthRate.FAST:
|
||||
return !shadow ? "#f8d030" : "#b8a038";
|
||||
case GrowthRate.MEDIUM_FAST:
|
||||
return !shadow ? "#78c850" : "#588040";
|
||||
case GrowthRate.MEDIUM_SLOW:
|
||||
return !shadow ? "#6890f0" : "#807870";
|
||||
case GrowthRate.SLOW:
|
||||
return !shadow ? "#f08030" : "#c03028";
|
||||
case GrowthRate.FLUCTUATING:
|
||||
return !shadow ? "#a040a0" : "#483850";
|
||||
}
|
||||
}
|
||||
|
@ -6,20 +6,20 @@ export enum Gender {
|
||||
|
||||
export function getGenderSymbol(gender: Gender) {
|
||||
switch (gender) {
|
||||
case Gender.MALE:
|
||||
return "♂";
|
||||
case Gender.FEMALE:
|
||||
return "♀";
|
||||
case Gender.MALE:
|
||||
return "♂";
|
||||
case Gender.FEMALE:
|
||||
return "♀";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
export function getGenderColor(gender: Gender, shadow?: boolean) {
|
||||
switch (gender) {
|
||||
case Gender.MALE:
|
||||
return shadow ? "#006090" : "#40c8f8";
|
||||
case Gender.FEMALE:
|
||||
return shadow ? "#984038" : "#f89890";
|
||||
case Gender.MALE:
|
||||
return shadow ? "#006090" : "#40c8f8";
|
||||
case Gender.FEMALE:
|
||||
return shadow ? "#984038" : "#f89890";
|
||||
}
|
||||
return "#ffffff";
|
||||
}
|
||||
|
1289
src/data/move.ts
@ -44,32 +44,32 @@ export const ATrainersTestEncounter: MysteryEncounter =
|
||||
let spriteKeys;
|
||||
let trainerNameKey: string;
|
||||
switch (randSeedInt(5)) {
|
||||
default:
|
||||
case 0:
|
||||
trainerType = TrainerType.BUCK;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.CLAYDOL);
|
||||
trainerNameKey = "buck";
|
||||
break;
|
||||
case 1:
|
||||
trainerType = TrainerType.CHERYL;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.BLISSEY);
|
||||
trainerNameKey = "cheryl";
|
||||
break;
|
||||
case 2:
|
||||
trainerType = TrainerType.MARLEY;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.ARCANINE);
|
||||
trainerNameKey = "marley";
|
||||
break;
|
||||
case 3:
|
||||
trainerType = TrainerType.MIRA;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.ALAKAZAM, false, 1);
|
||||
trainerNameKey = "mira";
|
||||
break;
|
||||
case 4:
|
||||
trainerType = TrainerType.RILEY;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.LUCARIO, false, 1);
|
||||
trainerNameKey = "riley";
|
||||
break;
|
||||
default:
|
||||
case 0:
|
||||
trainerType = TrainerType.BUCK;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.CLAYDOL);
|
||||
trainerNameKey = "buck";
|
||||
break;
|
||||
case 1:
|
||||
trainerType = TrainerType.CHERYL;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.BLISSEY);
|
||||
trainerNameKey = "cheryl";
|
||||
break;
|
||||
case 2:
|
||||
trainerType = TrainerType.MARLEY;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.ARCANINE);
|
||||
trainerNameKey = "marley";
|
||||
break;
|
||||
case 3:
|
||||
trainerType = TrainerType.MIRA;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.ALAKAZAM, false, 1);
|
||||
trainerNameKey = "mira";
|
||||
break;
|
||||
case 4:
|
||||
trainerType = TrainerType.RILEY;
|
||||
spriteKeys = getSpriteKeysFromSpecies(Species.LUCARIO, false, 1);
|
||||
trainerNameKey = "riley";
|
||||
break;
|
||||
}
|
||||
|
||||
// Dialogue and tokens for trainer
|
||||
@ -154,7 +154,7 @@ export const ATrainersTestEncounter: MysteryEncounter =
|
||||
};
|
||||
encounter.setDialogueToken("eggType", i18next.t(`${namespace}:eggTypes.epic`));
|
||||
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: [ modifierTypes.SACRED_ASH ], guaranteedModifierTiers: [ ModifierTier.ROGUE, ModifierTier.ULTRA ], fillRemaining: true }, [ eggOptions ]);
|
||||
return initBattleWithEnemyConfig(scene, config);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
}
|
||||
)
|
||||
.withSimpleOption(
|
||||
|
@ -286,7 +286,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter =
|
||||
ignorePp: true
|
||||
});
|
||||
|
||||
transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await initBattleWithEnemyConfig(scene, encounter.enemyPartyConfigs[0]);
|
||||
})
|
||||
.build()
|
||||
@ -328,7 +328,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter =
|
||||
});
|
||||
await scene.updateModifiers(true);
|
||||
|
||||
transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
leaveEncounterWithoutBattle(scene, true);
|
||||
})
|
||||
.build()
|
||||
@ -359,7 +359,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter =
|
||||
greedent.moveset = [ new PokemonMove(Moves.THRASH), new PokemonMove(Moves.BODY_PRESS), new PokemonMove(Moves.STUFF_CHEEKS), new PokemonMove(Moves.SLACK_OFF) ];
|
||||
greedent.passive = true;
|
||||
|
||||
transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await catchPokemon(scene, greedent, null, PokeballType.POKEBALL, false);
|
||||
leaveEncounterWithoutBattle(scene, true);
|
||||
})
|
||||
|
@ -133,8 +133,8 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter =
|
||||
MysteryEncounterOptionBuilder
|
||||
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL)
|
||||
.withPrimaryPokemonRequirement(new CombinationPokemonRequirement(
|
||||
new MoveRequirement(EXTORTION_MOVES),
|
||||
new AbilityRequirement(EXTORTION_ABILITIES))
|
||||
new MoveRequirement(EXTORTION_MOVES, true),
|
||||
new AbilityRequirement(EXTORTION_ABILITIES, true))
|
||||
)
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
|
@ -42,6 +42,8 @@ import {
|
||||
AttackTypeBoosterModifier,
|
||||
BypassSpeedChanceModifier,
|
||||
ContactHeldItemTransferChanceModifier,
|
||||
GigantamaxAccessModifier,
|
||||
MegaEvolutionAccessModifier,
|
||||
PokemonHeldItemModifier
|
||||
} from "#app/modifier/modifier";
|
||||
import i18next from "i18next";
|
||||
@ -356,10 +358,17 @@ export const BugTypeSuperfanEncounter: MysteryEncounter =
|
||||
},
|
||||
];
|
||||
} else {
|
||||
// If player has any evolution/form change items that are valid for their party, will spawn one of those items in addition to a Master Ball
|
||||
const modifierOptions: ModifierTypeOption[] = [ generateModifierTypeOption(scene, modifierTypes.MASTER_BALL)!, generateModifierTypeOption(scene, modifierTypes.MAX_LURE)! ];
|
||||
// If the player has any evolution/form change items that are valid for their party,
|
||||
// spawn one of those items in addition to Dynamax Band, Mega Band, and Master Ball
|
||||
const modifierOptions: ModifierTypeOption[] = [ generateModifierTypeOption(scene, modifierTypes.MASTER_BALL)! ];
|
||||
const specialOptions: ModifierTypeOption[] = [];
|
||||
|
||||
if (!scene.findModifier(m => m instanceof MegaEvolutionAccessModifier)) {
|
||||
modifierOptions.push(generateModifierTypeOption(scene, modifierTypes.MEGA_BRACELET)!);
|
||||
}
|
||||
if (!scene.findModifier(m => m instanceof GigantamaxAccessModifier)) {
|
||||
modifierOptions.push(generateModifierTypeOption(scene, modifierTypes.DYNAMAX_BAND)!);
|
||||
}
|
||||
const nonRareEvolutionModifier = generateModifierTypeOption(scene, modifierTypes.EVOLUTION_ITEM);
|
||||
if (nonRareEvolutionModifier) {
|
||||
specialOptions.push(nonRareEvolutionModifier);
|
||||
|
@ -28,7 +28,7 @@ import { BattlerIndex } from "#app/battle";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { EncounterBattleAnim } from "#app/data/battle-anims";
|
||||
import { MoveCategory } from "#app/data/move";
|
||||
import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data";
|
||||
import { CustomPokemonData } from "#app/data/custom-pokemon-data";
|
||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||
import { EncounterAnim } from "#enums/encounter-anims";
|
||||
import { Challenges } from "#enums/challenges";
|
||||
@ -133,7 +133,7 @@ export const ClowningAroundEncounter: MysteryEncounter =
|
||||
},
|
||||
{ // Blacephalon has the random ability from pool, and 2 entirely random types to fit with the theme of the encounter
|
||||
species: getPokemonSpecies(Species.BLACEPHALON),
|
||||
mysteryEncounterPokemonData: new MysteryEncounterPokemonData({ ability: ability, types: [ randSeedInt(18), randSeedInt(18) ]}),
|
||||
customPokemonData: new CustomPokemonData({ ability: ability, types: [ randSeedInt(18), randSeedInt(18) ]}),
|
||||
isBoss: true,
|
||||
moveSet: [ Moves.TRICK, Moves.HYPNOSIS, Moves.SHADOW_BALL, Moves.MIND_BLOWN ]
|
||||
},
|
||||
@ -353,15 +353,15 @@ export const ClowningAroundEncounter: MysteryEncounter =
|
||||
newTypes.push(secondType);
|
||||
|
||||
// Apply the type changes (to both base and fusion, if pokemon is fused)
|
||||
if (!pokemon.mysteryEncounterPokemonData) {
|
||||
pokemon.mysteryEncounterPokemonData = new MysteryEncounterPokemonData();
|
||||
if (!pokemon.customPokemonData) {
|
||||
pokemon.customPokemonData = new CustomPokemonData();
|
||||
}
|
||||
pokemon.mysteryEncounterPokemonData.types = newTypes;
|
||||
pokemon.customPokemonData.types = newTypes;
|
||||
if (pokemon.isFusion()) {
|
||||
if (!pokemon.fusionMysteryEncounterPokemonData) {
|
||||
pokemon.fusionMysteryEncounterPokemonData = new MysteryEncounterPokemonData();
|
||||
if (!pokemon.fusionCustomPokemonData) {
|
||||
pokemon.fusionCustomPokemonData = new CustomPokemonData();
|
||||
}
|
||||
pokemon.fusionMysteryEncounterPokemonData.types = newTypes;
|
||||
pokemon.fusionCustomPokemonData.types = newTypes;
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -426,15 +426,15 @@ function onYesAbilitySwap(scene: BattleScene, resolve) {
|
||||
// Do ability swap
|
||||
const encounter = scene.currentBattle.mysteryEncounter!;
|
||||
if (pokemon.isFusion()) {
|
||||
if (!pokemon.fusionMysteryEncounterPokemonData) {
|
||||
pokemon.fusionMysteryEncounterPokemonData = new MysteryEncounterPokemonData();
|
||||
if (!pokemon.fusionCustomPokemonData) {
|
||||
pokemon.fusionCustomPokemonData = new CustomPokemonData();
|
||||
}
|
||||
pokemon.fusionMysteryEncounterPokemonData.ability = encounter.misc.ability;
|
||||
pokemon.fusionCustomPokemonData.ability = encounter.misc.ability;
|
||||
} else {
|
||||
if (!pokemon.mysteryEncounterPokemonData) {
|
||||
pokemon.mysteryEncounterPokemonData = new MysteryEncounterPokemonData();
|
||||
if (!pokemon.customPokemonData) {
|
||||
pokemon.customPokemonData = new CustomPokemonData();
|
||||
}
|
||||
pokemon.mysteryEncounterPokemonData.ability = encounter.misc.ability;
|
||||
pokemon.customPokemonData.ability = encounter.misc.ability;
|
||||
}
|
||||
encounter.setDialogueToken("chosenPokemon", pokemon.getNameToRender());
|
||||
scene.ui.setMode(Mode.MESSAGE).then(() => resolve(true));
|
||||
|
@ -228,7 +228,7 @@ export const DancingLessonsEncounter: MysteryEncounter =
|
||||
})
|
||||
.withOptionPhase(async (scene: BattleScene) => {
|
||||
// Learn its Dance
|
||||
hideOricorioPokemon(scene);
|
||||
await hideOricorioPokemon(scene);
|
||||
leaveEncounterWithoutBattle(scene, true);
|
||||
})
|
||||
.build()
|
||||
@ -236,7 +236,7 @@ export const DancingLessonsEncounter: MysteryEncounter =
|
||||
.withOption(
|
||||
MysteryEncounterOptionBuilder
|
||||
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL)
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(DANCING_MOVES)) // Will set option3PrimaryName and option3PrimaryMove dialogue tokens automatically
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(DANCING_MOVES, true)) // Will set option3PrimaryName and option3PrimaryMove dialogue tokens automatically
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
@ -303,7 +303,7 @@ export const DancingLessonsEncounter: MysteryEncounter =
|
||||
}
|
||||
}
|
||||
|
||||
hideOricorioPokemon(scene);
|
||||
await hideOricorioPokemon(scene);
|
||||
await catchPokemon(scene, oricorio, null, PokeballType.POKEBALL, false);
|
||||
leaveEncounterWithoutBattle(scene, true);
|
||||
})
|
||||
|
@ -182,7 +182,7 @@ export const DarkDealEncounter: MysteryEncounter =
|
||||
const config: EnemyPartyConfig = {
|
||||
pokemonConfigs: [ pokemonConfig ],
|
||||
};
|
||||
return initBattleWithEnemyConfig(scene, config);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.build()
|
||||
)
|
||||
|
@ -222,12 +222,13 @@ export const FieryFalloutEncounter: MysteryEncounter =
|
||||
],
|
||||
})
|
||||
.withPreOptionPhase(async (scene: BattleScene) => {
|
||||
// Do NOT await this, to prevent player from repeatedly pressing options
|
||||
transitionMysteryEncounterIntroVisuals(scene, false, false, 2000);
|
||||
})
|
||||
.withOptionPhase(async (scene: BattleScene) => {
|
||||
// Fire types help calm the Volcarona
|
||||
const encounter = scene.currentBattle.mysteryEncounter!;
|
||||
transitionMysteryEncounterIntroVisuals(scene);
|
||||
await transitionMysteryEncounterIntroVisuals(scene);
|
||||
setEncounterRewards(scene,
|
||||
{ fillRemaining: true },
|
||||
undefined,
|
||||
|
@ -145,7 +145,7 @@ export const FightOrFlightEncounter: MysteryEncounter =
|
||||
.withOption(
|
||||
MysteryEncounterOptionBuilder
|
||||
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL)
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(STEALING_MOVES)) // Will set option2PrimaryName and option2PrimaryMove dialogue tokens automatically
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(STEALING_MOVES, true)) // Will set option2PrimaryName and option2PrimaryMove dialogue tokens automatically
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.2.label`,
|
||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||
|
@ -152,7 +152,7 @@ export const FunAndGamesEncounter: MysteryEncounter =
|
||||
},
|
||||
async (scene: BattleScene) => {
|
||||
// Leave encounter with no rewards or exp
|
||||
transitionMysteryEncounterIntroVisuals(scene, true, true);
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, true);
|
||||
leaveEncounterWithoutBattle(scene, true);
|
||||
return true;
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter =
|
||||
if (modifier.stackCount === 0) {
|
||||
scene.removeModifier(modifier);
|
||||
}
|
||||
scene.updateModifiers(true, true);
|
||||
await scene.updateModifiers(true, true);
|
||||
|
||||
// Generate a trainer name
|
||||
const traderName = generateRandomTraderName();
|
||||
|
@ -129,7 +129,7 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
||||
*
|
||||
* @param scene Battle scene
|
||||
*/
|
||||
async function handlePokemonGuidingYouPhase(scene: BattleScene) {
|
||||
function handlePokemonGuidingYouPhase(scene: BattleScene) {
|
||||
const laprasSpecies = getPokemonSpecies(Species.LAPRAS);
|
||||
const { mysteryEncounter } = scene.currentBattle;
|
||||
|
||||
|
@ -147,11 +147,11 @@ export const MysteriousChallengersEncounter: MysteryEncounter =
|
||||
setEncounterRewards(scene, { guaranteedModifierTypeFuncs: [ modifierTypes.TM_COMMON, modifierTypes.TM_GREAT, modifierTypes.MEMORY_MUSHROOM ], fillRemaining: true });
|
||||
|
||||
// Seed offsets to remove possibility of different trainers having exact same teams
|
||||
let ret;
|
||||
let initBattlePromise: Promise<void>;
|
||||
scene.executeWithSeedOffset(() => {
|
||||
ret = initBattleWithEnemyConfig(scene, config);
|
||||
initBattlePromise = initBattleWithEnemyConfig(scene, config);
|
||||
}, scene.currentBattle.waveIndex * 10);
|
||||
return ret;
|
||||
await initBattlePromise!;
|
||||
}
|
||||
)
|
||||
.withSimpleOption(
|
||||
@ -172,11 +172,11 @@ export const MysteriousChallengersEncounter: MysteryEncounter =
|
||||
setEncounterRewards(scene, { guaranteedModifierTiers: [ ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT ], fillRemaining: true });
|
||||
|
||||
// Seed offsets to remove possibility of different trainers having exact same teams
|
||||
let ret;
|
||||
let initBattlePromise: Promise<void>;
|
||||
scene.executeWithSeedOffset(() => {
|
||||
ret = initBattleWithEnemyConfig(scene, config);
|
||||
initBattlePromise = initBattleWithEnemyConfig(scene, config);
|
||||
}, scene.currentBattle.waveIndex * 100);
|
||||
return ret;
|
||||
await initBattlePromise!;
|
||||
}
|
||||
)
|
||||
.withSimpleOption(
|
||||
@ -200,11 +200,11 @@ export const MysteriousChallengersEncounter: MysteryEncounter =
|
||||
setEncounterRewards(scene, { guaranteedModifierTiers: [ ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.GREAT ], fillRemaining: true });
|
||||
|
||||
// Seed offsets to remove possibility of different trainers having exact same teams
|
||||
let ret;
|
||||
let initBattlePromise: Promise<void>;
|
||||
scene.executeWithSeedOffset(() => {
|
||||
ret = initBattleWithEnemyConfig(scene, config);
|
||||
initBattlePromise = initBattleWithEnemyConfig(scene, config);
|
||||
}, scene.currentBattle.waveIndex * 1000);
|
||||
return ret;
|
||||
await initBattlePromise!;
|
||||
}
|
||||
)
|
||||
.withOutroDialogue([
|
||||
|
@ -184,7 +184,7 @@ export const MysteriousChestEncounter: MysteryEncounter =
|
||||
scene.unshiftPhase(new GameOverPhase(scene));
|
||||
} else {
|
||||
// Show which Pokemon was KOed, then start battle against Gimmighoul
|
||||
transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
setEncounterRewards(scene, { fillRemaining: true });
|
||||
await initBattleWithEnemyConfig(scene, encounter.enemyPartyConfigs[0]);
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ export const PartTimerEncounter: MysteryEncounter =
|
||||
.withOption(
|
||||
MysteryEncounterOptionBuilder
|
||||
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL)
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(CHARMING_MOVES)) // Will set option3PrimaryName and option3PrimaryMove dialogue tokens automatically
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(CHARMING_MOVES, true)) // Will set option3PrimaryName and option3PrimaryMove dialogue tokens automatically
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
|
@ -303,13 +303,16 @@ async function summonSafariPokemon(scene: BattleScene) {
|
||||
scene.unshiftPhase(new SummonPhase(scene, 0, false));
|
||||
|
||||
encounter.setDialogueToken("pokemonName", getPokemonNameWithAffix(pokemon));
|
||||
showEncounterText(scene, getEncounterText(scene, "battle:singleWildAppeared") ?? "", null, 1500, false)
|
||||
.then(() => {
|
||||
const ivScannerModifier = scene.findModifier(m => m instanceof IvScannerModifier);
|
||||
if (ivScannerModifier) {
|
||||
scene.pushPhase(new ScanIvsPhase(scene, pokemon.getBattlerIndex(), Math.min(ivScannerModifier.getStackCount() * 2, 6)));
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: If we await showEncounterText here, then the text will display without
|
||||
// the wild Pokemon on screen, but if we don't await it, then the text never
|
||||
// shows up and the IV scanner breaks. For now, we place the IV scanner code
|
||||
// separately so that at least the IV scanner works.
|
||||
|
||||
const ivScannerModifier = scene.findModifier(m => m instanceof IvScannerModifier);
|
||||
if (ivScannerModifier) {
|
||||
scene.pushPhase(new ScanIvsPhase(scene, pokemon.getBattlerIndex(), Math.min(ivScannerModifier.getStackCount() * 2, 6)));
|
||||
}
|
||||
}
|
||||
|
||||
function throwPokeball(scene: BattleScene, pokemon: EnemyPokemon): Promise<boolean> {
|
||||
|
@ -138,11 +138,11 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter =
|
||||
newNature = randSeedInt(25) as Nature;
|
||||
}
|
||||
|
||||
chosenPokemon.nature = newNature;
|
||||
chosenPokemon.customPokemonData.nature = newNature;
|
||||
encounter.setDialogueToken("newNature", getNatureName(newNature));
|
||||
queueEncounterMessage(scene, `${namespace}:cheap_side_effects`);
|
||||
setEncounterExp(scene, [ chosenPokemon.id ], 100);
|
||||
chosenPokemon.updateInfo();
|
||||
await chosenPokemon.updateInfo();
|
||||
})
|
||||
.build()
|
||||
)
|
||||
@ -204,7 +204,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter =
|
||||
queueEncounterMessage(scene, `${namespace}:no_bad_effects`);
|
||||
setEncounterExp(scene, [ chosenPokemon.id ], 100);
|
||||
|
||||
chosenPokemon.updateInfo();
|
||||
await chosenPokemon.updateInfo();
|
||||
})
|
||||
.build()
|
||||
)
|
||||
|
@ -18,7 +18,7 @@ import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode
|
||||
import { PartyHealPhase } from "#app/phases/party-heal-phase";
|
||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||
import { BerryType } from "#enums/berry-type";
|
||||
import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data";
|
||||
import { CustomPokemonData } from "#app/data/custom-pokemon-data";
|
||||
|
||||
/** i18n namespace for the encounter */
|
||||
const namespace = "mysteryEncounters/slumberingSnorlax";
|
||||
@ -72,7 +72,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter =
|
||||
stackCount: 2
|
||||
},
|
||||
],
|
||||
mysteryEncounterPokemonData: new MysteryEncounterPokemonData({ spriteScale: 1.25 }),
|
||||
customPokemonData: new CustomPokemonData({ spriteScale: 1.25 }),
|
||||
aiType: AiType.SMART // Required to ensure Snorlax uses Sleep Talk while it is asleep
|
||||
};
|
||||
const config: EnemyPartyConfig = {
|
||||
@ -143,7 +143,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter =
|
||||
.withOption(
|
||||
MysteryEncounterOptionBuilder
|
||||
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL)
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(STEALING_MOVES))
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(STEALING_MOVES, true))
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
|
@ -149,7 +149,7 @@ export const TeleportingHijinksEncounter: MysteryEncounter =
|
||||
const magnet = generateModifierTypeOption(scene, modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.STEEL ])!;
|
||||
const metalCoat = generateModifierTypeOption(scene, modifierTypes.ATTACK_TYPE_BOOSTER, [ Type.ELECTRIC ])!;
|
||||
setEncounterRewards(scene, { guaranteedModifierTypeOptions: [ magnet, metalCoat ], fillRemaining: true });
|
||||
transitionMysteryEncounterIntroVisuals(scene, true, true);
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, true);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
}
|
||||
)
|
||||
|
@ -25,6 +25,7 @@ import { achvs } from "#app/system/achv";
|
||||
import { modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type";
|
||||
import { Type } from "#app/data/type";
|
||||
import { getPokeballTintColor } from "#app/data/pokeball";
|
||||
import { PokemonHeldItemModifier } from "#app/modifier/modifier";
|
||||
|
||||
/** the i18n namespace for the encounter */
|
||||
const namespace = "mysteryEncounters/theExpertPokemonBreeder";
|
||||
@ -61,7 +62,7 @@ const POOL_1_POKEMON: (Species | BreederSpeciesEvolution)[][] = [
|
||||
const POOL_2_POKEMON: (Species | BreederSpeciesEvolution)[][] = [
|
||||
[ Species.PICHU, new BreederSpeciesEvolution(Species.PIKACHU, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.RAICHU, FINAL_STAGE_EVOLUTION_WAVE) ],
|
||||
[ Species.PICHU, new BreederSpeciesEvolution(Species.PIKACHU, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.ALOLA_RAICHU, FINAL_STAGE_EVOLUTION_WAVE) ],
|
||||
[ Species.JYNX ],
|
||||
[ Species.SMOOCHUM, new BreederSpeciesEvolution(Species.JYNX, SECOND_STAGE_EVOLUTION_WAVE) ],
|
||||
[ Species.TYROGUE, new BreederSpeciesEvolution(Species.HITMONLEE, SECOND_STAGE_EVOLUTION_WAVE) ],
|
||||
[ Species.TYROGUE, new BreederSpeciesEvolution(Species.HITMONCHAN, SECOND_STAGE_EVOLUTION_WAVE) ],
|
||||
[ Species.TYROGUE, new BreederSpeciesEvolution(Species.HITMONTOP, SECOND_STAGE_EVOLUTION_WAVE) ],
|
||||
@ -163,7 +164,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
||||
if (pokemon2CommonEggs > 0) {
|
||||
const eggsText = i18next.t(`${namespace}:numEggs`, { count: pokemon2CommonEggs, rarity: i18next.t("egg:defaultTier") });
|
||||
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, { eggs: eggsText });
|
||||
encounter.setDialogueToken("pokemon1CommonEggs", eggsText);
|
||||
encounter.setDialogueToken("pokemon2CommonEggs", eggsText);
|
||||
}
|
||||
encounter.options[1].dialogue!.buttonTooltip = pokemon2Tooltip;
|
||||
|
||||
@ -221,7 +222,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
||||
encounter.misc.chosenPokemon = pokemon1;
|
||||
encounter.setDialogueToken("chosenPokemon", pokemon1.getNameToRender());
|
||||
const eggOptions = getEggOptions(scene, pokemon1CommonEggs, pokemon1RareEggs);
|
||||
setEncounterRewards(scene, { fillRemaining: true }, eggOptions);
|
||||
setEncounterRewards(scene, { fillRemaining: true }, eggOptions, () => doPostEncounterCleanup(scene));
|
||||
|
||||
// Remove all Pokemon from the party except the chosen Pokemon
|
||||
removePokemonFromPartyAndStoreHeldItems(scene, encounter, pokemon1);
|
||||
@ -245,10 +246,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
||||
}
|
||||
|
||||
encounter.onGameOver = onGameOver;
|
||||
initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.withPostOptionPhase(async (scene: BattleScene) => {
|
||||
await doPostEncounterCleanup(scene);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.build()
|
||||
)
|
||||
@ -273,7 +271,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
||||
encounter.misc.chosenPokemon = pokemon2;
|
||||
encounter.setDialogueToken("chosenPokemon", pokemon2.getNameToRender());
|
||||
const eggOptions = getEggOptions(scene, pokemon2CommonEggs, pokemon2RareEggs);
|
||||
setEncounterRewards(scene, { fillRemaining: true }, eggOptions);
|
||||
setEncounterRewards(scene, { fillRemaining: true }, eggOptions, () => doPostEncounterCleanup(scene));
|
||||
|
||||
// Remove all Pokemon from the party except the chosen Pokemon
|
||||
removePokemonFromPartyAndStoreHeldItems(scene, encounter, pokemon2);
|
||||
@ -297,10 +295,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
||||
}
|
||||
|
||||
encounter.onGameOver = onGameOver;
|
||||
initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.withPostOptionPhase(async (scene: BattleScene) => {
|
||||
await doPostEncounterCleanup(scene);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.build()
|
||||
)
|
||||
@ -325,7 +320,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
||||
encounter.misc.chosenPokemon = pokemon3;
|
||||
encounter.setDialogueToken("chosenPokemon", pokemon3.getNameToRender());
|
||||
const eggOptions = getEggOptions(scene, pokemon3CommonEggs, pokemon3RareEggs);
|
||||
setEncounterRewards(scene, { fillRemaining: true }, eggOptions);
|
||||
setEncounterRewards(scene, { fillRemaining: true }, eggOptions, () => doPostEncounterCleanup(scene));
|
||||
|
||||
// Remove all Pokemon from the party except the chosen Pokemon
|
||||
removePokemonFromPartyAndStoreHeldItems(scene, encounter, pokemon3);
|
||||
@ -349,10 +344,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter =
|
||||
}
|
||||
|
||||
encounter.onGameOver = onGameOver;
|
||||
initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.withPostOptionPhase(async (scene: BattleScene) => {
|
||||
await doPostEncounterCleanup(scene);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.build()
|
||||
)
|
||||
@ -521,19 +513,19 @@ function checkAchievement(scene: BattleScene) {
|
||||
}
|
||||
}
|
||||
|
||||
async function restorePartyAndHeldItems(scene: BattleScene) {
|
||||
function restorePartyAndHeldItems(scene: BattleScene) {
|
||||
const encounter = scene.currentBattle.mysteryEncounter!;
|
||||
// Restore original party
|
||||
scene.getParty().push(...encounter.misc.originalParty);
|
||||
|
||||
// Restore held items
|
||||
const originalHeldItems = encounter.misc.originalPartyHeldItems;
|
||||
originalHeldItems.forEach(pokemonHeldItemsList => {
|
||||
originalHeldItems.forEach((pokemonHeldItemsList: PokemonHeldItemModifier[]) => {
|
||||
pokemonHeldItemsList.forEach(heldItem => {
|
||||
scene.addModifier(heldItem, true, false, false, true);
|
||||
});
|
||||
});
|
||||
await scene.updateModifiers(true);
|
||||
scene.updateModifiers(true);
|
||||
}
|
||||
|
||||
function onGameOver(scene: BattleScene) {
|
||||
@ -609,13 +601,13 @@ function onGameOver(scene: BattleScene) {
|
||||
return false;
|
||||
}
|
||||
|
||||
async function doPostEncounterCleanup(scene: BattleScene) {
|
||||
function doPostEncounterCleanup(scene: BattleScene) {
|
||||
const encounter = scene.currentBattle.mysteryEncounter!;
|
||||
if (!encounter.misc.encounterFailed) {
|
||||
// Give achievement if in Space biome
|
||||
checkAchievement(scene);
|
||||
// Give 20 friendship to the chosen pokemon
|
||||
encounter.misc.chosenPokemon.addFriendship(FRIENDSHIP_ADDED);
|
||||
await restorePartyAndHeldItems(scene);
|
||||
restorePartyAndHeldItems(scene);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import { BattlerIndex } from "#app/battle";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { BerryType } from "#enums/berry-type";
|
||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||
import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data";
|
||||
import { CustomPokemonData } from "#app/data/custom-pokemon-data";
|
||||
import { Stat } from "#enums/stat";
|
||||
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
|
||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
|
||||
@ -79,7 +79,7 @@ export const TheStrongStuffEncounter: MysteryEncounter =
|
||||
species: getPokemonSpecies(Species.SHUCKLE),
|
||||
isBoss: true,
|
||||
bossSegments: 5,
|
||||
mysteryEncounterPokemonData: new MysteryEncounterPokemonData({ spriteScale: 1.25 }),
|
||||
customPokemonData: new CustomPokemonData({ spriteScale: 1.25 }),
|
||||
nature: Nature.BOLD,
|
||||
moveSet: [ Moves.INFESTATION, Moves.SALT_CURE, Moves.GASTRO_ACID, Moves.HEAL_ORDER ],
|
||||
modifierConfigs: [
|
||||
@ -201,7 +201,7 @@ export const TheStrongStuffEncounter: MysteryEncounter =
|
||||
});
|
||||
|
||||
encounter.dialogue.outro = [];
|
||||
transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, true, 500);
|
||||
await initBattleWithEnemyConfig(scene, encounter.enemyPartyConfigs[0]);
|
||||
}
|
||||
)
|
||||
|
@ -111,8 +111,8 @@ export const TheWinstrateChallengeEncounter: MysteryEncounter =
|
||||
},
|
||||
async (scene: BattleScene) => {
|
||||
// Spawn 5 trainer battles back to back with Macho Brace in rewards
|
||||
scene.currentBattle.mysteryEncounter!.doContinueEncounter = (scene: BattleScene) => {
|
||||
return endTrainerBattleAndShowDialogue(scene);
|
||||
scene.currentBattle.mysteryEncounter!.doContinueEncounter = async (scene: BattleScene) => {
|
||||
await endTrainerBattleAndShowDialogue(scene);
|
||||
};
|
||||
await transitionMysteryEncounterIntroVisuals(scene, true, false);
|
||||
await spawnNextTrainerOrEndEncounter(scene);
|
||||
|
@ -162,7 +162,7 @@ export const TrainingSessionEncounter: MysteryEncounter =
|
||||
|
||||
setEncounterRewards(scene, { fillRemaining: true }, undefined, onBeforeRewardsPhase);
|
||||
|
||||
return initBattleWithEnemyConfig(scene, config);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.build()
|
||||
)
|
||||
@ -238,7 +238,7 @@ export const TrainingSessionEncounter: MysteryEncounter =
|
||||
|
||||
setEncounterRewards(scene, { fillRemaining: true }, undefined, onBeforeRewardsPhase);
|
||||
|
||||
return initBattleWithEnemyConfig(scene, config);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.build()
|
||||
)
|
||||
@ -351,7 +351,7 @@ export const TrainingSessionEncounter: MysteryEncounter =
|
||||
|
||||
setEncounterRewards(scene, { fillRemaining: true }, undefined, onBeforeRewardsPhase);
|
||||
|
||||
return initBattleWithEnemyConfig(scene, config);
|
||||
await initBattleWithEnemyConfig(scene, config);
|
||||
})
|
||||
.build()
|
||||
)
|
||||
|
@ -105,7 +105,7 @@ export const TrashToTreasureEncounter: MysteryEncounter =
|
||||
})
|
||||
.withOptionPhase(async (scene: BattleScene) => {
|
||||
// Gain 2 Leftovers and 2 Shell Bell
|
||||
transitionMysteryEncounterIntroVisuals(scene);
|
||||
await transitionMysteryEncounterIntroVisuals(scene);
|
||||
await tryApplyDigRewardItems(scene);
|
||||
|
||||
const blackSludge = generateModifierType(scene, modifierTypes.MYSTERY_ENCOUNTER_BLACK_SLUDGE, [ SHOP_ITEM_COST_MULTIPLIER ]);
|
||||
@ -136,7 +136,7 @@ export const TrashToTreasureEncounter: MysteryEncounter =
|
||||
// Investigate garbage, battle Gmax Garbodor
|
||||
scene.setFieldScale(0.75);
|
||||
await showEncounterText(scene, `${namespace}:option.2.selected_2`);
|
||||
transitionMysteryEncounterIntroVisuals(scene);
|
||||
await transitionMysteryEncounterIntroVisuals(scene);
|
||||
|
||||
const encounter = scene.currentBattle.mysteryEncounter!;
|
||||
|
||||
@ -222,7 +222,7 @@ async function tryApplyDigRewardItems(scene: BattleScene) {
|
||||
await showEncounterText(scene, i18next.t("battle:rewardGainCount", { modifierName: shellBell.name, count: 2 }), null, undefined, true);
|
||||
}
|
||||
|
||||
async function doGarbageDig(scene: BattleScene) {
|
||||
function doGarbageDig(scene: BattleScene) {
|
||||
scene.playSound("battle_anims/PRSFX- Dig2");
|
||||
scene.time.delayedCall(SOUND_EFFECT_WAIT_TIME, () => {
|
||||
scene.playSound("battle_anims/PRSFX- Dig2");
|
||||
|
@ -210,7 +210,7 @@ export const UncommonBreedEncounter: MysteryEncounter =
|
||||
.withOption(
|
||||
MysteryEncounterOptionBuilder
|
||||
.newOptionWithMode(MysteryEncounterOptionMode.DISABLED_OR_SPECIAL)
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(CHARMING_MOVES)) // Will set option2PrimaryName and option2PrimaryMove dialogue tokens automatically
|
||||
.withPrimaryPokemonRequirement(new MoveRequirement(CHARMING_MOVES, true)) // Will set option2PrimaryName and option2PrimaryMove dialogue tokens automatically
|
||||
.withDialogue({
|
||||
buttonLabel: `${namespace}:option.3.label`,
|
||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||
|
@ -12,7 +12,7 @@ import { IntegerHolder, isNullOrUndefined, randSeedInt, randSeedShuffle } from "
|
||||
import PokemonSpecies, { allSpecies, getPokemonSpecies } from "#app/data/pokemon-species";
|
||||
import { HiddenAbilityRateBoosterModifier, PokemonFormChangeItemModifier, PokemonHeldItemModifier } from "#app/modifier/modifier";
|
||||
import { achvs } from "#app/system/achv";
|
||||
import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data";
|
||||
import { CustomPokemonData } from "#app/data/custom-pokemon-data";
|
||||
import { showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
|
||||
import { modifierTypes } from "#app/modifier/modifier-type";
|
||||
import i18next from "#app/plugins/i18n";
|
||||
@ -379,10 +379,10 @@ async function doNewTeamPostProcess(scene: BattleScene, transformations: Pokemon
|
||||
newType = randSeedInt(18) as Type;
|
||||
}
|
||||
newTypes.push(newType);
|
||||
if (!newPokemon.mysteryEncounterPokemonData) {
|
||||
newPokemon.mysteryEncounterPokemonData = new MysteryEncounterPokemonData();
|
||||
if (!newPokemon.customPokemonData) {
|
||||
newPokemon.customPokemonData = new CustomPokemonData();
|
||||
}
|
||||
newPokemon.mysteryEncounterPokemonData.types = newTypes;
|
||||
newPokemon.customPokemonData.types = newTypes;
|
||||
|
||||
for (const item of transformation.heldItems) {
|
||||
item.pokemonId = newPokemon.id;
|
||||
|
@ -15,6 +15,7 @@ import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import { AttackTypeBoosterModifier } from "#app/modifier/modifier";
|
||||
import { AttackTypeBoosterModifierType } from "#app/modifier/modifier-type";
|
||||
import { SpeciesFormKey } from "#enums/species-form-key";
|
||||
import { allAbilities } from "#app/data/ability";
|
||||
|
||||
export interface EncounterRequirement {
|
||||
meetsRequirement(scene: BattleScene): boolean; // Boolean to see if a requirement is met
|
||||
@ -476,9 +477,11 @@ export class MoveRequirement extends EncounterPokemonRequirement {
|
||||
requiredMoves: Moves[] = [];
|
||||
minNumberOfPokemon: number;
|
||||
invertQuery: boolean;
|
||||
excludeDisallowedPokemon: boolean;
|
||||
|
||||
constructor(moves: Moves | Moves[], minNumberOfPokemon: number = 1, invertQuery: boolean = false) {
|
||||
constructor(moves: Moves | Moves[], excludeDisallowedPokemon: boolean, minNumberOfPokemon: number = 1, invertQuery: boolean = false) {
|
||||
super();
|
||||
this.excludeDisallowedPokemon = excludeDisallowedPokemon;
|
||||
this.minNumberOfPokemon = minNumberOfPokemon;
|
||||
this.invertQuery = invertQuery;
|
||||
this.requiredMoves = Array.isArray(moves) ? moves : [ moves ];
|
||||
@ -494,10 +497,15 @@ export class MoveRequirement extends EncounterPokemonRequirement {
|
||||
|
||||
override queryParty(partyPokemon: PlayerPokemon[]): PlayerPokemon[] {
|
||||
if (!this.invertQuery) {
|
||||
return partyPokemon.filter((pokemon) => this.requiredMoves.filter((reqMove) => pokemon.moveset.filter((move) => move?.moveId === reqMove).length > 0).length > 0);
|
||||
// get the Pokemon with at least one move in the required moves list
|
||||
return partyPokemon.filter((pokemon) =>
|
||||
(!this.excludeDisallowedPokemon || pokemon.isAllowedInBattle())
|
||||
&& pokemon.moveset.some((move) => move?.moveId && this.requiredMoves.includes(move.moveId)));
|
||||
} else {
|
||||
// for an inverted query, we only want to get the pokemon that don't have ANY of the listed moves
|
||||
return partyPokemon.filter((pokemon) => this.requiredMoves.filter((reqMove) => pokemon.moveset.filter((move) => move?.moveId === reqMove).length === 0).length === 0);
|
||||
return partyPokemon.filter((pokemon) =>
|
||||
(!this.excludeDisallowedPokemon || pokemon.isAllowedInBattle())
|
||||
&& !pokemon.moveset.some((move) => move?.moveId && this.requiredMoves.includes(move.moveId)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -559,9 +567,11 @@ export class AbilityRequirement extends EncounterPokemonRequirement {
|
||||
requiredAbilities: Abilities[];
|
||||
minNumberOfPokemon: number;
|
||||
invertQuery: boolean;
|
||||
excludeDisallowedPokemon: boolean;
|
||||
|
||||
constructor(abilities: Abilities | Abilities[], minNumberOfPokemon: number = 1, invertQuery: boolean = false) {
|
||||
constructor(abilities: Abilities | Abilities[], excludeDisallowedPokemon: boolean, minNumberOfPokemon: number = 1, invertQuery: boolean = false) {
|
||||
super();
|
||||
this.excludeDisallowedPokemon = excludeDisallowedPokemon;
|
||||
this.minNumberOfPokemon = minNumberOfPokemon;
|
||||
this.invertQuery = invertQuery;
|
||||
this.requiredAbilities = Array.isArray(abilities) ? abilities : [ abilities ];
|
||||
@ -577,16 +587,21 @@ export class AbilityRequirement extends EncounterPokemonRequirement {
|
||||
|
||||
override queryParty(partyPokemon: PlayerPokemon[]): PlayerPokemon[] {
|
||||
if (!this.invertQuery) {
|
||||
return partyPokemon.filter((pokemon) => this.requiredAbilities.some((ability) => pokemon.getAbility().id === ability));
|
||||
return partyPokemon.filter((pokemon) =>
|
||||
(!this.excludeDisallowedPokemon || pokemon.isAllowedInBattle())
|
||||
&& this.requiredAbilities.some((ability) => pokemon.hasAbility(ability, false)));
|
||||
} else {
|
||||
// for an inverted query, we only want to get the pokemon that don't have ANY of the listed abilitiess
|
||||
return partyPokemon.filter((pokemon) => this.requiredAbilities.filter((ability) => pokemon.getAbility().id === ability).length === 0);
|
||||
// for an inverted query, we only want to get the pokemon that don't have ANY of the listed abilities
|
||||
return partyPokemon.filter((pokemon) =>
|
||||
(!this.excludeDisallowedPokemon || pokemon.isAllowedInBattle())
|
||||
&& this.requiredAbilities.filter((ability) => pokemon.hasAbility(ability, false)).length === 0);
|
||||
}
|
||||
}
|
||||
|
||||
override getDialogueToken(scene: BattleScene, pokemon?: PlayerPokemon): [string, string] {
|
||||
if (pokemon?.getAbility().id && this.requiredAbilities.some(a => pokemon.getAbility().id === a)) {
|
||||
return [ "ability", pokemon.getAbility().name ];
|
||||
override getDialogueToken(_scene: BattleScene, pokemon?: PlayerPokemon): [string, string] {
|
||||
const matchingAbility = this.requiredAbilities.find(a => pokemon?.hasAbility(a, false));
|
||||
if (!isNullOrUndefined(matchingAbility)) {
|
||||
return [ "ability", allAbilities[matchingAbility].name ];
|
||||
}
|
||||
return [ "ability", "" ];
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ export default class MysteryEncounter implements IMysteryEncounter {
|
||||
if (activeMon.length > 0) {
|
||||
this.primaryPokemon = activeMon[0];
|
||||
} else {
|
||||
this.primaryPokemon = scene.getParty().filter(p => !p.isFainted())[0];
|
||||
this.primaryPokemon = scene.getParty().filter(p => p.isAllowedInBattle())[0];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import { Status, StatusEffect } from "#app/data/status-effect";
|
||||
import { TrainerConfig, trainerConfigs, TrainerSlot } from "#app/data/trainer-config";
|
||||
import PokemonSpecies from "#app/data/pokemon-species";
|
||||
import { Egg, IEggOptions } from "#app/data/egg";
|
||||
import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data";
|
||||
import { CustomPokemonData } from "#app/data/custom-pokemon-data";
|
||||
import HeldModifierConfig from "#app/interfaces/held-modifier-config";
|
||||
import { MovePhase } from "#app/phases/move-phase";
|
||||
import { EggLapsePhase } from "#app/phases/egg-lapse-phase";
|
||||
@ -71,7 +71,7 @@ export interface EnemyPokemonConfig {
|
||||
nickname?: string;
|
||||
bossSegments?: number;
|
||||
bossSegmentModifier?: number; // Additive to the determined segment number
|
||||
mysteryEncounterPokemonData?: MysteryEncounterPokemonData;
|
||||
customPokemonData?: CustomPokemonData;
|
||||
formIndex?: number;
|
||||
abilityIndex?: number;
|
||||
level?: number;
|
||||
@ -145,7 +145,7 @@ export async function initBattleWithEnemyConfig(scene: BattleScene, partyConfig:
|
||||
newTrainer.setVisible(false);
|
||||
scene.field.add(newTrainer);
|
||||
scene.currentBattle.trainer = newTrainer;
|
||||
loadEnemyAssets.push(newTrainer.loadAssets());
|
||||
loadEnemyAssets.push(newTrainer.loadAssets().then(() => newTrainer.initSprite()));
|
||||
|
||||
battle.enemyLevels = scene.currentBattle.trainer.getPartyLevels(scene.currentBattle.waveIndex);
|
||||
} else {
|
||||
@ -250,8 +250,8 @@ export async function initBattleWithEnemyConfig(scene: BattleScene, partyConfig:
|
||||
}
|
||||
|
||||
// Set custom mystery encounter data fields (such as sprite scale, custom abilities, types, etc.)
|
||||
if (!isNullOrUndefined(config.mysteryEncounterPokemonData)) {
|
||||
enemyPokemon.mysteryEncounterPokemonData = config.mysteryEncounterPokemonData;
|
||||
if (!isNullOrUndefined(config.customPokemonData)) {
|
||||
enemyPokemon.customPokemonData = config.customPokemonData;
|
||||
}
|
||||
|
||||
// Set Boss
|
||||
@ -1069,19 +1069,19 @@ export function calculateRareSpawnAggregateStats(scene: BattleScene, luckValue:
|
||||
const tier = tierValue >= 20 ? BiomePoolTier.BOSS : tierValue >= 6 ? BiomePoolTier.BOSS_RARE : tierValue >= 1 ? BiomePoolTier.BOSS_SUPER_RARE : BiomePoolTier.BOSS_ULTRA_RARE;
|
||||
|
||||
switch (tier) {
|
||||
default:
|
||||
case BiomePoolTier.BOSS:
|
||||
++bossEncountersByRarity[0];
|
||||
break;
|
||||
case BiomePoolTier.BOSS_RARE:
|
||||
++bossEncountersByRarity[1];
|
||||
break;
|
||||
case BiomePoolTier.BOSS_SUPER_RARE:
|
||||
++bossEncountersByRarity[2];
|
||||
break;
|
||||
case BiomePoolTier.BOSS_ULTRA_RARE:
|
||||
++bossEncountersByRarity[3];
|
||||
break;
|
||||
default:
|
||||
case BiomePoolTier.BOSS:
|
||||
++bossEncountersByRarity[0];
|
||||
break;
|
||||
case BiomePoolTier.BOSS_RARE:
|
||||
++bossEncountersByRarity[1];
|
||||
break;
|
||||
case BiomePoolTier.BOSS_SUPER_RARE:
|
||||
++bossEncountersByRarity[2];
|
||||
break;
|
||||
case BiomePoolTier.BOSS_ULTRA_RARE:
|
||||
++bossEncountersByRarity[3];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,76 +37,76 @@ export function getNatureName(nature: Nature, includeStatEffects: boolean = fals
|
||||
|
||||
export function getNatureStatMultiplier(nature: Nature, stat: Stat): number {
|
||||
switch (stat) {
|
||||
case Stat.ATK:
|
||||
switch (nature) {
|
||||
case Nature.LONELY:
|
||||
case Nature.BRAVE:
|
||||
case Nature.ADAMANT:
|
||||
case Nature.NAUGHTY:
|
||||
return 1.1;
|
||||
case Nature.BOLD:
|
||||
case Nature.TIMID:
|
||||
case Nature.MODEST:
|
||||
case Nature.CALM:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.DEF:
|
||||
switch (nature) {
|
||||
case Nature.BOLD:
|
||||
case Nature.RELAXED:
|
||||
case Nature.IMPISH:
|
||||
case Nature.LAX:
|
||||
return 1.1;
|
||||
case Nature.LONELY:
|
||||
case Nature.HASTY:
|
||||
case Nature.MILD:
|
||||
case Nature.GENTLE:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.SPATK:
|
||||
switch (nature) {
|
||||
case Nature.MODEST:
|
||||
case Nature.MILD:
|
||||
case Nature.QUIET:
|
||||
case Nature.RASH:
|
||||
return 1.1;
|
||||
case Nature.ADAMANT:
|
||||
case Nature.IMPISH:
|
||||
case Nature.JOLLY:
|
||||
case Nature.CAREFUL:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.SPDEF:
|
||||
switch (nature) {
|
||||
case Nature.CALM:
|
||||
case Nature.GENTLE:
|
||||
case Nature.SASSY:
|
||||
case Nature.CAREFUL:
|
||||
return 1.1;
|
||||
case Nature.NAUGHTY:
|
||||
case Nature.LAX:
|
||||
case Nature.NAIVE:
|
||||
case Nature.RASH:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.SPD:
|
||||
switch (nature) {
|
||||
case Nature.TIMID:
|
||||
case Nature.HASTY:
|
||||
case Nature.JOLLY:
|
||||
case Nature.NAIVE:
|
||||
return 1.1;
|
||||
case Nature.BRAVE:
|
||||
case Nature.RELAXED:
|
||||
case Nature.QUIET:
|
||||
case Nature.SASSY:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.ATK:
|
||||
switch (nature) {
|
||||
case Nature.LONELY:
|
||||
case Nature.BRAVE:
|
||||
case Nature.ADAMANT:
|
||||
case Nature.NAUGHTY:
|
||||
return 1.1;
|
||||
case Nature.BOLD:
|
||||
case Nature.TIMID:
|
||||
case Nature.MODEST:
|
||||
case Nature.CALM:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.DEF:
|
||||
switch (nature) {
|
||||
case Nature.BOLD:
|
||||
case Nature.RELAXED:
|
||||
case Nature.IMPISH:
|
||||
case Nature.LAX:
|
||||
return 1.1;
|
||||
case Nature.LONELY:
|
||||
case Nature.HASTY:
|
||||
case Nature.MILD:
|
||||
case Nature.GENTLE:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.SPATK:
|
||||
switch (nature) {
|
||||
case Nature.MODEST:
|
||||
case Nature.MILD:
|
||||
case Nature.QUIET:
|
||||
case Nature.RASH:
|
||||
return 1.1;
|
||||
case Nature.ADAMANT:
|
||||
case Nature.IMPISH:
|
||||
case Nature.JOLLY:
|
||||
case Nature.CAREFUL:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.SPDEF:
|
||||
switch (nature) {
|
||||
case Nature.CALM:
|
||||
case Nature.GENTLE:
|
||||
case Nature.SASSY:
|
||||
case Nature.CAREFUL:
|
||||
return 1.1;
|
||||
case Nature.NAUGHTY:
|
||||
case Nature.LAX:
|
||||
case Nature.NAIVE:
|
||||
case Nature.RASH:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
case Stat.SPD:
|
||||
switch (nature) {
|
||||
case Nature.TIMID:
|
||||
case Nature.HASTY:
|
||||
case Nature.JOLLY:
|
||||
case Nature.NAIVE:
|
||||
return 1.1;
|
||||
case Nature.BRAVE:
|
||||
case Nature.RELAXED:
|
||||
case Nature.QUIET:
|
||||
case Nature.SASSY:
|
||||
return 0.9;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -8,77 +8,77 @@ export const MAX_PER_TYPE_POKEBALLS: integer = 99;
|
||||
|
||||
export function getPokeballAtlasKey(type: PokeballType): string {
|
||||
switch (type) {
|
||||
case PokeballType.POKEBALL:
|
||||
return "pb";
|
||||
case PokeballType.GREAT_BALL:
|
||||
return "gb";
|
||||
case PokeballType.ULTRA_BALL:
|
||||
return "ub";
|
||||
case PokeballType.ROGUE_BALL:
|
||||
return "rb";
|
||||
case PokeballType.MASTER_BALL:
|
||||
return "mb";
|
||||
case PokeballType.LUXURY_BALL:
|
||||
return "lb";
|
||||
case PokeballType.POKEBALL:
|
||||
return "pb";
|
||||
case PokeballType.GREAT_BALL:
|
||||
return "gb";
|
||||
case PokeballType.ULTRA_BALL:
|
||||
return "ub";
|
||||
case PokeballType.ROGUE_BALL:
|
||||
return "rb";
|
||||
case PokeballType.MASTER_BALL:
|
||||
return "mb";
|
||||
case PokeballType.LUXURY_BALL:
|
||||
return "lb";
|
||||
}
|
||||
}
|
||||
|
||||
export function getPokeballName(type: PokeballType): string {
|
||||
let ret: string;
|
||||
switch (type) {
|
||||
case PokeballType.POKEBALL:
|
||||
ret = i18next.t("pokeball:pokeBall");
|
||||
break;
|
||||
case PokeballType.GREAT_BALL:
|
||||
ret = i18next.t("pokeball:greatBall");
|
||||
break;
|
||||
case PokeballType.ULTRA_BALL:
|
||||
ret = i18next.t("pokeball:ultraBall");
|
||||
break;
|
||||
case PokeballType.ROGUE_BALL:
|
||||
ret = i18next.t("pokeball:rogueBall");
|
||||
break;
|
||||
case PokeballType.MASTER_BALL:
|
||||
ret = i18next.t("pokeball:masterBall");
|
||||
break;
|
||||
case PokeballType.LUXURY_BALL:
|
||||
ret = i18next.t("pokeball:luxuryBall");
|
||||
break;
|
||||
case PokeballType.POKEBALL:
|
||||
ret = i18next.t("pokeball:pokeBall");
|
||||
break;
|
||||
case PokeballType.GREAT_BALL:
|
||||
ret = i18next.t("pokeball:greatBall");
|
||||
break;
|
||||
case PokeballType.ULTRA_BALL:
|
||||
ret = i18next.t("pokeball:ultraBall");
|
||||
break;
|
||||
case PokeballType.ROGUE_BALL:
|
||||
ret = i18next.t("pokeball:rogueBall");
|
||||
break;
|
||||
case PokeballType.MASTER_BALL:
|
||||
ret = i18next.t("pokeball:masterBall");
|
||||
break;
|
||||
case PokeballType.LUXURY_BALL:
|
||||
ret = i18next.t("pokeball:luxuryBall");
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
export function getPokeballCatchMultiplier(type: PokeballType): number {
|
||||
switch (type) {
|
||||
case PokeballType.POKEBALL:
|
||||
return 1;
|
||||
case PokeballType.GREAT_BALL:
|
||||
return 1.5;
|
||||
case PokeballType.ULTRA_BALL:
|
||||
return 2;
|
||||
case PokeballType.ROGUE_BALL:
|
||||
return 3;
|
||||
case PokeballType.MASTER_BALL:
|
||||
return -1;
|
||||
case PokeballType.LUXURY_BALL:
|
||||
return 1;
|
||||
case PokeballType.POKEBALL:
|
||||
return 1;
|
||||
case PokeballType.GREAT_BALL:
|
||||
return 1.5;
|
||||
case PokeballType.ULTRA_BALL:
|
||||
return 2;
|
||||
case PokeballType.ROGUE_BALL:
|
||||
return 3;
|
||||
case PokeballType.MASTER_BALL:
|
||||
return -1;
|
||||
case PokeballType.LUXURY_BALL:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
export function getPokeballTintColor(type: PokeballType): number {
|
||||
switch (type) {
|
||||
case PokeballType.POKEBALL:
|
||||
return 0xd52929;
|
||||
case PokeballType.GREAT_BALL:
|
||||
return 0x94b4de;
|
||||
case PokeballType.ULTRA_BALL:
|
||||
return 0xe6cd31;
|
||||
case PokeballType.ROGUE_BALL:
|
||||
return 0xd52929;
|
||||
case PokeballType.MASTER_BALL:
|
||||
return 0xa441bd;
|
||||
case PokeballType.LUXURY_BALL:
|
||||
return 0xffde6a;
|
||||
case PokeballType.POKEBALL:
|
||||
return 0xd52929;
|
||||
case PokeballType.GREAT_BALL:
|
||||
return 0x94b4de;
|
||||
case PokeballType.ULTRA_BALL:
|
||||
return 0xe6cd31;
|
||||
case PokeballType.ROGUE_BALL:
|
||||
return 0xd52929;
|
||||
case PokeballType.MASTER_BALL:
|
||||
return 0xa441bd;
|
||||
case PokeballType.LUXURY_BALL:
|
||||
return 0xffde6a;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -799,8 +799,8 @@ export const pokemonFormChanges: PokemonFormChanges = {
|
||||
[Species.ZYGARDE]: [
|
||||
new SpeciesFormChange(Species.ZYGARDE, "50-pc", "complete", new SpeciesFormChangeManualTrigger(), true),
|
||||
new SpeciesFormChange(Species.ZYGARDE, "complete", "50-pc", new SpeciesFormChangeManualTrigger(), true),
|
||||
new SpeciesFormChange(Species.ZYGARDE, "10-pc", "complete", new SpeciesFormChangeManualTrigger(), true),
|
||||
new SpeciesFormChange(Species.ZYGARDE, "complete", "10-pc", new SpeciesFormChangeManualTrigger(), true)
|
||||
new SpeciesFormChange(Species.ZYGARDE, "10-pc", "10-complete", new SpeciesFormChangeManualTrigger(), true),
|
||||
new SpeciesFormChange(Species.ZYGARDE, "10-complete", "10-pc", new SpeciesFormChangeManualTrigger(), true)
|
||||
],
|
||||
[Species.DIANCIE]: [
|
||||
new SpeciesFormChange(Species.DIANCIE, "", SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.DIANCITE))
|
||||
|
@ -238,8 +238,8 @@ export abstract class PokemonSpeciesForm {
|
||||
|
||||
isRareRegional(): boolean {
|
||||
switch (this.getRegion()) {
|
||||
case Region.HISUI:
|
||||
return true;
|
||||
case Region.HISUI:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -265,14 +265,14 @@ export abstract class PokemonSpeciesForm {
|
||||
getBaseExp(): number {
|
||||
let ret = this.baseExp;
|
||||
switch (this.getFormSpriteKey()) {
|
||||
case SpeciesFormKey.MEGA:
|
||||
case SpeciesFormKey.MEGA_X:
|
||||
case SpeciesFormKey.MEGA_Y:
|
||||
case SpeciesFormKey.PRIMAL:
|
||||
case SpeciesFormKey.GIGANTAMAX:
|
||||
case SpeciesFormKey.ETERNAMAX:
|
||||
ret *= 1.5;
|
||||
break;
|
||||
case SpeciesFormKey.MEGA:
|
||||
case SpeciesFormKey.MEGA_X:
|
||||
case SpeciesFormKey.MEGA_Y:
|
||||
case SpeciesFormKey.PRIMAL:
|
||||
case SpeciesFormKey.GIGANTAMAX:
|
||||
case SpeciesFormKey.ETERNAMAX:
|
||||
ret *= 1.5;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -346,29 +346,29 @@ export abstract class PokemonSpeciesForm {
|
||||
}
|
||||
|
||||
switch (this.speciesId) {
|
||||
case Species.HIPPOPOTAS:
|
||||
case Species.HIPPOWDON:
|
||||
case Species.UNFEZANT:
|
||||
case Species.FRILLISH:
|
||||
case Species.JELLICENT:
|
||||
case Species.PYROAR:
|
||||
ret += female ? "-f" : "";
|
||||
break;
|
||||
case Species.HIPPOPOTAS:
|
||||
case Species.HIPPOWDON:
|
||||
case Species.UNFEZANT:
|
||||
case Species.FRILLISH:
|
||||
case Species.JELLICENT:
|
||||
case Species.PYROAR:
|
||||
ret += female ? "-f" : "";
|
||||
break;
|
||||
}
|
||||
|
||||
let formSpriteKey = this.getFormSpriteKey(formIndex);
|
||||
if (formSpriteKey) {
|
||||
switch (this.speciesId) {
|
||||
case Species.DUDUNSPARCE:
|
||||
break;
|
||||
case Species.ZACIAN:
|
||||
case Species.ZAMAZENTA:
|
||||
if (formSpriteKey.startsWith("behemoth")) {
|
||||
formSpriteKey = "crowned";
|
||||
}
|
||||
default:
|
||||
ret += `-${formSpriteKey}`;
|
||||
break;
|
||||
case Species.DUDUNSPARCE:
|
||||
break;
|
||||
case Species.ZACIAN:
|
||||
case Species.ZAMAZENTA:
|
||||
if (formSpriteKey.startsWith("behemoth")) {
|
||||
formSpriteKey = "crowned";
|
||||
}
|
||||
default:
|
||||
ret += `-${formSpriteKey}`;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -383,15 +383,15 @@ export abstract class PokemonSpeciesForm {
|
||||
let speciesId = this.speciesId;
|
||||
if (this.speciesId > 2000) {
|
||||
switch (this.speciesId) {
|
||||
case Species.GALAR_SLOWPOKE:
|
||||
break;
|
||||
case Species.ETERNAL_FLOETTE:
|
||||
break;
|
||||
case Species.BLOODMOON_URSALUNA:
|
||||
break;
|
||||
default:
|
||||
speciesId = speciesId % 2000;
|
||||
break;
|
||||
case Species.GALAR_SLOWPOKE:
|
||||
break;
|
||||
case Species.ETERNAL_FLOETTE:
|
||||
break;
|
||||
case Species.BLOODMOON_URSALUNA:
|
||||
break;
|
||||
default:
|
||||
speciesId = speciesId % 2000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let ret = speciesId.toString();
|
||||
@ -403,43 +403,44 @@ export abstract class PokemonSpeciesForm {
|
||||
}
|
||||
const formKey = forms[formIndex || 0].formKey;
|
||||
switch (formKey) {
|
||||
case SpeciesFormKey.MEGA:
|
||||
case SpeciesFormKey.MEGA_X:
|
||||
case SpeciesFormKey.MEGA_Y:
|
||||
case SpeciesFormKey.GIGANTAMAX:
|
||||
case SpeciesFormKey.GIGANTAMAX_SINGLE:
|
||||
case SpeciesFormKey.GIGANTAMAX_RAPID:
|
||||
case "white":
|
||||
case "black":
|
||||
case "therian":
|
||||
case "sky":
|
||||
case "gorging":
|
||||
case "gulping":
|
||||
case "no-ice":
|
||||
case "hangry":
|
||||
case "crowned":
|
||||
case "eternamax":
|
||||
case "four":
|
||||
case "droopy":
|
||||
case "stretchy":
|
||||
case "hero":
|
||||
case "roaming":
|
||||
case "complete":
|
||||
case "10":
|
||||
case "10-pc":
|
||||
case "super":
|
||||
case "unbound":
|
||||
case "pau":
|
||||
case "pompom":
|
||||
case "sensu":
|
||||
case "dusk":
|
||||
case "midnight":
|
||||
case "school":
|
||||
case "dawn-wings":
|
||||
case "dusk-mane":
|
||||
case "ultra":
|
||||
ret += `-${formKey}`;
|
||||
break;
|
||||
case SpeciesFormKey.MEGA:
|
||||
case SpeciesFormKey.MEGA_X:
|
||||
case SpeciesFormKey.MEGA_Y:
|
||||
case SpeciesFormKey.GIGANTAMAX:
|
||||
case SpeciesFormKey.GIGANTAMAX_SINGLE:
|
||||
case SpeciesFormKey.GIGANTAMAX_RAPID:
|
||||
case "white":
|
||||
case "black":
|
||||
case "therian":
|
||||
case "sky":
|
||||
case "gorging":
|
||||
case "gulping":
|
||||
case "no-ice":
|
||||
case "hangry":
|
||||
case "crowned":
|
||||
case "eternamax":
|
||||
case "four":
|
||||
case "droopy":
|
||||
case "stretchy":
|
||||
case "hero":
|
||||
case "roaming":
|
||||
case "complete":
|
||||
case "10-complete":
|
||||
case "10":
|
||||
case "10-pc":
|
||||
case "super":
|
||||
case "unbound":
|
||||
case "pau":
|
||||
case "pompom":
|
||||
case "sensu":
|
||||
case "dusk":
|
||||
case "midnight":
|
||||
case "school":
|
||||
case "dawn-wings":
|
||||
case "dusk-mane":
|
||||
case "ultra":
|
||||
ret += `-${formKey}`;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@ -635,19 +636,19 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
|
||||
const form = this.forms[formIndex];
|
||||
let key: string | null;
|
||||
switch (form.formKey) {
|
||||
case SpeciesFormKey.MEGA:
|
||||
case SpeciesFormKey.PRIMAL:
|
||||
case SpeciesFormKey.ETERNAMAX:
|
||||
case SpeciesFormKey.MEGA_X:
|
||||
case SpeciesFormKey.MEGA_Y:
|
||||
key = form.formKey;
|
||||
break;
|
||||
default:
|
||||
if (form.formKey.indexOf(SpeciesFormKey.GIGANTAMAX) > -1) {
|
||||
key = "gigantamax";
|
||||
} else {
|
||||
key = null;
|
||||
}
|
||||
case SpeciesFormKey.MEGA:
|
||||
case SpeciesFormKey.PRIMAL:
|
||||
case SpeciesFormKey.ETERNAMAX:
|
||||
case SpeciesFormKey.MEGA_X:
|
||||
case SpeciesFormKey.MEGA_Y:
|
||||
key = form.formKey;
|
||||
break;
|
||||
default:
|
||||
if (form.formKey.indexOf(SpeciesFormKey.GIGANTAMAX) > -1) {
|
||||
key = "gigantamax";
|
||||
} else {
|
||||
key = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (key) {
|
||||
@ -689,18 +690,18 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
|
||||
*/
|
||||
private getStrengthLevelDiff(strength: PartyMemberStrength): integer {
|
||||
switch (Math.min(strength, PartyMemberStrength.STRONGER)) {
|
||||
case PartyMemberStrength.WEAKEST:
|
||||
return 60;
|
||||
case PartyMemberStrength.WEAKER:
|
||||
return 40;
|
||||
case PartyMemberStrength.WEAK:
|
||||
return 20;
|
||||
case PartyMemberStrength.AVERAGE:
|
||||
return 8;
|
||||
case PartyMemberStrength.STRONG:
|
||||
return 4;
|
||||
default:
|
||||
return 0;
|
||||
case PartyMemberStrength.WEAKEST:
|
||||
return 60;
|
||||
case PartyMemberStrength.WEAKER:
|
||||
return 40;
|
||||
case PartyMemberStrength.WEAK:
|
||||
return 20;
|
||||
case PartyMemberStrength.AVERAGE:
|
||||
return 8;
|
||||
case PartyMemberStrength.STRONG:
|
||||
return 4;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -975,7 +976,7 @@ export function initSpecies() {
|
||||
new PokemonSpecies(Species.VENUSAUR, 1, false, false, false, "Seed Pokémon", Type.GRASS, Type.POISON, 2, 100, Abilities.OVERGROW, Abilities.NONE, Abilities.CHLOROPHYLL, 525, 80, 82, 83, 100, 100, 80, 45, 50, 263, GrowthRate.MEDIUM_SLOW, 87.5, true, true,
|
||||
new PokemonForm("Normal", "", Type.GRASS, Type.POISON, 2, 100, Abilities.OVERGROW, Abilities.NONE, Abilities.CHLOROPHYLL, 525, 80, 82, 83, 100, 100, 80, 45, 50, 263, true, null, true),
|
||||
new PokemonForm("Mega", SpeciesFormKey.MEGA, Type.GRASS, Type.POISON, 2.4, 155.5, Abilities.THICK_FAT, Abilities.THICK_FAT, Abilities.THICK_FAT, 625, 80, 100, 123, 122, 120, 80, 45, 50, 263, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.GRASS, Type.POISON, 24, 999.9, Abilities.EFFECT_SPORE, Abilities.EFFECT_SPORE, Abilities.EFFECT_SPORE, 625, 120, 82, 98, 130, 115, 80, 45, 50, 263, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.GRASS, Type.POISON, 24, 999.9, Abilities.EFFECT_SPORE, Abilities.NONE, Abilities.EFFECT_SPORE, 625, 120, 82, 98, 130, 115, 80, 45, 50, 263, true),
|
||||
),
|
||||
new PokemonSpecies(Species.CHARMANDER, 1, false, false, false, "Lizard Pokémon", Type.FIRE, null, 0.6, 8.5, Abilities.BLAZE, Abilities.NONE, Abilities.SOLAR_POWER, 309, 39, 52, 43, 60, 50, 65, 45, 50, 62, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.CHARMELEON, 1, false, false, false, "Flame Pokémon", Type.FIRE, null, 1.1, 19, Abilities.BLAZE, Abilities.NONE, Abilities.SOLAR_POWER, 405, 58, 64, 58, 80, 65, 80, 45, 50, 142, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
@ -983,20 +984,20 @@ export function initSpecies() {
|
||||
new PokemonForm("Normal", "", Type.FIRE, Type.FLYING, 1.7, 90.5, Abilities.BLAZE, Abilities.NONE, Abilities.SOLAR_POWER, 534, 78, 84, 78, 109, 85, 100, 45, 50, 267, false, null, true),
|
||||
new PokemonForm("Mega X", SpeciesFormKey.MEGA_X, Type.FIRE, Type.DRAGON, 1.7, 110.5, Abilities.TOUGH_CLAWS, Abilities.NONE, Abilities.TOUGH_CLAWS, 634, 78, 130, 111, 130, 85, 100, 45, 50, 267),
|
||||
new PokemonForm("Mega Y", SpeciesFormKey.MEGA_Y, Type.FIRE, Type.FLYING, 1.7, 100.5, Abilities.DROUGHT, Abilities.NONE, Abilities.DROUGHT, 634, 78, 104, 78, 159, 115, 100, 45, 50, 267),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.FIRE, Type.FLYING, 28, 999.9, Abilities.BERSERK, Abilities.BERSERK, Abilities.BERSERK, 634, 118, 84, 93, 139, 110, 100, 45, 50, 267),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.FIRE, Type.FLYING, 28, 999.9, Abilities.BERSERK, Abilities.NONE, Abilities.BERSERK, 634, 118, 84, 93, 139, 100, 100, 45, 50, 267),
|
||||
),
|
||||
new PokemonSpecies(Species.SQUIRTLE, 1, false, false, false, "Tiny Turtle Pokémon", Type.WATER, null, 0.5, 9, Abilities.TORRENT, Abilities.NONE, Abilities.RAIN_DISH, 314, 44, 48, 65, 50, 64, 43, 45, 50, 63, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.WARTORTLE, 1, false, false, false, "Turtle Pokémon", Type.WATER, null, 1, 22.5, Abilities.TORRENT, Abilities.NONE, Abilities.RAIN_DISH, 405, 59, 63, 80, 65, 80, 58, 45, 50, 142, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.BLASTOISE, 1, false, false, false, "Shellfish Pokémon", Type.WATER, null, 1.6, 85.5, Abilities.TORRENT, Abilities.NONE, Abilities.RAIN_DISH, 530, 79, 83, 100, 85, 105, 78, 45, 50, 265, GrowthRate.MEDIUM_SLOW, 87.5, false, true,
|
||||
new PokemonForm("Normal", "", Type.WATER, null, 1.6, 85.5, Abilities.TORRENT, Abilities.NONE, Abilities.RAIN_DISH, 530, 79, 83, 100, 85, 105, 78, 45, 50, 265, false, null, true),
|
||||
new PokemonForm("Mega", SpeciesFormKey.MEGA, Type.WATER, null, 1.6, 101.1, Abilities.MEGA_LAUNCHER, Abilities.NONE, Abilities.MEGA_LAUNCHER, 630, 79, 103, 120, 135, 115, 78, 45, 50, 265),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.WATER, Type.STEEL, 25, 999.9, Abilities.SHELL_ARMOR, Abilities.SHELL_ARMOR, Abilities.SHELL_ARMOR, 630, 119, 83, 135, 115, 110, 68, 45, 50, 265),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.WATER, Type.STEEL, 25, 999.9, Abilities.SHELL_ARMOR, Abilities.NONE, Abilities.SHELL_ARMOR, 630, 119, 83, 135, 115, 110, 68, 45, 50, 265),
|
||||
),
|
||||
new PokemonSpecies(Species.CATERPIE, 1, false, false, false, "Worm Pokémon", Type.BUG, null, 0.3, 2.9, Abilities.SHIELD_DUST, Abilities.NONE, Abilities.RUN_AWAY, 195, 45, 30, 35, 20, 20, 45, 255, 50, 39, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.METAPOD, 1, false, false, false, "Cocoon Pokémon", Type.BUG, null, 0.7, 9.9, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 50, 20, 55, 25, 25, 30, 120, 50, 72, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.BUTTERFREE, 1, false, false, false, "Butterfly Pokémon", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, GrowthRate.MEDIUM_FAST, 50, true, true,
|
||||
new PokemonForm("Normal", "", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, true, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 999.9, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 999.9, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.COMPOUND_EYES, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true),
|
||||
),
|
||||
new PokemonSpecies(Species.WEEDLE, 1, false, false, false, "Hairy Bug Pokémon", Type.BUG, Type.POISON, 0.3, 3.2, Abilities.SHIELD_DUST, Abilities.NONE, Abilities.RUN_AWAY, 195, 40, 35, 30, 20, 20, 50, 255, 70, 39, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.KAKUNA, 1, false, false, false, "Cocoon Pokémon", Type.BUG, Type.POISON, 0.6, 10, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 45, 25, 50, 25, 25, 35, 120, 70, 72, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
@ -1025,7 +1026,7 @@ export function initSpecies() {
|
||||
new PokemonForm("Cute Cosplay", "cute-cosplay", Type.ELECTRIC, null, 0.4, 6, Abilities.STATIC, Abilities.NONE, Abilities.LIGHTNING_ROD, 430, 45, 80, 50, 75, 60, 120, 190, 50, 112, true, null, true), //Custom
|
||||
new PokemonForm("Smart Cosplay", "smart-cosplay", Type.ELECTRIC, null, 0.4, 6, Abilities.STATIC, Abilities.NONE, Abilities.LIGHTNING_ROD, 430, 45, 80, 50, 75, 60, 120, 190, 50, 112, true, null, true), //Custom
|
||||
new PokemonForm("Tough Cosplay", "tough-cosplay", Type.ELECTRIC, null, 0.4, 6, Abilities.STATIC, Abilities.NONE, Abilities.LIGHTNING_ROD, 430, 45, 80, 50, 75, 60, 120, 190, 50, 112, true, null, true), //Custom
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.ELECTRIC, null, 21, 999.9, Abilities.LIGHTNING_ROD, Abilities.LIGHTNING_ROD, Abilities.LIGHTNING_ROD, 530, 125, 95, 60, 90, 70, 90, 190, 50, 112), //+100 BST from Partner Form
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.ELECTRIC, null, 21, 999.9, Abilities.LIGHTNING_ROD, Abilities.NONE, Abilities.LIGHTNING_ROD, 530, 125, 95, 60, 90, 70, 90, 190, 50, 112), //+100 BST from Partner Form
|
||||
),
|
||||
new PokemonSpecies(Species.RAICHU, 1, false, false, false, "Mouse Pokémon", Type.ELECTRIC, null, 0.8, 30, Abilities.STATIC, Abilities.NONE, Abilities.LIGHTNING_ROD, 485, 60, 90, 55, 90, 80, 110, 75, 50, 243, GrowthRate.MEDIUM_FAST, 50, true),
|
||||
new PokemonSpecies(Species.SANDSHREW, 1, false, false, false, "Mouse Pokémon", Type.GROUND, null, 0.6, 12, Abilities.SAND_VEIL, Abilities.NONE, Abilities.SAND_RUSH, 300, 50, 75, 85, 20, 30, 40, 255, 50, 60, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
@ -1110,7 +1111,7 @@ export function initSpecies() {
|
||||
new PokemonSpecies(Species.GENGAR, 1, false, false, false, "Shadow Pokémon", Type.GHOST, Type.POISON, 1.5, 40.5, Abilities.CURSED_BODY, Abilities.NONE, Abilities.NONE, 500, 60, 65, 60, 130, 75, 110, 45, 50, 250, GrowthRate.MEDIUM_SLOW, 50, false, true,
|
||||
new PokemonForm("Normal", "", Type.GHOST, Type.POISON, 1.5, 40.5, Abilities.CURSED_BODY, Abilities.NONE, Abilities.NONE, 500, 60, 65, 60, 130, 75, 110, 45, 50, 250, false, null, true),
|
||||
new PokemonForm("Mega", SpeciesFormKey.MEGA, Type.GHOST, Type.POISON, 1.4, 40.5, Abilities.SHADOW_TAG, Abilities.NONE, Abilities.NONE, 600, 60, 65, 80, 170, 95, 130, 45, 50, 250),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.GHOST, Type.POISON, 20, 999.9, Abilities.CURSED_BODY, Abilities.CURSED_BODY, Abilities.CURSED_BODY, 600, 140, 65, 70, 140, 85, 100, 45, 50, 250),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.GHOST, Type.POISON, 20, 999.9, Abilities.CURSED_BODY, Abilities.NONE, Abilities.NONE, 600, 140, 65, 70, 140, 85, 100, 45, 50, 250),
|
||||
),
|
||||
new PokemonSpecies(Species.ONIX, 1, false, false, false, "Rock Snake Pokémon", Type.ROCK, Type.GROUND, 8.8, 210, Abilities.ROCK_HEAD, Abilities.STURDY, Abilities.WEAK_ARMOR, 385, 35, 45, 160, 30, 45, 70, 45, 50, 77, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.DROWZEE, 1, false, false, false, "Hypnosis Pokémon", Type.PSYCHIC, null, 1, 32.4, Abilities.INSOMNIA, Abilities.FOREWARN, Abilities.INNER_FOCUS, 328, 60, 48, 45, 43, 90, 42, 190, 70, 66, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
@ -1118,7 +1119,7 @@ export function initSpecies() {
|
||||
new PokemonSpecies(Species.KRABBY, 1, false, false, false, "River Crab Pokémon", Type.WATER, null, 0.4, 6.5, Abilities.HYPER_CUTTER, Abilities.SHELL_ARMOR, Abilities.SHEER_FORCE, 325, 30, 105, 90, 25, 25, 50, 225, 50, 65, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.KINGLER, 1, false, false, false, "Pincer Pokémon", Type.WATER, null, 1.3, 60, Abilities.HYPER_CUTTER, Abilities.SHELL_ARMOR, Abilities.SHEER_FORCE, 475, 55, 130, 115, 50, 50, 75, 60, 50, 166, GrowthRate.MEDIUM_FAST, 50, false, true,
|
||||
new PokemonForm("Normal", "", Type.WATER, null, 1.3, 60, Abilities.HYPER_CUTTER, Abilities.SHELL_ARMOR, Abilities.SHEER_FORCE, 475, 55, 130, 115, 50, 50, 75, 60, 50, 166, false, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.WATER, null, 19, 999.9, Abilities.TOUGH_CLAWS, Abilities.TOUGH_CLAWS, Abilities.TOUGH_CLAWS, 575, 90, 155, 140, 50, 80, 70, 60, 50, 166),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.WATER, null, 19, 999.9, Abilities.TOUGH_CLAWS, Abilities.TOUGH_CLAWS, Abilities.TOUGH_CLAWS, 575, 90, 155, 140, 50, 70, 70, 60, 50, 166),
|
||||
),
|
||||
new PokemonSpecies(Species.VOLTORB, 1, false, false, false, "Ball Pokémon", Type.ELECTRIC, null, 0.5, 10.4, Abilities.SOUNDPROOF, Abilities.STATIC, Abilities.AFTERMATH, 330, 40, 30, 50, 55, 55, 100, 190, 70, 66, GrowthRate.MEDIUM_FAST, null, false),
|
||||
new PokemonSpecies(Species.ELECTRODE, 1, false, false, false, "Ball Pokémon", Type.ELECTRIC, null, 1.2, 66.6, Abilities.SOUNDPROOF, Abilities.STATIC, Abilities.AFTERMATH, 490, 60, 50, 70, 80, 80, 150, 60, 70, 172, GrowthRate.MEDIUM_FAST, null, false),
|
||||
@ -2135,7 +2136,8 @@ export function initSpecies() {
|
||||
new PokemonForm("10% Forme", "10", Type.DRAGON, Type.GROUND, 1.2, 33.5, Abilities.AURA_BREAK, Abilities.NONE, Abilities.NONE, 486, 54, 100, 71, 61, 85, 115, 3, 0, 300, false, null, true),
|
||||
new PokemonForm("50% Forme Power Construct", "50-pc", Type.DRAGON, Type.GROUND, 5, 305, Abilities.POWER_CONSTRUCT, Abilities.NONE, Abilities.NONE, 600, 108, 100, 121, 81, 95, 95, 3, 0, 300, false, "", true),
|
||||
new PokemonForm("10% Forme Power Construct", "10-pc", Type.DRAGON, Type.GROUND, 1.2, 33.5, Abilities.POWER_CONSTRUCT, Abilities.NONE, Abilities.NONE, 486, 54, 100, 71, 61, 85, 115, 3, 0, 300, false, "10", true),
|
||||
new PokemonForm("Complete Forme", "complete", Type.DRAGON, Type.GROUND, 4.5, 610, Abilities.POWER_CONSTRUCT, Abilities.NONE, Abilities.NONE, 708, 216, 100, 121, 91, 95, 85, 3, 0, 300),
|
||||
new PokemonForm("Complete Forme (50% PC)", "complete", Type.DRAGON, Type.GROUND, 4.5, 610, Abilities.POWER_CONSTRUCT, Abilities.NONE, Abilities.NONE, 708, 216, 100, 121, 91, 95, 85, 3, 0, 300),
|
||||
new PokemonForm("Complete Forme (10% PC)", "10-complete", Type.DRAGON, Type.GROUND, 4.5, 610, Abilities.POWER_CONSTRUCT, Abilities.NONE, Abilities.NONE, 708, 216, 100, 121, 91, 95, 85, 3, 0, 300, false, "complete"),
|
||||
),
|
||||
new PokemonSpecies(Species.DIANCIE, 6, false, false, true, "Jewel Pokémon", Type.ROCK, Type.FAIRY, 0.7, 8.8, Abilities.CLEAR_BODY, Abilities.NONE, Abilities.NONE, 600, 50, 100, 150, 100, 150, 50, 3, 50, 300, GrowthRate.SLOW, null, false, true,
|
||||
new PokemonForm("Normal", "", Type.ROCK, Type.FAIRY, 0.7, 8.8, Abilities.CLEAR_BODY, Abilities.NONE, Abilities.NONE, 600, 50, 100, 150, 100, 150, 50, 3, 50, 300, false, null, true),
|
||||
@ -2298,25 +2300,25 @@ export function initSpecies() {
|
||||
new PokemonSpecies(Species.MELTAN, 7, false, false, true, "Hex Nut Pokémon", Type.STEEL, null, 0.2, 8, Abilities.MAGNET_PULL, Abilities.NONE, Abilities.NONE, 300, 46, 65, 65, 55, 35, 34, 3, 0, 150, GrowthRate.SLOW, null, false),
|
||||
new PokemonSpecies(Species.MELMETAL, 7, false, false, true, "Hex Nut Pokémon", Type.STEEL, null, 2.5, 800, Abilities.IRON_FIST, Abilities.NONE, Abilities.NONE, 600, 135, 143, 143, 80, 65, 34, 3, 0, 300, GrowthRate.SLOW, null, false, true,
|
||||
new PokemonForm("Normal", "", Type.STEEL, null, 2.5, 800, Abilities.IRON_FIST, Abilities.NONE, Abilities.NONE, 600, 135, 143, 143, 80, 65, 34, 3, 0, 300, false, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.STEEL, null, 25, 999.9, Abilities.IRON_FIST, Abilities.IRON_FIST, Abilities.IRON_FIST, 700, 175, 165, 155, 85, 75, 45, 3, 0, 300),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.STEEL, null, 25, 999.9, Abilities.IRON_FIST, Abilities.NONE, Abilities.NONE, 700, 175, 165, 155, 85, 75, 45, 3, 0, 300),
|
||||
),
|
||||
new PokemonSpecies(Species.GROOKEY, 8, false, false, false, "Chimp Pokémon", Type.GRASS, null, 0.3, 5, Abilities.OVERGROW, Abilities.NONE, Abilities.GRASSY_SURGE, 310, 50, 65, 50, 40, 40, 65, 45, 50, 62, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.THWACKEY, 8, false, false, false, "Beat Pokémon", Type.GRASS, null, 0.7, 14, Abilities.OVERGROW, Abilities.NONE, Abilities.GRASSY_SURGE, 420, 70, 85, 70, 55, 60, 80, 45, 50, 147, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.RILLABOOM, 8, false, false, false, "Drummer Pokémon", Type.GRASS, null, 2.1, 90, Abilities.OVERGROW, Abilities.NONE, Abilities.GRASSY_SURGE, 530, 100, 125, 90, 60, 70, 85, 45, 50, 265, GrowthRate.MEDIUM_SLOW, 87.5, false, true,
|
||||
new PokemonForm("Normal", "", Type.GRASS, null, 2.1, 90, Abilities.OVERGROW, Abilities.NONE, Abilities.GRASSY_SURGE, 530, 100, 125, 90, 60, 70, 85, 45, 50, 265, false, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.GRASS, null, 28, 999.9, Abilities.GRASSY_SURGE, Abilities.GRASSY_SURGE, Abilities.GRASSY_SURGE, 630, 125, 150, 105, 85, 85, 80, 45, 50, 265),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.GRASS, null, 28, 999.9, Abilities.GRASSY_SURGE, Abilities.NONE, Abilities.GRASSY_SURGE, 630, 125, 150, 105, 85, 85, 80, 45, 50, 265),
|
||||
),
|
||||
new PokemonSpecies(Species.SCORBUNNY, 8, false, false, false, "Rabbit Pokémon", Type.FIRE, null, 0.3, 4.5, Abilities.BLAZE, Abilities.NONE, Abilities.LIBERO, 310, 50, 71, 40, 40, 40, 69, 45, 50, 62, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.RABOOT, 8, false, false, false, "Rabbit Pokémon", Type.FIRE, null, 0.6, 9, Abilities.BLAZE, Abilities.NONE, Abilities.LIBERO, 420, 65, 86, 60, 55, 60, 94, 45, 50, 147, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.CINDERACE, 8, false, false, false, "Striker Pokémon", Type.FIRE, null, 1.4, 33, Abilities.BLAZE, Abilities.NONE, Abilities.LIBERO, 530, 80, 116, 75, 65, 75, 119, 45, 50, 265, GrowthRate.MEDIUM_SLOW, 87.5, false, true,
|
||||
new PokemonForm("Normal", "", Type.FIRE, null, 1.4, 33, Abilities.BLAZE, Abilities.NONE, Abilities.LIBERO, 530, 80, 116, 75, 65, 75, 119, 45, 50, 265, false, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.FIRE, null, 27, 999.9, Abilities.LIBERO, Abilities.LIBERO, Abilities.LIBERO, 630, 100, 146, 80, 90, 80, 134, 45, 50, 265),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.FIRE, null, 27, 999.9, Abilities.LIBERO, Abilities.NONE, Abilities.LIBERO, 630, 100, 146, 80, 90, 80, 134, 45, 50, 265),
|
||||
),
|
||||
new PokemonSpecies(Species.SOBBLE, 8, false, false, false, "Water Lizard Pokémon", Type.WATER, null, 0.3, 4, Abilities.TORRENT, Abilities.NONE, Abilities.SNIPER, 310, 50, 40, 40, 70, 40, 70, 45, 50, 62, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.DRIZZILE, 8, false, false, false, "Water Lizard Pokémon", Type.WATER, null, 0.7, 11.5, Abilities.TORRENT, Abilities.NONE, Abilities.SNIPER, 420, 65, 60, 55, 95, 55, 90, 45, 50, 147, GrowthRate.MEDIUM_SLOW, 87.5, false),
|
||||
new PokemonSpecies(Species.INTELEON, 8, false, false, false, "Secret Agent Pokémon", Type.WATER, null, 1.9, 45.2, Abilities.TORRENT, Abilities.NONE, Abilities.SNIPER, 530, 70, 85, 65, 125, 65, 120, 45, 50, 265, GrowthRate.MEDIUM_SLOW, 87.5, false, true,
|
||||
new PokemonForm("Normal", "", Type.WATER, null, 1.9, 45.2, Abilities.TORRENT, Abilities.NONE, Abilities.SNIPER, 530, 70, 85, 65, 125, 65, 120, 45, 50, 265, false, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.WATER, null, 40, 999.9, Abilities.SNIPER, Abilities.SNIPER, Abilities.SNIPER, 630, 95, 97, 77, 147, 77, 137, 45, 50, 265),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.WATER, null, 40, 999.9, Abilities.SNIPER, Abilities.NONE, Abilities.SNIPER, 630, 95, 97, 77, 147, 77, 137, 45, 50, 265),
|
||||
),
|
||||
new PokemonSpecies(Species.SKWOVET, 8, false, false, false, "Cheeky Pokémon", Type.NORMAL, null, 0.3, 2.5, Abilities.CHEEK_POUCH, Abilities.NONE, Abilities.GLUTTONY, 275, 70, 55, 55, 35, 35, 25, 255, 50, 55, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.GREEDENT, 8, false, false, false, "Greedy Pokémon", Type.NORMAL, null, 0.6, 6, Abilities.CHEEK_POUCH, Abilities.NONE, Abilities.GLUTTONY, 460, 120, 95, 95, 55, 75, 20, 90, 50, 161, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
@ -2422,7 +2424,7 @@ export function initSpecies() {
|
||||
new PokemonForm("Ruby Swirl", "ruby-swirl", Type.FAIRY, null, 0.3, 0.5, Abilities.SWEET_VEIL, Abilities.NONE, Abilities.AROMA_VEIL, 495, 65, 60, 75, 110, 121, 64, 100, 50, 173, false, null, true),
|
||||
new PokemonForm("Caramel Swirl", "caramel-swirl", Type.FAIRY, null, 0.3, 0.5, Abilities.SWEET_VEIL, Abilities.NONE, Abilities.AROMA_VEIL, 495, 65, 60, 75, 110, 121, 64, 100, 50, 173, false, null, true),
|
||||
new PokemonForm("Rainbow Swirl", "rainbow-swirl", Type.FAIRY, null, 0.3, 0.5, Abilities.SWEET_VEIL, Abilities.NONE, Abilities.AROMA_VEIL, 495, 65, 60, 75, 110, 121, 64, 100, 50, 173, false, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.FAIRY, null, 30, 999.9, Abilities.MISTY_SURGE, Abilities.MISTY_SURGE, Abilities.MISTY_SURGE, 595, 135, 60, 75, 130, 131, 64, 100, 50, 173),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.FAIRY, null, 30, 999.9, Abilities.MISTY_SURGE, Abilities.NONE, Abilities.MISTY_SURGE, 595, 135, 60, 75, 130, 131, 64, 100, 50, 173),
|
||||
),
|
||||
new PokemonSpecies(Species.FALINKS, 8, false, false, false, "Formation Pokémon", Type.FIGHTING, null, 3, 62, Abilities.BATTLE_ARMOR, Abilities.NONE, Abilities.DEFIANT, 470, 65, 100, 100, 70, 60, 75, 45, 50, 165, GrowthRate.MEDIUM_FAST, null, false),
|
||||
new PokemonSpecies(Species.PINCURCHIN, 8, false, false, false, "Sea Urchin Pokémon", Type.ELECTRIC, null, 0.3, 1, Abilities.LIGHTNING_ROD, Abilities.NONE, Abilities.ELECTRIC_SURGE, 435, 48, 101, 95, 91, 85, 15, 75, 50, 152, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
@ -2444,7 +2446,7 @@ export function initSpecies() {
|
||||
new PokemonSpecies(Species.CUFANT, 8, false, false, false, "Copperderm Pokémon", Type.STEEL, null, 1.2, 100, Abilities.SHEER_FORCE, Abilities.NONE, Abilities.HEAVY_METAL, 330, 72, 80, 49, 40, 49, 40, 190, 50, 66, GrowthRate.MEDIUM_FAST, 50, false),
|
||||
new PokemonSpecies(Species.COPPERAJAH, 8, false, false, false, "Copperderm Pokémon", Type.STEEL, null, 3, 650, Abilities.SHEER_FORCE, Abilities.NONE, Abilities.HEAVY_METAL, 500, 122, 130, 69, 80, 69, 30, 90, 50, 175, GrowthRate.MEDIUM_FAST, 50, false, true,
|
||||
new PokemonForm("Normal", "", Type.STEEL, null, 3, 650, Abilities.SHEER_FORCE, Abilities.NONE, Abilities.HEAVY_METAL, 500, 122, 130, 69, 80, 69, 30, 90, 50, 175, false, null, true),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.STEEL, Type.GROUND, 23, 999.9, Abilities.MOLD_BREAKER, Abilities.MOLD_BREAKER, Abilities.MOLD_BREAKER, 600, 167, 155, 89, 80, 89, 20, 90, 50, 175),
|
||||
new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.STEEL, Type.GROUND, 23, 999.9, Abilities.MOLD_BREAKER, Abilities.NONE, Abilities.MOLD_BREAKER, 600, 167, 155, 89, 80, 89, 20, 90, 50, 175),
|
||||
),
|
||||
new PokemonSpecies(Species.DRACOZOLT, 8, false, false, false, "Fossil Pokémon", Type.ELECTRIC, Type.DRAGON, 1.8, 190, Abilities.VOLT_ABSORB, Abilities.HUSTLE, Abilities.SAND_RUSH, 505, 90, 100, 90, 80, 70, 75, 45, 50, 177, GrowthRate.SLOW, null, false),
|
||||
new PokemonSpecies(Species.ARCTOZOLT, 8, false, false, false, "Fossil Pokémon", Type.ELECTRIC, Type.ICE, 2.3, 150, Abilities.VOLT_ABSORB, Abilities.STATIC, Abilities.SLUSH_RUSH, 505, 90, 100, 90, 90, 80, 55, 45, 50, 177, GrowthRate.SLOW, null, false),
|
||||
|
@ -26,20 +26,20 @@ export class Status {
|
||||
|
||||
function getStatusEffectMessageKey(statusEffect: StatusEffect | undefined): string {
|
||||
switch (statusEffect) {
|
||||
case StatusEffect.POISON:
|
||||
return "statusEffect:poison";
|
||||
case StatusEffect.TOXIC:
|
||||
return "statusEffect:toxic";
|
||||
case StatusEffect.PARALYSIS:
|
||||
return "statusEffect:paralysis";
|
||||
case StatusEffect.SLEEP:
|
||||
return "statusEffect:sleep";
|
||||
case StatusEffect.FREEZE:
|
||||
return "statusEffect:freeze";
|
||||
case StatusEffect.BURN:
|
||||
return "statusEffect:burn";
|
||||
default:
|
||||
return "statusEffect:none";
|
||||
case StatusEffect.POISON:
|
||||
return "statusEffect:poison";
|
||||
case StatusEffect.TOXIC:
|
||||
return "statusEffect:toxic";
|
||||
case StatusEffect.PARALYSIS:
|
||||
return "statusEffect:paralysis";
|
||||
case StatusEffect.SLEEP:
|
||||
return "statusEffect:sleep";
|
||||
case StatusEffect.FREEZE:
|
||||
return "statusEffect:freeze";
|
||||
case StatusEffect.BURN:
|
||||
return "statusEffect:burn";
|
||||
default:
|
||||
return "statusEffect:none";
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,14 +90,14 @@ export function getStatusEffectDescriptor(statusEffect: StatusEffect): string {
|
||||
|
||||
export function getStatusEffectCatchRateMultiplier(statusEffect: StatusEffect): number {
|
||||
switch (statusEffect) {
|
||||
case StatusEffect.POISON:
|
||||
case StatusEffect.TOXIC:
|
||||
case StatusEffect.PARALYSIS:
|
||||
case StatusEffect.BURN:
|
||||
return 1.5;
|
||||
case StatusEffect.SLEEP:
|
||||
case StatusEffect.FREEZE:
|
||||
return 2.5;
|
||||
case StatusEffect.POISON:
|
||||
case StatusEffect.TOXIC:
|
||||
case StatusEffect.PARALYSIS:
|
||||
case StatusEffect.BURN:
|
||||
return 1.5;
|
||||
case StatusEffect.SLEEP:
|
||||
case StatusEffect.FREEZE:
|
||||
return 2.5;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -34,21 +34,21 @@ export class Terrain {
|
||||
|
||||
getAttackTypeMultiplier(attackType: Type): number {
|
||||
switch (this.terrainType) {
|
||||
case TerrainType.ELECTRIC:
|
||||
if (attackType === Type.ELECTRIC) {
|
||||
return 1.3;
|
||||
}
|
||||
break;
|
||||
case TerrainType.GRASSY:
|
||||
if (attackType === Type.GRASS) {
|
||||
return 1.3;
|
||||
}
|
||||
break;
|
||||
case TerrainType.PSYCHIC:
|
||||
if (attackType === Type.PSYCHIC) {
|
||||
return 1.3;
|
||||
}
|
||||
break;
|
||||
case TerrainType.ELECTRIC:
|
||||
if (attackType === Type.ELECTRIC) {
|
||||
return 1.3;
|
||||
}
|
||||
break;
|
||||
case TerrainType.GRASSY:
|
||||
if (attackType === Type.GRASS) {
|
||||
return 1.3;
|
||||
}
|
||||
break;
|
||||
case TerrainType.PSYCHIC:
|
||||
if (attackType === Type.PSYCHIC) {
|
||||
return 1.3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
@ -56,13 +56,13 @@ export class Terrain {
|
||||
|
||||
isMoveTerrainCancelled(user: Pokemon, targets: BattlerIndex[], move: Move): boolean {
|
||||
switch (this.terrainType) {
|
||||
case TerrainType.PSYCHIC:
|
||||
if (!move.hasAttr(ProtectAttr)) {
|
||||
const priority = new Utils.IntegerHolder(move.priority);
|
||||
applyAbAttrs(ChangeMovePriorityAbAttr, user, null, false, move, priority);
|
||||
// Cancels move if the move has positive priority and targets a Pokemon grounded on the Psychic Terrain
|
||||
return priority.value > 0 && user.getOpponents().some(o => targets.includes(o.getBattlerIndex()) && o.isGrounded());
|
||||
}
|
||||
case TerrainType.PSYCHIC:
|
||||
if (!move.hasAttr(ProtectAttr)) {
|
||||
const priority = new Utils.IntegerHolder(move.priority);
|
||||
applyAbAttrs(ChangeMovePriorityAbAttr, user, null, false, move, priority);
|
||||
// Cancels move if the move has positive priority and targets a Pokemon grounded on the Psychic Terrain
|
||||
return priority.value > 0 && user.getOpponents().some(o => targets.includes(o.getBattlerIndex()) && o.isGrounded());
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -71,14 +71,14 @@ export class Terrain {
|
||||
|
||||
export function getTerrainName(terrainType: TerrainType): string {
|
||||
switch (terrainType) {
|
||||
case TerrainType.MISTY:
|
||||
return i18next.t("terrain:misty");
|
||||
case TerrainType.ELECTRIC:
|
||||
return i18next.t("terrain:electric");
|
||||
case TerrainType.GRASSY:
|
||||
return i18next.t("terrain:grassy");
|
||||
case TerrainType.PSYCHIC:
|
||||
return i18next.t("terrain:psychic");
|
||||
case TerrainType.MISTY:
|
||||
return i18next.t("terrain:misty");
|
||||
case TerrainType.ELECTRIC:
|
||||
return i18next.t("terrain:electric");
|
||||
case TerrainType.GRASSY:
|
||||
return i18next.t("terrain:grassy");
|
||||
case TerrainType.PSYCHIC:
|
||||
return i18next.t("terrain:psychic");
|
||||
}
|
||||
|
||||
return "";
|
||||
@ -87,14 +87,14 @@ export function getTerrainName(terrainType: TerrainType): string {
|
||||
|
||||
export function getTerrainColor(terrainType: TerrainType): [ integer, integer, integer ] {
|
||||
switch (terrainType) {
|
||||
case TerrainType.MISTY:
|
||||
return [ 232, 136, 200 ];
|
||||
case TerrainType.ELECTRIC:
|
||||
return [ 248, 248, 120 ];
|
||||
case TerrainType.GRASSY:
|
||||
return [ 120, 200, 80 ];
|
||||
case TerrainType.PSYCHIC:
|
||||
return [ 160, 64, 160 ];
|
||||
case TerrainType.MISTY:
|
||||
return [ 232, 136, 200 ];
|
||||
case TerrainType.ELECTRIC:
|
||||
return [ 248, 248, 120 ];
|
||||
case TerrainType.GRASSY:
|
||||
return [ 120, 200, 80 ];
|
||||
case TerrainType.PSYCHIC:
|
||||
return [ 160, 64, 160 ];
|
||||
}
|
||||
|
||||
return [ 0, 0, 0 ];
|
||||
|
@ -299,65 +299,65 @@ export class TrainerConfig {
|
||||
getDerivedType(trainerTypeToDeriveFrom: TrainerType | null = null): TrainerType {
|
||||
let trainerType = trainerTypeToDeriveFrom ? trainerTypeToDeriveFrom : this.trainerType;
|
||||
switch (trainerType) {
|
||||
case TrainerType.RIVAL_2:
|
||||
case TrainerType.RIVAL_3:
|
||||
case TrainerType.RIVAL_4:
|
||||
case TrainerType.RIVAL_5:
|
||||
case TrainerType.RIVAL_6:
|
||||
trainerType = TrainerType.RIVAL;
|
||||
break;
|
||||
case TrainerType.LANCE_CHAMPION:
|
||||
trainerType = TrainerType.LANCE;
|
||||
break;
|
||||
case TrainerType.LARRY_ELITE:
|
||||
trainerType = TrainerType.LARRY;
|
||||
break;
|
||||
case TrainerType.ROCKET_BOSS_GIOVANNI_1:
|
||||
case TrainerType.ROCKET_BOSS_GIOVANNI_2:
|
||||
trainerType = TrainerType.GIOVANNI;
|
||||
break;
|
||||
case TrainerType.MAXIE_2:
|
||||
trainerType = TrainerType.MAXIE;
|
||||
break;
|
||||
case TrainerType.ARCHIE_2:
|
||||
trainerType = TrainerType.ARCHIE;
|
||||
break;
|
||||
case TrainerType.CYRUS_2:
|
||||
trainerType = TrainerType.CYRUS;
|
||||
break;
|
||||
case TrainerType.GHETSIS_2:
|
||||
trainerType = TrainerType.GHETSIS;
|
||||
break;
|
||||
case TrainerType.LYSANDRE_2:
|
||||
trainerType = TrainerType.LYSANDRE;
|
||||
break;
|
||||
case TrainerType.LUSAMINE_2:
|
||||
trainerType = TrainerType.LUSAMINE;
|
||||
break;
|
||||
case TrainerType.GUZMA_2:
|
||||
trainerType = TrainerType.GUZMA;
|
||||
break;
|
||||
case TrainerType.ROSE_2:
|
||||
trainerType = TrainerType.ROSE;
|
||||
break;
|
||||
case TrainerType.PENNY_2:
|
||||
trainerType = TrainerType.PENNY;
|
||||
break;
|
||||
case TrainerType.MARNIE_ELITE:
|
||||
trainerType = TrainerType.MARNIE;
|
||||
break;
|
||||
case TrainerType.NESSA_ELITE:
|
||||
trainerType = TrainerType.NESSA;
|
||||
break;
|
||||
case TrainerType.BEA_ELITE:
|
||||
trainerType = TrainerType.BEA;
|
||||
break;
|
||||
case TrainerType.ALLISTER_ELITE:
|
||||
trainerType = TrainerType.ALLISTER;
|
||||
break;
|
||||
case TrainerType.RAIHAN_ELITE:
|
||||
trainerType = TrainerType.RAIHAN;
|
||||
break;
|
||||
case TrainerType.RIVAL_2:
|
||||
case TrainerType.RIVAL_3:
|
||||
case TrainerType.RIVAL_4:
|
||||
case TrainerType.RIVAL_5:
|
||||
case TrainerType.RIVAL_6:
|
||||
trainerType = TrainerType.RIVAL;
|
||||
break;
|
||||
case TrainerType.LANCE_CHAMPION:
|
||||
trainerType = TrainerType.LANCE;
|
||||
break;
|
||||
case TrainerType.LARRY_ELITE:
|
||||
trainerType = TrainerType.LARRY;
|
||||
break;
|
||||
case TrainerType.ROCKET_BOSS_GIOVANNI_1:
|
||||
case TrainerType.ROCKET_BOSS_GIOVANNI_2:
|
||||
trainerType = TrainerType.GIOVANNI;
|
||||
break;
|
||||
case TrainerType.MAXIE_2:
|
||||
trainerType = TrainerType.MAXIE;
|
||||
break;
|
||||
case TrainerType.ARCHIE_2:
|
||||
trainerType = TrainerType.ARCHIE;
|
||||
break;
|
||||
case TrainerType.CYRUS_2:
|
||||
trainerType = TrainerType.CYRUS;
|
||||
break;
|
||||
case TrainerType.GHETSIS_2:
|
||||
trainerType = TrainerType.GHETSIS;
|
||||
break;
|
||||
case TrainerType.LYSANDRE_2:
|
||||
trainerType = TrainerType.LYSANDRE;
|
||||
break;
|
||||
case TrainerType.LUSAMINE_2:
|
||||
trainerType = TrainerType.LUSAMINE;
|
||||
break;
|
||||
case TrainerType.GUZMA_2:
|
||||
trainerType = TrainerType.GUZMA;
|
||||
break;
|
||||
case TrainerType.ROSE_2:
|
||||
trainerType = TrainerType.ROSE;
|
||||
break;
|
||||
case TrainerType.PENNY_2:
|
||||
trainerType = TrainerType.PENNY;
|
||||
break;
|
||||
case TrainerType.MARNIE_ELITE:
|
||||
trainerType = TrainerType.MARNIE;
|
||||
break;
|
||||
case TrainerType.NESSA_ELITE:
|
||||
trainerType = TrainerType.NESSA;
|
||||
break;
|
||||
case TrainerType.BEA_ELITE:
|
||||
trainerType = TrainerType.BEA;
|
||||
break;
|
||||
case TrainerType.ALLISTER_ELITE:
|
||||
trainerType = TrainerType.ALLISTER;
|
||||
break;
|
||||
case TrainerType.RAIHAN_ELITE:
|
||||
trainerType = TrainerType.RAIHAN;
|
||||
break;
|
||||
}
|
||||
|
||||
return trainerType;
|
||||
@ -564,104 +564,104 @@ export class TrainerConfig {
|
||||
speciesPoolPerEvilTeamAdmin(team): TrainerTierPools {
|
||||
team = team.toLowerCase();
|
||||
switch (team) {
|
||||
case "rocket": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.RATTATA, Species.KOFFING, Species.EKANS, Species.ZUBAT, Species.MAGIKARP, Species.HOUNDOUR, Species.ONIX, Species.CUBONE, Species.GROWLITHE, Species.MURKROW, Species.GASTLY, Species.EXEGGCUTE, Species.VOLTORB, Species.DROWZEE, Species.VILEPLUME ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.PORYGON, Species.MANKEY, Species.MAGNEMITE, Species.ALOLA_SANDSHREW, Species.ALOLA_MEOWTH, Species.ALOLA_GRIMER, Species.ALOLA_GEODUDE, Species.PALDEA_TAUROS, Species.OMANYTE, Species.KABUTO, Species.MAGBY, Species.ELEKID ],
|
||||
[TrainerPoolTier.RARE]: [ Species.DRATINI, Species.LARVITAR ]
|
||||
};
|
||||
}
|
||||
case "magma": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.GROWLITHE, Species.SLUGMA, Species.SOLROCK, Species.HIPPOPOTAS, Species.BALTOY, Species.ROLYCOLY, Species.GLIGAR, Species.TORKOAL, Species.HOUNDOUR, Species.MAGBY ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.TRAPINCH, Species.SILICOBRA, Species.RHYHORN, Species.ANORITH, Species.LILEEP, Species.HISUI_GROWLITHE, Species.TURTONATOR, Species.ARON, Species.BARBOACH ],
|
||||
[TrainerPoolTier.RARE]: [ Species.CAPSAKID, Species.CHARCADET ]
|
||||
};
|
||||
}
|
||||
case "aqua": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.CORPHISH, Species.SPHEAL, Species.CLAMPERL, Species.CHINCHOU, Species.WOOPER, Species.WINGULL, Species.TENTACOOL, Species.AZURILL, Species.LOTAD, Species.WAILMER, Species.REMORAID ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.MANTYKE, Species.HISUI_QWILFISH, Species.ARROKUDA, Species.DHELMISE, Species.CLOBBOPUS, Species.FEEBAS, Species.PALDEA_WOOPER, Species.HORSEA, Species.SKRELP ],
|
||||
[TrainerPoolTier.RARE]: [ Species.DONDOZO, Species.BASCULEGION ]
|
||||
};
|
||||
}
|
||||
case "galactic": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.BRONZOR, Species.SWINUB, Species.YANMA, Species.LICKITUNG, Species.TANGELA, Species.MAGBY, Species.ELEKID, Species.SKORUPI, Species.ZUBAT, Species.MURKROW, Species.MAGIKARP, Species.VOLTORB ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.HISUI_GROWLITHE, Species.HISUI_QWILFISH, Species.SNEASEL, Species.DUSKULL, Species.ROTOM, Species.HISUI_VOLTORB, Species.GLIGAR, Species.ABRA ],
|
||||
[TrainerPoolTier.RARE]: [ Species.URSALUNA, Species.HISUI_LILLIGANT, Species.SPIRITOMB, Species.HISUI_SNEASEL ]
|
||||
};
|
||||
}
|
||||
case "plasma": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.YAMASK, Species.ROGGENROLA, Species.JOLTIK, Species.TYMPOLE, Species.FRILLISH, Species.FERROSEED, Species.SANDILE, Species.TIMBURR, Species.DARUMAKA, Species.FOONGUS, Species.CUBCHOO, Species.VANILLITE ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.PAWNIARD, Species.VULLABY, Species.ZORUA, Species.DRILBUR, Species.KLINK, Species.TYNAMO, Species.GALAR_DARUMAKA, Species.GOLETT, Species.MIENFOO, Species.DURANT, Species.SIGILYPH ],
|
||||
[TrainerPoolTier.RARE]: [ Species.HISUI_ZORUA, Species.AXEW, Species.DEINO, Species.HISUI_BRAVIARY ]
|
||||
};
|
||||
}
|
||||
case "flare": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.FLETCHLING, Species.LITLEO, Species.INKAY, Species.HELIOPTILE, Species.ELECTRIKE, Species.SKORUPI, Species.PURRLOIN, Species.CLAWITZER, Species.PANCHAM, Species.ESPURR, Species.BUNNELBY ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.LITWICK, Species.SNEASEL, Species.PUMPKABOO, Species.PHANTUMP, Species.HONEDGE, Species.BINACLE, Species.HOUNDOUR, Species.SKRELP, Species.SLIGGOO ],
|
||||
[TrainerPoolTier.RARE]: [ Species.NOIVERN, Species.HISUI_AVALUGG, Species.HISUI_SLIGGOO ]
|
||||
};
|
||||
}
|
||||
case "aether": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.BRUXISH, Species.SLOWPOKE, Species.BALTOY, Species.EXEGGCUTE, Species.ABRA, Species.ALOLA_RAICHU, Species.ELGYEM, Species.NATU, Species.BLIPBUG, Species.GIRAFARIG, Species.ORANGURU ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.GALAR_SLOWPOKE, Species.MEDITITE, Species.BELDUM, Species.HATENNA, Species.INKAY, Species.RALTS, Species.GALAR_MR_MIME ],
|
||||
[TrainerPoolTier.RARE]: [ Species.ARMAROUGE, Species.HISUI_BRAVIARY, Species.PORYGON ]
|
||||
};
|
||||
}
|
||||
case "skull": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.MAREANIE, Species.ALOLA_GRIMER, Species.GASTLY, Species.ZUBAT, Species.FOMANTIS, Species.VENIPEDE, Species.BUDEW, Species.KOFFING, Species.STUNKY, Species.CROAGUNK, Species.NIDORAN_F ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.GALAR_SLOWPOKE, Species.SKORUPI, Species.PALDEA_WOOPER, Species.VULLABY, Species.HISUI_QWILFISH, Species.GLIMMET ],
|
||||
[TrainerPoolTier.RARE]: [ Species.SKRELP, Species.HISUI_SNEASEL ]
|
||||
};
|
||||
}
|
||||
case "macro": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.HATENNA, Species.FEEBAS, Species.BOUNSWEET, Species.SALANDIT, Species.GALAR_PONYTA, Species.GOTHITA, Species.FROSLASS, Species.VULPIX, Species.FRILLISH, Species.ODDISH, Species.SINISTEA ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.VULLABY, Species.MAREANIE, Species.ALOLA_VULPIX, Species.TOGEPI, Species.GALAR_CORSOLA, Species.APPLIN ],
|
||||
[TrainerPoolTier.RARE]: [ Species.TINKATINK, Species.HISUI_LILLIGANT ]
|
||||
};
|
||||
}
|
||||
case "star_1": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.MURKROW, Species.SEEDOT, Species.CACNEA, Species.STUNKY, Species.SANDILE, Species.NYMBLE, Species.MASCHIFF, Species.GALAR_ZIGZAGOON ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.UMBREON, Species.SNEASEL, Species.CORPHISH, Species.ZORUA, Species.INKAY, Species.BOMBIRDIER ],
|
||||
[TrainerPoolTier.RARE]: [ Species.DEINO, Species.SPRIGATITO ]
|
||||
};
|
||||
}
|
||||
case "star_2": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.GROWLITHE, Species.HOUNDOUR, Species.NUMEL, Species.LITWICK, Species.FLETCHLING, Species.LITLEO, Species.ROLYCOLY, Species.CAPSAKID ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.PONYTA, Species.FLAREON, Species.MAGBY, Species.TORKOAL, Species.SALANDIT, Species.TURTONATOR ],
|
||||
[TrainerPoolTier.RARE]: [ Species.LARVESTA, Species.FUECOCO ]
|
||||
};
|
||||
}
|
||||
case "star_3": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.ZUBAT, Species.GRIMER, Species.STUNKY, Species.FOONGUS, Species.MAREANIE, Species.TOXEL, Species.SHROODLE, Species.PALDEA_WOOPER ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.GASTLY, Species.SEVIPER, Species.SKRELP, Species.ALOLA_GRIMER, Species.GALAR_SLOWPOKE, Species.HISUI_QWILFISH ],
|
||||
[TrainerPoolTier.RARE]: [ Species.GLIMMET, Species.BULBASAUR ]
|
||||
};
|
||||
}
|
||||
case "star_4": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.CLEFFA, Species.IGGLYBUFF, Species.AZURILL, Species.COTTONEE, Species.FLABEBE, Species.HATENNA, Species.IMPIDIMP, Species.TINKATINK ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.TOGEPI, Species.GARDEVOIR, Species.SYLVEON, Species.KLEFKI, Species.MIMIKYU, Species.ALOLA_VULPIX ],
|
||||
[TrainerPoolTier.RARE]: [ Species.GALAR_PONYTA, Species.POPPLIO ]
|
||||
};
|
||||
}
|
||||
case "star_5": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.SHROOMISH, Species.MAKUHITA, Species.MEDITITE, Species.CROAGUNK, Species.SCRAGGY, Species.MIENFOO, Species.PAWMI, Species.PALDEA_TAUROS ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.RIOLU, Species.TIMBURR, Species.HAWLUCHA, Species.PASSIMIAN, Species.FALINKS, Species.FLAMIGO ],
|
||||
[TrainerPoolTier.RARE]: [ Species.JANGMO_O, Species.QUAXLY ]
|
||||
};
|
||||
}
|
||||
case "rocket": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.RATTATA, Species.KOFFING, Species.EKANS, Species.ZUBAT, Species.MAGIKARP, Species.HOUNDOUR, Species.ONIX, Species.CUBONE, Species.GROWLITHE, Species.MURKROW, Species.GASTLY, Species.EXEGGCUTE, Species.VOLTORB, Species.DROWZEE, Species.VILEPLUME ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.PORYGON, Species.MANKEY, Species.MAGNEMITE, Species.ALOLA_SANDSHREW, Species.ALOLA_MEOWTH, Species.ALOLA_GRIMER, Species.ALOLA_GEODUDE, Species.PALDEA_TAUROS, Species.OMANYTE, Species.KABUTO, Species.MAGBY, Species.ELEKID ],
|
||||
[TrainerPoolTier.RARE]: [ Species.DRATINI, Species.LARVITAR ]
|
||||
};
|
||||
}
|
||||
case "magma": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.GROWLITHE, Species.SLUGMA, Species.SOLROCK, Species.HIPPOPOTAS, Species.BALTOY, Species.ROLYCOLY, Species.GLIGAR, Species.TORKOAL, Species.HOUNDOUR, Species.MAGBY ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.TRAPINCH, Species.SILICOBRA, Species.RHYHORN, Species.ANORITH, Species.LILEEP, Species.HISUI_GROWLITHE, Species.TURTONATOR, Species.ARON, Species.TOEDSCOOL ],
|
||||
[TrainerPoolTier.RARE]: [ Species.CAPSAKID, Species.CHARCADET ]
|
||||
};
|
||||
}
|
||||
case "aqua": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.CORPHISH, Species.SPHEAL, Species.CLAMPERL, Species.CHINCHOU, Species.WOOPER, Species.WINGULL, Species.TENTACOOL, Species.AZURILL, Species.LOTAD, Species.WAILMER, Species.REMORAID, Species.BARBOACH ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.MANTYKE, Species.HISUI_QWILFISH, Species.ARROKUDA, Species.DHELMISE, Species.CLOBBOPUS, Species.FEEBAS, Species.PALDEA_WOOPER, Species.HORSEA, Species.SKRELP ],
|
||||
[TrainerPoolTier.RARE]: [ Species.DONDOZO, Species.BASCULEGION ]
|
||||
};
|
||||
}
|
||||
case "galactic": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.BRONZOR, Species.SWINUB, Species.YANMA, Species.LICKITUNG, Species.TANGELA, Species.MAGBY, Species.ELEKID, Species.SKORUPI, Species.ZUBAT, Species.MURKROW, Species.MAGIKARP, Species.VOLTORB ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.HISUI_GROWLITHE, Species.HISUI_QWILFISH, Species.SNEASEL, Species.DUSKULL, Species.ROTOM, Species.HISUI_VOLTORB, Species.GLIGAR, Species.ABRA ],
|
||||
[TrainerPoolTier.RARE]: [ Species.URSALUNA, Species.HISUI_LILLIGANT, Species.SPIRITOMB, Species.HISUI_SNEASEL ]
|
||||
};
|
||||
}
|
||||
case "plasma": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.YAMASK, Species.ROGGENROLA, Species.JOLTIK, Species.TYMPOLE, Species.FRILLISH, Species.FERROSEED, Species.SANDILE, Species.TIMBURR, Species.DARUMAKA, Species.FOONGUS, Species.CUBCHOO, Species.VANILLITE ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.PAWNIARD, Species.VULLABY, Species.ZORUA, Species.DRILBUR, Species.KLINK, Species.TYNAMO, Species.GALAR_DARUMAKA, Species.GOLETT, Species.MIENFOO, Species.DURANT, Species.SIGILYPH ],
|
||||
[TrainerPoolTier.RARE]: [ Species.HISUI_ZORUA, Species.AXEW, Species.DEINO, Species.HISUI_BRAVIARY ]
|
||||
};
|
||||
}
|
||||
case "flare": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.FLETCHLING, Species.LITLEO, Species.INKAY, Species.FOONGUS, Species.HELIOPTILE, Species.ELECTRIKE, Species.SKORUPI, Species.PURRLOIN, Species.CLAWITZER, Species.PANCHAM, Species.ESPURR, Species.BUNNELBY ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.LITWICK, Species.SNEASEL, Species.PUMPKABOO, Species.PHANTUMP, Species.HONEDGE, Species.BINACLE, Species.HOUNDOUR, Species.SKRELP, Species.SLIGGOO ],
|
||||
[TrainerPoolTier.RARE]: [ Species.NOIBAT, Species.HISUI_AVALUGG, Species.HISUI_SLIGGOO ]
|
||||
};
|
||||
}
|
||||
case "aether": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.BRUXISH, Species.SLOWPOKE, Species.BALTOY, Species.EXEGGCUTE, Species.ABRA, Species.ALOLA_RAICHU, Species.ELGYEM, Species.NATU, Species.BLIPBUG, Species.GIRAFARIG, Species.ORANGURU ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.GALAR_SLOWPOKE, Species.MEDITITE, Species.BELDUM, Species.HATENNA, Species.INKAY, Species.RALTS, Species.GALAR_MR_MIME ],
|
||||
[TrainerPoolTier.RARE]: [ Species.ARMAROUGE, Species.HISUI_BRAVIARY, Species.PORYGON ]
|
||||
};
|
||||
}
|
||||
case "skull": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.MAREANIE, Species.ALOLA_GRIMER, Species.GASTLY, Species.ZUBAT, Species.FOMANTIS, Species.VENIPEDE, Species.BUDEW, Species.KOFFING, Species.STUNKY, Species.CROAGUNK, Species.NIDORAN_F ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.GALAR_SLOWPOKE, Species.SKORUPI, Species.PALDEA_WOOPER, Species.VULLABY, Species.HISUI_QWILFISH, Species.GLIMMET ],
|
||||
[TrainerPoolTier.RARE]: [ Species.SKRELP, Species.HISUI_SNEASEL ]
|
||||
};
|
||||
}
|
||||
case "macro": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.HATENNA, Species.FEEBAS, Species.BOUNSWEET, Species.SALANDIT, Species.GALAR_PONYTA, Species.GOTHITA, Species.FROSLASS, Species.VULPIX, Species.FRILLISH, Species.ODDISH, Species.SINISTEA ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.VULLABY, Species.MAREANIE, Species.ALOLA_VULPIX, Species.TOGEPI, Species.GALAR_CORSOLA, Species.APPLIN ],
|
||||
[TrainerPoolTier.RARE]: [ Species.TINKATINK, Species.HISUI_LILLIGANT ]
|
||||
};
|
||||
}
|
||||
case "star_1": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.MURKROW, Species.SEEDOT, Species.CACNEA, Species.STUNKY, Species.SANDILE, Species.NYMBLE, Species.MASCHIFF, Species.GALAR_ZIGZAGOON ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.UMBREON, Species.SNEASEL, Species.CORPHISH, Species.ZORUA, Species.INKAY, Species.BOMBIRDIER ],
|
||||
[TrainerPoolTier.RARE]: [ Species.DEINO, Species.SPRIGATITO ]
|
||||
};
|
||||
}
|
||||
case "star_2": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.GROWLITHE, Species.HOUNDOUR, Species.NUMEL, Species.LITWICK, Species.FLETCHLING, Species.LITLEO, Species.ROLYCOLY, Species.CAPSAKID ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.PONYTA, Species.FLAREON, Species.MAGBY, Species.TORKOAL, Species.SALANDIT, Species.TURTONATOR ],
|
||||
[TrainerPoolTier.RARE]: [ Species.LARVESTA, Species.FUECOCO ]
|
||||
};
|
||||
}
|
||||
case "star_3": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.ZUBAT, Species.GRIMER, Species.STUNKY, Species.FOONGUS, Species.MAREANIE, Species.TOXEL, Species.SHROODLE, Species.PALDEA_WOOPER ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.GASTLY, Species.SEVIPER, Species.SKRELP, Species.ALOLA_GRIMER, Species.GALAR_SLOWPOKE, Species.HISUI_QWILFISH ],
|
||||
[TrainerPoolTier.RARE]: [ Species.GLIMMET, Species.BULBASAUR ]
|
||||
};
|
||||
}
|
||||
case "star_4": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.CLEFFA, Species.IGGLYBUFF, Species.AZURILL, Species.COTTONEE, Species.FLABEBE, Species.HATENNA, Species.IMPIDIMP, Species.TINKATINK ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.TOGEPI, Species.GARDEVOIR, Species.SYLVEON, Species.KLEFKI, Species.MIMIKYU, Species.ALOLA_VULPIX ],
|
||||
[TrainerPoolTier.RARE]: [ Species.GALAR_PONYTA, Species.POPPLIO ]
|
||||
};
|
||||
}
|
||||
case "star_5": {
|
||||
return {
|
||||
[TrainerPoolTier.COMMON]: [ Species.SHROOMISH, Species.MAKUHITA, Species.MEDITITE, Species.CROAGUNK, Species.SCRAGGY, Species.MIENFOO, Species.PAWMI, Species.PALDEA_TAUROS ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.RIOLU, Species.TIMBURR, Species.HAWLUCHA, Species.PASSIMIAN, Species.FALINKS, Species.FLAMIGO ],
|
||||
[TrainerPoolTier.RARE]: [ Species.JANGMO_O, Species.QUAXLY ]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
console.warn(`Evil team admin for ${team} not found. Returning empty species pools.`);
|
||||
@ -1504,7 +1504,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
.setSpeciesPools({
|
||||
[TrainerPoolTier.COMMON]: [ Species.SLUGMA, Species.POOCHYENA, Species.NUMEL, Species.ZIGZAGOON, Species.DIGLETT, Species.MAGBY, Species.TORKOAL, Species.GROWLITHE, Species.BALTOY ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.SOLROCK, Species.HIPPOPOTAS, Species.SANDACONDA, Species.PHANPY, Species.ROLYCOLY, Species.GLIGAR, Species.RHYHORN, Species.HEATMOR ],
|
||||
[TrainerPoolTier.RARE]: [ Species.TRAPINCH, Species.LILEEP, Species.ANORITH, Species.HISUI_GROWLITHE, Species.TURTONATOR, Species.ARON ],
|
||||
[TrainerPoolTier.RARE]: [ Species.TRAPINCH, Species.LILEEP, Species.ANORITH, Species.HISUI_GROWLITHE, Species.TURTONATOR, Species.ARON, Species.TOEDSCOOL ],
|
||||
[TrainerPoolTier.SUPER_RARE]: [ Species.CAPSAKID, Species.CHARCADET ]
|
||||
}),
|
||||
[TrainerType.TABITHA]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("magma_admin", "magma", [ Species.CAMERUPT ]).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_aqua_magma_grunt").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(scene => getEvilGruntPartyTemplate(scene)),
|
||||
@ -1540,9 +1540,9 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
[TrainerType.FLARE_GRUNT]: new TrainerConfig(++t).setHasGenders("Flare Grunt Female").setHasDouble("Flare Grunts").setMoneyMultiplier(1.0).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_flare_grunt").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(scene => getEvilGruntPartyTemplate(scene))
|
||||
.setSpeciesPools({
|
||||
[TrainerPoolTier.COMMON]: [ Species.FLETCHLING, Species.LITLEO, Species.PONYTA, Species.INKAY, Species.HOUNDOUR, Species.SKORUPI, Species.SCRAFTY, Species.CROAGUNK, Species.SCATTERBUG, Species.ESPURR ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.HELIOPTILE, Species.ELECTRIKE, Species.SKRELP, Species.PANCHAM, Species.PURRLOIN, Species.POOCHYENA, Species.BINACLE, Species.CLAUNCHER, Species.PUMPKABOO, Species.PHANTUMP ],
|
||||
[TrainerPoolTier.UNCOMMON]: [ Species.HELIOPTILE, Species.ELECTRIKE, Species.SKRELP, Species.PANCHAM, Species.PURRLOIN, Species.POOCHYENA, Species.BINACLE, Species.CLAUNCHER, Species.PUMPKABOO, Species.PHANTUMP, Species.FOONGUS ],
|
||||
[TrainerPoolTier.RARE]: [ Species.LITWICK, Species.SNEASEL, Species.PAWNIARD, Species.SLIGGOO ],
|
||||
[TrainerPoolTier.SUPER_RARE]: [ Species.NOIVERN, Species.HISUI_SLIGGOO, Species.HISUI_AVALUGG ]
|
||||
[TrainerPoolTier.SUPER_RARE]: [ Species.NOIBAT, Species.HISUI_SLIGGOO, Species.HISUI_AVALUGG ]
|
||||
}),
|
||||
[TrainerType.BRYONY]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("flare_admin_female", "flare", [ Species.LIEPARD ]).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_flare_grunt").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(scene => getEvilGruntPartyTemplate(scene)),
|
||||
[TrainerType.XEROSIC]: new TrainerConfig(++t).setMoneyMultiplier(1.5).initForEvilTeamAdmin("flare_admin", "flare", [ Species.MALAMAR ]).setEncounterBgm(TrainerType.PLASMA_GRUNT).setBattleBgm("battle_plasma_grunt").setMixedBattleBgm("battle_flare_grunt").setVictoryBgm("victory_team_plasma").setPartyTemplateFunc(scene => getEvilGruntPartyTemplate(scene)),
|
||||
@ -1893,7 +1893,10 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
}),
|
||||
|
||||
[TrainerType.ROCKET_BOSS_GIOVANNI_1]: new TrainerConfig(t = TrainerType.ROCKET_BOSS_GIOVANNI_1).setName("Giovanni").initForEvilTeamLeader("Rocket Boss", []).setMixedBattleBgm("battle_rocket_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.PERSIAN, Species.ALOLA_PERSIAN ]))
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.PERSIAN, Species.ALOLA_PERSIAN ], TrainerSlot.TRAINER, true, p => {
|
||||
p.generateAndPopulateMoveset();
|
||||
p.gender = Gender.MALE;
|
||||
}))
|
||||
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.DUGTRIO, Species.ALOLA_DUGTRIO ]))
|
||||
.setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.HONCHKROW ]))
|
||||
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.NIDOKING, Species.NIDOQUEEN ]))
|
||||
@ -1945,6 +1948,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.formIndex = 1; // Mega Camerupt
|
||||
p.generateName();
|
||||
p.gender = Gender.MALE;
|
||||
})),
|
||||
[TrainerType.MAXIE_2]: new TrainerConfig(++t).setName("Maxie").initForEvilTeamLeader("Magma Boss", [], true).setMixedBattleBgm("battle_aqua_magma_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.SOLROCK, Species.TYPHLOSION ], TrainerSlot.TRAINER, true, p => {
|
||||
@ -1967,6 +1971,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.formIndex = 1; // Mega Camerupt
|
||||
p.generateName();
|
||||
p.gender = Gender.MALE;
|
||||
}))
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.GROUDON ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
@ -1985,6 +1990,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.formIndex = 1; // Mega Sharpedo
|
||||
p.generateName();
|
||||
p.gender = Gender.MALE;
|
||||
})),
|
||||
[TrainerType.ARCHIE_2]: new TrainerConfig(++t).setName("Archie").initForEvilTeamLeader("Aqua Boss", [], true).setMixedBattleBgm("battle_aqua_magma_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.EMPOLEON, Species.LUDICOLO ], TrainerSlot.TRAINER, true, p => {
|
||||
@ -2010,6 +2016,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.formIndex = 1; // Mega Sharpedo
|
||||
p.generateName();
|
||||
p.gender = Gender.MALE;
|
||||
}))
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.KYOGRE ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
@ -2031,6 +2038,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.setBoss(true, 2);
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.gender = Gender.MALE;
|
||||
})),
|
||||
[TrainerType.CYRUS_2]: new TrainerConfig(++t).setName("Cyrus").initForEvilTeamLeader("Galactic Boss", [], true).setMixedBattleBgm("battle_galactic_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.AZELF, Species.UXIE, Species.MESPRIT ], TrainerSlot.TRAINER, true, p => {
|
||||
@ -2049,6 +2057,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.setBoss(true, 2);
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.gender = Gender.MALE;
|
||||
}))
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.DARKRAI ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
@ -2065,6 +2074,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.setBoss(true, 2);
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.gender = Gender.MALE;
|
||||
})),
|
||||
[TrainerType.GHETSIS_2]: new TrainerConfig(++t).setName("Ghetsis").initForEvilTeamLeader("Plasma Boss", [], true).setMixedBattleBgm("battle_plasma_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.GENESECT ], TrainerSlot.TRAINER, true, p => {
|
||||
@ -2084,6 +2094,11 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.setBoss(true, 2);
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
if (p.species.speciesId === Species.HYDREIGON) {
|
||||
p.gender = Gender.MALE;
|
||||
} else if (p.species.speciesId === Species.IRON_JUGULIS) {
|
||||
p.gender = Gender.GENDERLESS;
|
||||
}
|
||||
}))
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.KYUREM ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
@ -2105,6 +2120,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.formIndex = 1; // Mega Gyarados
|
||||
p.generateName();
|
||||
p.gender = Gender.MALE;
|
||||
})),
|
||||
[TrainerType.LYSANDRE_2]: new TrainerConfig(++t).setName("Lysandre").initForEvilTeamLeader("Flare Boss", [], true).setMixedBattleBgm("battle_flare_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.SCREAM_TAIL, Species.FLUTTER_MANE ], TrainerSlot.TRAINER, true, p => {
|
||||
@ -2124,6 +2140,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.formIndex = 1; // Mega Gyardos
|
||||
p.generateName();
|
||||
p.gender = Gender.MALE;
|
||||
}))
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.YVELTAL ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
@ -2131,7 +2148,10 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.MASTER_BALL;
|
||||
})),
|
||||
[TrainerType.LUSAMINE]: new TrainerConfig(++t).setName("Lusamine").initForEvilTeamLeader("Aether Boss", []).setMixedBattleBgm("battle_aether_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.CLEFABLE ]))
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.CLEFABLE ], TrainerSlot.TRAINER, true, p => {
|
||||
p.generateAndPopulateMoveset();
|
||||
p.gender = Gender.FEMALE;
|
||||
}))
|
||||
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.LILLIGANT, Species.HISUI_LILLIGANT ]))
|
||||
.setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.MILOTIC, Species.PRIMARINA ]))
|
||||
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.GALAR_SLOWBRO, Species.GALAR_SLOWKING ]))
|
||||
@ -2148,7 +2168,10 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.ROGUE_BALL;
|
||||
}))
|
||||
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.MILOTIC, Species.PRIMARINA ]))
|
||||
.setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.CLEFABLE ]))
|
||||
.setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.CLEFABLE ], TrainerSlot.TRAINER, true, p => {
|
||||
p.generateAndPopulateMoveset();
|
||||
p.gender = Gender.FEMALE;
|
||||
}))
|
||||
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.STAKATAKA, Species.CELESTEELA, Species.GUZZLORD ], TrainerSlot.TRAINER, true, p => {
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.ROGUE_BALL;
|
||||
@ -2191,6 +2214,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.GOLISOPOD ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
p.generateAndPopulateMoveset();
|
||||
p.gender = Gender.MALE;
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
})),
|
||||
[TrainerType.GUZMA_2]: new TrainerConfig(++t).setName("Guzma").initForEvilTeamLeader("Skull Boss", [], true).setMixedBattleBgm("battle_skull_boss").setVictoryBgm("victory_team_plasma")
|
||||
@ -2198,6 +2222,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.setBoss(true, 2);
|
||||
p.generateAndPopulateMoveset();
|
||||
p.abilityIndex = 2; //Anticipation
|
||||
p.gender = Gender.MALE;
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
}))
|
||||
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.SCIZOR, Species.KLEAVOR ], TrainerSlot.TRAINER, true, p => {
|
||||
@ -2239,6 +2264,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.formIndex = 1; // G-Max Copperajah
|
||||
p.generateName();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.gender = Gender.FEMALE;
|
||||
})),
|
||||
[TrainerType.ROSE_2]: new TrainerConfig(++t).setName("Rose").initForEvilTeamLeader("Macro Boss", [], true).setMixedBattleBgm("battle_macro_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.ARCHALUDON ], TrainerSlot.TRAINER, true, p => {
|
||||
@ -2262,6 +2288,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.formIndex = 1; // G-Max Copperajah
|
||||
p.generateName();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.gender = Gender.FEMALE;
|
||||
})),
|
||||
[TrainerType.PENNY]: new TrainerConfig(++t).setName("Cassiopeia").initForEvilTeamLeader("Star Boss", []).setMixedBattleBgm("battle_star_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.VAPOREON, Species.JOLTEON, Species.FLAREON ]))
|
||||
@ -2275,8 +2302,9 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.formIndex = Utils.randSeedInt(5, 1); // Heat, Wash, Frost, Fan, or Mow
|
||||
}))
|
||||
.setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.SYLVEON ], TrainerSlot.TRAINER, true, p => {
|
||||
p.generateAndPopulateMoveset();
|
||||
p.abilityIndex = 2; // Pixilate
|
||||
p.generateAndPopulateMoveset();
|
||||
p.gender = Gender.FEMALE;
|
||||
}))
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.EEVEE ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
@ -2290,20 +2318,21 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
return [ modifierTypes.TERA_SHARD().generateType([], [ teraPokemon.species.type1 ])!.withIdFromFunc(modifierTypes.TERA_SHARD).newModifier(teraPokemon) as PersistentModifier ]; //TODO: is the bang correct?
|
||||
}),
|
||||
[TrainerType.PENNY_2]: new TrainerConfig(++t).setName("Cassiopeia").initForEvilTeamLeader("Star Boss", [], true).setMixedBattleBgm("battle_star_boss").setVictoryBgm("victory_team_plasma")
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => {
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.SYLVEON ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
p.formIndex = Utils.randSeedInt(5, 1); //Random Starmobile form
|
||||
p.abilityIndex = 2; // Pixilate
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
p.gender = Gender.FEMALE;
|
||||
}))
|
||||
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.ENTEI, Species.RAIKOU, Species.SUICUNE ], TrainerSlot.TRAINER, true, p => {
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.ULTRA_BALL;
|
||||
}))
|
||||
.setPartyMemberFunc(2, getRandomPartyMemberFunc([ Species.WALKING_WAKE, Species.GOUGING_FIRE, Species.RAGING_BOLT ]))
|
||||
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.SYLVEON ], TrainerSlot.TRAINER, true, p => {
|
||||
.setPartyMemberFunc(3, getRandomPartyMemberFunc([ Species.REVAVROOM ], TrainerSlot.TRAINER, true, p => {
|
||||
p.formIndex = Utils.randSeedInt(5, 1); //Random Starmobile form
|
||||
p.generateAndPopulateMoveset();
|
||||
p.abilityIndex = 2; // Pixilate
|
||||
p.pokeball = PokeballType.ROGUE_BALL;
|
||||
}))
|
||||
.setPartyMemberFunc(4, getRandomPartyMemberFunc([ Species.EEVEE ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss(true, 2);
|
||||
@ -2318,7 +2347,7 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
p.pokeball = PokeballType.MASTER_BALL;
|
||||
}))
|
||||
.setGenModifiersFunc(party => {
|
||||
const teraPokemon = party[3];
|
||||
const teraPokemon = party[0];
|
||||
return [ modifierTypes.TERA_SHARD().generateType([], [ teraPokemon.species.type1 ])!.withIdFromFunc(modifierTypes.TERA_SHARD).newModifier(teraPokemon) as PersistentModifier ]; //TODO: is the bang correct?
|
||||
}),
|
||||
[TrainerType.BUCK]: new TrainerConfig(++t).setName("Buck").initForStatTrainer([], true)
|
||||
|
628
src/data/type.ts
@ -29,260 +29,260 @@ export function getTypeDamageMultiplier(attackType: Type, defType: Type): TypeDa
|
||||
}
|
||||
|
||||
switch (defType) {
|
||||
case Type.NORMAL:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
return 2;
|
||||
case Type.GHOST:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FIGHTING:
|
||||
switch (attackType) {
|
||||
case Type.FLYING:
|
||||
case Type.PSYCHIC:
|
||||
case Type.FAIRY:
|
||||
return 2;
|
||||
case Type.ROCK:
|
||||
case Type.BUG:
|
||||
case Type.DARK:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FLYING:
|
||||
switch (attackType) {
|
||||
case Type.ROCK:
|
||||
case Type.ELECTRIC:
|
||||
case Type.ICE:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.BUG:
|
||||
case Type.GRASS:
|
||||
return 0.5;
|
||||
case Type.GROUND:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.POISON:
|
||||
switch (attackType) {
|
||||
case Type.GROUND:
|
||||
case Type.PSYCHIC:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.POISON:
|
||||
case Type.BUG:
|
||||
case Type.GRASS:
|
||||
case Type.FAIRY:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.GROUND:
|
||||
switch (attackType) {
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
case Type.ICE:
|
||||
return 2;
|
||||
case Type.POISON:
|
||||
case Type.ROCK:
|
||||
return 0.5;
|
||||
case Type.ELECTRIC:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.ROCK:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.GROUND:
|
||||
case Type.STEEL:
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
return 2;
|
||||
case Type.NORMAL:
|
||||
case Type.FLYING:
|
||||
case Type.POISON:
|
||||
case Type.FIRE:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.BUG:
|
||||
switch (attackType) {
|
||||
case Type.FLYING:
|
||||
case Type.ROCK:
|
||||
case Type.FIRE:
|
||||
return 2;
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
return 2;
|
||||
case Type.GHOST:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FIGHTING:
|
||||
switch (attackType) {
|
||||
case Type.FLYING:
|
||||
case Type.PSYCHIC:
|
||||
case Type.FAIRY:
|
||||
return 2;
|
||||
case Type.ROCK:
|
||||
case Type.BUG:
|
||||
case Type.DARK:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FLYING:
|
||||
switch (attackType) {
|
||||
case Type.ROCK:
|
||||
case Type.ELECTRIC:
|
||||
case Type.ICE:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.BUG:
|
||||
case Type.GRASS:
|
||||
return 0.5;
|
||||
case Type.GROUND:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.POISON:
|
||||
switch (attackType) {
|
||||
case Type.GROUND:
|
||||
case Type.PSYCHIC:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.POISON:
|
||||
case Type.BUG:
|
||||
case Type.GRASS:
|
||||
case Type.FAIRY:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.GROUND:
|
||||
case Type.GRASS:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.GHOST:
|
||||
switch (attackType) {
|
||||
switch (attackType) {
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
case Type.ICE:
|
||||
return 2;
|
||||
case Type.POISON:
|
||||
case Type.ROCK:
|
||||
return 0.5;
|
||||
case Type.ELECTRIC:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.ROCK:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.GROUND:
|
||||
case Type.STEEL:
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
return 2;
|
||||
case Type.NORMAL:
|
||||
case Type.FLYING:
|
||||
case Type.POISON:
|
||||
case Type.FIRE:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.BUG:
|
||||
switch (attackType) {
|
||||
case Type.FLYING:
|
||||
case Type.ROCK:
|
||||
case Type.FIRE:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.GROUND:
|
||||
case Type.GRASS:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.GHOST:
|
||||
case Type.DARK:
|
||||
return 2;
|
||||
case Type.POISON:
|
||||
case Type.BUG:
|
||||
return 0.5;
|
||||
case Type.NORMAL:
|
||||
case Type.FIGHTING:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.STEEL:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.GROUND:
|
||||
case Type.FIRE:
|
||||
return 2;
|
||||
case Type.NORMAL:
|
||||
case Type.FLYING:
|
||||
case Type.ROCK:
|
||||
case Type.BUG:
|
||||
switch (attackType) {
|
||||
case Type.GHOST:
|
||||
case Type.DARK:
|
||||
return 2;
|
||||
case Type.POISON:
|
||||
case Type.BUG:
|
||||
return 0.5;
|
||||
case Type.NORMAL:
|
||||
case Type.FIGHTING:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.STEEL:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.GROUND:
|
||||
case Type.FIRE:
|
||||
return 2;
|
||||
case Type.NORMAL:
|
||||
case Type.FLYING:
|
||||
case Type.ROCK:
|
||||
case Type.BUG:
|
||||
case Type.STEEL:
|
||||
case Type.GRASS:
|
||||
case Type.PSYCHIC:
|
||||
case Type.ICE:
|
||||
case Type.DRAGON:
|
||||
case Type.FAIRY:
|
||||
return 0.5;
|
||||
case Type.POISON:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FIRE:
|
||||
switch (attackType) {
|
||||
case Type.GROUND:
|
||||
case Type.ROCK:
|
||||
case Type.WATER:
|
||||
return 2;
|
||||
case Type.BUG:
|
||||
case Type.STEEL:
|
||||
case Type.FIRE:
|
||||
case Type.GRASS:
|
||||
case Type.ICE:
|
||||
case Type.FAIRY:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.WATER:
|
||||
switch (attackType) {
|
||||
case Type.GRASS:
|
||||
case Type.ELECTRIC:
|
||||
return 2;
|
||||
case Type.STEEL:
|
||||
case Type.FIRE:
|
||||
case Type.WATER:
|
||||
case Type.ICE:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.GRASS:
|
||||
switch (attackType) {
|
||||
case Type.FLYING:
|
||||
case Type.POISON:
|
||||
case Type.BUG:
|
||||
case Type.FIRE:
|
||||
case Type.ICE:
|
||||
return 2;
|
||||
case Type.GROUND:
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
case Type.ELECTRIC:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.ELECTRIC:
|
||||
switch (attackType) {
|
||||
case Type.GROUND:
|
||||
return 2;
|
||||
case Type.FLYING:
|
||||
case Type.STEEL:
|
||||
case Type.ELECTRIC:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.PSYCHIC:
|
||||
switch (attackType) {
|
||||
case Type.BUG:
|
||||
case Type.GHOST:
|
||||
case Type.DARK:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.PSYCHIC:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.ICE:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.ROCK:
|
||||
case Type.STEEL:
|
||||
case Type.FIRE:
|
||||
return 2;
|
||||
case Type.ICE:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.DRAGON:
|
||||
case Type.FAIRY:
|
||||
return 0.5;
|
||||
case Type.POISON:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FIRE:
|
||||
switch (attackType) {
|
||||
case Type.GROUND:
|
||||
case Type.ROCK:
|
||||
case Type.WATER:
|
||||
return 2;
|
||||
case Type.BUG:
|
||||
case Type.STEEL:
|
||||
case Type.FIRE:
|
||||
case Type.GRASS:
|
||||
case Type.ICE:
|
||||
case Type.FAIRY:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.WATER:
|
||||
switch (attackType) {
|
||||
case Type.GRASS:
|
||||
case Type.ELECTRIC:
|
||||
return 2;
|
||||
case Type.STEEL:
|
||||
case Type.FIRE:
|
||||
case Type.WATER:
|
||||
case Type.ICE:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.GRASS:
|
||||
switch (attackType) {
|
||||
case Type.FLYING:
|
||||
case Type.POISON:
|
||||
case Type.BUG:
|
||||
case Type.FIRE:
|
||||
case Type.ICE:
|
||||
return 2;
|
||||
case Type.GROUND:
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
case Type.ELECTRIC:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.ELECTRIC:
|
||||
switch (attackType) {
|
||||
case Type.GROUND:
|
||||
return 2;
|
||||
case Type.FLYING:
|
||||
case Type.STEEL:
|
||||
case Type.ELECTRIC:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.PSYCHIC:
|
||||
switch (attackType) {
|
||||
case Type.BUG:
|
||||
case Type.GHOST:
|
||||
switch (attackType) {
|
||||
case Type.ICE:
|
||||
case Type.DRAGON:
|
||||
case Type.FAIRY:
|
||||
return 2;
|
||||
case Type.FIRE:
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
case Type.ELECTRIC:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.DARK:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.PSYCHIC:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.ICE:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.ROCK:
|
||||
case Type.STEEL:
|
||||
case Type.FIRE:
|
||||
return 2;
|
||||
case Type.ICE:
|
||||
return 0.5;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.DRAGON:
|
||||
switch (attackType) {
|
||||
case Type.ICE:
|
||||
case Type.DRAGON:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.BUG:
|
||||
case Type.FAIRY:
|
||||
return 2;
|
||||
case Type.GHOST:
|
||||
case Type.DARK:
|
||||
return 0.5;
|
||||
case Type.PSYCHIC:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FAIRY:
|
||||
return 2;
|
||||
case Type.FIRE:
|
||||
case Type.WATER:
|
||||
case Type.GRASS:
|
||||
case Type.ELECTRIC:
|
||||
return 0.5;
|
||||
default:
|
||||
switch (attackType) {
|
||||
case Type.POISON:
|
||||
case Type.STEEL:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.BUG:
|
||||
case Type.DARK:
|
||||
return 0.5;
|
||||
case Type.DRAGON:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.STELLAR:
|
||||
return 1;
|
||||
}
|
||||
case Type.DARK:
|
||||
switch (attackType) {
|
||||
case Type.FIGHTING:
|
||||
case Type.BUG:
|
||||
case Type.FAIRY:
|
||||
return 2;
|
||||
case Type.GHOST:
|
||||
case Type.DARK:
|
||||
return 0.5;
|
||||
case Type.PSYCHIC:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.FAIRY:
|
||||
switch (attackType) {
|
||||
case Type.POISON:
|
||||
case Type.STEEL:
|
||||
return 2;
|
||||
case Type.FIGHTING:
|
||||
case Type.BUG:
|
||||
case Type.DARK:
|
||||
return 0.5;
|
||||
case Type.DRAGON:
|
||||
return 0;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
case Type.STELLAR:
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
@ -295,86 +295,86 @@ export function getTypeDamageMultiplier(attackType: Type, defType: Type): TypeDa
|
||||
export function getTypeDamageMultiplierColor(multiplier: TypeDamageMultiplier, side: "defense" | "offense"): string | undefined {
|
||||
if (side === "offense") {
|
||||
switch (multiplier) {
|
||||
case 0:
|
||||
return "#929292";
|
||||
case 0.125:
|
||||
return "#FF5500";
|
||||
case 0.25:
|
||||
return "#FF7400";
|
||||
case 0.5:
|
||||
return "#FE8E00";
|
||||
case 1:
|
||||
return undefined;
|
||||
case 2:
|
||||
return "#4AA500";
|
||||
case 4:
|
||||
return "#4BB400";
|
||||
case 8:
|
||||
return "#52C200";
|
||||
case 0:
|
||||
return "#929292";
|
||||
case 0.125:
|
||||
return "#FF5500";
|
||||
case 0.25:
|
||||
return "#FF7400";
|
||||
case 0.5:
|
||||
return "#FE8E00";
|
||||
case 1:
|
||||
return undefined;
|
||||
case 2:
|
||||
return "#4AA500";
|
||||
case 4:
|
||||
return "#4BB400";
|
||||
case 8:
|
||||
return "#52C200";
|
||||
}
|
||||
} else if (side === "defense") {
|
||||
switch (multiplier) {
|
||||
case 0:
|
||||
return "#B1B100";
|
||||
case 0.125:
|
||||
return "#2DB4FF";
|
||||
case 0.25:
|
||||
return "#00A4FF";
|
||||
case 0.5:
|
||||
return "#0093FF";
|
||||
case 1:
|
||||
return undefined;
|
||||
case 2:
|
||||
return "#FE8E00";
|
||||
case 4:
|
||||
return "#FF7400";
|
||||
case 8:
|
||||
return "#FF5500";
|
||||
case 0:
|
||||
return "#B1B100";
|
||||
case 0.125:
|
||||
return "#2DB4FF";
|
||||
case 0.25:
|
||||
return "#00A4FF";
|
||||
case 0.5:
|
||||
return "#0093FF";
|
||||
case 1:
|
||||
return undefined;
|
||||
case 2:
|
||||
return "#FE8E00";
|
||||
case 4:
|
||||
return "#FF7400";
|
||||
case 8:
|
||||
return "#FF5500";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getTypeRgb(type: Type): [ integer, integer, integer ] {
|
||||
switch (type) {
|
||||
case Type.NORMAL:
|
||||
return [ 168, 168, 120 ];
|
||||
case Type.FIGHTING:
|
||||
return [ 192, 48, 40 ];
|
||||
case Type.FLYING:
|
||||
return [ 168, 144, 240 ];
|
||||
case Type.POISON:
|
||||
return [ 160, 64, 160 ];
|
||||
case Type.GROUND:
|
||||
return [ 224, 192, 104 ];
|
||||
case Type.ROCK:
|
||||
return [ 184, 160, 56 ];
|
||||
case Type.BUG:
|
||||
return [ 168, 184, 32 ];
|
||||
case Type.GHOST:
|
||||
return [ 112, 88, 152 ];
|
||||
case Type.STEEL:
|
||||
return [ 184, 184, 208 ];
|
||||
case Type.FIRE:
|
||||
return [ 240, 128, 48 ];
|
||||
case Type.WATER:
|
||||
return [ 104, 144, 240 ];
|
||||
case Type.GRASS:
|
||||
return [ 120, 200, 80 ];
|
||||
case Type.ELECTRIC:
|
||||
return [ 248, 208, 48 ];
|
||||
case Type.PSYCHIC:
|
||||
return [ 248, 88, 136 ];
|
||||
case Type.ICE:
|
||||
return [ 152, 216, 216 ];
|
||||
case Type.DRAGON:
|
||||
return [ 112, 56, 248 ];
|
||||
case Type.DARK:
|
||||
return [ 112, 88, 72 ];
|
||||
case Type.FAIRY:
|
||||
return [ 232, 136, 200 ];
|
||||
case Type.STELLAR:
|
||||
return [ 255, 255, 255 ];
|
||||
default:
|
||||
return [ 0, 0, 0 ];
|
||||
case Type.NORMAL:
|
||||
return [ 168, 168, 120 ];
|
||||
case Type.FIGHTING:
|
||||
return [ 192, 48, 40 ];
|
||||
case Type.FLYING:
|
||||
return [ 168, 144, 240 ];
|
||||
case Type.POISON:
|
||||
return [ 160, 64, 160 ];
|
||||
case Type.GROUND:
|
||||
return [ 224, 192, 104 ];
|
||||
case Type.ROCK:
|
||||
return [ 184, 160, 56 ];
|
||||
case Type.BUG:
|
||||
return [ 168, 184, 32 ];
|
||||
case Type.GHOST:
|
||||
return [ 112, 88, 152 ];
|
||||
case Type.STEEL:
|
||||
return [ 184, 184, 208 ];
|
||||
case Type.FIRE:
|
||||
return [ 240, 128, 48 ];
|
||||
case Type.WATER:
|
||||
return [ 104, 144, 240 ];
|
||||
case Type.GRASS:
|
||||
return [ 120, 200, 80 ];
|
||||
case Type.ELECTRIC:
|
||||
return [ 248, 208, 48 ];
|
||||
case Type.PSYCHIC:
|
||||
return [ 248, 88, 136 ];
|
||||
case Type.ICE:
|
||||
return [ 152, 216, 216 ];
|
||||
case Type.DRAGON:
|
||||
return [ 112, 56, 248 ];
|
||||
case Type.DARK:
|
||||
return [ 112, 88, 72 ];
|
||||
case Type.FAIRY:
|
||||
return [ 232, 136, 200 ];
|
||||
case Type.STELLAR:
|
||||
return [ 255, 255, 255 ];
|
||||
default:
|
||||
return [ 0, 0, 0 ];
|
||||
}
|
||||
}
|
||||
|