@opfr/definitions 1.6.0 → 1.6.1
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/entities/effects/types.d.ts +3 -4
- package/dist/entities/effects/types.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +111 -117
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/xp/index.d.ts +0 -1
- package/dist/xp/index.d.ts.map +1 -1
- package/dist/xp/index.js.map +1 -1
- package/dist/xp/utils.d.ts +1 -4
- package/dist/xp/utils.d.ts.map +1 -1
- package/dist/xp/utils.js +5 -12
- package/dist/xp/utils.js.map +1 -1
- package/package.json +6 -6
- package/dist/crew/constants.d.ts +0 -4
- package/dist/crew/constants.d.ts.map +0 -1
- package/dist/crew/constants.js +0 -4
- package/dist/crew/constants.js.map +0 -1
- package/dist/crew/index.d.ts +0 -3
- package/dist/crew/index.d.ts.map +0 -1
- package/dist/crew/index.js +0 -2
- package/dist/crew/index.js.map +0 -1
- package/dist/crew/types.d.ts +0 -2
- package/dist/crew/types.d.ts.map +0 -1
- package/dist/crew/types.js +0 -2
- package/dist/crew/types.js.map +0 -1
- package/dist/raids/index.d.ts +0 -2
- package/dist/raids/index.d.ts.map +0 -1
- package/dist/raids/index.js +0 -2
- package/dist/raids/index.js.map +0 -1
- package/dist/raids/types.d.ts +0 -86
- package/dist/raids/types.d.ts.map +0 -1
- package/dist/raids/types.js +0 -2
- package/dist/raids/types.js.map +0 -1
- package/dist/xp/types.d.ts +0 -5
- package/dist/xp/types.d.ts.map +0 -1
- package/dist/xp/types.js +0 -2
- package/dist/xp/types.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Buff } from '../../buffs';
|
|
2
2
|
import type { CharacteristicsRecord } from '../../characteristics';
|
|
3
3
|
import type { ProfileAssetId } from '../../ornaments';
|
|
4
|
-
import type { XpRecord } from '../../xp';
|
|
5
4
|
import type { ChestLootTable, ChestRewards } from '../items';
|
|
6
5
|
import type { EFFECT_KEYS } from './constants';
|
|
7
6
|
export type EffectConfigMap = {
|
|
@@ -19,14 +18,14 @@ export type EffectConfigMap = {
|
|
|
19
18
|
params: {
|
|
20
19
|
amount: number;
|
|
21
20
|
};
|
|
22
|
-
return:
|
|
21
|
+
return: number;
|
|
23
22
|
};
|
|
24
23
|
GAIN_RANDOM_XP: {
|
|
25
24
|
params: {
|
|
26
25
|
amounts: [number, number];
|
|
27
26
|
odd: number;
|
|
28
27
|
};
|
|
29
|
-
return:
|
|
28
|
+
return: number;
|
|
30
29
|
};
|
|
31
30
|
APPLY_BUFF: {
|
|
32
31
|
params: Buff[];
|
|
@@ -44,7 +43,7 @@ export type EffectConfigMap = {
|
|
|
44
43
|
params: undefined;
|
|
45
44
|
return?: {
|
|
46
45
|
buffs: Buff[];
|
|
47
|
-
xp:
|
|
46
|
+
xp: number;
|
|
48
47
|
hp: number;
|
|
49
48
|
};
|
|
50
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/entities/effects/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/entities/effects/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAA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SAAS,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t
|
|
2
|
-
import { emojis as
|
|
3
|
-
import { formatNumber as
|
|
4
|
-
const
|
|
1
|
+
import { t } from "i18next";
|
|
2
|
+
import { emojis as l } from "@opfr/emojis";
|
|
3
|
+
import { formatNumber as C } from "@opfr/utils-lang";
|
|
4
|
+
const m = [
|
|
5
5
|
"boost",
|
|
6
6
|
"bottle",
|
|
7
7
|
"repair",
|
|
@@ -12,7 +12,7 @@ const R = [
|
|
|
12
12
|
"cookedMeal",
|
|
13
13
|
"enchant",
|
|
14
14
|
"alcohol"
|
|
15
|
-
],
|
|
15
|
+
], R = ["item", "resource", "enchant"], M = [
|
|
16
16
|
"ring",
|
|
17
17
|
"strap",
|
|
18
18
|
"boots",
|
|
@@ -20,7 +20,7 @@ const R = [
|
|
|
20
20
|
"collar",
|
|
21
21
|
"belt",
|
|
22
22
|
"weapon"
|
|
23
|
-
],
|
|
23
|
+
], L = [
|
|
24
24
|
"ring_left",
|
|
25
25
|
"ring_right",
|
|
26
26
|
"strap_left",
|
|
@@ -30,7 +30,7 @@ const R = [
|
|
|
30
30
|
"collar",
|
|
31
31
|
"belt",
|
|
32
32
|
"weapon"
|
|
33
|
-
],
|
|
33
|
+
], G = {
|
|
34
34
|
collar: "collar",
|
|
35
35
|
boots: "boots",
|
|
36
36
|
ring_left: "ring",
|
|
@@ -40,7 +40,7 @@ const R = [
|
|
|
40
40
|
helmet: "helmet",
|
|
41
41
|
belt: "belt",
|
|
42
42
|
weapon: "weapon"
|
|
43
|
-
},
|
|
43
|
+
}, w = ["equipment"], H = [
|
|
44
44
|
"OPEN_CHEST",
|
|
45
45
|
"APPLY_BUFF",
|
|
46
46
|
"ALCOHOL_DRINK",
|
|
@@ -56,10 +56,10 @@ const R = [
|
|
|
56
56
|
"RAID_REDUCE_COOLDOWN",
|
|
57
57
|
"CREW_XP_BUFF",
|
|
58
58
|
"CREW_REPAIR"
|
|
59
|
-
],
|
|
60
|
-
...
|
|
61
|
-
...
|
|
62
|
-
],
|
|
59
|
+
], v = ["single", "multiple", "all"], y = [...m, ...M], S = [
|
|
60
|
+
...R,
|
|
61
|
+
...w
|
|
62
|
+
], A = [
|
|
63
63
|
"aeronef",
|
|
64
64
|
"anchor",
|
|
65
65
|
"ancient_key",
|
|
@@ -184,7 +184,7 @@ const R = [
|
|
|
184
184
|
"wine",
|
|
185
185
|
"wood",
|
|
186
186
|
"wood_plank"
|
|
187
|
-
],
|
|
187
|
+
], I = [
|
|
188
188
|
"adventurer_belt",
|
|
189
189
|
"adventurer_boots",
|
|
190
190
|
"adventurer_collar",
|
|
@@ -218,10 +218,10 @@ const R = [
|
|
|
218
218
|
"revolutionary_boots",
|
|
219
219
|
"revolutionary_helmet",
|
|
220
220
|
"revolutionary_ring"
|
|
221
|
-
],
|
|
222
|
-
...
|
|
223
|
-
...
|
|
224
|
-
],
|
|
221
|
+
], k = [
|
|
222
|
+
...A,
|
|
223
|
+
...I
|
|
224
|
+
], x = {
|
|
225
225
|
pirate: {
|
|
226
226
|
name: "pirate",
|
|
227
227
|
color: "#8A1623",
|
|
@@ -242,26 +242,26 @@ const R = [
|
|
|
242
242
|
color: "#fff",
|
|
243
243
|
role: "1147953458507423874"
|
|
244
244
|
}
|
|
245
|
-
},
|
|
245
|
+
}, B = "citizen";
|
|
246
246
|
var e = /* @__PURE__ */ ((r) => (r.BASIC = "BASIC", r.COMMON = "COMMON", r.RARE = "RARE", r.EPIC = "EPIC", r.LEGENDARY = "LEGENDARY", r.MYTHIC = "MYTHIC", r))(e || {});
|
|
247
|
-
const
|
|
247
|
+
const j = [
|
|
248
248
|
e.COMMON,
|
|
249
249
|
e.RARE,
|
|
250
250
|
e.EPIC,
|
|
251
251
|
e.LEGENDARY,
|
|
252
252
|
e.MYTHIC
|
|
253
|
-
],
|
|
253
|
+
], F = {
|
|
254
254
|
BASIC: {
|
|
255
255
|
color: "#fff",
|
|
256
256
|
strength: 0,
|
|
257
257
|
id: e.BASIC,
|
|
258
|
-
name: (r, p = 1) =>
|
|
258
|
+
name: (r, p = 1) => t(`ranks.${e.BASIC}.text`, { count: p, context: r, ns: "common" })
|
|
259
259
|
},
|
|
260
260
|
COMMON: {
|
|
261
261
|
color: "#813D31",
|
|
262
262
|
strength: 1,
|
|
263
263
|
id: e.COMMON,
|
|
264
|
-
name: (r, p = 1) =>
|
|
264
|
+
name: (r, p = 1) => t(`ranks.${e.COMMON}.text`, {
|
|
265
265
|
count: p,
|
|
266
266
|
context: r,
|
|
267
267
|
ns: "common"
|
|
@@ -271,7 +271,7 @@ const V = [
|
|
|
271
271
|
color: "#5B6870",
|
|
272
272
|
strength: 2,
|
|
273
273
|
id: e.RARE,
|
|
274
|
-
name: (r, p = 1) =>
|
|
274
|
+
name: (r, p = 1) => t(`ranks.${e.RARE}.text`, {
|
|
275
275
|
count: p,
|
|
276
276
|
context: r,
|
|
277
277
|
ns: "common"
|
|
@@ -281,7 +281,7 @@ const V = [
|
|
|
281
281
|
color: "#C46619",
|
|
282
282
|
strength: 3,
|
|
283
283
|
id: e.EPIC,
|
|
284
|
-
name: (r, p = 1) =>
|
|
284
|
+
name: (r, p = 1) => t(`ranks.${e.EPIC}.text`, {
|
|
285
285
|
count: p,
|
|
286
286
|
context: r,
|
|
287
287
|
ns: "common"
|
|
@@ -291,7 +291,7 @@ const V = [
|
|
|
291
291
|
color: "#88A3CB",
|
|
292
292
|
strength: 4,
|
|
293
293
|
id: e.LEGENDARY,
|
|
294
|
-
name: (r, p = 1) =>
|
|
294
|
+
name: (r, p = 1) => t(`ranks.${e.LEGENDARY}.text`, {
|
|
295
295
|
count: p,
|
|
296
296
|
context: r,
|
|
297
297
|
ns: "common"
|
|
@@ -301,13 +301,13 @@ const V = [
|
|
|
301
301
|
color: "#F6bF62",
|
|
302
302
|
strength: 5,
|
|
303
303
|
id: e.MYTHIC,
|
|
304
|
-
name: (r, p = 1) =>
|
|
304
|
+
name: (r, p = 1) => t(`ranks.${e.MYTHIC}.text`, {
|
|
305
305
|
count: p,
|
|
306
306
|
context: r,
|
|
307
307
|
ns: "common"
|
|
308
308
|
})
|
|
309
309
|
}
|
|
310
|
-
},
|
|
310
|
+
}, U = "background_default", V = [
|
|
311
311
|
{
|
|
312
312
|
id: "berry",
|
|
313
313
|
path: {
|
|
@@ -662,7 +662,7 @@ const V = [
|
|
|
662
662
|
},
|
|
663
663
|
progressive: !0
|
|
664
664
|
}
|
|
665
|
-
],
|
|
665
|
+
], z = [
|
|
666
666
|
{
|
|
667
667
|
id: "black-jack",
|
|
668
668
|
path: {
|
|
@@ -1020,29 +1020,29 @@ const V = [
|
|
|
1020
1020
|
],
|
|
1021
1021
|
crew: !1
|
|
1022
1022
|
}
|
|
1023
|
-
},
|
|
1023
|
+
}, K = (r) => !!r.isProgressive, X = [
|
|
1024
1024
|
"b_marine",
|
|
1025
1025
|
"b_revolutionary",
|
|
1026
1026
|
"b_pirate"
|
|
1027
|
-
],
|
|
1028
|
-
const [
|
|
1027
|
+
], $ = (r, p) => r.filter((_) => {
|
|
1028
|
+
const [o] = _.split("_"), i = Object.values(O).find((c) => c.id === o);
|
|
1029
1029
|
return i ? p(i) : !1;
|
|
1030
|
-
}),
|
|
1030
|
+
}), Q = (r) => r.filter((p, _, o) => {
|
|
1031
1031
|
const [i, c] = p.split("_");
|
|
1032
|
-
return !
|
|
1033
|
-
const [
|
|
1034
|
-
return i !==
|
|
1032
|
+
return !o.find((n) => {
|
|
1033
|
+
const [E, d] = n.split("_");
|
|
1034
|
+
return i !== E ? !1 : c < d;
|
|
1035
1035
|
});
|
|
1036
|
-
}),
|
|
1036
|
+
}), J = ["idiot", "satan", "edito", "toy"], W = {
|
|
1037
1037
|
satan: "satan",
|
|
1038
1038
|
idiot: "idiot",
|
|
1039
1039
|
edito: "edito",
|
|
1040
1040
|
toy: "toy"
|
|
1041
|
-
},
|
|
1042
|
-
amount:
|
|
1043
|
-
emoji:
|
|
1041
|
+
}, q = ["default", "christmas"], u = (r) => Math.round(5e3 * Math.pow(200, 0.01 * r) / 10) * 10, s = (r) => r >= 1 ? s(r - 1) + u(r) : 0, h = (r, p = 0) => r < s(p + 1) ? p : h(r, p + 1), Z = (r) => t("xp.user", {
|
|
1042
|
+
amount: C(r),
|
|
1043
|
+
emoji: l.xp,
|
|
1044
1044
|
ns: "common"
|
|
1045
|
-
}),
|
|
1045
|
+
}), ee = {
|
|
1046
1046
|
cooldown: {
|
|
1047
1047
|
casino: [],
|
|
1048
1048
|
work: []
|
|
@@ -1057,51 +1057,51 @@ const V = [
|
|
|
1057
1057
|
xp: {
|
|
1058
1058
|
global: []
|
|
1059
1059
|
}
|
|
1060
|
-
},
|
|
1060
|
+
}, re = (r) => r.expireAt && r.expireAt < /* @__PURE__ */ new Date(), pe = ({
|
|
1061
1061
|
multiplier: r,
|
|
1062
1062
|
origin: p,
|
|
1063
1063
|
startIn: _,
|
|
1064
|
-
endIn:
|
|
1064
|
+
endIn: o
|
|
1065
1065
|
}) => ({
|
|
1066
1066
|
multiplier: r,
|
|
1067
1067
|
origin: p,
|
|
1068
|
-
expireAt:
|
|
1068
|
+
expireAt: o ? new Date(Date.now() + ((_ ?? 0) + o) * 60 * 60 * 1e3) : null,
|
|
1069
1069
|
startAt: _ ? new Date(Date.now() + _ * 60 * 60 * 1e3) : null
|
|
1070
|
-
}),
|
|
1070
|
+
}), _e = [
|
|
1071
1071
|
"vitality",
|
|
1072
1072
|
"strength",
|
|
1073
1073
|
"agility",
|
|
1074
1074
|
"intelligence",
|
|
1075
1075
|
"chance",
|
|
1076
1076
|
"wisdom"
|
|
1077
|
-
],
|
|
1077
|
+
], N = 10, a = 1, Y = [
|
|
1078
1078
|
[200, 4],
|
|
1079
1079
|
[100, 3],
|
|
1080
1080
|
[50, 2],
|
|
1081
|
-
[0,
|
|
1082
|
-
],
|
|
1083
|
-
for (const [p, _] of
|
|
1081
|
+
[0, a]
|
|
1082
|
+
], oe = 100, te = 10, b = (r) => {
|
|
1083
|
+
for (const [p, _] of Y)
|
|
1084
1084
|
if (r >= p)
|
|
1085
1085
|
return _;
|
|
1086
|
-
return
|
|
1087
|
-
},
|
|
1086
|
+
return a;
|
|
1087
|
+
}, ie = (r, p) => {
|
|
1088
1088
|
let _ = 0;
|
|
1089
1089
|
for (; p > 0; p--)
|
|
1090
|
-
_ +=
|
|
1090
|
+
_ += b(r), r++;
|
|
1091
1091
|
return _;
|
|
1092
|
-
},
|
|
1092
|
+
}, ce = (r) => {
|
|
1093
1093
|
let p = 0;
|
|
1094
|
-
for (; r > 0; r -=
|
|
1094
|
+
for (; r > 0; r -= b(p))
|
|
1095
1095
|
p++;
|
|
1096
1096
|
return p;
|
|
1097
|
-
},
|
|
1097
|
+
}, se = (r, p) => p * N - Object.values(r).reduce((_, o) => _ + o, 0), ae = ["category", "alpha", "quantity"], be = (r, p) => p === null ? null : r === p ? `-${r}` : p, ne = [
|
|
1098
1098
|
"dice",
|
|
1099
1099
|
"rps",
|
|
1100
1100
|
"doubleOrQuit",
|
|
1101
1101
|
"blackJack",
|
|
1102
1102
|
"priceIsRight"
|
|
1103
|
-
],
|
|
1104
|
-
class
|
|
1103
|
+
], Ee = 10;
|
|
1104
|
+
class de {
|
|
1105
1105
|
title = void 0;
|
|
1106
1106
|
titleId;
|
|
1107
1107
|
badge;
|
|
@@ -1113,68 +1113,62 @@ class me {
|
|
|
1113
1113
|
crew;
|
|
1114
1114
|
repeatable;
|
|
1115
1115
|
}
|
|
1116
|
-
var
|
|
1117
|
-
const
|
|
1116
|
+
var T = /* @__PURE__ */ ((r) => (r.COMPLETED = "COMPLETED", r.IN_PROGRESS = "IN_PROGRESS", r))(T || {});
|
|
1117
|
+
const le = 10, Ce = 1e7, me = 100;
|
|
1118
1118
|
export {
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1119
|
+
q as BAG_IDS,
|
|
1120
|
+
Ce as BET_MAX_VALUE,
|
|
1121
|
+
le as BET_MIN_VALUE,
|
|
1122
1122
|
O as BadgeList,
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
y as
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
D as QuestStatus,
|
|
1155
|
-
z as RANKS,
|
|
1156
|
-
V as RANK_IDS_WITHOUT_BASIC,
|
|
1123
|
+
de as BaseQuest,
|
|
1124
|
+
_e as CHARACTERISTICS,
|
|
1125
|
+
a as CHARACTERISTIC_DEFAULT_POINT_COST,
|
|
1126
|
+
Y as CHARACTERISTIC_POINT_COSTS,
|
|
1127
|
+
N as CHARACTERISTIC_POINT_PER_LEVEL,
|
|
1128
|
+
U as DEFAULT_BACKGROUND_ID,
|
|
1129
|
+
ee as DEFAULT_BUFF_TREE,
|
|
1130
|
+
B as DEFAULT_FACTION,
|
|
1131
|
+
oe as DEFAULT_MAX_HP,
|
|
1132
|
+
me as EDITO_READ,
|
|
1133
|
+
H as EFFECT_KEYS,
|
|
1134
|
+
S as ENTITY_CATEGORY,
|
|
1135
|
+
k as ENTITY_IMAGE_IDS,
|
|
1136
|
+
y as ENTITY_TYPES,
|
|
1137
|
+
w as EQUIPMENT_CATEGORY,
|
|
1138
|
+
G as EQUIPMENT_FROM_SLOT_TO_TYPE,
|
|
1139
|
+
I as EQUIPMENT_IMAGE_IDS,
|
|
1140
|
+
L as EQUIPMENT_SLOT,
|
|
1141
|
+
M as EQUIPMENT_TYPE,
|
|
1142
|
+
x as FACTIONS,
|
|
1143
|
+
X as FactionBadgeList,
|
|
1144
|
+
ne as GAME_TYPES,
|
|
1145
|
+
te as HP_PER_VITALITY,
|
|
1146
|
+
R as ITEM_CATEGORY,
|
|
1147
|
+
A as ITEM_IMAGE_IDS,
|
|
1148
|
+
m as ITEM_TYPE,
|
|
1149
|
+
J as PROFILE_ASSETS_ID,
|
|
1150
|
+
V as PROGRESSIVE_BADGES,
|
|
1151
|
+
T as QuestStatus,
|
|
1152
|
+
F as RANKS,
|
|
1153
|
+
j as RANK_IDS_WITHOUT_BASIC,
|
|
1157
1154
|
e as RankId,
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
b as totalXpToLevel,
|
|
1178
|
-
te as transformToDBBuff,
|
|
1179
|
-
h as xpToLevel
|
|
1155
|
+
Ee as SHOP_DEFAULT_AVAILABLE_ENTITY_AMOUNT,
|
|
1156
|
+
ae as SORT_VALUES,
|
|
1157
|
+
z as STRICT_BADGES,
|
|
1158
|
+
v as USAGE_MODES,
|
|
1159
|
+
Z as displayXp,
|
|
1160
|
+
$ as filterBadgesBy,
|
|
1161
|
+
Q as filterRarity,
|
|
1162
|
+
se as getAvailableCharacteristicPoints,
|
|
1163
|
+
b as getCharacteristicCost,
|
|
1164
|
+
ie as getComputedCharacteristicCost,
|
|
1165
|
+
ce as getComputedCharacteristicValue,
|
|
1166
|
+
h as getCurrentLevel,
|
|
1167
|
+
be as getNewSortValue,
|
|
1168
|
+
re as hasBuffExpired,
|
|
1169
|
+
W as profileAssets,
|
|
1170
|
+
K as progressiveBadgeTypeGuard,
|
|
1171
|
+
s as totalXpToLevel,
|
|
1172
|
+
pe as transformToDBBuff,
|
|
1173
|
+
u as xpToLevel
|
|
1180
1174
|
};
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(r,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("i18next"),require("@opfr/emojis"),require("@opfr/utils-lang")):typeof define=="function"&&define.amd?define(["exports","i18next","@opfr/emojis","@opfr/utils-lang"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r.definitions={},r.i18next,r["@opfr/emojis"],r["@opfr/utils-lang"]))})(this,(function(r,o,a,s){"use strict";const C=["boost","bottle","repair","chest","scroll","object","store","cookedMeal","enchant","alcohol"],R=["item","resource","enchant"],m=["ring","strap","boots","helmet","collar","belt","weapon"],f=["ring_left","ring_right","strap_left","strap_right","boots","helmet","collar","belt","weapon"],D={collar:"collar",boots:"boots",ring_left:"ring",ring_right:"ring",strap_left:"strap",strap_right:"strap",helmet:"helmet",belt:"belt",weapon:"weapon"},M=["equipment"],g=["OPEN_CHEST","APPLY_BUFF","ALCOHOL_DRINK","HEAL_HP","GAIN_XP","GAIN_RANDOM_XP","BOOST","DRINK_BOTTLE","DROP","CLEAR_HANGOVER","UNLOCK_ASSET","ADD_SCROLL_CHARAC","RAID_REDUCE_COOLDOWN","CREW_XP_BUFF","CREW_REPAIR"],L=["single","multiple","all"],G=[...C,...m],H=[...R,...M],A=["aeronef","anchor","ancient_key","background","beer","boost_day","boost_week","bottle_xp_1","bottle_xp_2","bottle_xp_3","bottle_xp_4","bowl","bowl_cereal","bread","cereal","cheese","chest_1","chest_2","chest_3","chest_4","chest_blacksmith_1","chest_blacksmith_2","chest_blacksmith_3","chest_christmas","christmas_present","clover","compass","cotton","cursed_hawthorn","dragon_heart","ebony_poppy","edelweiss","egg","elemental_concentrate_earth","elemental_concentrate_fire","elemental_concentrate_life","elemental_concentrate_moon","elemental_concentrate_water","elemental_concentrate_wind","emerald","empty_chest","empty_scroll","enchant_cereal","enchant_clover","enchant_cotton","enchant_ebony_poppy","enchant_hemp","enchant_iron","enchant_leather","enchant_manganese","enchant_poppy","enchant_pure_water","enchant_rope","enchant_rose","enchant_sea_salt","enchant_tissue","enchant_wood","enchanted_emerald","enchanted_ruby","enchanted_sapphire","enchanted_stone","essence_earth","essence_fire","essence_life","essence_moon","essence_water","essence_wind","fairy_wing","flour","fruit","glass_bottle","glue","hammock","hemp","iron","iron_ore","leather","little_cookie_christmas","lock","mandrake","manganese","map_fragment","milk","mithril","mugwort","mysterious_egg_christmas","nail","obsidian","omelet","phoenix_feather","poppy","pure_water","repair_kit","rescue_boat","rhum","rope","rose","ruby","rudder","saffron","sailing_boat","salt_water","sapphire","scrap","scroll_agility","scroll_chance","scroll_intelligence","scroll_strength","scroll_vitality","scroll_wisdom","sea_salt","siren_tear","strange_gem","strange_stone","strawberry_cake","sugar","sugar_cane_christmas","tissue","title","tools","toy","wine","wood","wood_plank"],I=["adventurer_belt","adventurer_boots","adventurer_collar","adventurer_helmet","adventurer_strap","adventurer_weapon","christmas_belt","christmas_boots","christmas_collar","christmas_gloves","christmas_helmet","christmas_strap","christmas_weapon","herbalist_belt","herbalist_boots","herbalist_helmet","herbalist_weapon","little_blacksmith_collar","little_blacksmith_ring","little_blacksmith_strap","little_blacksmith_weapon","marine_collar","marine_helmet","marine_ring","marine_strap","pirate_belt","pirate_helmet","pirate_ring","pirate_weapon","revolutionary_belt","revolutionary_boots","revolutionary_helmet","revolutionary_ring"],S=[...A,...I],v={pirate:{name:"pirate",color:"#8A1623",role:"1047815125282848849"},marine:{name:"marine",color:"#387cbc",role:"1047816059937361940"},revolutionary:{name:"revolutionary",color:"#335635",role:"1047815105846444152"},citizen:{name:"citizen",color:"#fff",role:"1147953458507423874"}},y="citizen";var e=(_=>(_.BASIC="BASIC",_.COMMON="COMMON",_.RARE="RARE",_.EPIC="EPIC",_.LEGENDARY="LEGENDARY",_.MYTHIC="MYTHIC",_))(e||{});const B=[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],k={BASIC:{color:"#fff",strength:0,id:e.BASIC,name:(_,p=1)=>o.t(`ranks.${e.BASIC}.text`,{count:p,context:_,ns:"common"})},COMMON:{color:"#813D31",strength:1,id:e.COMMON,name:(_,p=1)=>o.t(`ranks.${e.COMMON}.text`,{count:p,context:_,ns:"common"})},RARE:{color:"#5B6870",strength:2,id:e.RARE,name:(_,p=1)=>o.t(`ranks.${e.RARE}.text`,{count:p,context:_,ns:"common"})},EPIC:{color:"#C46619",strength:3,id:e.EPIC,name:(_,p=1)=>o.t(`ranks.${e.EPIC}.text`,{count:p,context:_,ns:"common"})},LEGENDARY:{color:"#88A3CB",strength:4,id:e.LEGENDARY,name:(_,p=1)=>o.t(`ranks.${e.LEGENDARY}.text`,{count:p,context:_,ns:"common"})},MYTHIC:{color:"#F6bF62",strength:5,id:e.MYTHIC,name:(_,p=1)=>o.t(`ranks.${e.MYTHIC}.text`,{count:p,context:_,ns:"common"})}},F="background_default",U=[{id:"berry",path:{cropped:{RARE:"cropped_b_berry_RARE.webp",MYTHIC:"cropped_b_berry_MYTHIC.webp",LEGENDARY:"cropped_b_berry_LEGENDARY.webp",EPIC:"cropped_b_berry_EPIC.webp",COMMON:"cropped_b_berry_COMMON.webp"},default:{RARE:"b_berry_RARE.webp",MYTHIC:"b_berry_MYTHIC.webp",LEGENDARY:"b_berry_LEGENDARY.webp",EPIC:"b_berry_EPIC.webp",COMMON:"b_berry_COMMON.webp"}},progressive:!0},{id:"broship",path:{cropped:{RARE:"cropped_b_broship_RARE.webp",MYTHIC:"cropped_b_broship_MYTHIC.webp",LEGENDARY:"cropped_b_broship_LEGENDARY.webp",EPIC:"cropped_b_broship_EPIC.webp",COMMON:"cropped_b_broship_COMMON.webp"},default:{RARE:"b_broship_RARE.webp",MYTHIC:"b_broship_MYTHIC.webp",LEGENDARY:"b_broship_LEGENDARY.webp",EPIC:"b_broship_EPIC.webp",COMMON:"b_broship_COMMON.webp"}},progressive:!0},{id:"carpenter",path:{cropped:{RARE:"cropped_b_carpenter_RARE.webp",MYTHIC:"cropped_b_carpenter_MYTHIC.webp",LEGENDARY:"cropped_b_carpenter_LEGENDARY.webp",EPIC:"cropped_b_carpenter_EPIC.webp",COMMON:"cropped_b_carpenter_COMMON.webp"},default:{RARE:"b_carpenter_RARE.webp",MYTHIC:"b_carpenter_MYTHIC.webp",LEGENDARY:"b_carpenter_LEGENDARY.webp",EPIC:"b_carpenter_EPIC.webp",COMMON:"b_carpenter_COMMON.webp"}},progressive:!0},{id:"casino",path:{cropped:{MYTHIC:"cropped_b_casino_MYTHIC.webp",LEGENDARY:"cropped_b_casino_LEGENDARY.webp"},default:{MYTHIC:"b_casino_MYTHIC.webp",LEGENDARY:"b_casino_LEGENDARY.webp"}},progressive:!0},{id:"communism",path:{cropped:{RARE:"cropped_b_communism_RARE.webp",MYTHIC:"cropped_b_communism_MYTHIC.webp",LEGENDARY:"cropped_b_communism_LEGENDARY.webp",EPIC:"cropped_b_communism_EPIC.webp",COMMON:"cropped_b_communism_COMMON.webp"},default:{RARE:"b_communism_RARE.webp",MYTHIC:"b_communism_MYTHIC.webp",LEGENDARY:"b_communism_LEGENDARY.webp",EPIC:"b_communism_EPIC.webp",COMMON:"b_communism_COMMON.webp"}},progressive:!0},{id:"craft",path:{cropped:{RARE:"cropped_b_craft_RARE.webp",MYTHIC:"cropped_b_craft_MYTHIC.webp",LEGENDARY:"cropped_b_craft_LEGENDARY.webp",EPIC:"cropped_b_craft_EPIC.webp",COMMON:"cropped_b_craft_COMMON.webp"},default:{RARE:"b_craft_RARE.webp",MYTHIC:"b_craft_MYTHIC.webp",LEGENDARY:"b_craft_LEGENDARY.webp",EPIC:"b_craft_EPIC.webp",COMMON:"b_craft_COMMON.webp"}},progressive:!0},{id:"crewship",path:{cropped:{RARE:"cropped_b_crewship_RARE.webp",MYTHIC:"cropped_b_crewship_MYTHIC.webp",LEGENDARY:"cropped_b_crewship_LEGENDARY.webp",EPIC:"cropped_b_crewship_EPIC.webp",COMMON:"cropped_b_crewship_COMMON.webp"},default:{RARE:"b_crewship_RARE.webp",MYTHIC:"b_crewship_MYTHIC.webp",LEGENDARY:"b_crewship_LEGENDARY.webp",EPIC:"b_crewship_EPIC.webp",COMMON:"b_crewship_COMMON.webp"}},progressive:!0},{id:"default",path:{cropped:{RARE:"cropped_b_default_RARE.webp",MYTHIC:"cropped_b_default_MYTHIC.webp",LEGENDARY:"cropped_b_default_LEGENDARY.webp",EPIC:"cropped_b_default_EPIC.webp",COMMON:"cropped_b_default_COMMON.webp"},default:{RARE:"b_default_RARE.webp",MYTHIC:"b_default_MYTHIC.webp",LEGENDARY:"b_default_LEGENDARY.webp",EPIC:"b_default_EPIC.webp",COMMON:"b_default_COMMON.webp"}},progressive:!0},{id:"ecrire",path:{cropped:{RARE:"cropped_b_ecrire_RARE.webp",MYTHIC:"cropped_b_ecrire_MYTHIC.webp",LEGENDARY:"cropped_b_ecrire_LEGENDARY.webp",EPIC:"cropped_b_ecrire_EPIC.webp",COMMON:"cropped_b_ecrire_COMMON.webp"},default:{RARE:"b_ecrire_RARE.webp",MYTHIC:"b_ecrire_MYTHIC.webp",LEGENDARY:"b_ecrire_LEGENDARY.webp",EPIC:"b_ecrire_EPIC.webp",COMMON:"b_ecrire_COMMON.webp"}},progressive:!0},{id:"ermite",path:{cropped:{RARE:"cropped_b_ermite_RARE.webp",MYTHIC:"cropped_b_ermite_MYTHIC.webp",LEGENDARY:"cropped_b_ermite_LEGENDARY.webp",EPIC:"cropped_b_ermite_EPIC.webp",COMMON:"cropped_b_ermite_COMMON.webp"},default:{RARE:"b_ermite_RARE.webp",MYTHIC:"b_ermite_MYTHIC.webp",LEGENDARY:"b_ermite_LEGENDARY.webp",EPIC:"b_ermite_EPIC.webp",COMMON:"b_ermite_COMMON.webp"}},progressive:!0},{id:"exploration",path:{cropped:{RARE:"cropped_b_exploration_RARE.webp",MYTHIC:"cropped_b_exploration_MYTHIC.webp",LEGENDARY:"cropped_b_exploration_LEGENDARY.webp",EPIC:"cropped_b_exploration_EPIC.webp",COMMON:"cropped_b_exploration_COMMON.webp"},default:{RARE:"b_exploration_RARE.webp",MYTHIC:"b_exploration_MYTHIC.webp",LEGENDARY:"b_exploration_LEGENDARY.webp",EPIC:"b_exploration_EPIC.webp",COMMON:"b_exploration_COMMON.webp"}},progressive:!0},{id:"marine",path:{cropped:{RARE:"cropped_b_marine_RARE.webp",MYTHIC:"cropped_b_marine_MYTHIC.webp",LEGENDARY:"cropped_b_marine_LEGENDARY.webp",EPIC:"cropped_b_marine_EPIC.webp",COMMON:"cropped_b_marine_COMMON.webp"},default:{RARE:"b_marine_RARE.webp",MYTHIC:"b_marine_MYTHIC.webp",LEGENDARY:"b_marine_LEGENDARY.webp",EPIC:"b_marine_EPIC.webp",COMMON:"b_marine_COMMON.webp"}},progressive:!0},{id:"mode",path:{cropped:{RARE:"cropped_b_mode_RARE.webp",MYTHIC:"cropped_b_mode_MYTHIC.webp",LEGENDARY:"cropped_b_mode_LEGENDARY.webp",EPIC:"cropped_b_mode_EPIC.webp",COMMON:"cropped_b_mode_COMMON.webp"},default:{RARE:"b_mode_RARE.webp",MYTHIC:"b_mode_MYTHIC.webp",LEGENDARY:"b_mode_LEGENDARY.webp",EPIC:"b_mode_EPIC.webp",COMMON:"b_mode_COMMON.webp"}},progressive:!0},{id:"pirate",path:{cropped:{RARE:"cropped_b_pirate_RARE.webp",MYTHIC:"cropped_b_pirate_MYTHIC.webp",LEGENDARY:"cropped_b_pirate_LEGENDARY.webp",EPIC:"cropped_b_pirate_EPIC.webp",COMMON:"cropped_b_pirate_COMMON.webp"},default:{RARE:"b_pirate_RARE.webp",MYTHIC:"b_pirate_MYTHIC.webp",LEGENDARY:"b_pirate_LEGENDARY.webp",EPIC:"b_pirate_EPIC.webp",COMMON:"b_pirate_COMMON.webp"}},progressive:!0},{id:"recipe",path:{cropped:{RARE:"cropped_b_recipe_RARE.webp",MYTHIC:"cropped_b_recipe_MYTHIC.webp",LEGENDARY:"cropped_b_recipe_LEGENDARY.webp",EPIC:"cropped_b_recipe_EPIC.webp",COMMON:"cropped_b_recipe_COMMON.webp"},default:{RARE:"b_recipe_RARE.webp",MYTHIC:"b_recipe_MYTHIC.webp",LEGENDARY:"b_recipe_LEGENDARY.webp",EPIC:"b_recipe_EPIC.webp",COMMON:"b_recipe_COMMON.webp"}},progressive:!0},{id:"revolutionary",path:{cropped:{RARE:"cropped_b_revolutionary_RARE.webp",MYTHIC:"cropped_b_revolutionary_MYTHIC.webp",LEGENDARY:"cropped_b_revolutionary_LEGENDARY.webp",EPIC:"cropped_b_revolutionary_EPIC.webp",COMMON:"cropped_b_revolutionary_COMMON.webp"},default:{RARE:"b_revolutionary_RARE.webp",MYTHIC:"b_revolutionary_MYTHIC.webp",LEGENDARY:"b_revolutionary_LEGENDARY.webp",EPIC:"b_revolutionary_EPIC.webp",COMMON:"b_revolutionary_COMMON.webp"}},progressive:!0},{id:"sardine",path:{cropped:{RARE:"cropped_b_sardine_RARE.webp",MYTHIC:"cropped_b_sardine_MYTHIC.webp",LEGENDARY:"cropped_b_sardine_LEGENDARY.webp",EPIC:"cropped_b_sardine_EPIC.webp",COMMON:"cropped_b_sardine_COMMON.webp"},default:{RARE:"b_sardine_RARE.webp",MYTHIC:"b_sardine_MYTHIC.webp",LEGENDARY:"b_sardine_LEGENDARY.webp",EPIC:"b_sardine_EPIC.webp",COMMON:"b_sardine_COMMON.webp"}},progressive:!0},{id:"shipsecte",path:{cropped:{RARE:"cropped_b_shipsecte_RARE.webp",MYTHIC:"cropped_b_shipsecte_MYTHIC.webp",LEGENDARY:"cropped_b_shipsecte_LEGENDARY.webp",EPIC:"cropped_b_shipsecte_EPIC.webp",COMMON:"cropped_b_shipsecte_COMMON.webp"},default:{RARE:"b_shipsecte_RARE.webp",MYTHIC:"b_shipsecte_MYTHIC.webp",LEGENDARY:"b_shipsecte_LEGENDARY.webp",EPIC:"b_shipsecte_EPIC.webp",COMMON:"b_shipsecte_COMMON.webp"}},progressive:!0}],j=[{id:"black-jack",path:{default:"b_black-jack.webp",cropped:"cropped_b_black-jack.webp"},progressive:!1},{id:"calendar",path:{default:"b_calendar.webp",cropped:"cropped_b_calendar.webp"},progressive:!1},{id:"camarade",path:{default:"b_camarade.webp",cropped:"cropped_b_camarade.webp"},progressive:!1},{id:"chance",path:{default:"b_chance.webp",cropped:"cropped_b_chance.webp"},progressive:!1},{id:"doublesix",path:{default:"b_doublesix.webp",cropped:"cropped_b_doublesix.webp"},progressive:!1},{id:"noluck",path:{default:"b_noluck.webp",cropped:"cropped_b_noluck.webp"},progressive:!1},{id:"premium",path:{default:"b_premium.webp",cropped:"cropped_b_premium.webp"},progressive:!1},{id:"selfish",path:{default:"b_selfish.webp",cropped:"cropped_b_selfish.webp"},progressive:!1}],w={exploration:{id:"writeChat",img:"exploration",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:Explorateurbois:1175507909518573578>","<:Explorateurargent:1175508452467015680>","<:Explorateuror:1175507917642932245>","<:Explorateurplatine:1175507920587329586>","<:Explorateurultime:1175507922818699334>"],crew:!1},ecrire:{id:"sendMessage",img:"ecrire",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:Spammeurbois:1175508156785365003>","<:Spammeurargent:1175507962249351268>","<:Spammeuror:1175507966808572007>","<:Spammeurplatine:1175507968293339167>","<:Spammeurultime:1175507863460913222>"],crew:!1},ermite:{id:"timeInVoice",img:"ermite",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:Ermitebois:1175507899875868672>","<:Ermiteargent:1175508498138796153>","<:Ermiteor:1175508465746182305>","<:Ermiteplatine:1175507904695124028>","<:Ermiteultime:1175507906041499749>"],crew:!1},berry:{id:"berry",img:"berry",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:ElonMuskbois:1175507891600498758>","<:ElonMuskargent:1175508764988801034>","<:ElonMuskor:1175508756700856390>","<:ElonMuskplatine:1175508739386789928>","<:ElonMuskultime:1175507895668985886>"],crew:!1},mode:{id:"spendShop",img:"mode",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:FashionViktimbois:1175508381436485672>","<:FashionViktimargent:1175507924873904128>","<:FashionViktimor:1175507926719414406>","<:FashionViktimplatine:1175508345562599445>","<:FashionViktimultime:1175507931517698088>"],crew:!1},noluck:{id:"noLuck",img:"noluck",isProgressive:!1,emojis:"<:BadluckPlatine:1175507878048702505>",crew:!1},chance:{id:"chance",img:"chance",isProgressive:!1,emojis:"<:BadgeChanceux:1192743999514103869>",crew:!1},casino:{id:"casino",img:"casino",isProgressive:[e.LEGENDARY,e.MYTHIC],emojis:["<:GamblingAddict:1175507934223016047>","<:GamblingAddictDiamond:1187147920647131207>"],crew:!1},premium:{id:"premium",img:"premium",isProgressive:!1,emojis:"<:BadgesDon:1175507876056399933>",crew:!1},calendar:{id:"calendar",img:"calendar",isProgressive:!1,emojis:"<:Calendrier:1187170872176431114>",crew:!1},doublesix:{id:"doublesix",img:"doublesix",isProgressive:!1,emojis:"<:DoubleSix:1187178228624937000>",crew:!1},"black-jack":{id:"blackJack",img:"black-jack",isProgressive:!1,emojis:"<:BlackJack:1187456310137069618>",crew:!1},communism:{id:"communism",img:"communism",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_communism_Bronze:1234375558184570902>","<:cropped_communism_Silver:1234375563729440789>","<:cropped_communism_Gold:1234375561154007103>","<:cropped_communism_Platinum:1234375562269687849>","<:cropped_communism_Diamond:1234375559811825705>"],crew:!0},crewship:{id:"crewship",img:"crewship",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_crewship_Bronze:1234458902641246260>","<:cropped_crewship_Silver:1234458908840431617>","<:cropped_crewship_Gold:1234458905694961724>","<:cropped_crewship_Platinum:1234458907741782038>","<:cropped_crewship_Diamond:1234458904100864000>"],crew:!0},broship:{id:"broship",img:"broship",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_broship_Bronze:1234537705292038175>","<:cropped_broship_Silver:1234537711214530652>","<:cropped_broship_Gold:1234537708047695892>","<:cropped_broship_Platinum:1234537710170013867>","<:cropped_broship_Diamond:1234537706810245161>"],crew:!0},shipsecte:{id:"shipsecte",img:"shipsecte",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_shipsecte_Bronze:1234547646023078009>","<:cropped_shipsecte_Silver:1234547651912011827>","<:cropped_shipsecte_Gold:1234547649160675408>","<:cropped_shipsecte_Platinum:1234547650414514267>","<:cropped_shipsecte_Diamond:1234547648011173888>"],crew:!0},sardine:{id:"sardine",img:"sardine",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_sardine_Bronze:1234549442799997010>","<:cropped_sardine_Silver:1234549449036927088>","<:cropped_sardine_Gold:1234549445916622988>","<:cropped_sardine_Platinum:1234549447518720050>","<:cropped_sardine_Diamond:1234549444738023484>"],crew:!0},carpenter:{id:"carpenter",img:"carpenter",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_carpenter_Bronze:1234555340964626495>","<:cropped_carpenter_Silver:1234555345935007764>","<:cropped_carpenter_Gold:1234555343317635153>","<:cropped_carpenter_Platinum:1234555344819191909>","<:cropped_carpenter_Diamond:1234555342143357072>"],crew:!0},camarade:{id:"camarade",img:"camarade",isProgressive:!1,emojis:"<:cropped_camarade:1234582024077967361>",crew:!0},selfish:{id:"selfish",img:"selfish",isProgressive:!1,emojis:"<:cropped_selfish:1234587373363527780>",crew:!0},recipe:{id:"recipe",img:"recipe",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_b_recipe_Bronze:1244357782573023282>","<:cropped_b_recipe_Silver:1244357788361031711>","<:cropped_b_recipe_Gold:1244357785555308574>","<:cropped_b_recipe_Platinum:1244357786750685225>","<:cropped_b_recipe_Diamond:1244357784397545526>"],crew:!1},craft:{id:"craft",img:"craft",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_b_craft_Bronze:1244357834452238447>","<:cropped_b_craft_Silver:1244357840513011722>","<:cropped_b_craft_Gold:1244357837333725306>","<:cropped_b_craft_Platinum:1244357838801735761>","<:cropped_b_craft_Diamond:1244357835735695401>"],crew:!1}},V=_=>!!_.isProgressive,X=["b_marine","b_revolutionary","b_pirate"],Q=(_,p)=>_.filter(i=>{const[t]=i.split("_"),c=Object.values(w).find(l=>l.id===t);return c?p(c):!1}),z=_=>_.filter((p,i,t)=>{const[c,l]=p.split("_");return!t.find(me=>{const[Me,Ae]=me.split("_");return c!==Me?!1:l<Ae})}),K=["idiot","satan","edito","toy"],W={satan:"satan",idiot:"idiot",edito:"edito",toy:"toy"},$=["default","christmas"],T=_=>Math.round(5e3*Math.pow(200,.01*_)/10)*10,E=_=>_>=1?E(_-1)+T(_):0,u=(_,p=0)=>_<E(p+1)?p:u(_,p+1),O=_=>Math.round(1e5*Math.pow(50,.01*_)/10)*10,b=_=>_>=1?b(_-1)+O(_):0,N=(_,p=0)=>_<b(p+1)?p:N(_,p+1),q=([_,p])=>p?`${o.t("xp.user",{ns:"common",amount:s.formatNumber(_),emoji:a.emojis.xp})} ${o.t("xp.crew",{amount:s.formatNumber(p),emoji:a.emojis.xp,ns:"common"})}`:o.t("xp.user",{amount:s.formatNumber(_),emoji:a.emojis.xp,ns:"common"}),J={cooldown:{casino:[],work:[]},berry:{work:[],global:[]},drop:{work:[]},xp:{global:[]}},Z=_=>_.expireAt&&_.expireAt<new Date,x=({multiplier:_,origin:p,startIn:i,endIn:t})=>({multiplier:_,origin:p,expireAt:t?new Date(Date.now()+((i??0)+t)*60*60*1e3):null,startAt:i?new Date(Date.now()+i*60*60*1e3):null}),ee=["vitality","strength","agility","intelligence","chance","wisdom"],h=10,n=1,Y=[[200,4],[100,3],[50,2],[0,n]],re=100,_e=10,d=_=>{for(const[p,i]of Y)if(_>=p)return i;return n},pe=(_,p)=>{let i=0;for(;p>0;p--)i+=d(_),_++;return i},oe=_=>{let p=0;for(;_>0;_-=d(p))p++;return p},ie=(_,p)=>p*h-Object.values(_).reduce((i,t)=>i+t,0),te=["category","alpha","quantity"],ce=(_,p)=>p===null?null:_===p?`-${_}`:p,ae=["dice","rps","doubleOrQuit","blackJack","priceIsRight"],se=10;class Ee{title=void 0;titleId;badge;isFactionBadge;asset;items;secret;daily;crew;repeatable}var P=(_=>(_.COMPLETED="COMPLETED",_.IN_PROGRESS="IN_PROGRESS",_))(P||{});const be=10,ne=1e7,de=100,le=.1,Ce=3,Re=100;r.BAG_IDS=$,r.BET_MAX_VALUE=ne,r.BET_MIN_VALUE=be,r.BadgeList=w,r.BaseQuest=Ee,r.CHARACTERISTICS=ee,r.CHARACTERISTIC_DEFAULT_POINT_COST=n,r.CHARACTERISTIC_POINT_COSTS=Y,r.CHARACTERISTIC_POINT_PER_LEVEL=h,r.CREW_DEFAULT_DISINTEGRATION=Re,r.CREW_DEFAULT_MEMBER_LIMIT=Ce,r.CREW_DEFAULT_XP_PERCENT=le,r.DEFAULT_BACKGROUND_ID=F,r.DEFAULT_BUFF_TREE=J,r.DEFAULT_FACTION=y,r.DEFAULT_MAX_HP=re,r.EDITO_READ=de,r.EFFECT_KEYS=g,r.ENTITY_CATEGORY=H,r.ENTITY_IMAGE_IDS=S,r.ENTITY_TYPES=G,r.EQUIPMENT_CATEGORY=M,r.EQUIPMENT_FROM_SLOT_TO_TYPE=D,r.EQUIPMENT_IMAGE_IDS=I,r.EQUIPMENT_SLOT=f,r.EQUIPMENT_TYPE=m,r.FACTIONS=v,r.FactionBadgeList=X,r.GAME_TYPES=ae,r.HP_PER_VITALITY=_e,r.ITEM_CATEGORY=R,r.ITEM_IMAGE_IDS=A,r.ITEM_TYPE=C,r.PROFILE_ASSETS_ID=K,r.PROGRESSIVE_BADGES=U,r.QuestStatus=P,r.RANKS=k,r.RANK_IDS_WITHOUT_BASIC=B,r.RankId=e,r.SHOP_DEFAULT_AVAILABLE_ENTITY_AMOUNT=se,r.SORT_VALUES=te,r.STRICT_BADGES=j,r.USAGE_MODES=L,r.crewXpToLevel=O,r.displayXp=q,r.filterBadgesBy=Q,r.filterRarity=z,r.getAvailableCharacteristicPoints=ie,r.getCharacteristicCost=d,r.getComputedCharacteristicCost=pe,r.getComputedCharacteristicValue=oe,r.getCurrentCrewLevel=N,r.getCurrentLevel=u,r.getNewSortValue=ce,r.hasBuffExpired=Z,r.profileAssets=W,r.progressiveBadgeTypeGuard=V,r.totalCrewXpToLevel=b,r.totalXpToLevel=E,r.transformToDBBuff=x,r.xpToLevel=T,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(r,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("i18next"),require("@opfr/emojis"),require("@opfr/utils-lang")):typeof define=="function"&&define.amd?define(["exports","i18next","@opfr/emojis","@opfr/utils-lang"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r.definitions={},r.i18next,r["@opfr/emojis"],r["@opfr/utils-lang"]))})(this,(function(r,o,T,N){"use strict";const n=["boost","bottle","repair","chest","scroll","object","store","cookedMeal","enchant","alcohol"],d=["item","resource","enchant"],l=["ring","strap","boots","helmet","collar","belt","weapon"],h=["ring_left","ring_right","strap_left","strap_right","boots","helmet","collar","belt","weapon"],Y={collar:"collar",boots:"boots",ring_left:"ring",ring_right:"ring",strap_left:"strap",strap_right:"strap",helmet:"helmet",belt:"belt",weapon:"weapon"},C=["equipment"],P=["OPEN_CHEST","APPLY_BUFF","ALCOHOL_DRINK","HEAL_HP","GAIN_XP","GAIN_RANDOM_XP","BOOST","DRINK_BOTTLE","DROP","CLEAR_HANGOVER","UNLOCK_ASSET","ADD_SCROLL_CHARAC","RAID_REDUCE_COOLDOWN","CREW_XP_BUFF","CREW_REPAIR"],f=["single","multiple","all"],g=[...n,...l],D=[...d,...C],R=["aeronef","anchor","ancient_key","background","beer","boost_day","boost_week","bottle_xp_1","bottle_xp_2","bottle_xp_3","bottle_xp_4","bowl","bowl_cereal","bread","cereal","cheese","chest_1","chest_2","chest_3","chest_4","chest_blacksmith_1","chest_blacksmith_2","chest_blacksmith_3","chest_christmas","christmas_present","clover","compass","cotton","cursed_hawthorn","dragon_heart","ebony_poppy","edelweiss","egg","elemental_concentrate_earth","elemental_concentrate_fire","elemental_concentrate_life","elemental_concentrate_moon","elemental_concentrate_water","elemental_concentrate_wind","emerald","empty_chest","empty_scroll","enchant_cereal","enchant_clover","enchant_cotton","enchant_ebony_poppy","enchant_hemp","enchant_iron","enchant_leather","enchant_manganese","enchant_poppy","enchant_pure_water","enchant_rope","enchant_rose","enchant_sea_salt","enchant_tissue","enchant_wood","enchanted_emerald","enchanted_ruby","enchanted_sapphire","enchanted_stone","essence_earth","essence_fire","essence_life","essence_moon","essence_water","essence_wind","fairy_wing","flour","fruit","glass_bottle","glue","hammock","hemp","iron","iron_ore","leather","little_cookie_christmas","lock","mandrake","manganese","map_fragment","milk","mithril","mugwort","mysterious_egg_christmas","nail","obsidian","omelet","phoenix_feather","poppy","pure_water","repair_kit","rescue_boat","rhum","rope","rose","ruby","rudder","saffron","sailing_boat","salt_water","sapphire","scrap","scroll_agility","scroll_chance","scroll_intelligence","scroll_strength","scroll_vitality","scroll_wisdom","sea_salt","siren_tear","strange_gem","strange_stone","strawberry_cake","sugar","sugar_cane_christmas","tissue","title","tools","toy","wine","wood","wood_plank"],m=["adventurer_belt","adventurer_boots","adventurer_collar","adventurer_helmet","adventurer_strap","adventurer_weapon","christmas_belt","christmas_boots","christmas_collar","christmas_gloves","christmas_helmet","christmas_strap","christmas_weapon","herbalist_belt","herbalist_boots","herbalist_helmet","herbalist_weapon","little_blacksmith_collar","little_blacksmith_ring","little_blacksmith_strap","little_blacksmith_weapon","marine_collar","marine_helmet","marine_ring","marine_strap","pirate_belt","pirate_helmet","pirate_ring","pirate_weapon","revolutionary_belt","revolutionary_boots","revolutionary_helmet","revolutionary_ring"],L=[...R,...m],G={pirate:{name:"pirate",color:"#8A1623",role:"1047815125282848849"},marine:{name:"marine",color:"#387cbc",role:"1047816059937361940"},revolutionary:{name:"revolutionary",color:"#335635",role:"1047815105846444152"},citizen:{name:"citizen",color:"#fff",role:"1147953458507423874"}},H="citizen";var e=(_=>(_.BASIC="BASIC",_.COMMON="COMMON",_.RARE="RARE",_.EPIC="EPIC",_.LEGENDARY="LEGENDARY",_.MYTHIC="MYTHIC",_))(e||{});const S=[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],v={BASIC:{color:"#fff",strength:0,id:e.BASIC,name:(_,p=1)=>o.t(`ranks.${e.BASIC}.text`,{count:p,context:_,ns:"common"})},COMMON:{color:"#813D31",strength:1,id:e.COMMON,name:(_,p=1)=>o.t(`ranks.${e.COMMON}.text`,{count:p,context:_,ns:"common"})},RARE:{color:"#5B6870",strength:2,id:e.RARE,name:(_,p=1)=>o.t(`ranks.${e.RARE}.text`,{count:p,context:_,ns:"common"})},EPIC:{color:"#C46619",strength:3,id:e.EPIC,name:(_,p=1)=>o.t(`ranks.${e.EPIC}.text`,{count:p,context:_,ns:"common"})},LEGENDARY:{color:"#88A3CB",strength:4,id:e.LEGENDARY,name:(_,p=1)=>o.t(`ranks.${e.LEGENDARY}.text`,{count:p,context:_,ns:"common"})},MYTHIC:{color:"#F6bF62",strength:5,id:e.MYTHIC,name:(_,p=1)=>o.t(`ranks.${e.MYTHIC}.text`,{count:p,context:_,ns:"common"})}},y="background_default",B=[{id:"berry",path:{cropped:{RARE:"cropped_b_berry_RARE.webp",MYTHIC:"cropped_b_berry_MYTHIC.webp",LEGENDARY:"cropped_b_berry_LEGENDARY.webp",EPIC:"cropped_b_berry_EPIC.webp",COMMON:"cropped_b_berry_COMMON.webp"},default:{RARE:"b_berry_RARE.webp",MYTHIC:"b_berry_MYTHIC.webp",LEGENDARY:"b_berry_LEGENDARY.webp",EPIC:"b_berry_EPIC.webp",COMMON:"b_berry_COMMON.webp"}},progressive:!0},{id:"broship",path:{cropped:{RARE:"cropped_b_broship_RARE.webp",MYTHIC:"cropped_b_broship_MYTHIC.webp",LEGENDARY:"cropped_b_broship_LEGENDARY.webp",EPIC:"cropped_b_broship_EPIC.webp",COMMON:"cropped_b_broship_COMMON.webp"},default:{RARE:"b_broship_RARE.webp",MYTHIC:"b_broship_MYTHIC.webp",LEGENDARY:"b_broship_LEGENDARY.webp",EPIC:"b_broship_EPIC.webp",COMMON:"b_broship_COMMON.webp"}},progressive:!0},{id:"carpenter",path:{cropped:{RARE:"cropped_b_carpenter_RARE.webp",MYTHIC:"cropped_b_carpenter_MYTHIC.webp",LEGENDARY:"cropped_b_carpenter_LEGENDARY.webp",EPIC:"cropped_b_carpenter_EPIC.webp",COMMON:"cropped_b_carpenter_COMMON.webp"},default:{RARE:"b_carpenter_RARE.webp",MYTHIC:"b_carpenter_MYTHIC.webp",LEGENDARY:"b_carpenter_LEGENDARY.webp",EPIC:"b_carpenter_EPIC.webp",COMMON:"b_carpenter_COMMON.webp"}},progressive:!0},{id:"casino",path:{cropped:{MYTHIC:"cropped_b_casino_MYTHIC.webp",LEGENDARY:"cropped_b_casino_LEGENDARY.webp"},default:{MYTHIC:"b_casino_MYTHIC.webp",LEGENDARY:"b_casino_LEGENDARY.webp"}},progressive:!0},{id:"communism",path:{cropped:{RARE:"cropped_b_communism_RARE.webp",MYTHIC:"cropped_b_communism_MYTHIC.webp",LEGENDARY:"cropped_b_communism_LEGENDARY.webp",EPIC:"cropped_b_communism_EPIC.webp",COMMON:"cropped_b_communism_COMMON.webp"},default:{RARE:"b_communism_RARE.webp",MYTHIC:"b_communism_MYTHIC.webp",LEGENDARY:"b_communism_LEGENDARY.webp",EPIC:"b_communism_EPIC.webp",COMMON:"b_communism_COMMON.webp"}},progressive:!0},{id:"craft",path:{cropped:{RARE:"cropped_b_craft_RARE.webp",MYTHIC:"cropped_b_craft_MYTHIC.webp",LEGENDARY:"cropped_b_craft_LEGENDARY.webp",EPIC:"cropped_b_craft_EPIC.webp",COMMON:"cropped_b_craft_COMMON.webp"},default:{RARE:"b_craft_RARE.webp",MYTHIC:"b_craft_MYTHIC.webp",LEGENDARY:"b_craft_LEGENDARY.webp",EPIC:"b_craft_EPIC.webp",COMMON:"b_craft_COMMON.webp"}},progressive:!0},{id:"crewship",path:{cropped:{RARE:"cropped_b_crewship_RARE.webp",MYTHIC:"cropped_b_crewship_MYTHIC.webp",LEGENDARY:"cropped_b_crewship_LEGENDARY.webp",EPIC:"cropped_b_crewship_EPIC.webp",COMMON:"cropped_b_crewship_COMMON.webp"},default:{RARE:"b_crewship_RARE.webp",MYTHIC:"b_crewship_MYTHIC.webp",LEGENDARY:"b_crewship_LEGENDARY.webp",EPIC:"b_crewship_EPIC.webp",COMMON:"b_crewship_COMMON.webp"}},progressive:!0},{id:"default",path:{cropped:{RARE:"cropped_b_default_RARE.webp",MYTHIC:"cropped_b_default_MYTHIC.webp",LEGENDARY:"cropped_b_default_LEGENDARY.webp",EPIC:"cropped_b_default_EPIC.webp",COMMON:"cropped_b_default_COMMON.webp"},default:{RARE:"b_default_RARE.webp",MYTHIC:"b_default_MYTHIC.webp",LEGENDARY:"b_default_LEGENDARY.webp",EPIC:"b_default_EPIC.webp",COMMON:"b_default_COMMON.webp"}},progressive:!0},{id:"ecrire",path:{cropped:{RARE:"cropped_b_ecrire_RARE.webp",MYTHIC:"cropped_b_ecrire_MYTHIC.webp",LEGENDARY:"cropped_b_ecrire_LEGENDARY.webp",EPIC:"cropped_b_ecrire_EPIC.webp",COMMON:"cropped_b_ecrire_COMMON.webp"},default:{RARE:"b_ecrire_RARE.webp",MYTHIC:"b_ecrire_MYTHIC.webp",LEGENDARY:"b_ecrire_LEGENDARY.webp",EPIC:"b_ecrire_EPIC.webp",COMMON:"b_ecrire_COMMON.webp"}},progressive:!0},{id:"ermite",path:{cropped:{RARE:"cropped_b_ermite_RARE.webp",MYTHIC:"cropped_b_ermite_MYTHIC.webp",LEGENDARY:"cropped_b_ermite_LEGENDARY.webp",EPIC:"cropped_b_ermite_EPIC.webp",COMMON:"cropped_b_ermite_COMMON.webp"},default:{RARE:"b_ermite_RARE.webp",MYTHIC:"b_ermite_MYTHIC.webp",LEGENDARY:"b_ermite_LEGENDARY.webp",EPIC:"b_ermite_EPIC.webp",COMMON:"b_ermite_COMMON.webp"}},progressive:!0},{id:"exploration",path:{cropped:{RARE:"cropped_b_exploration_RARE.webp",MYTHIC:"cropped_b_exploration_MYTHIC.webp",LEGENDARY:"cropped_b_exploration_LEGENDARY.webp",EPIC:"cropped_b_exploration_EPIC.webp",COMMON:"cropped_b_exploration_COMMON.webp"},default:{RARE:"b_exploration_RARE.webp",MYTHIC:"b_exploration_MYTHIC.webp",LEGENDARY:"b_exploration_LEGENDARY.webp",EPIC:"b_exploration_EPIC.webp",COMMON:"b_exploration_COMMON.webp"}},progressive:!0},{id:"marine",path:{cropped:{RARE:"cropped_b_marine_RARE.webp",MYTHIC:"cropped_b_marine_MYTHIC.webp",LEGENDARY:"cropped_b_marine_LEGENDARY.webp",EPIC:"cropped_b_marine_EPIC.webp",COMMON:"cropped_b_marine_COMMON.webp"},default:{RARE:"b_marine_RARE.webp",MYTHIC:"b_marine_MYTHIC.webp",LEGENDARY:"b_marine_LEGENDARY.webp",EPIC:"b_marine_EPIC.webp",COMMON:"b_marine_COMMON.webp"}},progressive:!0},{id:"mode",path:{cropped:{RARE:"cropped_b_mode_RARE.webp",MYTHIC:"cropped_b_mode_MYTHIC.webp",LEGENDARY:"cropped_b_mode_LEGENDARY.webp",EPIC:"cropped_b_mode_EPIC.webp",COMMON:"cropped_b_mode_COMMON.webp"},default:{RARE:"b_mode_RARE.webp",MYTHIC:"b_mode_MYTHIC.webp",LEGENDARY:"b_mode_LEGENDARY.webp",EPIC:"b_mode_EPIC.webp",COMMON:"b_mode_COMMON.webp"}},progressive:!0},{id:"pirate",path:{cropped:{RARE:"cropped_b_pirate_RARE.webp",MYTHIC:"cropped_b_pirate_MYTHIC.webp",LEGENDARY:"cropped_b_pirate_LEGENDARY.webp",EPIC:"cropped_b_pirate_EPIC.webp",COMMON:"cropped_b_pirate_COMMON.webp"},default:{RARE:"b_pirate_RARE.webp",MYTHIC:"b_pirate_MYTHIC.webp",LEGENDARY:"b_pirate_LEGENDARY.webp",EPIC:"b_pirate_EPIC.webp",COMMON:"b_pirate_COMMON.webp"}},progressive:!0},{id:"recipe",path:{cropped:{RARE:"cropped_b_recipe_RARE.webp",MYTHIC:"cropped_b_recipe_MYTHIC.webp",LEGENDARY:"cropped_b_recipe_LEGENDARY.webp",EPIC:"cropped_b_recipe_EPIC.webp",COMMON:"cropped_b_recipe_COMMON.webp"},default:{RARE:"b_recipe_RARE.webp",MYTHIC:"b_recipe_MYTHIC.webp",LEGENDARY:"b_recipe_LEGENDARY.webp",EPIC:"b_recipe_EPIC.webp",COMMON:"b_recipe_COMMON.webp"}},progressive:!0},{id:"revolutionary",path:{cropped:{RARE:"cropped_b_revolutionary_RARE.webp",MYTHIC:"cropped_b_revolutionary_MYTHIC.webp",LEGENDARY:"cropped_b_revolutionary_LEGENDARY.webp",EPIC:"cropped_b_revolutionary_EPIC.webp",COMMON:"cropped_b_revolutionary_COMMON.webp"},default:{RARE:"b_revolutionary_RARE.webp",MYTHIC:"b_revolutionary_MYTHIC.webp",LEGENDARY:"b_revolutionary_LEGENDARY.webp",EPIC:"b_revolutionary_EPIC.webp",COMMON:"b_revolutionary_COMMON.webp"}},progressive:!0},{id:"sardine",path:{cropped:{RARE:"cropped_b_sardine_RARE.webp",MYTHIC:"cropped_b_sardine_MYTHIC.webp",LEGENDARY:"cropped_b_sardine_LEGENDARY.webp",EPIC:"cropped_b_sardine_EPIC.webp",COMMON:"cropped_b_sardine_COMMON.webp"},default:{RARE:"b_sardine_RARE.webp",MYTHIC:"b_sardine_MYTHIC.webp",LEGENDARY:"b_sardine_LEGENDARY.webp",EPIC:"b_sardine_EPIC.webp",COMMON:"b_sardine_COMMON.webp"}},progressive:!0},{id:"shipsecte",path:{cropped:{RARE:"cropped_b_shipsecte_RARE.webp",MYTHIC:"cropped_b_shipsecte_MYTHIC.webp",LEGENDARY:"cropped_b_shipsecte_LEGENDARY.webp",EPIC:"cropped_b_shipsecte_EPIC.webp",COMMON:"cropped_b_shipsecte_COMMON.webp"},default:{RARE:"b_shipsecte_RARE.webp",MYTHIC:"b_shipsecte_MYTHIC.webp",LEGENDARY:"b_shipsecte_LEGENDARY.webp",EPIC:"b_shipsecte_EPIC.webp",COMMON:"b_shipsecte_COMMON.webp"}},progressive:!0}],k=[{id:"black-jack",path:{default:"b_black-jack.webp",cropped:"cropped_b_black-jack.webp"},progressive:!1},{id:"calendar",path:{default:"b_calendar.webp",cropped:"cropped_b_calendar.webp"},progressive:!1},{id:"camarade",path:{default:"b_camarade.webp",cropped:"cropped_b_camarade.webp"},progressive:!1},{id:"chance",path:{default:"b_chance.webp",cropped:"cropped_b_chance.webp"},progressive:!1},{id:"doublesix",path:{default:"b_doublesix.webp",cropped:"cropped_b_doublesix.webp"},progressive:!1},{id:"noluck",path:{default:"b_noluck.webp",cropped:"cropped_b_noluck.webp"},progressive:!1},{id:"premium",path:{default:"b_premium.webp",cropped:"cropped_b_premium.webp"},progressive:!1},{id:"selfish",path:{default:"b_selfish.webp",cropped:"cropped_b_selfish.webp"},progressive:!1}],M={exploration:{id:"writeChat",img:"exploration",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:Explorateurbois:1175507909518573578>","<:Explorateurargent:1175508452467015680>","<:Explorateuror:1175507917642932245>","<:Explorateurplatine:1175507920587329586>","<:Explorateurultime:1175507922818699334>"],crew:!1},ecrire:{id:"sendMessage",img:"ecrire",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:Spammeurbois:1175508156785365003>","<:Spammeurargent:1175507962249351268>","<:Spammeuror:1175507966808572007>","<:Spammeurplatine:1175507968293339167>","<:Spammeurultime:1175507863460913222>"],crew:!1},ermite:{id:"timeInVoice",img:"ermite",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:Ermitebois:1175507899875868672>","<:Ermiteargent:1175508498138796153>","<:Ermiteor:1175508465746182305>","<:Ermiteplatine:1175507904695124028>","<:Ermiteultime:1175507906041499749>"],crew:!1},berry:{id:"berry",img:"berry",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:ElonMuskbois:1175507891600498758>","<:ElonMuskargent:1175508764988801034>","<:ElonMuskor:1175508756700856390>","<:ElonMuskplatine:1175508739386789928>","<:ElonMuskultime:1175507895668985886>"],crew:!1},mode:{id:"spendShop",img:"mode",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:FashionViktimbois:1175508381436485672>","<:FashionViktimargent:1175507924873904128>","<:FashionViktimor:1175507926719414406>","<:FashionViktimplatine:1175508345562599445>","<:FashionViktimultime:1175507931517698088>"],crew:!1},noluck:{id:"noLuck",img:"noluck",isProgressive:!1,emojis:"<:BadluckPlatine:1175507878048702505>",crew:!1},chance:{id:"chance",img:"chance",isProgressive:!1,emojis:"<:BadgeChanceux:1192743999514103869>",crew:!1},casino:{id:"casino",img:"casino",isProgressive:[e.LEGENDARY,e.MYTHIC],emojis:["<:GamblingAddict:1175507934223016047>","<:GamblingAddictDiamond:1187147920647131207>"],crew:!1},premium:{id:"premium",img:"premium",isProgressive:!1,emojis:"<:BadgesDon:1175507876056399933>",crew:!1},calendar:{id:"calendar",img:"calendar",isProgressive:!1,emojis:"<:Calendrier:1187170872176431114>",crew:!1},doublesix:{id:"doublesix",img:"doublesix",isProgressive:!1,emojis:"<:DoubleSix:1187178228624937000>",crew:!1},"black-jack":{id:"blackJack",img:"black-jack",isProgressive:!1,emojis:"<:BlackJack:1187456310137069618>",crew:!1},communism:{id:"communism",img:"communism",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_communism_Bronze:1234375558184570902>","<:cropped_communism_Silver:1234375563729440789>","<:cropped_communism_Gold:1234375561154007103>","<:cropped_communism_Platinum:1234375562269687849>","<:cropped_communism_Diamond:1234375559811825705>"],crew:!0},crewship:{id:"crewship",img:"crewship",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_crewship_Bronze:1234458902641246260>","<:cropped_crewship_Silver:1234458908840431617>","<:cropped_crewship_Gold:1234458905694961724>","<:cropped_crewship_Platinum:1234458907741782038>","<:cropped_crewship_Diamond:1234458904100864000>"],crew:!0},broship:{id:"broship",img:"broship",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_broship_Bronze:1234537705292038175>","<:cropped_broship_Silver:1234537711214530652>","<:cropped_broship_Gold:1234537708047695892>","<:cropped_broship_Platinum:1234537710170013867>","<:cropped_broship_Diamond:1234537706810245161>"],crew:!0},shipsecte:{id:"shipsecte",img:"shipsecte",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_shipsecte_Bronze:1234547646023078009>","<:cropped_shipsecte_Silver:1234547651912011827>","<:cropped_shipsecte_Gold:1234547649160675408>","<:cropped_shipsecte_Platinum:1234547650414514267>","<:cropped_shipsecte_Diamond:1234547648011173888>"],crew:!0},sardine:{id:"sardine",img:"sardine",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_sardine_Bronze:1234549442799997010>","<:cropped_sardine_Silver:1234549449036927088>","<:cropped_sardine_Gold:1234549445916622988>","<:cropped_sardine_Platinum:1234549447518720050>","<:cropped_sardine_Diamond:1234549444738023484>"],crew:!0},carpenter:{id:"carpenter",img:"carpenter",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_carpenter_Bronze:1234555340964626495>","<:cropped_carpenter_Silver:1234555345935007764>","<:cropped_carpenter_Gold:1234555343317635153>","<:cropped_carpenter_Platinum:1234555344819191909>","<:cropped_carpenter_Diamond:1234555342143357072>"],crew:!0},camarade:{id:"camarade",img:"camarade",isProgressive:!1,emojis:"<:cropped_camarade:1234582024077967361>",crew:!0},selfish:{id:"selfish",img:"selfish",isProgressive:!1,emojis:"<:cropped_selfish:1234587373363527780>",crew:!0},recipe:{id:"recipe",img:"recipe",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_b_recipe_Bronze:1244357782573023282>","<:cropped_b_recipe_Silver:1244357788361031711>","<:cropped_b_recipe_Gold:1244357785555308574>","<:cropped_b_recipe_Platinum:1244357786750685225>","<:cropped_b_recipe_Diamond:1244357784397545526>"],crew:!1},craft:{id:"craft",img:"craft",isProgressive:[e.COMMON,e.RARE,e.EPIC,e.LEGENDARY,e.MYTHIC],emojis:["<:cropped_b_craft_Bronze:1244357834452238447>","<:cropped_b_craft_Silver:1244357840513011722>","<:cropped_b_craft_Gold:1244357837333725306>","<:cropped_b_craft_Platinum:1244357838801735761>","<:cropped_b_craft_Diamond:1244357835735695401>"],crew:!1}},F=_=>!!_.isProgressive,U=["b_marine","b_revolutionary","b_pirate"],j=(_,p)=>_.filter(i=>{const[t]=i.split("_"),c=Object.values(M).find(b=>b.id===t);return c?p(c):!1}),V=_=>_.filter((p,i,t)=>{const[c,b]=p.split("_");return!t.find(be=>{const[ne,de]=be.split("_");return c!==ne?!1:b<de})}),Q=["idiot","satan","edito","toy"],z={satan:"satan",idiot:"idiot",edito:"edito",toy:"toy"},K=["default","christmas"],A=_=>Math.round(5e3*Math.pow(200,.01*_)/10)*10,a=_=>_>=1?a(_-1)+A(_):0,I=(_,p=0)=>_<a(p+1)?p:I(_,p+1),X=_=>o.t("xp.user",{amount:N.formatNumber(_),emoji:T.emojis.xp,ns:"common"}),$={cooldown:{casino:[],work:[]},berry:{work:[],global:[]},drop:{work:[]},xp:{global:[]}},q=_=>_.expireAt&&_.expireAt<new Date,W=({multiplier:_,origin:p,startIn:i,endIn:t})=>({multiplier:_,origin:p,expireAt:t?new Date(Date.now()+((i??0)+t)*60*60*1e3):null,startAt:i?new Date(Date.now()+i*60*60*1e3):null}),J=["vitality","strength","agility","intelligence","chance","wisdom"],w=10,s=1,O=[[200,4],[100,3],[50,2],[0,s]],Z=100,x=10,E=_=>{for(const[p,i]of O)if(_>=p)return i;return s},ee=(_,p)=>{let i=0;for(;p>0;p--)i+=E(_),_++;return i},re=_=>{let p=0;for(;_>0;_-=E(p))p++;return p},_e=(_,p)=>p*w-Object.values(_).reduce((i,t)=>i+t,0),pe=["category","alpha","quantity"],ie=(_,p)=>p===null?null:_===p?`-${_}`:p,oe=["dice","rps","doubleOrQuit","blackJack","priceIsRight"],te=10;class ce{title=void 0;titleId;badge;isFactionBadge;asset;items;secret;daily;crew;repeatable}var u=(_=>(_.COMPLETED="COMPLETED",_.IN_PROGRESS="IN_PROGRESS",_))(u||{});const ae=10,se=1e7,Ee=100;r.BAG_IDS=K,r.BET_MAX_VALUE=se,r.BET_MIN_VALUE=ae,r.BadgeList=M,r.BaseQuest=ce,r.CHARACTERISTICS=J,r.CHARACTERISTIC_DEFAULT_POINT_COST=s,r.CHARACTERISTIC_POINT_COSTS=O,r.CHARACTERISTIC_POINT_PER_LEVEL=w,r.DEFAULT_BACKGROUND_ID=y,r.DEFAULT_BUFF_TREE=$,r.DEFAULT_FACTION=H,r.DEFAULT_MAX_HP=Z,r.EDITO_READ=Ee,r.EFFECT_KEYS=P,r.ENTITY_CATEGORY=D,r.ENTITY_IMAGE_IDS=L,r.ENTITY_TYPES=g,r.EQUIPMENT_CATEGORY=C,r.EQUIPMENT_FROM_SLOT_TO_TYPE=Y,r.EQUIPMENT_IMAGE_IDS=m,r.EQUIPMENT_SLOT=h,r.EQUIPMENT_TYPE=l,r.FACTIONS=G,r.FactionBadgeList=U,r.GAME_TYPES=oe,r.HP_PER_VITALITY=x,r.ITEM_CATEGORY=d,r.ITEM_IMAGE_IDS=R,r.ITEM_TYPE=n,r.PROFILE_ASSETS_ID=Q,r.PROGRESSIVE_BADGES=B,r.QuestStatus=u,r.RANKS=v,r.RANK_IDS_WITHOUT_BASIC=S,r.RankId=e,r.SHOP_DEFAULT_AVAILABLE_ENTITY_AMOUNT=te,r.SORT_VALUES=pe,r.STRICT_BADGES=k,r.USAGE_MODES=f,r.displayXp=X,r.filterBadgesBy=j,r.filterRarity=V,r.getAvailableCharacteristicPoints=_e,r.getCharacteristicCost=E,r.getComputedCharacteristicCost=ee,r.getComputedCharacteristicValue=re,r.getCurrentLevel=I,r.getNewSortValue=ie,r.hasBuffExpired=q,r.profileAssets=z,r.progressiveBadgeTypeGuard=F,r.totalXpToLevel=a,r.transformToDBBuff=W,r.xpToLevel=A,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/xp/index.d.ts
CHANGED
package/dist/xp/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/xp/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/xp/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
package/dist/xp/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/xp/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/xp/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
package/dist/xp/utils.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export declare const xpToLevel: (level: number) => number;
|
|
2
2
|
export declare const totalXpToLevel: (level: number) => number;
|
|
3
3
|
export declare const getCurrentLevel: (xp: number, level?: number) => number;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const totalCrewXpToLevel: (level: number) => number;
|
|
6
|
-
export declare const getCurrentCrewLevel: (xp: number, level?: number) => number;
|
|
7
|
-
export declare const displayXp: ([user, crew]: [number, number]) => string;
|
|
4
|
+
export declare const displayXp: (userXp: number) => string;
|
|
8
5
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/xp/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/xp/utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,WACqB,CAAC;AAE7D,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MACgB,CAAC;AAEhE,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,EAAE,QAAO,MAAU,KAAG,MACS,CAAC;AAE1E,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/xp/utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,WACqB,CAAC;AAE7D,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MACgB,CAAC;AAEhE,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,EAAE,QAAO,MAAU,KAAG,MACS,CAAC;AAE1E,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,WAKpC,CAAC"}
|
package/dist/xp/utils.js
CHANGED
|
@@ -4,16 +4,9 @@ import { formatNumber } from '@opfr/utils-lang';
|
|
|
4
4
|
export const xpToLevel = (level) => Math.round((5000 * Math.pow(200, 0.01 * level)) / 10) * 10;
|
|
5
5
|
export const totalXpToLevel = (level) => level >= 1 ? totalXpToLevel(level - 1) + xpToLevel(level) : 0;
|
|
6
6
|
export const getCurrentLevel = (xp, level = 0) => xp < totalXpToLevel(level + 1) ? level : getCurrentLevel(xp, level + 1);
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const displayXp = ([user, crew]) => crew
|
|
13
|
-
? `${t('xp.user', { ns: 'common', amount: formatNumber(user), emoji: emojis.xp })} ${t('xp.crew', { amount: formatNumber(crew), emoji: emojis.xp, ns: 'common' })}`
|
|
14
|
-
: t('xp.user', {
|
|
15
|
-
amount: formatNumber(user),
|
|
16
|
-
emoji: emojis.xp,
|
|
17
|
-
ns: 'common',
|
|
18
|
-
});
|
|
7
|
+
export const displayXp = (userXp) => t('xp.user', {
|
|
8
|
+
amount: formatNumber(userXp),
|
|
9
|
+
emoji: emojis.xp,
|
|
10
|
+
ns: 'common',
|
|
11
|
+
});
|
|
19
12
|
//# sourceMappingURL=utils.js.map
|
package/dist/xp/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/xp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,SAAS,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE,CACzC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CA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AgB,CAAC,EAAU,EAAE,CACvE,EAAE,GAAG,cAAc,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,EAAE,CAC1C,CAAC,CAAC,SAAS,EAAE;IACX,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC,EAAE;IAChB,EAAE,EAAE,QAAQ;CACb,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opfr/definitions",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OPFR definitions",
|
|
6
6
|
"author": "Matthieu VEIGA",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prepublish": "npm run build",
|
|
9
|
-
"build": "vite build && tsc
|
|
9
|
+
"build": "vite build && tsc",
|
|
10
10
|
"generate:all": "npm run generate:image_ids && npm run generate:badges",
|
|
11
11
|
"generate:image_ids": "node scripts/generateImageIds.mjs",
|
|
12
12
|
"generate:badges": "node scripts/generateBadges.mjs"
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@opfr/emojis": "^1.1.0",
|
|
21
|
-
"@opfr/utils-lang": "^1.1.
|
|
21
|
+
"@opfr/utils-lang": "^1.1.1",
|
|
22
22
|
"i18next": "23.16.8"
|
|
23
23
|
},
|
|
24
|
-
"main": "
|
|
25
|
-
"module": "
|
|
24
|
+
"main": "dist/index.umd.js",
|
|
25
|
+
"module": "dist/index.es.js",
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"node_modules",
|
|
45
45
|
"dist"
|
|
46
46
|
],
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "9c023c6e109febcb794bd1cd695baa44d4d00111"
|
|
48
48
|
}
|
package/dist/crew/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/crew/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAG,GAAY,CAAC;AAEpD,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,eAAO,MAAM,2BAA2B,MAAM,CAAC"}
|
package/dist/crew/constants.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/crew/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAY,CAAC;AAEpD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC"}
|
package/dist/crew/index.d.ts
DELETED
package/dist/crew/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/crew/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
package/dist/crew/index.js
DELETED
package/dist/crew/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crew/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
|
package/dist/crew/types.d.ts
DELETED
package/dist/crew/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/crew/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
package/dist/crew/types.js
DELETED
package/dist/crew/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/crew/types.ts"],"names":[],"mappings":""}
|
package/dist/raids/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/raids/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
package/dist/raids/index.js
DELETED
package/dist/raids/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/raids/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
package/dist/raids/types.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { Buff } from '../buffs';
|
|
2
|
-
import type { Characteristic, CharacteristicsRecord } from '../characteristics';
|
|
3
|
-
export type RaidRewards = Partial<{
|
|
4
|
-
[key: string]: number | unknown;
|
|
5
|
-
} & {
|
|
6
|
-
[K in 'xp' | 'berry' | 'hp']: number;
|
|
7
|
-
} & {
|
|
8
|
-
title: string;
|
|
9
|
-
condition: string;
|
|
10
|
-
}>;
|
|
11
|
-
export type RaidPenalties = Partial<{
|
|
12
|
-
[K in 'xp' | 'berry' | 'hp' | 'time_out']: number;
|
|
13
|
-
} & {
|
|
14
|
-
buffs: Buff[];
|
|
15
|
-
} & {
|
|
16
|
-
[key: string]: number | unknown;
|
|
17
|
-
}>;
|
|
18
|
-
export type RaidConditionRequirements = {
|
|
19
|
-
conditions: string[];
|
|
20
|
-
mode: 'include' | 'exclude';
|
|
21
|
-
};
|
|
22
|
-
export type RaidRequirements = Partial<CharacteristicsRecord> | {
|
|
23
|
-
sum: number;
|
|
24
|
-
characteristics: Characteristic[];
|
|
25
|
-
} | RaidConditionRequirements | {
|
|
26
|
-
warns: number;
|
|
27
|
-
};
|
|
28
|
-
export type RaidItemRequirements = Partial<Record<string, number>> | RaidConditionRequirements;
|
|
29
|
-
export type RaidStepId = {
|
|
30
|
-
UserChoice: `uc_${string}`;
|
|
31
|
-
Event: `ev_${string}`;
|
|
32
|
-
End: `end_${string}`;
|
|
33
|
-
ConditionCheck: `c_${string}`;
|
|
34
|
-
ItemRequired: `rq_${string}`;
|
|
35
|
-
Goto: `goto_${string}`;
|
|
36
|
-
};
|
|
37
|
-
export type RaidGoto = {
|
|
38
|
-
id: RaidStepId['Goto'];
|
|
39
|
-
label: string;
|
|
40
|
-
goto: RaidStepId[keyof RaidStepId][];
|
|
41
|
-
};
|
|
42
|
-
export type RaidUserChoice = {
|
|
43
|
-
id: RaidStepId['UserChoice'];
|
|
44
|
-
label: string;
|
|
45
|
-
output: RaidConditionCheck | RaidEvent | RaidEnd;
|
|
46
|
-
};
|
|
47
|
-
export type RaidItemRequired = {
|
|
48
|
-
id: RaidStepId['ItemRequired'];
|
|
49
|
-
label: string;
|
|
50
|
-
requirements: RaidItemRequirements;
|
|
51
|
-
output: RaidConditionCheck | RaidEvent | RaidEnd;
|
|
52
|
-
hideAllIfAvailable?: boolean;
|
|
53
|
-
doNotConsume?: boolean;
|
|
54
|
-
};
|
|
55
|
-
export type RaidEvent = {
|
|
56
|
-
id: RaidStepId['Event'];
|
|
57
|
-
title: string;
|
|
58
|
-
text: string | ((obtainedRewards: (RaidStepId['Event'] | RaidStepId['End'])[]) => string);
|
|
59
|
-
rewards?: RaidRewards;
|
|
60
|
-
penalties?: RaidPenalties;
|
|
61
|
-
outputs: (RaidUserChoice | RaidItemRequired | RaidGoto)[];
|
|
62
|
-
};
|
|
63
|
-
export type RaidEnd = {
|
|
64
|
-
id: RaidStepId['End'];
|
|
65
|
-
title: string;
|
|
66
|
-
text: string | ((obtainedRewards: (RaidStepId['Event'] | RaidStepId['End'])[]) => string);
|
|
67
|
-
rewards?: RaidRewards;
|
|
68
|
-
penalties?: RaidPenalties;
|
|
69
|
-
};
|
|
70
|
-
export type RaidConditionCheck = {
|
|
71
|
-
id: RaidStepId['ConditionCheck'];
|
|
72
|
-
requirements: RaidRequirements;
|
|
73
|
-
success: RaidEvent | RaidEnd;
|
|
74
|
-
failure: RaidEvent | RaidEnd;
|
|
75
|
-
};
|
|
76
|
-
export type RaidType = 'classic' | 'special';
|
|
77
|
-
export type Raid = {
|
|
78
|
-
id: string;
|
|
79
|
-
cooldown: number;
|
|
80
|
-
name: string;
|
|
81
|
-
description: string;
|
|
82
|
-
type: RaidType;
|
|
83
|
-
start: RaidEvent;
|
|
84
|
-
};
|
|
85
|
-
export type RaidStep = RaidItemRequired | RaidEnd | RaidEvent | RaidUserChoice | RaidConditionCheck | RaidGoto;
|
|
86
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/raids/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,MAAM,WAAW,GAAG,OAAO,CAC/B;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG;KACnC,CAAC,IAAI,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM;CACrC,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC;KAAG,CAAC,IAAI,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,UAAU,GAAG,MAAM;CAAE,GAAG;IAAE,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,GAAG;IAC1E,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACjC,CACF,CAAC;AA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AAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAChB,gBAAgB,GAChB,OAAO,GACP,SAAS,GACT,cAAc,GACd,kBAAkB,GAClB,QAAQ,CAAC"}
|
package/dist/raids/types.js
DELETED
package/dist/raids/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/raids/types.ts"],"names":[],"mappings":""}
|
package/dist/xp/types.d.ts
DELETED
package/dist/xp/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/xp/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/dist/xp/types.js
DELETED
package/dist/xp/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/xp/types.ts"],"names":[],"mappings":""}
|