@opfr/raids 1.1.0 → 1.2.0
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/assets/mysterious_island/end_cave_blind_walk.webp +0 -0
- package/assets/mysterious_island/end_explore_gallery_with_torch.webp +0 -0
- package/assets/mysterious_island/end_indications_secret_room.webp +0 -0
- package/assets/mysterious_island/end_open_tomb.webp +0 -0
- package/assets/mysterious_island/ev_ancient_dark_passage.webp +0 -0
- package/assets/mysterious_island/ev_cave_torch_on.webp +0 -0
- package/assets/mysterious_island/ev_dark_cave.webp +0 -0
- package/assets/mysterious_island/ev_decipher_failure.webp +0 -0
- package/assets/mysterious_island/ev_decipher_success.webp +0 -0
- package/assets/mysterious_island/ev_dodge_animals.webp +0 -0
- package/assets/mysterious_island/ev_enter_jungle.webp +0 -0
- package/assets/mysterious_island/ev_explore_gallery_no_torch.webp +0 -0
- package/assets/mysterious_island/ev_find_tomb.webp +0 -0
- package/assets/mysterious_island/ev_main_path.webp +0 -0
- package/assets/mysterious_island/ev_ramp_success.webp +0 -0
- package/assets/mysterious_island/ev_search_way.webp +0 -0
- package/assets/mysterious_island/ev_start.webp +0 -0
- package/assets/mysterious_island/ev_walk_passage.webp +0 -0
- package/assets/mysterious_island/ev_walk_ruin.webp +0 -0
- package/assets/mysterious_island/ev_wild_animals.webp +0 -0
- package/assets/pirate_cave/end_explore_room.webp +0 -0
- package/assets/pirate_cave/end_open_chest.webp +0 -0
- package/assets/pirate_cave/ev_cave_begin.webp +0 -0
- package/assets/pirate_cave/ev_cave_entry.webp +0 -0
- package/assets/pirate_cave/ev_ghost_trap.webp +0 -0
- package/assets/pirate_cave/ev_left_path.webp +0 -0
- package/assets/pirate_cave/ev_right_path.webp +0 -0
- package/assets/pirate_cave/ev_secret_passage.webp +0 -0
- package/assets/pirate_cave/ev_sneak_walk_failure.webp +0 -0
- package/assets/pirate_cave/ev_sneak_walk_success.webp +0 -0
- package/assets/pirate_cave/ev_start.webp +0 -0
- package/assets/pirate_cave/ev_torch_on.webp +0 -0
- package/assets/resources/ev_enter_beach.webp +0 -0
- package/assets/resources/ev_enter_forest.webp +0 -0
- package/assets/resources/ev_enter_plains.webp +0 -0
- package/assets/resources/ev_goto_mine.webp +0 -0
- package/assets/resources/ev_hemp.webp +0 -0
- package/assets/resources/ev_salt_water.webp +0 -0
- package/assets/resources/ev_search_cereal.webp +0 -0
- package/assets/resources/ev_search_cotton.webp +0 -0
- package/assets/resources/ev_search_wood.webp +0 -0
- package/assets/resources/ev_start.webp +0 -0
- package/assets/training/end_captain_suite.webp +0 -0
- package/assets/training/end_fruits.webp +0 -0
- package/assets/training/end_plants.webp +0 -0
- package/assets/training/end_ship_hold.webp +0 -0
- package/assets/training/ev_agility50_failure.webp +0 -0
- package/assets/training/ev_agility50_success.webp +0 -0
- package/assets/training/ev_begin_forest.webp +0 -0
- package/assets/training/ev_dense_jungle.webp +0 -0
- package/assets/training/ev_hard_path.webp +0 -0
- package/assets/training/ev_start.webp +0 -0
- package/assets/training/ev_swamp.webp +0 -0
- package/dist/index.es.js +92 -82
- package/dist/index.umd.js +4 -4
- package/dist/raids/mysteriousIsland.d.ts.map +1 -1
- package/dist/raids/mysteriousIsland.js +6 -6
- package/dist/raids/mysteriousIsland.js.map +1 -1
- package/dist/raids/pirateCave.js +3 -3
- package/dist/raids/pirateCave.js.map +1 -1
- package/dist/raids/resources.js +8 -8
- package/dist/raids/resources.js.map +1 -1
- package/package.json +4 -3
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/index.es.js
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
import { t as r } from "i18next";
|
|
2
|
-
import { entityService as p, userMetaService as
|
|
3
|
-
import { isString as
|
|
2
|
+
import { entityService as p, userMetaService as m, userRaidService as u, userInventoryService as k, registerRaidMiddlewareEvents as q } from "@opfr/services";
|
|
3
|
+
import { isString as R, recordToArray as y, isNumber as c, formatNumber as x, precise as j, unique as $, filterNullAndUndefined as E } from "@opfr/utils-lang";
|
|
4
4
|
import { emojis as b } from "@opfr/emojis";
|
|
5
|
-
import { getCurrentLevel as
|
|
6
|
-
const
|
|
5
|
+
import { getCurrentLevel as U } from "@opfr/definitions";
|
|
6
|
+
const w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7
7
|
__proto__: null,
|
|
8
8
|
get mysteriousIslandRaid() {
|
|
9
|
-
return
|
|
9
|
+
return W;
|
|
10
10
|
},
|
|
11
11
|
get pirateCaveRaid() {
|
|
12
|
-
return
|
|
12
|
+
return M;
|
|
13
13
|
},
|
|
14
14
|
get resourcesRaid() {
|
|
15
|
-
return
|
|
15
|
+
return P;
|
|
16
16
|
},
|
|
17
17
|
get trainingRaid() {
|
|
18
|
-
return
|
|
18
|
+
return T;
|
|
19
19
|
}
|
|
20
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
21
|
-
const t =
|
|
20
|
+
}, Symbol.toStringTag, { value: "Module" })), o = async (e, s = 0) => {
|
|
21
|
+
const t = R(e) ? await p.get(e) : e;
|
|
22
22
|
return t ? r(t.name.key, {
|
|
23
23
|
ns: "entities",
|
|
24
24
|
count: s,
|
|
25
25
|
context: t.name.context
|
|
26
26
|
}) : "";
|
|
27
|
-
},
|
|
27
|
+
}, h = (e, s = 0) => e ? r(e.name.key, {
|
|
28
|
+
ns: "entities",
|
|
29
|
+
count: s,
|
|
30
|
+
context: e.name.context
|
|
31
|
+
}) : "", g = (e) => e.id.startsWith("ev_"), S = (e) => e.id.startsWith("uc_"), H = (e) => e.id.startsWith("goto_"), J = (e) => e.id.startsWith("end_"), C = (e) => e.id.startsWith("c_"), N = (e) => e.id.startsWith("rq_"), a = async (e, s, t, d) => {
|
|
28
32
|
const n = [];
|
|
29
33
|
return t && !s.includes(e) ? n.push(
|
|
30
34
|
`**${r("raid_rewards.reward_received", { ns: "raids" })} :
|
|
@@ -39,14 +43,14 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
39
43
|
if (i === "hp" && c(_))
|
|
40
44
|
return `- ${x(_)} ${b.hp}`;
|
|
41
45
|
const l = await p.get(i);
|
|
42
|
-
return l ? `- ${await
|
|
46
|
+
return l ? `- ${await h(l)} ${l.emojis}` : "";
|
|
43
47
|
})
|
|
44
48
|
)).join(`
|
|
45
49
|
`) + "**"
|
|
46
|
-
) : n.push(`**${r("raid_rewards.no_reward_received", { ns: "raids" })}**`),
|
|
50
|
+
) : n.push(`**${r("raid_rewards.no_reward_received", { ns: "raids" })}**`), d && n.push(
|
|
47
51
|
`**${r("raid_rewards.penalty_received", { ns: "raids" })} :
|
|
48
52
|
` + (await Promise.all(
|
|
49
|
-
y(
|
|
53
|
+
y(d).filter(([, i]) => c(i) ? i > 0 : i).map(async ([i, _]) => {
|
|
50
54
|
if (i === "buffs" || !c(_))
|
|
51
55
|
return "- Un debuff (consulter avec /boost)";
|
|
52
56
|
if (i === "xp" || i === "berry")
|
|
@@ -54,9 +58,9 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
54
58
|
if (i === "hp")
|
|
55
59
|
return `- ${_} ${b.hp}`;
|
|
56
60
|
if (i === "time_out")
|
|
57
|
-
return `- Time out pendant ${
|
|
61
|
+
return `- Time out pendant ${j(_)}`;
|
|
58
62
|
const l = await p.get(i);
|
|
59
|
-
return l ? `- ${await
|
|
63
|
+
return l ? `- ${await h(l)} ${l.emojis}` : "";
|
|
60
64
|
})
|
|
61
65
|
)).join(`
|
|
62
66
|
`) + "**"
|
|
@@ -65,31 +69,31 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
65
69
|
` : ""}${n.join(`
|
|
66
70
|
`)}${n.length > 0 ? `
|
|
67
71
|
` : ""}`;
|
|
68
|
-
},
|
|
72
|
+
}, K = async (e) => (await Promise.all(Object.values(w).map((s) => s(null)))).filter(
|
|
69
73
|
(s) => !e || s.type === e
|
|
70
|
-
),
|
|
71
|
-
const t = (await Promise.all(Object.values(
|
|
74
|
+
), X = async (e, s) => {
|
|
75
|
+
const t = (await Promise.all(Object.values(w).map((d) => d(s)))).find((d) => d.id === e);
|
|
72
76
|
if (!t)
|
|
73
77
|
throw new Error("raidBug");
|
|
74
78
|
return t;
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
79
|
+
}, A = (e, s) => {
|
|
80
|
+
if (g(e))
|
|
77
81
|
return e.outputs.find((t) => t.id === s);
|
|
78
|
-
if (
|
|
82
|
+
if (C(e))
|
|
79
83
|
return e.success.id === s ? e.success : e.failure;
|
|
80
|
-
if (
|
|
84
|
+
if (S(e) || N(e))
|
|
81
85
|
return e.output;
|
|
82
|
-
},
|
|
86
|
+
}, Z = (e, s) => {
|
|
83
87
|
let t = s.start;
|
|
84
|
-
for (const
|
|
88
|
+
for (const d of e) {
|
|
85
89
|
if (!t)
|
|
86
90
|
throw new Error("raidBug");
|
|
87
|
-
t =
|
|
91
|
+
t = A(t, d);
|
|
88
92
|
}
|
|
89
|
-
if (!t || !
|
|
93
|
+
if (!t || !g(t))
|
|
90
94
|
throw new Error("raidBug");
|
|
91
95
|
return t;
|
|
92
|
-
},
|
|
96
|
+
}, W = async (e) => ({
|
|
93
97
|
id: "mysterious_island",
|
|
94
98
|
name: r("raids.mysterious_island.name", { ns: "raids" }),
|
|
95
99
|
description: r("raids.mysterious_island.description", { ns: "raids" }),
|
|
@@ -137,7 +141,10 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
137
141
|
requirements: { ancient_key: 1 },
|
|
138
142
|
label: r("raids.mysterious_island.rq_use_old_key.label", {
|
|
139
143
|
ns: "raids",
|
|
140
|
-
requirements: await
|
|
144
|
+
requirements: await o(
|
|
145
|
+
"ancient_key",
|
|
146
|
+
1
|
|
147
|
+
)
|
|
141
148
|
}),
|
|
142
149
|
output: {
|
|
143
150
|
id: "ev_use_old_key",
|
|
@@ -371,7 +378,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
371
378
|
"raids.mysterious_island.rq_turn_on_torch_ruin.label",
|
|
372
379
|
{
|
|
373
380
|
ns: "raids",
|
|
374
|
-
requirements: await
|
|
381
|
+
requirements: await o(
|
|
375
382
|
"wood",
|
|
376
383
|
1
|
|
377
384
|
)
|
|
@@ -738,7 +745,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
738
745
|
"raids.mysterious_island.rq_turn_on_torch_jungle.label",
|
|
739
746
|
{
|
|
740
747
|
ns: "raids",
|
|
741
|
-
requirements: await
|
|
748
|
+
requirements: await o(
|
|
742
749
|
"wood",
|
|
743
750
|
1
|
|
744
751
|
)
|
|
@@ -977,7 +984,10 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
977
984
|
"raids.mysterious_island.rq_explore_gallery_with_torch.label",
|
|
978
985
|
{
|
|
979
986
|
ns: "raids",
|
|
980
|
-
requirements: await
|
|
987
|
+
requirements: await o(
|
|
988
|
+
"wood",
|
|
989
|
+
1
|
|
990
|
+
)
|
|
981
991
|
}
|
|
982
992
|
),
|
|
983
993
|
output: {
|
|
@@ -1288,7 +1298,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1288
1298
|
"raids.mysterious_island.rq_cave_torch.label",
|
|
1289
1299
|
{
|
|
1290
1300
|
ns: "raids",
|
|
1291
|
-
requirements: await
|
|
1301
|
+
requirements: await o(
|
|
1292
1302
|
"wood",
|
|
1293
1303
|
1
|
|
1294
1304
|
)
|
|
@@ -1549,7 +1559,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1549
1559
|
}
|
|
1550
1560
|
]
|
|
1551
1561
|
}
|
|
1552
|
-
}),
|
|
1562
|
+
}), M = async (e) => ({
|
|
1553
1563
|
id: "pirate_cave",
|
|
1554
1564
|
name: r("raids.pirate_cave.name", { ns: "raids" }),
|
|
1555
1565
|
description: r("raids.pirate_cave.description", { ns: "raids" }),
|
|
@@ -1593,7 +1603,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1593
1603
|
requirements: { wood: 1 },
|
|
1594
1604
|
label: r("raids.pirate_cave.rq_cave_torch.label", {
|
|
1595
1605
|
ns: "raids",
|
|
1596
|
-
requirements: await
|
|
1606
|
+
requirements: await o("wood", 1)
|
|
1597
1607
|
}),
|
|
1598
1608
|
output: {
|
|
1599
1609
|
id: "ev_torch_on",
|
|
@@ -1629,7 +1639,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1629
1639
|
"raids.pirate_cave.rq_remove_traps.label",
|
|
1630
1640
|
{
|
|
1631
1641
|
ns: "raids",
|
|
1632
|
-
requirements: await
|
|
1642
|
+
requirements: await o(
|
|
1633
1643
|
"tools",
|
|
1634
1644
|
1
|
|
1635
1645
|
)
|
|
@@ -2732,7 +2742,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2732
2742
|
}
|
|
2733
2743
|
]
|
|
2734
2744
|
}
|
|
2735
|
-
}),
|
|
2745
|
+
}), P = async (e) => ({
|
|
2736
2746
|
id: "resources",
|
|
2737
2747
|
name: r("raids.resources.name", { ns: "raids" }),
|
|
2738
2748
|
description: r("raids.resources.description", { ns: "raids" }),
|
|
@@ -2772,7 +2782,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2772
2782
|
requirements: { tools: 1 },
|
|
2773
2783
|
label: r("raids.resources.rq_wood.label", {
|
|
2774
2784
|
ns: "raids",
|
|
2775
|
-
requirements: await
|
|
2785
|
+
requirements: await o("tools", 1)
|
|
2776
2786
|
}),
|
|
2777
2787
|
output: {
|
|
2778
2788
|
id: "end_wood_big",
|
|
@@ -2831,7 +2841,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2831
2841
|
requirements: { tools: 1 },
|
|
2832
2842
|
label: r("raids.resources.rq_iron.label", {
|
|
2833
2843
|
ns: "raids",
|
|
2834
|
-
requirements: await
|
|
2844
|
+
requirements: await o("tools", 1)
|
|
2835
2845
|
}),
|
|
2836
2846
|
output: {
|
|
2837
2847
|
id: "end_iron_big",
|
|
@@ -2903,7 +2913,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2903
2913
|
requirements: { tools: 1 },
|
|
2904
2914
|
label: r("raids.resources.rq_hemp.label", {
|
|
2905
2915
|
ns: "raids",
|
|
2906
|
-
requirements: await
|
|
2916
|
+
requirements: await o("tools", 1)
|
|
2907
2917
|
}),
|
|
2908
2918
|
output: {
|
|
2909
2919
|
id: "end_hemp_big",
|
|
@@ -2966,7 +2976,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2966
2976
|
requirements: { bowl: 1 },
|
|
2967
2977
|
label: r("raids.resources.rq_bowl.label", {
|
|
2968
2978
|
ns: "raids",
|
|
2969
|
-
requirements: await
|
|
2979
|
+
requirements: await o("bowl", 1)
|
|
2970
2980
|
}),
|
|
2971
2981
|
output: {
|
|
2972
2982
|
id: "end_salt_water_big",
|
|
@@ -3044,7 +3054,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3044
3054
|
requirements: { tools: 1 },
|
|
3045
3055
|
label: r("raids.resources.rq_cereal.label", {
|
|
3046
3056
|
ns: "raids",
|
|
3047
|
-
requirements: await
|
|
3057
|
+
requirements: await o("tools", 1)
|
|
3048
3058
|
}),
|
|
3049
3059
|
output: {
|
|
3050
3060
|
id: "end_cereal_big",
|
|
@@ -3111,7 +3121,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3111
3121
|
requirements: { tools: 1 },
|
|
3112
3122
|
label: r("raids.resources.rq_cotton.label", {
|
|
3113
3123
|
ns: "raids",
|
|
3114
|
-
requirements: await
|
|
3124
|
+
requirements: await o("tools", 1)
|
|
3115
3125
|
}),
|
|
3116
3126
|
output: {
|
|
3117
3127
|
id: "end_cotton_big",
|
|
@@ -3174,7 +3184,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3174
3184
|
requirements: { tools: 1 },
|
|
3175
3185
|
label: r("raids.resources.rq_fruit.label", {
|
|
3176
3186
|
ns: "raids",
|
|
3177
|
-
requirements: await
|
|
3187
|
+
requirements: await o("tools", 1)
|
|
3178
3188
|
}),
|
|
3179
3189
|
output: {
|
|
3180
3190
|
id: "end_fruit_big",
|
|
@@ -3223,7 +3233,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3223
3233
|
}
|
|
3224
3234
|
]
|
|
3225
3235
|
}
|
|
3226
|
-
}),
|
|
3236
|
+
}), T = async (e) => ({
|
|
3227
3237
|
id: "training",
|
|
3228
3238
|
name: r("raids.training.name", { ns: "raids" }),
|
|
3229
3239
|
description: r("raids.training.description", { ns: "raids" }),
|
|
@@ -3512,7 +3522,7 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3512
3522
|
}
|
|
3513
3523
|
]
|
|
3514
3524
|
}
|
|
3515
|
-
}),
|
|
3525
|
+
}), I = {
|
|
3516
3526
|
mysterious_island: [
|
|
3517
3527
|
"end_cave_blind_walk",
|
|
3518
3528
|
"end_explore_gallery_with_torch",
|
|
@@ -3574,49 +3584,49 @@ const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3574
3584
|
"ev_start",
|
|
3575
3585
|
"ev_swamp"
|
|
3576
3586
|
]
|
|
3577
|
-
},
|
|
3578
|
-
|
|
3579
|
-
},
|
|
3580
|
-
for (const s of
|
|
3581
|
-
|
|
3582
|
-
e(t,
|
|
3587
|
+
}, O = {}, B = ["raidUnlock"], f = new O.EventEmitter(), v = (e, s, t) => {
|
|
3588
|
+
f.emit(e, s, t);
|
|
3589
|
+
}, ee = (e) => {
|
|
3590
|
+
for (const s of B)
|
|
3591
|
+
f.on(s, (t, d) => {
|
|
3592
|
+
e(t, d);
|
|
3583
3593
|
});
|
|
3584
|
-
},
|
|
3585
|
-
const s = await
|
|
3586
|
-
|
|
3587
|
-
},
|
|
3588
|
-
const
|
|
3589
|
-
|
|
3594
|
+
}, D = async (e) => {
|
|
3595
|
+
const s = await m.get(e);
|
|
3596
|
+
U(s.xp.amount) >= 30 && !await u.hasUnlockedRaid(e, "training") && (await u.unlockRaid(e, "training"), v("raidUnlock", s.user._id, "training"));
|
|
3597
|
+
}, L = async (e, { equipmentList: s, itemList: t }) => {
|
|
3598
|
+
const d = $(s, (_) => _.entityId), n = await Promise.all(
|
|
3599
|
+
d.map((_) => p.get(_))
|
|
3590
3600
|
);
|
|
3591
|
-
|
|
3601
|
+
E(n).filter(
|
|
3592
3602
|
p.isEquipment
|
|
3593
|
-
).filter(({ panoply: _ }) => _ === "adventurer").length === 6 && !await u.hasUnlockedRaid(e, "pirate_cave") && (await u.unlockRaid(e, "pirate_cave"), v("raidUnlock", e, "pirate_cave")), (t.map_fragment ?? 0) >= 5 && !await u.hasUnlockedRaid(e, "mysterious_island") && (await u.unlockRaid(e, "mysterious_island"), await
|
|
3594
|
-
},
|
|
3603
|
+
).filter(({ panoply: _ }) => _ === "adventurer").length === 6 && !await u.hasUnlockedRaid(e, "pirate_cave") && (await u.unlockRaid(e, "pirate_cave"), v("raidUnlock", e, "pirate_cave")), (t.map_fragment ?? 0) >= 5 && !await u.hasUnlockedRaid(e, "mysterious_island") && (await u.unlockRaid(e, "mysterious_island"), await k.removeItem(e, "map_fragment", 5), v("raidUnlock", e, "mysterious_island"));
|
|
3604
|
+
}, G = async (e, s) => {
|
|
3595
3605
|
const t = s.obtainedRewards.training;
|
|
3596
|
-
t && t.filter((
|
|
3606
|
+
t && t.filter((d) => d.startsWith("end_")).length >= 4 && !s.unlocked?.resources && (await u.unlockRaid(e, "resources"), v("raidUnlock", e, "resources"));
|
|
3597
3607
|
};
|
|
3598
|
-
|
|
3599
|
-
"middleware/raid/USER_INVENTORY":
|
|
3600
|
-
"middleware/raid/USER_RAID":
|
|
3601
|
-
"middleware/raid/USER_QUEST":
|
|
3608
|
+
q({
|
|
3609
|
+
"middleware/raid/USER_INVENTORY": L,
|
|
3610
|
+
"middleware/raid/USER_RAID": G,
|
|
3611
|
+
"middleware/raid/USER_QUEST": D
|
|
3602
3612
|
});
|
|
3603
3613
|
export {
|
|
3604
|
-
|
|
3614
|
+
I as RAID_IMAGES,
|
|
3605
3615
|
v as emitRaidEvent,
|
|
3606
3616
|
a as formatRewards,
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3617
|
+
K as getAllRaids,
|
|
3618
|
+
Z as getCurrentRaidEvent,
|
|
3619
|
+
A as getNextRaidStep,
|
|
3620
|
+
X as getRaid,
|
|
3621
|
+
C as isRaidConditionCheck,
|
|
3622
|
+
J as isRaidEnd,
|
|
3623
|
+
g as isRaidEvent,
|
|
3624
|
+
H as isRaidGoto,
|
|
3625
|
+
N as isRaidItemRequired,
|
|
3626
|
+
S as isRaidUserChoice,
|
|
3627
|
+
W as mysteriousIslandRaid,
|
|
3628
|
+
ee as onRaidEvent,
|
|
3629
|
+
M as pirateCaveRaid,
|
|
3630
|
+
P as resourcesRaid,
|
|
3631
|
+
T as trainingRaid
|
|
3622
3632
|
};
|