mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 13:33:01 +02:00
Merge branch 'beta' into rerollcleanup
This commit is contained in:
commit
7f6da02623
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.9.2",
|
"version": "1.9.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.9.2",
|
"version": "1.9.4",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@material/material-color-utilities": "^0.2.7",
|
"@material/material-color-utilities": "^0.2.7",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.9.2",
|
"version": "1.9.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
@ -542,6 +542,79 @@
|
|||||||
"volume": 100,
|
"volume": 100,
|
||||||
"pitch": 55,
|
"pitch": 55,
|
||||||
"eventType": "AnimTimedSoundEvent"
|
"eventType": "AnimTimedSoundEvent"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"frameIndex": 0,
|
||||||
|
"resourceName": "PRAS- Sandstorm",
|
||||||
|
"bgX": -50,
|
||||||
|
"bgY": 0,
|
||||||
|
"opacity": 0,
|
||||||
|
"duration": 5,
|
||||||
|
"eventType": "AnimTimedAddBgEvent"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"frameIndex": 0,
|
||||||
|
"resourceName": "",
|
||||||
|
"bgX": -50,
|
||||||
|
"bgY": 0,
|
||||||
|
"opacity": 96,
|
||||||
|
"duration": 3,
|
||||||
|
"eventType": "AnimTimedUpdateBgEvent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"3": [
|
||||||
|
{
|
||||||
|
"frameIndex": 3,
|
||||||
|
"resourceName": "",
|
||||||
|
"bgX": -25,
|
||||||
|
"bgY": 0,
|
||||||
|
"opacity": 128,
|
||||||
|
"duration": 3,
|
||||||
|
"eventType": "AnimTimedUpdateBgEvent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"6": [
|
||||||
|
{
|
||||||
|
"frameIndex": 6,
|
||||||
|
"resourceName": "",
|
||||||
|
"bgX": 0,
|
||||||
|
"bgY": 0,
|
||||||
|
"opacity": 192,
|
||||||
|
"duration": 3,
|
||||||
|
"eventType": "AnimTimedUpdateBgEvent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"9": [
|
||||||
|
{
|
||||||
|
"frameIndex": 9,
|
||||||
|
"resourceName": "",
|
||||||
|
"bgX": 25,
|
||||||
|
"bgY": 0,
|
||||||
|
"opacity": 128,
|
||||||
|
"duration": 3,
|
||||||
|
"eventType": "AnimTimedUpdateBgEvent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"12": [
|
||||||
|
{
|
||||||
|
"frameIndex": 12,
|
||||||
|
"resourceName": "",
|
||||||
|
"bgX": 50,
|
||||||
|
"bgY": 0,
|
||||||
|
"opacity": 96,
|
||||||
|
"duration": 3,
|
||||||
|
"eventType": "AnimTimedUpdateBgEvent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"15": [
|
||||||
|
{
|
||||||
|
"frameIndex": 15,
|
||||||
|
"resourceName": "",
|
||||||
|
"bgX": 50,
|
||||||
|
"bgY": 0,
|
||||||
|
"opacity": 0,
|
||||||
|
"duration": 3,
|
||||||
|
"eventType": "AnimTimedUpdateBgEvent"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -179,8 +179,6 @@
|
|||||||
"483-origin",
|
"483-origin",
|
||||||
"484-origin",
|
"484-origin",
|
||||||
"484-origin",
|
"484-origin",
|
||||||
"487-origin",
|
|
||||||
"487-origin",
|
|
||||||
"531-mega",
|
"531-mega",
|
||||||
"531-mega",
|
"531-mega",
|
||||||
"569-gigantamax",
|
"569-gigantamax",
|
||||||
@ -1293,8 +1291,6 @@
|
|||||||
"483b-origin",
|
"483b-origin",
|
||||||
"484b-origin",
|
"484b-origin",
|
||||||
"484b-origin",
|
"484b-origin",
|
||||||
"487b-origin",
|
|
||||||
"487b-origin",
|
|
||||||
"531b-mega",
|
"531b-mega",
|
||||||
"531b-mega",
|
"531b-mega",
|
||||||
"569b-gigantamax",
|
"569b-gigantamax",
|
||||||
@ -2407,8 +2403,6 @@
|
|||||||
"483sb-origin",
|
"483sb-origin",
|
||||||
"484sb-origin",
|
"484sb-origin",
|
||||||
"484sb-origin",
|
"484sb-origin",
|
||||||
"487sb-origin",
|
|
||||||
"487sb-origin",
|
|
||||||
"531sb-mega",
|
"531sb-mega",
|
||||||
"531sb-mega",
|
"531sb-mega",
|
||||||
"569sb-gigantamax",
|
"569sb-gigantamax",
|
||||||
@ -3526,8 +3520,6 @@
|
|||||||
"483s-origin",
|
"483s-origin",
|
||||||
"484s-origin",
|
"484s-origin",
|
||||||
"484s-origin",
|
"484s-origin",
|
||||||
"487s-origin",
|
|
||||||
"487s-origin",
|
|
||||||
"531s-mega",
|
"531s-mega",
|
||||||
"531s-mega",
|
"531s-mega",
|
||||||
"569s-gigantamax",
|
"569s-gigantamax",
|
||||||
|
@ -1,566 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": [
|
|
||||||
{
|
|
||||||
"image": "487-origin.png",
|
|
||||||
"format": "RGBA8888",
|
|
||||||
"size": {
|
|
||||||
"w": 318,
|
|
||||||
"h": 318
|
|
||||||
},
|
|
||||||
"scale": 1,
|
|
||||||
"frames": [
|
|
||||||
{
|
|
||||||
"filename": "0023.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 8,
|
|
||||||
"w": 91,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"w": 91,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0024.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 8,
|
|
||||||
"w": 91,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"w": 91,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0020.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 9,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 91,
|
|
||||||
"y": 0,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0021.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 10,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 91,
|
|
||||||
"y": 0,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0022.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 10,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 91,
|
|
||||||
"y": 0,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0017.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 6,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 182,
|
|
||||||
"y": 0,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0018.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 7,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 182,
|
|
||||||
"y": 0,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0019.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 7,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 182,
|
|
||||||
"y": 0,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0025.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 7,
|
|
||||||
"w": 86,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 91,
|
|
||||||
"y": 74,
|
|
||||||
"w": 86,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0026.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 8,
|
|
||||||
"w": 86,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 91,
|
|
||||||
"y": 74,
|
|
||||||
"w": 86,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0009.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 1,
|
|
||||||
"w": 85,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 77,
|
|
||||||
"w": 85,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0010.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 0,
|
|
||||||
"w": 85,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 77,
|
|
||||||
"w": 85,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0011.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 0,
|
|
||||||
"w": 85,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 177,
|
|
||||||
"y": 75,
|
|
||||||
"w": 85,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0007.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 2,
|
|
||||||
"w": 83,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 85,
|
|
||||||
"y": 153,
|
|
||||||
"w": 83,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0008.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 1,
|
|
||||||
"w": 83,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 85,
|
|
||||||
"y": 153,
|
|
||||||
"w": 83,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0004.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 6,
|
|
||||||
"y": 5,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 236,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0005.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 6,
|
|
||||||
"y": 4,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 236,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0006.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 6,
|
|
||||||
"y": 3,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 236,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0015.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 4,
|
|
||||||
"w": 83,
|
|
||||||
"h": 76
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 160,
|
|
||||||
"w": 83,
|
|
||||||
"h": 76
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0016.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 5,
|
|
||||||
"w": 83,
|
|
||||||
"h": 76
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 160,
|
|
||||||
"w": 83,
|
|
||||||
"h": 76
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0003.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 6,
|
|
||||||
"w": 81,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 80,
|
|
||||||
"y": 236,
|
|
||||||
"w": 81,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0001.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 7,
|
|
||||||
"w": 81,
|
|
||||||
"h": 80
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 161,
|
|
||||||
"y": 236,
|
|
||||||
"w": 81,
|
|
||||||
"h": 80
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0002.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 7,
|
|
||||||
"w": 81,
|
|
||||||
"h": 80
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 161,
|
|
||||||
"y": 236,
|
|
||||||
"w": 81,
|
|
||||||
"h": 80
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0012.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 3,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 168,
|
|
||||||
"y": 157,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0013.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 2,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 168,
|
|
||||||
"y": 157,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0014.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 2,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 168,
|
|
||||||
"y": 157,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"meta": {
|
|
||||||
"app": "https://www.codeandweb.com/texturepacker",
|
|
||||||
"version": "3.0",
|
|
||||||
"smartupdate": "$TexturePacker:SmartUpdate:f669baef18fc6ae83124ad81c9b726f9:b705ee5bfe7dc7d92c348ffa4a4d6ce2:5d19509f6557fe13b0b6311434ba7e2d$"
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
@ -1,566 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": [
|
|
||||||
{
|
|
||||||
"image": "487-origin.png",
|
|
||||||
"format": "RGBA8888",
|
|
||||||
"size": {
|
|
||||||
"w": 326,
|
|
||||||
"h": 326
|
|
||||||
},
|
|
||||||
"scale": 1,
|
|
||||||
"frames": [
|
|
||||||
{
|
|
||||||
"filename": "0007.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 2,
|
|
||||||
"w": 95,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"w": 95,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0008.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 1,
|
|
||||||
"w": 95,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"w": 95,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0023.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 7,
|
|
||||||
"w": 97,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 84,
|
|
||||||
"w": 97,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0024.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 7,
|
|
||||||
"w": 97,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 84,
|
|
||||||
"w": 97,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0020.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 6,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 95,
|
|
||||||
"y": 0,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0021.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 7,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 95,
|
|
||||||
"y": 0,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0022.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 7,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 95,
|
|
||||||
"y": 0,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0004.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 1,
|
|
||||||
"y": 4,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 97,
|
|
||||||
"y": 78,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0005.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 1,
|
|
||||||
"y": 3,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 97,
|
|
||||||
"y": 78,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0006.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 1,
|
|
||||||
"y": 2,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 97,
|
|
||||||
"y": 78,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0025.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 1,
|
|
||||||
"y": 6,
|
|
||||||
"w": 95,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 97,
|
|
||||||
"y": 162,
|
|
||||||
"w": 95,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0026.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 1,
|
|
||||||
"y": 7,
|
|
||||||
"w": 95,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 97,
|
|
||||||
"y": 162,
|
|
||||||
"w": 95,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0009.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 1,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 191,
|
|
||||||
"y": 78,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0010.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 191,
|
|
||||||
"y": 78,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0017.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 5,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 192,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0018.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 6,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 192,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0019.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 6,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 192,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0011.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 163,
|
|
||||||
"w": 94,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0003.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 5,
|
|
||||||
"w": 92,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 192,
|
|
||||||
"y": 162,
|
|
||||||
"w": 92,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0001.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 6,
|
|
||||||
"w": 92,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 94,
|
|
||||||
"y": 243,
|
|
||||||
"w": 92,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0002.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 6,
|
|
||||||
"w": 92,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 94,
|
|
||||||
"y": 243,
|
|
||||||
"w": 92,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0015.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 7,
|
|
||||||
"y": 3,
|
|
||||||
"w": 90,
|
|
||||||
"h": 78
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 246,
|
|
||||||
"w": 90,
|
|
||||||
"h": 78
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0016.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 7,
|
|
||||||
"y": 4,
|
|
||||||
"w": 90,
|
|
||||||
"h": 78
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 246,
|
|
||||||
"w": 90,
|
|
||||||
"h": 78
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0012.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 2,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 186,
|
|
||||||
"y": 245,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0013.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 1,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 186,
|
|
||||||
"y": 245,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0014.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 1,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 186,
|
|
||||||
"y": 245,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"meta": {
|
|
||||||
"app": "https://www.codeandweb.com/texturepacker",
|
|
||||||
"version": "3.0",
|
|
||||||
"smartupdate": "$TexturePacker:SmartUpdate:d1a63c2aac4c99e778e6efb9fa120e53:11f49886c328fc8474daefc2533a7f5d:5d19509f6557fe13b0b6311434ba7e2d$"
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@ -1,293 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": [
|
|
||||||
{
|
|
||||||
"image": "487-origin.png",
|
|
||||||
"format": "RGBA8888",
|
|
||||||
"size": {
|
|
||||||
"w": 326,
|
|
||||||
"h": 326
|
|
||||||
},
|
|
||||||
"scale": 1,
|
|
||||||
"frames": [
|
|
||||||
{
|
|
||||||
"filename": "0004.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 2,
|
|
||||||
"w": 95,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"w": 95,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0012.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 7,
|
|
||||||
"w": 97,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 84,
|
|
||||||
"w": 97,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0011.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 7,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 95,
|
|
||||||
"y": 0,
|
|
||||||
"w": 97,
|
|
||||||
"h": 78
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0003.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 1,
|
|
||||||
"y": 3,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 97,
|
|
||||||
"y": 78,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0013.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 1,
|
|
||||||
"y": 6,
|
|
||||||
"w": 95,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 97,
|
|
||||||
"y": 162,
|
|
||||||
"w": 95,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0005.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 1,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 191,
|
|
||||||
"y": 78,
|
|
||||||
"w": 94,
|
|
||||||
"h": 84
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0009.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 5,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 192,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0010.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 6,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 192,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0006.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 0,
|
|
||||||
"w": 94,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 163,
|
|
||||||
"w": 94,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0002.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 5,
|
|
||||||
"w": 92,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 192,
|
|
||||||
"y": 162,
|
|
||||||
"w": 92,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0001.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 6,
|
|
||||||
"w": 92,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 94,
|
|
||||||
"y": 243,
|
|
||||||
"w": 92,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0008.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 7,
|
|
||||||
"y": 3,
|
|
||||||
"w": 90,
|
|
||||||
"h": 78
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 246,
|
|
||||||
"w": 90,
|
|
||||||
"h": 78
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0007.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 101,
|
|
||||||
"h": 88
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 1,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 186,
|
|
||||||
"y": 245,
|
|
||||||
"w": 91,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"meta": {
|
|
||||||
"app": "https://www.codeandweb.com/texturepacker",
|
|
||||||
"version": "3.0",
|
|
||||||
"smartupdate": "$TexturePacker:SmartUpdate:47e13c1a7a77825c7cf7e9fb039c2587:68949a6c55126e61a0a82829cd6ac5a8:5d19509f6557fe13b0b6311434ba7e2d$"
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@ -1,293 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": [
|
|
||||||
{
|
|
||||||
"image": "487-origin.png",
|
|
||||||
"format": "RGBA8888",
|
|
||||||
"size": {
|
|
||||||
"w": 318,
|
|
||||||
"h": 318
|
|
||||||
},
|
|
||||||
"scale": 1,
|
|
||||||
"frames": [
|
|
||||||
{
|
|
||||||
"filename": "0012.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 8,
|
|
||||||
"w": 91,
|
|
||||||
"h": 77
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"w": 91,
|
|
||||||
"h": 77
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0011.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 10,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 91,
|
|
||||||
"y": 0,
|
|
||||||
"w": 91,
|
|
||||||
"h": 74
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0009.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 6,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 182,
|
|
||||||
"y": 0,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0010.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 7,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 182,
|
|
||||||
"y": 0,
|
|
||||||
"w": 89,
|
|
||||||
"h": 75
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0013.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 7,
|
|
||||||
"w": 86,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 91,
|
|
||||||
"y": 74,
|
|
||||||
"w": 86,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0005.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 1,
|
|
||||||
"w": 85,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 77,
|
|
||||||
"w": 85,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0006.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 3,
|
|
||||||
"y": 0,
|
|
||||||
"w": 85,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 177,
|
|
||||||
"y": 75,
|
|
||||||
"w": 85,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0004.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 2,
|
|
||||||
"w": 83,
|
|
||||||
"h": 83
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 85,
|
|
||||||
"y": 153,
|
|
||||||
"w": 83,
|
|
||||||
"h": 83
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0003.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 6,
|
|
||||||
"y": 4,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 236,
|
|
||||||
"w": 80,
|
|
||||||
"h": 82
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0008.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 2,
|
|
||||||
"y": 4,
|
|
||||||
"w": 83,
|
|
||||||
"h": 76
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 160,
|
|
||||||
"w": 83,
|
|
||||||
"h": 76
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0002.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 6,
|
|
||||||
"w": 81,
|
|
||||||
"h": 81
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 80,
|
|
||||||
"y": 236,
|
|
||||||
"w": 81,
|
|
||||||
"h": 81
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0001.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 7,
|
|
||||||
"w": 81,
|
|
||||||
"h": 80
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 161,
|
|
||||||
"y": 236,
|
|
||||||
"w": 81,
|
|
||||||
"h": 80
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "0007.png",
|
|
||||||
"rotated": false,
|
|
||||||
"trimmed": true,
|
|
||||||
"sourceSize": {
|
|
||||||
"w": 91,
|
|
||||||
"h": 87
|
|
||||||
},
|
|
||||||
"spriteSourceSize": {
|
|
||||||
"x": 5,
|
|
||||||
"y": 2,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
},
|
|
||||||
"frame": {
|
|
||||||
"x": 168,
|
|
||||||
"y": 157,
|
|
||||||
"w": 81,
|
|
||||||
"h": 79
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"meta": {
|
|
||||||
"app": "https://www.codeandweb.com/texturepacker",
|
|
||||||
"version": "3.0",
|
|
||||||
"smartupdate": "$TexturePacker:SmartUpdate:00abebb007c47ada81d4e754581d7146:4691e19364eb9392dbee1ee37d737c8b:5d19509f6557fe13b0b6311434ba7e2d$"
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 32 KiB |
@ -1 +1 @@
|
|||||||
Subproject commit f4b8b7b737e47eaf7e7231855d0b59f8c7c7c0f8
|
Subproject commit 42cd5cf577f475c22bc82d55e7ca358eb4f3184f
|
@ -1045,7 +1045,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
y: number,
|
y: number,
|
||||||
originX = 0.5,
|
originX = 0.5,
|
||||||
originY = 0.5,
|
originY = 0.5,
|
||||||
ignoreOverride = false,
|
ignoreOverride = true,
|
||||||
useIllusion = false,
|
useIllusion = false,
|
||||||
): Phaser.GameObjects.Container {
|
): Phaser.GameObjects.Container {
|
||||||
const container = this.add.container(x, y);
|
const container = this.add.container(x, y);
|
||||||
@ -1053,9 +1053,9 @@ export default class BattleScene extends SceneBase {
|
|||||||
|
|
||||||
const icon = this.add.sprite(0, 0, pokemon.getIconAtlasKey(ignoreOverride, useIllusion));
|
const icon = this.add.sprite(0, 0, pokemon.getIconAtlasKey(ignoreOverride, useIllusion));
|
||||||
icon.setName(`sprite-${pokemon.name}-icon`);
|
icon.setName(`sprite-${pokemon.name}-icon`);
|
||||||
icon.setFrame(pokemon.getIconId(true, useIllusion));
|
icon.setFrame(pokemon.getIconId(ignoreOverride, useIllusion));
|
||||||
// Temporary fix to show pokemon's default icon if variant icon doesn't exist
|
// Temporary fix to show pokemon's default icon if variant icon doesn't exist
|
||||||
if (icon.frame.name !== pokemon.getIconId(true, useIllusion)) {
|
if (icon.frame.name !== pokemon.getIconId(ignoreOverride, useIllusion)) {
|
||||||
console.log(`${pokemon.name}'s variant icon does not exist. Replacing with default.`);
|
console.log(`${pokemon.name}'s variant icon does not exist. Replacing with default.`);
|
||||||
const temp = pokemon.shiny;
|
const temp = pokemon.shiny;
|
||||||
pokemon.shiny = false;
|
pokemon.shiny = false;
|
||||||
@ -1071,7 +1071,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
const fusionIcon = this.add.sprite(0, 0, pokemon.getFusionIconAtlasKey(ignoreOverride, useIllusion));
|
const fusionIcon = this.add.sprite(0, 0, pokemon.getFusionIconAtlasKey(ignoreOverride, useIllusion));
|
||||||
fusionIcon.setName("sprite-fusion-icon");
|
fusionIcon.setName("sprite-fusion-icon");
|
||||||
fusionIcon.setOrigin(0.5, 0);
|
fusionIcon.setOrigin(0.5, 0);
|
||||||
fusionIcon.setFrame(pokemon.getFusionIconId(true, useIllusion));
|
fusionIcon.setFrame(pokemon.getFusionIconId(ignoreOverride, useIllusion));
|
||||||
|
|
||||||
const originalWidth = icon.width;
|
const originalWidth = icon.width;
|
||||||
const originalHeight = icon.height;
|
const originalHeight = icon.height;
|
||||||
@ -2921,7 +2921,10 @@ export default class BattleScene extends SceneBase {
|
|||||||
instant?: boolean,
|
instant?: boolean,
|
||||||
cost?: number,
|
cost?: number,
|
||||||
): boolean {
|
): boolean {
|
||||||
if (!modifier) {
|
// We check against modifier.type to stop a bug related to loading in a pokemon that has a form change item, which prior to some patch
|
||||||
|
// that changed form change modifiers worked, had previously set the `type` field to null.
|
||||||
|
// TODO: This is not the right place to check for this; it should ideally go in a session migrator.
|
||||||
|
if (!modifier || !modifier.type) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let success = false;
|
let success = false;
|
||||||
|
@ -850,14 +850,14 @@ export class PostDefendContactApplyStatusEffectAbAttr extends PostDefendAbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
||||||
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)];
|
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randBattleSeedInt(this.effects.length)];
|
||||||
return move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon}) && !attacker.status
|
return move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon}) && !attacker.status
|
||||||
&& (this.chance === -1 || pokemon.randSeedInt(100) < this.chance)
|
&& (this.chance === -1 || pokemon.randBattleSeedInt(100) < this.chance)
|
||||||
&& attacker.canSetStatus(effect, true, false, pokemon);
|
&& attacker.canSetStatus(effect, true, false, pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, _args: any[]): void {
|
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, _args: any[]): void {
|
||||||
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)];
|
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randBattleSeedInt(this.effects.length)];
|
||||||
attacker.trySetStatus(effect, true, pokemon);
|
attacker.trySetStatus(effect, true, pokemon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -891,7 +891,7 @@ export class PostDefendContactApplyTagChanceAbAttr extends PostDefendAbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
||||||
return move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon}) && pokemon.randSeedInt(100) < this.chance
|
return move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon}) && pokemon.randBattleSeedInt(100) < this.chance
|
||||||
&& attacker.canAddTag(this.tagType);
|
&& attacker.canAddTag(this.tagType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1068,7 +1068,7 @@ export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr {
|
|||||||
|
|
||||||
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
override canApplyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): boolean {
|
||||||
return attacker.getTag(BattlerTagType.DISABLED) === null
|
return attacker.getTag(BattlerTagType.DISABLED) === null
|
||||||
&& move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon}) && (this.chance === -1 || pokemon.randSeedInt(100) < this.chance);
|
&& move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon}) && (this.chance === -1 || pokemon.randBattleSeedInt(100) < this.chance);
|
||||||
}
|
}
|
||||||
|
|
||||||
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, _args: any[]): void {
|
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, _args: any[]): void {
|
||||||
@ -1741,7 +1741,7 @@ export class PostAttackStealHeldItemAbAttr extends PostAttackAbAttr {
|
|||||||
const heldItems = this.getTargetHeldItems(defender).filter((i) => i.isTransferable);
|
const heldItems = this.getTargetHeldItems(defender).filter((i) => i.isTransferable);
|
||||||
if (heldItems.length) {
|
if (heldItems.length) {
|
||||||
// Ensure that the stolen item in testing is the same as when the effect is applied
|
// Ensure that the stolen item in testing is the same as when the effect is applied
|
||||||
this.stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)];
|
this.stolenItem = heldItems[pokemon.randBattleSeedInt(heldItems.length)];
|
||||||
if (globalScene.canTransferHeldItemModifier(this.stolenItem, pokemon)) {
|
if (globalScene.canTransferHeldItemModifier(this.stolenItem, pokemon)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1762,7 +1762,7 @@ export class PostAttackStealHeldItemAbAttr extends PostAttackAbAttr {
|
|||||||
): void {
|
): void {
|
||||||
const heldItems = this.getTargetHeldItems(defender).filter((i) => i.isTransferable);
|
const heldItems = this.getTargetHeldItems(defender).filter((i) => i.isTransferable);
|
||||||
if (!this.stolenItem) {
|
if (!this.stolenItem) {
|
||||||
this.stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)];
|
this.stolenItem = heldItems[pokemon.randBattleSeedInt(heldItems.length)];
|
||||||
}
|
}
|
||||||
if (globalScene.tryTransferHeldItemModifier(this.stolenItem, pokemon, false)) {
|
if (globalScene.tryTransferHeldItemModifier(this.stolenItem, pokemon, false)) {
|
||||||
globalScene.queueMessage(
|
globalScene.queueMessage(
|
||||||
@ -1799,9 +1799,9 @@ export class PostAttackApplyStatusEffectAbAttr extends PostAttackAbAttr {
|
|||||||
if (
|
if (
|
||||||
super.canApplyPostAttack(pokemon, passive, simulated, attacker, move, hitResult, args)
|
super.canApplyPostAttack(pokemon, passive, simulated, attacker, move, hitResult, args)
|
||||||
&& (simulated || !attacker.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && pokemon !== attacker
|
&& (simulated || !attacker.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && pokemon !== attacker
|
||||||
&& (!this.contactRequired || move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon})) && pokemon.randSeedInt(100) < this.chance && !pokemon.status)
|
&& (!this.contactRequired || move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon})) && pokemon.randBattleSeedInt(100) < this.chance && !pokemon.status)
|
||||||
) {
|
) {
|
||||||
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)];
|
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randBattleSeedInt(this.effects.length)];
|
||||||
return simulated || attacker.canSetStatus(effect, true, false, pokemon);
|
return simulated || attacker.canSetStatus(effect, true, false, pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1809,7 +1809,7 @@ export class PostAttackApplyStatusEffectAbAttr extends PostAttackAbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
applyPostAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): void {
|
applyPostAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): void {
|
||||||
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)];
|
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randBattleSeedInt(this.effects.length)];
|
||||||
attacker.trySetStatus(effect, true, pokemon);
|
attacker.trySetStatus(effect, true, pokemon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1839,12 +1839,12 @@ export class PostAttackApplyBattlerTagAbAttr extends PostAttackAbAttr {
|
|||||||
return super.canApplyPostAttack(pokemon, passive, simulated, attacker, move, hitResult, args) &&
|
return super.canApplyPostAttack(pokemon, passive, simulated, attacker, move, hitResult, args) &&
|
||||||
!attacker.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && pokemon !== attacker &&
|
!attacker.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && pokemon !== attacker &&
|
||||||
(!this.contactRequired || move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon})) &&
|
(!this.contactRequired || move.doesFlagEffectApply({flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon})) &&
|
||||||
pokemon.randSeedInt(100) < this.chance(attacker, pokemon, move) && !pokemon.status;
|
pokemon.randBattleSeedInt(100) < this.chance(attacker, pokemon, move) && !pokemon.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
override applyPostAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): void {
|
override applyPostAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult, args: any[]): void {
|
||||||
if (!simulated) {
|
if (!simulated) {
|
||||||
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)];
|
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randBattleSeedInt(this.effects.length)];
|
||||||
attacker.addTag(effect);
|
attacker.addTag(effect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1868,7 +1868,7 @@ export class PostDefendStealHeldItemAbAttr extends PostDefendAbAttr {
|
|||||||
) {
|
) {
|
||||||
const heldItems = this.getTargetHeldItems(attacker).filter((i) => i.isTransferable);
|
const heldItems = this.getTargetHeldItems(attacker).filter((i) => i.isTransferable);
|
||||||
if (heldItems.length) {
|
if (heldItems.length) {
|
||||||
this.stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)];
|
this.stolenItem = heldItems[pokemon.randBattleSeedInt(heldItems.length)];
|
||||||
if (globalScene.canTransferHeldItemModifier(this.stolenItem, pokemon)) {
|
if (globalScene.canTransferHeldItemModifier(this.stolenItem, pokemon)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1889,7 +1889,7 @@ export class PostDefendStealHeldItemAbAttr extends PostDefendAbAttr {
|
|||||||
|
|
||||||
const heldItems = this.getTargetHeldItems(attacker).filter((i) => i.isTransferable);
|
const heldItems = this.getTargetHeldItems(attacker).filter((i) => i.isTransferable);
|
||||||
if (!this.stolenItem) {
|
if (!this.stolenItem) {
|
||||||
this.stolenItem = heldItems[pokemon.randSeedInt(heldItems.length)];
|
this.stolenItem = heldItems[pokemon.randBattleSeedInt(heldItems.length)];
|
||||||
}
|
}
|
||||||
if (globalScene.tryTransferHeldItemModifier(this.stolenItem, pokemon, false)) {
|
if (globalScene.tryTransferHeldItemModifier(this.stolenItem, pokemon, false)) {
|
||||||
globalScene.queueMessage(
|
globalScene.queueMessage(
|
||||||
@ -3171,7 +3171,7 @@ export class ConfusionOnStatusEffectAbAttr extends PostAttackAbAttr {
|
|||||||
*/
|
*/
|
||||||
override applyPostAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, hitResult: HitResult, args: any[]): void {
|
override applyPostAttack(pokemon: Pokemon, passive: boolean, simulated: boolean, defender: Pokemon, move: Move, hitResult: HitResult, args: any[]): void {
|
||||||
if (!simulated) {
|
if (!simulated) {
|
||||||
defender.addTag(BattlerTagType.CONFUSED, pokemon.randSeedIntRange(2, 5), move.id, defender.id);
|
defender.addTag(BattlerTagType.CONFUSED, pokemon.randBattleSeedIntRange(2, 5), move.id, defender.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4235,12 +4235,12 @@ export class MoodyAbAttr extends PostTurnAbAttr {
|
|||||||
|
|
||||||
if (!simulated) {
|
if (!simulated) {
|
||||||
if (canRaise.length > 0) {
|
if (canRaise.length > 0) {
|
||||||
const raisedStat = canRaise[pokemon.randSeedInt(canRaise.length)];
|
const raisedStat = canRaise[pokemon.randBattleSeedInt(canRaise.length)];
|
||||||
canLower = canRaise.filter(s => s !== raisedStat);
|
canLower = canRaise.filter(s => s !== raisedStat);
|
||||||
globalScene.unshiftPhase(new StatStageChangePhase(pokemon.getBattlerIndex(), true, [ raisedStat ], 2));
|
globalScene.unshiftPhase(new StatStageChangePhase(pokemon.getBattlerIndex(), true, [ raisedStat ], 2));
|
||||||
}
|
}
|
||||||
if (canLower.length > 0) {
|
if (canLower.length > 0) {
|
||||||
const loweredStat = canLower[pokemon.randSeedInt(canLower.length)];
|
const loweredStat = canLower[pokemon.randBattleSeedInt(canLower.length)];
|
||||||
globalScene.unshiftPhase(new StatStageChangePhase(pokemon.getBattlerIndex(), true, [ loweredStat ], -1));
|
globalScene.unshiftPhase(new StatStageChangePhase(pokemon.getBattlerIndex(), true, [ loweredStat ], -1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5349,7 +5349,7 @@ export class BypassSpeedChanceAbAttr extends AbAttr {
|
|||||||
const isCommandFight = turnCommand?.command === Command.FIGHT;
|
const isCommandFight = turnCommand?.command === Command.FIGHT;
|
||||||
const move = turnCommand?.move?.move ? allMoves[turnCommand.move.move] : null;
|
const move = turnCommand?.move?.move ? allMoves[turnCommand.move.move] : null;
|
||||||
const isDamageMove = move?.category === MoveCategory.PHYSICAL || move?.category === MoveCategory.SPECIAL;
|
const isDamageMove = move?.category === MoveCategory.PHYSICAL || move?.category === MoveCategory.SPECIAL;
|
||||||
return !simulated && !bypassSpeed.value && pokemon.randSeedInt(100) < this.chance && isCommandFight && isDamageMove;
|
return !simulated && !bypassSpeed.value && pokemon.randBattleSeedInt(100) < this.chance && isCommandFight && isDamageMove;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,11 +8,11 @@ export type SignatureSpecies = {
|
|||||||
* The signature species for each Gym Leader, Elite Four member, and Champion.
|
* The signature species for each Gym Leader, Elite Four member, and Champion.
|
||||||
* The key is the trainer type, and the value is an array of Species or Species arrays.
|
* The key is the trainer type, and the value is an array of Species or Species arrays.
|
||||||
* This is in a separate const so it can be accessed from other places and not just the trainerConfigs
|
* This is in a separate const so it can be accessed from other places and not just the trainerConfigs
|
||||||
*
|
*
|
||||||
* @remarks
|
* @remarks
|
||||||
* The `Proxy` object allows us to define a handler that will intercept
|
* The `Proxy` object allows us to define a handler that will intercept
|
||||||
* the property access and return an empty array if the property does not exist in the object.
|
* the property access and return an empty array if the property does not exist in the object.
|
||||||
*
|
*
|
||||||
* This means that accessing `signatureSpecies` will not throw an error if the property does not exist,
|
* This means that accessing `signatureSpecies` will not throw an error if the property does not exist,
|
||||||
* but instead default to an empty array.
|
* but instead default to an empty array.
|
||||||
*/
|
*/
|
||||||
|
@ -19057,8 +19057,15 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.SLAKING,
|
Species.SLAKING,
|
||||||
Species.HARIYAMA,
|
Species.HARIYAMA,
|
||||||
Species.NOSEPASS,
|
Species.NOSEPASS,
|
||||||
|
Species.ARON,
|
||||||
|
Species.LAIRON,
|
||||||
|
Species.AGGRON,
|
||||||
|
Species.ELECTRIKE,
|
||||||
|
Species.MANECTRIC,
|
||||||
Species.GULPIN,
|
Species.GULPIN,
|
||||||
Species.SWALOT,
|
Species.SWALOT,
|
||||||
|
Species.WAILMER,
|
||||||
|
Species.WAILORD,
|
||||||
Species.NUMEL,
|
Species.NUMEL,
|
||||||
Species.CAMERUPT,
|
Species.CAMERUPT,
|
||||||
Species.TORKOAL,
|
Species.TORKOAL,
|
||||||
@ -19067,18 +19074,28 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.ZANGOOSE,
|
Species.ZANGOOSE,
|
||||||
Species.SEVIPER,
|
Species.SEVIPER,
|
||||||
Species.WHISCASH,
|
Species.WHISCASH,
|
||||||
|
Species.LILEEP,
|
||||||
|
Species.CRADILY,
|
||||||
|
Species.ANORITH,
|
||||||
|
Species.ARMALDO,
|
||||||
Species.SHUPPET,
|
Species.SHUPPET,
|
||||||
Species.BANETTE,
|
Species.BANETTE,
|
||||||
Species.DUSKULL,
|
Species.DUSKULL,
|
||||||
Species.DUSCLOPS,
|
Species.DUSCLOPS,
|
||||||
Species.TROPIUS,
|
Species.TROPIUS,
|
||||||
Species.CHIMECHO,
|
Species.CHIMECHO,
|
||||||
|
Species.ABSOL,
|
||||||
|
Species.SPHEAL,
|
||||||
|
Species.SEALEO,
|
||||||
|
Species.WALREIN,
|
||||||
Species.REGIROCK,
|
Species.REGIROCK,
|
||||||
Species.REGICE,
|
Species.REGICE,
|
||||||
Species.REGISTEEL,
|
Species.REGISTEEL,
|
||||||
Species.TURTWIG,
|
Species.TURTWIG,
|
||||||
Species.GROTLE,
|
Species.GROTLE,
|
||||||
Species.TORTERRA,
|
Species.TORTERRA,
|
||||||
|
Species.BIDOOF,
|
||||||
|
Species.BIBAREL,
|
||||||
Species.CRANIDOS,
|
Species.CRANIDOS,
|
||||||
Species.RAMPARDOS,
|
Species.RAMPARDOS,
|
||||||
Species.SHIELDON,
|
Species.SHIELDON,
|
||||||
@ -19120,6 +19137,11 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.TEPIG,
|
Species.TEPIG,
|
||||||
Species.PIGNITE,
|
Species.PIGNITE,
|
||||||
Species.EMBOAR,
|
Species.EMBOAR,
|
||||||
|
Species.MUNNA,
|
||||||
|
Species.MUSHARNA,
|
||||||
|
Species.ROGGENROLA,
|
||||||
|
Species.BOLDORE,
|
||||||
|
Species.GIGALITH,
|
||||||
Species.DRILBUR,
|
Species.DRILBUR,
|
||||||
Species.EXCADRILL,
|
Species.EXCADRILL,
|
||||||
Species.TIMBURR,
|
Species.TIMBURR,
|
||||||
@ -19128,28 +19150,44 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.SANDILE,
|
Species.SANDILE,
|
||||||
Species.KROKOROK,
|
Species.KROKOROK,
|
||||||
Species.KROOKODILE,
|
Species.KROOKODILE,
|
||||||
|
Species.DWEBBLE,
|
||||||
|
Species.CRUSTLE,
|
||||||
Species.SCRAGGY,
|
Species.SCRAGGY,
|
||||||
Species.SCRAFTY,
|
Species.SCRAFTY,
|
||||||
Species.YAMASK,
|
Species.YAMASK,
|
||||||
Species.COFAGRIGUS,
|
Species.COFAGRIGUS,
|
||||||
|
Species.TRUBBISH,
|
||||||
|
Species.GARBODOR,
|
||||||
Species.SAWSBUCK,
|
Species.SAWSBUCK,
|
||||||
|
Species.FERROSEED,
|
||||||
|
Species.FERROTHORN,
|
||||||
Species.LITWICK,
|
Species.LITWICK,
|
||||||
Species.LAMPENT,
|
Species.LAMPENT,
|
||||||
Species.CHANDELURE,
|
Species.CHANDELURE,
|
||||||
Species.BEARTIC,
|
Species.BEARTIC,
|
||||||
|
Species.SHELMET,
|
||||||
|
Species.ACCELGOR,
|
||||||
|
Species.STUNFISK,
|
||||||
Species.GOLETT,
|
Species.GOLETT,
|
||||||
Species.GOLURK,
|
Species.GOLURK,
|
||||||
|
Species.HEATMOR,
|
||||||
Species.CHESPIN,
|
Species.CHESPIN,
|
||||||
Species.QUILLADIN,
|
Species.QUILLADIN,
|
||||||
Species.CHESNAUGHT,
|
Species.CHESNAUGHT,
|
||||||
|
Species.TYRUNT,
|
||||||
|
Species.TYRANTRUM,
|
||||||
Species.SYLVEON,
|
Species.SYLVEON,
|
||||||
Species.GOOMY,
|
Species.GOOMY,
|
||||||
Species.SLIGGOO,
|
Species.SLIGGOO,
|
||||||
Species.GOODRA,
|
Species.GOODRA,
|
||||||
Species.PHANTUMP,
|
Species.PHANTUMP,
|
||||||
Species.TREVENANT,
|
Species.TREVENANT,
|
||||||
|
Species.PUMPKABOO,
|
||||||
|
Species.GOURGEIST,
|
||||||
Species.BERGMITE,
|
Species.BERGMITE,
|
||||||
Species.AVALUGG,
|
Species.AVALUGG,
|
||||||
|
Species.ROWLET,
|
||||||
|
Species.DARTRIX,
|
||||||
Species.DECIDUEYE,
|
Species.DECIDUEYE,
|
||||||
Species.GUMSHOOS,
|
Species.GUMSHOOS,
|
||||||
Species.MUDBRAY,
|
Species.MUDBRAY,
|
||||||
@ -19157,7 +19195,9 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.PASSIMIAN,
|
Species.PASSIMIAN,
|
||||||
Species.SANDYGAST,
|
Species.SANDYGAST,
|
||||||
Species.PALOSSAND,
|
Species.PALOSSAND,
|
||||||
|
Species.PYUKUMUKU,
|
||||||
Species.KOMALA,
|
Species.KOMALA,
|
||||||
|
Species.TURTONATOR,
|
||||||
Species.MIMIKYU,
|
Species.MIMIKYU,
|
||||||
Species.SKWOVET,
|
Species.SKWOVET,
|
||||||
Species.GREEDENT,
|
Species.GREEDENT,
|
||||||
@ -19169,6 +19209,7 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.SINISTEA,
|
Species.SINISTEA,
|
||||||
Species.POLTEAGEIST,
|
Species.POLTEAGEIST,
|
||||||
Species.PERRSERKER,
|
Species.PERRSERKER,
|
||||||
|
Species.CURSOLA,
|
||||||
Species.RUNERIGUS,
|
Species.RUNERIGUS,
|
||||||
Species.PINCURCHIN,
|
Species.PINCURCHIN,
|
||||||
Species.STONJOURNER,
|
Species.STONJOURNER,
|
||||||
@ -19236,6 +19277,7 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.GALAR_WEEZING,
|
Species.GALAR_WEEZING,
|
||||||
Species.GALAR_SLOWKING,
|
Species.GALAR_SLOWKING,
|
||||||
Species.GALAR_YAMASK,
|
Species.GALAR_YAMASK,
|
||||||
|
Species.GALAR_STUNFISK,
|
||||||
Species.HISUI_ELECTRODE,
|
Species.HISUI_ELECTRODE,
|
||||||
Species.HISUI_TYPHLOSION,
|
Species.HISUI_TYPHLOSION,
|
||||||
Species.HISUI_QWILFISH,
|
Species.HISUI_QWILFISH,
|
||||||
@ -67062,7 +67104,7 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.CHEWTLE,
|
Species.CHEWTLE,
|
||||||
Species.DREDNAW,
|
Species.DREDNAW,
|
||||||
Species.YAMPER,
|
Species.YAMPER,
|
||||||
Species.BOLTUND,
|
Species.BOLTUND,
|
||||||
Species.ROLYCOLY,
|
Species.ROLYCOLY,
|
||||||
Species.CARKOL,
|
Species.CARKOL,
|
||||||
Species.COALOSSAL,
|
Species.COALOSSAL,
|
||||||
@ -67079,7 +67121,7 @@ export const tmSpecies: TmSpecies = {
|
|||||||
Species.SIZZLIPEDE,
|
Species.SIZZLIPEDE,
|
||||||
Species.CENTISKORCH,
|
Species.CENTISKORCH,
|
||||||
Species.CLOBBOPUS,
|
Species.CLOBBOPUS,
|
||||||
Species.GRAPPLOCT,
|
Species.GRAPPLOCT,
|
||||||
Species.SINISTEA,
|
Species.SINISTEA,
|
||||||
Species.POLTEAGEIST,
|
Species.POLTEAGEIST,
|
||||||
Species.HATENNA,
|
Species.HATENNA,
|
||||||
|
@ -766,11 +766,11 @@ export class ConfusedTag extends BattlerTag {
|
|||||||
globalScene.unshiftPhase(new CommonAnimPhase(pokemon.getBattlerIndex(), undefined, CommonAnim.CONFUSION));
|
globalScene.unshiftPhase(new CommonAnimPhase(pokemon.getBattlerIndex(), undefined, CommonAnim.CONFUSION));
|
||||||
|
|
||||||
// 1/3 chance of hitting self with a 40 base power move
|
// 1/3 chance of hitting self with a 40 base power move
|
||||||
if (pokemon.randSeedInt(3) === 0 || Overrides.CONFUSION_ACTIVATION_OVERRIDE === true) {
|
if (pokemon.randBattleSeedInt(3) === 0 || Overrides.CONFUSION_ACTIVATION_OVERRIDE === true) {
|
||||||
const atk = pokemon.getEffectiveStat(Stat.ATK);
|
const atk = pokemon.getEffectiveStat(Stat.ATK);
|
||||||
const def = pokemon.getEffectiveStat(Stat.DEF);
|
const def = pokemon.getEffectiveStat(Stat.DEF);
|
||||||
const damage = toDmgValue(
|
const damage = toDmgValue(
|
||||||
((((2 * pokemon.level) / 5 + 2) * 40 * atk) / def / 50 + 2) * (pokemon.randSeedIntRange(85, 100) / 100),
|
((((2 * pokemon.level) / 5 + 2) * 40 * atk) / def / 50 + 2) * (pokemon.randBattleSeedIntRange(85, 100) / 100),
|
||||||
);
|
);
|
||||||
// Intentionally don't increment rage fist's hitCount
|
// Intentionally don't increment rage fist's hitCount
|
||||||
globalScene.queueMessage(i18next.t("battlerTags:confusedLapseHurtItself"));
|
globalScene.queueMessage(i18next.t("battlerTags:confusedLapseHurtItself"));
|
||||||
@ -890,7 +890,7 @@ export class InfatuatedTag extends BattlerTag {
|
|||||||
);
|
);
|
||||||
globalScene.unshiftPhase(new CommonAnimPhase(pokemon.getBattlerIndex(), undefined, CommonAnim.ATTRACT));
|
globalScene.unshiftPhase(new CommonAnimPhase(pokemon.getBattlerIndex(), undefined, CommonAnim.ATTRACT));
|
||||||
|
|
||||||
if (pokemon.randSeedInt(2)) {
|
if (pokemon.randBattleSeedInt(2)) {
|
||||||
globalScene.queueMessage(
|
globalScene.queueMessage(
|
||||||
i18next.t("battlerTags:infatuatedLapseImmobilize", {
|
i18next.t("battlerTags:infatuatedLapseImmobilize", {
|
||||||
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
||||||
@ -1119,7 +1119,7 @@ export class FrenzyTag extends BattlerTag {
|
|||||||
|
|
||||||
if (this.turnCount < 2) {
|
if (this.turnCount < 2) {
|
||||||
// Only add CONFUSED tag if a disruption occurs on the final confusion-inducing turn of FRENZY
|
// Only add CONFUSED tag if a disruption occurs on the final confusion-inducing turn of FRENZY
|
||||||
pokemon.addTag(BattlerTagType.CONFUSED, pokemon.randSeedIntRange(2, 4));
|
pokemon.addTag(BattlerTagType.CONFUSED, pokemon.randBattleSeedIntRange(2, 4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1591,7 +1591,7 @@ export class RandomLevelDamageAttr extends FixedDamageAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getDamage(user: Pokemon, target: Pokemon, move: Move): number {
|
getDamage(user: Pokemon, target: Pokemon, move: Move): number {
|
||||||
return toDmgValue(user.level * (user.randSeedIntRange(50, 150) * 0.01));
|
return toDmgValue(user.level * (user.randBattleSeedIntRange(50, 150) * 0.01));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2352,7 +2352,7 @@ export class MultiHitAttr extends MoveAttr {
|
|||||||
switch (this.multiHitType) {
|
switch (this.multiHitType) {
|
||||||
case MultiHitType._2_TO_5:
|
case MultiHitType._2_TO_5:
|
||||||
{
|
{
|
||||||
const rand = user.randSeedInt(20);
|
const rand = user.randBattleSeedInt(20);
|
||||||
const hitValue = new NumberHolder(rand);
|
const hitValue = new NumberHolder(rand);
|
||||||
applyAbAttrs(MaxMultiHitAbAttr, user, null, false, hitValue);
|
applyAbAttrs(MaxMultiHitAbAttr, user, null, false, hitValue);
|
||||||
if (hitValue.value >= 13) {
|
if (hitValue.value >= 13) {
|
||||||
@ -2453,7 +2453,7 @@ export class StatusEffectAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
||||||
const statusCheck = moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance;
|
const statusCheck = moveChance < 0 || moveChance === 100 || user.randBattleSeedInt(100) < moveChance;
|
||||||
const quiet = move.category !== MoveCategory.STATUS;
|
const quiet = move.category !== MoveCategory.STATUS;
|
||||||
if (statusCheck) {
|
if (statusCheck) {
|
||||||
const pokemon = this.selfTarget ? user : target;
|
const pokemon = this.selfTarget ? user : target;
|
||||||
@ -2560,7 +2560,7 @@ export class StealHeldItemChanceAttr extends MoveEffectAttr {
|
|||||||
const poolType = target.isPlayer() ? ModifierPoolType.PLAYER : target.hasTrainer() ? ModifierPoolType.TRAINER : ModifierPoolType.WILD;
|
const poolType = target.isPlayer() ? ModifierPoolType.PLAYER : target.hasTrainer() ? ModifierPoolType.TRAINER : ModifierPoolType.WILD;
|
||||||
const highestItemTier = heldItems.map((m) => m.type.getOrInferTier(poolType)).reduce((highestTier, tier) => Math.max(tier!, highestTier), 0); // TODO: is the bang after tier correct?
|
const highestItemTier = heldItems.map((m) => m.type.getOrInferTier(poolType)).reduce((highestTier, tier) => Math.max(tier!, highestTier), 0); // TODO: is the bang after tier correct?
|
||||||
const tierHeldItems = heldItems.filter((m) => m.type.getOrInferTier(poolType) === highestItemTier);
|
const tierHeldItems = heldItems.filter((m) => m.type.getOrInferTier(poolType) === highestItemTier);
|
||||||
const stolenItem = tierHeldItems[user.randSeedInt(tierHeldItems.length)];
|
const stolenItem = tierHeldItems[user.randBattleSeedInt(tierHeldItems.length)];
|
||||||
if (!globalScene.tryTransferHeldItemModifier(stolenItem, user, false)) {
|
if (!globalScene.tryTransferHeldItemModifier(stolenItem, user, false)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2636,7 +2636,7 @@ export class RemoveHeldItemAttr extends MoveEffectAttr {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const removedItem = heldItems[user.randSeedInt(heldItems.length)];
|
const removedItem = heldItems[user.randBattleSeedInt(heldItems.length)];
|
||||||
|
|
||||||
// Decrease item amount and update icon
|
// Decrease item amount and update icon
|
||||||
target.loseHeldItem(removedItem);
|
target.loseHeldItem(removedItem);
|
||||||
@ -2697,7 +2697,7 @@ export class EatBerryAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// pick a random berry to gobble and check if we preserve it
|
// pick a random berry to gobble and check if we preserve it
|
||||||
this.chosenBerry = heldBerries[user.randSeedInt(heldBerries.length)];
|
this.chosenBerry = heldBerries[user.randBattleSeedInt(heldBerries.length)];
|
||||||
const preserve = new BooleanHolder(false);
|
const preserve = new BooleanHolder(false);
|
||||||
// check for berry pouch preservation
|
// check for berry pouch preservation
|
||||||
globalScene.applyModifiers(PreserveBerryModifier, pokemon.isPlayer(), pokemon, preserve);
|
globalScene.applyModifiers(PreserveBerryModifier, pokemon.isPlayer(), pokemon, preserve);
|
||||||
@ -2774,7 +2774,7 @@ export class StealEatBerryAttr extends EatBerryAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// pick a random berry and eat it
|
// pick a random berry and eat it
|
||||||
this.chosenBerry = heldBerries[user.randSeedInt(heldBerries.length)];
|
this.chosenBerry = heldBerries[user.randBattleSeedInt(heldBerries.length)];
|
||||||
applyPostItemLostAbAttrs(PostItemLostAbAttr, target, false);
|
applyPostItemLostAbAttrs(PostItemLostAbAttr, target, false);
|
||||||
const message = i18next.t("battle:stealEatBerry", { pokemonName: user.name, targetName: target.name, berryName: this.chosenBerry.type.name });
|
const message = i18next.t("battle:stealEatBerry", { pokemonName: user.name, targetName: target.name, berryName: this.chosenBerry.type.name });
|
||||||
globalScene.queueMessage(message);
|
globalScene.queueMessage(message);
|
||||||
@ -3205,7 +3205,7 @@ export class StatStageChangeAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
||||||
if (moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance) {
|
if (moveChance < 0 || moveChance === 100 || user.randBattleSeedInt(100) < moveChance) {
|
||||||
const stages = this.getLevels(user);
|
const stages = this.getLevels(user);
|
||||||
globalScene.unshiftPhase(new StatStageChangePhase((this.selfTarget ? user : target).getBattlerIndex(), this.selfTarget, this.stats, stages, this.showMessage));
|
globalScene.unshiftPhase(new StatStageChangePhase((this.selfTarget ? user : target).getBattlerIndex(), this.selfTarget, this.stats, stages, this.showMessage));
|
||||||
return true;
|
return true;
|
||||||
@ -3431,7 +3431,7 @@ export class AcupressureStatStageChangeAttr extends MoveEffectAttr {
|
|||||||
override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
override apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const randStats = BATTLE_STATS.filter((s) => target.getStatStage(s) < 6);
|
const randStats = BATTLE_STATS.filter((s) => target.getStatStage(s) < 6);
|
||||||
if (randStats.length > 0) {
|
if (randStats.length > 0) {
|
||||||
const boostStat = [ randStats[user.randSeedInt(randStats.length)] ];
|
const boostStat = [ randStats[user.randBattleSeedInt(randStats.length)] ];
|
||||||
globalScene.unshiftPhase(new StatStageChangePhase(target.getBattlerIndex(), this.selfTarget, boostStat, 2));
|
globalScene.unshiftPhase(new StatStageChangePhase(target.getBattlerIndex(), this.selfTarget, boostStat, 2));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -4823,7 +4823,7 @@ export class ShellSideArmCategoryAttr extends VariableMoveCategoryAttr {
|
|||||||
if (predictedPhysDmg > predictedSpecDmg) {
|
if (predictedPhysDmg > predictedSpecDmg) {
|
||||||
category.value = MoveCategory.PHYSICAL;
|
category.value = MoveCategory.PHYSICAL;
|
||||||
return true;
|
return true;
|
||||||
} else if (predictedPhysDmg === predictedSpecDmg && user.randSeedInt(2) === 0) {
|
} else if (predictedPhysDmg === predictedSpecDmg && user.randBattleSeedInt(2) === 0) {
|
||||||
category.value = MoveCategory.PHYSICAL;
|
category.value = MoveCategory.PHYSICAL;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -5404,7 +5404,7 @@ export class FrenzyAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!user.getTag(BattlerTagType.FRENZY) && !user.getMoveQueue().length) {
|
if (!user.getTag(BattlerTagType.FRENZY) && !user.getMoveQueue().length) {
|
||||||
const turnCount = user.randSeedIntRange(1, 2);
|
const turnCount = user.randBattleSeedIntRange(1, 2);
|
||||||
new Array(turnCount).fill(null).map(() => user.getMoveQueue().push({ move: move.id, targets: [ target.getBattlerIndex() ], ignorePP: true }));
|
new Array(turnCount).fill(null).map(() => user.getMoveQueue().push({ move: move.id, targets: [ target.getBattlerIndex() ], ignorePP: true }));
|
||||||
user.addTag(BattlerTagType.FRENZY, turnCount, move.id, user.id);
|
user.addTag(BattlerTagType.FRENZY, turnCount, move.id, user.id);
|
||||||
} else {
|
} else {
|
||||||
@ -5485,8 +5485,8 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
||||||
if (moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance) {
|
if (moveChance < 0 || moveChance === 100 || user.randBattleSeedInt(100) < moveChance) {
|
||||||
return (this.selfTarget ? user : target).addTag(this.tagType, user.randSeedIntRange(this.turnCountMin, this.turnCountMax), move.id, user.id);
|
return (this.selfTarget ? user : target).addTag(this.tagType, user.randBattleSeedIntRange(this.turnCountMin, this.turnCountMax), move.id, user.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -5654,7 +5654,7 @@ export class JawLockAttr extends AddBattlerTagAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const moveChance = this.getMoveChance(user, target, move, this.selfTarget);
|
const moveChance = this.getMoveChance(user, target, move, this.selfTarget);
|
||||||
if (moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance) {
|
if (moveChance < 0 || moveChance === 100 || user.randBattleSeedInt(100) < moveChance) {
|
||||||
/**
|
/**
|
||||||
* Add the tag to both the user and the target.
|
* Add the tag to both the user and the target.
|
||||||
* The target's tag source is considered to be the user and vice versa
|
* The target's tag source is considered to be the user and vice versa
|
||||||
@ -5792,7 +5792,7 @@ export class ProtectAttr extends AddBattlerTagAttr {
|
|||||||
timesUsed++;
|
timesUsed++;
|
||||||
}
|
}
|
||||||
if (timesUsed) {
|
if (timesUsed) {
|
||||||
return !user.randSeedInt(Math.pow(3, timesUsed));
|
return !user.randBattleSeedInt(Math.pow(3, timesUsed));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
@ -5916,7 +5916,7 @@ export class AddArenaTagAttr extends MoveEffectAttr {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((move.chance < 0 || move.chance === 100 || user.randSeedInt(100) < move.chance) && user.getLastXMoves(1)[0]?.result === MoveResult.SUCCESS) {
|
if ((move.chance < 0 || move.chance === 100 || user.randBattleSeedInt(100) < move.chance) && user.getLastXMoves(1)[0]?.result === MoveResult.SUCCESS) {
|
||||||
const side = ((this.selfSideTarget ? user : target).isPlayer() !== (move.hasAttr(AddArenaTrapTagAttr) && target === user)) ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
const side = ((this.selfSideTarget ? user : target).isPlayer() !== (move.hasAttr(AddArenaTrapTagAttr) && target === user)) ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
||||||
globalScene.arena.addTag(this.tagType, this.turnCount, move.id, user.id, side);
|
globalScene.arena.addTag(this.tagType, this.turnCount, move.id, user.id, side);
|
||||||
return true;
|
return true;
|
||||||
@ -5992,7 +5992,7 @@ export class AddArenaTrapTagHitAttr extends AddArenaTagAttr {
|
|||||||
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
const moveChance = this.getMoveChance(user, target, move, this.selfTarget, true);
|
||||||
const side = (this.selfSideTarget ? user : target).isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
const side = (this.selfSideTarget ? user : target).isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
||||||
const tag = globalScene.arena.getTagOnSide(this.tagType, side) as ArenaTrapTag;
|
const tag = globalScene.arena.getTagOnSide(this.tagType, side) as ArenaTrapTag;
|
||||||
if ((moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance) && user.getLastXMoves(1)[0]?.result === MoveResult.SUCCESS) {
|
if ((moveChance < 0 || moveChance === 100 || user.randBattleSeedInt(100) < moveChance) && user.getLastXMoves(1)[0]?.result === MoveResult.SUCCESS) {
|
||||||
globalScene.arena.addTag(this.tagType, 0, move.id, user.id, side);
|
globalScene.arena.addTag(this.tagType, 0, move.id, user.id, side);
|
||||||
if (!tag) {
|
if (!tag) {
|
||||||
return true;
|
return true;
|
||||||
@ -6167,7 +6167,7 @@ export class RevivalBlessingAttr extends MoveEffectAttr {
|
|||||||
// If used by an enemy trainer with at least one fainted non-boss Pokemon, this
|
// If used by an enemy trainer with at least one fainted non-boss Pokemon, this
|
||||||
// revives one of said Pokemon selected at random.
|
// revives one of said Pokemon selected at random.
|
||||||
const faintedPokemon = globalScene.getEnemyParty().filter((p) => p.isFainted() && !p.isBoss());
|
const faintedPokemon = globalScene.getEnemyParty().filter((p) => p.isFainted() && !p.isBoss());
|
||||||
const pokemon = faintedPokemon[user.randSeedInt(faintedPokemon.length)];
|
const pokemon = faintedPokemon[user.randBattleSeedInt(faintedPokemon.length)];
|
||||||
const slotIndex = globalScene.getEnemyParty().findIndex((p) => pokemon.id === p.id);
|
const slotIndex = globalScene.getEnemyParty().findIndex((p) => pokemon.id === p.id);
|
||||||
pokemon.resetStatus(true, false, false, true);
|
pokemon.resetStatus(true, false, false, true);
|
||||||
pokemon.heal(Math.min(toDmgValue(0.5 * pokemon.getMaxHp()), pokemon.getMaxHp()));
|
pokemon.heal(Math.min(toDmgValue(0.5 * pokemon.getMaxHp()), pokemon.getMaxHp()));
|
||||||
@ -6263,7 +6263,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
if (switchOutTarget.hp > 0) {
|
if (switchOutTarget.hp > 0) {
|
||||||
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
||||||
switchOutTarget.leaveField(true);
|
switchOutTarget.leaveField(true);
|
||||||
const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)];
|
const slotIndex = eligibleNewIndices[user.randBattleSeedInt(eligibleNewIndices.length)];
|
||||||
globalScene.prependToPhase(
|
globalScene.prependToPhase(
|
||||||
new SwitchSummonPhase(
|
new SwitchSummonPhase(
|
||||||
this.switchType,
|
this.switchType,
|
||||||
@ -6306,7 +6306,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
if (switchOutTarget.hp > 0) {
|
if (switchOutTarget.hp > 0) {
|
||||||
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
||||||
switchOutTarget.leaveField(true);
|
switchOutTarget.leaveField(true);
|
||||||
const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)];
|
const slotIndex = eligibleNewIndices[user.randBattleSeedInt(eligibleNewIndices.length)];
|
||||||
globalScene.prependToPhase(
|
globalScene.prependToPhase(
|
||||||
new SwitchSummonPhase(
|
new SwitchSummonPhase(
|
||||||
this.switchType,
|
this.switchType,
|
||||||
@ -6390,8 +6390,23 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
return (user, target, move) => {
|
return (user, target, move) => {
|
||||||
const switchOutTarget = (this.selfSwitch ? user : target);
|
const switchOutTarget = (this.selfSwitch ? user : target);
|
||||||
const player = switchOutTarget instanceof PlayerPokemon;
|
const player = switchOutTarget instanceof PlayerPokemon;
|
||||||
|
const forceSwitchAttr = move.getAttrs(ForceSwitchOutAttr).find(attr => attr.switchType === SwitchType.FORCE_SWITCH);
|
||||||
|
|
||||||
if (!this.selfSwitch) {
|
if (!this.selfSwitch) {
|
||||||
|
if (move.hitsSubstitute(user, target)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the move is Roar or Whirlwind and if there is a trainer with only Pokémon left.
|
||||||
|
if (forceSwitchAttr && globalScene.currentBattle.trainer) {
|
||||||
|
const enemyParty = globalScene.getEnemyParty();
|
||||||
|
// Filter out any Pokémon that are not allowed in battle (e.g. fainted ones)
|
||||||
|
const remainingPokemon = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle());
|
||||||
|
if (remainingPokemon.length <= 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Dondozo with an allied Tatsugiri in its mouth cannot be forced out
|
// Dondozo with an allied Tatsugiri in its mouth cannot be forced out
|
||||||
const commandedTag = switchOutTarget.getTag(BattlerTagType.COMMANDED);
|
const commandedTag = switchOutTarget.getTag(BattlerTagType.COMMANDED);
|
||||||
if (commandedTag?.getSourcePokemon()?.isActive(true)) {
|
if (commandedTag?.getSourcePokemon()?.isActive(true)) {
|
||||||
@ -6725,7 +6740,7 @@ class CallMoveAttr extends OverrideMoveEffectAttr {
|
|||||||
}
|
}
|
||||||
const targets = moveTargets.multiple || moveTargets.targets.length === 1
|
const targets = moveTargets.multiple || moveTargets.targets.length === 1
|
||||||
? moveTargets.targets
|
? moveTargets.targets
|
||||||
: [ this.hasTarget ? target.getBattlerIndex() : moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ]; // account for Mirror Move having a target already
|
: [ this.hasTarget ? target.getBattlerIndex() : moveTargets.targets[user.randBattleSeedInt(moveTargets.targets.length)] ]; // account for Mirror Move having a target already
|
||||||
user.getMoveQueue().push({ move: move.id, targets: targets, virtual: true, ignorePP: true });
|
user.getMoveQueue().push({ move: move.id, targets: targets, virtual: true, ignorePP: true });
|
||||||
globalScene.unshiftPhase(new LoadMoveAnimPhase(move.id));
|
globalScene.unshiftPhase(new LoadMoveAnimPhase(move.id));
|
||||||
globalScene.unshiftPhase(new MovePhase(user, targets, new PokemonMove(move.id, 0, 0, true), true, true));
|
globalScene.unshiftPhase(new MovePhase(user, targets, new PokemonMove(move.id, 0, 0, true), true, true));
|
||||||
@ -6765,7 +6780,7 @@ export class RandomMoveAttr extends CallMoveAttr {
|
|||||||
const moveIds = getEnumValues(Moves).map(m => !this.invalidMoves.has(m) && !allMoves[m].name.endsWith(" (N)") ? m : Moves.NONE);
|
const moveIds = getEnumValues(Moves).map(m => !this.invalidMoves.has(m) && !allMoves[m].name.endsWith(" (N)") ? m : Moves.NONE);
|
||||||
let moveId: Moves = Moves.NONE;
|
let moveId: Moves = Moves.NONE;
|
||||||
do {
|
do {
|
||||||
moveId = this.getMoveOverride() ?? moveIds[user.randSeedInt(moveIds.length)];
|
moveId = this.getMoveOverride() ?? moveIds[user.randBattleSeedInt(moveIds.length)];
|
||||||
}
|
}
|
||||||
while (moveId === Moves.NONE);
|
while (moveId === Moves.NONE);
|
||||||
return super.apply(user, target, allMoves[moveId], args);
|
return super.apply(user, target, allMoves[moveId], args);
|
||||||
@ -6817,7 +6832,7 @@ export class RandomMovesetMoveAttr extends CallMoveAttr {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.moveId = moves[user.randSeedInt(moves.length)]!.moveId;
|
this.moveId = moves[user.randBattleSeedInt(moves.length)]!.moveId;
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -7900,7 +7915,7 @@ const phaseForcedSlower = (phase: MovePhase, target: Pokemon, trickRoom: boolean
|
|||||||
let slower: boolean;
|
let slower: boolean;
|
||||||
// quashed pokemon still have speed ties
|
// quashed pokemon still have speed ties
|
||||||
if (phase.pokemon.getEffectiveStat(Stat.SPD) === target.getEffectiveStat(Stat.SPD)) {
|
if (phase.pokemon.getEffectiveStat(Stat.SPD) === target.getEffectiveStat(Stat.SPD)) {
|
||||||
slower = !!target.randSeedInt(2);
|
slower = !!target.randBattleSeedInt(2);
|
||||||
} else {
|
} else {
|
||||||
slower = !trickRoom ? phase.pokemon.getEffectiveStat(Stat.SPD) < target.getEffectiveStat(Stat.SPD) : phase.pokemon.getEffectiveStat(Stat.SPD) > target.getEffectiveStat(Stat.SPD);
|
slower = !trickRoom ? phase.pokemon.getEffectiveStat(Stat.SPD) < target.getEffectiveStat(Stat.SPD) : phase.pokemon.getEffectiveStat(Stat.SPD) > target.getEffectiveStat(Stat.SPD);
|
||||||
}
|
}
|
||||||
@ -8052,10 +8067,10 @@ export class UpperHandCondition extends MoveCondition {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class hitsSameTypeAttr extends VariableMoveTypeMultiplierAttr {
|
export class HitsSameTypeAttr extends VariableMoveTypeMultiplierAttr {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const multiplier = args[0] as NumberHolder;
|
const multiplier = args[0] as NumberHolder;
|
||||||
if (!user.getTypes().some(type => target.getTypes().includes(type))) {
|
if (!user.getTypes(true).some(type => target.getTypes(true).includes(type))) {
|
||||||
multiplier.value = 0;
|
multiplier.value = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -8103,7 +8118,7 @@ export class ResistLastMoveTypeAttr extends MoveEffectAttr {
|
|||||||
if (!validTypes.length) {
|
if (!validTypes.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const type = validTypes[user.randSeedInt(validTypes.length)];
|
const type = validTypes[user.randBattleSeedInt(validTypes.length)];
|
||||||
user.summonData.types = [ type ];
|
user.summonData.types = [ type ];
|
||||||
globalScene.queueMessage(i18next.t("battle:transformedIntoType", { pokemonName: getPokemonNameWithAffix(user), type: toReadableString(PokemonType[type]) }));
|
globalScene.queueMessage(i18next.t("battle:transformedIntoType", { pokemonName: getPokemonNameWithAffix(user), type: toReadableString(PokemonType[type]) }));
|
||||||
user.updateInfo();
|
user.updateInfo();
|
||||||
@ -8218,7 +8233,7 @@ export function getMoveTargets(user: Pokemon, move: Moves, replaceTarget?: MoveT
|
|||||||
multiple = moveTarget !== MoveTarget.NEAR_ENEMY;
|
multiple = moveTarget !== MoveTarget.NEAR_ENEMY;
|
||||||
break;
|
break;
|
||||||
case MoveTarget.RANDOM_NEAR_ENEMY:
|
case MoveTarget.RANDOM_NEAR_ENEMY:
|
||||||
set = [ opponents[user.randSeedInt(opponents.length)] ];
|
set = [ opponents[user.randBattleSeedInt(opponents.length)] ];
|
||||||
break;
|
break;
|
||||||
case MoveTarget.ATTACKER:
|
case MoveTarget.ATTACKER:
|
||||||
return { targets: [ -1 as BattlerIndex ], multiple: false };
|
return { targets: [ -1 as BattlerIndex ], multiple: false };
|
||||||
@ -9756,7 +9771,7 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.SYNCHRONOISE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.SYNCHRONOISE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
||||||
.target(MoveTarget.ALL_NEAR_OTHERS)
|
.target(MoveTarget.ALL_NEAR_OTHERS)
|
||||||
.condition(unknownTypeCondition)
|
.condition(unknownTypeCondition)
|
||||||
.attr(hitsSameTypeAttr),
|
.attr(HitsSameTypeAttr),
|
||||||
new AttackMove(Moves.ELECTRO_BALL, PokemonType.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.ELECTRO_BALL, PokemonType.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5)
|
||||||
.attr(ElectroBallPowerAttr)
|
.attr(ElectroBallPowerAttr)
|
||||||
.ballBombMove(),
|
.ballBombMove(),
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -54,7 +54,7 @@ import {
|
|||||||
getStarterValueFriendshipCap,
|
getStarterValueFriendshipCap,
|
||||||
speciesStarterCosts,
|
speciesStarterCosts,
|
||||||
} from "#app/data/balance/starters";
|
} from "#app/data/balance/starters";
|
||||||
import { NumberHolder, randSeedInt, getIvsFromId, BooleanHolder, randSeedItem, isNullOrUndefined, getEnumValues, toDmgValue, fixedInt, rgbaToInt, rgbHexToRgba, rgbToHsv, deltaRgb, isBetween, type nil, type Constructor } from "#app/utils/common";
|
import { NumberHolder, randSeedInt, getIvsFromId, BooleanHolder, randSeedItem, isNullOrUndefined, getEnumValues, toDmgValue, fixedInt, rgbaToInt, rgbHexToRgba, rgbToHsv, deltaRgb, isBetween, type nil, type Constructor, randSeedIntRange } from "#app/utils/common";
|
||||||
import type { TypeDamageMultiplier } from "#app/data/type";
|
import type { TypeDamageMultiplier } from "#app/data/type";
|
||||||
import { getTypeDamageMultiplier, getTypeRgb } from "#app/data/type";
|
import { getTypeDamageMultiplier, getTypeRgb } from "#app/data/type";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
@ -909,19 +909,22 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
const originalWarn = console.warn;
|
const originalWarn = console.warn;
|
||||||
// Ignore warnings for missing frames, because there will be a lot
|
// Ignore warnings for missing frames, because there will be a lot
|
||||||
console.warn = () => {};
|
console.warn = () => {};
|
||||||
const battleFrameNames = globalScene.anims.generateFrameNames(this.getBattleSpriteKey(), {
|
const battleSpriteKey = this.getBattleSpriteKey(this.isPlayer(), ignoreOverride);
|
||||||
|
const battleFrameNames = globalScene.anims.generateFrameNames(battleSpriteKey, {
|
||||||
zeroPad: 4,
|
zeroPad: 4,
|
||||||
suffix: ".png",
|
suffix: ".png",
|
||||||
start: 1,
|
start: 1,
|
||||||
end: 400,
|
end: 400,
|
||||||
});
|
});
|
||||||
console.warn = originalWarn;
|
console.warn = originalWarn;
|
||||||
globalScene.anims.create({
|
if (!globalScene.anims.exists(battleSpriteKey)) {
|
||||||
key: this.getBattleSpriteKey(),
|
globalScene.anims.create({
|
||||||
frames: battleFrameNames,
|
key: battleSpriteKey,
|
||||||
frameRate: 10,
|
frames: battleFrameNames,
|
||||||
repeat: -1,
|
frameRate: 10,
|
||||||
});
|
repeat: -1,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// With everything loaded, now begin playing the animation.
|
// With everything loaded, now begin playing the animation.
|
||||||
this.playAnim();
|
this.playAnim();
|
||||||
@ -3486,11 +3489,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
let weight = levelMove[0];
|
let weight = levelMove[0];
|
||||||
// Evolution Moves
|
// Evolution Moves
|
||||||
if (weight === 0) {
|
if (weight === EVOLVE_MOVE) {
|
||||||
weight = 50;
|
weight = 50;
|
||||||
}
|
}
|
||||||
// Assume level 1 moves with 80+ BP are "move reminder" moves and bump their weight
|
// Assume level 1 moves with 80+ BP are "move reminder" moves and bump their weight. Trainers use actual relearn moves.
|
||||||
if (weight === 1 && allMoves[levelMove[1]].power >= 80) {
|
if (weight === 1 && allMoves[levelMove[1]].power >= 80 || weight === RELEARN_MOVE && this.hasTrainer()) {
|
||||||
weight = 40;
|
weight = 40;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
@ -3595,9 +3598,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
// Bosses never get self ko moves or Pain Split
|
// Bosses never get self ko moves or Pain Split
|
||||||
if (this.isBoss()) {
|
if (this.isBoss()) {
|
||||||
movePool = movePool.filter(m => !allMoves[m[0]].hasAttr(SacrificialAttr));
|
movePool = movePool.filter(m => !allMoves[m[0]].hasAttr(SacrificialAttr) && !allMoves[m[0]].hasAttr(HpSplitAttr));
|
||||||
movePool = movePool.filter(m => !allMoves[m[0]].hasAttr(HpSplitAttr));
|
|
||||||
}
|
}
|
||||||
|
// No one gets Memento or Final Gambit
|
||||||
movePool = movePool.filter(
|
movePool = movePool.filter(
|
||||||
m => !allMoves[m[0]].hasAttr(SacrificialAttrOnHit),
|
m => !allMoves[m[0]].hasAttr(SacrificialAttrOnHit),
|
||||||
);
|
);
|
||||||
@ -3609,10 +3612,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
m[0],
|
m[0],
|
||||||
m[1] * (allMoves[m[0]].hasAttr(SacrificialAttr) ? 0.5 : 1),
|
m[1] * (allMoves[m[0]].hasAttr(SacrificialAttr) ? 0.5 : 1),
|
||||||
]);
|
]);
|
||||||
movePool = movePool.map(m => [
|
|
||||||
m[0],
|
|
||||||
m[1] * (allMoves[m[0]].hasAttr(SacrificialAttrOnHit) ? 0.5 : 1),
|
|
||||||
]);
|
|
||||||
// Trainers get a weight bump to stat buffing moves
|
// Trainers get a weight bump to stat buffing moves
|
||||||
movePool = movePool.map(m => [
|
movePool = movePool.map(m => [
|
||||||
m[0],
|
m[0],
|
||||||
@ -3673,10 +3672,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
/** The higher this is the more the game weights towards higher level moves. At `0` all moves are equal weight. */
|
/** The higher this is the more the game weights towards higher level moves. At `0` all moves are equal weight. */
|
||||||
let weightMultiplier = 0.9;
|
let weightMultiplier = 1.6;
|
||||||
if (this.hasTrainer()) {
|
|
||||||
weightMultiplier += 0.7;
|
|
||||||
}
|
|
||||||
if (this.isBoss()) {
|
if (this.isBoss()) {
|
||||||
weightMultiplier += 0.4;
|
weightMultiplier += 0.4;
|
||||||
}
|
}
|
||||||
@ -3685,37 +3681,21 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
Math.ceil(Math.pow(m[1], weightMultiplier) * 100),
|
Math.ceil(Math.pow(m[1], weightMultiplier) * 100),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Trainers and bosses always force a stab move
|
// All Pokemon force a STAB move first
|
||||||
if (this.hasTrainer() || this.isBoss()) {
|
const stabMovePool = baseWeights.filter(
|
||||||
const stabMovePool = baseWeights.filter(
|
m =>
|
||||||
m =>
|
allMoves[m[0]].category !== MoveCategory.STATUS &&
|
||||||
allMoves[m[0]].category !== MoveCategory.STATUS &&
|
this.isOfType(allMoves[m[0]].type),
|
||||||
this.isOfType(allMoves[m[0]].type),
|
);
|
||||||
);
|
|
||||||
|
|
||||||
if (stabMovePool.length) {
|
if (stabMovePool.length) {
|
||||||
const totalWeight = stabMovePool.reduce((v, m) => v + m[1], 0);
|
const totalWeight = stabMovePool.reduce((v, m) => v + m[1], 0);
|
||||||
let rand = randSeedInt(totalWeight);
|
let rand = randSeedInt(totalWeight);
|
||||||
let index = 0;
|
let index = 0;
|
||||||
while (rand > stabMovePool[index][1]) {
|
while (rand > stabMovePool[index][1]) {
|
||||||
rand -= stabMovePool[index++][1];
|
rand -= stabMovePool[index++][1];
|
||||||
}
|
|
||||||
this.moveset.push(new PokemonMove(stabMovePool[index][0], 0, 0));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Normal wild pokemon just force a random damaging move
|
|
||||||
const attackMovePool = baseWeights.filter(
|
|
||||||
m => allMoves[m[0]].category !== MoveCategory.STATUS,
|
|
||||||
);
|
|
||||||
if (attackMovePool.length) {
|
|
||||||
const totalWeight = attackMovePool.reduce((v, m) => v + m[1], 0);
|
|
||||||
let rand = randSeedInt(totalWeight);
|
|
||||||
let index = 0;
|
|
||||||
while (rand > attackMovePool[index][1]) {
|
|
||||||
rand -= attackMovePool[index++][1];
|
|
||||||
}
|
|
||||||
this.moveset.push(new PokemonMove(attackMovePool[index][0], 0, 0));
|
|
||||||
}
|
}
|
||||||
|
this.moveset.push(new PokemonMove(stabMovePool[index][0], 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
while (
|
while (
|
||||||
@ -3727,7 +3707,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
// Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights get 20x if STAB.
|
// Other damaging moves 2x weight if 0-1 damaging moves, 0.5x if 2, 0.125x if 3. These weights get 20x if STAB.
|
||||||
// Status moves remain unchanged on weight, this encourages 1-2
|
// Status moves remain unchanged on weight, this encourages 1-2
|
||||||
movePool = baseWeights
|
movePool = baseWeights
|
||||||
.filter(m => !this.moveset.some(mo => m[0] === mo.moveId))
|
.filter(m => !this.moveset.some(
|
||||||
|
mo =>
|
||||||
|
m[0] === mo.moveId ||
|
||||||
|
(allMoves[m[0]].hasAttr(SacrificialAttr) && mo.getMove().hasAttr(SacrificialAttr)) // Only one self-KO move allowed
|
||||||
|
))
|
||||||
.map(m => {
|
.map(m => {
|
||||||
let ret: number;
|
let ret: number;
|
||||||
if (
|
if (
|
||||||
@ -3758,7 +3742,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Non-trainer pokemon just use normal weights
|
// Non-trainer pokemon just use normal weights
|
||||||
movePool = baseWeights.filter(m => !this.moveset.some(mo => m[0] === mo.moveId));
|
movePool = baseWeights.filter(m => !this.moveset.some(
|
||||||
|
mo =>
|
||||||
|
m[0] === mo.moveId ||
|
||||||
|
(allMoves[m[0]].hasAttr(SacrificialAttr) && mo.getMove().hasAttr(SacrificialAttr)) // Only one self-KO move allowed
|
||||||
|
));
|
||||||
}
|
}
|
||||||
const totalWeight = movePool.reduce((v, m) => v + m[1], 0);
|
const totalWeight = movePool.reduce((v, m) => v + m[1], 0);
|
||||||
let rand = randSeedInt(totalWeight);
|
let rand = randSeedInt(totalWeight);
|
||||||
@ -4471,7 +4459,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
*/
|
*/
|
||||||
const randomMultiplier = simulated
|
const randomMultiplier = simulated
|
||||||
? 1
|
? 1
|
||||||
: this.randSeedIntRange(85, 100) / 100;
|
: this.randBattleSeedIntRange(85, 100) / 100;
|
||||||
|
|
||||||
|
|
||||||
/** A damage multiplier for when the attack is of the attacker's type and/or Tera type. */
|
/** A damage multiplier for when the attack is of the attacker's type and/or Tera type. */
|
||||||
@ -5615,7 +5603,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
let sleepTurnsRemaining: NumberHolder;
|
let sleepTurnsRemaining: NumberHolder;
|
||||||
|
|
||||||
if (effect === StatusEffect.SLEEP) {
|
if (effect === StatusEffect.SLEEP) {
|
||||||
sleepTurnsRemaining = new NumberHolder(this.randSeedIntRange(2, 4));
|
sleepTurnsRemaining = new NumberHolder(this.randBattleSeedIntRange(2, 4));
|
||||||
|
|
||||||
this.setFrameRate(4);
|
this.setFrameRate(4);
|
||||||
|
|
||||||
@ -5664,7 +5652,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs the action of clearing a Pokemon's status
|
* Performs the action of clearing a Pokemon's status
|
||||||
*
|
*
|
||||||
* This is a helper to {@linkcode resetStatus}, which should be called directly instead of this method
|
* This is a helper to {@linkcode resetStatus}, which should be called directly instead of this method
|
||||||
*/
|
*/
|
||||||
public clearStatus(confusion: boolean, reloadAssets: boolean) {
|
public clearStatus(confusion: boolean, reloadAssets: boolean) {
|
||||||
@ -5707,17 +5695,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset this Pokemon's {@linkcode PokemonSummonData | SummonData} and {@linkcode PokemonTempSummonData | TempSummonData}
|
* Performs miscellaneous setup for when the Pokemon is summoned, like generating the substitute sprite
|
||||||
* in preparation for switching pokemon, as well as removing any relevant on-switch tags.
|
* @param resetSummonData - Whether to additionally reset the Pokemon's summon data (default: `false`)
|
||||||
*/
|
*/
|
||||||
resetSummonData(): void {
|
public fieldSetup(resetSummonData?: boolean): void {
|
||||||
const illusion: IllusionData | null = this.summonData.illusion;
|
|
||||||
if (this.summonData.speciesForm) {
|
|
||||||
this.summonData.speciesForm = null;
|
|
||||||
this.updateFusionPalette();
|
|
||||||
}
|
|
||||||
this.summonData = new PokemonSummonData();
|
|
||||||
this.tempSummonData = new PokemonTempSummonData();
|
|
||||||
this.setSwitchOutStatus(false);
|
this.setSwitchOutStatus(false);
|
||||||
if (globalScene) {
|
if (globalScene) {
|
||||||
globalScene.triggerPokemonFormChange(
|
globalScene.triggerPokemonFormChange(
|
||||||
@ -5726,7 +5707,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this Pokemon has a Substitute when loading in, play an animation to add its sprite
|
// If this Pokemon has a Substitute when loading in, play an animation to add its sprite
|
||||||
if (this.getTag(SubstituteTag)) {
|
if (this.getTag(SubstituteTag)) {
|
||||||
globalScene.triggerPokemonBattleAnim(
|
globalScene.triggerPokemonBattleAnim(
|
||||||
@ -5744,6 +5724,24 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
) {
|
) {
|
||||||
this.setVisible(false);
|
this.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resetSummonData) {
|
||||||
|
this.resetSummonData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset this Pokemon's {@linkcode PokemonSummonData | SummonData} and {@linkcode PokemonTempSummonData | TempSummonData}
|
||||||
|
* in preparation for switching pokemon, as well as removing any relevant on-switch tags.
|
||||||
|
*/
|
||||||
|
resetSummonData(): void {
|
||||||
|
const illusion: IllusionData | null = this.summonData.illusion;
|
||||||
|
if (this.summonData.speciesForm) {
|
||||||
|
this.summonData.speciesForm = null;
|
||||||
|
this.updateFusionPalette();
|
||||||
|
}
|
||||||
|
this.summonData = new PokemonSummonData();
|
||||||
|
this.tempSummonData = new PokemonTempSummonData();
|
||||||
this.summonData.illusion = illusion
|
this.summonData.illusion = illusion
|
||||||
this.updateInfo();
|
this.updateInfo();
|
||||||
}
|
}
|
||||||
@ -6268,7 +6266,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
* @param min The minimum integer to pick, default `0`
|
* @param min The minimum integer to pick, default `0`
|
||||||
* @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1)
|
* @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1)
|
||||||
*/
|
*/
|
||||||
randSeedInt(range: number, min = 0): number {
|
randBattleSeedInt(range: number, min = 0): number {
|
||||||
return globalScene.currentBattle
|
return globalScene.currentBattle
|
||||||
? globalScene.randBattleSeedInt(range, min)
|
? globalScene.randBattleSeedInt(range, min)
|
||||||
: randSeedInt(range, min);
|
: randSeedInt(range, min);
|
||||||
@ -6280,8 +6278,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
* @param max The maximum integer to generate
|
* @param max The maximum integer to generate
|
||||||
* @returns a random integer between {@linkcode min} and {@linkcode max} inclusive
|
* @returns a random integer between {@linkcode min} and {@linkcode max} inclusive
|
||||||
*/
|
*/
|
||||||
randSeedIntRange(min: number, max: number): number {
|
randBattleSeedIntRange(min: number, max: number): number {
|
||||||
return this.randSeedInt(max - min + 1, min);
|
return globalScene.currentBattle
|
||||||
|
? globalScene.randBattleSeedInt(max - min + 1, min)
|
||||||
|
: randSeedIntRange(min, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -7078,7 +7078,6 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
|
|
||||||
if (!dataSource) {
|
if (!dataSource) {
|
||||||
this.generateAndPopulateMoveset();
|
this.generateAndPopulateMoveset();
|
||||||
|
|
||||||
if (shinyLock || Overrides.OPP_SHINY_OVERRIDE === false) {
|
if (shinyLock || Overrides.OPP_SHINY_OVERRIDE === false) {
|
||||||
this.shiny = false;
|
this.shiny = false;
|
||||||
} else {
|
} else {
|
||||||
@ -7119,7 +7118,7 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
const { waveIndex } = globalScene.currentBattle;
|
const { waveIndex } = globalScene.currentBattle;
|
||||||
const ivs: number[] = [];
|
const ivs: number[] = [];
|
||||||
while (ivs.length < 6) {
|
while (ivs.length < 6) {
|
||||||
ivs.push(this.randSeedIntRange(Math.floor(waveIndex / 10), 31));
|
ivs.push(randSeedIntRange(Math.floor(waveIndex / 10), 31));
|
||||||
}
|
}
|
||||||
this.ivs = ivs;
|
this.ivs = ivs;
|
||||||
}
|
}
|
||||||
@ -7851,7 +7850,7 @@ export class PokemonSummonData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (key === "moveset") {
|
if (key === "moveset") {
|
||||||
this.moveset = value.map((m: any) => PokemonMove.loadMove(m));
|
this.moveset = value?.map((m: any) => PokemonMove.loadMove(m));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1548,7 +1548,7 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier {
|
|||||||
* @returns `true` if the survive damage has been applied
|
* @returns `true` if the survive damage has been applied
|
||||||
*/
|
*/
|
||||||
override apply(pokemon: Pokemon, surviveDamage: BooleanHolder): boolean {
|
override apply(pokemon: Pokemon, surviveDamage: BooleanHolder): boolean {
|
||||||
if (!surviveDamage.value && pokemon.randSeedInt(10) < this.getStackCount()) {
|
if (!surviveDamage.value && pokemon.randBattleSeedInt(10) < this.getStackCount()) {
|
||||||
surviveDamage.value = true;
|
surviveDamage.value = true;
|
||||||
|
|
||||||
globalScene.queueMessage(
|
globalScene.queueMessage(
|
||||||
@ -1594,7 +1594,7 @@ export class BypassSpeedChanceModifier extends PokemonHeldItemModifier {
|
|||||||
* @returns `true` if {@linkcode BypassSpeedChanceModifier} has been applied
|
* @returns `true` if {@linkcode BypassSpeedChanceModifier} has been applied
|
||||||
*/
|
*/
|
||||||
override apply(pokemon: Pokemon, doBypassSpeed: BooleanHolder): boolean {
|
override apply(pokemon: Pokemon, doBypassSpeed: BooleanHolder): boolean {
|
||||||
if (!doBypassSpeed.value && pokemon.randSeedInt(10) < this.getStackCount()) {
|
if (!doBypassSpeed.value && pokemon.randBattleSeedInt(10) < this.getStackCount()) {
|
||||||
doBypassSpeed.value = true;
|
doBypassSpeed.value = true;
|
||||||
const isCommandFight =
|
const isCommandFight =
|
||||||
globalScene.currentBattle.turnCommands[pokemon.getBattlerIndex()]?.command === Command.FIGHT;
|
globalScene.currentBattle.turnCommands[pokemon.getBattlerIndex()]?.command === Command.FIGHT;
|
||||||
@ -1658,7 +1658,7 @@ export class FlinchChanceModifier extends PokemonHeldItemModifier {
|
|||||||
override apply(pokemon: Pokemon, flinched: BooleanHolder): boolean {
|
override apply(pokemon: Pokemon, flinched: BooleanHolder): boolean {
|
||||||
// The check for pokemon.summonData is to ensure that a crash doesn't occur when a Pokemon with King's Rock procs a flinch
|
// The check for pokemon.summonData is to ensure that a crash doesn't occur when a Pokemon with King's Rock procs a flinch
|
||||||
// TODO: Since summonData is always defined now, we can probably remove this
|
// TODO: Since summonData is always defined now, we can probably remove this
|
||||||
if (pokemon.summonData && !flinched.value && pokemon.randSeedInt(100) < this.getStackCount() * this.chance) {
|
if (pokemon.summonData && !flinched.value && pokemon.randBattleSeedInt(100) < this.getStackCount() * this.chance) {
|
||||||
flinched.value = true;
|
flinched.value = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1927,7 +1927,7 @@ export class PreserveBerryModifier extends PersistentModifier {
|
|||||||
* @returns always `true`
|
* @returns always `true`
|
||||||
*/
|
*/
|
||||||
override apply(pokemon: Pokemon, doPreserve: BooleanHolder): boolean {
|
override apply(pokemon: Pokemon, doPreserve: BooleanHolder): boolean {
|
||||||
doPreserve.value ||= pokemon.randSeedInt(10) < this.getStackCount() * 3;
|
doPreserve.value ||= pokemon.randBattleSeedInt(10) < this.getStackCount() * 3;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -3240,7 +3240,7 @@ export abstract class HeldItemTransferModifier extends PokemonHeldItemModifier {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const targetPokemon = opponents[pokemon.randSeedInt(opponents.length)];
|
const targetPokemon = opponents[pokemon.randBattleSeedInt(opponents.length)];
|
||||||
|
|
||||||
const transferredItemCount = this.getTransferredItemCount();
|
const transferredItemCount = this.getTransferredItemCount();
|
||||||
if (!transferredItemCount) {
|
if (!transferredItemCount) {
|
||||||
@ -3272,7 +3272,7 @@ export abstract class HeldItemTransferModifier extends PokemonHeldItemModifier {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const randItemIndex = pokemon.randSeedInt(itemModifiers.length);
|
const randItemIndex = pokemon.randBattleSeedInt(itemModifiers.length);
|
||||||
const randItem = itemModifiers[randItemIndex];
|
const randItem = itemModifiers[randItemIndex];
|
||||||
if (globalScene.tryTransferHeldItemModifier(randItem, pokemon, false)) {
|
if (globalScene.tryTransferHeldItemModifier(randItem, pokemon, false)) {
|
||||||
transferredModifierTypes.push(randItem.type);
|
transferredModifierTypes.push(randItem.type);
|
||||||
@ -3731,7 +3731,7 @@ export class EnemyEndureChanceModifier extends EnemyPersistentModifier {
|
|||||||
* @returns `true` if {@linkcode Pokemon} endured
|
* @returns `true` if {@linkcode Pokemon} endured
|
||||||
*/
|
*/
|
||||||
override apply(target: Pokemon): boolean {
|
override apply(target: Pokemon): boolean {
|
||||||
if (target.waveData.endured || target.randSeedInt(100) >= this.chance * this.getStackCount()) {
|
if (target.waveData.endured || target.randBattleSeedInt(100) >= this.chance * this.getStackCount()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||||||
const modifiedCatchRate = Math.round((((_3m - _2h) * catchRate * pokeballMultiplier) / _3m) * statusMultiplier);
|
const modifiedCatchRate = Math.round((((_3m - _2h) * catchRate * pokeballMultiplier) / _3m) * statusMultiplier);
|
||||||
const shakeProbability = Math.round(65536 / Math.pow(255 / modifiedCatchRate, 0.1875)); // Formula taken from gen 6
|
const shakeProbability = Math.round(65536 / Math.pow(255 / modifiedCatchRate, 0.1875)); // Formula taken from gen 6
|
||||||
const criticalCaptureChance = getCriticalCaptureChance(modifiedCatchRate);
|
const criticalCaptureChance = getCriticalCaptureChance(modifiedCatchRate);
|
||||||
const isCritical = pokemon.randSeedInt(256) < criticalCaptureChance;
|
const isCritical = pokemon.randBattleSeedInt(256) < criticalCaptureChance;
|
||||||
const fpOffset = pokemon.getFieldPositionOffset();
|
const fpOffset = pokemon.getFieldPositionOffset();
|
||||||
|
|
||||||
const pokeballAtlasKey = getPokeballAtlasKey(this.pokeballType);
|
const pokeballAtlasKey = getPokeballAtlasKey(this.pokeballType);
|
||||||
@ -135,14 +135,14 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||||||
pokeballMultiplier === -1 ||
|
pokeballMultiplier === -1 ||
|
||||||
isCritical ||
|
isCritical ||
|
||||||
modifiedCatchRate >= 255 ||
|
modifiedCatchRate >= 255 ||
|
||||||
pokemon.randSeedInt(65536) < shakeProbability
|
pokemon.randBattleSeedInt(65536) < shakeProbability
|
||||||
) {
|
) {
|
||||||
globalScene.playSound("se/pb_move");
|
globalScene.playSound("se/pb_move");
|
||||||
} else {
|
} else {
|
||||||
shakeCounter.stop();
|
shakeCounter.stop();
|
||||||
this.failCatch(shakeCount);
|
this.failCatch(shakeCount);
|
||||||
}
|
}
|
||||||
} else if (isCritical && pokemon.randSeedInt(65536) >= shakeProbability) {
|
} else if (isCritical && pokemon.randBattleSeedInt(65536) >= shakeProbability) {
|
||||||
// Above, perform the one shake check for critical captures after the ball shakes once
|
// Above, perform the one shake check for critical captures after the ball shakes once
|
||||||
shakeCounter.stop();
|
shakeCounter.stop();
|
||||||
this.failCatch(shakeCount);
|
this.failCatch(shakeCount);
|
||||||
|
@ -34,7 +34,7 @@ export class AttemptRunPhase extends PokemonPhase {
|
|||||||
|
|
||||||
applyAbAttrs(RunSuccessAbAttr, playerPokemon, null, false, escapeChance);
|
applyAbAttrs(RunSuccessAbAttr, playerPokemon, null, false, escapeChance);
|
||||||
|
|
||||||
if (playerPokemon.randSeedInt(100) < escapeChance.value && !this.forceFailEscape) {
|
if (playerPokemon.randBattleSeedInt(100) < escapeChance.value && !this.forceFailEscape) {
|
||||||
enemyField.forEach(enemyPokemon => applyPreLeaveFieldAbAttrs(PreLeaveFieldAbAttr, enemyPokemon));
|
enemyField.forEach(enemyPokemon => applyPreLeaveFieldAbAttrs(PreLeaveFieldAbAttr, enemyPokemon));
|
||||||
|
|
||||||
globalScene.playSound("se/flee");
|
globalScene.playSound("se/flee");
|
||||||
|
@ -146,7 +146,7 @@ export class EncounterPhase extends BattlePhase {
|
|||||||
const enemyPokemon = globalScene.getEnemyParty()[e];
|
const enemyPokemon = globalScene.getEnemyParty()[e];
|
||||||
if (e < (battle.double ? 2 : 1)) {
|
if (e < (battle.double ? 2 : 1)) {
|
||||||
enemyPokemon.setX(-66 + enemyPokemon.getFieldPositionOffset()[0]);
|
enemyPokemon.setX(-66 + enemyPokemon.getFieldPositionOffset()[0]);
|
||||||
enemyPokemon.resetSummonData();
|
enemyPokemon.fieldSetup(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.loaded) {
|
if (!this.loaded) {
|
||||||
|
@ -35,20 +35,22 @@ export class MessagePhase extends Phase {
|
|||||||
this.text = this.text.split(pokename[p]).join(repname[p]);
|
this.text = this.text.split(pokename[p]).join(repname[p]);
|
||||||
}
|
}
|
||||||
const pageIndex = this.text.indexOf("$");
|
const pageIndex = this.text.indexOf("$");
|
||||||
for (let p = 0; p < globalScene.getPlayerField().length; p++) {
|
|
||||||
this.text = this.text.split(repname[p]).join(pokename[p]);
|
|
||||||
}
|
|
||||||
if (pageIndex !== -1) {
|
if (pageIndex !== -1) {
|
||||||
|
let page0 = this.text.slice(0, pageIndex);
|
||||||
|
let page1 = this.text.slice(pageIndex + 1);
|
||||||
|
// Pokemon names must be re-inserted _after_ the split, otherwise the index will be wrong
|
||||||
|
for (let p = 0; p < globalScene.getPlayerField().length; p++) {
|
||||||
|
page0 = page0.split(repname[p]).join(pokename[p]);
|
||||||
|
page1 = page1.split(repname[p]).join(pokename[p]);
|
||||||
|
}
|
||||||
globalScene.unshiftPhase(
|
globalScene.unshiftPhase(
|
||||||
new MessagePhase(
|
new MessagePhase(page1, this.callbackDelay, this.prompt, this.promptDelay, this.speaker),
|
||||||
this.text.slice(pageIndex + 1),
|
|
||||||
this.callbackDelay,
|
|
||||||
this.prompt,
|
|
||||||
this.promptDelay,
|
|
||||||
this.speaker,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
this.text = this.text.slice(0, pageIndex).trim();
|
this.text = page0.trim();
|
||||||
|
} else {
|
||||||
|
for (let p = 0; p < globalScene.getPlayerField().length; p++) {
|
||||||
|
this.text = this.text.split(repname[p]).join(pokename[p]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,11 +206,13 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
* @throws Error if there was an unexpected hit check result
|
* @throws Error if there was an unexpected hit check result
|
||||||
*/
|
*/
|
||||||
private applyToTargets(user: Pokemon, targets: Pokemon[]): void {
|
private applyToTargets(user: Pokemon, targets: Pokemon[]): void {
|
||||||
|
let firstHit = true;
|
||||||
for (const [i, target] of targets.entries()) {
|
for (const [i, target] of targets.entries()) {
|
||||||
const [hitCheckResult, effectiveness] = this.hitChecks[i];
|
const [hitCheckResult, effectiveness] = this.hitChecks[i];
|
||||||
switch (hitCheckResult) {
|
switch (hitCheckResult) {
|
||||||
case HitCheckResult.HIT:
|
case HitCheckResult.HIT:
|
||||||
this.applyMoveEffects(target, effectiveness);
|
this.applyMoveEffects(target, effectiveness, firstHit);
|
||||||
|
firstHit = false;
|
||||||
if (isFieldTargeted(this.move)) {
|
if (isFieldTargeted(this.move)) {
|
||||||
// Stop processing other targets if the move is a field move
|
// Stop processing other targets if the move is a field move
|
||||||
return;
|
return;
|
||||||
@ -352,8 +354,8 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
move.id as Moves,
|
move.id as Moves,
|
||||||
user,
|
user,
|
||||||
firstTarget?.getBattlerIndex() ?? BattlerIndex.ATTACKER,
|
firstTarget?.getBattlerIndex() ?? BattlerIndex.ATTACKER,
|
||||||
// Field moves and some moves used in mystery encounters should be played even on an empty field
|
// Some moves used in mystery encounters should be played even on an empty field
|
||||||
fieldMove || (globalScene.currentBattle?.mysteryEncounter?.hasBattleAnimationsWithoutTargets ?? false),
|
globalScene.currentBattle?.mysteryEncounter?.hasBattleAnimationsWithoutTargets ?? false,
|
||||||
).play(move.hitsSubstitute(user, firstTarget), () => this.postAnimCallback(user, targets));
|
).play(move.hitsSubstitute(user, firstTarget), () => this.postAnimCallback(user, targets));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -592,7 +594,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const accuracyMultiplier = user.getAccuracyMultiplier(target, this.move);
|
const accuracyMultiplier = user.getAccuracyMultiplier(target, this.move);
|
||||||
const rand = user.randSeedInt(100);
|
const rand = user.randBattleSeedInt(100);
|
||||||
|
|
||||||
if (rand < moveAccuracy * accuracyMultiplier) {
|
if (rand < moveAccuracy * accuracyMultiplier) {
|
||||||
return [HitCheckResult.HIT, effectiveness];
|
return [HitCheckResult.HIT, effectiveness];
|
||||||
@ -763,15 +765,12 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
* - Invoking {@linkcode applyOnTargetEffects} if the move does not hit a substitute
|
* - Invoking {@linkcode applyOnTargetEffects} if the move does not hit a substitute
|
||||||
* - Triggering form changes and emergency exit / wimp out if this is the last hit
|
* - Triggering form changes and emergency exit / wimp out if this is the last hit
|
||||||
*
|
*
|
||||||
* @param target the {@linkcode Pokemon} hit by this phase's move.
|
* @param target - the {@linkcode Pokemon} hit by this phase's move.
|
||||||
* @param effectiveness the effectiveness of the move (as previously evaluated in {@linkcode hitCheck})
|
* @param effectiveness - The effectiveness of the move (as previously evaluated in {@linkcode hitCheck})
|
||||||
|
* @param firstTarget - Whether this is the first target successfully struck by the move
|
||||||
*/
|
*/
|
||||||
protected applyMoveEffects(target: Pokemon, effectiveness: TypeDamageMultiplier): void {
|
protected applyMoveEffects(target: Pokemon, effectiveness: TypeDamageMultiplier, firstTarget: boolean): void {
|
||||||
const user = this.getUserPokemon();
|
const user = this.getUserPokemon();
|
||||||
|
|
||||||
/** The first target hit by the move */
|
|
||||||
const firstTarget = target === this.getTargets().find((_, i) => this.hitChecks[i][1] > 0);
|
|
||||||
|
|
||||||
if (isNullOrUndefined(user)) {
|
if (isNullOrUndefined(user)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -905,6 +904,14 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
target.destroySubstitute();
|
target.destroySubstitute();
|
||||||
target.lapseTag(BattlerTagType.COMMANDED);
|
target.lapseTag(BattlerTagType.COMMANDED);
|
||||||
|
|
||||||
|
// Force `lastHit` to be true if this is a multi hit move with hits left
|
||||||
|
// `hitsLeft` must be left as-is in order for the message displaying the number of hits
|
||||||
|
// to display the proper number.
|
||||||
|
// Note: When Dragon Darts' smart targeting is implemented, this logic may need to be adjusted.
|
||||||
|
if (!this.lastHit && user.turnData.hitsLeft > 1) {
|
||||||
|
this.lastHit = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -232,7 +232,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
switch (this.pokemon.status.effect) {
|
switch (this.pokemon.status.effect) {
|
||||||
case StatusEffect.PARALYSIS:
|
case StatusEffect.PARALYSIS:
|
||||||
activated =
|
activated =
|
||||||
(!this.pokemon.randSeedInt(4) || Overrides.STATUS_ACTIVATION_OVERRIDE === true) &&
|
(!this.pokemon.randBattleSeedInt(4) || Overrides.STATUS_ACTIVATION_OVERRIDE === true) &&
|
||||||
Overrides.STATUS_ACTIVATION_OVERRIDE !== false;
|
Overrides.STATUS_ACTIVATION_OVERRIDE !== false;
|
||||||
break;
|
break;
|
||||||
case StatusEffect.SLEEP: {
|
case StatusEffect.SLEEP: {
|
||||||
@ -258,7 +258,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
.findAttr(
|
.findAttr(
|
||||||
attr => attr instanceof HealStatusEffectAttr && attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE),
|
attr => attr instanceof HealStatusEffectAttr && attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE),
|
||||||
) ||
|
) ||
|
||||||
(!this.pokemon.randSeedInt(5) && Overrides.STATUS_ACTIVATION_OVERRIDE !== true) ||
|
(!this.pokemon.randBattleSeedInt(5) && Overrides.STATUS_ACTIVATION_OVERRIDE !== true) ||
|
||||||
Overrides.STATUS_ACTIVATION_OVERRIDE === false;
|
Overrides.STATUS_ACTIVATION_OVERRIDE === false;
|
||||||
|
|
||||||
activated = !healed;
|
activated = !healed;
|
||||||
|
@ -196,6 +196,7 @@ export class SummonPhase extends PartyMemberPokemonPhase {
|
|||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
pokemon.cry(pokemon.getHpRatio() > 0.25 ? undefined : { rate: 0.85 });
|
pokemon.cry(pokemon.getHpRatio() > 0.25 ? undefined : { rate: 0.85 });
|
||||||
pokemon.getSprite().clearTint();
|
pokemon.getSprite().clearTint();
|
||||||
|
pokemon.fieldSetup();
|
||||||
// necessary to stay transformed during wild waves
|
// necessary to stay transformed during wild waves
|
||||||
if (pokemon.summonData.speciesForm) {
|
if (pokemon.summonData.speciesForm) {
|
||||||
pokemon.loadAssets(false);
|
pokemon.loadAssets(false);
|
||||||
@ -261,6 +262,7 @@ export class SummonPhase extends PartyMemberPokemonPhase {
|
|||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
pokemon.cry(pokemon.getHpRatio() > 0.25 ? undefined : { rate: 0.85 });
|
pokemon.cry(pokemon.getHpRatio() > 0.25 ? undefined : { rate: 0.85 });
|
||||||
pokemon.getSprite().clearTint();
|
pokemon.getSprite().clearTint();
|
||||||
|
pokemon.fieldSetup();
|
||||||
globalScene.updateFieldScale();
|
globalScene.updateFieldScale();
|
||||||
globalScene.time.delayedCall(1000, () => this.end());
|
globalScene.time.delayedCall(1000, () => this.end());
|
||||||
},
|
},
|
||||||
|
@ -193,7 +193,7 @@ export class SwitchSummonPhase extends SummonPhase {
|
|||||||
switchedInPokemon.setAlpha(0.5);
|
switchedInPokemon.setAlpha(0.5);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switchedInPokemon.resetSummonData();
|
switchedInPokemon.fieldSetup(true);
|
||||||
}
|
}
|
||||||
this.summon();
|
this.summon();
|
||||||
};
|
};
|
||||||
|
@ -1110,7 +1110,7 @@ export class GameData {
|
|||||||
for (const p of sessionData.party) {
|
for (const p of sessionData.party) {
|
||||||
const pokemon = p.toPokemon() as PlayerPokemon;
|
const pokemon = p.toPokemon() as PlayerPokemon;
|
||||||
pokemon.setVisible(false);
|
pokemon.setVisible(false);
|
||||||
loadPokemonAssets.push(pokemon.loadAssets());
|
loadPokemonAssets.push(pokemon.loadAssets(false));
|
||||||
party.push(pokemon);
|
party.push(pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ export default class PokemonData {
|
|||||||
// when loading from saved session, recover summonData.speciesFrom and form index species object
|
// when loading from saved session, recover summonData.speciesFrom and form index species object
|
||||||
// used to stay transformed on reload session
|
// used to stay transformed on reload session
|
||||||
if (this.summonData.speciesForm) {
|
if (this.summonData.speciesForm) {
|
||||||
this.summonData.speciesForm = getPokemonSpeciesForm(
|
ret.summonData.speciesForm = getPokemonSpeciesForm(
|
||||||
this.summonData.speciesForm.speciesId,
|
this.summonData.speciesForm.speciesId,
|
||||||
this.summonDataSpeciesFormIndex,
|
this.summonDataSpeciesFormIndex,
|
||||||
);
|
);
|
||||||
|
@ -7,6 +7,7 @@ import { addWindow } from "./ui-theme";
|
|||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import type { CommandPhase } from "#app/phases/command-phase";
|
import type { CommandPhase } from "#app/phases/command-phase";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export default class BallUiHandler extends UiHandler {
|
export default class BallUiHandler extends UiHandler {
|
||||||
private pokeballSelectContainer: Phaser.GameObjects.Container;
|
private pokeballSelectContainer: Phaser.GameObjects.Container;
|
||||||
@ -31,7 +32,7 @@ export default class BallUiHandler extends UiHandler {
|
|||||||
for (let pb = 0; pb < Object.keys(globalScene.pokeballCounts).length; pb++) {
|
for (let pb = 0; pb < Object.keys(globalScene.pokeballCounts).length; pb++) {
|
||||||
optionsTextContent += `${getPokeballName(pb)}\n`;
|
optionsTextContent += `${getPokeballName(pb)}\n`;
|
||||||
}
|
}
|
||||||
optionsTextContent += "Cancel";
|
optionsTextContent += i18next.t("pokeball:cancel");
|
||||||
const optionsText = addTextObject(0, 0, optionsTextContent, TextStyle.WINDOW, { align: "right", maxLines: 6 });
|
const optionsText = addTextObject(0, 0, optionsTextContent, TextStyle.WINDOW, { align: "right", maxLines: 6 });
|
||||||
const optionsTextWidth = optionsText.displayWidth;
|
const optionsTextWidth = optionsText.displayWidth;
|
||||||
this.pokeballSelectContainer = globalScene.add.container(
|
this.pokeballSelectContainer = globalScene.add.container(
|
||||||
|
@ -108,7 +108,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
|||||||
let pokemonIconX = -20;
|
let pokemonIconX = -20;
|
||||||
let pokemonIconY = 6;
|
let pokemonIconY = 6;
|
||||||
|
|
||||||
if (["de", "es-ES", "fr", "ko", "pt-BR"].includes(currentLanguage)) {
|
if (["de", "es-ES", "es-MX", "fr", "ko", "pt-BR"].includes(currentLanguage)) {
|
||||||
gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT;
|
gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT;
|
||||||
gachaX = 2;
|
gachaX = 2;
|
||||||
gachaY = 2;
|
gachaY = 2;
|
||||||
@ -116,7 +116,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
let legendaryLabelX = gachaX;
|
let legendaryLabelX = gachaX;
|
||||||
let legendaryLabelY = gachaY;
|
let legendaryLabelY = gachaY;
|
||||||
if (["de", "es-ES"].includes(currentLanguage)) {
|
if (["de", "es-ES", "es-MX"].includes(currentLanguage)) {
|
||||||
pokemonIconX = -25;
|
pokemonIconX = -25;
|
||||||
pokemonIconY = 10;
|
pokemonIconY = 10;
|
||||||
legendaryLabelX = -6;
|
legendaryLabelX = -6;
|
||||||
|
@ -1888,7 +1888,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
||||||
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.starterId]);
|
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.starterId]);
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${passiveCost} ${i18next.t("pokedexUiHandler:unlockPassive")} (${allAbilities[this.passive].name})`,
|
label: `x${passiveCost} ${i18next.t("pokedexUiHandler:unlockPassive")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
||||||
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
||||||
|
@ -145,12 +145,16 @@ const languageSettings: { [key: string]: LanguageSetting } = {
|
|||||||
starterInfoXPos: 33,
|
starterInfoXPos: 33,
|
||||||
},
|
},
|
||||||
ko: {
|
ko: {
|
||||||
starterInfoTextSize: "52px",
|
starterInfoTextSize: "60px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "38px",
|
||||||
|
starterInfoYOffset: -0.5,
|
||||||
|
starterInfoXPos: 30,
|
||||||
},
|
},
|
||||||
ja: {
|
ja: {
|
||||||
starterInfoTextSize: "51px",
|
starterInfoTextSize: "62px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "38px",
|
||||||
|
starterInfoYOffset: 0.5,
|
||||||
|
starterInfoXPos: 33,
|
||||||
},
|
},
|
||||||
"ca-ES": {
|
"ca-ES": {
|
||||||
starterInfoTextSize: "52px",
|
starterInfoTextSize: "52px",
|
||||||
@ -2180,7 +2184,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
||||||
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.lastSpecies.speciesId]);
|
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.lastSpecies.speciesId]);
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${passiveCost} ${i18next.t("starterSelectUiHandler:unlockPassive")} (${allAbilities[this.lastSpecies.getPassiveAbility()].name})`,
|
label: `x${passiveCost} ${i18next.t("starterSelectUiHandler:unlockPassive")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
||||||
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
||||||
|
@ -99,6 +99,16 @@ export function randSeedInt(range: number, min = 0): number {
|
|||||||
return Phaser.Math.RND.integerInRange(min, range - 1 + min);
|
return Phaser.Math.RND.integerInRange(min, range - 1 + min);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a random number using the global seed
|
||||||
|
* @param min The minimum integer to generate
|
||||||
|
* @param max The maximum integer to generate
|
||||||
|
* @returns a random integer between {@linkcode min} and {@linkcode max} inclusive
|
||||||
|
*/
|
||||||
|
export function randSeedIntRange(min: number, max: number): number {
|
||||||
|
return randSeedInt(max - min + 1, min);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a random integer between min and max (non-inclusive)
|
* Returns a random integer between min and max (non-inclusive)
|
||||||
* @param min The lowest number
|
* @param min The lowest number
|
||||||
|
@ -111,7 +111,7 @@ describe("Abilities - Cud Chew", () => {
|
|||||||
|
|
||||||
it("can store multiple berries across 2 turns with teatime", async () => {
|
it("can store multiple berries across 2 turns with teatime", async () => {
|
||||||
// always eat first berry for stuff cheeks & company
|
// always eat first berry for stuff cheeks & company
|
||||||
vi.spyOn(Pokemon.prototype, "randSeedInt").mockReturnValue(0);
|
vi.spyOn(Pokemon.prototype, "randBattleSeedInt").mockReturnValue(0);
|
||||||
game.override
|
game.override
|
||||||
.startingHeldItems([
|
.startingHeldItems([
|
||||||
{ name: "BERRY", type: BerryType.PETAYA, count: 3 },
|
{ name: "BERRY", type: BerryType.PETAYA, count: 3 },
|
||||||
|
@ -139,7 +139,7 @@ describe("Abilities - Desolate Land", () => {
|
|||||||
await game.classicMode.startBattle([Species.MAGIKARP]);
|
await game.classicMode.startBattle([Species.MAGIKARP]);
|
||||||
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.HARSH_SUN);
|
expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.HARSH_SUN);
|
||||||
|
|
||||||
vi.spyOn(game.scene.getPlayerPokemon()!, "randSeedInt").mockReturnValue(0);
|
vi.spyOn(game.scene.getPlayerPokemon()!, "randBattleSeedInt").mockReturnValue(0);
|
||||||
|
|
||||||
const commandPhase = game.scene.getCurrentPhase() as CommandPhase;
|
const commandPhase = game.scene.getCurrentPhase() as CommandPhase;
|
||||||
commandPhase.handleCommand(Command.RUN, 0);
|
commandPhase.handleCommand(Command.RUN, 0);
|
||||||
|
@ -164,7 +164,7 @@ describe("Abilities - Neutralizing Gas", () => {
|
|||||||
await game.classicMode.startBattle([Species.MAGIKARP]);
|
await game.classicMode.startBattle([Species.MAGIKARP]);
|
||||||
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeDefined();
|
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeDefined();
|
||||||
|
|
||||||
vi.spyOn(game.scene.getPlayerPokemon()!, "randSeedInt").mockReturnValue(0);
|
vi.spyOn(game.scene.getPlayerPokemon()!, "randBattleSeedInt").mockReturnValue(0);
|
||||||
|
|
||||||
const commandPhase = game.scene.getCurrentPhase() as CommandPhase;
|
const commandPhase = game.scene.getCurrentPhase() as CommandPhase;
|
||||||
commandPhase.handleCommand(Command.RUN, 0);
|
commandPhase.handleCommand(Command.RUN, 0);
|
||||||
|
@ -73,7 +73,7 @@ describe("Items - Reviver Seed", () => {
|
|||||||
const reviverSeed = player.getHeldItems()[0] as PokemonInstantReviveModifier;
|
const reviverSeed = player.getHeldItems()[0] as PokemonInstantReviveModifier;
|
||||||
vi.spyOn(reviverSeed, "apply");
|
vi.spyOn(reviverSeed, "apply");
|
||||||
|
|
||||||
vi.spyOn(player, "randSeedInt").mockReturnValue(0); // Force confusion self-hit
|
vi.spyOn(player, "randBattleSeedInt").mockReturnValue(0); // Force confusion self-hit
|
||||||
game.move.select(Moves.TACKLE);
|
game.move.select(Moves.TACKLE);
|
||||||
await game.phaseInterceptor.to("BerryPhase");
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
|
||||||
|
47
test/moves/synchronoise.test.ts
Normal file
47
test/moves/synchronoise.test.ts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import { Abilities } from "#enums/abilities";
|
||||||
|
import { Moves } from "#enums/moves";
|
||||||
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
|
import { Species } from "#enums/species";
|
||||||
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
|
import Phaser from "phaser";
|
||||||
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
describe("Moves - Synchronoise", () => {
|
||||||
|
let phaserGame: Phaser.Game;
|
||||||
|
let game: GameManager;
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
phaserGame = new Phaser.Game({
|
||||||
|
type: Phaser.HEADLESS,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
game.phaseInterceptor.restoreOg();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
game = new GameManager(phaserGame);
|
||||||
|
game.override
|
||||||
|
.moveset([Moves.SYNCHRONOISE])
|
||||||
|
.ability(Abilities.BALL_FETCH)
|
||||||
|
.battleStyle("single")
|
||||||
|
.disableCrits()
|
||||||
|
.enemySpecies(Species.MAGIKARP)
|
||||||
|
.enemyAbility(Abilities.BALL_FETCH)
|
||||||
|
.enemyMoveset(Moves.SPLASH);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should consider the user's tera type if it is terastallized", async () => {
|
||||||
|
await game.classicMode.startBattle([Species.BIDOOF]);
|
||||||
|
const playerPokemon = game.scene.getPlayerPokemon()!;
|
||||||
|
const enemyPokemon = game.scene.getEnemyPokemon()!;
|
||||||
|
|
||||||
|
// force the player to be terastallized
|
||||||
|
playerPokemon.teraType = PokemonType.WATER;
|
||||||
|
playerPokemon.isTerastallized = true;
|
||||||
|
game.move.select(Moves.SYNCHRONOISE);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp());
|
||||||
|
});
|
||||||
|
});
|
@ -74,7 +74,7 @@ describe("Moves - U-turn", () => {
|
|||||||
// arrange
|
// arrange
|
||||||
game.override.enemyAbility(Abilities.POISON_POINT);
|
game.override.enemyAbility(Abilities.POISON_POINT);
|
||||||
await game.classicMode.startBattle([Species.RAICHU, Species.SHUCKLE]);
|
await game.classicMode.startBattle([Species.RAICHU, Species.SHUCKLE]);
|
||||||
vi.spyOn(game.scene.getEnemyPokemon()!, "randSeedInt").mockReturnValue(0);
|
vi.spyOn(game.scene.getEnemyPokemon()!, "randBattleSeedInt").mockReturnValue(0);
|
||||||
|
|
||||||
// act
|
// act
|
||||||
game.move.select(Moves.U_TURN);
|
game.move.select(Moves.U_TURN);
|
||||||
|
@ -10,6 +10,7 @@ import Phaser from "phaser";
|
|||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { Status } from "#app/data/status-effect";
|
import { Status } from "#app/data/status-effect";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
|
import { globalScene } from "#app/global-scene";
|
||||||
import { BattlerIndex } from "#app/battle";
|
import { BattlerIndex } from "#app/battle";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
import { TrainerType } from "#enums/trainer-type";
|
import { TrainerType } from "#enums/trainer-type";
|
||||||
@ -161,6 +162,37 @@ describe("Moves - Whirlwind", () => {
|
|||||||
expect(eevee.isOnField()).toBe(false);
|
expect(eevee.isOnField()).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should fail when player uses Whirlwind against an opponent with only one available Pokémon", async () => {
|
||||||
|
// Set up the battle scenario with the player knowing Whirlwind
|
||||||
|
game.override.startingWave(5).enemySpecies(Species.PIDGEY).moveset([Moves.WHIRLWIND]);
|
||||||
|
await game.classicMode.startBattle();
|
||||||
|
|
||||||
|
const enemyParty = game.scene.getEnemyParty();
|
||||||
|
|
||||||
|
// Ensure the opponent has only one available Pokémon
|
||||||
|
if (enemyParty.length > 1) {
|
||||||
|
enemyParty.slice(1).forEach(p => {
|
||||||
|
p.hp = 0;
|
||||||
|
p.status = new Status(StatusEffect.FAINT);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const eligibleEnemy = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle());
|
||||||
|
expect(eligibleEnemy.length).toBe(1);
|
||||||
|
|
||||||
|
// Spy on the queueMessage function
|
||||||
|
const queueSpy = vi.spyOn(globalScene, "queueMessage");
|
||||||
|
|
||||||
|
// Player uses Whirlwind; opponent uses Splash
|
||||||
|
game.move.select(Moves.WHIRLWIND);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH);
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
// Verify that the failure message is displayed for Whirlwind
|
||||||
|
expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But it failed"));
|
||||||
|
// Verify the opponent's Splash message
|
||||||
|
expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But nothing happened!"));
|
||||||
|
});
|
||||||
|
|
||||||
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {
|
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {
|
||||||
game.override
|
game.override
|
||||||
.startingWave(2)
|
.startingWave(2)
|
||||||
|
Loading…
Reference in New Issue
Block a user