labag 1.0.11 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types/JsonLaBaG.js
CHANGED
|
@@ -26,14 +26,14 @@ class JsonLaBaG extends BaseLaBaG_1.BaseLaBaG {
|
|
|
26
26
|
}
|
|
27
27
|
try {
|
|
28
28
|
const RandNums = [
|
|
29
|
-
currData["
|
|
30
|
-
currData["
|
|
31
|
-
currData["
|
|
29
|
+
currData["RandNums[0]"] ?? 0,
|
|
30
|
+
currData["RandNums[1]"] ?? 0,
|
|
31
|
+
currData["RandNums[2]"] ?? 0,
|
|
32
32
|
];
|
|
33
33
|
__1.Modes.SuperHHH.RandNum = currData["SuperHHH"] ?? 0;
|
|
34
34
|
__1.Modes.GreenWei.RandNum = currData["GreenWei"] ?? 0;
|
|
35
35
|
const RateRange = this.RateRanges[this.NowMode()];
|
|
36
|
-
const PCodes =
|
|
36
|
+
const PCodes = Array.from(P_1.P.Map.keys());
|
|
37
37
|
RandNums.forEach((RandNum, i) => {
|
|
38
38
|
const code = PCodes.find((_, j) => RandNum <= RateRange[j]);
|
|
39
39
|
if (code) {
|
package/dist/types/LaBaG.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { P } from "../types/P";
|
|
2
2
|
import { ModeNames } from "../types/Mode";
|
|
3
|
-
export type OneDataType = Partial<Record<"SuperHHH" | "GreenWei" | `
|
|
3
|
+
export type OneDataType = Partial<Record<"SuperHHH" | "GreenWei" | `RandNums[${0 | 1 | 2}]`, number>>;
|
|
4
4
|
export type AllDataType = Record<`${number}`, OneDataType>;
|
|
5
5
|
export interface LaBaG {
|
|
6
6
|
AllData: AllDataType;
|
package/package.json
CHANGED
package/src/types/BaseLaBaG.ts
CHANGED
|
@@ -84,7 +84,7 @@ export class BaseLaBaG implements LaBaG {
|
|
|
84
84
|
) as [number, number, number];
|
|
85
85
|
|
|
86
86
|
RandNums.forEach((RandNum: number, index: number) => {
|
|
87
|
-
this.OneData[`RandNums[${index}]` as
|
|
87
|
+
this.OneData[`RandNums[${index}]` as `RandNums[${0 | 1 | 2}]`] = RandNum;
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
Object.values(Modes).forEach((mode: Mode) => {
|
package/src/types/JsonLaBaG.ts
CHANGED
|
@@ -28,16 +28,16 @@ export class JsonLaBaG extends BaseLaBaG {
|
|
|
28
28
|
|
|
29
29
|
try {
|
|
30
30
|
const RandNums: [number, number, number] = [
|
|
31
|
-
currData["
|
|
32
|
-
currData["
|
|
33
|
-
currData["
|
|
31
|
+
currData["RandNums[0]"] ?? 0,
|
|
32
|
+
currData["RandNums[1]"] ?? 0,
|
|
33
|
+
currData["RandNums[2]"] ?? 0,
|
|
34
34
|
];
|
|
35
35
|
|
|
36
36
|
Modes.SuperHHH.RandNum = currData["SuperHHH"] ?? 0;
|
|
37
37
|
Modes.GreenWei.RandNum = currData["GreenWei"] ?? 0;
|
|
38
38
|
|
|
39
39
|
const RateRange = this.RateRanges[this.NowMode()];
|
|
40
|
-
const PCodes =
|
|
40
|
+
const PCodes = Array.from(P.Map.keys());
|
|
41
41
|
|
|
42
42
|
RandNums.forEach((RandNum, i) => {
|
|
43
43
|
const code = PCodes.find((_, j) => RandNum <= RateRange[j]);
|
package/src/types/LaBaG.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { P } from "../types/P";
|
|
|
2
2
|
import { ModeNames } from "../types/Mode";
|
|
3
3
|
|
|
4
4
|
export type OneDataType = Partial<
|
|
5
|
-
Record<"SuperHHH" | "GreenWei" | `
|
|
5
|
+
Record<"SuperHHH" | "GreenWei" | `RandNums[${0 | 1 | 2}]`, number>
|
|
6
6
|
>;
|
|
7
7
|
|
|
8
8
|
export type AllDataType = Record<`${number}`, OneDataType>;
|