Merge branch 'beta' of https://github.com/pagefaultgames/pokerogue into ability_display

This commit is contained in:
Dean 2025-02-05 00:51:06 -08:00
commit 2b6a4ec89b
204 changed files with 2438 additions and 1299 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[src/*.{js,ts}]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View File

@ -80,8 +80,8 @@ As part of the move selection process, the enemy Pokémon must compute a **targe
A move's UBS and TBS are computed with the respective functions in the `Move` class:
```ts
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer;
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer;
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number;
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number;
```
Logically, these functions are very similar – they add up their respective benefit scores from each of the move's attributes (as determined by `attr.getUserBenefitScore`, and `attr.getTargetBenefitScore`, respectively) and return the total benefit score. However, there are two key functional differences in how the UBS and TBS of a move are handled:

View File

@ -4,8 +4,8 @@
"image": "aether_grunt_f.png",
"format": "RGBA8888",
"size": {
"w": 69,
"h": 69
"w": 70,
"h": 70
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 39,
"h": 70
},
"spriteSourceSize": {
"x": 23,
"y": 10,
"w": 35,
"h": 69
"x": 0,
"y": 0,
"w": 39,
"h": 70
},
"frame": {
"x": 0,
"y": 0,
"w": 35,
"h": 69
"w": 39,
"h": 70
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:0c9e77856d3b434e719021572bcb93de:f9c45dc5d67009b134dd1bbc5593f6ec:a694f8828aff21c718e5161e2fd63ade$"
"smartupdate": "$TexturePacker:SmartUpdate:0a678d2035c82d3741f2de29e01d42d3:374042fde99a4ff05c5e90cedbc5bd1f:a694f8828aff21c718e5161e2fd63ade$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 849 B

After

Width:  |  Height:  |  Size: 787 B

View File

@ -4,8 +4,8 @@
"image": "aether_grunt_m.png",
"format": "RGBA8888",
"size": {
"w": 65,
"h": 65
"w": 69,
"h": 69
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 45,
"h": 69
},
"spriteSourceSize": {
"x": 16,
"y": 14,
"w": 47,
"h": 65
"x": 0,
"y": 0,
"w": 45,
"h": 69
},
"frame": {
"x": 0,
"y": 0,
"w": 47,
"h": 65
"w": 45,
"h": 69
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:963887cf29549ad3c123b8055cb4d701:68004c4a6e04c93bd21c26a6f8921f0c:d2241fc11d0fc31b26ecbedae6da74f4$"
"smartupdate": "$TexturePacker:SmartUpdate:f7ad29bea8c4a179c08958890cadb04b:741fc1b2e43d2da720c249c6f81910bc:d2241fc11d0fc31b26ecbedae6da74f4$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 782 B

View File

@ -4,8 +4,8 @@
"image": "aqua_grunt_f.png",
"format": "RGBA8888",
"size": {
"w": 71,
"h": 71
"w": 73,
"h": 73
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 34,
"h": 73
},
"spriteSourceSize": {
"x": 22,
"y": 8,
"w": 36,
"h": 71
"x": 0,
"y": 0,
"w": 34,
"h": 73
},
"frame": {
"x": 0,
"y": 0,
"w": 36,
"h": 71
"w": 34,
"h": 73
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:6db25cb5753163d19bca8e2db45849ae:7d8f51509862bfdf8a78bf42dd0005cd:af0aa9494be37941522487032b556989$"
"smartupdate": "$TexturePacker:SmartUpdate:99d76e35df4b09fc9d312218d8fa8cc7:8ad846929ea03b5fb70fd16144e5e2fa:af0aa9494be37941522487032b556989$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 767 B

After

Width:  |  Height:  |  Size: 803 B

View File

@ -4,8 +4,8 @@
"image": "aqua_grunt_m.png",
"format": "RGBA8888",
"size": {
"w": 73,
"h": 73
"w": 74,
"h": 74
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 38,
"h": 74
},
"spriteSourceSize": {
"x": 17,
"y": 6,
"w": 46,
"h": 73
"x": 0,
"y": 0,
"w": 38,
"h": 74
},
"frame": {
"x": 0,
"y": 0,
"w": 46,
"h": 73
"w": 38,
"h": 74
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:efd07ff3ed1e610150a4b8ca18974343:d9b85b9eb11182e9e4669e2bd8b08694:72b7b50231708a9486d5f315824e4df1$"
"smartupdate": "$TexturePacker:SmartUpdate:ea2cdca90584089079af92307948ecdc:331e1f5314abbfcf58331ab0b9fd1c40:72b7b50231708a9486d5f315824e4df1$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

After

Width:  |  Height:  |  Size: 797 B

View File

@ -4,8 +4,8 @@
"image": "archie.png",
"format": "RGBA8888",
"size": {
"w": 80,
"h": 80
"w": 79,
"h": 79
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 58,
"h": 79
},
"spriteSourceSize": {
"x": 21,
"x": 0,
"y": 0,
"w": 42,
"h": 80
"w": 58,
"h": 79
},
"frame": {
"x": 0,
"y": 0,
"w": 42,
"h": 80
"w": 58,
"h": 79
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:bfa7fdd7b6ac9be68dc9dc562fb8339f:06f87a279450b21b19294ba956b69c26:4b7980be4e3ac1d20c9eaf970913ec63$"
"smartupdate": "$TexturePacker:SmartUpdate:1edc051db037c1742819ac8674ebe4be:bfaa715c0faf707c1b20ab8259d42a35:4b7980be4e3ac1d20c9eaf970913ec63$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -4,8 +4,8 @@
"image": "atticus.png",
"format": "RGBA8888",
"size": {
"w": 46,
"h": 46
"w": 55,
"h": 55
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 55,
"h": 49
},
"spriteSourceSize": {
"x": 21,
"y": 33,
"w": 43,
"h": 46
"x": 0,
"y": 0,
"w": 55,
"h": 49
},
"frame": {
"x": 0,
"y": 0,
"w": 43,
"h": 46
"w": 55,
"h": 49
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:6dcd7c3d3982793cbca0d6fcd1f9260e:19c44634629fadd9d039d23dc71ec987:d26ede35f15aa571d5a7a2dd2fb868e1$"
"smartupdate": "$TexturePacker:SmartUpdate:2c1a2ecebeac4770c51422bede6add57:5c82bf231c27d62e440081f186eb1da9:d26ede35f15aa571d5a7a2dd2fb868e1$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 B

After

Width:  |  Height:  |  Size: 740 B

View File

@ -4,8 +4,8 @@
"image": "courtney.png",
"format": "RGBA8888",
"size": {
"w": 52,
"h": 80
"w": 72,
"h": 72
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 52,
"h": 80
"w": 44,
"h": 72
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 52,
"h": 80
"w": 44,
"h": 72
},
"frame": {
"x": 0,
"y": 0,
"w": 52,
"h": 80
"w": 44,
"h": 72
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:831f5748dad92911b10a1cb358ee2dae:a3bf81bbaa3b49cad5e0e549cf94563b:bb6befc9383c9c08837183ae2a7a80c1$"
"smartupdate": "$TexturePacker:SmartUpdate:c39b0f300dc09114fba490e6ab68b2b5:a24a6dbdd0e3f4d4b7a567673b73316a:b0c7d3a5747d1c7edafa00c8e6d1257e$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 869 B

View File

@ -4,8 +4,8 @@
"image": "eri.png",
"format": "RGBA8888",
"size": {
"w": 74,
"h": 74
"w": 78,
"h": 78
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 52,
"h": 78
},
"spriteSourceSize": {
"x": 15,
"y": 5,
"w": 45,
"h": 74
"x": 0,
"y": 0,
"w": 52,
"h": 78
},
"frame": {
"x": 0,
"y": 0,
"w": 45,
"h": 74
"w": 52,
"h": 78
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:59594ac27e74ec85e2949d12ff680dc2:d65b6b00858ac47b26ef8393a8fa6795:d7f4cd3ff755f8074c14d3006b0c8301$"
"smartupdate": "$TexturePacker:SmartUpdate:d413fdffea2ec50087a67019a6ce4063:66a18e7a21ca3a1953778dbc09074ab6:d7f4cd3ff755f8074c14d3006b0c8301$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -4,8 +4,8 @@
"image": "faba.png",
"format": "RGBA8888",
"size": {
"w": 74,
"h": 74
"w": 76,
"h": 76
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 29,
"h": 76
},
"spriteSourceSize": {
"x": 25,
"y": 5,
"w": 31,
"h": 74
"x": 0,
"y": 0,
"w": 29,
"h": 76
},
"frame": {
"x": 0,
"y": 0,
"w": 31,
"h": 74
"w": 29,
"h": 76
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:47622708d99a504998950bd9c389a504:fe1c51be191dd9fafb5b6f309c08ae1a:8d64db18930325b8b513740c1d83ce4c$"
"smartupdate": "$TexturePacker:SmartUpdate:bbfce6e1ed69401694ce8c2537dd1fea:a2c9351e4ba08d44cafa66ecdf509866:8d64db18930325b8b513740c1d83ce4c$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

After

Width:  |  Height:  |  Size: 772 B

View File

@ -4,8 +4,8 @@
"image": "flare_grunt_f.png",
"format": "RGBA8888",
"size": {
"w": 80,
"h": 80
"w": 85,
"h": 85
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 23,
"h": 85
},
"spriteSourceSize": {
"x": 31,
"x": 0,
"y": 0,
"w": 23,
"h": 80
"h": 85
},
"frame": {
"x": 0,
"y": 0,
"w": 23,
"h": 80
"h": 85
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:c30bf82452209a923f4becf13d275a9a:a6355b09f92c9c0388d0b919010f587f:0638dbf213f8a974eb5af76eb1e5ddeb$"
"smartupdate": "$TexturePacker:SmartUpdate:88d242a8c3b9859307ecdd290c30ce7d:acd04d60ab09f18e86e4e5727132dac2:0638dbf213f8a974eb5af76eb1e5ddeb$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 634 B

View File

@ -14,12 +14,12 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 31,
"h": 77
},
"spriteSourceSize": {
"x": 24,
"y": 2,
"x": 0,
"y": 0,
"w": 31,
"h": 77
},
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:a26606e70778f88a1a7053b2f2420dde:84abf0d0f6bc90c6a60f660567b2d641:adc35a4070bac9fe828c2605a3b15744$"
"smartupdate": "$TexturePacker:SmartUpdate:8683e52bbd1a42992f4d7ab8aa65a2a1:e8279cd322279bc5f8e2bb5797e6f818:adc35a4070bac9fe828c2605a3b15744$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

After

Width:  |  Height:  |  Size: 662 B

View File

@ -4,8 +4,8 @@
"image": "giacomo.png",
"format": "RGBA8888",
"size": {
"w": 75,
"h": 75
"w": 71,
"h": 71
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 37,
"h": 71
},
"spriteSourceSize": {
"x": 23,
"y": 4,
"x": 0,
"y": 0,
"w": 37,
"h": 75
"h": 71
},
"frame": {
"x": 0,
"y": 0,
"w": 37,
"h": 75
"h": 71
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:8c4e7da48e5667abc6d364330268c092:0fa43e58d8a746d3b86cb2dd763719f4:8603cc19e888c8c8de62177f4011577c$"
"smartupdate": "$TexturePacker:SmartUpdate:8d4b9bca01f3729556cd02a8795c3e89:cb2840cbbd1e5a614bfa6bcb23db5b62:8603cc19e888c8c8de62177f4011577c$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 846 B

View File

@ -4,8 +4,8 @@
"image": "guzma.png",
"format": "RGBA8888",
"size": {
"w": 58,
"h": 58
"w": 64,
"h": 64
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 34,
"h": 64
},
"spriteSourceSize": {
"x": 21,
"y": 20,
"w": 37,
"h": 58
"x": 0,
"y": 0,
"w": 34,
"h": 64
},
"frame": {
"x": 0,
"y": 0,
"w": 37,
"h": 58
"w": 34,
"h": 64
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:c3b08a562a2882d1ca8b5e031e245da9:72a8305e547f091d15abccd2b142e401:3b302c7f9eb6ea81b65bcaeead4a95a9$"
"smartupdate": "$TexturePacker:SmartUpdate:90cfe8ae514c30ddf48840678b251141:87a93d268c61327ad913bba3b052686b:3b302c7f9eb6ea81b65bcaeead4a95a9$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 874 B

View File

@ -4,8 +4,8 @@
"image": "hala.png",
"format": "RGBA8888",
"size": {
"w": 78,
"h": 78
"w": 82,
"h": 82
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 59,
"h": 78
"w": 58,
"h": 82
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 59,
"h": 78
"w": 58,
"h": 82
},
"frame": {
"x": 0,
"y": 0,
"w": 59,
"h": 78
"w": 58,
"h": 82
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:b6547cc9975d92a02b99fd63122d740b:0a72e0ac4fcbfe4329a7dcdad284ab36:7c2af56b9a9851f2e2eaeaf0cdca9370$"
"smartupdate": "$TexturePacker:SmartUpdate:57dc13db648785ad4694bf67c40fa21d:ee2bc7184f4f48ab8ba3c10c89bfc8f0:7c2af56b9a9851f2e2eaeaf0cdca9370$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -4,8 +4,8 @@
"image": "hau.png",
"format": "RGBA8888",
"size": {
"w": 70,
"h": 70
"w": 71,
"h": 71
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 24,
"h": 71
},
"spriteSourceSize": {
"x": 27,
"y": 9,
"w": 29,
"h": 70
"x": 0,
"y": 0,
"w": 24,
"h": 71
},
"frame": {
"x": 0,
"y": 0,
"w": 29,
"h": 70
"w": 24,
"h": 71
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:688d6d27e686efec45b144ba4544f248:676457a4e9dfbcad0510f6e7bfa73514:d4c7e8b349477c2295b49b0e99b91bb3$"
"smartupdate": "$TexturePacker:SmartUpdate:0d500afd9a36f32a23b5a316dcf397d9:aa5d3e58d6df67b90e484ec7f345a4cf:d4c7e8b349477c2295b49b0e99b91bb3$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 693 B

View File

@ -4,8 +4,8 @@
"image": "korrina.png",
"format": "RGBA8888",
"size": {
"w": 75,
"h": 75
"w": 83,
"h": 83
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 57,
"h": 83
},
"spriteSourceSize": {
"x": 10,
"y": 4,
"w": 56,
"h": 75
"x": 0,
"y": 0,
"w": 57,
"h": 83
},
"frame": {
"x": 0,
"y": 0,
"w": 56,
"h": 75
"w": 57,
"h": 83
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:43a6564beec2569a58110232e9752b64:0decef066ae75dc7f3bd0c811f9a92d1:ed5be09cd8b82ed6439ff8617ffa74c0$"
"smartupdate": "$TexturePacker:SmartUpdate:1dc28e18e99698fbfd8a110a1dc737f2:79d24176afd3059dc69ce785ce672bbb:ed5be09cd8b82ed6439ff8617ffa74c0$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -4,8 +4,8 @@
"image": "lusamine.png",
"format": "RGBA8888",
"size": {
"w": 74,
"h": 74
"w": 80,
"h": 80
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"w": 52,
"h": 80
},
"spriteSourceSize": {
"x": 22,
"y": 5,
"w": 36,
"h": 74
"x": 0,
"y": 0,
"w": 52,
"h": 80
},
"frame": {
"x": 0,
"y": 0,
"w": 36,
"h": 74
"w": 52,
"h": 80
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:41da3a1299e3831be70016dc91e49313:2413ba06767fb10fdc6fde8cc736c51c:4012333084c529872232c8d052561dc1$"
"smartupdate": "$TexturePacker:SmartUpdate:52c5f9beccbfe68b9861b8fc393ba674:35d25e8bad6c7212e330a0e3d0c88315:4012333084c529872232c8d052561dc1$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

After

Width:  |  Height:  |  Size: 976 B

View File

@ -4,8 +4,8 @@
"image": "lysandre.png",
"format": "RGBA8888",
"size": {
"w": 80,
"h": 80
"w": 82,
"h": 82
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 50,
"h": 82
},
"spriteSourceSize": {
"x": 14,
"x": 0,
"y": 0,
"w": 52,
"h": 80
"w": 50,
"h": 82
},
"frame": {
"x": 0,
"y": 0,
"w": 52,
"h": 80
"w": 50,
"h": 82
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:6b887c8bab74885a1b05f2b382759db6:ba102d9d25ddd794a3a17f029b971daf:e6066149f6ec4ccb9fc28faea3d64a7f$"
"smartupdate": "$TexturePacker:SmartUpdate:b09528fe2d3137bba8ce5c667d2a962f:7c522eefcc85ee87df485d34b58e814b:e6066149f6ec4ccb9fc28faea3d64a7f$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 797 B

After

Width:  |  Height:  |  Size: 824 B

View File

@ -14,19 +14,19 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 33,
"h": 74
},
"spriteSourceSize": {
"x": 24,
"y": 5,
"w": 31,
"x": 0,
"y": 0,
"w": 33,
"h": 74
},
"frame": {
"x": 0,
"y": 0,
"w": 31,
"w": 33,
"h": 74
}
}
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:a015c43d80f8fd1932758e0e2cfcec61:59fc8205ea5ca04295831b4a2eb623ec:30df2ea8e9dac9e95f70534ec43d5ecd$"
"smartupdate": "$TexturePacker:SmartUpdate:7449212fcdbfb4a600364bd3761e4fb6:37c81a387501a047cff84cabdeedb496:d1412ef32f1904a102cf70569806f3b7$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 807 B

View File

@ -4,8 +4,8 @@
"image": "macro_grunt_m.png",
"format": "RGBA8888",
"size": {
"w": 75,
"h": 75
"w": 76,
"h": 76
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 35,
"h": 76
},
"spriteSourceSize": {
"x": 15,
"y": 4,
"w": 48,
"h": 75
"x": 0,
"y": 0,
"w": 35,
"h": 76
},
"frame": {
"x": 0,
"y": 0,
"w": 48,
"h": 75
"w": 35,
"h": 76
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:52fccff2a0675b4e10139ddb7067d4cf:10d254175d2d8a9111cce096ffb55fa3:d57016467aa07cafdfaf13e0ff643c1b$"
"smartupdate": "$TexturePacker:SmartUpdate:5800bf6888eb6dd61ea39e1c9a1f93e3:25a930b7c50e2d7832bd3c30402d7544:1f76f2e682f472208a45e187250a6a3d$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 868 B

View File

@ -4,30 +4,30 @@
"image": "magma_grunt_f.png",
"format": "RGBA8888",
"size": {
"w": 80,
"h": 80
"w": 72,
"h": 72
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 43,
"h": 72
},
"spriteSourceSize": {
"x": 10,
"x": 0,
"y": 0,
"w": 60,
"h": 80
"w": 43,
"h": 72
},
"frame": {
"x": 10,
"x": 0,
"y": 0,
"w": 60,
"h": 80
"w": 43,
"h": 72
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:f63ad48affc076f60fae78992c96a2bf:80928b32710abcb28c07c6fc5a425d99:3b961d8852b62aaf24ceb2030c036515$"
"smartupdate": "$TexturePacker:SmartUpdate:219462e400564a65012cda9dbc31ab22:4e0070239d24311df52a263271698c59:3b961d8852b62aaf24ceb2030c036515$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 727 B

After

Width:  |  Height:  |  Size: 727 B

View File

@ -4,30 +4,30 @@
"image": "magma_grunt_m.png",
"format": "RGBA8888",
"size": {
"w": 80,
"h": 80
"w": 72,
"h": 72
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 44,
"h": 72
},
"spriteSourceSize": {
"x": 10,
"x": 0,
"y": 0,
"w": 60,
"h": 80
"w": 44,
"h": 72
},
"frame": {
"x": 10,
"x": 0,
"y": 0,
"w": 60,
"h": 80
"w": 44,
"h": 72
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:96aa833d987a01bcdcb6f0e7809f5daf:791cce8d026f92b2e52f0b66df8b8e11:35532fd5d9aea30957d50d06f2d2f9a6$"
"smartupdate": "$TexturePacker:SmartUpdate:46f6e6e1aef8e2e7640c67116e548c5d:34cb6b7f64b0d3c294fcdde45097575d:35532fd5d9aea30957d50d06f2d2f9a6$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 698 B

View File

@ -4,8 +4,8 @@
"image": "mela.png",
"format": "RGBA8888",
"size": {
"w": 78,
"h": 78
"w": 75,
"h": 75
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 41,
"h": 75
},
"spriteSourceSize": {
"x": 18,
"y": 1,
"w": 46,
"h": 78
"x": 0,
"y": 0,
"w": 41,
"h": 75
},
"frame": {
"x": 0,
"y": 0,
"w": 46,
"h": 78
"w": 41,
"h": 75
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:e26d8c926c54c848cef673b3f59f35e7:ff040c2cebb1a92d2ef61dc91c018390:68668cf06383ff459cccaafb6bf56215$"
"smartupdate": "$TexturePacker:SmartUpdate:96e97b165e8ca706b7838616d32ab81f:89c577db41f4b610520823e876066e35:68668cf06383ff459cccaafb6bf56215$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1014 B

View File

@ -4,8 +4,8 @@
"image": "molayne.png",
"format": "RGBA8888",
"size": {
"w": 79,
"h": 79
"w": 78,
"h": 78
},
"scale": 1,
"frames": [
@ -15,19 +15,19 @@
"trimmed": false,
"sourceSize": {
"w": 31,
"h": 79
"h": 78
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 31,
"h": 79
"h": 78
},
"frame": {
"x": 0,
"y": 0,
"w": 31,
"h": 79
"h": 78
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:056720ae56077b81375b258850332053:774e1c8463f26fac3be55ed88c8b48b9:11092260a376b1a46e696927361b6498$"
"smartupdate": "$TexturePacker:SmartUpdate:190386db101d4bd1ef5ed1f4f7b5bb1c:c8bc1b069ceb2707738b9178fb6aea0f:11092260a376b1a46e696927361b6498$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

After

Width:  |  Height:  |  Size: 743 B

View File

@ -4,8 +4,8 @@
"image": "oleana.png",
"format": "RGBA8888",
"size": {
"w": 79,
"h": 79
"w": 78,
"h": 78
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 56,
"h": 78
},
"spriteSourceSize": {
"x": 10,
"y": 1,
"w": 53,
"h": 79
"x": 0,
"y": 0,
"w": 56,
"h": 78
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 79
"w": 56,
"h": 78
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:30987a671771127a38491a588c465964:38b28effcfd5c6cbc0f358912a775af3:82e2a1f8afed29be57f6c2473f4c5be2$"
"smartupdate": "$TexturePacker:SmartUpdate:3f088913cab1db14067e247bd92e82ce:b32e1ef6ef289564b39fd326346002c6:82e2a1f8afed29be57f6c2473f4c5be2$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 918 B

View File

@ -4,8 +4,8 @@
"image": "ortega.png",
"format": "RGBA8888",
"size": {
"w": 69,
"h": 69
"w": 70,
"h": 70
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 47,
"h": 70
},
"spriteSourceSize": {
"x": 8,
"y": 10,
"w": 53,
"h": 69
"x": 0,
"y": 0,
"w": 47,
"h": 70
},
"frame": {
"x": 0,
"y": 0,
"w": 53,
"h": 69
"w": 47,
"h": 70
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:c6ff92d90ed884222095de81d1db9166:a91cf3c83a063f549c52afb42f7ba3b0:c3f9fcec121c8bc93f2b230b20b79c57$"
"smartupdate": "$TexturePacker:SmartUpdate:f69a1067315885ed736a07362122f371:717e3f134eb10424f0f0fa724500ba63:c3f9fcec121c8bc93f2b230b20b79c57$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 909 B

View File

@ -4,8 +4,8 @@
"image": "penny.png",
"format": "RGBA8888",
"size": {
"w": 75,
"h": 75
"w": 67,
"h": 67
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 30,
"h": 67
},
"spriteSourceSize": {
"x": 24,
"y": 4,
"w": 34,
"h": 75
"x": 0,
"y": 0,
"w": 30,
"h": 67
},
"frame": {
"x": 0,
"y": 0,
"w": 34,
"h": 75
"w": 30,
"h": 67
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:54f184bf1995a94a78aff33c9a851e6b:a6c9b3fe428b0cd0344b5cf14b999f36:cf221da9747cb8cb356053d3042d8d22$"
"smartupdate": "$TexturePacker:SmartUpdate:cb4d76912d528afe986ac5cad775f455:cc70d9738c9c7347b2ac9afec4ec9290:cf221da9747cb8cb356053d3042d8d22$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 955 B

After

Width:  |  Height:  |  Size: 739 B

View File

@ -4,30 +4,408 @@
"image": "plasma_grunt_f.png",
"format": "RGBA8888",
"size": {
"w": 75,
"h": 75
"w": 186,
"h": 186
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"filename": "0002.png",
"rotated": false,
"trimmed": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 21,
"y": 4,
"w": 37,
"h": 75
"x": 16,
"y": 31,
"w": 49,
"h": 49
},
"frame": {
"x": 0,
"y": 0,
"w": 37,
"h": 75
"w": 49,
"h": 49
}
},
{
"filename": "0003.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 16,
"y": 31,
"w": 49,
"h": 49
},
"frame": {
"x": 0,
"y": 0,
"w": 49,
"h": 49
}
},
{
"filename": "0015.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 46,
"h": 53
},
"frame": {
"x": 49,
"y": 0,
"w": 46,
"h": 53
}
},
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 45,
"h": 53
},
"frame": {
"x": 0,
"y": 49,
"w": 45,
"h": 53
}
},
{
"filename": "0017.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 45,
"h": 53
},
"frame": {
"x": 0,
"y": 49,
"w": 45,
"h": 53
}
},
{
"filename": "0018.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 45,
"h": 53
},
"frame": {
"x": 0,
"y": 49,
"w": 45,
"h": 53
}
},
{
"filename": "0019.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 45,
"h": 53
},
"frame": {
"x": 0,
"y": 49,
"w": 45,
"h": 53
}
},
{
"filename": "0004.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 15,
"y": 33,
"w": 50,
"h": 47
},
"frame": {
"x": 45,
"y": 53,
"w": 50,
"h": 47
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 15,
"y": 33,
"w": 50,
"h": 47
},
"frame": {
"x": 45,
"y": 53,
"w": 50,
"h": 47
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 15,
"y": 36,
"w": 50,
"h": 44
},
"frame": {
"x": 45,
"y": 100,
"w": 50,
"h": 44
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 15,
"y": 36,
"w": 50,
"h": 44
},
"frame": {
"x": 45,
"y": 100,
"w": 50,
"h": 44
}
},
{
"filename": "0016.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 45,
"h": 53
},
"frame": {
"x": 0,
"y": 102,
"w": 45,
"h": 53
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 15,
"y": 38,
"w": 50,
"h": 42
},
"frame": {
"x": 45,
"y": 144,
"w": 50,
"h": 42
}
},
{
"filename": "0009.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 15,
"y": 38,
"w": 50,
"h": 42
},
"frame": {
"x": 45,
"y": 144,
"w": 50,
"h": 42
}
},
{
"filename": "0013.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 43,
"h": 53
},
"frame": {
"x": 95,
"y": 0,
"w": 43,
"h": 53
}
},
{
"filename": "0014.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 27,
"w": 43,
"h": 53
},
"frame": {
"x": 95,
"y": 53,
"w": 43,
"h": 53
}
},
{
"filename": "0010.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 16,
"y": 31,
"w": 49,
"h": 49
},
"frame": {
"x": 95,
"y": 106,
"w": 49,
"h": 49
}
},
{
"filename": "0011.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 16,
"y": 31,
"w": 49,
"h": 49
},
"frame": {
"x": 95,
"y": 106,
"w": 49,
"h": 49
}
},
{
"filename": "0012.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 16,
"y": 29,
"w": 46,
"h": 51
},
"frame": {
"x": 138,
"y": 0,
"w": 46,
"h": 51
}
}
]
@ -36,6 +414,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:c3001e18f1878c01a4825697200e823e:2003e0d4db249f7020c3471872198ac8:b01645b9e941158814978f2126e7e995$"
"smartupdate": "$TexturePacker:SmartUpdate:e8e867ad78b993918fba435e10511740:758a95ecd97e2607ff6ab81f85e665e6:b01645b9e941158814978f2126e7e995$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -4,30 +4,555 @@
"image": "plasma_grunt_m.png",
"format": "RGBA8888",
"size": {
"w": 72,
"h": 72
"w": 262,
"h": 262
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"filename": "0021.png",
"rotated": false,
"trimmed": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 13,
"y": 11,
"w": 54,
"h": 69
},
"frame": {
"x": 0,
"y": 0,
"w": 54,
"h": 69
}
},
{
"filename": "0022.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 13,
"y": 11,
"w": 54,
"h": 69
},
"frame": {
"x": 0,
"y": 0,
"w": 54,
"h": 69
}
},
{
"filename": "0023.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 16,
"y": 7,
"w": 47,
"h": 72
"y": 11,
"w": 51,
"h": 69
},
"frame": {
"x": 0,
"y": 69,
"w": 51,
"h": 69
}
},
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 0,
"y": 138,
"w": 50,
"h": 69
}
},
{
"filename": "0024.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 0,
"y": 138,
"w": 50,
"h": 69
}
},
{
"filename": "0025.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 0,
"y": 138,
"w": 50,
"h": 69
}
},
{
"filename": "0026.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 0,
"y": 138,
"w": 50,
"h": 69
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 50,
"y": 138,
"w": 50,
"h": 69
}
},
{
"filename": "0003.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 50,
"y": 138,
"w": 50,
"h": 69
}
},
{
"filename": "0016.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 51,
"y": 69,
"w": 50,
"h": 69
}
},
{
"filename": "0017.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 54,
"y": 0,
"w": 47,
"h": 72
"w": 50,
"h": 69
}
},
{
"filename": "0018.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 17,
"y": 11,
"w": 50,
"h": 69
},
"frame": {
"x": 54,
"y": 0,
"w": 50,
"h": 69
}
},
{
"filename": "0019.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 18,
"y": 11,
"w": 49,
"h": 69
},
"frame": {
"x": 100,
"y": 138,
"w": 49,
"h": 69
}
},
{
"filename": "0020.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 18,
"y": 11,
"w": 49,
"h": 69
},
"frame": {
"x": 100,
"y": 138,
"w": 49,
"h": 69
}
},
{
"filename": "0004.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 14,
"y": 13,
"w": 52,
"h": 67
},
"frame": {
"x": 101,
"y": 69,
"w": 52,
"h": 67
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 14,
"y": 13,
"w": 52,
"h": 67
},
"frame": {
"x": 101,
"y": 69,
"w": 52,
"h": 67
}
},
{
"filename": "0015.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 14,
"y": 13,
"w": 52,
"h": 67
},
"frame": {
"x": 104,
"y": 0,
"w": 52,
"h": 67
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 156,
"y": 0,
"w": 53,
"h": 65
}
},
{
"filename": "0007.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 156,
"y": 0,
"w": 53,
"h": 65
}
},
{
"filename": "0008.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 209,
"y": 0,
"w": 53,
"h": 65
}
},
{
"filename": "0009.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 156,
"y": 65,
"w": 53,
"h": 65
}
},
{
"filename": "0010.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 209,
"y": 65,
"w": 53,
"h": 65
}
},
{
"filename": "0011.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 153,
"y": 130,
"w": 53,
"h": 65
}
},
{
"filename": "0012.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 149,
"y": 195,
"w": 53,
"h": 65
}
},
{
"filename": "0013.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 202,
"y": 195,
"w": 53,
"h": 65
}
},
{
"filename": "0014.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 80,
"h": 80
},
"spriteSourceSize": {
"x": 12,
"y": 15,
"w": 53,
"h": 65
},
"frame": {
"x": 206,
"y": 130,
"w": 53,
"h": 65
}
}
]
@ -36,6 +561,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:61f195ebbcde93ab7442408edad7fe7a:28ae203b3cb42a94c4ba4420fdebdccc:9ae0ee174d431d48052a2f6b74e9d40c$"
"smartupdate": "$TexturePacker:SmartUpdate:8e214218a81b826b2cecce3e41f6eee8:2b88638dcf4559e6aad7c14cd730b7c3:9ae0ee174d431d48052a2f6b74e9d40c$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 914 B

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -4,8 +4,8 @@
"image": "plumeria.png",
"format": "RGBA8888",
"size": {
"w": 72,
"h": 72
"w": 76,
"h": 76
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 40,
"h": 76
},
"spriteSourceSize": {
"x": 23,
"y": 7,
"w": 36,
"h": 72
"x": 0,
"y": 0,
"w": 40,
"h": 76
},
"frame": {
"x": 0,
"y": 0,
"w": 36,
"h": 72
"w": 40,
"h": 76
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:5527e7b646932d429928b53f055e9d27:c0640510780d2974f9b74a7f8e6b29aa:7bfec029bae78c9d483f59c35b73afad$"
"smartupdate": "$TexturePacker:SmartUpdate:d0e080a4dcc30b39616c49dfd96c98f7:47c6a714be68fabdf11801166e154db6:7bfec029bae78c9d483f59c35b73afad$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 934 B

After

Width:  |  Height:  |  Size: 835 B

View File

@ -4,8 +4,8 @@
"image": "rose.png",
"format": "RGBA8888",
"size": {
"w": 79,
"h": 79
"w": 77,
"h": 77
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 31,
"h": 77
},
"spriteSourceSize": {
"x": 16,
"y": 1,
"w": 52,
"h": 79
"x": 0,
"y": 0,
"w": 31,
"h": 77
},
"frame": {
"x": 0,
"y": 0,
"w": 52,
"h": 79
"w": 31,
"h": 77
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:2b4ccaff7255c7d72661eac13de83ff8:72ee3660cdf470bd67375d355307e19d:8d35b104fc841baa4443581e6cea979e$"
"smartupdate": "$TexturePacker:SmartUpdate:be2215e7232e2260242613e54c91c3c4:852fb3fda379db104106f8888649d9d5:8d35b104fc841baa4443581e6cea979e$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 750 B

View File

@ -4,8 +4,8 @@
"image": "shelly.png",
"format": "RGBA8888",
"size": {
"w": 80,
"h": 80
"w": 78,
"h": 78
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 45,
"h": 78
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 80,
"h": 80
"w": 45,
"h": 78
},
"frame": {
"x": 0,
"y": 0,
"w": 80,
"h": 80
"w": 45,
"h": 78
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:831f5748dad92911b10a1cb358ee2dae:a3bf81bbaa3b49cad5e0e549cf94563b:bb6befc9383c9c08837183ae2a7a80c1$"
"smartupdate": "$TexturePacker:SmartUpdate:601dbcee82b14bde5072df26ddd7d684:a0d576e65d8e3ff549dde75f0a82bc94:a277ff67eb669e1dac57ad29940004ac$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 985 B

After

Width:  |  Height:  |  Size: 898 B

View File

@ -4,8 +4,8 @@
"image": "skull_grunt_f.png",
"format": "RGBA8888",
"size": {
"w": 74,
"h": 74
"w": 69,
"h": 69
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 31,
"h": 74
"w": 44,
"h": 69
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 31,
"h": 74
"w": 44,
"h": 69
},
"frame": {
"x": 0,
"y": 0,
"w": 31,
"h": 74
"w": 44,
"h": 69
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:71a1f5b1981674c6e81163ac8ea576c3:a5e612d58e5f0a1489e111212baea09d:dd369353af16e4c5eb6547e129dfac18$"
"smartupdate": "$TexturePacker:SmartUpdate:b9685517b9674887653c84a03f3781c0:894dcd88bf117d48750df82b7bfac644:9035f560a0ab0d45bcc084aba7172990$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 729 B

View File

@ -4,8 +4,8 @@
"image": "skull_grunt_m.png",
"format": "RGBA8888",
"size": {
"w": 72,
"h": 72
"w": 64,
"h": 64
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 51,
"h": 72
"w": 39,
"h": 64
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 51,
"h": 72
"w": 39,
"h": 64
},
"frame": {
"x": 0,
"y": 0,
"w": 51,
"h": 72
"w": 39,
"h": 64
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:4deb2a68e4d168bb1a40cb5d190a7d1f:be3d7b29f4b544ba51cf907691fef51d:df57ca2c9bf5f80d930306e15a851d4d$"
"smartupdate": "$TexturePacker:SmartUpdate:c39ac1d47c8cbe300cffe98bda48c590:b400e0c6286f0e20dfbc383f7453e35b:1ff10b395daf6ebfa377680a6404f816$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 966 B

After

Width:  |  Height:  |  Size: 700 B

View File

@ -14,12 +14,12 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 30,
"h": 68
},
"spriteSourceSize": {
"x": 24,
"y": 11,
"x": 0,
"y": 0,
"w": 30,
"h": 68
},
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:b542a1bdd6995584fc776f75d578b434:f03fddece4494ab59698002fe6671972:c6f0e54e24ec5ffaa711700431b1955e$"
"smartupdate": "$TexturePacker:SmartUpdate:a5493363086a57d0f145cf61c42475de:2e4d3b330bb89e05e93f34d605eee203:c6f0e54e24ec5ffaa711700431b1955e$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 936 B

View File

@ -4,8 +4,8 @@
"image": "star_grunt_m.png",
"format": "RGBA8888",
"size": {
"w": 70,
"h": 70
"w": 64,
"h": 64
},
"scale": 1,
"frames": [
@ -14,20 +14,20 @@
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 80,
"h": 80
"w": 36,
"h": 64
},
"spriteSourceSize": {
"x": 24,
"y": 9,
"w": 31,
"h": 70
"x": 0,
"y": 0,
"w": 36,
"h": 64
},
"frame": {
"x": 0,
"y": 0,
"w": 31,
"h": 70
"w": 36,
"h": 64
}
}
]
@ -36,6 +36,6 @@
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:abc4b0424c37fd55a2bf2e9f5142adce:41a140aa68a1eda61d9a00cab4e07721:a0796711f9e0333796b6629cd43ff8e8$"
"smartupdate": "$TexturePacker:SmartUpdate:11da63c3829d44356a3c26d094212d64:45ebf021548ac0e12b6f25093c5bf0db:a0796711f9e0333796b6629cd43ff8e8$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 755 B

View File

@ -11,8 +11,8 @@ export function initLoggedInUser(): void {
loggedInUser = { username: "Guest", lastSessionSlot: -1, discordId: "", googleId: "", hasAdminRole: false };
}
export function updateUserInfo(): Promise<[boolean, integer]> {
return new Promise<[boolean, integer]>(resolve => {
export function updateUserInfo(): Promise<[boolean, number]> {
return new Promise<[boolean, number]>(resolve => {
if (bypassLogin) {
loggedInUser = { username: "Guest", lastSessionSlot: -1, discordId: "", googleId: "", hasAdminRole: false };
let lastSessionSlot = -1;

View File

@ -118,7 +118,7 @@ export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
const DEBUG_RNG = false;
const OPP_IVS_OVERRIDE_VALIDATED : integer[] = (
const OPP_IVS_OVERRIDE_VALIDATED : number[] = (
Array.isArray(Overrides.OPP_IVS_OVERRIDE) ?
Overrides.OPP_IVS_OVERRIDE :
new Array(6).fill(Overrides.OPP_IVS_OVERRIDE)
@ -134,7 +134,7 @@ interface StarterColors {
}
export interface PokeballCounts {
[pb: string]: integer;
[pb: string]: number;
}
export type AnySound = Phaser.Sound.WebAudioSound | Phaser.Sound.HTML5AudioSound | Phaser.Sound.NoAudioSound;
@ -149,15 +149,15 @@ export default class BattleScene extends SceneBase {
public inputController: InputsController;
public uiInputs: UiInputs;
public sessionPlayTime: integer | null = null;
public lastSavePlayTime: integer | null = null;
public sessionPlayTime: number | null = null;
public lastSavePlayTime: number | null = null;
public masterVolume: number = 0.5;
public bgmVolume: number = 1;
public fieldVolume: number = 1;
public seVolume: number = 1;
public uiVolume: number = 1;
public gameSpeed: integer = 1;
public damageNumbersMode: integer = 0;
public gameSpeed: number = 1;
public damageNumbersMode: number = 0;
public reroll: boolean = false;
public shopCursorTarget: number = ShopCursorTarget.REWARDS;
public commandCursorMemory: boolean = false;
@ -176,16 +176,16 @@ export default class BattleScene extends SceneBase {
* - 1 = 'Passives Only'
* - 2 = 'On'
*/
public candyUpgradeNotification: integer = 0;
public candyUpgradeNotification: number = 0;
/**
* Determines what type of notification is used for Candy Upgrades
* - 0 = 'Icon'
* - 1 = 'Animation'
*/
public candyUpgradeDisplay: integer = 0;
public candyUpgradeDisplay: number = 0;
public moneyFormat: MoneyFormat = MoneyFormat.NORMAL;
public uiTheme: UiTheme = UiTheme.DEFAULT;
public windowType: integer = 0;
public windowType: number = 0;
public experimentalSprites: boolean = false;
public musicPreference: number = MusicPreference.ALLGENS;
public moveAnimations: boolean = true;
@ -212,7 +212,7 @@ export default class BattleScene extends SceneBase {
* @default 0 - Uses the default normal experience gain display.
*/
public expParty: ExpNotification = 0;
public hpBarSpeed: integer = 0;
public hpBarSpeed: number = 0;
public fusionPaletteSwaps: boolean = true;
public enableTouchControls: boolean = false;
public enableVibration: boolean = false;
@ -223,7 +223,7 @@ export default class BattleScene extends SceneBase {
* - 0 = 'Switch'
* - 1 = 'Set' - The option to switch the active pokemon at the start of a battle will not display.
*/
public battleStyle: integer = BattleStyle.SWITCH;
public battleStyle: number = BattleStyle.SWITCH;
/**
* Defines whether or not to show type effectiveness hints
@ -235,7 +235,7 @@ export default class BattleScene extends SceneBase {
public disableMenu: boolean = false;
public gameData: GameData;
public sessionSlotId: integer;
public sessionSlotId: number;
/** PhaseQueue: dequeue/remove the first element to get the next phase */
public phaseQueue: Phase[];
@ -244,7 +244,7 @@ export default class BattleScene extends SceneBase {
private phaseQueuePrepend: Phase[];
/** overrides default of inserting phases to end of phaseQueuePrepend array, useful or inserting Phases "out of order" */
private phaseQueuePrependSpliceIndex: integer;
private phaseQueuePrependSpliceIndex: number;
private nextCommandPhaseQueue: Phase[];
private currentPhase: Phase | null;
@ -265,13 +265,13 @@ export default class BattleScene extends SceneBase {
public arenaNextEnemy: ArenaBase;
public arena: Arena;
public gameMode: GameMode;
public score: integer;
public score: number;
public lockModifierTiers: boolean;
public trainer: Phaser.GameObjects.Sprite;
public lastEnemyTrainer: Trainer | null;
public currentBattle: Battle;
public pokeballCounts: PokeballCounts;
public money: integer;
public money: number;
public pokemonInfoContainer: PokemonInfoContainer;
private party: PlayerPokemon[];
/** Session save data that pertains to Mystery Encounters */
@ -300,7 +300,7 @@ export default class BattleScene extends SceneBase {
public seed: string;
public waveSeed: string;
public waveCycleOffset: integer;
public waveCycleOffset: number;
public offsetGym: boolean;
public damageNumberHandler: DamageNumberHandler;
@ -314,9 +314,9 @@ export default class BattleScene extends SceneBase {
private bgmCache: Set<string> = new Set();
private playTimeTimer: Phaser.Time.TimerEvent;
public rngCounter: integer = 0;
public rngCounter: number = 0;
public rngSeedOverride: string = "";
public rngOffset: integer = 0;
public rngOffset: number = 0;
public inputMethod: string;
private infoToggles: InfoToggle[] = [];
@ -717,7 +717,7 @@ export default class BattleScene extends SceneBase {
const traverseVariantData = (keys: string[]) => {
let variantTree = variantData;
let expTree = expVariantData;
keys.map((k: string, i: integer) => {
keys.map((k: string, i: number) => {
if (i < keys.length - 1) {
variantTree = variantTree[k];
expTree = expTree[k];
@ -926,12 +926,12 @@ export default class BattleScene extends SceneBase {
return activeOnly ? this.infoToggles.filter(t => t?.isActive()) : this.infoToggles;
}
getPokemonById(pokemonId: integer): Pokemon | null {
getPokemonById(pokemonId: number): Pokemon | null {
const findInParty = (party: Pokemon[]) => party.find(p => p.id === pokemonId);
return (findInParty(this.getPlayerParty()) || findInParty(this.getEnemyParty())) ?? null;
}
addPlayerPokemon(species: PokemonSpecies, level: integer, abilityIndex?: integer, formIndex?: integer, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: integer[], nature?: Nature, dataSource?: Pokemon | PokemonData, postProcess?: (playerPokemon: PlayerPokemon) => void): PlayerPokemon {
addPlayerPokemon(species: PokemonSpecies, level: number, abilityIndex?: number, formIndex?: number, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: number[], nature?: Nature, dataSource?: Pokemon | PokemonData, postProcess?: (playerPokemon: PlayerPokemon) => void): PlayerPokemon {
const pokemon = new PlayerPokemon(species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource);
if (postProcess) {
postProcess(pokemon);
@ -940,7 +940,7 @@ export default class BattleScene extends SceneBase {
return pokemon;
}
addEnemyPokemon(species: PokemonSpecies, level: integer, trainerSlot: TrainerSlot, boss: boolean = false, shinyLock: boolean = false, dataSource?: PokemonData, postProcess?: (enemyPokemon: EnemyPokemon) => void): EnemyPokemon {
addEnemyPokemon(species: PokemonSpecies, level: number, trainerSlot: TrainerSlot, boss: boolean = false, shinyLock: boolean = false, dataSource?: PokemonData, postProcess?: (enemyPokemon: EnemyPokemon) => void): EnemyPokemon {
if (Overrides.OPP_LEVEL_OVERRIDE > 0) {
level = Overrides.OPP_LEVEL_OVERRIDE;
}
@ -1092,7 +1092,7 @@ export default class BattleScene extends SceneBase {
* @param min The minimum integer to pick, default `0`
* @returns A random integer between {@linkcode min} and ({@linkcode min} + {@linkcode range} - 1)
*/
randBattleSeedInt(range: integer, min: integer = 0): integer {
randBattleSeedInt(range: number, min: number = 0): number {
return this.currentBattle?.randSeedInt(range, min);
}
@ -1217,7 +1217,7 @@ export default class BattleScene extends SceneBase {
return Math.max(doubleChance.value, 1);
}
newBattle(waveIndex?: integer, battleType?: BattleType, trainerData?: TrainerData, double?: boolean, mysteryEncounterType?: MysteryEncounterType): Battle | null {
newBattle(waveIndex?: number, battleType?: BattleType, trainerData?: TrainerData, double?: boolean, mysteryEncounterType?: MysteryEncounterType): Battle | null {
const _startingWave = Overrides.STARTING_WAVE_OVERRIDE || startingWave;
const newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (_startingWave - 1)) + 1);
let newDouble: boolean | undefined;
@ -1443,7 +1443,7 @@ export default class BattleScene extends SceneBase {
});
}
getSpeciesFormIndex(species: PokemonSpecies, gender?: Gender, nature?: Nature, ignoreArena?: boolean): integer {
getSpeciesFormIndex(species: PokemonSpecies, gender?: Gender, nature?: Nature, ignoreArena?: boolean): number {
if (!species.forms?.length) {
return 0;
}
@ -1540,7 +1540,7 @@ export default class BattleScene extends SceneBase {
return ret;
}
private getGeneratedWaveCycleOffset(): integer {
private getGeneratedWaveCycleOffset(): number {
let ret = 0;
this.executeWithSeedOffset(() => {
ret = Utils.randSeedInt(8) * 5;
@ -1548,7 +1548,7 @@ export default class BattleScene extends SceneBase {
return ret;
}
getEncounterBossSegments(waveIndex: integer, level: integer, species?: PokemonSpecies, forceBoss: boolean = false): integer {
getEncounterBossSegments(waveIndex: number, level: number, species?: PokemonSpecies, forceBoss: boolean = false): number {
if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE > 1) {
return Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE;
} else if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE === 1) {
@ -1572,7 +1572,7 @@ export default class BattleScene extends SceneBase {
return 0;
}
let ret: integer = 2;
let ret: number = 2;
if (level >= 100) {
ret++;
@ -1589,7 +1589,7 @@ export default class BattleScene extends SceneBase {
trySpreadPokerus(): void {
const party = this.getPlayerParty();
const infectedIndexes: integer[] = [];
const infectedIndexes: number[] = [];
const spread = (index: number, spreadTo: number) => {
const partyMember = party[index + spreadTo];
if (!partyMember.pokerus && !Utils.randSeedInt(10)) {
@ -1613,7 +1613,7 @@ export default class BattleScene extends SceneBase {
});
}
resetSeed(waveIndex?: integer): void {
resetSeed(waveIndex?: number): void {
const wave = waveIndex || this.currentBattle?.waveIndex || 0;
this.waveSeed = Utils.shiftCharCodes(this.seed, wave);
Phaser.Math.RND.sow([ this.waveSeed ]);
@ -1621,7 +1621,7 @@ export default class BattleScene extends SceneBase {
this.rngCounter = 0;
}
executeWithSeedOffset(func: Function, offset: integer, seedOverride?: string): void {
executeWithSeedOffset(func: Function, offset: number, seedOverride?: string): void {
if (!func) {
return;
}
@ -1669,7 +1669,7 @@ export default class BattleScene extends SceneBase {
this.arenaFlyout.toggleFlyout(pressed);
}
showFieldOverlay(duration: integer): Promise<void> {
showFieldOverlay(duration: number): Promise<void> {
return new Promise(resolve => {
this.tweens.add({
targets: this.fieldOverlay,
@ -1681,7 +1681,7 @@ export default class BattleScene extends SceneBase {
});
}
hideFieldOverlay(duration: integer): Promise<void> {
hideFieldOverlay(duration: number): Promise<void> {
return new Promise(resolve => {
this.tweens.add({
targets: this.fieldOverlay,
@ -1701,7 +1701,7 @@ export default class BattleScene extends SceneBase {
}
}
showShopOverlay(duration: integer): Promise<void> {
showShopOverlay(duration: number): Promise<void> {
this.shopOverlayShown = true;
return new Promise(resolve => {
this.tweens.add({
@ -1714,7 +1714,7 @@ export default class BattleScene extends SceneBase {
});
}
hideShopOverlay(duration: integer): Promise<void> {
hideShopOverlay(duration: number): Promise<void> {
this.shopOverlayShown = false;
return new Promise(resolve => {
this.tweens.add({
@ -1803,7 +1803,7 @@ export default class BattleScene extends SceneBase {
});
}
hideLuckText(duration: integer): void {
hideLuckText(duration: number): void {
if (this.reroll) {
return;
}
@ -1843,7 +1843,7 @@ export default class BattleScene extends SceneBase {
}
addFaintedEnemyScore(enemy: EnemyPokemon): void {
let scoreIncrease = enemy.getSpeciesForm().getBaseExp() * (enemy.level / this.getMaxExpLevel()) * ((enemy.ivs.reduce((iv: integer, total: integer) => total += iv, 0) / 93) * 0.2 + 0.8);
let scoreIncrease = enemy.getSpeciesForm().getBaseExp() * (enemy.level / this.getMaxExpLevel()) * ((enemy.ivs.reduce((iv: number, total: number) => total += iv, 0) / 93) * 0.2 + 0.8);
this.findModifiers(m => m instanceof PokemonHeldItemModifier && m.pokemonId === enemy.id, false).map(m => scoreIncrease *= (m as PokemonHeldItemModifier).getScoreMultiplier());
if (enemy.isBoss()) {
scoreIncrease *= Math.sqrt(enemy.bossSegments);
@ -1851,7 +1851,7 @@ export default class BattleScene extends SceneBase {
this.currentBattle.battleScore += Math.ceil(scoreIncrease);
}
getMaxExpLevel(ignoreLevelCap: boolean = false): integer {
getMaxExpLevel(ignoreLevelCap: boolean = false): number {
if (Overrides.LEVEL_CAP_OVERRIDE > 0) {
return Overrides.LEVEL_CAP_OVERRIDE;
} else if (ignoreLevelCap || Overrides.LEVEL_CAP_OVERRIDE < 0) {
@ -1863,7 +1863,7 @@ export default class BattleScene extends SceneBase {
return Math.ceil(baseLevel / 2) * 2 + 2;
}
randomSpecies(waveIndex: integer, level: integer, fromArenaPool?: boolean, speciesFilter?: PokemonSpeciesFilter, filterAllEvolutions?: boolean): PokemonSpecies {
randomSpecies(waveIndex: number, level: number, fromArenaPool?: boolean, speciesFilter?: PokemonSpeciesFilter, filterAllEvolutions?: boolean): PokemonSpecies {
if (fromArenaPool) {
return this.arena.randomSpecies(waveIndex, level, undefined, getPartyLuckValue(this.party));
}
@ -1878,13 +1878,13 @@ export default class BattleScene extends SceneBase {
return filteredSpecies[Utils.randSeedInt(filteredSpecies.length)];
}
generateRandomBiome(waveIndex: integer): Biome {
generateRandomBiome(waveIndex: number): Biome {
const relWave = waveIndex % 250;
const biomes = Utils.getEnumValues(Biome).filter(b => b !== Biome.TOWN && b !== Biome.END);
const maxDepth = biomeDepths[Biome.END][0] - 2;
const depthWeights = new Array(maxDepth + 1).fill(null)
.map((_, i: integer) => ((1 - Math.min(Math.abs((i / (maxDepth - 1)) - (relWave / 250)) + 0.25, 1)) / 0.75) * 250);
const biomeThresholds: integer[] = [];
.map((_, i: number) => ((1 - Math.min(Math.abs((i / (maxDepth - 1)) - (relWave / 250)) + 0.25, 1)) / 0.75) * 250);
const biomeThresholds: number[] = [];
let totalWeight = 0;
for (const biome of biomes) {
totalWeight += Math.ceil(depthWeights[biomeDepths[biome][0] - 1] / biomeDepths[biome][1]);
@ -2008,7 +2008,7 @@ export default class BattleScene extends SceneBase {
}
}
fadeOutBgm(duration: integer = 500, destroy: boolean = true): boolean {
fadeOutBgm(duration: number = 500, destroy: boolean = true): boolean {
if (!this.bgm) {
return false;
}
@ -2075,7 +2075,7 @@ export default class BattleScene extends SceneBase {
}
}
playSoundWithoutBgm(soundName: string, pauseDuration?: integer): AnySound {
playSoundWithoutBgm(soundName: string, pauseDuration?: number): AnySound {
this.bgmCache.add(soundName);
const resumeBgm = this.pauseBgm();
this.playSound(soundName);
@ -2535,7 +2535,7 @@ export default class BattleScene extends SceneBase {
* @param promptDelay optional param for MessagePhase constructor
* @param defer boolean for which queue to add it to, false -> add to PhaseQueuePrepend, true -> nextCommandPhaseQueue
*/
queueMessage(message: string, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null, defer?: boolean | null) {
queueMessage(message: string, callbackDelay?: number | null, prompt?: boolean | null, promptDelay?: number | null, defer?: boolean | null) {
const phase = new MessagePhase(message, callbackDelay, prompt, promptDelay);
if (!defer) {
// adds to the end of PhaseQueuePrepend
@ -2557,14 +2557,14 @@ export default class BattleScene extends SceneBase {
this.phaseQueue.push(new TurnInitPhase());
}
addMoney(amount: integer): void {
addMoney(amount: number): void {
this.money = Math.min(this.money + amount, Number.MAX_SAFE_INTEGER);
this.updateMoneyText();
this.animateMoneyChanged(true);
this.validateAchvs(MoneyAchv);
}
getWaveMoneyAmount(moneyMultiplier: number): integer {
getWaveMoneyAmount(moneyMultiplier: number): number {
const waveIndex = this.currentBattle.waveIndex;
const waveSetIndex = Math.ceil(waveIndex / 10) - 1;
const moneyValue = Math.pow((waveSetIndex + 1 + (0.75 + (((waveIndex - 1) % 10) + 1) / 10)) * 100, 1 + 0.005 * waveSetIndex) * moneyMultiplier;
@ -2761,7 +2761,7 @@ export default class BattleScene extends SceneBase {
});
}
removePartyMemberModifiers(partyMemberIndex: integer): Promise<void> {
removePartyMemberModifiers(partyMemberIndex: number): Promise<void> {
return new Promise(resolve => {
const pokemonId = this.getPlayerParty()[partyMemberIndex].id;
const modifiersToRemove = this.modifiers.filter(m => m instanceof PokemonHeldItemModifier && (m as PokemonHeldItemModifier).pokemonId === pokemonId);
@ -2793,7 +2793,7 @@ export default class BattleScene extends SceneBase {
}
}
party.forEach((enemyPokemon: EnemyPokemon, i: integer) => {
party.forEach((enemyPokemon: EnemyPokemon, i: number) => {
if (heldModifiersConfigs && i < heldModifiersConfigs.length && heldModifiersConfigs[i]) {
heldModifiersConfigs[i].forEach(mt => {
let modifier: PokemonHeldItemModifier;

View File

@ -52,13 +52,13 @@ export class Ability implements Localizable {
private nameAppend: string;
public name: string;
public description: string;
public generation: integer;
public generation: number;
public isBypassFaint: boolean;
public isIgnorable: boolean;
public attrs: AbAttr[];
public conditions: AbAttrCondition[];
constructor(id: Abilities, generation: integer) {
constructor(id: Abilities, generation: number) {
this.id = id;
this.nameAppend = "";
@ -231,9 +231,9 @@ export class PostBattleInitAbAttr extends AbAttr {
}
export class PostBattleInitFormChangeAbAttr extends PostBattleInitAbAttr {
private formFunc: (p: Pokemon) => integer;
private formFunc: (p: Pokemon) => number;
constructor(formFunc: ((p: Pokemon) => integer)) {
constructor(formFunc: ((p: Pokemon) => number)) {
super(true);
this.formFunc = formFunc;
@ -503,9 +503,9 @@ class TypeImmunityStatStageChangeAbAttr extends TypeImmunityAbAttr {
class TypeImmunityAddBattlerTagAbAttr extends TypeImmunityAbAttr {
private tagType: BattlerTagType;
private turnCount: integer;
private turnCount: number;
constructor(immuneType: Type, tagType: BattlerTagType, turnCount: integer, condition?: AbAttrCondition) {
constructor(immuneType: Type, tagType: BattlerTagType, turnCount: number, condition?: AbAttrCondition) {
super(immuneType, condition);
this.tagType = tagType;
@ -613,11 +613,11 @@ export class FieldPriorityMoveImmunityAbAttr extends PreDefendAbAttr {
}
export class PostStatStageChangeAbAttr extends AbAttr {
canApplyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: integer, selfTarget: boolean, args: any[]): boolean {
canApplyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: number, selfTarget: boolean, args: any[]): boolean {
return true;
}
applyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: integer, selfTarget: boolean, args: any[]): boolean | Promise<boolean> {
applyPostStatStageChange(pokemon: Pokemon, simulated: boolean, statsChanged: BattleStat[], stagesChanged: number, selfTarget: boolean, args: any[]): boolean | Promise<boolean> {
return false;
}
}
@ -882,10 +882,10 @@ export class PostDefendTerrainChangeAbAttr extends PostDefendAbAttr {
}
export class PostDefendContactApplyStatusEffectAbAttr extends PostDefendAbAttr {
public chance: integer;
public chance: number;
private effects: StatusEffect[];
constructor(chance: integer, ...effects: StatusEffect[]) {
constructor(chance: number, ...effects: StatusEffect[]) {
super();
this.chance = chance;
@ -921,11 +921,11 @@ export class EffectSporeAbAttr extends PostDefendContactApplyStatusEffectAbAttr
}
export class PostDefendContactApplyTagChanceAbAttr extends PostDefendAbAttr {
private chance: integer;
private chance: number;
private tagType: BattlerTagType;
private turnCount: integer | undefined;
private turnCount: number | undefined;
constructor(chance: integer, tagType: BattlerTagType, turnCount?: integer) {
constructor(chance: number, tagType: BattlerTagType, turnCount?: number) {
super();
this.tagType = tagType;
@ -976,9 +976,9 @@ export class PostDefendCritStatStageChangeAbAttr extends PostDefendAbAttr {
}
export class PostDefendContactDamageAbAttr extends PostDefendAbAttr {
private damageRatio: integer;
private damageRatio: number;
constructor(damageRatio: integer) {
constructor(damageRatio: number) {
super();
this.damageRatio = damageRatio;
@ -1010,9 +1010,9 @@ export class PostDefendContactDamageAbAttr extends PostDefendAbAttr {
* @extends {PostDefendAbAttr}
*/
export class PostDefendPerishSongAbAttr extends PostDefendAbAttr {
private turns: integer;
private turns: number;
constructor(turns: integer) {
constructor(turns: number) {
super();
this.turns = turns;
@ -1113,11 +1113,11 @@ export class PostDefendAbilityGiveAbAttr extends PostDefendAbAttr {
}
export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr {
private chance: integer;
private chance: number;
private attacker: Pokemon;
private move: Move;
constructor(chance: integer) {
constructor(chance: number) {
super();
this.chance = chance;
@ -1705,10 +1705,10 @@ export class PostAttackStealHeldItemAbAttr extends PostAttackAbAttr {
export class PostAttackApplyStatusEffectAbAttr extends PostAttackAbAttr {
private contactRequired: boolean;
private chance: integer;
private chance: number;
private effects: StatusEffect[];
constructor(contactRequired: boolean, chance: integer, ...effects: StatusEffect[]) {
constructor(contactRequired: boolean, chance: number, ...effects: StatusEffect[]) {
super();
this.contactRequired = contactRequired;
@ -1737,18 +1737,18 @@ export class PostAttackApplyStatusEffectAbAttr extends PostAttackAbAttr {
}
export class PostAttackContactApplyStatusEffectAbAttr extends PostAttackApplyStatusEffectAbAttr {
constructor(chance: integer, ...effects: StatusEffect[]) {
constructor(chance: number, ...effects: StatusEffect[]) {
super(true, chance, ...effects);
}
}
export class PostAttackApplyBattlerTagAbAttr extends PostAttackAbAttr {
private contactRequired: boolean;
private chance: (user: Pokemon, target: Pokemon, move: Move) => integer;
private chance: (user: Pokemon, target: Pokemon, move: Move) => number;
private effects: BattlerTagType[];
constructor(contactRequired: boolean, chance: (user: Pokemon, target: Pokemon, move: Move) => integer, ...effects: BattlerTagType[]) {
constructor(contactRequired: boolean, chance: (user: Pokemon, target: Pokemon, move: Move) => number, ...effects: BattlerTagType[]) {
super();
this.contactRequired = contactRequired;
@ -1895,9 +1895,9 @@ class PostVictoryStatStageChangeAbAttr extends PostVictoryAbAttr {
}
export class PostVictoryFormChangeAbAttr extends PostVictoryAbAttr {
private formFunc: (p: Pokemon) => integer;
private formFunc: (p: Pokemon) => number;
constructor(formFunc: ((p: Pokemon) => integer)) {
constructor(formFunc: ((p: Pokemon) => number)) {
super(true);
this.formFunc = formFunc;
@ -2122,9 +2122,9 @@ export class PostSummonUnnamedMessageAbAttr extends PostSummonAbAttr {
export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr {
private tagType: BattlerTagType;
private turnCount: integer;
private turnCount: number;
constructor(tagType: BattlerTagType, turnCount: integer, showAbility?: boolean) {
constructor(tagType: BattlerTagType, turnCount: number, showAbility?: boolean) {
super(showAbility);
this.tagType = tagType;
@ -2252,9 +2252,9 @@ export class PostSummonClearAllyStatStagesAbAttr extends PostSummonAbAttr {
* @see {applyPostSummon}
*/
export class DownloadAbAttr extends PostSummonAbAttr {
private enemyDef: integer;
private enemySpDef: integer;
private enemyCountTally: integer;
private enemyDef: number;
private enemySpDef: number;
private enemyCountTally: number;
private stats: BattleStat[];
canApplyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
@ -2338,9 +2338,9 @@ export class PostSummonTerrainChangeAbAttr extends PostSummonAbAttr {
}
export class PostSummonFormChangeAbAttr extends PostSummonAbAttr {
private formFunc: (p: Pokemon) => integer;
private formFunc: (p: Pokemon) => number;
constructor(formFunc: ((p: Pokemon) => integer)) {
constructor(formFunc: ((p: Pokemon) => number)) {
super(true);
this.formFunc = formFunc;
@ -2779,9 +2779,9 @@ export class PreSwitchOutHealAbAttr extends PreSwitchOutAbAttr {
* @see {@linkcode applyPreSwitchOut}
*/
export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr {
private formFunc: (p: Pokemon) => integer;
private formFunc: (p: Pokemon) => number;
constructor(formFunc: ((p: Pokemon) => integer)) {
constructor(formFunc: ((p: Pokemon) => number)) {
super();
this.formFunc = formFunc;
@ -2925,7 +2925,7 @@ export class PreSetStatusEffectImmunityAbAttr extends PreSetStatusAbAttr {
}
canApplyPreSetStatus(pokemon: Pokemon, passive: boolean, simulated: boolean, effect: StatusEffect, cancelled: Utils.BooleanHolder, args: any[]): boolean {
return this.immuneEffects.length < 1 || this.immuneEffects.includes(effect);
return effect !== StatusEffect.FAINT && this.immuneEffects.length < 1 || this.immuneEffects.includes(effect);
}
/**
@ -3431,10 +3431,10 @@ export class PostWeatherChangeFormChangeAbAttr extends PostWeatherChangeAbAttr {
export class PostWeatherChangeAddBattlerTagAttr extends PostWeatherChangeAbAttr {
private tagType: BattlerTagType;
private turnCount: integer;
private turnCount: number;
private weatherTypes: WeatherType[];
constructor(tagType: BattlerTagType, turnCount: integer, ...weatherTypes: WeatherType[]) {
constructor(tagType: BattlerTagType, turnCount: number, ...weatherTypes: WeatherType[]) {
super();
this.tagType = tagType;
@ -3478,9 +3478,9 @@ export class PostWeatherLapseAbAttr extends AbAttr {
}
export class PostWeatherLapseHealAbAttr extends PostWeatherLapseAbAttr {
private healFactor: integer;
private healFactor: number;
constructor(healFactor: integer, ...weatherTypes: WeatherType[]) {
constructor(healFactor: number, ...weatherTypes: WeatherType[]) {
super(...weatherTypes);
this.healFactor = healFactor;
@ -3501,9 +3501,9 @@ export class PostWeatherLapseHealAbAttr extends PostWeatherLapseAbAttr {
}
export class PostWeatherLapseDamageAbAttr extends PostWeatherLapseAbAttr {
private damageFactor: integer;
private damageFactor: number;
constructor(damageFactor: integer, ...weatherTypes: WeatherType[]) {
constructor(damageFactor: number, ...weatherTypes: WeatherType[]) {
super(...weatherTypes);
this.damageFactor = damageFactor;
@ -3536,10 +3536,10 @@ export class PostTerrainChangeAbAttr extends AbAttr {
export class PostTerrainChangeAddBattlerTagAttr extends PostTerrainChangeAbAttr {
private tagType: BattlerTagType;
private turnCount: integer;
private turnCount: number;
private terrainTypes: TerrainType[];
constructor(tagType: BattlerTagType, turnCount: integer, ...terrainTypes: TerrainType[]) {
constructor(tagType: BattlerTagType, turnCount: number, ...terrainTypes: TerrainType[]) {
super();
this.tagType = tagType;
@ -3789,9 +3789,9 @@ export class PostTurnHealAbAttr extends PostTurnAbAttr {
}
export class PostTurnFormChangeAbAttr extends PostTurnAbAttr {
private formFunc: (p: Pokemon) => integer;
private formFunc: (p: Pokemon) => number;
constructor(formFunc: ((p: Pokemon) => integer)) {
constructor(formFunc: ((p: Pokemon) => number)) {
super(true);
this.formFunc = formFunc;
@ -4031,9 +4031,9 @@ export class PostItemLostApplyBattlerTagAbAttr extends PostItemLostAbAttr {
}
export class StatStageChangeMultiplierAbAttr extends AbAttr {
private multiplier: integer;
private multiplier: number;
constructor(multiplier: integer) {
constructor(multiplier: number) {
super(true);
this.multiplier = multiplier;
@ -4356,9 +4356,9 @@ export class PostFaintClearWeatherAbAttr extends PostFaintAbAttr {
}
export class PostFaintContactDamageAbAttr extends PostFaintAbAttr {
private damageRatio: integer;
private damageRatio: number;
constructor(damageRatio: integer) {
constructor(damageRatio: number) {
super();
this.damageRatio = damageRatio;
@ -4538,9 +4538,9 @@ export class ReduceBerryUseThresholdAbAttr extends AbAttr {
* Used for Heavy Metal (doubling weight) and Light Metal (halving weight)
*/
export class WeightMultiplierAbAttr extends AbAttr {
private multiplier: integer;
private multiplier: number;
constructor(multiplier: integer) {
constructor(multiplier: number) {
super();
this.multiplier = multiplier;
@ -4841,12 +4841,12 @@ export class FormBlockDamageAbAttr extends ReceivedMoveDamageMultiplierAbAttr {
* @extends AbAttr
*/
export class BypassSpeedChanceAbAttr extends AbAttr {
public chance: integer;
public chance: number;
/**
* @param {integer} chance probability of ability being active.
* @param {number} chance probability of ability being active.
*/
constructor(chance: integer) {
constructor(chance: number) {
super(true);
this.chance = chance;
}
@ -5406,7 +5406,7 @@ export function applyPreStatStageChangeAbAttrs(attrType: Constructor<PreStatStag
}
export function applyPostStatStageChangeAbAttrs(attrType: Constructor<PostStatStageChangeAbAttr>,
pokemon: Pokemon, stats: BattleStat[], stages: integer, selfTarget: boolean, simulated: boolean = false, ...args: any[]): Promise<void> {
pokemon: Pokemon, stats: BattleStat[], stages: number, selfTarget: boolean, simulated: boolean = false, ...args: any[]): Promise<void> {
return applyAbAttrsInternal<PostStatStageChangeAbAttr>(attrType, pokemon, (attr, _passive) => attr.applyPostStatStageChange(pokemon, simulated, stats, stages, selfTarget, args),
(attr, _passive) => attr.canApplyPostStatStageChange(pokemon, simulated, stats, stages, selfTarget, args), args, false, simulated);
}
@ -6477,9 +6477,8 @@ export function initAbilities() {
.attr(NoTransformAbilityAbAttr)
.partial(), // While setting the tag, the getbattlestat should ignore all modifiers to stats except stat stages
new Ability(Abilities.GOOD_AS_GOLD, 9)
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS)
.ignorable()
.partial(), // Lots of weird interactions with moves and abilities such as negating status moves that target the field
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS && ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget))
.ignorable(),
new Ability(Abilities.VESSEL_OF_RUIN, 9)
.attr(FieldMultiplyStatAbAttr, Stat.SPATK, 0.75)
.attr(PostSummonMessageAbAttr, (user) => i18next.t("abilityTriggers:postSummonVesselOfRuin", { pokemonNameWithAffix: getPokemonNameWithAffix(user), statName: i18next.t(getStatKey(Stat.SPATK)) }))

View File

@ -26,11 +26,11 @@ export function getBiomeName(biome: Biome | -1) {
}
interface BiomeLinks {
[key: integer]: Biome | (Biome | [Biome, integer])[]
[key: number]: Biome | (Biome | [Biome, number])[]
}
interface BiomeDepths {
[key: integer]: [integer, integer]
[key: number]: [number, number]
}
export const biomeLinks: BiomeLinks = {
@ -87,27 +87,39 @@ export enum BiomePoolTier {
export const uncatchableSpecies: Species[] = [];
export interface SpeciesTree {
[key: integer]: Species[]
[key: number]: Species[]
}
export interface PokemonPools {
[key: integer]: (Species | SpeciesTree)[]
[key: number]: (Species | SpeciesTree)[]
}
export interface BiomeTierPokemonPools {
[key: integer]: PokemonPools
[key: number]: PokemonPools
}
export interface BiomePokemonPools {
[key: integer]: BiomeTierPokemonPools
[key: number]: BiomeTierPokemonPools
}
export interface BiomeTierTod {
biome: Biome,
tier: BiomePoolTier,
tod: TimeOfDay[]
}
export interface CatchableSpecies{
[key: number]: BiomeTierTod[]
}
export const catchableSpecies: CatchableSpecies = {};
export interface BiomeTierTrainerPools {
[key: integer]: TrainerType[]
[key: number]: TrainerType[]
}
export interface BiomeTrainerPools {
[key: integer]: BiomeTierTrainerPools
[key: number]: BiomeTierTrainerPools
}
export const biomePokemonPools: BiomePokemonPools = {
@ -7663,15 +7675,15 @@ export function initBiomes() {
biomeDepths[Biome.TOWN] = [ 0, 1 ];
const traverseBiome = (biome: Biome, depth: integer) => {
const traverseBiome = (biome: Biome, depth: number) => {
if (biome === Biome.END) {
const biomeList = Object.keys(Biome).filter(key => !isNaN(Number(key)));
biomeList.pop(); // Removes Biome.END from the list
const randIndex = Utils.randSeedInt(biomeList.length, 1); // Will never be Biome.TOWN
biome = Biome[biomeList[randIndex]];
}
const linkedBiomes: (Biome | [ Biome, integer ])[] = Array.isArray(biomeLinks[biome])
? biomeLinks[biome] as (Biome | [ Biome, integer ])[]
const linkedBiomes: (Biome | [ Biome, number ])[] = Array.isArray(biomeLinks[biome])
? biomeLinks[biome] as (Biome | [ Biome, number ])[]
: [ biomeLinks[biome] as Biome ];
for (const linkedBiomeEntry of linkedBiomes) {
const linkedBiome = !Array.isArray(linkedBiomeEntry)
@ -7688,7 +7700,7 @@ export function initBiomes() {
};
traverseBiome(Biome.TOWN, 0);
biomeDepths[Biome.END] = [ Object.values(biomeDepths).map(d => d[0]).reduce((max: integer, value: integer) => Math.max(max, value), 0) + 1, 1 ];
biomeDepths[Biome.END] = [ Object.values(biomeDepths).map(d => d[0]).reduce((max: number, value: number) => Math.max(max, value), 0) + 1, 1 ];
for (const biome of Utils.getEnumValues(Biome)) {
biomePokemonPools[biome] = {};
@ -7716,6 +7728,9 @@ export function initBiomes() {
uncatchableSpecies.push(speciesId);
}
// array of biome options for the current species
catchableSpecies[speciesId] = [];
for (const b of biomeEntries) {
const biome = b[0];
const tier = b[1];
@ -7725,6 +7740,12 @@ export function initBiomes() {
: [ b[2] ]
: [ TimeOfDay.ALL ];
catchableSpecies[speciesId].push({
biome: biome as Biome,
tier: tier as BiomePoolTier,
tod: timesOfDay as TimeOfDay[]
});
for (const tod of timesOfDay) {
if (!biomePokemonPools.hasOwnProperty(biome) || !biomePokemonPools[biome].hasOwnProperty(tier) || !biomePokemonPools[biome][tier].hasOwnProperty(tod)) {
continue;

View File

@ -1,7 +1,15 @@
import { Abilities } from "#app/enums/abilities";
import { Species } from "#app/enums/species";
export const starterPassiveAbilities = {
export interface PassiveAbilities {
[key: number]: Abilities
}
interface StarterPassiveAbilities {
[key: number]: PassiveAbilities
}
export const starterPassiveAbilities: StarterPassiveAbilities = {
[Species.BULBASAUR]: { 0: Abilities.GRASSY_SURGE },
[Species.CHARMANDER]: { 0: Abilities.BEAST_BOOST },
[Species.SQUIRTLE]: { 0: Abilities.STURDY },

View File

@ -77,9 +77,9 @@ export enum EvolutionItem {
/**
* Pokemon Evolution tuple type consisting of:
* @property 0 {@linkcode Species} The species of the Pokemon.
* @property 1 {@linkcode integer} The level at which the Pokemon evolves.
* @property 1 {@linkcode number} The level at which the Pokemon evolves.
*/
export type EvolutionLevel = [species: Species, level: integer];
export type EvolutionLevel = [species: Species, level: number];
export type EvolutionConditionPredicate = (p: Pokemon) => boolean;
export type EvolutionConditionEnforceFunc = (p: Pokemon) => void;
@ -88,12 +88,12 @@ export class SpeciesFormEvolution {
public speciesId: Species;
public preFormKey: string | null;
public evoFormKey: string | null;
public level: integer;
public level: number;
public item: EvolutionItem | null;
public condition: SpeciesEvolutionCondition | null;
public wildDelay: SpeciesWildEvolutionDelay;
constructor(speciesId: Species, preFormKey: string | null, evoFormKey: string | null, level: integer, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) {
constructor(speciesId: Species, preFormKey: string | null, evoFormKey: string | null, level: number, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) {
this.speciesId = speciesId;
this.preFormKey = preFormKey;
this.evoFormKey = evoFormKey;
@ -105,7 +105,7 @@ export class SpeciesFormEvolution {
}
export class SpeciesEvolution extends SpeciesFormEvolution {
constructor(speciesId: Species, level: integer, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) {
constructor(speciesId: Species, level: number, item: EvolutionItem | null, condition: SpeciesEvolutionCondition | null, wildDelay?: SpeciesWildEvolutionDelay) {
super(speciesId, null, null, level, item, condition, wildDelay);
}
}
@ -169,7 +169,7 @@ class MoveEvolutionCondition extends SpeciesEvolutionCondition {
}
class FriendshipEvolutionCondition extends SpeciesEvolutionCondition {
public amount: integer;
public amount: number;
constructor(amount: number) {
super(p => p.friendship >= amount);
this.amount = amount;
@ -178,7 +178,7 @@ class FriendshipEvolutionCondition extends SpeciesEvolutionCondition {
}
class FriendshipTimeOfDayEvolutionCondition extends SpeciesEvolutionCondition {
public amount: integer;
public amount: number;
public timesOfDay: TimeOfDay[];
constructor(amount: number, tod: "day" | "night") {
if (tod === "day") {
@ -197,7 +197,7 @@ class FriendshipTimeOfDayEvolutionCondition extends SpeciesEvolutionCondition {
}
class FriendshipMoveTypeEvolutionCondition extends SpeciesEvolutionCondition {
public amount: integer;
public amount: number;
public type: Type;
constructor(amount: number, type: Type) {
super(p => p.friendship >= amount && !!p.getMoveset().find(m => m?.getMove().type === type));

View File

@ -1,18 +1,18 @@
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
export type LevelMoves = ([integer, Moves])[];
export type LevelMoves = ([number, Moves])[];
interface PokemonSpeciesLevelMoves {
[key: integer]: LevelMoves
[key: number]: LevelMoves
}
interface PokemonFormLevelMoves {
[key: integer]: LevelMoves
[key: number]: LevelMoves
}
interface PokemonSpeciesFormLevelMoves {
[key: integer]: PokemonFormLevelMoves
[key: number]: PokemonFormLevelMoves
}
/** Moves that can only be learned with a memory-mushroom */

View File

@ -3,7 +3,7 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
interface TmSpecies {
[key: integer]: Array<Species | Array<Species | string>>
[key: number]: Array<Species | Array<Species | string>>
}
export const reverseCompatibleTms: Moves[] = [];/*[
@ -68433,8 +68433,48 @@ export const tmSpecies: TmSpecies = {
],
};
interface SpeciesTmMoves {
[key: number]: (Moves | [string | Species, Moves])[];
}
function transposeTmSpecies(): SpeciesTmMoves {
const flipped: SpeciesTmMoves = {};
for (const move in tmSpecies) {
const moveKey = Number(move);
const speciesList = tmSpecies[move];
for (const species of speciesList) {
if (Array.isArray(species)) {
// Extract base species and all associated forms
const [ baseSpecies, ...forms ] = species;
const speciesKey = Number(baseSpecies);
if (!flipped[speciesKey]) {
flipped[speciesKey] = [];
}
for (const form of forms) {
flipped[speciesKey].push([ form, moveKey ]);
}
} else {
const speciesKey = Number(species);
if (!flipped[speciesKey]) {
flipped[speciesKey] = [];
}
flipped[speciesKey].push(moveKey);
}
}
}
return flipped;
}
export const speciesTmMoves: SpeciesTmMoves = transposeTmSpecies();
interface TmPoolTiers {
[key: integer]: ModifierTier
[key: number]: ModifierTier
}
export const tmPoolTiers: TmPoolTiers = {

View File

@ -106,15 +106,15 @@ export enum CommonAnim {
}
export class AnimConfig {
public id: integer;
public id: number;
public graphic: string;
public frames: AnimFrame[][];
public frameTimedEvents: Map<integer, AnimTimedEvent[]>;
public position: integer;
public hue: integer;
public frameTimedEvents: Map<number, AnimTimedEvent[]>;
public position: number;
public hue: number;
constructor(source?: any) {
this.frameTimedEvents = new Map<integer, AnimTimedEvent[]>;
this.frameTimedEvents = new Map<number, AnimTimedEvent[]>;
if (source) {
this.id = source.id;
@ -195,18 +195,18 @@ class AnimFrame {
public visible: boolean;
public blendType: AnimBlendType;
public target: AnimFrameTarget;
public graphicFrame: integer;
public opacity: integer;
public color: integer[];
public tone: integer[];
public flash: integer[];
public graphicFrame: number;
public opacity: number;
public color: number[];
public tone: number[];
public flash: number[];
public locked: boolean;
public priority: integer;
public priority: number;
public focus: AnimFocus;
constructor(x: number, y: number, zoomX: number, zoomY: number, angle: number, mirror: boolean, visible: boolean, blendType: AnimBlendType, pattern: integer,
opacity: integer, colorR: integer, colorG: integer, colorB: integer, colorA: integer, toneR: integer, toneG: integer, toneB: integer, toneA: integer,
flashR: integer, flashG: integer, flashB: integer, flashA: integer, locked: boolean, priority: integer, focus: AnimFocus, init?: boolean) {
constructor(x: number, y: number, zoomX: number, zoomY: number, angle: number, mirror: boolean, visible: boolean, blendType: AnimBlendType, pattern: number,
opacity: number, colorR: number, colorG: number, colorB: number, colorA: number, toneR: number, toneG: number, toneB: number, toneA: number,
flashR: number, flashG: number, flashB: number, flashA: number, locked: boolean, priority: number, focus: AnimFocus, init?: boolean) {
this.x = !init ? ((x || 0) - 128) * 0.5 : x;
this.y = !init ? ((y || 0) - 224) * 0.5 : y;
if (zoomX) {
@ -288,9 +288,9 @@ class AnimFrame {
class ImportedAnimFrame extends AnimFrame {
constructor(source: any) {
const color: integer[] = source.color || [ 0, 0, 0, 0 ];
const tone: integer[] = source.tone || [ 0, 0, 0, 0 ];
const flash: integer[] = source.flash || [ 0, 0, 0, 0 ];
const color: number[] = source.color || [ 0, 0, 0, 0 ];
const tone: number[] = source.tone || [ 0, 0, 0, 0 ];
const flash: number[] = source.flash || [ 0, 0, 0, 0 ];
super(source.x, source.y, source.zoomX, source.zoomY, source.angle, source.mirror, source.visible, source.blendType, source.graphicFrame, source.opacity, color[0], color[1], color[2], color[3], tone[0], tone[1], tone[2], tone[3], flash[0], flash[1], flash[2], flash[3], source.locked, source.priority, source.focus, true);
this.target = source.target;
this.graphicFrame = source.graphicFrame;
@ -298,15 +298,15 @@ class ImportedAnimFrame extends AnimFrame {
}
abstract class AnimTimedEvent {
public frameIndex: integer;
public frameIndex: number;
public resourceName: string;
constructor(frameIndex: integer, resourceName: string) {
constructor(frameIndex: number, resourceName: string) {
this.frameIndex = frameIndex;
this.resourceName = resourceName;
}
abstract execute(battleAnim: BattleAnim, priority?: number): integer;
abstract execute(battleAnim: BattleAnim, priority?: number): number;
abstract getEventType(): string;
}
@ -315,7 +315,7 @@ class AnimTimedSoundEvent extends AnimTimedEvent {
public volume: number = 100;
public pitch: number = 100;
constructor(frameIndex: integer, resourceName: string, source?: any) {
constructor(frameIndex: number, resourceName: string, source?: any) {
super(frameIndex, resourceName);
if (source) {
@ -324,7 +324,7 @@ class AnimTimedSoundEvent extends AnimTimedEvent {
}
}
execute(battleAnim: BattleAnim, priority?: number): integer {
execute(battleAnim: BattleAnim, priority?: number): number {
const soundConfig = { rate: (this.pitch * 0.01), volume: (this.volume * 0.01) };
if (this.resourceName) {
try {
@ -346,20 +346,20 @@ class AnimTimedSoundEvent extends AnimTimedEvent {
abstract class AnimTimedBgEvent extends AnimTimedEvent {
public bgX: number = 0;
public bgY: number = 0;
public opacity: integer = 0;
/*public colorRed: integer = 0;
public colorGreen: integer = 0;
public colorBlue: integer = 0;
public colorAlpha: integer = 0;*/
public duration: integer = 0;
/*public flashScope: integer = 0;
public flashRed: integer = 0;
public flashGreen: integer = 0;
public flashBlue: integer = 0;
public flashAlpha: integer = 0;
public flashDuration: integer = 0;*/
public opacity: number = 0;
/*public colorRed: number = 0;
public colorGreen: number = 0;
public colorBlue: number = 0;
public colorAlpha: number = 0;*/
public duration: number = 0;
/*public flashScope: number = 0;
public flashRed: number = 0;
public flashGreen: number = 0;
public flashBlue: number = 0;
public flashAlpha: number = 0;
public flashDuration: number = 0;*/
constructor(frameIndex: integer, resourceName: string, source: any) {
constructor(frameIndex: number, resourceName: string, source: any) {
super(frameIndex, resourceName);
if (source) {
@ -382,11 +382,11 @@ abstract class AnimTimedBgEvent extends AnimTimedEvent {
}
class AnimTimedUpdateBgEvent extends AnimTimedBgEvent {
constructor(frameIndex: integer, resourceName: string, source?: any) {
constructor(frameIndex: number, resourceName: string, source?: any) {
super(frameIndex, resourceName, source);
}
execute(moveAnim: MoveAnim, priority?: number): integer {
execute(moveAnim: MoveAnim, priority?: number): number {
const tweenProps = {};
if (this.bgX !== undefined) {
tweenProps["x"] = (this.bgX * 0.5) - 320;
@ -412,11 +412,11 @@ class AnimTimedUpdateBgEvent extends AnimTimedBgEvent {
}
class AnimTimedAddBgEvent extends AnimTimedBgEvent {
constructor(frameIndex: integer, resourceName: string, source?: any) {
constructor(frameIndex: number, resourceName: string, source?: any) {
super(frameIndex, resourceName, source);
}
execute(moveAnim: MoveAnim, priority?: number): integer {
execute(moveAnim: MoveAnim, priority?: number): number {
if (moveAnim.bgSprite) {
moveAnim.bgSprite.destroy();
}
@ -737,7 +737,7 @@ function isReversed(src1: number, src2: number, dst1: number, dst2: number) {
}
interface SpriteCache {
[key: integer]: Phaser.GameObjects.Sprite[]
[key: number]: Phaser.GameObjects.Sprite[]
}
export abstract class BattleAnim {
@ -774,8 +774,8 @@ export abstract class BattleAnim {
return false;
}
private getGraphicFrameData(frames: AnimFrame[], onSubstitute?: boolean): Map<integer, Map<AnimFrameTarget, GraphicFrameData>> {
const ret: Map<integer, Map<AnimFrameTarget, GraphicFrameData>> = new Map([
private getGraphicFrameData(frames: AnimFrame[], onSubstitute?: boolean): Map<number, Map<AnimFrameTarget, GraphicFrameData>> {
const ret: Map<number, Map<AnimFrameTarget, GraphicFrameData>> = new Map([
[ AnimFrameTarget.GRAPHIC, new Map<AnimFrameTarget, GraphicFrameData>() ],
[ AnimFrameTarget.USER, new Map<AnimFrameTarget, GraphicFrameData>() ],
[ AnimFrameTarget.TARGET, new Map<AnimFrameTarget, GraphicFrameData>() ]
@ -853,7 +853,7 @@ export abstract class BattleAnim {
[AnimFrameTarget.USER]: [],
[AnimFrameTarget.TARGET]: []
};
const spritePriorities: integer[] = [];
const spritePriorities: number[] = [];
const cleanUpAndComplete = () => {
userSprite.setPosition(0, 0);
@ -993,7 +993,7 @@ export abstract class BattleAnim {
const moveSprite = sprites[graphicIndex];
if (spritePriorities[graphicIndex] !== frame.priority) {
spritePriorities[graphicIndex] = frame.priority;
const setSpritePriority = (priority: integer) => {
const setSpritePriority = (priority: number) => {
switch (priority) {
case 0:
globalScene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, globalScene.getEnemyPokemon(false) ?? globalScene.getPlayerPokemon(false)!); // TODO: is this bang correct?
@ -1093,8 +1093,8 @@ export abstract class BattleAnim {
});
}
private getGraphicFrameDataWithoutTarget(frames: AnimFrame[], targetInitialX: number, targetInitialY: number): Map<integer, Map<AnimFrameTarget, GraphicFrameData>> {
const ret: Map<integer, Map<AnimFrameTarget, GraphicFrameData>> = new Map([
private getGraphicFrameDataWithoutTarget(frames: AnimFrame[], targetInitialX: number, targetInitialY: number): Map<number, Map<AnimFrameTarget, GraphicFrameData>> {
const ret: Map<number, Map<AnimFrameTarget, GraphicFrameData>> = new Map([
[ AnimFrameTarget.GRAPHIC, new Map<AnimFrameTarget, GraphicFrameData>() ],
[ AnimFrameTarget.USER, new Map<AnimFrameTarget, GraphicFrameData>() ],
[ AnimFrameTarget.TARGET, new Map<AnimFrameTarget, GraphicFrameData>() ]
@ -1188,7 +1188,7 @@ export abstract class BattleAnim {
const graphicIndex = graphicFrameCount++;
const moveSprite = sprites[graphicIndex];
if (!isNullOrUndefined(frame.priority)) {
const setSpritePriority = (priority: integer) => {
const setSpritePriority = (priority: number) => {
if (existingFieldSprites.length > priority) {
// Move to specified priority index
const index = globalScene.field.getIndex(existingFieldSprites[priority]);

View File

@ -137,7 +137,7 @@ export interface TerrainBattlerTag {
* to select restricted moves.
*/
export abstract class MoveRestrictionBattlerTag extends BattlerTag {
constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: integer, sourceMove?: Moves, sourceId?: integer) {
constructor(tagType: BattlerTagType, lapseType: BattlerTagLapseType | BattlerTagLapseType[], turnCount: number, sourceMove?: Moves, sourceId?: number) {
super(tagType, lapseType, turnCount, sourceMove, sourceId);
}
@ -2559,7 +2559,7 @@ export class SubstituteTag extends BattlerTag {
/** Is the source Pokemon "in focus," i.e. is it fully visible on the field? */
public sourceInFocus: boolean;
constructor(sourceMove: Moves, sourceId: integer) {
constructor(sourceMove: Moves, sourceId: number) {
super(BattlerTagType.SUBSTITUTE, [ BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.AFTER_MOVE, BattlerTagLapseType.HIT ], 0, sourceMove, sourceId, true);
}

View File

@ -115,17 +115,17 @@ export enum MoveSourceType {
export abstract class Challenge {
public id: Challenges; // The id of the challenge
public value: integer; // The "strength" of the challenge, all challenges have a numerical value.
public maxValue: integer; // The maximum strength of the challenge.
public severity: integer; // The current severity of the challenge. Some challenges have multiple severities in addition to strength.
public maxSeverity: integer; // The maximum severity of the challenge.
public value: number; // The "strength" of the challenge, all challenges have a numerical value.
public maxValue: number; // The maximum strength of the challenge.
public severity: number; // The current severity of the challenge. Some challenges have multiple severities in addition to strength.
public maxSeverity: number; // The maximum severity of the challenge.
public conditions: ChallengeCondition[];
/**
* @param id {@link Challenges} The enum value for the challenge
*/
constructor(id: Challenges, maxValue: integer = Number.MAX_SAFE_INTEGER) {
constructor(id: Challenges, maxValue: number = Number.MAX_SAFE_INTEGER) {
this.id = id;
this.value = 0;
@ -180,7 +180,7 @@ export abstract class Challenge {
/**
* Returns the textual representation of a challenge's current value.
* @param overrideValue {@link integer} The value to check for. If undefined, gets the current value.
* @param overrideValue {@link number} The value to check for. If undefined, gets the current value.
* @returns {@link string} The localised name for the current value.
*/
getValue(overrideValue?: number): string {
@ -190,7 +190,7 @@ export abstract class Challenge {
/**
* Returns the description of a challenge's current value.
* @param overrideValue {@link integer} The value to check for. If undefined, gets the current value.
* @param overrideValue {@link number} The value to check for. If undefined, gets the current value.
* @returns {@link string} The localised description for the current value.
*/
getDescription(overrideValue?: number): string {
@ -257,7 +257,7 @@ export abstract class Challenge {
* Gets the "difficulty" value of this challenge.
* @returns {@link integer} The difficulty value.
*/
getDifficulty(): integer {
getDifficulty(): number {
return this.value;
}
@ -265,7 +265,7 @@ export abstract class Challenge {
* Gets the minimum difficulty added by this challenge.
* @returns {@link integer} The difficulty value.
*/
getMinDifficulty(): integer {
getMinDifficulty(): number {
return 0;
}
@ -643,7 +643,7 @@ export class SingleTypeChallenge extends Challenge {
* @param {value} overrideValue The value to check for. If undefined, gets the current value.
* @returns {string} The localised name for the current value.
*/
getValue(overrideValue?: integer): string {
getValue(overrideValue?: number): string {
if (overrideValue === undefined) {
overrideValue = this.value;
}
@ -655,7 +655,7 @@ export class SingleTypeChallenge extends Challenge {
* @param {value} overrideValue The value to check for. If undefined, gets the current value.
* @returns {string} The localised description for the current value.
*/
getDescription(overrideValue?: integer): string {
getDescription(overrideValue?: number): string {
if (overrideValue === undefined) {
overrideValue = this.value;
}
@ -793,7 +793,7 @@ export class LowerStarterMaxCostChallenge extends Challenge {
/**
* @override
*/
getValue(overrideValue?: integer): string {
getValue(overrideValue?: number): string {
if (overrideValue === undefined) {
overrideValue = this.value;
}
@ -827,7 +827,7 @@ export class LowerStarterPointsChallenge extends Challenge {
/**
* @override
*/
getValue(overrideValue?: integer): string {
getValue(overrideValue?: number): string {
if (overrideValue === undefined) {
overrideValue = this.value;
}

View File

@ -11,7 +11,7 @@ import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
import { Biome } from "#app/enums/biome";
export interface DailyRunConfig {
seed: integer;
seed: number;
starters: Starter;
}
@ -38,7 +38,7 @@ export function getDailyRunStarters(seed: string): Starter[] {
return;
}
const starterCosts: integer[] = [];
const starterCosts: number[] = [];
starterCosts.push(Math.min(Math.round(3.5 + Math.abs(Utils.randSeedGauss(1))), 8));
starterCosts.push(Utils.randSeedInt(9 - starterCosts[0], 1));
starterCosts.push(10 - (starterCosts[0] + starterCosts[1]));
@ -57,7 +57,7 @@ export function getDailyRunStarters(seed: string): Starter[] {
return starters;
}
function getDailyRunStarter(starterSpeciesForm: PokemonSpeciesForm, startingLevel: integer): Starter {
function getDailyRunStarter(starterSpeciesForm: PokemonSpeciesForm, startingLevel: number): Starter {
const starterSpecies = starterSpeciesForm instanceof PokemonSpecies ? starterSpeciesForm : getPokemonSpecies(starterSpeciesForm.speciesId);
const formIndex = starterSpeciesForm instanceof PokemonSpecies ? undefined : starterSpeciesForm.formIndex;
const pokemon = new PlayerPokemon(starterSpecies, startingLevel, undefined, formIndex, undefined, undefined, undefined, undefined, undefined, undefined);
@ -74,7 +74,7 @@ function getDailyRunStarter(starterSpeciesForm: PokemonSpeciesForm, startingLeve
}
interface BiomeWeights {
[key: integer]: integer
[key: number]: number
}
// Initially weighted by amount of exits each biome has
@ -125,7 +125,7 @@ export function getDailyStartingBiome(): Biome {
const biomes = Utils.getEnumValues(Biome).filter(b => b !== Biome.TOWN && b !== Biome.END);
let totalWeight = 0;
const biomeThresholds: integer[] = [];
const biomeThresholds: number[] = [];
for (const biome of biomes) {
// Keep track of the total weight
totalWeight += dailyBiomeWeights[biome];

View File

@ -9,7 +9,7 @@ export interface TrainerTypeMessages {
}
export interface TrainerTypeDialogue {
[key: integer]: TrainerTypeMessages | Array<TrainerTypeMessages>
[key: number]: TrainerTypeMessages | Array<TrainerTypeMessages>
}
export function getTrainerTypeDialogue(): TrainerTypeDialogue {

View File

@ -373,8 +373,8 @@ export class Egg {
}
}
let minStarterValue: integer;
let maxStarterValue: integer;
let minStarterValue: number;
let maxStarterValue: number;
switch (this.tier) {
case EggTier.RARE:

View File

@ -16,7 +16,7 @@ const expLevels = [
[ 0, 4, 13, 32, 65, 112, 178, 276, 393, 540, 745, 967, 1230, 1591, 1957, 2457, 3046, 3732, 4526, 5440, 6482, 7666, 9003, 10506, 12187, 14060, 16140, 18439, 20974, 23760, 26811, 30146, 33780, 37731, 42017, 46656, 50653, 55969, 60505, 66560, 71677, 78533, 84277, 91998, 98415, 107069, 114205, 123863, 131766, 142500, 151222, 163105, 172697, 185807, 196322, 210739, 222231, 238036, 250562, 267840, 281456, 300293, 315059, 335544, 351520, 373744, 390991, 415050, 433631, 459620, 479600, 507617, 529063, 559209, 582187, 614566, 639146, 673863, 700115, 737280, 765275, 804997, 834809, 877201, 908905, 954084, 987754, 1035837, 1071552, 1122660, 1160499, 1214753, 1254796, 1312322, 1354652, 1415577, 1460276, 1524731, 1571884, 1640000 ]
];
export function getLevelTotalExp(level: integer, growthRate: GrowthRate): integer {
export function getLevelTotalExp(level: number, growthRate: GrowthRate): number {
if (level < 100) {
const levelExp = expLevels[growthRate][level - 1];
if (growthRate !== GrowthRate.MEDIUM_FAST) {
@ -25,7 +25,7 @@ export function getLevelTotalExp(level: integer, growthRate: GrowthRate): intege
return levelExp;
}
let ret: integer;
let ret: number;
switch (growthRate) {
case GrowthRate.ERRATIC:
@ -55,7 +55,7 @@ export function getLevelTotalExp(level: integer, growthRate: GrowthRate): intege
return Math.floor(ret);
}
export function getLevelRelExp(level: integer, growthRate: GrowthRate): number {
export function getLevelRelExp(level: number, growthRate: GrowthRate): number {
return getLevelTotalExp(level, growthRate) - getLevelTotalExp(level - 1, growthRate);
}

View File

@ -687,7 +687,7 @@ export default class Move implements Localizable {
* @param move {@linkcode Move} using the move
* @returns integer representing the total benefitScore
*/
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
let score = 0;
for (const attr of this.attrs) {
@ -708,7 +708,7 @@ export default class Move implements Localizable {
* @param move {@linkcode Move} using the move
* @returns integer representing the total benefitScore
*/
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
let score = 0;
if (target.getAlly()?.getTag(BattlerTagType.COMMANDED)?.getSourcePokemon() === target) {
@ -875,7 +875,7 @@ export default class Move implements Localizable {
}
export class AttackMove extends Move {
constructor(id: Moves, type: Type, category: MoveCategory, power: integer, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) {
constructor(id: Moves, type: Type, category: MoveCategory, power: number, accuracy: number, pp: number, chance: number, priority: number, generation: number) {
super(id, type, category, MoveTarget.NEAR_OTHER, power, accuracy, pp, chance, priority, generation);
/**
@ -887,7 +887,7 @@ export class AttackMove extends Move {
}
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
let ret = super.getTargetBenefitScore(user, target, move);
let attackScore = 0;
@ -932,13 +932,13 @@ export class AttackMove extends Move {
}
export class StatusMove extends Move {
constructor(id: Moves, type: Type, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) {
constructor(id: Moves, type: Type, accuracy: number, pp: number, chance: number, priority: number, generation: number) {
super(id, type, MoveCategory.STATUS, MoveTarget.NEAR_OTHER, -1, accuracy, pp, chance, priority, generation);
}
}
export class SelfStatusMove extends Move {
constructor(id: Moves, type: Type, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) {
constructor(id: Moves, type: Type, accuracy: number, pp: number, chance: number, priority: number, generation: number) {
super(id, type, MoveCategory.STATUS, MoveTarget.USER, -1, accuracy, pp, chance, priority, generation);
}
}
@ -1074,7 +1074,7 @@ export abstract class MoveAttr {
* @see {@linkcode EnemyPokemon.getNextMove}
* @virtual
*/
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return 0;
}
@ -1083,7 +1083,7 @@ export abstract class MoveAttr {
* @see {@linkcode EnemyPokemon.getNextMove}
* @virtual
*/
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return 0;
}
}
@ -1201,7 +1201,7 @@ export class MoveEffectAttr extends MoveAttr {
* @param selfEffect `true` if move targets user.
* @returns Move effect chance value.
*/
getMoveChance(user: Pokemon, target: Pokemon, move: Move, selfEffect?: Boolean, showAbility?: Boolean): integer {
getMoveChance(user: Pokemon, target: Pokemon, move: Move, selfEffect?: Boolean, showAbility?: Boolean): number {
const moveChance = new Utils.NumberHolder(this.effectChanceOverride ?? move.chance);
applyAbAttrs(MoveEffectChanceMultiplierAbAttr, user, null, false, moveChance, move, target, selfEffect, showAbility);
@ -1330,7 +1330,7 @@ export class HighCritAttr extends MoveAttr {
return true;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return 3;
}
}
@ -1342,15 +1342,15 @@ export class CritOnlyAttr extends MoveAttr {
return true;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return 5;
}
}
export class FixedDamageAttr extends MoveAttr {
private damage: integer;
private damage: number;
constructor(damage: integer) {
constructor(damage: number) {
super();
this.damage = damage;
@ -1362,7 +1362,7 @@ export class FixedDamageAttr extends MoveAttr {
return true;
}
getDamage(user: Pokemon, target: Pokemon, move: Move): integer {
getDamage(user: Pokemon, target: Pokemon, move: Move): number {
return this.damage;
}
}
@ -1435,7 +1435,7 @@ export class MatchHpAttr extends FixedDamageAttr {
}
// TODO
/*getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
/*getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return 0;
}*/
}
@ -1446,7 +1446,7 @@ export class CounterDamageAttr extends FixedDamageAttr {
private moveFilter: MoveFilter;
private multiplier: number;
constructor(moveFilter: MoveFilter, multiplier: integer) {
constructor(moveFilter: MoveFilter, multiplier: number) {
super(0);
this.moveFilter = moveFilter;
@ -1454,7 +1454,7 @@ export class CounterDamageAttr extends FixedDamageAttr {
}
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const damage = user.turnData.attacksReceived.filter(ar => this.moveFilter(allMoves[ar.move])).reduce((total: integer, ar: AttackMoveResult) => total + ar.damage, 0);
const damage = user.turnData.attacksReceived.filter(ar => this.moveFilter(allMoves[ar.move])).reduce((total: number, ar: AttackMoveResult) => total + ar.damage, 0);
(args[0] as Utils.IntegerHolder).value = Utils.toDmgValue(damage * this.multiplier);
return true;
@ -1493,7 +1493,7 @@ export class ModifiedDamageAttr extends MoveAttr {
return true;
}
getModifiedDamage(user: Pokemon, target: Pokemon, move: Move, damage: integer): integer {
getModifiedDamage(user: Pokemon, target: Pokemon, move: Move, damage: number): number {
return damage;
}
}
@ -1507,7 +1507,7 @@ export class SurviveDamageAttr extends ModifiedDamageAttr {
return (user, target, move) => target.hp > 1;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return target.hp > 1 ? 0 : -20;
}
}
@ -1563,7 +1563,7 @@ export class RecoilAttr extends MoveEffectAttr {
return true;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return Math.floor((move.power / 5) / -4);
}
}
@ -1594,7 +1594,7 @@ export class SacrificialAttr extends MoveEffectAttr {
return true;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
if (user.isBoss()) {
return -20;
}
@ -1632,7 +1632,7 @@ export class SacrificialAttrOnHit extends MoveEffectAttr {
return true;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
if (user.isBoss()) {
return -20;
}
@ -1674,7 +1674,7 @@ export class HalfSacrificialAttr extends MoveEffectAttr {
return true;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
if (user.isBoss()) {
return -10;
}
@ -1778,7 +1778,7 @@ export class HealAttr extends MoveEffectAttr {
Utils.toDmgValue(target.getMaxHp() * healRatio), i18next.t("moveTriggers:healHp", { pokemonName: getPokemonNameWithAffix(target) }), true, !this.showAnim));
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
const score = ((1 - (this.selfTarget ? user : target).getHpRatio()) * 20) - this.healRatio * 10;
return Math.round(score / (1 - this.healRatio / 2));
}
@ -1870,7 +1870,7 @@ export class FlameBurstAttr extends MoveEffectAttr {
return true;
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return target.getAlly() ? -5 : 0;
}
}
@ -1893,7 +1893,7 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr {
// We don't know which party member will be chosen, so pick the highest max HP in the party
const party = user.isPlayer() ? globalScene.getPlayerParty() : globalScene.getEnemyParty();
const maxPartyMemberHp = party.map(p => p.getMaxHp()).reduce((maxHp: integer, hp: integer) => Math.max(hp, maxHp), 0);
const maxPartyMemberHp = party.map(p => p.getMaxHp()).reduce((maxHp: number, hp: number) => Math.max(hp, maxHp), 0);
globalScene.pushPhase(
new PokemonHealPhase(
@ -1911,7 +1911,7 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr {
return true;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return -20;
}
@ -2118,7 +2118,7 @@ export class HitHealAttr extends MoveEffectAttr {
* @param move {@linkcode Move} being used
* @returns an integer. Higher means enemy is more likely to use that move.
*/
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
if (this.healStat) {
const healAmount = target.getEffectiveStat(this.healStat);
return Math.floor(Math.max(0, (Math.min(1, (healAmount + user.hp) / user.getMaxHp() - 0.33))) / user.getHpRatio());
@ -2138,7 +2138,7 @@ export class IncrementMovePriorityAttr extends MoveAttr {
/** The condition for a move's priority being incremented */
private moveIncrementFunc: (pokemon: Pokemon, target:Pokemon, move: Move) => boolean;
/** The amount to increment priority by, if condition passes. */
private increaseAmount: integer;
private increaseAmount: number;
constructor(moveIncrementFunc: (pokemon: Pokemon, target:Pokemon, move: Move) => boolean, increaseAmount = 1) {
super();
@ -2222,7 +2222,7 @@ export class MultiHitAttr extends MoveAttr {
* @param target {@linkcode Pokemon} targeted by the attack
* @returns The number of hits this attack should deal
*/
getHitCount(user: Pokemon, target: Pokemon): integer {
getHitCount(user: Pokemon, target: Pokemon): number {
switch (this.multiHitType) {
case MultiHitType._2_TO_5:
{
@ -2669,7 +2669,7 @@ export class HealStatusEffectAttr extends MoveEffectAttr {
return this.effects.includes(effect);
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return user.status ? 10 : 0;
}
}
@ -2690,7 +2690,7 @@ export class BypassSleepAttr extends MoveAttr {
* @param target
* @param move
*/
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return user.status && user.status.effect === StatusEffect.SLEEP ? 200 : -10;
}
}
@ -3060,11 +3060,11 @@ export class StatStageChangeAttr extends MoveEffectAttr {
return false;
}
getLevels(_user: Pokemon): integer {
getLevels(_user: Pokemon): number {
return this.stages;
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
let ret = 0;
const moveLevels = this.getLevels(user);
for (const stat of this.stats) {
@ -3302,10 +3302,10 @@ export class GrowthStatStageChangeAttr extends StatStageChangeAttr {
}
export class CutHpStatStageBoostAttr extends StatStageChangeAttr {
private cutRatio: integer;
private cutRatio: number;
private messageCallback: ((user: Pokemon) => void) | undefined;
constructor(stat: BattleStat[], levels: integer, cutRatio: integer, messageCallback?: ((user: Pokemon) => void) | undefined) {
constructor(stat: BattleStat[], levels: number, cutRatio: number, messageCallback?: ((user: Pokemon) => void) | undefined) {
super(stat, levels, true);
this.cutRatio = cutRatio;
@ -3655,7 +3655,7 @@ const doublePowerChanceMessageFunc = (user: Pokemon, target: Pokemon, move: Move
export class DoublePowerChanceAttr extends VariablePowerAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
let rand: integer;
let rand: number;
globalScene.executeWithSeedOffset(() => rand = Utils.randSeedInt(100), globalScene.currentBattle.turn << 6, globalScene.waveSeed);
if (rand! < move.chance) {
const power = args[0] as Utils.NumberHolder;
@ -3668,7 +3668,7 @@ export class DoublePowerChanceAttr extends VariablePowerAttr {
}
export abstract class ConsecutiveUsePowerMultiplierAttr extends MovePowerMultiplierAttr {
constructor(limit: integer, resetOnFail: boolean, resetOnLimit?: boolean, ...comboMoves: Moves[]) {
constructor(limit: number, resetOnFail: boolean, resetOnLimit?: boolean, ...comboMoves: Moves[]) {
super((user: Pokemon, target: Pokemon, move: Move): number => {
const moveHistory = user.getLastXMoves(limit + 1).slice(1);
@ -3689,7 +3689,7 @@ export abstract class ConsecutiveUsePowerMultiplierAttr extends MovePowerMultipl
});
}
abstract getMultiplier(count: integer): number;
abstract getMultiplier(count: number): number;
}
export class ConsecutiveUseDoublePowerAttr extends ConsecutiveUsePowerMultiplierAttr {
@ -3938,7 +3938,7 @@ export class MagnitudePowerAttr extends VariablePowerAttr {
const magnitudeThresholds = [ 5, 15, 35, 65, 75, 95 ];
const magnitudePowers = [ 10, 30, 50, 70, 90, 100, 110, 150 ];
let rand: integer;
let rand: number;
globalScene.executeWithSeedOffset(() => rand = Utils.randSeedInt(100), globalScene.currentBattle.turn << 6, globalScene.waveSeed);
@ -4180,9 +4180,9 @@ const hasStockpileStacksCondition: MoveConditionFunc = (user) => {
*/
export class MultiHitPowerIncrementAttr extends VariablePowerAttr {
/** The max number of base power increments allowed for this move */
private maxHits: integer;
private maxHits: number;
constructor(maxHits: integer) {
constructor(maxHits: number) {
super();
this.maxHits = maxHits;
@ -5251,12 +5251,12 @@ export class SemiInvulnerableAttr extends MoveEffectAttr {
export class AddBattlerTagAttr extends MoveEffectAttr {
public tagType: BattlerTagType;
public turnCountMin: integer;
public turnCountMax: integer;
public turnCountMin: number;
public turnCountMax: number;
protected cancelOnFail: boolean;
private failOnOverlap: boolean;
constructor(tagType: BattlerTagType, selfTarget: boolean = false, failOnOverlap: boolean = false, turnCountMin: integer = 0, turnCountMax?: integer, lastHitOnly: boolean = false, cancelOnFail: boolean = false) {
constructor(tagType: BattlerTagType, selfTarget: boolean = false, failOnOverlap: boolean = false, turnCountMin: number = 0, turnCountMax?: number, lastHitOnly: boolean = false, cancelOnFail: boolean = false) {
super(selfTarget, { lastHitOnly: lastHitOnly });
this.tagType = tagType;
@ -5293,7 +5293,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
: null;
}
getTagTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer | void {
getTagTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number | void {
switch (this.tagType) {
case BattlerTagType.RECHARGING:
case BattlerTagType.PERISH_SONG:
@ -5340,7 +5340,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
}
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
let moveChance = this.getMoveChance(user, target, move, this.selfTarget, false);
if (moveChance < 0) {
moveChance = 100;
@ -5407,7 +5407,7 @@ export class GulpMissileTagAttr extends MoveEffectAttr {
return false;
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
const isCramorant = user.hasAbility(Abilities.GULP_MISSILE) && user.species.speciesId === Species.CRAMORANT;
return isCramorant && !user.getTag(GulpMissileTag) ? 10 : 0;
}
@ -5669,7 +5669,7 @@ export class HitsTagAttr extends MoveAttr {
this.doubleDamage = !!doubleDamage;
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return target.getTag(this.tagType) ? this.doubleDamage ? 10 : 5 : 0;
}
}
@ -5687,11 +5687,11 @@ export class HitsTagForDoubleDamageAttr extends HitsTagAttr {
export class AddArenaTagAttr extends MoveEffectAttr {
public tagType: ArenaTagType;
public turnCount: integer;
public turnCount: number;
private failOnOverlap: boolean;
public selfSideTarget: boolean;
constructor(tagType: ArenaTagType, turnCount?: integer | null, failOnOverlap: boolean = false, selfSideTarget: boolean = false) {
constructor(tagType: ArenaTagType, turnCount?: number | null, failOnOverlap: boolean = false, selfSideTarget: boolean = false) {
super(true);
this.tagType = tagType;
@ -5983,7 +5983,7 @@ export class RevivalBlessingAttr extends MoveEffectAttr {
});
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
if (user.hasTrainer() && globalScene.getEnemyParty().findIndex(p => p.isFainted() && !p.isBoss()) > -1) {
return 20;
}
@ -6212,13 +6212,13 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
};
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
if (!globalScene.getEnemyParty().find(p => p.isActive() && !p.isOnField())) {
return -20;
}
let ret = this.selfSwitch ? Math.floor((1 - user.getHpRatio()) * 20) : super.getUserBenefitScore(user, target, move);
if (this.selfSwitch && this.isBatonPass()) {
const statStageTotal = user.getStatStages().reduce((s: integer, total: integer) => total += s, 0);
const statStageTotal = user.getStatStages().reduce((s: number, total: number) => total += s, 0);
ret = ret / 2 + (Phaser.Tweens.Builders.GetEaseFunction("Sine.easeOut")(Math.min(Math.abs(statStageTotal), 10) / 10) * (statStageTotal >= 0 ? 10 : -10));
}
return ret;
@ -7185,7 +7185,7 @@ export class RepeatMoveAttr extends MoveEffectAttr {
};
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
// TODO: Make the AI actually use instruct
/* Ideally, the AI would score instruct based on the scorings of the on-field pokemons'
* last used moves at the time of using Instruct (by the time the instructor gets to act)
@ -7746,7 +7746,7 @@ export class ShiftStatAttr extends MoveEffectAttr {
* @param move n/a
* @returns number of points to add to the user's benefit score
*/
override getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
override getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return user.getStat(this.statToSwitchWith, false) > user.getStat(this.statToSwitch, false) ? 10 : 0;
}
}
@ -7798,7 +7798,7 @@ export class AverageStatsAttr extends MoveEffectAttr {
}
export class DiscourageFrequentUseAttr extends MoveAttr {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
const lastMoves = user.getLastXMoves(4);
console.log(lastMoves);
for (let m = 0; m < lastMoves.length; m++) {
@ -8052,7 +8052,7 @@ export class MoveCondition {
return this.func(user, target, move);
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return 0;
}
}
@ -8062,7 +8062,7 @@ export class FirstMoveCondition extends MoveCondition {
super((user, target, move) => user.battleSummonData?.waveTurnCount === 1);
}
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return this.apply(user, target, move) ? 10 : -20;
}
}

View File

@ -624,7 +624,7 @@ export async function catchPokemon(pokemon: EnemyPokemon, pokeball: Phaser.GameO
});
}, false);
}, () => {
globalScene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, 0, (slotIndex: integer, _option: PartyOption) => {
globalScene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, 0, (slotIndex: number, _option: PartyOption) => {
globalScene.ui.setMode(Mode.MESSAGE).then(() => {
if (slotIndex < 6) {
addToParty(slotIndex);

View File

@ -4,7 +4,7 @@ import { NumberHolder } from "#app/utils";
import { PokeballType } from "#enums/pokeball";
import i18next from "i18next";
export const MAX_PER_TYPE_POKEBALLS: integer = 99;
export const MAX_PER_TYPE_POKEBALLS: number = 99;
export function getPokeballAtlasKey(type: PokeballType): string {
switch (type) {

View File

@ -718,7 +718,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
* The calculation with evolution delay is a weighted average of the easeIn and easeOut functions where preferredMinLevel is the denominator.
* This also means a lower value of x will lead to a higher evolution chance.
* @param strength {@linkcode PartyMemberStrength} The strength of the party member in question
* @returns {@linkcode integer} The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance.
* @returns {@linkcode number} The level difference from expected evolution level tolerated for a mon to be unevolved. Lower value = higher evolution chance.
*/
private getStrengthLevelDiff(strength: PartyMemberStrength): number {
switch (Math.min(strength, PartyMemberStrength.STRONGER)) {

View File

@ -15,9 +15,9 @@ export enum TerrainType {
export class Terrain {
public terrainType: TerrainType;
public turnsLeft: integer;
public turnsLeft: number;
constructor(terrainType: TerrainType, turnsLeft?: integer) {
constructor(terrainType: TerrainType, turnsLeft?: number) {
this.terrainType = terrainType;
this.turnsLeft = turnsLeft || 0;
}
@ -81,7 +81,7 @@ export function getTerrainName(terrainType: TerrainType): string {
}
export function getTerrainColor(terrainType: TerrainType): [ integer, integer, integer ] {
export function getTerrainColor(terrainType: TerrainType): [ number, number, number ] {
switch (terrainType) {
case TerrainType.MISTY:
return [ 232, 136, 200 ];

View File

@ -35,7 +35,7 @@ export enum TrainerPoolTier {
}
export interface TrainerTierPools {
[key: integer]: Species[]
[key: number]: Species[]
}
export enum TrainerSlot {
@ -45,27 +45,27 @@ export enum TrainerSlot {
}
export class TrainerPartyTemplate {
public size: integer;
public size: number;
public strength: PartyMemberStrength;
public sameSpecies: boolean;
public balanced: boolean;
constructor(size: integer, strength: PartyMemberStrength, sameSpecies?: boolean, balanced?: boolean) {
constructor(size: number, strength: PartyMemberStrength, sameSpecies?: boolean, balanced?: boolean) {
this.size = size;
this.strength = strength;
this.sameSpecies = !!sameSpecies;
this.balanced = !!balanced;
}
getStrength(index: integer): PartyMemberStrength {
getStrength(index: number): PartyMemberStrength {
return this.strength;
}
isSameSpecies(index: integer): boolean {
isSameSpecies(index: number): boolean {
return this.sameSpecies;
}
isBalanced(index: integer): boolean {
isBalanced(index: number): boolean {
return this.balanced;
}
}
@ -74,14 +74,14 @@ export class TrainerPartyCompoundTemplate extends TrainerPartyTemplate {
public templates: TrainerPartyTemplate[];
constructor(...templates: TrainerPartyTemplate[]) {
super(templates.reduce((total: integer, template: TrainerPartyTemplate) => {
super(templates.reduce((total: number, template: TrainerPartyTemplate) => {
total += template.size;
return total;
}, 0), PartyMemberStrength.AVERAGE);
this.templates = templates;
}
getStrength(index: integer): PartyMemberStrength {
getStrength(index: number): PartyMemberStrength {
let t = 0;
for (const template of this.templates) {
if (t + template.size > index) {
@ -93,7 +93,7 @@ export class TrainerPartyCompoundTemplate extends TrainerPartyTemplate {
return super.getStrength(index);
}
isSameSpecies(index: integer): boolean {
isSameSpecies(index: number): boolean {
let t = 0;
for (const template of this.templates) {
if (t + template.size > index) {
@ -105,7 +105,7 @@ export class TrainerPartyCompoundTemplate extends TrainerPartyTemplate {
return super.isSameSpecies(index);
}
isBalanced(index: integer): boolean {
isBalanced(index: number): boolean {
let t = 0;
for (const template of this.templates) {
if (t + template.size > index) {
@ -173,11 +173,11 @@ export const trainerPartyTemplates = {
};
type PartyTemplateFunc = () => TrainerPartyTemplate;
type PartyMemberFunc = (level: integer, strength: PartyMemberStrength) => EnemyPokemon;
type PartyMemberFunc = (level: number, strength: PartyMemberStrength) => EnemyPokemon;
type GenModifiersFunc = (party: EnemyPokemon[]) => PersistentModifier[];
export interface PartyMemberFuncs {
[key: integer]: PartyMemberFunc
[key: number]: PartyMemberFunc
}
export class TrainerConfig {
@ -524,7 +524,7 @@ export class TrainerConfig {
return this;
}
setPartyMemberFunc(slotIndex: integer, partyMemberFunc: PartyMemberFunc): TrainerConfig {
setPartyMemberFunc(slotIndex: number, partyMemberFunc: PartyMemberFunc): TrainerConfig {
this.partyMemberFuncs[slotIndex] = partyMemberFunc;
return this;
}
@ -1125,7 +1125,7 @@ export class TrainerConfig {
let t = 0;
interface TrainerConfigs {
[key: integer]: TrainerConfig
[key: number]: TrainerConfig
}
/**
@ -1197,7 +1197,7 @@ function getSpeciesFilterRandomPartyMemberFunc(
};
}
function getRandomTeraModifiers(party: EnemyPokemon[], count: integer, types?: Type[]): PersistentModifier[] {
function getRandomTeraModifiers(party: EnemyPokemon[], count: number, types?: Type[]): PersistentModifier[] {
const ret: PersistentModifier[] = [];
const partyMemberIndexes = new Array(party.length).fill(null).map((_, i) => i);
for (let t = 0; t < Math.min(count, party.length); t++) {

View File

@ -16,7 +16,7 @@ class TrainerNameConfig {
}
interface TrainerNameConfigs {
[key: integer]: TrainerNameConfig
[key: number]: TrainerNameConfig
}
// used in a commented code

View File

@ -313,7 +313,7 @@ export function getTypeDamageMultiplierColor(multiplier: TypeDamageMultiplier, s
}
}
export function getTypeRgb(type: Type): [ integer, integer, integer ] {
export function getTypeRgb(type: Type): [ number, number, number ] {
switch (type) {
case Type.NORMAL:
return [ 168, 168, 120 ];

View File

@ -8,7 +8,7 @@ export const variantData: any = {};
export const variantColorCache = {};
export function getVariantTint(variant: Variant): integer {
export function getVariantTint(variant: Variant): number {
switch (variant) {
case 0:
return 0xf8c020;
@ -19,7 +19,7 @@ export function getVariantTint(variant: Variant): integer {
}
}
export function getVariantIcon(variant: Variant): integer {
export function getVariantIcon(variant: Variant): number {
switch (variant) {
case 0:
return VariantTier.STANDARD;

View File

@ -14,9 +14,9 @@ import type { Arena } from "#app/field/arena";
export class Weather {
public weatherType: WeatherType;
public turnsLeft: integer;
public turnsLeft: number;
constructor(weatherType: WeatherType, turnsLeft?: integer) {
constructor(weatherType: WeatherType, turnsLeft?: number) {
this.weatherType = weatherType;
this.turnsLeft = !this.isImmutable() ? turnsLeft || 0 : 0;
}
@ -246,7 +246,7 @@ export function getTerrainBlockMessage(pokemon: Pokemon, terrainType: TerrainTyp
export interface WeatherPoolEntry {
weatherType: WeatherType;
weight: integer;
weight: number;
}
export function getRandomWeatherType(arena: Arena): WeatherType {

View File

@ -12,7 +12,7 @@ export enum EggEventType {
*/
export class EggCountChangedEvent extends Event {
/** The updated egg count. */
public eggCount: integer;
public eggCount: number;
constructor(eggCount: number) {
super(EggEventType.EGG_COUNT_CHANGED);

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