Merge branch 'beta' into bulkgacha

This commit is contained in:
NightKev 2025-01-20 06:16:55 -08:00
commit f8b80b0444
47 changed files with 357 additions and 4199 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -4,6 +4,8 @@
"ffee52": "37d6de", "ffee52": "37d6de",
"debd29": "078a8f", "debd29": "078a8f",
"833100": "002112", "833100": "002112",
"830009": "23033b",
"189d87": "c2247b",
"ff7b73": "712f8f", "ff7b73": "712f8f",
"de4141": "3f1375", "de4141": "3f1375",
"ffbdbd": "a266b0", "ffbdbd": "a266b0",
@ -11,6 +13,7 @@
"107b6a": "9e1976", "107b6a": "9e1976",
"105241": "4f2800", "105241": "4f2800",
"83de7b": "a37707", "83de7b": "a37707",
"2e5529": "38001c",
"5a9c39": "705207", "5a9c39": "705207",
"20b49c": "de3592", "20b49c": "de3592",
"fdfdfd": "fdfdfd", "fdfdfd": "fdfdfd",
@ -21,14 +24,17 @@
"ffee52": "f75ea8", "ffee52": "f75ea8",
"debd29": "a30a66", "debd29": "a30a66",
"833100": "0b2e01", "833100": "0b2e01",
"830009": "154205",
"189d87": "f17f05",
"ff7b73": "9db042", "ff7b73": "9db042",
"de4141": "3c8227", "de4141": "3c8227",
"ffbdbd": "e7e385", "ffbdbd": "e7e385",
"101010": "101010", "101010": "101010",
"107b6a": "d44300", "107b6a": "d44300",
"105241": "030129", "105241": "381601",
"83de7b": "433d99", "83de7b": "80ced9",
"5a9c39": "19164f", "2e5519": "011c38",
"5a9c39": "446b94",
"20b49c": "fa8405", "20b49c": "fa8405",
"fdfdfd": "fdfdfd", "fdfdfd": "fdfdfd",
"5ad5c5": "faa405" "5ad5c5": "faa405"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,6 +1,7 @@
{ {
"1": { "1": {
"843100": "033b22", "843100": "033b22",
"830009": "23033b",
"ff7b73": "712f8f", "ff7b73": "712f8f",
"ffbdbd": "a266b0", "ffbdbd": "a266b0",
"debd29": "078a8f", "debd29": "078a8f",
@ -13,11 +14,13 @@
"5a9c3a": "b34952", "5a9c3a": "b34952",
"84de7b": "ff745e", "84de7b": "ff745e",
"5ad6c5": "f062a4", "5ad6c5": "f062a4",
"2e5519": "38001c",
"21b59c": "de3592", "21b59c": "de3592",
"ffffff": "ffffff" "ffffff": "ffffff"
}, },
"2": { "2": {
"843100": "420514", "843100": "420514",
"830009": "154205",
"ff7b73": "9db042", "ff7b73": "9db042",
"ffbdbd": "e7e385", "ffbdbd": "e7e385",
"debd29": "a30a66", "debd29": "a30a66",
@ -30,6 +33,7 @@
"5a9c3a": "446b94", "5a9c3a": "446b94",
"84de7b": "80ced9", "84de7b": "80ced9",
"5ad6c5": "faa405", "5ad6c5": "faa405",
"2e5519": "011c38",
"21b59c": "fa8405", "21b59c": "fa8405",
"ffffff": "ffffff" "ffffff": "ffffff"
} }

View File

@ -835,7 +835,7 @@
"6713": [0, 1, 1], "6713": [0, 1, 1],
"8901": [1, 1, 1], "8901": [1, 1, 1],
"female": { "female": {
"3": [0, 2, 1], "3": [0, 1, 1],
"19": [0, 1, 1], "19": [0, 1, 1],
"20": [0, 1, 1], "20": [0, 1, 1],
"25": [0, 1, 1], "25": [0, 1, 1],
@ -869,6 +869,7 @@
"198": [0, 1, 1], "198": [0, 1, 1],
"203": [0, 1, 1], "203": [0, 1, 1],
"207": [0, 1, 1], "207": [0, 1, 1],
"212": [1, 1, 1],
"215": [0, 1, 1], "215": [0, 1, 1],
"217": [1, 1, 1], "217": [1, 1, 1],
"229": [0, 1, 1], "229": [0, 1, 1],
@ -1778,6 +1779,7 @@
"198": [0, 1, 1], "198": [0, 1, 1],
"203": [0, 1, 1], "203": [0, 1, 1],
"207": [0, 1, 1], "207": [0, 1, 1],
"212": [1, 1, 1],
"215": [0, 1, 1], "215": [0, 1, 1],
"217": [1, 1, 1], "217": [1, 1, 1],
"229": [0, 1, 1], "229": [0, 1, 1],

View File

@ -1,6 +1,7 @@
{ {
"1": { "1": {
"833100": "180136", "833100": "180136",
"830009": "23033b",
"bd6a31": "012729", "bd6a31": "012729",
"ffee52": "37d6de", "ffee52": "37d6de",
"debd29": "078a8f", "debd29": "078a8f",
@ -8,15 +9,18 @@
"de4141": "3f1375", "de4141": "3f1375",
"ff7b73": "712f8f", "ff7b73": "712f8f",
"ffbdbd": "a266b0", "ffbdbd": "a266b0",
"5a9c39": "705207", "e8a3a3": "91579e",
"105241": "4f2800", "5a9c39": "b34952",
"83de7b": "a37707", "105241": "190038",
"2e5519": "38001c",
"83de7b": "ff745e",
"107b6a": "b80479", "107b6a": "b80479",
"20b49c": "de3592", "20b49c": "de3592",
"fdfdfd": "fdfdfd" "fdfdfd": "fdfdfd"
}, },
"2": { "2": {
"833100": "0b2e01", "833100": "0b2e01",
"830009": "154205",
"bd6a31": "420514", "bd6a31": "420514",
"ffee52": "f75ea8", "ffee52": "f75ea8",
"debd29": "a30a66", "debd29": "a30a66",
@ -24,9 +28,11 @@
"de4141": "3c8227", "de4141": "3c8227",
"ff7b73": "9db042", "ff7b73": "9db042",
"ffbdbd": "e7e385", "ffbdbd": "e7e385",
"5a9c39": "19164f", "e8a3a3": "ced76f",
"105241": "030129", "5a9c39": "446b94",
"83de7b": "433d99", "105241": "381601",
"2e5519": "011c38",
"83de7b": "80ced9",
"107b6a": "d15d04", "107b6a": "d15d04",
"20b49c": "fa8405", "20b49c": "fa8405",
"fdfdfd": "fdfdfd" "fdfdfd": "fdfdfd"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,6 +1,7 @@
{ {
"1": { "1": {
"843100": "033b22", "843100": "033b22",
"830009": "23033b",
"ffbdbd": "a266b0", "ffbdbd": "a266b0",
"ff7b73": "712f8f", "ff7b73": "712f8f",
"debd29": "078a8f", "debd29": "078a8f",
@ -11,6 +12,7 @@
"105242": "190038", "105242": "190038",
"107b6b": "c21f7e", "107b6b": "c21f7e",
"5a9c3a": "b34952", "5a9c3a": "b34952",
"2e5519": "38001c",
"5ad6c5": "f062a4", "5ad6c5": "f062a4",
"21b59c": "de3592", "21b59c": "de3592",
"84de7b": "ff745e", "84de7b": "ff745e",
@ -18,6 +20,7 @@
}, },
"2": { "2": {
"843100": "420514", "843100": "420514",
"830009": "154205",
"ffbdbd": "e7e385", "ffbdbd": "e7e385",
"ff7b73": "9db042", "ff7b73": "9db042",
"debd29": "a30a66", "debd29": "a30a66",
@ -25,7 +28,8 @@
"de4242": "3c8227", "de4242": "3c8227",
"101010": "101010", "101010": "101010",
"ffef52": "f75ea8", "ffef52": "f75ea8",
"105242": "001a33", "105242": "381601",
"2e5519": "011c38",
"107b6b": "d15d04", "107b6b": "d15d04",
"5a9c3a": "446b94", "5a9c3a": "446b94",
"5ad6c5": "faa405", "5ad6c5": "faa405",

View File

@ -9,7 +9,7 @@
"de62a4": "ffc668", "de62a4": "ffc668",
"4a83a4": "387fa7", "4a83a4": "387fa7",
"314a62": "244260", "314a62": "244260",
"70bbb4": "f8d371", "548e88": "2d60bb",
"a4295a": "cc762f" "a4295a": "cc762f"
}, },
"1": { "1": {
@ -22,7 +22,7 @@
"de62a4": "ffdf90", "de62a4": "ffdf90",
"4a83a4": "a1c8db", "4a83a4": "a1c8db",
"314a62": "7396b4", "314a62": "7396b4",
"70bbb4": "70bbb4", "548e88": "a9c0c6",
"a4295a": "e28c27" "a4295a": "e28c27"
}, },
"2": { "2": {
@ -35,7 +35,7 @@
"de62a4": "e25038", "de62a4": "e25038",
"4a83a4": "e6aa47", "4a83a4": "e6aa47",
"314a62": "b56f2a", "314a62": "b56f2a",
"70bbb4": "f8d371", "548e88": "e0b544",
"a4295a": "a62a21" "a4295a": "a62a21"
} }
} }

View File

@ -0,0 +1,41 @@
{
"0": {
"632929": "215a2d",
"f76b6b": "8cce73",
"a52929": "2f794e",
"101010": "101010",
"d63a3a": "4a9c53",
"9494a5": "9494a5",
"ffffff": "ffffff",
"b5b5ce": "b5b5ce",
"3a3a4a": "3a3a4a",
"9c6b21": "9c6b21",
"dec510": "dec510"
},
"1": {
"632929": "2f2962",
"f76b6b": "639cf7",
"a52929": "29429c",
"101010": "101010",
"d63a3a": "4263ef",
"9494a5": "6262a4",
"ffffff": "ffffff",
"b5b5ce": "b5b5ce",
"3a3a4a": "3c3c50",
"9c6b21": "131387",
"dec510": "10bdde"
},
"2": {
"632929": "645117",
"f76b6b": "c59f29",
"a52929": "b88619",
"101010": "101010",
"d63a3a": "ffca2a",
"9494a5": "3c4543",
"ffffff": "ffffff",
"b5b5ce": "b5b5ce",
"3a3a4a": "282d2c",
"9c6b21": "9c6b21",
"dec510": "dec510"
}
}

View File

@ -1,6 +1,7 @@
{ {
"1": { "1": {
"843100": "033b22", "843100": "033b22",
"830009": "23033b",
"ffbdbd": "a266b0", "ffbdbd": "a266b0",
"ffef52": "37d6de", "ffef52": "37d6de",
"debd29": "078a8f", "debd29": "078a8f",
@ -10,6 +11,7 @@
"101010": "101010", "101010": "101010",
"105242": "190038", "105242": "190038",
"107b6b": "9e1976", "107b6b": "9e1976",
"2e5519": "38001c",
"5a9c3a": "b34952", "5a9c3a": "b34952",
"5ad6c5": "f062a4", "5ad6c5": "f062a4",
"21b59c": "de3592", "21b59c": "de3592",
@ -18,6 +20,7 @@
}, },
"2": { "2": {
"843100": "420514", "843100": "420514",
"830009": "154205",
"ffbdbd": "e7e385", "ffbdbd": "e7e385",
"ffef52": "f75ea8", "ffef52": "f75ea8",
"debd29": "a30a66", "debd29": "a30a66",
@ -27,6 +30,7 @@
"101010": "101010", "101010": "101010",
"105242": "381601", "105242": "381601",
"107b6b": "d15d04", "107b6b": "d15d04",
"2e5519": "011c38",
"5a9c3a": "446b94", "5a9c3a": "446b94",
"5ad6c5": "faa405", "5ad6c5": "faa405",
"21b59c": "fa8405", "21b59c": "fa8405",

View File

@ -8,7 +8,7 @@
"0f0f0f": "0f0f0f", "0f0f0f": "0f0f0f",
"314a62": "244260", "314a62": "244260",
"621841": "71370f", "621841": "71370f",
"70bbb4": "f8d371", "548e88": "2d60bb",
"de62a4": "ffc668", "de62a4": "ffc668",
"a4295a": "cc762f" "a4295a": "cc762f"
}, },
@ -21,7 +21,7 @@
"0f0f0f": "0f0f0f", "0f0f0f": "0f0f0f",
"314a62": "7396b4", "314a62": "7396b4",
"621841": "7b3c08", "621841": "7b3c08",
"70bbb4": "70bbb4", "548e88": "a9c0c6",
"de62a4": "ffdf90", "de62a4": "ffdf90",
"a4295a": "e28c27" "a4295a": "e28c27"
}, },
@ -34,7 +34,7 @@
"0f0f0f": "0f0f0f", "0f0f0f": "0f0f0f",
"314a62": "b56f2a", "314a62": "b56f2a",
"621841": "5a0a05", "621841": "5a0a05",
"70bbb4": "f8d371", "548e88": "e0b544",
"de62a4": "e25038", "de62a4": "e25038",
"a4295a": "a62a21" "a4295a": "a62a21"
} }

View File

@ -0,0 +1,41 @@
{
"0": {
"632929": "215a2d",
"f76b6b": "8cce73",
"101010": "101010",
"3a3a4a": "3a3a4a",
"ffffff": "ffffff",
"d63a3a": "4a9c53",
"b5b5ce": "b5b5ce",
"9494a5": "9494a5",
"a52929": "2f794e",
"dec510": "dec510",
"9c6b21": "9c6b21"
},
"1": {
"632929": "2f2962",
"f76b6b": "639cf7",
"101010": "101010",
"3a3a4a": "3c3c50",
"ffffff": "ffffff",
"d63a3a": "4263ef",
"b5b5ce": "b5b5ce",
"9494a5": "6262a4",
"a52929": "29429c",
"dec510": "10bdde",
"9c6b21": "131387"
},
"2": {
"632929": "645117",
"f76b6b": "c59f29",
"101010": "101010",
"3a3a4a": "282d2c",
"ffffff": "ffffff",
"d63a3a": "ffca2a",
"b5b5ce": "b5b5ce",
"9494a5": "3c4543",
"a52929": "b88619",
"dec510": "dec510",
"9c6b21": "9c6b21"
}
}

View File

@ -1,19 +1,41 @@
{ {
"1": {
"843100": "033b22",
"830009": "23033b",
"ffbdbd": "a266b0",
"ffef52": "37d6de",
"debd29": "078a8f",
"ff7b73": "712f8f",
"bd6b31": "168a69",
"de4242": "3f1375",
"101010": "101010",
"105242": "190038",
"107b6b": "9e1976",
"2e5519": "38001c",
"5a9c3a": "b34952",
"5ad6c5": "f062a4",
"21b59c": "de3592",
"84de7b": "ff745e",
"ffffff": "ffffff"
},
"2": { "2": {
"843100": "420514", "843100": "420514",
"ff7b73": "9db042", "830009": "154205",
"ffbdbd": "e7e385", "ffbdbd": "e7e385",
"ffef52": "f75ea8", "ffef52": "f75ea8",
"debd29": "a30a66", "debd29": "a30a66",
"ff7b73": "9db042",
"bd6b31": "852a41", "bd6b31": "852a41",
"de4242": "3c8227", "de4242": "3c8227",
"101010": "101010", "101010": "101010",
"105242": "381601", "105242": "381601",
"107b6b": "d44300", "107b6b": "d15d04",
"2e5519": "011c38",
"5a9c3a": "446b94", "5a9c3a": "446b94",
"84de7b": "80ced9",
"5ad6c5": "faa405", "5ad6c5": "faa405",
"21b59c": "fa8405", "21b59c": "fa8405",
"ffffff": "ffffff" "84de7b": "80ced9",
"ffffff": "ffffff",
"2f561a": "011b34"
} }
} }

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 985 B

View File

@ -112,7 +112,7 @@ import { ExpGainsSpeed } from "#enums/exp-gains-speed";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#app/data/balance/starters"; import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#app/data/balance/starters";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import { globalScene, initGlobalScene } from "#app/global-scene"; import { initGlobalScene } from "#app/global-scene";
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
@ -394,10 +394,10 @@ export default class BattleScene extends SceneBase {
const originalRealInRange = Phaser.Math.RND.realInRange; const originalRealInRange = Phaser.Math.RND.realInRange;
Phaser.Math.RND.realInRange = function (min: number, max: number): number { Phaser.Math.RND.realInRange = function (min: number, max: number): number {
const ret = originalRealInRange.apply(this, [ min, max ]); const ret = originalRealInRange.apply(this, [ min, max ]);
const args = [ "RNG", ++globalScene.rngCounter, ret / (max - min), `min: ${min} / max: ${max}` ]; const args = [ "RNG", ++this.rngCounter, ret / (max - min), `min: ${min} / max: ${max}` ];
args.push(`seed: ${globalScene.rngSeedOverride || globalScene.waveSeed || globalScene.seed}`); args.push(`seed: ${this.rngSeedOverride || this.waveSeed || this.seed}`);
if (globalScene.rngOffset) { if (this.rngOffset) {
args.push(`offset: ${globalScene.rngOffset}`); args.push(`offset: ${this.rngOffset}`);
} }
console.log(...args); console.log(...args);
return ret; return ret;
@ -410,7 +410,7 @@ export default class BattleScene extends SceneBase {
} }
create() { create() {
globalScene.scene.remove(LoadingScene.KEY); this.scene.remove(LoadingScene.KEY);
initGameSpeed.apply(this); initGameSpeed.apply(this);
this.inputController = new InputsController(); this.inputController = new InputsController();
this.uiInputs = new UiInputs(this.inputController); this.uiInputs = new UiInputs(this.inputController);
@ -2954,7 +2954,7 @@ export default class BattleScene extends SceneBase {
*/ */
applyShuffledModifiers<T extends PersistentModifier>(modifierType: Constructor<T>, player: boolean = true, ...args: Parameters<T["apply"]>): T[] { applyShuffledModifiers<T extends PersistentModifier>(modifierType: Constructor<T>, player: boolean = true, ...args: Parameters<T["apply"]>): T[] {
let modifiers = (player ? this.modifiers : this.enemyModifiers).filter((m): m is T => m instanceof modifierType && m.shouldApply(...args)); let modifiers = (player ? this.modifiers : this.enemyModifiers).filter((m): m is T => m instanceof modifierType && m.shouldApply(...args));
globalScene.executeWithSeedOffset(() => { this.executeWithSeedOffset(() => {
const shuffleModifiers = mods => { const shuffleModifiers = mods => {
if (mods.length < 1) { if (mods.length < 1) {
return mods; return mods;
@ -2963,7 +2963,7 @@ export default class BattleScene extends SceneBase {
return [ mods[rand], ...shuffleModifiers(mods.filter((_, i) => i !== rand)) ]; return [ mods[rand], ...shuffleModifiers(mods.filter((_, i) => i !== rand)) ];
}; };
modifiers = shuffleModifiers(modifiers); modifiers = shuffleModifiers(modifiers);
}, globalScene.currentBattle.turn << 4, globalScene.waveSeed); }, this.currentBattle.turn << 4, this.waveSeed);
return this.applyModifiersInternal(modifiers, player, args); return this.applyModifiersInternal(modifiers, player, args);
} }

View File

@ -51,9 +51,7 @@ export const speciesStarterCosts = {
[Species.SANDSHREW]: 2, [Species.SANDSHREW]: 2,
[Species.NIDORAN_F]: 3, [Species.NIDORAN_F]: 3,
[Species.NIDORAN_M]: 3, [Species.NIDORAN_M]: 3,
[Species.CLEFAIRY]: 3,
[Species.VULPIX]: 3, [Species.VULPIX]: 3,
[Species.JIGGLYPUFF]: 2,
[Species.ZUBAT]: 3, [Species.ZUBAT]: 3,
[Species.ODDISH]: 3, [Species.ODDISH]: 3,
[Species.PARAS]: 2, [Species.PARAS]: 2,
@ -84,22 +82,15 @@ export const speciesStarterCosts = {
[Species.VOLTORB]: 2, [Species.VOLTORB]: 2,
[Species.EXEGGCUTE]: 3, [Species.EXEGGCUTE]: 3,
[Species.CUBONE]: 3, [Species.CUBONE]: 3,
[Species.HITMONLEE]: 4,
[Species.HITMONCHAN]: 4,
[Species.LICKITUNG]: 3, [Species.LICKITUNG]: 3,
[Species.KOFFING]: 2, [Species.KOFFING]: 2,
[Species.RHYHORN]: 4, [Species.RHYHORN]: 4,
[Species.CHANSEY]: 3,
[Species.TANGELA]: 3, [Species.TANGELA]: 3,
[Species.KANGASKHAN]: 4, [Species.KANGASKHAN]: 4,
[Species.HORSEA]: 3, [Species.HORSEA]: 3,
[Species.GOLDEEN]: 2, [Species.GOLDEEN]: 2,
[Species.STARYU]: 3, [Species.STARYU]: 3,
[Species.MR_MIME]: 3,
[Species.SCYTHER]: 5, [Species.SCYTHER]: 5,
[Species.JYNX]: 4,
[Species.ELECTABUZZ]: 4,
[Species.MAGMAR]: 4,
[Species.PINSIR]: 4, [Species.PINSIR]: 4,
[Species.TAUROS]: 4, [Species.TAUROS]: 4,
[Species.MAGIKARP]: 4, [Species.MAGIKARP]: 4,
@ -110,7 +101,6 @@ export const speciesStarterCosts = {
[Species.OMANYTE]: 3, [Species.OMANYTE]: 3,
[Species.KABUTO]: 3, [Species.KABUTO]: 3,
[Species.AERODACTYL]: 5, [Species.AERODACTYL]: 5,
[Species.SNORLAX]: 5,
[Species.ARTICUNO]: 5, [Species.ARTICUNO]: 5,
[Species.ZAPDOS]: 6, [Species.ZAPDOS]: 6,
[Species.MOLTRES]: 6, [Species.MOLTRES]: 6,
@ -132,8 +122,6 @@ export const speciesStarterCosts = {
[Species.TOGEPI]: 3, [Species.TOGEPI]: 3,
[Species.NATU]: 2, [Species.NATU]: 2,
[Species.MAREEP]: 2, [Species.MAREEP]: 2,
[Species.MARILL]: 4,
[Species.SUDOWOODO]: 3,
[Species.HOPPIP]: 2, [Species.HOPPIP]: 2,
[Species.AIPOM]: 2, [Species.AIPOM]: 2,
[Species.SUNKERN]: 1, [Species.SUNKERN]: 1,
@ -142,7 +130,6 @@ export const speciesStarterCosts = {
[Species.MURKROW]: 3, [Species.MURKROW]: 3,
[Species.MISDREAVUS]: 2, [Species.MISDREAVUS]: 2,
[Species.UNOWN]: 1, [Species.UNOWN]: 1,
[Species.WOBBUFFET]: 2,
[Species.GIRAFARIG]: 3, [Species.GIRAFARIG]: 3,
[Species.PINECO]: 2, [Species.PINECO]: 2,
[Species.DUNSPARCE]: 3, [Species.DUNSPARCE]: 3,
@ -158,7 +145,6 @@ export const speciesStarterCosts = {
[Species.CORSOLA]: 2, [Species.CORSOLA]: 2,
[Species.REMORAID]: 2, [Species.REMORAID]: 2,
[Species.DELIBIRD]: 2, [Species.DELIBIRD]: 2,
[Species.MANTINE]: 3,
[Species.SKARMORY]: 4, [Species.SKARMORY]: 4,
[Species.HOUNDOUR]: 3, [Species.HOUNDOUR]: 3,
[Species.PHANPY]: 3, [Species.PHANPY]: 3,
@ -206,7 +192,6 @@ export const speciesStarterCosts = {
[Species.MINUN]: 2, [Species.MINUN]: 2,
[Species.VOLBEAT]: 2, [Species.VOLBEAT]: 2,
[Species.ILLUMISE]: 2, [Species.ILLUMISE]: 2,
[Species.ROSELIA]: 3,
[Species.GULPIN]: 1, [Species.GULPIN]: 1,
[Species.CARVANHA]: 3, [Species.CARVANHA]: 3,
[Species.WAILMER]: 2, [Species.WAILMER]: 2,
@ -232,7 +217,6 @@ export const speciesStarterCosts = {
[Species.SHUPPET]: 2, [Species.SHUPPET]: 2,
[Species.DUSKULL]: 3, [Species.DUSKULL]: 3,
[Species.TROPIUS]: 3, [Species.TROPIUS]: 3,
[Species.CHIMECHO]: 3,
[Species.ABSOL]: 4, [Species.ABSOL]: 4,
[Species.WYNAUT]: 2, [Species.WYNAUT]: 2,
[Species.SNORUNT]: 2, [Species.SNORUNT]: 2,
@ -543,7 +527,6 @@ export const speciesStarterCosts = {
[Species.GALAR_PONYTA]: 2, [Species.GALAR_PONYTA]: 2,
[Species.GALAR_SLOWPOKE]: 3, [Species.GALAR_SLOWPOKE]: 3,
[Species.GALAR_FARFETCHD]: 3, [Species.GALAR_FARFETCHD]: 3,
[Species.GALAR_MR_MIME]: 3,
[Species.GALAR_ARTICUNO]: 6, [Species.GALAR_ARTICUNO]: 6,
[Species.GALAR_ZAPDOS]: 6, [Species.GALAR_ZAPDOS]: 6,
[Species.GALAR_MOLTRES]: 6, [Species.GALAR_MOLTRES]: 6,

View File

@ -5,7 +5,8 @@ import type { Nature } from "#enums/nature";
/** /**
* Data that can customize a Pokemon in non-standard ways from its Species * Data that can customize a Pokemon in non-standard ways from its Species
* Currently only used by Mystery Encounters and Mints. * Used by Mystery Encounters and Mints
* Also used as a counter how often a Pokemon got hit until new arena encounter
*/ */
export class CustomPokemonData { export class CustomPokemonData {
public spriteScale: number; public spriteScale: number;
@ -13,6 +14,8 @@ export class CustomPokemonData {
public passive: Abilities | -1; public passive: Abilities | -1;
public nature: Nature | -1; public nature: Nature | -1;
public types: Type[]; public types: Type[];
/** `hitsReceivedCount` aka `hitsRecCount` saves how often the pokemon got hit until a new arena encounter (used for Rage Fist) */
public hitsRecCount: number;
constructor(data?: CustomPokemonData | Partial<CustomPokemonData>) { constructor(data?: CustomPokemonData | Partial<CustomPokemonData>) {
if (!isNullOrUndefined(data)) { if (!isNullOrUndefined(data)) {
@ -24,5 +27,10 @@ export class CustomPokemonData {
this.passive = this.passive ?? -1; this.passive = this.passive ?? -1;
this.nature = this.nature ?? -1; this.nature = this.nature ?? -1;
this.types = this.types ?? []; this.types = this.types ?? [];
this.hitsRecCount = this.hitsRecCount ?? 0;
}
resetHitReceivedCount(): void {
this.hitsRecCount = 0;
} }
} }

View File

@ -3993,12 +3993,32 @@ export class FriendshipPowerAttr extends VariablePowerAttr {
} }
} }
export class HitCountPowerAttr extends VariablePowerAttr { /**
* This Attribute calculates the current power of {@linkcode Moves.RAGE_FIST}.
* The counter for power calculation does not reset on every wave but on every new arena encounter
*/
export class RageFistPowerAttr extends VariablePowerAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
(args[0] as Utils.NumberHolder).value += Math.min(user.battleData.hitCount, 6) * 50; const { hitCount, prevHitCount } = user.battleData;
const basePower: Utils.NumberHolder = args[0];
this.updateHitReceivedCount(user, hitCount, prevHitCount);
basePower.value = 50 + (Math.min(user.customPokemonData.hitsRecCount, 6) * 50);
return true; return true;
} }
/**
* Updates the number of hits the Pokemon has taken in battle
* @param user Pokemon calling Rage Fist
* @param hitCount The number of received hits this battle
* @param previousHitCount The number of received hits this battle since last time Rage Fist was used
*/
protected updateHitReceivedCount(user: Pokemon, hitCount: number, previousHitCount: number): void {
user.customPokemonData.hitsRecCount += (hitCount - previousHitCount);
user.battleData.prevHitCount = hitCount;
}
} }
/** /**
@ -10991,8 +11011,8 @@ export function initMoves() {
new AttackMove(Moves.TWIN_BEAM, Type.PSYCHIC, MoveCategory.SPECIAL, 40, 100, 10, -1, 0, 9) new AttackMove(Moves.TWIN_BEAM, Type.PSYCHIC, MoveCategory.SPECIAL, 40, 100, 10, -1, 0, 9)
.attr(MultiHitAttr, MultiHitType._2), .attr(MultiHitAttr, MultiHitType._2),
new AttackMove(Moves.RAGE_FIST, Type.GHOST, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 9) new AttackMove(Moves.RAGE_FIST, Type.GHOST, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 9)
.partial() // Counter resets every wave instead of on arena reset .edgeCase() // Counter incorrectly increases on confusion self-hits
.attr(HitCountPowerAttr) .attr(RageFistPowerAttr)
.punchingMove(), .punchingMove(),
new AttackMove(Moves.ARMOR_CANNON, Type.FIRE, MoveCategory.SPECIAL, 120, 100, 5, -1, 0, 9) new AttackMove(Moves.ARMOR_CANNON, Type.FIRE, MoveCategory.SPECIAL, 120, 100, 5, -1, 0, 9)
.attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true), .attr(StatStageChangeAttr, [ Stat.DEF, Stat.SPDEF ], -1, true),

View File

@ -5282,7 +5282,10 @@ export class PokemonSummonData {
} }
export class PokemonBattleData { export class PokemonBattleData {
/** counts the hits the pokemon received */
public hitCount: number = 0; public hitCount: number = 0;
/** used for {@linkcode Moves.RAGE_FIST} in order to save hit Counts received before Rage Fist is applied */
public prevHitCount: number = 0;
public endured: boolean = false; public endured: boolean = false;
public berriesEaten: BerryType[] = []; public berriesEaten: BerryType[] = [];
public abilitiesApplied: Abilities[] = []; public abilitiesApplied: Abilities[] = [];

View File

@ -1,19 +1,20 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */
import { type PokeballCounts } from "#app/battle-scene"; import { type PokeballCounts } from "#app/battle-scene";
import type { Gender } from "#app/data/gender"; import { Gender } from "#app/data/gender";
import type { Variant } from "#app/data/variant"; import { Variant } from "#app/data/variant";
import { type ModifierOverride } from "#app/modifier/modifier-type"; import { type ModifierOverride } from "#app/modifier/modifier-type";
import type { Unlockables } from "#app/system/unlockables"; import { Unlockables } from "#app/system/unlockables";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Biome } from "#enums/biome"; import { Biome } from "#enums/biome";
import type { EggTier } from "#enums/egg-type"; import { EggTier } from "#enums/egg-type";
import type { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import type { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { PokeballType } from "#enums/pokeball"; import { PokeballType } from "#enums/pokeball";
import type { Species } from "#enums/species"; import { Species } from "#enums/species";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import type { TimeOfDay } from "#enums/time-of-day"; import { TimeOfDay } from "#enums/time-of-day";
import type { VariantTier } from "#enums/variant-tier"; import { VariantTier } from "#enums/variant-tier";
import { WeatherType } from "#enums/weather-type"; import { WeatherType } from "#enums/weather-type";
/** /**

View File

@ -104,6 +104,12 @@ export class EncounterPhase extends BattlePhase {
} }
if (!this.loaded) { if (!this.loaded) {
if (battle.battleType === BattleType.TRAINER) { if (battle.battleType === BattleType.TRAINER) {
//resets hitRecCount during Trainer ecnounter
for (const pokemon of globalScene.getPlayerParty()) {
if (pokemon) {
pokemon.customPokemonData.resetHitReceivedCount();
}
}
battle.enemyParty[e] = battle.trainer?.genPartyMember(e)!; // TODO:: is the bang correct here? battle.enemyParty[e] = battle.trainer?.genPartyMember(e)!; // TODO:: is the bang correct here?
} else { } else {
let enemySpecies = globalScene.randomSpecies(battle.waveIndex, level, true); let enemySpecies = globalScene.randomSpecies(battle.waveIndex, level, true);

View File

@ -14,6 +14,7 @@ export class NewBiomeEncounterPhase extends NextEncounterPhase {
for (const pokemon of globalScene.getPlayerParty()) { for (const pokemon of globalScene.getPlayerParty()) {
if (pokemon) { if (pokemon) {
pokemon.resetBattleData(); pokemon.resetBattleData();
pokemon.customPokemonData.resetHitReceivedCount();
} }
} }

View File

@ -292,7 +292,6 @@ export function getAchievementDescription(localizationKey: string): string {
} }
export const achvs = { export const achvs = {
_10K_MONEY: new MoneyAchv("10K_MONEY", "", 10000, "nugget", 10), _10K_MONEY: new MoneyAchv("10K_MONEY", "", 10000, "nugget", 10),
_100K_MONEY: new MoneyAchv("100K_MONEY", "", 100000, "big_nugget", 25).setSecret(true), _100K_MONEY: new MoneyAchv("100K_MONEY", "", 100000, "big_nugget", 25).setSecret(true),
@ -365,7 +364,7 @@ export const achvs = {
FRESH_START: new ChallengeAchv("FRESH_START", "", "FRESH_START.description", "reviver_seed", 100, (c) => c instanceof FreshStartChallenge && c.value > 0 && !globalScene.gameMode.challenges.some(c => [ Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT ].includes(c.id) && c.value > 0)), FRESH_START: new ChallengeAchv("FRESH_START", "", "FRESH_START.description", "reviver_seed", 100, (c) => c instanceof FreshStartChallenge && c.value > 0 && !globalScene.gameMode.challenges.some(c => [ Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT ].includes(c.id) && c.value > 0)),
INVERSE_BATTLE: new ChallengeAchv("INVERSE_BATTLE", "", "INVERSE_BATTLE.description", "inverse", 100, (c) => c instanceof InverseBattleChallenge && c.value > 0), INVERSE_BATTLE: new ChallengeAchv("INVERSE_BATTLE", "", "INVERSE_BATTLE.description", "inverse", 100, (c) => c instanceof InverseBattleChallenge && c.value > 0),
FLIP_STATS: new ChallengeAchv("FLIP_STATS", "", "FLIP_STATS.description", "dubious_disc", 100, (c) => c instanceof FlipStatChallenge && c.value > 0), FLIP_STATS: new ChallengeAchv("FLIP_STATS", "", "FLIP_STATS.description", "dubious_disc", 100, (c) => c instanceof FlipStatChallenge && c.value > 0),
FLIP_INVERSE: new ChallengeAchv("FLIP_INVERSE", "", "FLIP_INVERSE.description", "cracked_pot", 100, (c) => c instanceof FlipStatChallenge && c.value > 0 && globalScene.gameMode.challenges.every(c => [ Challenges.INVERSE_BATTLE, Challenges.FLIP_STAT ].includes(c.id) && c.value > 0)), FLIP_INVERSE: new ChallengeAchv("FLIP_INVERSE", "", "FLIP_INVERSE.description", "cracked_pot", 100, (c) => c instanceof FlipStatChallenge && c.value > 0 && globalScene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0)).setSecret(),
BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 50).setSecret(), BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 50).setSecret(),
}; };

View File

@ -0,0 +1,143 @@
import { BattlerIndex } from "#app/battle";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { allMoves } from "#app/data/move";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
describe("Moves - Rage Fist", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
const move = allMoves[Moves.RAGE_FIST];
beforeAll(() => {
phaserGame = new Phaser.Game({
type: Phaser.HEADLESS,
});
});
afterEach(() => {
game.phaseInterceptor.restoreOg();
});
beforeEach(() => {
game = new GameManager(phaserGame);
game.override
.battleType("single")
.moveset([ Moves.RAGE_FIST, Moves.SPLASH, Moves.SUBSTITUTE ])
.startingLevel(100)
.enemyLevel(1)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Moves.DOUBLE_KICK);
vi.spyOn(move, "calculateBattlePower");
});
it("should have 100 more power if hit twice before calling Rage Fist", async () => {
game.override
.enemySpecies(Species.MAGIKARP);
await game.classicMode.startBattle([ Species.MAGIKARP ]);
game.move.select(Moves.RAGE_FIST);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.phaseInterceptor.to("TurnEndPhase");
expect(move.calculateBattlePower).toHaveLastReturnedWith(150);
});
it("should maintain its power during next battle if it is within the same arena encounter", async () => {
game.override
.enemySpecies(Species.MAGIKARP)
.startingWave(1);
await game.classicMode.startBattle([ Species.MAGIKARP ]);
game.move.select(Moves.RAGE_FIST);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.toNextWave();
game.move.select(Moves.RAGE_FIST);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.phaseInterceptor.to("BerryPhase", false);
expect(move.calculateBattlePower).toHaveLastReturnedWith(250);
});
it("should reset the hitRecCounter if we enter new trainer battle", async () => {
game.override
.enemySpecies(Species.MAGIKARP)
.startingWave(4);
await game.classicMode.startBattle([ Species.MAGIKARP ]);
game.move.select(Moves.RAGE_FIST);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.toNextWave();
game.move.select(Moves.RAGE_FIST);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.phaseInterceptor.to("BerryPhase", false);
expect(move.calculateBattlePower).toHaveLastReturnedWith(150);
});
it("should not increase the hitCounter if Substitute is hit", async () => {
game.override
.enemySpecies(Species.MAGIKARP)
.startingWave(4);
await game.classicMode.startBattle([ Species.MAGIKARP ]);
game.move.select(Moves.SUBSTITUTE);
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);
await game.phaseInterceptor.to("MoveEffectPhase");
expect(game.scene.getPlayerPokemon()?.customPokemonData.hitsRecCount).toBe(0);
});
it("should reset the hitRecCounter if we enter new biome", async () => {
game.override
.enemySpecies(Species.MAGIKARP)
.startingWave(10);
await game.classicMode.startBattle([ Species.MAGIKARP ]);
game.move.select(Moves.RAGE_FIST);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.toNextTurn();
game.move.select(Moves.RAGE_FIST);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.phaseInterceptor.to("BerryPhase", false);
expect(move.calculateBattlePower).toHaveLastReturnedWith(150);
});
it("should not reset the hitRecCounter if switched out", async () => {
game.override
.enemySpecies(Species.MAGIKARP)
.startingWave(1)
.enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([ Species.CHARIZARD, Species.BLASTOISE ]);
game.move.select(Moves.SPLASH);
await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]);
await game.toNextTurn();
game.doSwitchPokemon(1);
await game.toNextTurn();
game.doSwitchPokemon(1);
await game.toNextTurn();
game.move.select(Moves.RAGE_FIST);
await game.phaseInterceptor.to("MoveEndPhase");
expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.CHARIZARD);
expect(move.calculateBattlePower).toHaveLastReturnedWith(150);
});
});