mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 23:13:42 +02:00
Merge branch 'beta' into reduce-gameData
This commit is contained in:
commit
5a1b134508
@ -46,7 +46,7 @@
|
||||
"lefthook": "^1.12.2",
|
||||
"msw": "^2.10.4",
|
||||
"phaser3spectorjs": "^0.0.8",
|
||||
"typedoc": "^0.28.8",
|
||||
"typedoc": "^0.28.12",
|
||||
"typedoc-github-theme": "^0.3.1",
|
||||
"typedoc-plugin-coverage": "^4.0.1",
|
||||
"typedoc-plugin-mdn-links": "^5.0.9",
|
||||
|
126
pnpm-lock.yaml
126
pnpm-lock.yaml
@ -59,7 +59,7 @@ importers:
|
||||
version: 22.16.5
|
||||
'@vitest/coverage-istanbul':
|
||||
specifier: ^3.2.4
|
||||
version: 3.2.4(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0))
|
||||
version: 3.2.4(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1))
|
||||
'@vitest/expect':
|
||||
specifier: ^3.2.4
|
||||
version: 3.2.4
|
||||
@ -88,32 +88,32 @@ importers:
|
||||
specifier: ^0.0.8
|
||||
version: 0.0.8
|
||||
typedoc:
|
||||
specifier: ^0.28.8
|
||||
version: 0.28.8(typescript@5.8.3)
|
||||
specifier: ^0.28.12
|
||||
version: 0.28.12(typescript@5.8.3)
|
||||
typedoc-github-theme:
|
||||
specifier: ^0.3.1
|
||||
version: 0.3.1(typedoc@0.28.8(typescript@5.8.3))
|
||||
version: 0.3.1(typedoc@0.28.12(typescript@5.8.3))
|
||||
typedoc-plugin-coverage:
|
||||
specifier: ^4.0.1
|
||||
version: 4.0.1(typedoc@0.28.8(typescript@5.8.3))
|
||||
version: 4.0.1(typedoc@0.28.12(typescript@5.8.3))
|
||||
typedoc-plugin-mdn-links:
|
||||
specifier: ^5.0.9
|
||||
version: 5.0.9(typedoc@0.28.8(typescript@5.8.3))
|
||||
version: 5.0.9(typedoc@0.28.12(typescript@5.8.3))
|
||||
typescript:
|
||||
specifier: ^5.8.3
|
||||
version: 5.8.3
|
||||
vite:
|
||||
specifier: ^7.0.6
|
||||
version: 7.0.6(@types/node@22.16.5)(yaml@2.8.0)
|
||||
version: 7.0.6(@types/node@22.16.5)(yaml@2.8.1)
|
||||
vite-tsconfig-paths:
|
||||
specifier: ^5.1.4
|
||||
version: 5.1.4(typescript@5.8.3)(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.0))
|
||||
version: 5.1.4(typescript@5.8.3)(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.1))
|
||||
vitest:
|
||||
specifier: ^3.2.4
|
||||
version: 3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0)
|
||||
version: 3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1)
|
||||
vitest-canvas-mock:
|
||||
specifier: ^0.3.3
|
||||
version: 0.3.3(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0))
|
||||
version: 0.3.3(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1))
|
||||
|
||||
packages:
|
||||
|
||||
@ -441,8 +441,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@gerrit0/mini-shiki@3.8.1':
|
||||
resolution: {integrity: sha512-HVZW+8pxoOExr5ZMPK15U79jQAZTO/S6i5byQyyZGjtNj+qaYd82cizTncwFzTQgiLo8uUBym6vh+/1tfJklTw==}
|
||||
'@gerrit0/mini-shiki@3.12.2':
|
||||
resolution: {integrity: sha512-HKZPmO8OSSAAo20H2B3xgJdxZaLTwtlMwxg0967scnrDlPwe6j5+ULGHyIqwgTbFCn9yv/ff8CmfWZLE9YKBzA==}
|
||||
|
||||
'@inquirer/checkbox@4.2.0':
|
||||
resolution: {integrity: sha512-fdSw07FLJEU5vbpOPzXo5c6xmMGDzbZE2+niuDHX5N6mc6V0Ebso/q3xiHra4D73+PMsC8MJmcaZKuAAoaQsSA==}
|
||||
@ -712,17 +712,17 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@shikijs/engine-oniguruma@3.8.1':
|
||||
resolution: {integrity: sha512-KGQJZHlNY7c656qPFEQpIoqOuC4LrxjyNndRdzk5WKB/Ie87+NJCF1xo9KkOUxwxylk7rT6nhlZyTGTC4fCe1g==}
|
||||
'@shikijs/engine-oniguruma@3.12.2':
|
||||
resolution: {integrity: sha512-hozwnFHsLvujK4/CPVHNo3Bcg2EsnG8krI/ZQ2FlBlCRpPZW4XAEQmEwqegJsypsTAN9ehu2tEYe30lYKSZW/w==}
|
||||
|
||||
'@shikijs/langs@3.8.1':
|
||||
resolution: {integrity: sha512-TjOFg2Wp1w07oKnXjs0AUMb4kJvujML+fJ1C5cmEj45lhjbUXtziT1x2bPQb9Db6kmPhkG5NI2tgYW1/DzhUuQ==}
|
||||
'@shikijs/langs@3.12.2':
|
||||
resolution: {integrity: sha512-bVx5PfuZHDSHoBal+KzJZGheFuyH4qwwcwG/n+MsWno5cTlKmaNtTsGzJpHYQ8YPbB5BdEdKU1rga5/6JGY8ww==}
|
||||
|
||||
'@shikijs/themes@3.8.1':
|
||||
resolution: {integrity: sha512-Vu3t3BBLifc0GB0UPg2Pox1naTemrrvyZv2lkiSw3QayVV60me1ujFQwPZGgUTmwXl1yhCPW8Lieesm0CYruLQ==}
|
||||
'@shikijs/themes@3.12.2':
|
||||
resolution: {integrity: sha512-fTR3QAgnwYpfGczpIbzPjlRnxyONJOerguQv1iwpyQZ9QXX4qy/XFQqXlf17XTsorxnHoJGbH/LXBvwtqDsF5A==}
|
||||
|
||||
'@shikijs/types@3.8.1':
|
||||
resolution: {integrity: sha512-5C39Q8/8r1I26suLh+5TPk1DTrbY/kn3IdWA5HdizR0FhlhD05zx5nKCqhzSfDHH3p4S0ZefxWd77DLV+8FhGg==}
|
||||
'@shikijs/types@3.12.2':
|
||||
resolution: {integrity: sha512-K5UIBzxCyv0YoxN3LMrKB9zuhp1bV+LgewxuVwHdl4Gz5oePoUFrr9EfgJlGlDeXCU1b/yhdnXeuRvAnz8HN8Q==}
|
||||
|
||||
'@shikijs/vscode-textmate@10.0.2':
|
||||
resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}
|
||||
@ -1818,12 +1818,12 @@ packages:
|
||||
peerDependencies:
|
||||
typedoc: 0.27.x || 0.28.x
|
||||
|
||||
typedoc@0.28.8:
|
||||
resolution: {integrity: sha512-16GfLopc8icHfdvqZDqdGBoS2AieIRP2rpf9mU+MgN+gGLyEQvAO0QgOa6NJ5QNmQi0LFrDY9in4F2fUNKgJKA==}
|
||||
typedoc@0.28.12:
|
||||
resolution: {integrity: sha512-H5ODu4f7N+myG4MfuSp2Vh6wV+WLoZaEYxKPt2y8hmmqNEMVrH69DAjjdmYivF4tP/C2jrIZCZhPalZlTU/ipA==}
|
||||
engines: {node: '>= 18', pnpm: '>= 10'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x
|
||||
typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x
|
||||
|
||||
typescript@5.8.3:
|
||||
resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}
|
||||
@ -2020,8 +2020,8 @@ packages:
|
||||
yallist@3.1.1:
|
||||
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
|
||||
|
||||
yaml@2.8.0:
|
||||
resolution: {integrity: sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==}
|
||||
yaml@2.8.1:
|
||||
resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==}
|
||||
engines: {node: '>= 14.6'}
|
||||
hasBin: true
|
||||
|
||||
@ -2300,12 +2300,12 @@ snapshots:
|
||||
'@esbuild/win32-x64@0.25.8':
|
||||
optional: true
|
||||
|
||||
'@gerrit0/mini-shiki@3.8.1':
|
||||
'@gerrit0/mini-shiki@3.12.2':
|
||||
dependencies:
|
||||
'@shikijs/engine-oniguruma': 3.8.1
|
||||
'@shikijs/langs': 3.8.1
|
||||
'@shikijs/themes': 3.8.1
|
||||
'@shikijs/types': 3.8.1
|
||||
'@shikijs/engine-oniguruma': 3.12.2
|
||||
'@shikijs/langs': 3.12.2
|
||||
'@shikijs/themes': 3.12.2
|
||||
'@shikijs/types': 3.12.2
|
||||
'@shikijs/vscode-textmate': 10.0.2
|
||||
|
||||
'@inquirer/checkbox@4.2.0(@types/node@22.16.5)':
|
||||
@ -2534,20 +2534,20 @@ snapshots:
|
||||
'@rollup/rollup-win32-x64-msvc@4.46.1':
|
||||
optional: true
|
||||
|
||||
'@shikijs/engine-oniguruma@3.8.1':
|
||||
'@shikijs/engine-oniguruma@3.12.2':
|
||||
dependencies:
|
||||
'@shikijs/types': 3.8.1
|
||||
'@shikijs/types': 3.12.2
|
||||
'@shikijs/vscode-textmate': 10.0.2
|
||||
|
||||
'@shikijs/langs@3.8.1':
|
||||
'@shikijs/langs@3.12.2':
|
||||
dependencies:
|
||||
'@shikijs/types': 3.8.1
|
||||
'@shikijs/types': 3.12.2
|
||||
|
||||
'@shikijs/themes@3.8.1':
|
||||
'@shikijs/themes@3.12.2':
|
||||
dependencies:
|
||||
'@shikijs/types': 3.8.1
|
||||
'@shikijs/types': 3.12.2
|
||||
|
||||
'@shikijs/types@3.8.1':
|
||||
'@shikijs/types@3.12.2':
|
||||
dependencies:
|
||||
'@shikijs/vscode-textmate': 10.0.2
|
||||
'@types/hast': 3.0.4
|
||||
@ -2586,7 +2586,7 @@ snapshots:
|
||||
|
||||
'@types/unist@3.0.3': {}
|
||||
|
||||
'@vitest/coverage-istanbul@3.2.4(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0))':
|
||||
'@vitest/coverage-istanbul@3.2.4(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1))':
|
||||
dependencies:
|
||||
'@istanbuljs/schema': 0.1.3
|
||||
debug: 4.4.1
|
||||
@ -2598,7 +2598,7 @@ snapshots:
|
||||
magicast: 0.3.5
|
||||
test-exclude: 7.0.1
|
||||
tinyrainbow: 2.0.0
|
||||
vitest: 3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0)
|
||||
vitest: 3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@ -2610,14 +2610,14 @@ snapshots:
|
||||
chai: 5.2.1
|
||||
tinyrainbow: 2.0.0
|
||||
|
||||
'@vitest/mocker@3.2.4(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.0))':
|
||||
'@vitest/mocker@3.2.4(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.1))':
|
||||
dependencies:
|
||||
'@vitest/spy': 3.2.4
|
||||
estree-walker: 3.0.3
|
||||
magic-string: 0.30.17
|
||||
optionalDependencies:
|
||||
msw: 2.10.4(@types/node@22.16.5)(typescript@5.8.3)
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.0)
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.1)
|
||||
|
||||
'@vitest/pretty-format@3.2.4':
|
||||
dependencies:
|
||||
@ -3663,26 +3663,26 @@ snapshots:
|
||||
|
||||
type-fest@4.41.0: {}
|
||||
|
||||
typedoc-github-theme@0.3.1(typedoc@0.28.8(typescript@5.8.3)):
|
||||
typedoc-github-theme@0.3.1(typedoc@0.28.12(typescript@5.8.3)):
|
||||
dependencies:
|
||||
typedoc: 0.28.8(typescript@5.8.3)
|
||||
typedoc: 0.28.12(typescript@5.8.3)
|
||||
|
||||
typedoc-plugin-coverage@4.0.1(typedoc@0.28.8(typescript@5.8.3)):
|
||||
typedoc-plugin-coverage@4.0.1(typedoc@0.28.12(typescript@5.8.3)):
|
||||
dependencies:
|
||||
typedoc: 0.28.8(typescript@5.8.3)
|
||||
typedoc: 0.28.12(typescript@5.8.3)
|
||||
|
||||
typedoc-plugin-mdn-links@5.0.9(typedoc@0.28.8(typescript@5.8.3)):
|
||||
typedoc-plugin-mdn-links@5.0.9(typedoc@0.28.12(typescript@5.8.3)):
|
||||
dependencies:
|
||||
typedoc: 0.28.8(typescript@5.8.3)
|
||||
typedoc: 0.28.12(typescript@5.8.3)
|
||||
|
||||
typedoc@0.28.8(typescript@5.8.3):
|
||||
typedoc@0.28.12(typescript@5.8.3):
|
||||
dependencies:
|
||||
'@gerrit0/mini-shiki': 3.8.1
|
||||
'@gerrit0/mini-shiki': 3.12.2
|
||||
lunr: 2.3.9
|
||||
markdown-it: 14.1.0
|
||||
minimatch: 9.0.5
|
||||
typescript: 5.8.3
|
||||
yaml: 2.8.0
|
||||
yaml: 2.8.1
|
||||
|
||||
typescript@5.8.3: {}
|
||||
|
||||
@ -3705,13 +3705,13 @@ snapshots:
|
||||
|
||||
util-deprecate@1.0.2: {}
|
||||
|
||||
vite-node@3.2.4(@types/node@22.16.5)(yaml@2.8.0):
|
||||
vite-node@3.2.4(@types/node@22.16.5)(yaml@2.8.1):
|
||||
dependencies:
|
||||
cac: 6.7.14
|
||||
debug: 4.4.1
|
||||
es-module-lexer: 1.7.0
|
||||
pathe: 2.0.3
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.0)
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.1)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- jiti
|
||||
@ -3726,18 +3726,18 @@ snapshots:
|
||||
- tsx
|
||||
- yaml
|
||||
|
||||
vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.0)):
|
||||
vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.1)):
|
||||
dependencies:
|
||||
debug: 4.4.1
|
||||
globrex: 0.1.2
|
||||
tsconfck: 3.1.6(typescript@5.8.3)
|
||||
optionalDependencies:
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.0)
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
vite@7.0.6(@types/node@22.16.5)(yaml@2.8.0):
|
||||
vite@7.0.6(@types/node@22.16.5)(yaml@2.8.1):
|
||||
dependencies:
|
||||
esbuild: 0.25.8
|
||||
fdir: 6.4.6(picomatch@4.0.3)
|
||||
@ -3748,18 +3748,18 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@types/node': 22.16.5
|
||||
fsevents: 2.3.3
|
||||
yaml: 2.8.0
|
||||
yaml: 2.8.1
|
||||
|
||||
vitest-canvas-mock@0.3.3(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0)):
|
||||
vitest-canvas-mock@0.3.3(vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1)):
|
||||
dependencies:
|
||||
jest-canvas-mock: 2.5.2
|
||||
vitest: 3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0)
|
||||
vitest: 3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1)
|
||||
|
||||
vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.0):
|
||||
vitest@3.2.4(@types/node@22.16.5)(jsdom@26.1.0)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(yaml@2.8.1):
|
||||
dependencies:
|
||||
'@types/chai': 5.2.2
|
||||
'@vitest/expect': 3.2.4
|
||||
'@vitest/mocker': 3.2.4(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.0))
|
||||
'@vitest/mocker': 3.2.4(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(vite@7.0.6(@types/node@22.16.5)(yaml@2.8.1))
|
||||
'@vitest/pretty-format': 3.2.4
|
||||
'@vitest/runner': 3.2.4
|
||||
'@vitest/snapshot': 3.2.4
|
||||
@ -3777,8 +3777,8 @@ snapshots:
|
||||
tinyglobby: 0.2.14
|
||||
tinypool: 1.1.1
|
||||
tinyrainbow: 2.0.0
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.0)
|
||||
vite-node: 3.2.4(@types/node@22.16.5)(yaml@2.8.0)
|
||||
vite: 7.0.6(@types/node@22.16.5)(yaml@2.8.1)
|
||||
vite-node: 3.2.4(@types/node@22.16.5)(yaml@2.8.1)
|
||||
why-is-node-running: 2.3.0
|
||||
optionalDependencies:
|
||||
'@types/node': 22.16.5
|
||||
@ -3862,7 +3862,7 @@ snapshots:
|
||||
|
||||
yallist@3.1.1: {}
|
||||
|
||||
yaml@2.8.0: {}
|
||||
yaml@2.8.1: {}
|
||||
|
||||
yargs-parser@21.1.1: {}
|
||||
|
||||
|
@ -38,6 +38,7 @@ type SerializableArenaTagTypeMap = Pick<ArenaTagTypeMap, SerializableArenaTagTyp
|
||||
|
||||
/**
|
||||
* Type mapping all `ArenaTag`s to type-safe representations of their serialized forms.
|
||||
*
|
||||
* @interface
|
||||
*/
|
||||
export type ArenaTagDataMap = {
|
||||
|
@ -3108,7 +3108,7 @@ export class BattleScene extends SceneBase {
|
||||
* Apply all modifiers that match `modifierType` in a random order
|
||||
* @param modifierType The type of modifier to apply; must extend {@linkcode PersistentModifier}
|
||||
* @param player Whether to search the player (`true`) or the enemy (`false`); Defaults to `true`
|
||||
* @param ...args The list of arguments needed to invoke `modifierType.apply`
|
||||
* @param args The list of arguments needed to invoke `modifierType.apply`
|
||||
* @returns the list of all modifiers that matched `modifierType` and were applied.
|
||||
*/
|
||||
applyShuffledModifiers<T extends PersistentModifier>(
|
||||
@ -3140,7 +3140,7 @@ export class BattleScene extends SceneBase {
|
||||
* Apply all modifiers that match `modifierType`
|
||||
* @param modifierType The type of modifier to apply; must extend {@linkcode PersistentModifier}
|
||||
* @param player Whether to search the player (`true`) or the enemy (`false`); Defaults to `true`
|
||||
* @param ...args The list of arguments needed to invoke `modifierType.apply`
|
||||
* @param args The list of arguments needed to invoke `modifierType.apply`
|
||||
* @returns the list of all modifiers that matched `modifierType` and were applied.
|
||||
*/
|
||||
applyModifiers<T extends PersistentModifier>(
|
||||
@ -3175,7 +3175,7 @@ export class BattleScene extends SceneBase {
|
||||
* Apply the first modifier that matches `modifierType`
|
||||
* @param modifierType The type of modifier to apply; must extend {@linkcode PersistentModifier}
|
||||
* @param player Whether to search the player (`true`) or the enemy (`false`); Defaults to `true`
|
||||
* @param ...args The list of arguments needed to invoke `modifierType.apply`
|
||||
* @param args The list of arguments needed to invoke `modifierType.apply`
|
||||
* @returns the first modifier that matches `modifierType` and was applied; return `null` if none matched
|
||||
*/
|
||||
applyModifier<T extends PersistentModifier>(
|
||||
@ -3323,7 +3323,7 @@ export class BattleScene extends SceneBase {
|
||||
/**
|
||||
* This function retrieves the sprite and audio keys for active Pokemon.
|
||||
* Active Pokemon include both enemy and player Pokemon of the current wave.
|
||||
* Note: Questions on garbage collection go to @frutescens
|
||||
* Note: Questions on garbage collection go to `@frutescens`
|
||||
* @returns a string array of active sprite and audio keys that should not be deleted
|
||||
*/
|
||||
getActiveKeys(): string[] {
|
||||
|
@ -507,7 +507,7 @@ export class ClearWeatherAbAttr extends AbAttr {
|
||||
private weather: WeatherType[];
|
||||
|
||||
/**
|
||||
* @param weather {@linkcode WeatherType[]} - the weather to be removed
|
||||
* @param weather - The weather to be removed
|
||||
*/
|
||||
constructor(weather: WeatherType[]) {
|
||||
super(true);
|
||||
@ -537,7 +537,7 @@ export class ClearTerrainAbAttr extends AbAttr {
|
||||
private terrain: TerrainType[];
|
||||
|
||||
/**
|
||||
* @param terrain {@linkcode TerrainType[]} - the terrain to be removed
|
||||
* @param terrain - the terrain to be removed
|
||||
*/
|
||||
constructor(terrain: TerrainType[]) {
|
||||
super(true);
|
||||
@ -655,7 +655,6 @@ export class ReceivedMoveDamageMultiplierAbAttr extends PreDefendAbAttr {
|
||||
|
||||
/**
|
||||
* Reduces the damage dealt to an allied Pokemon. Used by Friend Guard.
|
||||
* @see {@linkcode applyPreDefend}
|
||||
*/
|
||||
export class AlliedFieldDamageReductionAbAttr extends PreDefendAbAttr {
|
||||
private damageMultiplier: number;
|
||||
@ -691,8 +690,6 @@ export interface TypeMultiplierAbAttrParams extends AugmentMoveInteractionAbAttr
|
||||
|
||||
/**
|
||||
* Determines whether a Pokemon is immune to a move because of an ability.
|
||||
* @see {@linkcode applyPreDefend}
|
||||
* @see {@linkcode getCondition}
|
||||
*/
|
||||
export class TypeImmunityAbAttr extends PreDefendAbAttr {
|
||||
private immuneType: PokemonType | null;
|
||||
@ -842,7 +839,6 @@ export class NonSuperEffectiveImmunityAbAttr extends TypeImmunityAbAttr {
|
||||
/**
|
||||
* Attribute implementing the effects of {@link https://bulbapedia.bulbagarden.net/wiki/Tera_Shell_(Ability) | Tera Shell}
|
||||
* When the source is at full HP, incoming attacks will have a maximum 0.5x type effectiveness multiplier.
|
||||
* @extends PreDefendAbAttr
|
||||
*/
|
||||
export class FullHpResistTypeAbAttr extends PreDefendAbAttr {
|
||||
/**
|
||||
@ -1351,11 +1347,9 @@ export class PostDefendContactDamageAbAttr extends PostDefendAbAttr {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @description: This ability applies the Perish Song tag to the attacking pokemon
|
||||
* This ability applies the Perish Song tag to the attacking pokemon
|
||||
* and the defending pokemon if the move makes physical contact and neither pokemon
|
||||
* already has the Perish Song tag.
|
||||
* @class PostDefendPerishSongAbAttr
|
||||
* @extends {PostDefendAbAttr}
|
||||
*/
|
||||
export class PostDefendPerishSongAbAttr extends PostDefendAbAttr {
|
||||
private turns: number;
|
||||
@ -1961,19 +1955,16 @@ export class PreAttackFieldMoveTypePowerBoostAbAttr extends FieldMovePowerBoostA
|
||||
|
||||
/**
|
||||
* Boosts the power of a specific type of move for all Pokemon in the field.
|
||||
* @extends PreAttackFieldMoveTypePowerBoostAbAttr
|
||||
*/
|
||||
export class FieldMoveTypePowerBoostAbAttr extends PreAttackFieldMoveTypePowerBoostAbAttr {}
|
||||
|
||||
/**
|
||||
* Boosts the power of a specific type of move for the user and its allies.
|
||||
* @extends PreAttackFieldMoveTypePowerBoostAbAttr
|
||||
*/
|
||||
export class UserFieldMoveTypePowerBoostAbAttr extends PreAttackFieldMoveTypePowerBoostAbAttr {}
|
||||
|
||||
/**
|
||||
* Boosts the power of moves in specified categories.
|
||||
* @extends FieldMovePowerBoostAbAttr
|
||||
*/
|
||||
export class AllyMoveCategoryPowerBoostAbAttr extends FieldMovePowerBoostAbAttr {
|
||||
/**
|
||||
@ -2579,7 +2570,6 @@ export class PostIntimidateStatStageChangeAbAttr extends AbAttr {
|
||||
|
||||
/**
|
||||
* Base class for defining all {@linkcode Ability} Attributes post summon
|
||||
* @see {@linkcode applyPostSummon()}
|
||||
*/
|
||||
export abstract class PostSummonAbAttr extends AbAttr {
|
||||
/** Should the ability activate when gained in battle? This will almost always be true */
|
||||
@ -2619,7 +2609,7 @@ export class PostSummonRemoveArenaTagAbAttr extends PostSummonAbAttr {
|
||||
private arenaTags: ArenaTagType[];
|
||||
|
||||
/**
|
||||
* @param arenaTags {@linkcode ArenaTagType[]} - the arena tags to be removed
|
||||
* @param arenaTags - The arena tags to be removed
|
||||
*/
|
||||
constructor(arenaTags: ArenaTagType[]) {
|
||||
super(true);
|
||||
@ -3180,7 +3170,6 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr {
|
||||
/**
|
||||
* Reverts weather-based forms to their normal forms when the user is summoned.
|
||||
* Used by Cloud Nine and Air Lock.
|
||||
* @extends PostSummonAbAttr
|
||||
*/
|
||||
export class PostSummonWeatherSuppressedFormChangeAbAttr extends PostSummonAbAttr {
|
||||
override canApply(_params: AbAttrBaseParams): boolean {
|
||||
@ -3200,7 +3189,6 @@ export class PostSummonWeatherSuppressedFormChangeAbAttr extends PostSummonAbAtt
|
||||
/**
|
||||
* Triggers weather-based form change when summoned into an active weather.
|
||||
* Used by Forecast and Flower Gift.
|
||||
* @extends PostSummonAbAttr
|
||||
*/
|
||||
export class PostSummonFormChangeByWeatherAbAttr extends PostSummonAbAttr {
|
||||
private ability: AbilityId;
|
||||
@ -3382,7 +3370,6 @@ export class PreSwitchOutHealAbAttr extends PreSwitchOutAbAttr {
|
||||
|
||||
/**
|
||||
* Attribute for form changes that occur on switching out
|
||||
* @see {@linkcode applyPreSwitchOut}
|
||||
*/
|
||||
export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr {
|
||||
private formFunc: (p: Pokemon) => number;
|
||||
@ -4249,8 +4236,8 @@ function getAnticipationCondition(): AbAttrCondition {
|
||||
* Creates an ability condition that causes the ability to fail if that ability
|
||||
* has already been used by that pokemon that battle. It requires an ability to
|
||||
* be specified due to current limitations in how conditions on abilities work.
|
||||
* @param {AbilityId} ability The ability to check if it's already been applied
|
||||
* @returns {AbAttrCondition} The condition
|
||||
* @param ability The ability to check if it's already been applied
|
||||
* @returns The condition
|
||||
*/
|
||||
function getOncePerBattleCondition(ability: AbilityId): AbAttrCondition {
|
||||
return (pokemon: Pokemon) => {
|
||||
@ -4641,7 +4628,7 @@ export class PostTurnRestoreBerryAbAttr extends PostTurnAbAttr {
|
||||
|
||||
/**
|
||||
* @param procChance - function providing chance to restore an item
|
||||
* @see {@linkcode createEatenBerry()}
|
||||
* @see {@linkcode createEatenBerry}
|
||||
*/
|
||||
constructor(private procChance: (pokemon: Pokemon) => number) {
|
||||
super();
|
||||
@ -4906,7 +4893,6 @@ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr {
|
||||
/**
|
||||
* Grabs the last failed Pokeball used
|
||||
* @sealed
|
||||
* @see {@linkcode applyPostTurn}
|
||||
*/
|
||||
export class FetchBallAbAttr extends PostTurnAbAttr {
|
||||
override canApply({ simulated, pokemon }: AbAttrBaseParams): boolean {
|
||||
@ -4996,7 +4982,6 @@ export class PostMoveUsedAbAttr extends AbAttr {
|
||||
|
||||
/**
|
||||
* Triggers after a dance move is used either by the opponent or the player
|
||||
* @extends PostMoveUsedAbAttr
|
||||
*/
|
||||
export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr {
|
||||
override canApply({ source, pokemon }: PostMoveUsedAbAttrParams): boolean {
|
||||
@ -5055,7 +5040,6 @@ export class PostDancingMoveAbAttr extends PostMoveUsedAbAttr {
|
||||
|
||||
/**
|
||||
* Triggers after the Pokemon loses or consumes an item
|
||||
* @extends AbAttr
|
||||
*/
|
||||
export class PostItemLostAbAttr extends AbAttr {
|
||||
canApply(_params: Closed<AbAttrBaseParams>): boolean {
|
||||
@ -5226,7 +5210,6 @@ type ArenaTrapCondition = (user: Pokemon, target: Pokemon) => boolean;
|
||||
|
||||
/**
|
||||
* Base class for checking if a Pokemon is trapped by arena trap
|
||||
* @extends AbAttr
|
||||
* @field {@linkcode arenaTrapCondition} Conditional for trapping abilities.
|
||||
* For example, Magnet Pull will only activate if opponent is Steel type.
|
||||
* @see {@linkcode applyCheckTrapped}
|
||||
@ -5562,7 +5545,6 @@ export interface ReduceStatusEffectDurationAbAttrParams extends AbAttrBaseParams
|
||||
/**
|
||||
* Used by Early Bird, makes the pokemon wake up faster
|
||||
* @param statusEffect - The {@linkcode StatusEffect} to check for
|
||||
* @see {@linkcode apply}
|
||||
* @sealed
|
||||
*/
|
||||
export class ReduceStatusEffectDurationAbAttr extends AbAttr {
|
||||
@ -5849,8 +5831,6 @@ export class IgnoreTypeStatusEffectImmunityAbAttr extends AbAttr {
|
||||
|
||||
/**
|
||||
* Gives money to the user after the battle.
|
||||
*
|
||||
* @extends PostBattleAbAttr
|
||||
*/
|
||||
export class MoneyAbAttr extends PostBattleAbAttr {
|
||||
override canApply({ simulated, victory }: PostBattleAbAttrParams): boolean {
|
||||
@ -5954,7 +5934,6 @@ export class FormBlockDamageAbAttr extends ReceivedMoveDamageMultiplierAbAttr {
|
||||
/**
|
||||
* Base class for defining {@linkcode Ability} attributes before summon
|
||||
* (should use {@linkcode PostSummonAbAttr} for most ability)
|
||||
* @see {@linkcode applyPreSummon()}
|
||||
*/
|
||||
export class PreSummonAbAttr extends AbAttr {
|
||||
private declare readonly _: never;
|
||||
@ -6406,8 +6385,6 @@ export class PostDamageAbAttr extends AbAttr {
|
||||
* and its opponents, and determines whether a forced switch-out should occur.
|
||||
*
|
||||
* Used by Wimp Out and Emergency Exit
|
||||
*
|
||||
* @see {@linkcode applyPostDamage}
|
||||
* @sealed
|
||||
*/
|
||||
export class PostDamageForceSwitchAbAttr extends PostDamageAbAttr {
|
||||
|
@ -1132,7 +1132,7 @@ class ImprisonTag extends EntryHazardTag {
|
||||
|
||||
/**
|
||||
* This applies the effects of Imprison to any opposing Pokemon that switch into the field while the source Pokemon is still active
|
||||
* @param {Pokemon} pokemon the Pokemon Imprison is applied to
|
||||
* @param pokemon the Pokemon Imprison is applied to
|
||||
* @returns `true`
|
||||
*/
|
||||
override activateTrap(pokemon: Pokemon): boolean {
|
||||
|
@ -2474,10 +2474,7 @@ export class RemovedTypeTag extends SerializableBattlerTag {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Battler tag for effects that ground the source, allowing Ground-type moves to hit them.
|
||||
* @description `IGNORE_FLYING`: Persistent grounding effects (i.e. from Smack Down and Thousand Waves)
|
||||
*/
|
||||
/** Battler tag for effects that ground the source, allowing Ground-type moves to hit them. */
|
||||
export class GroundedTag extends SerializableBattlerTag {
|
||||
public override readonly tagType = BattlerTagType.IGNORE_FLYING;
|
||||
constructor(tagType: BattlerTagType.IGNORE_FLYING, lapseType: BattlerTagLapseType, sourceMove: MoveId) {
|
||||
@ -2485,11 +2482,7 @@ export class GroundedTag extends SerializableBattlerTag {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description `ROOSTED`: Tag for temporary grounding if only source of ungrounding is flying and pokemon uses Roost.
|
||||
* Roost removes flying type from a pokemon for a single turn.
|
||||
*/
|
||||
|
||||
/** Removes flying type from a pokemon for a single turn */
|
||||
export class RoostedTag extends BattlerTag {
|
||||
private isBaseFlying: boolean;
|
||||
private isBasePureFlying: boolean;
|
||||
@ -2568,7 +2561,7 @@ export class FormBlockDamageTag extends SerializableBattlerTag {
|
||||
/**
|
||||
* Applies the tag to the Pokémon.
|
||||
* Triggers a form change if the Pokémon is not in its defense form.
|
||||
* @param {Pokemon} pokemon The Pokémon to which the tag is added.
|
||||
* @param pokemon The Pokémon to which the tag is added.
|
||||
*/
|
||||
onAdd(pokemon: Pokemon): void {
|
||||
super.onAdd(pokemon);
|
||||
|
@ -57,7 +57,7 @@ export abstract class Challenge {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id {@link Challenges} The enum value for the challenge
|
||||
* @param id - The enum value for the challenge
|
||||
*/
|
||||
constructor(id: Challenges, maxValue: number = Number.MAX_SAFE_INTEGER) {
|
||||
this.id = id;
|
||||
@ -86,9 +86,9 @@ export abstract class Challenge {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for unlockable challenges to check if they're unlocked.
|
||||
* @param data {@link GameData} The save data.
|
||||
* @returns {@link boolean} Whether this challenge is unlocked.
|
||||
* Check if an unlockable challenge is unlocked
|
||||
* @param data - The save data
|
||||
* @returns Whether this challenge is unlocked
|
||||
*/
|
||||
isUnlocked(data: GameData): boolean {
|
||||
return this.conditions.every(f => f(data));
|
||||
@ -96,8 +96,8 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Adds an unlock condition to this challenge.
|
||||
* @param condition {@link ChallengeCondition} The condition to add.
|
||||
* @returns {@link Challenge} This challenge
|
||||
* @param condition - The condition to add
|
||||
* @returns This challenge
|
||||
*/
|
||||
condition(condition: ChallengeCondition): Challenge {
|
||||
this.conditions.push(condition);
|
||||
@ -106,7 +106,7 @@ export abstract class Challenge {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {@link string} The localised name of this challenge.
|
||||
* @returns The localised name of this challenge.
|
||||
*/
|
||||
getName(): string {
|
||||
return i18next.t(`challenges:${this.geti18nKey()}.name`);
|
||||
@ -133,7 +133,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Increase the value of the challenge
|
||||
* @returns {@link boolean} Returns true if the value changed
|
||||
* @returns Returns true if the value changed
|
||||
*/
|
||||
increaseValue(): boolean {
|
||||
if (this.value < this.maxValue) {
|
||||
@ -145,7 +145,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Decrease the value of the challenge
|
||||
* @returns {@link boolean} Returns true if the value changed
|
||||
* @returns Returns true if the value changed
|
||||
*/
|
||||
decreaseValue(): boolean {
|
||||
if (this.value > 0) {
|
||||
@ -164,7 +164,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Decrease the severity of the challenge
|
||||
* @returns {@link boolean} Returns true if the value changed
|
||||
* @returns Returns true if the value changed
|
||||
*/
|
||||
decreaseSeverity(): boolean {
|
||||
if (this.severity > 0) {
|
||||
@ -176,7 +176,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Increase the severity of the challenge
|
||||
* @returns {@link boolean} Returns true if the value changed
|
||||
* @returns Returns true if the value changed
|
||||
*/
|
||||
increaseSeverity(): boolean {
|
||||
if (this.severity < this.maxSeverity) {
|
||||
@ -188,7 +188,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Gets the "difficulty" value of this challenge.
|
||||
* @returns {@link integer} The difficulty value.
|
||||
* @returns The difficulty value.
|
||||
*/
|
||||
getDifficulty(): number {
|
||||
return this.value;
|
||||
@ -196,7 +196,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Gets the minimum difficulty added by this challenge.
|
||||
* @returns {@link integer} The difficulty value.
|
||||
* @returns The difficulty value.
|
||||
*/
|
||||
getMinDifficulty(): number {
|
||||
return 0;
|
||||
@ -204,7 +204,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* Clones a challenge, either from another challenge or json. Chainable.
|
||||
* @param source The source challenge or json.
|
||||
* @param _source - The source challenge or json.
|
||||
* @returns This challenge.
|
||||
*/
|
||||
static loadChallenge(_source: Challenge | any): Challenge {
|
||||
@ -213,10 +213,10 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for STARTER_CHOICE challenges. Derived classes should alter this.
|
||||
* @param _pokemon {@link PokemonSpecies} The pokemon to check the validity of.
|
||||
* @param _valid {@link BooleanHolder} A BooleanHolder, the value gets set to false if the pokemon isn't allowed.
|
||||
* @param _dexAttr {@link DexAttrProps} The dex attributes of the pokemon.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - The Pokémon to check the validity of
|
||||
* @param _valid - Holder for whether the Pokémon is valid or not
|
||||
* @param _dexAttr - The dex attributes of the Pokémon
|
||||
* @returns Whether this function did anything.
|
||||
*/
|
||||
applyStarterChoice(_pokemon: PokemonSpecies, _valid: BooleanHolder, _dexAttr: DexAttrProps): boolean {
|
||||
return false;
|
||||
@ -224,8 +224,8 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for STARTER_POINTS challenges. Derived classes should alter this.
|
||||
* @param _points {@link NumberHolder} The amount of points you have available.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _points - Holder for amount of starter points the user has to spend
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyStarterPoints(_points: NumberHolder): boolean {
|
||||
return false;
|
||||
@ -233,9 +233,9 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for STARTER_COST challenges. Derived classes should alter this.
|
||||
* @param _species {@link SpeciesId} The pokemon to change the cost of.
|
||||
* @param _cost {@link NumberHolder} The cost of the starter.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _species - The pokémon to change the cost of
|
||||
* @param _cost - Holder for the cost of the starter Pokémon
|
||||
* @returns Whether this function did anything.
|
||||
*/
|
||||
applyStarterCost(_species: SpeciesId, _cost: NumberHolder): boolean {
|
||||
return false;
|
||||
@ -243,8 +243,8 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for STARTER_SELECT_MODIFY challenges. Derived classes should alter this.
|
||||
* @param _pokemon {@link Pokemon} The starter pokemon to modify.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - The starter Pokémon to modify.
|
||||
* @returns Whether this function did anything.
|
||||
*/
|
||||
applyStarterSelectModify(_speciesId: SpeciesId, _dexEntry: DexEntry, _starterDataEntry: StarterDataEntry): boolean {
|
||||
return false;
|
||||
@ -252,8 +252,8 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for STARTER_MODIFY challenges. Derived classes should alter this.
|
||||
* @param _pokemon {@link Pokemon} The starter pokemon to modify.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - The starter Pokémon to modify.
|
||||
* @returns Whether this function did anything.
|
||||
*/
|
||||
applyStarterModify(_pokemon: Pokemon): boolean {
|
||||
return false;
|
||||
@ -261,9 +261,9 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for POKEMON_IN_BATTLE challenges. Derived classes should alter this.
|
||||
* @param _pokemon {@link Pokemon} The pokemon to check the validity of.
|
||||
* @param _valid {@link BooleanHolder} A BooleanHolder, the value gets set to false if the pokemon isn't allowed.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - The Pokémon to check the validity of
|
||||
* @param _valid - Holds a boolean that will be set to false if the Pokémon isn't allowed
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyPokemonInBattle(_pokemon: Pokemon, _valid: BooleanHolder): boolean {
|
||||
return false;
|
||||
@ -271,9 +271,9 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for FIXED_BATTLE challenges. Derived classes should alter this.
|
||||
* @param _waveIndex {@link Number} The current wave index.
|
||||
* @param _battleConfig {@link FixedBattleConfig} The battle config to modify.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _waveIndex The current wave index
|
||||
* @param _battleConfig - The battle config to modify
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyFixedBattle(_waveIndex: number, _battleConfig: FixedBattleConfig): boolean {
|
||||
return false;
|
||||
@ -281,8 +281,8 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for TYPE_EFFECTIVENESS challenges. Derived classes should alter this.
|
||||
* @param _effectiveness {@linkcode NumberHolder} The current effectiveness of the move.
|
||||
* @returns Whether this function did anything.
|
||||
* @param _effectiveness - The current effectiveness of the move
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyTypeEffectiveness(_effectiveness: NumberHolder): boolean {
|
||||
return false;
|
||||
@ -290,11 +290,11 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for AI_LEVEL challenges. Derived classes should alter this.
|
||||
* @param _level {@link NumberHolder} The generated level.
|
||||
* @param _levelCap {@link Number} The current level cap.
|
||||
* @param _isTrainer {@link Boolean} Whether this is a trainer pokemon.
|
||||
* @param _isBoss {@link Boolean} Whether this is a non-trainer boss pokemon.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _level - The generated level.
|
||||
* @param _levelCap - The current level cap.
|
||||
* @param _isTrainer - Whether this is a trainer Pokémon
|
||||
* @param _isBoss - Whether this is a non-trainer boss Pokémon
|
||||
* @returns - Whether this function did anything
|
||||
*/
|
||||
applyLevelChange(_level: NumberHolder, _levelCap: number, _isTrainer: boolean, _isBoss: boolean): boolean {
|
||||
return false;
|
||||
@ -302,9 +302,9 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for AI_MOVE_SLOTS challenges. Derived classes should alter this.
|
||||
* @param pokemon {@link Pokemon} The pokemon that is being considered.
|
||||
* @param moveSlots {@link NumberHolder} The amount of move slots.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - The Pokémon that is being considered
|
||||
* @param _moveSlots - The amount of move slots
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyMoveSlot(_pokemon: Pokemon, _moveSlots: NumberHolder): boolean {
|
||||
return false;
|
||||
@ -312,9 +312,9 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for PASSIVE_ACCESS challenges. Derived classes should alter this.
|
||||
* @param pokemon {@link Pokemon} The pokemon to change.
|
||||
* @param hasPassive {@link BooleanHolder} Whether it should have its passive.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - The Pokémon to change
|
||||
* @param _hasPassive - Whether it should have its passive
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyPassiveAccess(_pokemon: Pokemon, _hasPassive: BooleanHolder): boolean {
|
||||
return false;
|
||||
@ -322,7 +322,7 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for GAME_MODE_MODIFY challenges. Derived classes should alter this.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyGameModeModify(): boolean {
|
||||
return false;
|
||||
@ -330,11 +330,11 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for MOVE_ACCESS. Derived classes should alter this.
|
||||
* @param _pokemon {@link Pokemon} What pokemon would learn the move.
|
||||
* @param _moveSource {@link MoveSourceType} What source the pokemon would get the move from.
|
||||
* @param _move {@link MoveId} The move in question.
|
||||
* @param _level {@link NumberHolder} The level threshold for access.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - What Pokémon would learn the move
|
||||
* @param _moveSource - What source the Pokémon would get the move from
|
||||
* @param _move - The move in question
|
||||
* @param _level - The level threshold for access
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyMoveAccessLevel(_pokemon: Pokemon, _moveSource: MoveSourceType, _move: MoveId, _level: NumberHolder): boolean {
|
||||
return false;
|
||||
@ -342,21 +342,21 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for MOVE_WEIGHT. Derived classes should alter this.
|
||||
* @param _pokemon {@link Pokemon} What pokemon would learn the move.
|
||||
* @param _moveSource {@link MoveSourceType} What source the pokemon would get the move from.
|
||||
* @param _move {@link MoveId} The move in question.
|
||||
* @param _weight {@link NumberHolder} The base weight of the move
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - What Pokémon would learn the move
|
||||
* @param _moveSource - What source the Pokémon would get the move from
|
||||
* @param _move - The move in question.
|
||||
* @param _weight - The base weight of the move
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyMoveWeight(_pokemon: Pokemon, _moveSource: MoveSourceType, _move: MoveId, _level: NumberHolder): boolean {
|
||||
applyMoveWeight(_pokemon: Pokemon, _moveSource: MoveSourceType, _move: MoveId, _weight: NumberHolder): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* An apply function for FlipStats. Derived classes should alter this.
|
||||
* @param _pokemon {@link Pokemon} What pokemon would learn the move.
|
||||
* @param _baseStats What are the stats to flip.
|
||||
* @returns {@link boolean} Whether this function did anything.
|
||||
* @param _pokemon - What Pokémon would learn the move
|
||||
* @param _baseStats What are the stats to flip
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyFlipStat(_pokemon: Pokemon, _baseStats: number[]) {
|
||||
return false;
|
||||
@ -382,9 +382,9 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for POKEMON_ADD_TO_PARTY. Derived classes should alter this.
|
||||
* @param _pokemon - The pokemon being caught
|
||||
* @param _status - Whether the pokemon can be added to the party or not
|
||||
* @return Whether this function did anything
|
||||
* @param _pokemon - The Pokémon being caught
|
||||
* @param _status - Whether the Pokémon can be added to the party or not
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyPokemonAddToParty(_pokemon: EnemyPokemon, _status: BooleanHolder): boolean {
|
||||
return false;
|
||||
@ -392,8 +392,8 @@ export abstract class Challenge {
|
||||
|
||||
/**
|
||||
* An apply function for POKEMON_FUSION. Derived classes should alter this.
|
||||
* @param _pokemon - The pokemon being checked
|
||||
* @param _status - Whether the selected pokemon is allowed to fuse or not
|
||||
* @param _pokemon - The Pokémon being checked
|
||||
* @param _status - Whether the selected Pokémon is allowed to fuse or not
|
||||
* @returns Whether this function did anything
|
||||
*/
|
||||
applyPokemonFusion(_pokemon: PlayerPokemon, _status: BooleanHolder): boolean {
|
||||
@ -671,10 +671,7 @@ export class SingleGenerationChallenge extends Challenge {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @overrides
|
||||
*/
|
||||
getDifficulty(): number {
|
||||
override getDifficulty(): number {
|
||||
return this.value > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@ -757,10 +754,7 @@ export class SingleTypeChallenge extends Challenge {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @overrides
|
||||
*/
|
||||
getDifficulty(): number {
|
||||
override getDifficulty(): number {
|
||||
return this.value > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
|
@ -643,9 +643,9 @@ export abstract class Move implements Localizable {
|
||||
* will not consider {@linkcode AbilityId.WIND_RIDER | Wind Rider }.
|
||||
*
|
||||
* To simply check whether the move has a flag, use {@linkcode hasFlag}.
|
||||
* @param flag {@linkcode MoveFlags} MoveFlag to check on user and/or target
|
||||
* @param user {@linkcode Pokemon} the Pokemon using the move
|
||||
* @param target {@linkcode Pokemon} the Pokemon receiving the move
|
||||
* @param flag - MoveFlag to check on user and/or target
|
||||
* @param user - the Pokemon using the move
|
||||
* @param target - the Pokemon receiving the move
|
||||
* @param isFollowUp (defaults to `false`) `true` if the move was used as a follow up
|
||||
* @returns boolean
|
||||
* @see {@linkcode hasFlag}
|
||||
@ -1143,11 +1143,7 @@ function ChargeMove<TBase extends SubMove>(Base: TBase, nameAppend: string) {
|
||||
export class ChargingAttackMove extends ChargeMove(AttackMove, "ChargingAttackMove") {}
|
||||
export class ChargingSelfStatusMove extends ChargeMove(SelfStatusMove, "ChargingSelfStatusMove") {}
|
||||
|
||||
/**
|
||||
* Base class defining all {@linkcode Move} Attributes
|
||||
* @abstract
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
/** Base class defining all {@linkcode Move} Attributes */
|
||||
export abstract class MoveAttr {
|
||||
/** Should this {@linkcode Move} target the user? */
|
||||
public selfTarget: boolean;
|
||||
@ -1243,8 +1239,6 @@ interface MoveEffectAttrOptions {
|
||||
|
||||
/**
|
||||
* Base class defining all Move Effect Attributes
|
||||
* @extends MoveAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class MoveEffectAttr extends MoveAttr {
|
||||
/**
|
||||
@ -1460,7 +1454,6 @@ export class PreMoveMessageAttr extends MoveAttr {
|
||||
* Attribute for moves that can be conditionally interrupted to be considered to
|
||||
* have failed before their "useMove" message is displayed. Currently used by
|
||||
* Focus Punch.
|
||||
* @extends MoveAttr
|
||||
*/
|
||||
export class PreUseInterruptAttr extends MoveAttr {
|
||||
protected message: string | MoveMessageFunc;
|
||||
@ -1504,7 +1497,6 @@ export class PreUseInterruptAttr extends MoveAttr {
|
||||
/**
|
||||
* Attribute for Status moves that take attack type effectiveness
|
||||
* into consideration (i.e. {@linkcode https://bulbapedia.bulbagarden.net/wiki/Thunder_Wave_(move) | Thunder Wave})
|
||||
* @extends MoveAttr
|
||||
*/
|
||||
export class RespectAttackTypeImmunityAttr extends MoveAttr { }
|
||||
|
||||
@ -1788,9 +1780,7 @@ export class RecoilAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Attribute used for moves which self KO the user regardless if the move hits a target
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
**/
|
||||
*/
|
||||
export class SacrificialAttr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
super(true, { trigger: MoveEffectTrigger.POST_TARGET });
|
||||
@ -1821,9 +1811,7 @@ export class SacrificialAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Attribute used for moves which self KO the user but only if the move hits a target
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
**/
|
||||
*/
|
||||
export class SacrificialAttrOnHit extends MoveEffectAttr {
|
||||
constructor() {
|
||||
super(true);
|
||||
@ -1860,8 +1848,6 @@ export class SacrificialAttrOnHit extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute used for moves which cut the user's Max HP in half.
|
||||
* Triggers using {@linkcode MoveEffectTrigger.POST_TARGET}.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class HalfSacrificialAttr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
@ -1961,8 +1947,6 @@ export class AddSubstituteAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Heals the user or target by {@linkcode healRatio} depending on the value of {@linkcode selfTarget}
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class HealAttr extends MoveEffectAttr {
|
||||
constructor(
|
||||
@ -2051,8 +2035,6 @@ export class RestAttr extends HealAttr {
|
||||
|
||||
/**
|
||||
* Cures the user's party of non-volatile status conditions, ie. Heal Bell, Aromatherapy
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class PartyStatusCureAttr extends MoveEffectAttr {
|
||||
/** Message to display after using move */
|
||||
@ -2111,7 +2093,6 @@ export class PartyStatusCureAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Applies damage to the target's ally equal to 1/16 of that ally's max HP.
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
export class FlameBurstAttr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
@ -2200,8 +2181,6 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr {
|
||||
/**
|
||||
* Attribute used for moves which ignore type-based debuffs from weather, namely Hydro Steam.
|
||||
* Called during damage calculation after getting said debuff from getAttackTypeMultiplier in the Pokemon class.
|
||||
* @extends MoveAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class IgnoreWeatherTypeDebuffAttr extends MoveAttr {
|
||||
/** The {@linkcode WeatherType} this move ignores */
|
||||
@ -2280,8 +2259,6 @@ export class SandHealAttr extends WeatherHealAttr {
|
||||
/**
|
||||
* Heals the target or the user by either {@linkcode normalHealRatio} or {@linkcode boostedHealRatio}
|
||||
* depending on the evaluation of {@linkcode condition}
|
||||
* @extends HealAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class BoostHealAttr extends HealAttr {
|
||||
/** Healing received when {@linkcode condition} is false */
|
||||
@ -2314,8 +2291,6 @@ export class BoostHealAttr extends HealAttr {
|
||||
|
||||
/**
|
||||
* Heals the target only if it is the ally
|
||||
* @extends HealAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class HealOnAllyAttr extends HealAttr {
|
||||
override canApply(user: Pokemon, target: Pokemon, _move: Move, _args?: any[]): boolean {
|
||||
@ -2334,9 +2309,6 @@ export class HealOnAllyAttr extends HealAttr {
|
||||
/**
|
||||
* Heals user as a side effect of a move that hits a target.
|
||||
* Healing is based on {@linkcode healRatio} * the amount of damage dealt or a stat of the target.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
* @see {@linkcode getUserBenefitScore}
|
||||
*/
|
||||
// TODO: Make Strength Sap its own attribute that extends off of this one
|
||||
export class HitHealAttr extends MoveEffectAttr {
|
||||
@ -2406,8 +2378,6 @@ export class HitHealAttr extends MoveEffectAttr {
|
||||
* Attribute used for moves that change priority in a turn given a condition,
|
||||
* e.g. Grassy Glide
|
||||
* Called when move order is calculated in {@linkcode TurnStartPhase}.
|
||||
* @extends MoveAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class IncrementMovePriorityAttr extends MoveAttr {
|
||||
/** The condition for a move's priority being incremented */
|
||||
@ -2443,10 +2413,8 @@ export class IncrementMovePriorityAttr extends MoveAttr {
|
||||
/**
|
||||
* Attribute used for attack moves that hit multiple times per use, e.g. Bullet Seed.
|
||||
*
|
||||
* @remarks
|
||||
* Applied at the beginning of {@linkcode MoveEffectPhase}.
|
||||
*
|
||||
* @extends MoveAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class MultiHitAttr extends MoveAttr {
|
||||
/** This move's intrinsic multi-hit type. It should never be modified. */
|
||||
@ -2956,8 +2924,6 @@ export class StealEatBerryAttr extends EatBerryAttr {
|
||||
|
||||
/**
|
||||
* Move attribute that signals that the move should cure a status effect
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply()}
|
||||
*/
|
||||
export class HealStatusEffectAttr extends MoveEffectAttr {
|
||||
/** List of Status Effects to cure */
|
||||
@ -3040,8 +3006,6 @@ export class BypassSleepAttr extends MoveAttr {
|
||||
/**
|
||||
* Attribute used for moves that bypass the burn damage reduction of physical moves, currently only facade
|
||||
* Called during damage calculation
|
||||
* @extends MoveAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class BypassBurnDamageReductionAttr extends MoveAttr {
|
||||
/** Prevents the move's damage from being reduced by burn
|
||||
@ -3150,7 +3114,6 @@ export class OneHitKOAttr extends MoveAttr {
|
||||
/**
|
||||
* Attribute that allows charge moves to resolve in 1 turn under a given condition.
|
||||
* Should only be used for {@linkcode ChargingMove | ChargingMoves} as a `chargeAttr`.
|
||||
* @extends MoveAttr
|
||||
*/
|
||||
export class InstantChargeAttr extends MoveAttr {
|
||||
/** The condition in which the move with this attribute instantly charges */
|
||||
@ -3187,7 +3150,6 @@ export class InstantChargeAttr extends MoveAttr {
|
||||
/**
|
||||
* Attribute that allows charge moves to resolve in 1 turn while specific {@linkcode WeatherType | Weather}
|
||||
* is active. Should only be used for {@linkcode ChargingMove | ChargingMoves} as a `chargeAttr`.
|
||||
* @extends InstantChargeAttr
|
||||
*/
|
||||
export class WeatherInstantChargeAttr extends InstantChargeAttr {
|
||||
constructor(weatherTypes: WeatherType[]) {
|
||||
@ -3317,7 +3279,6 @@ export class WishAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute that cancels the associated move's effects when set to be combined with the user's ally's
|
||||
* subsequent move this turn. Used for Grass Pledge, Water Pledge, and Fire Pledge.
|
||||
* @extends OverrideMoveEffectAttr
|
||||
*/
|
||||
export class AwaitCombinedPledgeAttr extends OverrideMoveEffectAttr {
|
||||
constructor() {
|
||||
@ -3372,7 +3333,6 @@ export class AwaitCombinedPledgeAttr extends OverrideMoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Set of optional parameters that may be applied to stat stage changing effects
|
||||
* @extends MoveEffectAttrOptions
|
||||
* @see {@linkcode StatStageChangeAttr}
|
||||
*/
|
||||
interface StatStageChangeAttrOptions extends MoveEffectAttrOptions {
|
||||
@ -3389,9 +3349,6 @@ interface StatStageChangeAttrOptions extends MoveEffectAttrOptions {
|
||||
* @param stages How many stages to change the stat(s) by, [-6, 6]
|
||||
* @param selfTarget `true` if the move is self-targetting
|
||||
* @param options {@linkcode StatStageChangeAttrOptions} Container for any optional parameters for this attribute.
|
||||
*
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class StatStageChangeAttr extends MoveEffectAttr {
|
||||
public stats: BattleStat[];
|
||||
@ -3822,8 +3779,6 @@ export class ResetStatsAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute used for status moves, specifically Heart, Guard, and Power Swap,
|
||||
* that swaps the user's and target's corresponding stat stages.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class SwapStatStagesAttr extends MoveEffectAttr {
|
||||
/** The stat stages to be swapped between the user and the target */
|
||||
@ -4111,8 +4066,6 @@ export class WeightPowerAttr extends VariablePowerAttr {
|
||||
|
||||
/**
|
||||
* Attribute used for Electro Ball move.
|
||||
* @extends VariablePowerAttr
|
||||
* @see {@linkcode apply}
|
||||
**/
|
||||
export class ElectroBallPowerAttr extends VariablePowerAttr {
|
||||
/**
|
||||
@ -4146,8 +4099,6 @@ export class ElectroBallPowerAttr extends VariablePowerAttr {
|
||||
|
||||
/**
|
||||
* Attribute used for Gyro Ball move.
|
||||
* @extends VariablePowerAttr
|
||||
* @see {@linkcode apply}
|
||||
**/
|
||||
export class GyroBallPowerAttr extends VariablePowerAttr {
|
||||
/**
|
||||
@ -4403,11 +4354,11 @@ const countPositiveStatStages = (pokemon: Pokemon): number => {
|
||||
export class PositiveStatStagePowerAttr extends VariablePowerAttr {
|
||||
|
||||
/**
|
||||
* @param {Pokemon} user The pokemon that is being used to calculate the amount of positive stats
|
||||
* @param {Pokemon} target N/A
|
||||
* @param {Move} move N/A
|
||||
* @param {any[]} args The argument for VariablePowerAttr, accumulates and sets the amount of power multiplied by stats
|
||||
* @returns {boolean} Returns true if attribute is applied
|
||||
* @param user The pokemon that is being used to calculate the amount of positive stats
|
||||
* @param target N/A
|
||||
* @param move N/A
|
||||
* @param args The argument for VariablePowerAttr, accumulates and sets the amount of power multiplied by stats
|
||||
* @returns Returns true if attribute is applied
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const positiveStatStages: number = countPositiveStatStages(user);
|
||||
@ -4427,10 +4378,10 @@ export class PunishmentPowerAttr extends VariablePowerAttr {
|
||||
private PUNISHMENT_MAX_BASE_POWER = 200;
|
||||
|
||||
/**
|
||||
* @param {Pokemon} user N/A
|
||||
* @param {Pokemon} target The pokemon that the move is being used against, as well as calculating the stats for the min/max base power
|
||||
* @param {Move} move N/A
|
||||
* @param {any[]} args The value that is being changed due to VariablePowerAttr
|
||||
* @param user N/A
|
||||
* @param target The pokemon that the move is being used against, as well as calculating the stats for the min/max base power
|
||||
* @param move N/A
|
||||
* @param args The value that is being changed due to VariablePowerAttr
|
||||
* @returns Returns true if attribute is applied
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -4546,8 +4497,6 @@ const hasStockpileStacksCondition: MoveConditionFunc = (user) => {
|
||||
/**
|
||||
* Attribute used for multi-hit moves that increase power in increments of the
|
||||
* move's base power for each hit, namely Triple Kick and Triple Axel.
|
||||
* @extends VariablePowerAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class MultiHitPowerIncrementAttr extends VariablePowerAttr {
|
||||
/** The max number of base power increments allowed for this move */
|
||||
@ -4584,8 +4533,6 @@ export class MultiHitPowerIncrementAttr extends VariablePowerAttr {
|
||||
* Attribute used for moves that double in power if the given move immediately
|
||||
* preceded the move applying the attribute, namely Fusion Flare and
|
||||
* Fusion Bolt.
|
||||
* @extends VariablePowerAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class LastMoveDoublePowerAttr extends VariablePowerAttr {
|
||||
/** The move that must precede the current move */
|
||||
@ -4688,7 +4635,6 @@ export class CombinedPledgeStabBoostAttr extends MoveAttr {
|
||||
/**
|
||||
* Variable Power attribute for {@link https://bulbapedia.bulbagarden.net/wiki/Round_(move) | Round}.
|
||||
* Doubles power if another Pokemon has previously selected Round this turn.
|
||||
* @extends VariablePowerAttr
|
||||
*/
|
||||
export class RoundPowerAttr extends VariablePowerAttr {
|
||||
override apply(user: Pokemon, target: Pokemon, move: Move, args: [NumberHolder]): boolean {
|
||||
@ -4706,8 +4652,6 @@ export class RoundPowerAttr extends VariablePowerAttr {
|
||||
* Attribute for the "combo" effect of {@link https://bulbapedia.bulbagarden.net/wiki/Round_(move) | Round}.
|
||||
* Preempts the next move in the turn order with the first instance of any Pokemon
|
||||
* using Round. Also marks the Pokemon using the cued Round to double the move's power.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode RoundPowerAttr}
|
||||
*/
|
||||
export class CueNextRoundAttr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
@ -4909,8 +4853,6 @@ export class StormAccuracyAttr extends VariableAccuracyAttr {
|
||||
/**
|
||||
* Attribute used for moves which never miss
|
||||
* against Pokemon with the {@linkcode BattlerTagType.MINIMIZED}
|
||||
* @extends VariableAccuracyAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class AlwaysHitMinimizeAttr extends VariableAccuracyAttr {
|
||||
/**
|
||||
@ -4983,9 +4925,8 @@ export class PhotonGeyserCategoryAttr extends VariableMoveCategoryAttr {
|
||||
* Attribute used for tera moves that change category based on the user's Atk and SpAtk stats
|
||||
* Note: Currently, `getEffectiveStat` does not ignore all abilities that affect stats except those
|
||||
* with the attribute of `StatMultiplierAbAttr`
|
||||
* TODO: Remove the `.partial()` tag from Tera Blast and Tera Starstorm when the above issue is resolved
|
||||
* @extends VariableMoveCategoryAttr
|
||||
*/
|
||||
// TODO: Remove the `.partial()` tag from Tera Blast and Tera Starstorm when the above issue is resolved
|
||||
export class TeraMoveCategoryAttr extends VariableMoveCategoryAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const category = (args[0] as NumberHolder);
|
||||
@ -5002,7 +4943,6 @@ export class TeraMoveCategoryAttr extends VariableMoveCategoryAttr {
|
||||
|
||||
/**
|
||||
* Increases the power of Tera Blast if the user is Terastallized into Stellar type
|
||||
* @extends VariablePowerAttr
|
||||
*/
|
||||
export class TeraBlastPowerAttr extends VariablePowerAttr {
|
||||
/**
|
||||
@ -5029,8 +4969,6 @@ export class TeraBlastPowerAttr extends VariablePowerAttr {
|
||||
|
||||
/**
|
||||
* Change the move category to status when used on the ally
|
||||
* @extends VariableMoveCategoryAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class StatusCategoryOnAllyAttr extends VariableMoveCategoryAttr {
|
||||
/**
|
||||
@ -5262,8 +5200,6 @@ export class WeatherBallTypeAttr extends VariableMoveTypeAttr {
|
||||
/**
|
||||
* Changes the move's type to match the current terrain.
|
||||
* Has no effect if the user is not grounded.
|
||||
* @extends VariableMoveTypeAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class TerrainPulseTypeAttr extends VariableMoveTypeAttr {
|
||||
/**
|
||||
@ -5311,7 +5247,6 @@ export class TerrainPulseTypeAttr extends VariableMoveTypeAttr {
|
||||
|
||||
/**
|
||||
* Changes type based on the user's IVs
|
||||
* @extends VariableMoveTypeAttr
|
||||
*/
|
||||
export class HiddenPowerTypeAttr extends VariableMoveTypeAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -5339,7 +5274,6 @@ export class HiddenPowerTypeAttr extends VariableMoveTypeAttr {
|
||||
|
||||
/**
|
||||
* Changes the type of Tera Blast to match the user's tera type
|
||||
* @extends VariableMoveTypeAttr
|
||||
*/
|
||||
export class TeraBlastTypeAttr extends VariableMoveTypeAttr {
|
||||
/**
|
||||
@ -5366,7 +5300,6 @@ export class TeraBlastTypeAttr extends VariableMoveTypeAttr {
|
||||
|
||||
/**
|
||||
* Attribute used for Tera Starstorm that changes the move type to Stellar
|
||||
* @extends VariableMoveTypeAttr
|
||||
*/
|
||||
export class TeraStarstormTypeAttr extends VariableMoveTypeAttr {
|
||||
/**
|
||||
@ -5412,7 +5345,6 @@ export class MatchUserTypeAttr extends VariableMoveTypeAttr {
|
||||
|
||||
/**
|
||||
* Changes the type of a Pledge move based on the Pledge move combined with it.
|
||||
* @extends VariableMoveTypeAttr
|
||||
*/
|
||||
export class CombinedPledgeTypeAttr extends VariableMoveTypeAttr {
|
||||
override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -5550,10 +5482,10 @@ export class SheerColdAccuracyAttr extends OneHitKOAccuracyAttr {
|
||||
/**
|
||||
* Changes the normal One Hit KO Accuracy Attr to implement the Gen VII changes,
|
||||
* where if the user is Ice-Type, it has more accuracy.
|
||||
* @param {Pokemon} user Pokemon that is using the move; checks the Pokemon's level.
|
||||
* @param {Pokemon} target Pokemon that is receiving the move; checks the Pokemon's level.
|
||||
* @param {Move} move N/A
|
||||
* @param {any[]} args Uses the accuracy argument, allowing to change it from either 0 if it doesn't pass
|
||||
* @param user Pokemon that is using the move; checks the Pokemon's level.
|
||||
* @param target Pokemon that is receiving the move; checks the Pokemon's level.
|
||||
* @param move N/A
|
||||
* @param args Uses the accuracy argument, allowing to change it from either 0 if it doesn't pass
|
||||
* the first if/else, or 30/20 depending on the type of the user Pokemon.
|
||||
* @returns Returns true if move is successful, false if misses.
|
||||
*/
|
||||
@ -5668,7 +5600,6 @@ export class FrenzyAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute that grants {@link https://bulbapedia.bulbagarden.net/wiki/Semi-invulnerable_turn | semi-invulnerability} to the user during
|
||||
* the associated move's charging phase. Should only be used for {@linkcode ChargingMove | ChargingMoves} as a `chargeAttr`.
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
export class SemiInvulnerableAttr extends MoveEffectAttr {
|
||||
/** The type of {@linkcode SemiInvulnerableTag} to grant to the user */
|
||||
@ -5794,7 +5725,6 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Adds a {@link https://bulbapedia.bulbagarden.net/wiki/Seeding | Seeding} effect to the target
|
||||
* as seen with Leech Seed and Sappy Seed.
|
||||
* @extends AddBattlerTagAttr
|
||||
*/
|
||||
export class LeechSeedAttr extends AddBattlerTagAttr {
|
||||
constructor() {
|
||||
@ -5804,7 +5734,6 @@ export class LeechSeedAttr extends AddBattlerTagAttr {
|
||||
|
||||
/**
|
||||
* Adds the appropriate battler tag for Smack Down and Thousand arrows
|
||||
* @extends AddBattlerTagAttr
|
||||
*/
|
||||
export class FallDownAttr extends AddBattlerTagAttr {
|
||||
constructor() {
|
||||
@ -5829,7 +5758,6 @@ export class FallDownAttr extends AddBattlerTagAttr {
|
||||
|
||||
/**
|
||||
* Adds the appropriate battler tag for Gulp Missile when Surf or Dive is used.
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
export class GulpMissileTagAttr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
@ -5869,7 +5797,6 @@ export class GulpMissileTagAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Attribute to implement Jaw Lock's linked trapping effect between the user and target
|
||||
* @extends AddBattlerTagAttr
|
||||
*/
|
||||
export class JawLockAttr extends AddBattlerTagAttr {
|
||||
constructor() {
|
||||
@ -6035,7 +5962,6 @@ export class ProtectAttr extends AddBattlerTagAttr {
|
||||
|
||||
/**
|
||||
* Attribute to remove all Substitutes from the field.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@link https://bulbapedia.bulbagarden.net/wiki/Tidy_Up_(move) | Tidy Up}
|
||||
* @see {@linkcode SubstituteTag}
|
||||
*/
|
||||
@ -6067,7 +5993,6 @@ export class RemoveAllSubstitutesAttr extends MoveEffectAttr {
|
||||
* Attribute used when a move can deal damage to {@linkcode BattlerTagType}
|
||||
* Moves that always hit but do not deal double damage: Thunder, Fissure, Sky Uppercut,
|
||||
* Smack Down, Hurricane, Thousand Arrows
|
||||
* @extends MoveAttr
|
||||
*/
|
||||
export class HitsTagAttr extends MoveAttr {
|
||||
/** The {@linkcode BattlerTagType} this move hits */
|
||||
@ -6181,8 +6106,6 @@ export class AddArenaTrapTagAttr extends AddArenaTagAttr {
|
||||
/**
|
||||
* Attribute used for Stone Axe and Ceaseless Edge.
|
||||
* Applies the given ArenaTrapTag when move is used.
|
||||
* @extends AddArenaTagAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class AddArenaTrapTagHitAttr extends AddArenaTagAttr {
|
||||
/**
|
||||
@ -6275,10 +6198,7 @@ export class RemoveScreensAttr extends MoveEffectAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/*Swaps arena effects between the player and enemy side
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
/** Swaps arena effects between the player and enemy side */
|
||||
export class SwapArenaTagsAttr extends MoveEffectAttr {
|
||||
public SwapTags: ArenaTagType[];
|
||||
|
||||
@ -6344,8 +6264,6 @@ export class AddPledgeEffectAttr extends AddArenaTagAttr {
|
||||
|
||||
/**
|
||||
* Attribute used for Revival Blessing.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class RevivalBlessingAttr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
@ -6410,7 +6328,6 @@ export class RevivalBlessingAttr extends MoveEffectAttr {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export class ForceSwitchOutAttr extends MoveEffectAttr {
|
||||
constructor(
|
||||
private selfSwitch: boolean = false,
|
||||
@ -6769,7 +6686,7 @@ export class CopyBiomeTypeAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Retrieves a type from the current terrain
|
||||
* @param terrainType {@linkcode TerrainType}
|
||||
* @returns {@linkcode Type}
|
||||
* @returns
|
||||
*/
|
||||
private getTypeForTerrain(terrainType: TerrainType): PokemonType {
|
||||
switch (terrainType) {
|
||||
@ -6790,7 +6707,7 @@ export class CopyBiomeTypeAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Retrieves a type from the current biome
|
||||
* @param biomeType {@linkcode BiomeId}
|
||||
* @returns {@linkcode Type}
|
||||
* @returns
|
||||
*/
|
||||
private getTypeForBiome(biomeType: BiomeId): PokemonType {
|
||||
switch (biomeType) {
|
||||
@ -6923,8 +6840,6 @@ export class FirstMoveTypeAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute used to call a move.
|
||||
* Used by other move attributes: {@linkcode RandomMoveAttr}, {@linkcode RandomMovesetMoveAttr}, {@linkcode CopyMoveAttr}
|
||||
* @see {@linkcode apply} for move call
|
||||
* @extends OverrideMoveEffectAttr
|
||||
*/
|
||||
class CallMoveAttr extends OverrideMoveEffectAttr {
|
||||
protected invalidMoves: ReadonlySet<MoveId>;
|
||||
@ -6956,8 +6871,6 @@ class CallMoveAttr extends OverrideMoveEffectAttr {
|
||||
/**
|
||||
* Attribute used to call a random move.
|
||||
* Used for {@linkcode MoveId.METRONOME}
|
||||
* @see {@linkcode apply} for move selection and move call
|
||||
* @extends CallMoveAttr to call a selected move
|
||||
*/
|
||||
export class RandomMoveAttr extends CallMoveAttr {
|
||||
constructor(invalidMoves: ReadonlySet<MoveId>) {
|
||||
@ -7005,8 +6918,6 @@ export class RandomMoveAttr extends CallMoveAttr {
|
||||
* Fails if the user has no callable moves.
|
||||
*
|
||||
* Invalid moves are indicated by what is passed in to invalidMoves: {@linkcode invalidAssistMoves} or {@linkcode invalidSleepTalkMoves}
|
||||
* @extends RandomMoveAttr to use the callMove function on a moveId
|
||||
* @see {@linkcode getCondition} for move selection
|
||||
*/
|
||||
export class RandomMovesetMoveAttr extends CallMoveAttr {
|
||||
private includeParty: boolean;
|
||||
@ -7192,8 +7103,6 @@ export class NaturePowerAttr extends OverrideMoveEffectAttr {
|
||||
/**
|
||||
* Attribute used to copy a previously-used move.
|
||||
* Used for {@linkcode MoveId.COPYCAT} and {@linkcode MoveId.MIRROR_MOVE}
|
||||
* @see {@linkcode apply} for move selection and move call
|
||||
* @extends CallMoveAttr to call a selected move
|
||||
*/
|
||||
export class CopyMoveAttr extends CallMoveAttr {
|
||||
private mirrorMove: boolean;
|
||||
@ -7529,11 +7438,11 @@ export class SketchAttr extends MoveEffectAttr {
|
||||
}
|
||||
/**
|
||||
* User copies the opponent's last used move, if possible
|
||||
* @param {Pokemon} user Pokemon that used the move and will replace Sketch with the copied move
|
||||
* @param {Pokemon} target Pokemon that the user wants to copy a move from
|
||||
* @param {Move} move Move being used
|
||||
* @param {any[]} args Unused
|
||||
* @returns {boolean} true if the function succeeds, otherwise false
|
||||
* @param user Pokemon that used the move and will replace Sketch with the copied move
|
||||
* @param target Pokemon that the user wants to copy a move from
|
||||
* @param move Move being used
|
||||
* @param args Unused
|
||||
* @returns true if the function succeeds, otherwise false
|
||||
*/
|
||||
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -7696,10 +7605,6 @@ export class SwitchAbilitiesAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute used for moves that suppress abilities like {@linkcode MoveId.GASTRO_ACID}.
|
||||
* A suppressed ability cannot be activated.
|
||||
*
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
* @see {@linkcode getCondition}
|
||||
*/
|
||||
export class SuppressAbilitiesAttr extends MoveEffectAttr {
|
||||
/** Sets ability suppression for the target pokemon and displays a message. */
|
||||
@ -7725,8 +7630,7 @@ export class SuppressAbilitiesAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Applies the effects of {@linkcode SuppressAbilitiesAttr} if the target has already moved this turn.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode MoveId.CORE_ENFORCER} (the move which uses this effect)
|
||||
* @see {@linkcode MoveId.CORE_ENFORCER}
|
||||
*/
|
||||
export class SuppressAbilitiesIfActedAttr extends MoveEffectAttr {
|
||||
/**
|
||||
@ -7775,8 +7679,6 @@ export class TransformAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute used for status moves, namely Speed Swap,
|
||||
* that swaps the user's and target's corresponding stats.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class SwapStatAttr extends MoveEffectAttr {
|
||||
/** The stat to be swapped between the user and the target */
|
||||
@ -7817,7 +7719,6 @@ export class SwapStatAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Attribute used to switch the user's own stats.
|
||||
* Used by Power Shift.
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
export class ShiftStatAttr extends MoveEffectAttr {
|
||||
private statToSwitch: EffectiveStat;
|
||||
@ -7832,7 +7733,7 @@ export class ShiftStatAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Switches the user's stats based on the {@linkcode statToSwitch} and {@linkcode statToSwitchWith} attributes.
|
||||
* @param {Pokemon} user the {@linkcode Pokemon} that used the move
|
||||
* @param user the {@linkcode Pokemon} that used the move
|
||||
* @param target n/a
|
||||
* @param move n/a
|
||||
* @param args n/a
|
||||
@ -7860,7 +7761,7 @@ export class ShiftStatAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* Encourages the user to use the move if the stat to switch with is greater than the stat to switch.
|
||||
* @param {Pokemon} user the {@linkcode Pokemon} that used the move
|
||||
* @param user the {@linkcode Pokemon} that used the move
|
||||
* @param target n/a
|
||||
* @param move n/a
|
||||
* @returns number of points to add to the user's benefit score
|
||||
@ -7874,8 +7775,6 @@ export class ShiftStatAttr extends MoveEffectAttr {
|
||||
* Attribute used for status moves, namely Power Split and Guard Split,
|
||||
* that take the average of a user's and target's corresponding
|
||||
* stats and assign that average back to each corresponding stat.
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class AverageStatsAttr extends MoveEffectAttr {
|
||||
/** The stats to be averaged individually between the user and the target */
|
||||
@ -7928,11 +7827,7 @@ export class MoneyAttr extends MoveEffectAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies {@linkcode BattlerTagType.DESTINY_BOND} to the user.
|
||||
*
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
/** Applies {@linkcode BattlerTagType.DESTINY_BOND} to the user */
|
||||
export class DestinyBondAttr extends MoveEffectAttr {
|
||||
constructor() {
|
||||
super(true, { trigger: MoveEffectTrigger.PRE_APPLY });
|
||||
@ -7943,7 +7838,7 @@ export class DestinyBondAttr extends MoveEffectAttr {
|
||||
* @param user {@linkcode Pokemon} that is having the tag applied to.
|
||||
* @param target {@linkcode Pokemon} N/A
|
||||
* @param move {@linkcode Move} {@linkcode Move.DESTINY_BOND}
|
||||
* @param {any[]} args N/A
|
||||
* @param args N/A
|
||||
* @returns true
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -7953,10 +7848,7 @@ export class DestinyBondAttr extends MoveEffectAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute to apply a battler tag to the target if they have had their stats boosted this turn.
|
||||
* @extends AddBattlerTagAttr
|
||||
*/
|
||||
/** Attribute to apply a battler tag to the target if they have had their stats boosted this turn */
|
||||
export class AddBattlerTagIfBoostedAttr extends AddBattlerTagAttr {
|
||||
constructor(tag: BattlerTagType) {
|
||||
super(tag, false, false, 2, 5);
|
||||
@ -7966,7 +7858,7 @@ export class AddBattlerTagIfBoostedAttr extends AddBattlerTagAttr {
|
||||
* @param user {@linkcode Pokemon} using this move
|
||||
* @param target {@linkcode Pokemon} target of this move
|
||||
* @param move {@linkcode Move} being used
|
||||
* @param {any[]} args N/A
|
||||
* @param args N/A
|
||||
* @returns true
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -7979,7 +7871,6 @@ export class AddBattlerTagIfBoostedAttr extends AddBattlerTagAttr {
|
||||
|
||||
/**
|
||||
* Attribute to apply a status effect to the target if they have had their stats boosted this turn.
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
export class StatusIfBoostedAttr extends MoveEffectAttr {
|
||||
public effect: StatusEffect;
|
||||
@ -7993,7 +7884,7 @@ export class StatusIfBoostedAttr extends MoveEffectAttr {
|
||||
* @param user {@linkcode Pokemon} using this move
|
||||
* @param target {@linkcode Pokemon} target of this move
|
||||
* @param move {@linkcode Move} N/A
|
||||
* @param {any[]} args N/A
|
||||
* @param args N/A
|
||||
* @returns true
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -8075,7 +7966,6 @@ export class AfterYouAttr extends MoveEffectAttr {
|
||||
/**
|
||||
* Move effect to force the target to move last, ignoring priority.
|
||||
* If applied to multiple targets, they move in speed order after all other moves.
|
||||
* @extends MoveEffectAttr
|
||||
*/
|
||||
export class ForceLastAttr extends MoveEffectAttr {
|
||||
/**
|
||||
@ -8254,11 +8144,11 @@ export class ResistLastMoveTypeAttr extends MoveEffectAttr {
|
||||
|
||||
/**
|
||||
* User changes its type to a random type that resists the target's last used move
|
||||
* @param {Pokemon} user Pokemon that used the move and will change types
|
||||
* @param {Pokemon} target Opposing pokemon that recently used a move
|
||||
* @param {Move} move Move being used
|
||||
* @param {any[]} args Unused
|
||||
* @returns {boolean} true if the function succeeds
|
||||
* @param user Pokemon that used the move and will change types
|
||||
* @param target Opposing pokemon that recently used a move
|
||||
* @param move Move being used
|
||||
* @param args Unused
|
||||
* @returns true if the function succeeds
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (!super.apply(user, target, move, args)) {
|
||||
@ -8319,9 +8209,6 @@ export class ResistLastMoveTypeAttr extends MoveEffectAttr {
|
||||
* Drops the target's immunity to types it is immune to
|
||||
* and makes its evasiveness be ignored during accuracy
|
||||
* checks. Used by: {@linkcode MoveId.ODOR_SLEUTH | Odor Sleuth}, {@linkcode MoveId.MIRACLE_EYE | Miracle Eye} and {@linkcode MoveId.FORESIGHT | Foresight}
|
||||
*
|
||||
* @extends AddBattlerTagAttr
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class ExposedMoveAttr extends AddBattlerTagAttr {
|
||||
constructor(tagType: BattlerTagType) {
|
||||
|
@ -576,10 +576,9 @@ export class MysteryEncounterBuilder implements Partial<IMysteryEncounter> {
|
||||
*/
|
||||
|
||||
/**
|
||||
* @static Defines the type of encounter which is used as an identifier, should be tied to a unique MysteryEncounterType
|
||||
* NOTE: if new functions are added to {@linkcode MysteryEncounter} class
|
||||
* Defines the type of encounter which is used as an identifier, should be tied to a unique MysteryEncounterType
|
||||
* @param encounterType
|
||||
* @returns this
|
||||
* @returns a new instance of MysteryEncounterBuilder with encounterType set
|
||||
*/
|
||||
static withEncounterType(
|
||||
encounterType: MysteryEncounterType,
|
||||
|
@ -969,7 +969,7 @@ export function handleMysteryEncounterBattleStartEffects() {
|
||||
/**
|
||||
* Can queue extra phases or logic during {@linkcode TurnInitPhase}
|
||||
* Should mostly just be used for injecting custom phases into the battle system on turn start
|
||||
* @return boolean - if true, will skip the remainder of the {@linkcode TurnInitPhase}
|
||||
* @returns boolean - if true, will skip the remainder of the {@linkcode TurnInitPhase}
|
||||
*/
|
||||
export function handleMysteryEncounterTurnStartEffects(): boolean {
|
||||
const encounter = globalScene.currentBattle.mysteryEncounter;
|
||||
@ -986,7 +986,7 @@ export function handleMysteryEncounterTurnStartEffects(): boolean {
|
||||
* @param level the level of the mon, which differs between MEs
|
||||
* @param isBoss whether the mon should be a Boss
|
||||
* @param rerollHidden whether the mon should get an extra roll for Hidden Ability
|
||||
* @returns {@linkcode EnemyPokemon} for the requested encounter
|
||||
* @returns for the requested encounter
|
||||
*/
|
||||
export function getRandomEncounterSpecies(level: number, isBoss = false, rerollHidden = false): EnemyPokemon {
|
||||
let bossSpecies: PokemonSpecies;
|
||||
|
@ -289,7 +289,7 @@ export class SpeciesFormChangeRevertWeatherFormTrigger extends SpeciesFormChange
|
||||
/**
|
||||
* Checks if the Pokemon has the required ability and the weather is one that will revert
|
||||
* the Pokemon to its original form or the weather or ability is suppressed
|
||||
* @param {Pokemon} pokemon the pokemon that is trying to do the form change
|
||||
* @param pokemon the pokemon that is trying to do the form change
|
||||
* @returns `true` if the Pokemon will revert to its original form, `false` otherwise
|
||||
*/
|
||||
canChange(pokemon: Pokemon): boolean {
|
||||
|
@ -919,7 +919,7 @@ export class PokemonSpecies extends PokemonSpeciesForm implements Localizable {
|
||||
* The calculation with evolution delay is a weighted average of the easeIn and easeOut functions where preferredMinLevel is the denominator.
|
||||
* This also means a lower value of x will lead to a higher evolution chance.
|
||||
* @param strength {@linkcode PartyMemberStrength} The strength of the party member in question
|
||||
* @returns {@linkcode number} The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance.
|
||||
* @returns The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance.
|
||||
*/
|
||||
private getStrengthLevelDiff(strength: PartyMemberStrength): number {
|
||||
switch (Math.min(strength, PartyMemberStrength.STRONGER)) {
|
||||
|
@ -204,7 +204,7 @@ export class TrainerConfig {
|
||||
/**
|
||||
* Returns the derived trainer type for a given trainer type.
|
||||
* @param trainerTypeToDeriveFrom - The trainer type to derive from. (If null, the this.trainerType property will be used.)
|
||||
* @returns {TrainerType} - The derived trainer type.
|
||||
* @returns - The derived trainer type.
|
||||
*/
|
||||
getDerivedType(trainerTypeToDeriveFrom: TrainerType | null = null): TrainerType {
|
||||
let trainerType = trainerTypeToDeriveFrom ? trainerTypeToDeriveFrom : this.trainerType;
|
||||
@ -274,9 +274,9 @@ export class TrainerConfig {
|
||||
|
||||
/**
|
||||
* Sets the configuration for trainers with genders, including the female name and encounter background music (BGM).
|
||||
* @param {string} [nameFemale] The name of the female trainer. If 'Ivy', a localized name will be assigned.
|
||||
* @param {TrainerType | string} [femaleEncounterBgm] The encounter BGM for the female trainer, which can be a TrainerType or a string.
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @param [nameFemale] The name of the female trainer. If 'Ivy', a localized name will be assigned.
|
||||
* @param [femaleEncounterBgm] The encounter BGM for the female trainer, which can be a TrainerType or a string.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
setHasGenders(nameFemale?: string, femaleEncounterBgm?: TrainerType | string): TrainerConfig {
|
||||
// If the female name is 'Ivy' (the rival), assign a localized name.
|
||||
@ -314,7 +314,7 @@ export class TrainerConfig {
|
||||
* Sets the configuration for trainers with double battles, including the name of the double trainer and the encounter BGM.
|
||||
* @param nameDouble The name of the double trainer (e.g., "Ace Duo" for Trainer Class Doubles or "red_blue_double" for NAMED trainer doubles).
|
||||
* @param doubleEncounterBgm The encounter BGM for the double trainer, which can be a TrainerType or a string.
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
setHasDouble(nameDouble: string, doubleEncounterBgm?: TrainerType | string): TrainerConfig {
|
||||
this.hasDouble = true;
|
||||
@ -331,7 +331,7 @@ export class TrainerConfig {
|
||||
/**
|
||||
* Sets the trainer type for double battles.
|
||||
* @param trainerTypeDouble The TrainerType of the partner in a double battle.
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
setDoubleTrainerType(trainerTypeDouble: TrainerType): TrainerConfig {
|
||||
this.trainerTypeDouble = trainerTypeDouble;
|
||||
@ -356,7 +356,7 @@ export class TrainerConfig {
|
||||
/**
|
||||
* Sets the title for double trainers
|
||||
* @param titleDouble The key for the title in the i18n file. (e.g., "champion_double").
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
setDoubleTitle(titleDouble: string): TrainerConfig {
|
||||
// First check if i18n is initialized
|
||||
@ -523,9 +523,9 @@ export class TrainerConfig {
|
||||
* Initializes the trainer configuration for an evil team admin.
|
||||
* @param title The title of the evil team admin.
|
||||
* @param poolName The evil team the admin belongs to.
|
||||
* @param {SpeciesId | SpeciesId[]} signatureSpecies The signature species for the evil team leader.
|
||||
* @param signatureSpecies The signature species for the evil team leader.
|
||||
* @param specialtyType The specialty Type of the admin, if they have one
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
initForEvilTeamAdmin(
|
||||
title: string,
|
||||
@ -566,7 +566,7 @@ export class TrainerConfig {
|
||||
/**
|
||||
* Initializes the trainer configuration for a Stat Trainer, as part of the Trainer's Test Mystery Encounter.
|
||||
* @param _isMale Whether the stat trainer is Male or Female (for localization of the title).
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
initForStatTrainer(_isMale = false): TrainerConfig {
|
||||
if (!getIsInitialized()) {
|
||||
@ -590,10 +590,10 @@ export class TrainerConfig {
|
||||
|
||||
/**
|
||||
* Initializes the trainer configuration for an evil team leader. Temporarily hardcoding evil leader teams though.
|
||||
* @param {SpeciesId | SpeciesId[]} signatureSpecies The signature species for the evil team leader.
|
||||
* @param {PokemonType} specialtyType The specialty type for the evil team Leader.
|
||||
* @param signatureSpecies The signature species for the evil team leader.
|
||||
* @param specialtyType The specialty type for the evil team Leader.
|
||||
* @param boolean Whether or not this is the rematch fight
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
initForEvilTeamLeader(
|
||||
title: string,
|
||||
@ -631,12 +631,12 @@ export class TrainerConfig {
|
||||
|
||||
/**
|
||||
* Initializes the trainer configuration for a Gym Leader.
|
||||
* @param {SpeciesId | SpeciesId[]} signatureSpecies The signature species for the Gym Leader. Added to party in reverse order.
|
||||
* @param signatureSpecies The signature species for the Gym Leader. Added to party in reverse order.
|
||||
* @param isMale Whether the Gym Leader is Male or Not (for localization of the title).
|
||||
* @param {PokemonType} specialtyType The specialty type for the Gym Leader.
|
||||
* @param specialtyType The specialty type for the Gym Leader.
|
||||
* @param ignoreMinTeraWave Whether the Gym Leader always uses Tera (true), or only Teras after {@linkcode GYM_LEADER_TERA_WAVE} (false). Defaults to false.
|
||||
* @param teraSlot Optional, sets the party member in this slot to Terastallize. Wraps based on party size.
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
initForGymLeader(
|
||||
signatureSpecies: (SpeciesId | SpeciesId[])[],
|
||||
@ -748,9 +748,9 @@ export class TrainerConfig {
|
||||
|
||||
/**
|
||||
* Initializes the trainer configuration for a Champion.
|
||||
* @param {SpeciesId | SpeciesId[]} signatureSpecies The signature species for the Champion.
|
||||
* @param signatureSpecies The signature species for the Champion.
|
||||
* @param isMale Whether the Champion is Male or Female (for localization of the title).
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
initForChampion(isMale: boolean): TrainerConfig {
|
||||
// Check if the internationalization (i18n) system is initialized.
|
||||
@ -785,7 +785,7 @@ export class TrainerConfig {
|
||||
/**
|
||||
* Sets a localized name for the trainer. This should only be used for trainers that dont use a "initFor" function and are considered "named" trainers
|
||||
* @param name - The name of the trainer.
|
||||
* @returns {TrainerConfig} The updated TrainerConfig instance.
|
||||
* @returns The updated TrainerConfig instance.
|
||||
*/
|
||||
setLocalizedName(name: string): TrainerConfig {
|
||||
// Check if the internationalization (i18n) system is initialized.
|
||||
@ -798,9 +798,9 @@ export class TrainerConfig {
|
||||
|
||||
/**
|
||||
* Retrieves the title for the trainer based on the provided trainer slot and variant.
|
||||
* @param {TrainerSlot} trainerSlot - The slot to determine which title to use. Defaults to TrainerSlot.NONE.
|
||||
* @param {TrainerVariant} variant - The variant of the trainer to determine the specific title.
|
||||
* @returns {string} - The title of the trainer.
|
||||
* @param trainerSlot - The slot to determine which title to use. Defaults to TrainerSlot.NONE.
|
||||
* @param variant - The variant of the trainer to determine the specific title.
|
||||
* @returns - The title of the trainer.
|
||||
*/
|
||||
getTitle(trainerSlot: TrainerSlot = TrainerSlot.NONE, variant: TrainerVariant): string {
|
||||
const ret = this.name;
|
||||
|
@ -29,7 +29,7 @@ export enum MoveFlags {
|
||||
SLICING_MOVE = 1 << 8,
|
||||
/**
|
||||
* Indicates a move should be affected by {@linkcode AbilityId.RECKLESS}
|
||||
* @see {@linkcode Move.recklessMove()}
|
||||
* @see {@linkcode Move.recklessMove}
|
||||
*/
|
||||
RECKLESS_MOVE = 1 << 9,
|
||||
/** Indicates a move should be affected by {@linkcode AbilityId.BULLETPROOF} */
|
||||
|
@ -16,10 +16,7 @@ export enum ArenaEventType {
|
||||
TAG_REMOVED = "onTagRemoved",
|
||||
}
|
||||
|
||||
/**
|
||||
* Base container class for all {@linkcode ArenaEventType} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Base container class for all {@linkcode ArenaEventType} events */
|
||||
export class ArenaEvent extends Event {
|
||||
/** The total duration of the {@linkcode ArenaEventType} */
|
||||
public duration: number;
|
||||
@ -29,10 +26,7 @@ export class ArenaEvent extends Event {
|
||||
this.duration = duration;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Container class for {@linkcode ArenaEventType.WEATHER_CHANGED} events
|
||||
* @extends ArenaEvent
|
||||
*/
|
||||
/** Container class for {@linkcode ArenaEventType.WEATHER_CHANGED} events */
|
||||
export class WeatherChangedEvent extends ArenaEvent {
|
||||
/** The {@linkcode WeatherType} being overridden */
|
||||
public oldWeatherType: WeatherType;
|
||||
@ -45,10 +39,7 @@ export class WeatherChangedEvent extends ArenaEvent {
|
||||
this.newWeatherType = newWeatherType;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Container class for {@linkcode ArenaEventType.TERRAIN_CHANGED} events
|
||||
* @extends ArenaEvent
|
||||
*/
|
||||
/** Container class for {@linkcode ArenaEventType.TERRAIN_CHANGED} events */
|
||||
export class TerrainChangedEvent extends ArenaEvent {
|
||||
/** The {@linkcode TerrainType} being overridden */
|
||||
public oldTerrainType: TerrainType;
|
||||
@ -62,10 +53,7 @@ export class TerrainChangedEvent extends ArenaEvent {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Container class for {@linkcode ArenaEventType.TAG_ADDED} events
|
||||
* @extends ArenaEvent
|
||||
*/
|
||||
/** Container class for {@linkcode ArenaEventType.TAG_ADDED} events */
|
||||
export class TagAddedEvent extends ArenaEvent {
|
||||
/** The {@linkcode ArenaTagType} being added */
|
||||
public arenaTagType: ArenaTagType;
|
||||
@ -91,10 +79,7 @@ export class TagAddedEvent extends ArenaEvent {
|
||||
this.arenaTagMaxLayers = arenaTagMaxLayers!; // TODO: is this bang correct?
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Container class for {@linkcode ArenaEventType.TAG_REMOVED} events
|
||||
* @extends ArenaEvent
|
||||
*/
|
||||
/** Container class for {@linkcode ArenaEventType.TAG_REMOVED} events */
|
||||
export class TagRemovedEvent extends ArenaEvent {
|
||||
/** The {@linkcode ArenaTagType} being removed */
|
||||
public arenaTagType: ArenaTagType;
|
||||
|
@ -43,10 +43,7 @@ export enum BattleSceneEventType {
|
||||
NEW_ARENA = "onNewArena",
|
||||
}
|
||||
|
||||
/**
|
||||
* Container class for {@linkcode BattleSceneEventType.CANDY_UPGRADE_NOTIFICATION_CHANGED} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Container class for {@linkcode BattleSceneEventType.CANDY_UPGRADE_NOTIFICATION_CHANGED} events */
|
||||
export class CandyUpgradeNotificationChangedEvent extends Event {
|
||||
/** The new value the setting was changed to */
|
||||
public newValue: number;
|
||||
@ -57,10 +54,7 @@ export class CandyUpgradeNotificationChangedEvent extends Event {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Container class for {@linkcode BattleSceneEventType.MOVE_USED} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Container class for {@linkcode BattleSceneEventType.MOVE_USED} events */
|
||||
export class MoveUsedEvent extends Event {
|
||||
/** The ID of the {@linkcode Pokemon} that used the {@linkcode Move} */
|
||||
public pokemonId: number;
|
||||
@ -76,10 +70,7 @@ export class MoveUsedEvent extends Event {
|
||||
this.ppUsed = ppUsed;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Container class for {@linkcode BattleSceneEventType.BERRY_USED} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Container class for {@linkcode BattleSceneEventType.BERRY_USED} events */
|
||||
export class BerryUsedEvent extends Event {
|
||||
/** The {@linkcode BerryModifier} being used */
|
||||
public berryModifier: BerryModifier;
|
||||
@ -90,28 +81,19 @@ export class BerryUsedEvent extends Event {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Container class for {@linkcode BattleSceneEventType.ENCOUNTER_PHASE} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Container class for {@linkcode BattleSceneEventType.ENCOUNTER_PHASE} events */
|
||||
export class EncounterPhaseEvent extends Event {
|
||||
constructor() {
|
||||
super(BattleSceneEventType.ENCOUNTER_PHASE);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Container class for {@linkcode BattleSceneEventType.TURN_INIT} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Container class for {@linkcode BattleSceneEventType.TURN_INIT} events */
|
||||
export class TurnInitEvent extends Event {
|
||||
constructor() {
|
||||
super(BattleSceneEventType.TURN_INIT);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Container class for {@linkcode BattleSceneEventType.TURN_END} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Container class for {@linkcode BattleSceneEventType.TURN_END} events */
|
||||
export class TurnEndEvent extends Event {
|
||||
/** The amount of turns in the current battle */
|
||||
public turnCount: number;
|
||||
@ -121,10 +103,7 @@ export class TurnEndEvent extends Event {
|
||||
this.turnCount = turnCount;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Container class for {@linkcode BattleSceneEventType.NEW_ARENA} events
|
||||
* @extends Event
|
||||
*/
|
||||
/** Container class for {@linkcode BattleSceneEventType.NEW_ARENA} events */
|
||||
export class NewArenaEvent extends Event {
|
||||
constructor() {
|
||||
super(BattleSceneEventType.NEW_ARENA);
|
||||
|
@ -8,7 +8,6 @@ export enum EggEventType {
|
||||
|
||||
/**
|
||||
* Container class for {@linkcode EggEventType.EGG_COUNT_CHANGED} events
|
||||
* @extends Event
|
||||
*/
|
||||
export class EggCountChangedEvent extends Event {
|
||||
/** The updated egg count. */
|
||||
|
@ -732,14 +732,12 @@ export class Arena {
|
||||
* Attempt to get a tag from the Arena via {@linkcode getTagOnSide} that applies to both sides
|
||||
* @param tagType - The {@linkcode ArenaTagType} to retrieve
|
||||
* @returns The existing {@linkcode ArenaTag}, or `undefined` if not present.
|
||||
* @overload
|
||||
*/
|
||||
getTag(tagType: ArenaTagType): ArenaTag | undefined;
|
||||
/**
|
||||
* Attempt to get a tag from the Arena via {@linkcode getTagOnSide} that applies to both sides
|
||||
* @param tagType - The constructor of the {@linkcode ArenaTag} to retrieve
|
||||
* @returns The existing {@linkcode ArenaTag}, or `undefined` if not present.
|
||||
* @overload
|
||||
*/
|
||||
getTag<T extends ArenaTag>(tagType: Constructor<T> | AbstractConstructor<T>): T | undefined;
|
||||
getTag(tagType: ArenaTagType | Constructor<ArenaTag> | AbstractConstructor<ArenaTag>): ArenaTag | undefined {
|
||||
|
@ -2647,11 +2647,11 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
|
||||
/**
|
||||
* Gets all level up moves in a given range for a particular pokemon.
|
||||
* @param {number} startingLevel Don't include moves below this level
|
||||
* @param {boolean} includeEvolutionMoves Whether to include evolution moves
|
||||
* @param {boolean} simulateEvolutionChain Whether to include moves from prior evolutions
|
||||
* @param {boolean} includeRelearnerMoves Whether to include moves that would require a relearner. Note the move relearner inherently allows evolution moves
|
||||
* @returns {LevelMoves} A list of moves and the levels they can be learned at
|
||||
* @param startingLevel Don't include moves below this level
|
||||
* @param includeEvolutionMoves Whether to include evolution moves
|
||||
* @param simulateEvolutionChain Whether to include moves from prior evolutions
|
||||
* @param includeRelearnerMoves Whether to include moves that would require a relearner. Note the move relearner inherently allows evolution moves
|
||||
* @returns A list of moves and the levels they can be learned at
|
||||
*/
|
||||
getLevelMoves(
|
||||
startingLevel?: number,
|
||||
@ -3496,7 +3496,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
* @param isCritical determines whether a critical hit has occurred or not (`false` by default)
|
||||
* @param simulated determines whether effects are applied without altering game state (`true` by default)
|
||||
* @param ignoreHeldItems determines whether this Pokemon's held items should be ignored during the stat calculation, default `false`
|
||||
* @return the stat stage multiplier to be used for effective stat calculation
|
||||
* @returns the stat stage multiplier to be used for effective stat calculation
|
||||
*/
|
||||
getStatStageMultiplier(
|
||||
stat: EffectiveStat,
|
||||
@ -3552,8 +3552,8 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
* This method considers various factors such as the user's accuracy level, the target's evasion level,
|
||||
* abilities, and modifiers to compute the final accuracy multiplier.
|
||||
*
|
||||
* @param target {@linkcode Pokemon} - The target Pokémon against which the move is used.
|
||||
* @param sourceMove {@linkcode Move} - The move being used by the user.
|
||||
* @param target - The target Pokémon against which the move is used.
|
||||
* @param sourceMove - The move being used by the user.
|
||||
* @returns The calculated accuracy multiplier.
|
||||
*/
|
||||
getAccuracyMultiplier(target: Pokemon, sourceMove: Move): number {
|
||||
@ -4291,18 +4291,10 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**@overload */
|
||||
getTag(tagType: BattlerTagType.GRUDGE): GrudgeTag | undefined;
|
||||
|
||||
/** @overload */
|
||||
getTag(tagType: BattlerTagType.SUBSTITUTE): SubstituteTag | undefined;
|
||||
|
||||
/** @overload */
|
||||
getTag(tagType: BattlerTagType): BattlerTag | undefined;
|
||||
|
||||
/** @overload */
|
||||
getTag<T extends BattlerTag>(tagType: Constructor<T>): T | undefined;
|
||||
|
||||
getTag(tagType: BattlerTagType | Constructor<BattlerTag>): BattlerTag | undefined {
|
||||
return typeof tagType === "function"
|
||||
? this.summonData.tags.find(t => t instanceof tagType)
|
||||
@ -4448,7 +4440,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
* @param user - The move user
|
||||
* @param target - The target of the move
|
||||
*
|
||||
* @returns {boolean} `true` if the move is disabled for this Pokemon due to the player's target selection
|
||||
* @returns `true` if the move is disabled for this Pokemon due to the player's target selection
|
||||
*
|
||||
* @see {@linkcode MoveRestrictionBattlerTag}
|
||||
*/
|
||||
@ -5235,7 +5227,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
/**
|
||||
* Reset a {@linkcode Pokemon}'s {@linkcode PokemonWaveData | waveData}.
|
||||
* Should be called upon starting a new wave in addition to whenever an arena transition occurs.
|
||||
* @see {@linkcode resetBattleAndWaveData()}
|
||||
* @see {@linkcode resetBattleAndWaveData}
|
||||
*/
|
||||
resetWaveData(): void {
|
||||
this.waveData = new PokemonWaveData();
|
||||
|
@ -315,8 +315,8 @@ export class GameMode implements GameModeConfig {
|
||||
|
||||
/**
|
||||
* Checks whether there is a fixed battle on this gamemode on a given wave.
|
||||
* @param {number} waveIndex The wave to check.
|
||||
* @returns {boolean} If this game mode has a fixed battle on this wave
|
||||
* @param waveIndex The wave to check.
|
||||
* @returns If this game mode has a fixed battle on this wave
|
||||
*/
|
||||
isFixedBattle(waveIndex: number): boolean {
|
||||
const dummyConfig = new FixedBattleConfig();
|
||||
@ -328,8 +328,8 @@ export class GameMode implements GameModeConfig {
|
||||
|
||||
/**
|
||||
* Returns the config for the fixed battle for a particular wave.
|
||||
* @param {number} waveIndex The wave to check.
|
||||
* @returns {boolean} The fixed battle for this wave.
|
||||
* @param waveIndex The wave to check.
|
||||
* @returns The fixed battle for this wave.
|
||||
*/
|
||||
getFixedBattle(waveIndex: number): FixedBattleConfig {
|
||||
const challengeConfig = new FixedBattleConfig();
|
||||
|
@ -6,8 +6,8 @@ import i18next from "i18next";
|
||||
/**
|
||||
* Retrieves the Pokemon's name, potentially with an affix indicating its role (wild or foe) in the current battle context, translated
|
||||
* @param pokemon {@linkcode Pokemon} name and battle context will be retrieved from this instance
|
||||
* @param {boolean} useIllusion - Whether we want the name of the illusion or not. Default value : true
|
||||
* @returns {string} ex: "Wild Gengar", "Ectoplasma sauvage"
|
||||
* @param useIllusion - Whether we want the name of the illusion or not. Default value : true
|
||||
* @returns ex: "Wild Gengar", "Ectoplasma sauvage"
|
||||
*/
|
||||
export function getPokemonNameWithAffix(pokemon: Pokemon | undefined, useIllusion = true): string {
|
||||
if (!pokemon) {
|
||||
|
@ -150,7 +150,7 @@ export class ModifierType {
|
||||
/**
|
||||
* Checks if the modifier type is of a specific type
|
||||
* @param modifierType - The type to check against
|
||||
* @return Whether the modifier type is of the specified type
|
||||
* @returns Whether the modifier type is of the specified type
|
||||
*/
|
||||
public is<K extends ModifierTypeString>(modifierType: K): this is ModifierTypeInstanceMap[K] {
|
||||
const targetType = ModifierTypeConstructorMap[modifierType];
|
||||
@ -874,11 +874,7 @@ export class AttackTypeBoosterModifierType
|
||||
|
||||
export type SpeciesStatBoosterItem = keyof typeof SpeciesStatBoosterModifierTypeGenerator.items;
|
||||
|
||||
/**
|
||||
* Modifier type for {@linkcode SpeciesStatBoosterModifier}
|
||||
* @extends PokemonHeldItemModifierType
|
||||
* @implements GeneratedPersistentModifierType
|
||||
*/
|
||||
/** Modifier type for {@linkcode SpeciesStatBoosterModifier} */
|
||||
export class SpeciesStatBoosterModifierType
|
||||
extends PokemonHeldItemModifierType
|
||||
implements GeneratedPersistentModifierType
|
||||
@ -1396,7 +1392,6 @@ class TempStatStageBoosterModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
* Modifier type generator for {@linkcode SpeciesStatBoosterModifierType}, which
|
||||
* encapsulates the logic for weighting the most useful held item from
|
||||
* the current list of {@linkcode items}.
|
||||
* @extends ModifierTypeGenerator
|
||||
*/
|
||||
class SpeciesStatBoosterModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
/** Object comprised of the currently available species-based stat boosting held items */
|
||||
|
@ -73,8 +73,8 @@ export class ModifierBar extends Phaser.GameObjects.Container {
|
||||
|
||||
/**
|
||||
* Method to update content displayed in {@linkcode ModifierBar}
|
||||
* @param {PersistentModifier[]} modifiers - The list of modifiers to be displayed in the {@linkcode ModifierBar}
|
||||
* @param {boolean} hideHeldItems - If set to "true", only modifiers not assigned to a Pokémon are displayed
|
||||
* @param modifiers - The list of modifiers to be displayed in the {@linkcode ModifierBar}
|
||||
* @param hideHeldItems - If set to "true", only modifiers not assigned to a Pokémon are displayed
|
||||
*/
|
||||
updateModifiers(modifiers: PersistentModifier[], hideHeldItems = false) {
|
||||
this.removeAll(true);
|
||||
@ -345,9 +345,6 @@ export class AddVoucherModifier extends ConsumableModifier {
|
||||
* modifier will be removed. If a modifier of the same type is to be added, it
|
||||
* will reset {@linkcode battleCount} back to {@linkcode maxBattles} of the
|
||||
* existing modifier instead of adding that modifier directly.
|
||||
* @extends PersistentModifier
|
||||
* @abstract
|
||||
* @see {@linkcode add}
|
||||
*/
|
||||
export abstract class LapsingPersistentModifier extends PersistentModifier {
|
||||
/** The maximum amount of battles the modifier will exist for */
|
||||
@ -458,8 +455,6 @@ export abstract class LapsingPersistentModifier extends PersistentModifier {
|
||||
/**
|
||||
* Modifier used for passive items, specifically lures, that
|
||||
* temporarily increases the chance of a double battle.
|
||||
* @extends LapsingPersistentModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier {
|
||||
public declare type: DoubleBattleChanceBoosterModifierType;
|
||||
@ -495,8 +490,6 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier
|
||||
* Modifier used for party-wide items, specifically the X items, that
|
||||
* temporarily increases the stat stage multiplier of the corresponding
|
||||
* {@linkcode TempBattleStat}.
|
||||
* @extends LapsingPersistentModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class TempStatStageBoosterModifier extends LapsingPersistentModifier {
|
||||
/** The stat whose stat stage multiplier will be temporarily increased */
|
||||
@ -562,8 +555,6 @@ export class TempStatStageBoosterModifier extends LapsingPersistentModifier {
|
||||
/**
|
||||
* Modifier used for party-wide items, namely Dire Hit, that
|
||||
* temporarily increments the critical-hit stage
|
||||
* @extends LapsingPersistentModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class TempCritBoosterModifier extends LapsingPersistentModifier {
|
||||
clone() {
|
||||
@ -818,8 +809,6 @@ export abstract class LapsingPokemonHeldItemModifier extends PokemonHeldItemModi
|
||||
/**
|
||||
* Modifier used for held items, specifically vitamins like Carbos, Hp Up, etc., that
|
||||
* increase the value of a given {@linkcode PermanentStat}.
|
||||
* @extends PokemonHeldItemModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class BaseStatModifier extends PokemonHeldItemModifier {
|
||||
protected stat: PermanentStat;
|
||||
@ -1126,8 +1115,6 @@ export class PokemonIncrementingStatModifier extends PokemonHeldItemModifier {
|
||||
/**
|
||||
* Modifier used for held items that Applies {@linkcode Stat} boost(s)
|
||||
* using a multiplier.
|
||||
* @extends PokemonHeldItemModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class StatBoosterModifier extends PokemonHeldItemModifier {
|
||||
/** The stats that the held item boosts */
|
||||
@ -1194,8 +1181,6 @@ export class StatBoosterModifier extends PokemonHeldItemModifier {
|
||||
/**
|
||||
* Modifier used for held items, specifically Eviolite, that apply
|
||||
* {@linkcode Stat} boost(s) using a multiplier if the holder can evolve.
|
||||
* @extends StatBoosterModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class EvolutionStatBoosterModifier extends StatBoosterModifier {
|
||||
matchType(modifier: Modifier): boolean {
|
||||
@ -1216,13 +1201,16 @@ export class EvolutionStatBoosterModifier extends StatBoosterModifier {
|
||||
|
||||
/**
|
||||
* Boosts the incoming stat value by a {@linkcode EvolutionStatBoosterModifier.multiplier} if the holder
|
||||
* can evolve. Note that, if the holder is a fusion, they will receive
|
||||
* can evolve
|
||||
*
|
||||
* @remarks
|
||||
* Note that, if the holder is a fusion, they will receive
|
||||
* only half of the boost if either of the fused members are fully
|
||||
* evolved. However, if they are both unevolved, the full boost
|
||||
* will apply.
|
||||
* @param pokemon {@linkcode Pokemon} that holds the item
|
||||
* @param _stat {@linkcode Stat} The {@linkcode Stat} to be boosted
|
||||
* @param statValue{@linkcode NumberHolder} that holds the resulting value of the stat
|
||||
* @param pokemon - The `Pokemon` holding the item
|
||||
* @param _stat - The `Stat` to be boosted
|
||||
* @param statValue - Holds the resulting value of the stat
|
||||
* @returns `true` if the stat boost applies successfully, false otherwise
|
||||
* @see shouldApply
|
||||
*/
|
||||
@ -1246,8 +1234,6 @@ export class EvolutionStatBoosterModifier extends StatBoosterModifier {
|
||||
/**
|
||||
* Modifier used for held items that Applies {@linkcode Stat} boost(s) using a
|
||||
* multiplier if the holder is of a specific {@linkcode SpeciesId}.
|
||||
* @extends StatBoosterModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class SpeciesStatBoosterModifier extends StatBoosterModifier {
|
||||
/** The species that the held item's stat boost(s) apply to */
|
||||
@ -1321,8 +1307,6 @@ export class SpeciesStatBoosterModifier extends StatBoosterModifier {
|
||||
|
||||
/**
|
||||
* Modifier used for held items that apply critical-hit stage boost(s).
|
||||
* @extends PokemonHeldItemModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class CritBoosterModifier extends PokemonHeldItemModifier {
|
||||
/** The amount of stages by which the held item increases the current critical-hit stage value */
|
||||
@ -1369,8 +1353,6 @@ export class CritBoosterModifier extends PokemonHeldItemModifier {
|
||||
/**
|
||||
* Modifier used for held items that apply critical-hit stage boost(s)
|
||||
* if the holder is of a specific {@linkcode SpeciesId}.
|
||||
* @extends CritBoosterModifier
|
||||
* @see {@linkcode shouldApply}
|
||||
*/
|
||||
export class SpeciesCritBoosterModifier extends CritBoosterModifier {
|
||||
/** The species that the held item's critical-hit stage boost applies to */
|
||||
@ -1694,8 +1676,6 @@ export class TurnHealModifier extends PokemonHeldItemModifier {
|
||||
/**
|
||||
* Modifier used for held items, namely Toxic Orb and Flame Orb, that apply a
|
||||
* set {@linkcode StatusEffect} at the end of a turn.
|
||||
* @extends PokemonHeldItemModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class TurnStatusEffectModifier extends PokemonHeldItemModifier {
|
||||
/** The status effect to be applied by the held item */
|
||||
@ -1721,7 +1701,7 @@ export class TurnStatusEffectModifier extends PokemonHeldItemModifier {
|
||||
* would be the only item able to {@linkcode apply} successfully.
|
||||
* @override
|
||||
* @param modifier {@linkcode Modifier} being type tested
|
||||
* @return `true` if {@linkcode modifier} is an instance of
|
||||
* @returns `true` if {@linkcode modifier} is an instance of
|
||||
* TurnStatusEffectModifier, false otherwise
|
||||
*/
|
||||
matchType(modifier: Modifier): boolean {
|
||||
@ -1966,8 +1946,6 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier {
|
||||
/**
|
||||
* Modifier used for held items, namely White Herb, that restore adverse stat
|
||||
* stages in battle.
|
||||
* @extends PokemonHeldItemModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class ResetNegativeStatStageModifier extends PokemonHeldItemModifier {
|
||||
matchType(modifier: Modifier) {
|
||||
@ -2013,8 +1991,6 @@ export class ResetNegativeStatStageModifier extends PokemonHeldItemModifier {
|
||||
/**
|
||||
* Modifier used for held items, namely Mystical Rock, that extend the
|
||||
* duration of weather and terrain effects.
|
||||
* @extends PokemonHeldItemModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class FieldEffectModifier extends PokemonHeldItemModifier {
|
||||
/**
|
||||
@ -3400,8 +3376,6 @@ export class ExtraModifierModifier extends PersistentModifier {
|
||||
|
||||
/**
|
||||
* Modifier used for timed boosts to the player's shop item rewards.
|
||||
* @extends LapsingPersistentModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class TempExtraModifierModifier extends LapsingPersistentModifier {
|
||||
/**
|
||||
|
@ -289,10 +289,7 @@ export class MysteryEncounterBattlePhase extends Phase {
|
||||
this.doMysteryEncounterBattle();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets intro battle message for new battle
|
||||
* @private
|
||||
*/
|
||||
/** Get intro battle message for new battle */
|
||||
private getBattleMessage(): string {
|
||||
const enemyField = globalScene.getEnemyField();
|
||||
const encounterMode = globalScene.currentBattle.mysteryEncounter!.encounterMode;
|
||||
@ -323,8 +320,7 @@ export class MysteryEncounterBattlePhase extends Phase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Queues {@linkcode SummonPhase}s for the new battle, and handles trainer animations/dialogue if it's a Trainer battle
|
||||
* @private
|
||||
* Queue {@linkcode SummonPhase}s for the new battle and handle trainer animations/dialogue for Trainer battles
|
||||
*/
|
||||
private doMysteryEncounterBattle() {
|
||||
const encounterMode = globalScene.currentBattle.mysteryEncounter!.encounterMode;
|
||||
@ -401,7 +397,6 @@ export class MysteryEncounterBattlePhase extends Phase {
|
||||
|
||||
/**
|
||||
* Initiate {@linkcode SummonPhase}s, {@linkcode ScanIvsPhase}, {@linkcode PostSummonPhase}s, etc.
|
||||
* @private
|
||||
*/
|
||||
private endBattleSetup() {
|
||||
const enemyField = globalScene.getEnemyField();
|
||||
@ -450,10 +445,7 @@ export class MysteryEncounterBattlePhase extends Phase {
|
||||
this.end();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ease in enemy trainer
|
||||
* @private
|
||||
*/
|
||||
/** Ease in enemy trainer */
|
||||
private showEnemyTrainer(): void {
|
||||
// Show enemy trainer
|
||||
const trainer = globalScene.currentBattle.trainer;
|
||||
|
@ -1886,9 +1886,7 @@ export class GameData {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the root species of a given {@PokemonSpecies} has been unlocked in the dex
|
||||
*/
|
||||
/** Return whether the root species of a given `PokemonSpecies` has been unlocked in the dex */
|
||||
isRootSpeciesUnlocked(species: PokemonSpecies): boolean {
|
||||
return !!this.dexData[species.getRootSpeciesId()]?.caughtAttr;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ export class TouchControl {
|
||||
* {@link https://stackoverflow.com/a/39778831/4622620|Source}
|
||||
*
|
||||
* Prevent zoom on specified element
|
||||
* @param {HTMLElement} element
|
||||
* @param element
|
||||
*/
|
||||
preventElementZoom(element: HTMLElement | null): void {
|
||||
if (!element) {
|
||||
|
@ -53,7 +53,7 @@ export class BgmBar extends Phaser.GameObjects.Container {
|
||||
|
||||
/*
|
||||
* Set the BGM Name to the BGM bar.
|
||||
* @param {string} bgmName The name of the BGM to set.
|
||||
* @param bgmName The name of the BGM to set.
|
||||
*/
|
||||
setBgmToBgmBar(bgmName: string): void {
|
||||
this.musicText.setText(`${i18next.t("bgmName:music")}${this.getRealBgmName(bgmName)}`);
|
||||
@ -71,7 +71,7 @@ export class BgmBar extends Phaser.GameObjects.Container {
|
||||
|
||||
/*
|
||||
Show or hide the BGM bar.
|
||||
@param {boolean} visible Whether to show or hide the BGM bar.
|
||||
@param visible Whether to show or hide the BGM bar.
|
||||
*/
|
||||
public toggleBgmBar(visible: boolean): void {
|
||||
/*
|
||||
|
@ -202,8 +202,8 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container {
|
||||
* The method fetches the total page count if necessary, followed by fetching the rankings for the specified category
|
||||
* and page. It updates the UI with the fetched rankings or shows an appropriate message if no rankings are found.
|
||||
*
|
||||
* @param {ScoreboardCategory} [category=this.category] - The category to fetch rankings for. Defaults to the current category.
|
||||
* @param {number} [page=this.page] - The page number to fetch. Defaults to the current page.
|
||||
* @param [category=this.category] - The category to fetch rankings for. Defaults to the current category.
|
||||
* @param [page=this.page] - The page number to fetch. Defaults to the current page.
|
||||
*/
|
||||
update(category: ScoreboardCategory = this.category, page: number = this.page) {
|
||||
if (this.isUpdating) {
|
||||
@ -249,7 +249,7 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container {
|
||||
|
||||
/**
|
||||
* Sets the state of the navigation buttons.
|
||||
* @param {boolean} [enabled=true] - Whether the buttons should be enabled or disabled.
|
||||
* @param [enabled=true] - Whether the buttons should be enabled or disabled.
|
||||
*/
|
||||
setButtonsState(enabled = true) {
|
||||
const buttons = [
|
||||
|
@ -6,10 +6,7 @@ import type { EggHatchSceneUiHandler } from "#ui/handlers/egg-hatch-scene-ui-han
|
||||
import { addTextObject } from "#ui/text";
|
||||
import { addWindow } from "#ui/ui-theme";
|
||||
|
||||
/**
|
||||
* A container that displays the count of hatching eggs.
|
||||
* @extends Phaser.GameObjects.Container
|
||||
*/
|
||||
/** A container that displays the count of hatching eggs */
|
||||
export class EggCounterContainer extends Phaser.GameObjects.Container {
|
||||
private readonly WINDOW_DEFAULT_WIDTH = 37;
|
||||
private readonly WINDOW_MEDIUM_WIDTH = 42;
|
||||
|
@ -685,7 +685,7 @@ export class RunInfoUiHandler extends UiHandler {
|
||||
|
||||
/**
|
||||
* This function parses the Challenges section of the Run Entry and returns a list of active challenge.
|
||||
* @return string[] of active challenge names
|
||||
* @returns string[] of active challenge names
|
||||
*/
|
||||
private challengeParser(): string[] {
|
||||
const rules: string[] = [];
|
||||
|
@ -197,7 +197,7 @@ export class MoveTouchControlsHandler {
|
||||
|
||||
/**
|
||||
* Returns the current positions of all touch controls that have moved from their default positions of this orientation.
|
||||
* @returns {ControlPosition[]} The current positions of all touch controls that have moved from their default positions of this orientation
|
||||
* @returns The current positions of all touch controls that have moved from their default positions of this orientation
|
||||
*/
|
||||
private getModifiedCurrentPositions(): ControlPosition[] {
|
||||
return this.getControlGroupElements()
|
||||
|
@ -18,11 +18,7 @@ import { addTextObject } from "#ui/text";
|
||||
import { truncateString } from "#utils/common";
|
||||
import i18next from "i18next";
|
||||
|
||||
/**
|
||||
* Class representing the settings UI handler for gamepads.
|
||||
*
|
||||
* @extends AbstractControlSettingsUiHandler
|
||||
*/
|
||||
/** Class representing the settings UI handler for gamepads */
|
||||
|
||||
export class SettingsGamepadUiHandler extends AbstractControlSettingsUiHandler {
|
||||
/**
|
||||
|
@ -19,11 +19,7 @@ import { truncateString } from "#utils/common";
|
||||
import { toPascalSnakeCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
|
||||
/**
|
||||
* Class representing the settings UI handler for keyboards.
|
||||
*
|
||||
* @extends AbstractControlSettingsUiHandler
|
||||
*/
|
||||
/** Class representing the settings UI handler for keyboards */
|
||||
export class SettingsKeyboardUiHandler extends AbstractControlSettingsUiHandler {
|
||||
/**
|
||||
* Creates an instance of SettingsKeyboardUiHandler.
|
||||
|
@ -204,7 +204,7 @@ export function applyChallenges(challengeType: ChallengeType.SHOP, status: Boole
|
||||
* @param challengeType - {@linkcode ChallengeType.POKEMON_ADD_TO_PARTY}
|
||||
* @param pokemon - The pokemon being caught
|
||||
* @param status - Whether the pokemon can be added to the party or not
|
||||
* @return `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
* @returns `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
*/
|
||||
export function applyChallenges(
|
||||
challengeType: ChallengeType.POKEMON_ADD_TO_PARTY,
|
||||
@ -217,7 +217,7 @@ export function applyChallenges(
|
||||
* @param challengeType - {@linkcode ChallengeType.POKEMON_FUSION}
|
||||
* @param pokemon - The pokemon being checked
|
||||
* @param status - Whether the selected pokemon is allowed to fuse or not
|
||||
* @return `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
* @returns `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
*/
|
||||
export function applyChallenges(
|
||||
challengeType: ChallengeType.POKEMON_FUSION,
|
||||
@ -230,7 +230,7 @@ export function applyChallenges(
|
||||
* @param challengeType - {@linkcode ChallengeType.POKEMON_MOVE}
|
||||
* @param moveId - The move being checked
|
||||
* @param status - Whether the move can be used or not
|
||||
* @return `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
* @returns `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
*/
|
||||
export function applyChallenges(
|
||||
challengeType: ChallengeType.POKEMON_MOVE,
|
||||
@ -243,7 +243,7 @@ export function applyChallenges(
|
||||
* @param challengeType - {@linkcode ChallengeType.SHOP_ITEM}
|
||||
* @param shopItem - The item being checked
|
||||
* @param status - Whether the item should be added to the shop or not
|
||||
* @return `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
* @returns `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
*/
|
||||
export function applyChallenges(
|
||||
challengeType: ChallengeType.SHOP_ITEM,
|
||||
@ -256,7 +256,7 @@ export function applyChallenges(
|
||||
* @param challengeType - {@linkcode ChallengeType.WAVE_REWARD}
|
||||
* @param reward - The reward being checked
|
||||
* @param status - Whether the reward should be added to the reward options or not
|
||||
* @return `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
* @returns `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
*/
|
||||
export function applyChallenges(
|
||||
challengeType: ChallengeType.WAVE_REWARD,
|
||||
@ -268,7 +268,7 @@ export function applyChallenges(
|
||||
* Apply all challenges that prevent recovery from fainting
|
||||
* @param challengeType - {@linkcode ChallengeType.PREVENT_REVIVE}
|
||||
* @param status - Whether fainting is a permanent status or not
|
||||
* @return `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
* @returns `true` if any challenge was sucessfully applied, `false` otherwise
|
||||
*/
|
||||
export function applyChallenges(challengeType: ChallengeType.PREVENT_REVIVE, status: BooleanHolder): boolean;
|
||||
|
||||
|
@ -135,8 +135,8 @@ export function randSeedItem<T>(items: T[]): T {
|
||||
|
||||
/**
|
||||
* Shuffle a list using the seeded rng. Utilises the Fisher-Yates algorithm.
|
||||
* @param {Array} items An array of items.
|
||||
* @returns {Array} A new shuffled array of items.
|
||||
* @param items An array of items.
|
||||
* @returns A new shuffled array of items.
|
||||
*/
|
||||
export function randSeedShuffle<T>(items: T[]): T[] {
|
||||
if (items.length <= 1) {
|
||||
@ -340,8 +340,8 @@ export function rgbToHsv(r: number, g: number, b: number) {
|
||||
|
||||
/**
|
||||
* Compare color difference in RGB
|
||||
* @param {Array} rgb1 First RGB color in array
|
||||
* @param {Array} rgb2 Second RGB color in array
|
||||
* @param rgb1 First RGB color in array
|
||||
* @param rgb2 Second RGB color in array
|
||||
*/
|
||||
export function deltaRgb(rgb1: number[], rgb2: number[]): number {
|
||||
const [r1, g1, b1] = rgb1;
|
||||
|
@ -62,7 +62,7 @@ function trimFromStartAndEnd(str: string, charToTrim: string): string {
|
||||
/**
|
||||
* Capitalize the first letter of a string.
|
||||
* @param str - The string whose first letter is to be capitalized
|
||||
* @return The original string with its first letter capitalized.
|
||||
* @returns The original string with its first letter capitalized.
|
||||
* @example
|
||||
* ```ts
|
||||
* console.log(capitalizeFirstLetter("consectetur adipiscing elit")); // returns "Consectetur adipiscing elit"
|
||||
|
@ -18,8 +18,8 @@ describe("Abilities - Flower Gift", () => {
|
||||
|
||||
/**
|
||||
* Tests reverting to normal form when Cloud Nine/Air Lock is active on the field
|
||||
* @param {GameManager} game The game manager instance
|
||||
* @param {AbilityId} ability The ability that is active on the field
|
||||
* @param game The game manager instance
|
||||
* @param ability The ability that is active on the field
|
||||
*/
|
||||
const testRevertFormAgainstAbility = async (game: GameManager, ability: AbilityId) => {
|
||||
game.override.starterForms({ [SpeciesId.CASTFORM]: SUNSHINE_FORM }).enemyAbility(ability);
|
||||
|
@ -21,7 +21,7 @@ describe("Abilities - Gulp Missile", () => {
|
||||
/**
|
||||
* Gets the effect damage of Gulp Missile
|
||||
* See Gulp Missile {@link https://bulbapedia.bulbagarden.net/wiki/Gulp_Missile_(Ability)}
|
||||
* @param {Pokemon} pokemon The pokemon taking the effect damage.
|
||||
* @param pokemon The pokemon taking the effect damage.
|
||||
* @returns The effect damage of Gulp Missile
|
||||
*/
|
||||
const getEffectDamage = (pokemon: Pokemon): number => {
|
||||
|
@ -16,7 +16,7 @@ describe("Moves - Flame Burst", () => {
|
||||
* Calculates the effect damage of Flame Burst which is 1/16 of the target ally's max HP
|
||||
* See Flame Burst {@link https://bulbapedia.bulbagarden.net/wiki/Flame_Burst_(move)}
|
||||
* See Flame Burst's move attribute {@linkcode FlameBurstAttr}
|
||||
* @param pokemon {@linkcode Pokemon} - The ally of the move's target
|
||||
* @param pokemon - The ally of the move's target
|
||||
* @returns Effect damage of Flame Burst
|
||||
*/
|
||||
const getEffectDamage = (pokemon: Pokemon): number => {
|
||||
|
@ -51,7 +51,8 @@ export class OverridesHelper extends GameManagerHelper {
|
||||
|
||||
/**
|
||||
* Override the starting biome
|
||||
* @warning Any event listeners that are attached to {@linkcode NewArenaEvent} may need to be handled down the line
|
||||
*
|
||||
* ⚠️ Any event listeners that are attached to {@linkcode NewArenaEvent} may need to be handled down the line
|
||||
* @param biome - The biome to set
|
||||
*/
|
||||
public startingBiome(biome: BiomeId): this {
|
||||
|
@ -68,7 +68,7 @@ function isObject(received: unknown): received is object {
|
||||
/**
|
||||
* Helper function to check if a given object is a {@linkcode Pokemon}.
|
||||
* @param received - The object to check
|
||||
* @return Whether `received` is a {@linkcode Pokemon} instance.
|
||||
* @returns Whether `received` is a {@linkcode Pokemon} instance.
|
||||
*/
|
||||
export function isPokemonInstance(received: unknown): received is Pokemon {
|
||||
return isObject(received) && received instanceof Pokemon;
|
||||
|
@ -3,7 +3,7 @@ import { globSync } from "node:fs";
|
||||
const dryRun = !!process.env.DRY_RUN?.match(/true/gi);
|
||||
|
||||
/**
|
||||
* @type {Partial<import("typedoc").TypeDocOptions>}
|
||||
* <!-- @type {Partial<import("typedoc").TypeDocOptions>} -->
|
||||
*/
|
||||
const config = {
|
||||
entryPoints: ["./src", "./test/test-utils"],
|
||||
@ -15,6 +15,7 @@ const config = {
|
||||
"test/test-utils/setup",
|
||||
"test/test-utils/reporters",
|
||||
],
|
||||
excludePrivate: false, // Private members are useful in the docs for contributors
|
||||
excludeReferences: true, // prevent documenting re-exports
|
||||
requiredToBeDocumented: [
|
||||
"Enum",
|
||||
@ -61,4 +62,5 @@ if (!dryRun && process.env.REF_NAME) {
|
||||
};
|
||||
}
|
||||
|
||||
// biome-ignore lint/style/noDefaultExport: required by TypeDoc
|
||||
export default config;
|
||||
|
Loading…
Reference in New Issue
Block a user