Compare commits

...

102 Commits

Author SHA1 Message Date
Lugiad
e29ca38466
Merge bad5b5b34c into f6b99780fb 2025-08-15 22:13:33 +02:00
SmhMyHead
f6b99780fb
[UI/UIX] Dex unseen species filter (#5909)
* [UI/UIX] Dex unseen species filter

* Removed changes to icon visibility rules

* Update src/ui/pokedex-ui-handler.ts

---------

Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
2025-08-15 19:27:16 +00:00
Amani H.
19af9bdb8b
[Beta] [Bug] Fix Various Nuzlocke-related Issues (#6261)
* [Bug] Fix Various Nuzlocke-related Issues

* Update encounter-pokemon-utils.ts

* Update attempt-capture-phase.ts

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
2025-08-15 19:22:59 +02:00
fabske0
8e61b642a3
[UI/UX Bug] Position runname dynamically (#6271)
Fix runname position

Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
2025-08-15 13:16:37 -04:00
fabske0
da7903ab92
[i18n] rename cancel to cancelButton (#6267)
rename cancel to cancelButton
2025-08-15 11:34:54 -04:00
Lugiad
bad5b5b34c
Merge branch 'beta' into hebrew-pr 2025-08-14 12:43:33 +02:00
Lugiad
65024b6c13
Merge branch 'pagefaultgames:beta' into hebrew-pr 2025-07-21 20:49:22 +02:00
Lugiad
47848b04eb
Merge branch 'beta' into hebrew-pr 2025-07-11 20:02:22 +02:00
Lugiad
5b6d8331a0
Update starter-select-ui-handler.ts 2025-07-05 21:06:31 +02:00
Lugiad
e5f4793cf8
Merge branch 'beta' into hebrew-pr 2025-07-05 21:04:07 +02:00
Lugiad
50f36ef8cd
Merge branch 'beta' into hebrew-pr 2025-06-18 23:09:13 +02:00
Lugiad
95f4cdc2da
Update i18n.ts 2025-06-18 23:08:44 +02:00
Lugiad
8e7d3e4a6c
Merge branch 'beta' into hebrew-pr 2025-06-17 22:41:06 +02:00
Lugiad
55d6b9a168
Merge branch 'beta' into hebrew-pr 2025-06-16 13:24:10 +02:00
Lugiad
55804df91e
Merge branch 'beta' into hebrew-pr 2025-06-12 02:13:14 +02:00
Lugiad
814e6ba690
Merge branch 'beta' into hebrew-pr 2025-05-31 18:59:54 +02:00
Lugiad
638a318048
Merge branch 'beta' into hebrew-pr 2025-05-31 01:58:08 +02:00
Lugiad
e8cc0adc0a
Merge branch 'beta' into hebrew-pr 2025-05-28 00:25:50 +02:00
Lugiad
1266ec3d03
Merge branch 'beta' into hebrew-pr 2025-05-21 14:39:37 +02:00
Lugiad
f86bbb10f1
Merge branch 'beta' into hebrew-pr 2025-05-14 00:57:43 +02:00
Lugiad
3a7e477c26
Update common.ts 2025-05-10 15:03:08 +02:00
Lugiad
b9e1022aea
Merge branch 'beta' into hebrew-pr 2025-05-10 15:02:03 +02:00
Lugiad
072a255322
Delete src/utils.ts 2025-05-10 15:01:23 +02:00
Lugiad
d84b8c5249
Merge branch 'beta' into hebrew-pr 2025-04-03 16:29:47 +02:00
Lugiad
319f2f9ba1
Merge branch 'beta' into hebrew-pr 2025-03-31 18:06:25 +02:00
Lugiad
3d03da1051
Merge branch 'beta' into hebrew-pr 2025-03-25 21:12:44 +01:00
Lugiad
f213747500
Merge branch 'beta' into hebrew-pr 2025-03-20 23:24:31 +01:00
Lugiad
f090768750
Merge branch 'beta' into hebrew-pr 2025-03-09 22:32:52 +01:00
Lugiad
2e15267b3a
Merge branch 'pagefaultgames:beta' into hebrew-pr 2025-03-04 17:20:15 +01:00
Lugiad
9271e4e645
Merge branch 'beta' into hebrew-pr 2025-02-20 15:52:53 +01:00
Lugiad
151eb3faa8
Merge branch 'beta' into hebrew-pr 2025-02-14 13:47:47 +01:00
Lugiad
473c73fef7
Merge branch 'pagefaultgames:beta' into hebrew-pr 2025-02-05 16:39:51 +01:00
Lugiad
5506c2cd4d
Merge branch 'beta' into hebrew-pr 2025-01-30 16:21:58 +01:00
Lugiad
80523937e7
Merge branch 'beta' into hebrew-pr 2025-01-21 15:42:54 +01:00
Lugiad
8e3246777e
Merge branch 'beta' into hebrew-pr 2025-01-05 13:48:24 +01:00
Lugiad
b9a4c03d87
Merge branch 'beta' into hebrew-pr 2024-12-08 02:49:08 +01:00
Lugiad
dd877fc8a4
Merge branch 'beta' into hebrew-pr 2024-12-02 19:23:46 +01:00
Lugiad
334c26849f
Merge branch 'beta' into hebrew-pr 2024-11-04 02:21:30 +01:00
Lugiad
b95c9cc4c3
Add files via upload 2024-11-04 02:17:43 +01:00
Lugiad
f24f87f210
Merge branch 'beta' into hebrew-pr 2024-10-18 14:55:38 +02:00
Lugiad
b817253053
Merge branch 'beta' into hebrew-pr 2024-10-11 19:50:27 +02:00
Lugiad
3dfbffd589
Updated with hebrew characters 2024-10-07 20:24:13 +02:00
Lugiad
544af31502
Update i18n.ts 2024-10-07 18:39:06 +02:00
Lugiad
3c22323d01
Merge branch 'beta' into hebrew-pr 2024-10-07 18:36:06 +02:00
Lugiad
65651f6be8
Merge branch 'beta' into hebrew-pr 2024-10-03 15:49:58 +02:00
Lugiad
b013337c2b
Delete src/locales/he directory 2024-10-03 15:48:49 +02:00
Lugiad
d82903a100
Merge branch 'beta' into hebrew-pr 2024-09-29 23:08:23 +02:00
Lugiad
6f99cba1ab
Update menu.json 2024-09-29 21:19:02 +02:00
Lugiad
df2a0d963c
Update utils.ts 2024-09-29 20:46:54 +02:00
Lugiad
dfa826d5fa
Update settings-display-ui-handler.ts 2024-09-29 20:16:17 +02:00
Lugiad
fb35f6f230
Update settings.ts 2024-09-29 20:15:57 +02:00
Lugiad
7816e398a1
Merge branch 'beta' into hebrew-pr 2024-09-29 12:59:52 +02:00
Lugiad
804585c752
Add files via upload 2024-09-29 12:56:54 +02:00
Lugiad
056bfcf115
Delete src/locales/he directory 2024-09-29 12:55:13 +02:00
Lugiad
ab17b4b4e3
Add files via upload 2024-09-29 12:54:10 +02:00
Lugiad
9cf884dce0
Delete src/locales/he/mystery-encounters directory 2024-09-29 12:52:49 +02:00
Lugiad
20f910ab60
Add files via upload 2024-09-29 12:47:10 +02:00
Lugiad
fcca584be7
Merge branch 'beta' into hebrew-pr 2024-09-27 00:49:28 +02:00
Lugiad
224461c40f
Merge branch 'beta' into hebrew-pr 2024-09-26 02:31:55 +02:00
Lugiad
d7e0b67308
Add files via upload 2024-09-25 13:53:54 +02:00
Lugiad
dccd8aecca
Merge branch 'beta' into hebrew-pr 2024-09-25 13:47:14 +02:00
Lugiad
55f0e9f711
Update mysterious-chest-dialogue.json 2024-09-23 02:03:33 +02:00
Lugiad
adcfd4e6fc
Add files via upload 2024-09-22 22:54:08 +02:00
Lugiad
cfef026db4
Merge branch 'beta' into hebrew-pr 2024-09-22 18:20:01 +02:00
Lugiad
ffbaa9d087
Merge branch 'beta' into hebrew-pr 2024-09-22 12:48:34 +02:00
Lugiad
d0f6dd7df7
Merge branch 'beta' into hebrew-pr 2024-09-22 03:57:17 +02:00
Lugiad
d0bd19dac2
Merge branch 'beta' into hebrew-pr 2024-09-21 17:47:10 +02:00
Lugiad
d51f8e6668
Merge branch 'beta' into hebrew-pr 2024-09-20 18:42:48 +02:00
Lugiad
44d5d54221
Merge branch 'beta' into hebrew-pr 2024-09-20 16:28:18 +02:00
Lugiad
c523bc52e8
Merge branch 'beta' into hebrew-pr 2024-09-20 16:26:18 +02:00
Lugiad
8e1f6ac597
Merge branch 'beta' into hebrew-pr 2024-09-20 10:07:38 +02:00
Lugiad
cf065befd3
Merge branch 'beta' into hebrew-pr 2024-09-20 02:37:46 +02:00
Lugiad
b274f28b3b
Merge branch 'beta' into hebrew-pr 2024-09-19 23:14:46 +02:00
Lugiad
6b9161b452
Merge branch 'beta' into hebrew-pr 2024-09-19 18:05:34 +02:00
Lugiad
6c3947107b
Update config.ts 2024-09-18 19:47:42 +02:00
Lugiad
90bc7e61fc
Add files via upload 2024-09-18 19:12:48 +02:00
Lugiad
87330648df
Add files via upload 2024-09-18 19:11:57 +02:00
Lugiad
1460e2b008
Merge branch 'beta' into hebrew-pr 2024-09-18 18:49:13 +02:00
Lugiad
6495eef073
Update bgm-name.json 2024-09-18 17:23:29 +02:00
Lugiad
e0244e0b31
Update a-trainers-test-dialogue.json 2024-09-18 00:31:25 +02:00
Lugiad
8dffce19a2
Update bgm-name.json 2024-09-18 00:30:26 +02:00
Lugiad
778b8f02fc
Add files via upload 2024-09-16 23:42:53 +02:00
Lugiad
3336bf8f4d
statuses_he.json 2024-09-16 23:42:29 +02:00
Lugiad
9300c59ad0
statuses_he..json 2024-09-16 23:42:07 +02:00
Lugiad
a6a4e54c03
Merge branch 'beta' into hebrew-pr 2024-09-16 23:20:28 +02:00
Lugiad
75fe691cd5
Add files via upload 2024-09-15 23:03:18 +02:00
Lugiad
71cfcd338b
Delete src/locales/he_IL directory 2024-09-15 23:02:17 +02:00
Lugiad
932cc3fdc0
Update starter-select-ui-handler.ts 2024-09-15 22:47:02 +02:00
Lugiad
ef69cb3fd0
Update settings-display-ui-handler.ts 2024-09-15 22:46:29 +02:00
Lugiad
bd9ce49130
Update settings.ts 2024-09-15 22:46:01 +02:00
Lugiad
6605e0ba85
Update i18n.ts 2024-09-15 22:45:19 +02:00
Lugiad
7abc5e9315
Update config.ts 2024-09-15 22:44:35 +02:00
Lugiad
fe1a6079bc
Rename types_he-IL.png to types_he.png 2024-09-15 22:44:12 +02:00
Lugiad
892ad0adec
Update and rename types_he-IL.json to types_he.json 2024-09-15 22:43:34 +02:00
Lugiad
513ac1dd82
Update settings.ts 2024-09-15 21:09:39 +02:00
Lugiad
c295afd112
Update i18n.ts 2024-09-15 21:08:44 +02:00
Lugiad
39ac733d0e
Update settings-display-ui-handler.ts 2024-09-15 21:08:10 +02:00
Lugiad
d2f12b5e65
Update starter-select-ui-handler.ts 2024-09-15 21:07:09 +02:00
Lugiad
eef81f62e2
Update types_he-IL.json 2024-09-15 20:50:16 +02:00
Lugiad
340e667f14
Update menu.json 2024-09-15 20:26:31 +02:00
Lugiad
dc4e787cda
Add files via upload 2024-09-15 20:24:58 +02:00
Lugiad
6540524679
Add files via upload 2024-09-15 20:24:22 +02:00
20 changed files with 758 additions and 69 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

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

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

BIN
public/images/types_he.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -99,6 +99,7 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
MysteryEncounterType.DARK_DEAL, MysteryEncounterType.DARK_DEAL,
) )
.withEncounterTier(MysteryEncounterTier.ROGUE) .withEncounterTier(MysteryEncounterTier.ROGUE)
.withDisallowedChallenges(Challenges.HARDCORE)
.withIntroSpriteConfigs([ .withIntroSpriteConfigs([
{ {
spriteKey: "dark_deal_scientist", spriteKey: "dark_deal_scientist",

View File

@ -673,6 +673,8 @@ export async function catchPokemon(
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs); globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
return new Promise(resolve => { return new Promise(resolve => {
const addStatus = new BooleanHolder(true);
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
const doPokemonCatchMenu = () => { const doPokemonCatchMenu = () => {
const end = () => { const end = () => {
// Ensure the pokemon is in the enemy party in all situations // Ensure the pokemon is in the enemy party in all situations
@ -708,9 +710,7 @@ export async function catchPokemon(
}); });
}; };
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => { Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
const addStatus = new BooleanHolder(true); if (!(isObtain || addStatus.value)) {
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
if (!addStatus.value) {
removePokemon(); removePokemon();
end(); end();
return; return;
@ -807,10 +807,16 @@ export async function catchPokemon(
}; };
if (showCatchObtainMessage) { if (showCatchObtainMessage) {
let catchMessage: string;
if (isObtain) {
catchMessage = "battle:pokemonObtained";
} else if (addStatus.value) {
catchMessage = "battle:pokemonCaught";
} else {
catchMessage = "battle:pokemonCaughtButChallenge";
}
globalScene.ui.showText( globalScene.ui.showText(
i18next.t(isObtain ? "battle:pokemonObtained" : "battle:pokemonCaught", { i18next.t(catchMessage, { pokemonName: pokemon.getNameToRender() }),
pokemonName: pokemon.getNameToRender(),
}),
null, null,
doPokemonCatchMenu, doPokemonCatchMenu,
0, 0,

View File

@ -253,8 +253,11 @@ export class AttemptCapturePhase extends PokemonPhase {
globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs); globalScene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
const addStatus = new BooleanHolder(true);
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
globalScene.ui.showText( globalScene.ui.showText(
i18next.t("battle:pokemonCaught", { i18next.t(addStatus.value ? "battle:pokemonCaught" : "battle:pokemonCaughtButChallenge", {
pokemonName: getPokemonNameWithAffix(pokemon), pokemonName: getPokemonNameWithAffix(pokemon),
}), }),
null, null,
@ -290,8 +293,6 @@ export class AttemptCapturePhase extends PokemonPhase {
}); });
}; };
Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => { Promise.all([pokemon.hideInfo(), globalScene.gameData.setPokemonCaught(pokemon)]).then(() => {
const addStatus = new BooleanHolder(true);
applyChallenges(ChallengeType.POKEMON_ADD_TO_PARTY, pokemon, addStatus);
if (!addStatus.value) { if (!addStatus.value) {
removePokemon(); removePokemon();
end(); end();

View File

@ -16,8 +16,10 @@ export class SelectBiomePhase extends BattlePhase {
globalScene.resetSeed(); globalScene.resetSeed();
const gameMode = globalScene.gameMode;
const currentBiome = globalScene.arena.biomeType; const currentBiome = globalScene.arena.biomeType;
const nextWaveIndex = globalScene.currentBattle.waveIndex + 1; const currentWaveIndex = globalScene.currentBattle.waveIndex;
const nextWaveIndex = currentWaveIndex + 1;
const setNextBiome = (nextBiome: BiomeId) => { const setNextBiome = (nextBiome: BiomeId) => {
if (nextWaveIndex % 10 === 1) { if (nextWaveIndex % 10 === 1) {
@ -26,6 +28,15 @@ export class SelectBiomePhase extends BattlePhase {
applyChallenges(ChallengeType.PARTY_HEAL, healStatus); applyChallenges(ChallengeType.PARTY_HEAL, healStatus);
if (healStatus.value) { if (healStatus.value) {
globalScene.phaseManager.unshiftNew("PartyHealPhase", false); globalScene.phaseManager.unshiftNew("PartyHealPhase", false);
} else {
globalScene.phaseManager.unshiftNew(
"SelectModifierPhase",
undefined,
undefined,
gameMode.isFixedBattle(currentWaveIndex)
? gameMode.getFixedBattle(currentWaveIndex).customModifierRewardSettings
: undefined,
);
} }
} }
globalScene.phaseManager.unshiftNew("SwitchBiomePhase", nextBiome); globalScene.phaseManager.unshiftNew("SwitchBiomePhase", nextBiome);
@ -33,12 +44,12 @@ export class SelectBiomePhase extends BattlePhase {
}; };
if ( if (
(globalScene.gameMode.isClassic && globalScene.gameMode.isWaveFinal(nextWaveIndex + 9)) || (gameMode.isClassic && gameMode.isWaveFinal(nextWaveIndex + 9)) ||
(globalScene.gameMode.isDaily && globalScene.gameMode.isWaveFinal(nextWaveIndex)) || (gameMode.isDaily && gameMode.isWaveFinal(nextWaveIndex)) ||
(globalScene.gameMode.hasShortBiomes && !(nextWaveIndex % 50)) (gameMode.hasShortBiomes && !(nextWaveIndex % 50))
) { ) {
setNextBiome(BiomeId.END); setNextBiome(BiomeId.END);
} else if (globalScene.gameMode.hasRandomBiomes) { } else if (gameMode.hasRandomBiomes) {
setNextBiome(this.generateNextBiome(nextWaveIndex)); setNextBiome(this.generateNextBiome(nextWaveIndex));
} else if (Array.isArray(biomeLinks[currentBiome])) { } else if (Array.isArray(biomeLinks[currentBiome])) {
const biomes: BiomeId[] = (biomeLinks[currentBiome] as (BiomeId | [BiomeId, number])[]) const biomes: BiomeId[] = (biomeLinks[currentBiome] as (BiomeId | [BiomeId, number])[])
@ -73,9 +84,6 @@ export class SelectBiomePhase extends BattlePhase {
} }
generateNextBiome(waveIndex: number): BiomeId { generateNextBiome(waveIndex: number): BiomeId {
if (!(waveIndex % 50)) { return waveIndex % 50 === 0 ? BiomeId.END : globalScene.generateRandomBiome(waveIndex);
return BiomeId.END;
}
return globalScene.generateRandomBiome(waveIndex);
} }
} }

View File

@ -3,13 +3,9 @@ import { globalScene } from "#app/global-scene";
import { modifierTypes } from "#data/data-lists"; import { modifierTypes } from "#data/data-lists";
import { BattleType } from "#enums/battle-type"; import { BattleType } from "#enums/battle-type";
import type { BattlerIndex } from "#enums/battler-index"; import type { BattlerIndex } from "#enums/battler-index";
import { ChallengeType } from "#enums/challenge-type";
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves"; import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
import type { CustomModifierSettings } from "#modifiers/modifier-type";
import { handleMysteryEncounterVictory } from "#mystery-encounters/encounter-phase-utils"; import { handleMysteryEncounterVictory } from "#mystery-encounters/encounter-phase-utils";
import { PokemonPhase } from "#phases/pokemon-phase"; import { PokemonPhase } from "#phases/pokemon-phase";
import { applyChallenges } from "#utils/challenge-utils";
import { BooleanHolder } from "#utils/common";
export class VictoryPhase extends PokemonPhase { export class VictoryPhase extends PokemonPhase {
public readonly phaseName = "VictoryPhase"; public readonly phaseName = "VictoryPhase";
@ -49,15 +45,19 @@ export class VictoryPhase extends PokemonPhase {
if (globalScene.currentBattle.battleType === BattleType.TRAINER) { if (globalScene.currentBattle.battleType === BattleType.TRAINER) {
globalScene.phaseManager.pushNew("TrainerVictoryPhase"); globalScene.phaseManager.pushNew("TrainerVictoryPhase");
} }
if (globalScene.gameMode.isEndless || !globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)) {
const gameMode = globalScene.gameMode;
const currentWaveIndex = globalScene.currentBattle.waveIndex;
if (gameMode.isEndless || !gameMode.isWaveFinal(currentWaveIndex)) {
globalScene.phaseManager.pushNew("EggLapsePhase"); globalScene.phaseManager.pushNew("EggLapsePhase");
if (globalScene.gameMode.isClassic) { if (gameMode.isClassic) {
switch (globalScene.currentBattle.waveIndex) { switch (currentWaveIndex) {
case ClassicFixedBossWaves.RIVAL_1: case ClassicFixedBossWaves.RIVAL_1:
case ClassicFixedBossWaves.RIVAL_2: case ClassicFixedBossWaves.RIVAL_2:
// Get event modifiers for this wave // Get event modifiers for this wave
timedEventManager timedEventManager
.getFixedBattleEventRewards(globalScene.currentBattle.waveIndex) .getFixedBattleEventRewards(currentWaveIndex)
.map(r => globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes[r])); .map(r => globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes[r]));
break; break;
case ClassicFixedBossWaves.EVIL_BOSS_2: case ClassicFixedBossWaves.EVIL_BOSS_2:
@ -66,59 +66,53 @@ export class VictoryPhase extends PokemonPhase {
break; break;
} }
} }
const healStatus = new BooleanHolder(globalScene.currentBattle.waveIndex % 10 === 0); if (currentWaveIndex % 10) {
applyChallenges(ChallengeType.PARTY_HEAL, healStatus);
if (!healStatus.value) {
globalScene.phaseManager.pushNew( globalScene.phaseManager.pushNew(
"SelectModifierPhase", "SelectModifierPhase",
undefined, undefined,
undefined, undefined,
this.getFixedBattleCustomModifiers(), gameMode.isFixedBattle(currentWaveIndex)
? gameMode.getFixedBattle(currentWaveIndex).customModifierRewardSettings
: undefined,
); );
} else if (globalScene.gameMode.isDaily) { } else if (gameMode.isDaily) {
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_CHARM); globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_CHARM);
if ( if (currentWaveIndex > 10 && !gameMode.isWaveFinal(currentWaveIndex)) {
globalScene.currentBattle.waveIndex > 10 &&
!globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)
) {
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL); globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
} }
} else { } else {
const superExpWave = !globalScene.gameMode.isEndless ? (globalScene.offsetGym ? 0 : 20) : 10; const superExpWave = !gameMode.isEndless ? (globalScene.offsetGym ? 0 : 20) : 10;
if (globalScene.gameMode.isEndless && globalScene.currentBattle.waveIndex === 10) { if (gameMode.isEndless && currentWaveIndex === 10) {
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_SHARE); globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.EXP_SHARE);
} }
if ( if (currentWaveIndex <= 750 && (currentWaveIndex <= 500 || currentWaveIndex % 30 === superExpWave)) {
globalScene.currentBattle.waveIndex <= 750 &&
(globalScene.currentBattle.waveIndex <= 500 || globalScene.currentBattle.waveIndex % 30 === superExpWave)
) {
globalScene.phaseManager.pushNew( globalScene.phaseManager.pushNew(
"ModifierRewardPhase", "ModifierRewardPhase",
globalScene.currentBattle.waveIndex % 30 !== superExpWave || globalScene.currentBattle.waveIndex > 250 currentWaveIndex % 30 !== superExpWave || currentWaveIndex > 250
? modifierTypes.EXP_CHARM ? modifierTypes.EXP_CHARM
: modifierTypes.SUPER_EXP_CHARM, : modifierTypes.SUPER_EXP_CHARM,
); );
} }
if (globalScene.currentBattle.waveIndex <= 150 && !(globalScene.currentBattle.waveIndex % 50)) { if (currentWaveIndex <= 150 && !(currentWaveIndex % 50)) {
globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL); globalScene.phaseManager.pushNew("ModifierRewardPhase", modifierTypes.GOLDEN_POKEBALL);
} }
if (globalScene.gameMode.isEndless && !(globalScene.currentBattle.waveIndex % 50)) { if (gameMode.isEndless && !(currentWaveIndex % 50)) {
globalScene.phaseManager.pushNew( globalScene.phaseManager.pushNew(
"ModifierRewardPhase", "ModifierRewardPhase",
!(globalScene.currentBattle.waveIndex % 250) ? modifierTypes.VOUCHER_PREMIUM : modifierTypes.VOUCHER_PLUS, !(currentWaveIndex % 250) ? modifierTypes.VOUCHER_PREMIUM : modifierTypes.VOUCHER_PLUS,
); );
globalScene.phaseManager.pushNew("AddEnemyBuffModifierPhase"); globalScene.phaseManager.pushNew("AddEnemyBuffModifierPhase");
} }
} }
if (globalScene.gameMode.hasRandomBiomes || globalScene.isNewBiome()) { if (gameMode.hasRandomBiomes || globalScene.isNewBiome()) {
globalScene.phaseManager.pushNew("SelectBiomePhase"); globalScene.phaseManager.pushNew("SelectBiomePhase");
} }
globalScene.phaseManager.pushNew("NewBattlePhase"); globalScene.phaseManager.pushNew("NewBattlePhase");
} else { } else {
globalScene.currentBattle.battleType = BattleType.CLEAR; globalScene.currentBattle.battleType = BattleType.CLEAR;
globalScene.score += globalScene.gameMode.getClearScoreBonus(); globalScene.score += gameMode.getClearScoreBonus();
globalScene.updateScoreText(); globalScene.updateScoreText();
globalScene.phaseManager.pushNew("GameOverPhase", true); globalScene.phaseManager.pushNew("GameOverPhase", true);
} }
@ -126,18 +120,4 @@ export class VictoryPhase extends PokemonPhase {
this.end(); this.end();
} }
/**
* If this wave is a fixed battle with special custom modifier rewards,
* will pass those settings to the upcoming {@linkcode SelectModifierPhase}`.
*/
getFixedBattleCustomModifiers(): CustomModifierSettings | undefined {
const gameMode = globalScene.gameMode;
const waveIndex = globalScene.currentBattle.waveIndex;
if (gameMode.isFixedBattle(waveIndex)) {
return gameMode.getFixedBattle(waveIndex).customModifierRewardSettings;
}
return undefined;
}
} }

View File

@ -79,13 +79,13 @@ const fonts: Array<LoadingFontFaceProperty> = [
face: new FontFace("emerald", "url(./fonts/pokemon-bw.ttf)", { face: new FontFace("emerald", "url(./fonts/pokemon-bw.ttf)", {
unicodeRange: rangesByLanguage.japanese, unicodeRange: rangesByLanguage.japanese,
}), }),
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl"], only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl", "he"],
}, },
{ {
face: new FontFace("pkmnems", "url(./fonts/pokemon-bw.ttf)", { face: new FontFace("pkmnems", "url(./fonts/pokemon-bw.ttf)", {
unicodeRange: rangesByLanguage.japanese, unicodeRange: rangesByLanguage.japanese,
}), }),
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl"], only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl", "he"],
}, },
]; ];
@ -192,6 +192,7 @@ export async function initI18n(): Promise<void> {
"ro", "ro",
"ru", "ru",
"tl", "tl",
"he",
], ],
backend: { backend: {
loadPath(lng: string, [ns]: string[]) { loadPath(lng: string, [ns]: string[]) {

View File

@ -448,6 +448,8 @@ export function getAchievementDescription(localizationKey: string): string {
return i18next.t("achv:FLIP_STATS.description", { context: genderStr }); return i18next.t("achv:FLIP_STATS.description", { context: genderStr });
case "FLIP_INVERSE": case "FLIP_INVERSE":
return i18next.t("achv:FLIP_INVERSE.description", { context: genderStr }); return i18next.t("achv:FLIP_INVERSE.description", { context: genderStr });
case "NUZLOCKE":
return i18next.t("achv:NUZLOCKE.description", { context: genderStr });
case "BREEDERS_IN_SPACE": case "BREEDERS_IN_SPACE":
return i18next.t("achv:BREEDERS_IN_SPACE.description", { return i18next.t("achv:BREEDERS_IN_SPACE.description", {
context: genderStr, context: genderStr,

View File

@ -985,6 +985,10 @@ export function setSetting(setting: string, value: number): boolean {
label: "Tagalog (Needs Help)", label: "Tagalog (Needs Help)",
handler: () => changeLocaleHandler("tl"), handler: () => changeLocaleHandler("tl"),
}, },
{
label: "עברית",
handler: () => changeLocaleHandler("he")
},
{ {
label: i18next.t("settings:back"), label: i18next.t("settings:back"),
handler: () => cancelHandler(), handler: () => cancelHandler(),

View File

@ -2142,7 +2142,12 @@ class PartyCancelButton extends Phaser.GameObjects.Container {
this.partyCancelPb = partyCancelPb; this.partyCancelPb = partyCancelPb;
const partyCancelText = addTextObject(-10, -7, i18next.t("partyUiHandler:cancel"), TextStyle.PARTY_CANCEL_BUTTON); const partyCancelText = addTextObject(
-10,
-7,
i18next.t("partyUiHandler:cancelButton"),
TextStyle.PARTY_CANCEL_BUTTON,
);
this.add(partyCancelText); this.add(partyCancelText);
} }

View File

@ -410,6 +410,11 @@ export class PokedexUiHandler extends MessageUiHandler {
new DropDownLabel(i18next.t("filterBar:hasHiddenAbility"), undefined, DropDownState.ON), new DropDownLabel(i18next.t("filterBar:hasHiddenAbility"), undefined, DropDownState.ON),
new DropDownLabel(i18next.t("filterBar:noHiddenAbility"), undefined, DropDownState.EXCLUDE), new DropDownLabel(i18next.t("filterBar:noHiddenAbility"), undefined, DropDownState.EXCLUDE),
]; ];
const seenSpeciesLabels = [
new DropDownLabel(i18next.t("filterBar:seenSpecies"), undefined, DropDownState.OFF),
new DropDownLabel(i18next.t("filterBar:isSeen"), undefined, DropDownState.ON),
new DropDownLabel(i18next.t("filterBar:isUnseen"), undefined, DropDownState.EXCLUDE),
];
const eggLabels = [ const eggLabels = [
new DropDownLabel(i18next.t("filterBar:egg"), undefined, DropDownState.OFF), new DropDownLabel(i18next.t("filterBar:egg"), undefined, DropDownState.OFF),
new DropDownLabel(i18next.t("filterBar:eggPurchasable"), undefined, DropDownState.ON), new DropDownLabel(i18next.t("filterBar:eggPurchasable"), undefined, DropDownState.ON),
@ -423,6 +428,7 @@ export class PokedexUiHandler extends MessageUiHandler {
new DropDownOption("FAVORITE", favoriteLabels), new DropDownOption("FAVORITE", favoriteLabels),
new DropDownOption("WIN", winLabels), new DropDownOption("WIN", winLabels),
new DropDownOption("HIDDEN_ABILITY", hiddenAbilityLabels), new DropDownOption("HIDDEN_ABILITY", hiddenAbilityLabels),
new DropDownOption("SEEN_SPECIES", seenSpeciesLabels),
new DropDownOption("EGG", eggLabels), new DropDownOption("EGG", eggLabels),
new DropDownOption("POKERUS", pokerusLabels), new DropDownOption("POKERUS", pokerusLabels),
]; ];
@ -792,13 +798,15 @@ export class PokedexUiHandler extends MessageUiHandler {
this.starterSelectMessageBoxContainer.setVisible(!!text?.length); this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
} }
isSeen(species: PokemonSpecies, dexEntry: DexEntry): boolean { isSeen(species: PokemonSpecies, dexEntry: DexEntry, seenFilter?: boolean): boolean {
if (dexEntry?.seenAttr) { if (dexEntry?.seenAttr) {
return true; return true;
} }
if (!seenFilter) {
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)]; const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
return !!starterDexEntry?.caughtAttr; return !!starterDexEntry?.caughtAttr;
}
return false;
} }
/** /**
@ -1617,6 +1625,21 @@ export class PokedexUiHandler extends MessageUiHandler {
} }
}); });
// Seen Filter
const dexEntry = globalScene.gameData.dexData[species.speciesId];
const isItSeen = this.isSeen(species, dexEntry, true);
const fitsSeen = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.ON) {
return isItSeen;
}
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.EXCLUDE) {
return !isItSeen;
}
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.OFF) {
return true;
}
});
// Egg Purchasable Filter // Egg Purchasable Filter
const isEggPurchasable = this.isSameSpeciesEggAvailable(species.speciesId); const isEggPurchasable = this.isSameSpeciesEggAvailable(species.speciesId);
const fitsEgg = this.filterBar.getVals(DropDownColumn.MISC).some(misc => { const fitsEgg = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
@ -1658,6 +1681,7 @@ export class PokedexUiHandler extends MessageUiHandler {
fitsFavorite && fitsFavorite &&
fitsWin && fitsWin &&
fitsHA && fitsHA &&
fitsSeen &&
fitsEgg && fitsEgg &&
fitsPokerus fitsPokerus
) { ) {

View File

@ -210,7 +210,8 @@ export class RunInfoUiHandler extends UiHandler {
this.runContainer.add(headerText); this.runContainer.add(headerText);
const runName = addTextObject(0, 0, this.runInfo.name, TextStyle.WINDOW); const runName = addTextObject(0, 0, this.runInfo.name, TextStyle.WINDOW);
runName.setOrigin(0, 0); runName.setOrigin(0, 0);
runName.setPositionRelative(headerBg, 60, 4); const runNameX = headerText.width / 6 + headerText.x + 4;
runName.setPositionRelative(headerBg, runNameX, 4);
this.runContainer.add(runName); this.runContainer.add(runName);
} }

View File

@ -122,6 +122,11 @@ export class SettingsDisplayUiHandler extends AbstractSettingsUiHandler {
value: "Tagalog", value: "Tagalog",
label: "Tagalog (Needs Help)", label: "Tagalog (Needs Help)",
}; };
case "he":
this.settings[languageIndex].options[0] = {
value: "עברית",
label: "עברית",
};
break; break;
default: default:
this.settings[languageIndex].options[0] = { this.settings[languageIndex].options[0] = {

View File

@ -181,6 +181,10 @@ const languageSettings: { [key: string]: LanguageSetting } = {
starterInfoTextSize: "56px", starterInfoTextSize: "56px",
instructionTextSize: "38px", instructionTextSize: "38px",
}, },
he: {
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
}; };
const valueReductionMax = 2; const valueReductionMax = 2;

View File

@ -430,6 +430,7 @@ export function hasAllLocalizedSprites(lang?: string): boolean {
case "fr": case "fr":
case "da": case "da":
case "de": case "de":
case "he":
case "it": case "it":
case "zh-CN": case "zh-CN":
case "zh-TW": case "zh-TW":

View File

@ -1,8 +1,10 @@
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { Challenges } from "#enums/challenges"; import { Challenges } from "#enums/challenges";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { PokeballType } from "#enums/pokeball"; import { PokeballType } from "#enums/pokeball";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { runMysteryEncounterToEnd } from "#test/mystery-encounter/encounter-test-utils";
import { GameManager } from "#test/test-utils/game-manager"; import { GameManager } from "#test/test-utils/game-manager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -52,4 +54,18 @@ describe("Challenges - Limited Catch", () => {
expect(game.scene.getPlayerParty()).toHaveLength(1); expect(game.scene.getPlayerParty()).toHaveLength(1);
}); });
it("should allow gift Pokémon from Mystery Encounters to be added to party", async () => {
game.override
.mysteryEncounterChance(100)
.mysteryEncounter(MysteryEncounterType.THE_POKEMON_SALESMAN)
.startingWave(12);
game.scene.money = 20000;
await game.challengeMode.runToSummon([SpeciesId.NUZLEAF]);
await runMysteryEncounterToEnd(game, 1);
expect(game.scene.getPlayerParty()).toHaveLength(2);
});
}); });

View File

@ -3,6 +3,7 @@ import { Challenges } from "#enums/challenges";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import { UiMode } from "#enums/ui-mode"; import { UiMode } from "#enums/ui-mode";
import { ExpBoosterModifier } from "#modifiers/modifier";
import { GameManager } from "#test/test-utils/game-manager"; import { GameManager } from "#test/test-utils/game-manager";
import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler"; import { ModifierSelectUiHandler } from "#ui/modifier-select-ui-handler";
import Phaser from "phaser"; import Phaser from "phaser";
@ -75,6 +76,7 @@ describe("Challenges - Limited Support", () => {
await game.doKillOpponents(); await game.doKillOpponents();
await game.toNextWave(); await game.toNextWave();
expect(game.scene.getModifiers(ExpBoosterModifier)).toHaveLength(1);
expect(playerPokemon).not.toHaveFullHp(); expect(playerPokemon).not.toHaveFullHp();
game.move.use(MoveId.SPLASH); game.move.use(MoveId.SPLASH);