@dchighs/dc-config-mapper 0.3.2 → 0.5.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/dist/mappers/fog-islands.mapper.d.ts +101 -0
- package/dist/mappers/fog-islands.mapper.js +31 -0
- package/dist/mappers/grid-islands.mapper.d.ts +2 -2
- package/dist/mappers/index.d.ts +2 -0
- package/dist/mappers/index.js +2 -0
- package/dist/mappers/runner-islands.mapper.d.ts +139 -0
- package/dist/mappers/runner-islands.mapper.js +31 -0
- package/dist/schemas/islands/fog-islands/island.schema.d.ts +82 -0
- package/dist/schemas/islands/fog-islands/island.schema.js +94 -0
- package/dist/schemas/islands/fog-islands/reward.schema.d.ts +25 -0
- package/dist/schemas/islands/fog-islands/reward.schema.js +23 -0
- package/dist/schemas/islands/fog-islands/square.schema.d.ts +40 -0
- package/dist/schemas/islands/fog-islands/square.schema.js +36 -0
- package/dist/schemas/islands/grid-islands/decoration.schema.d.ts +1 -1
- package/dist/schemas/islands/grid-islands/decoration.schema.js +1 -1
- package/dist/schemas/islands/grid-islands/square.schema.d.ts +1 -1
- package/dist/schemas/islands/grid-islands/square.schema.js +1 -1
- package/dist/schemas/islands/runner-islands/island.schema.d.ts +52 -0
- package/dist/schemas/islands/runner-islands/island.schema.js +64 -0
- package/dist/schemas/islands/runner-islands/milestone-reward.schema.d.ts +20 -0
- package/dist/schemas/islands/runner-islands/milestone-reward.schema.js +20 -0
- package/dist/schemas/islands/runner-islands/mission-pool.schema.d.ts +20 -0
- package/dist/schemas/islands/runner-islands/mission-pool.schema.js +19 -0
- package/dist/schemas/islands/runner-islands/mission.schema.d.ts +36 -0
- package/dist/schemas/islands/runner-islands/mission.schema.js +31 -0
- package/dist/schemas/islands/runner-islands/reward.schema.d.ts +83 -0
- package/dist/schemas/islands/runner-islands/reward.schema.js +48 -0
- package/dist/utils/runner-islands-mission-name-map.util.d.ts +1 -0
- package/dist/utils/runner-islands-mission-name-map.util.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Localization } from "@dchighs/dc-localization";
|
|
2
|
+
import { GameConfigDto } from "@dchighs/dc-config";
|
|
3
|
+
type FogIslandDto = GameConfigDto["game_data"]["config"]["fog_island"];
|
|
4
|
+
export declare class FogIslandsMapper {
|
|
5
|
+
readonly localization: Localization;
|
|
6
|
+
constructor(localization: Localization);
|
|
7
|
+
map(fogIslands: FogIslandDto): {
|
|
8
|
+
islands: import("@dchighs/dc-localization/dist/types").Translated<{
|
|
9
|
+
id: number;
|
|
10
|
+
availability: {
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
};
|
|
14
|
+
name_key: string;
|
|
15
|
+
board_size: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
cell_size: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
initial_square_id: number;
|
|
24
|
+
pool: {
|
|
25
|
+
points: number;
|
|
26
|
+
time: number;
|
|
27
|
+
};
|
|
28
|
+
initial_points: number;
|
|
29
|
+
currency_id: number;
|
|
30
|
+
min_level: number;
|
|
31
|
+
zip_file_name: string;
|
|
32
|
+
sound_tag: string;
|
|
33
|
+
square_ids: number[];
|
|
34
|
+
}>[];
|
|
35
|
+
squares: {
|
|
36
|
+
id: number;
|
|
37
|
+
type: string;
|
|
38
|
+
reward: {
|
|
39
|
+
chest_id: number | undefined;
|
|
40
|
+
type: string;
|
|
41
|
+
} | {
|
|
42
|
+
piece_dragon_id: number | undefined;
|
|
43
|
+
type: string;
|
|
44
|
+
} | null;
|
|
45
|
+
is_highlight: boolean;
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
cost: number;
|
|
49
|
+
come_back_cost: number;
|
|
50
|
+
reward_id: number | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
currencies: {
|
|
53
|
+
id: number;
|
|
54
|
+
tid_name: string;
|
|
55
|
+
actions: Array<number>;
|
|
56
|
+
}[];
|
|
57
|
+
rewards: {
|
|
58
|
+
id: number;
|
|
59
|
+
type: string;
|
|
60
|
+
dragon_id: number;
|
|
61
|
+
last_piece_cost: number;
|
|
62
|
+
num_pieces: number;
|
|
63
|
+
show_new_badge: boolean;
|
|
64
|
+
}[];
|
|
65
|
+
actions: {
|
|
66
|
+
id: number;
|
|
67
|
+
type: string;
|
|
68
|
+
tid_name: string;
|
|
69
|
+
image: string;
|
|
70
|
+
pool_percent: number;
|
|
71
|
+
max_points: number;
|
|
72
|
+
extra_parameters?: {
|
|
73
|
+
max_time?: number;
|
|
74
|
+
cooldown?: number;
|
|
75
|
+
max_control_level?: number;
|
|
76
|
+
max_production?: number;
|
|
77
|
+
max_level?: number;
|
|
78
|
+
};
|
|
79
|
+
}[];
|
|
80
|
+
hints: {
|
|
81
|
+
id: number;
|
|
82
|
+
type: string;
|
|
83
|
+
tid_name: string;
|
|
84
|
+
icon: string;
|
|
85
|
+
price: {
|
|
86
|
+
ep: number;
|
|
87
|
+
};
|
|
88
|
+
duration_time: number;
|
|
89
|
+
area: number;
|
|
90
|
+
square_selection: number;
|
|
91
|
+
increment_price: number;
|
|
92
|
+
tutorial_id: number;
|
|
93
|
+
}[];
|
|
94
|
+
parameters: {
|
|
95
|
+
id: number;
|
|
96
|
+
name: string;
|
|
97
|
+
value: any;
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FogIslandsMapper = void 0;
|
|
4
|
+
const island_schema_1 = require("../schemas/islands/fog-islands/island.schema");
|
|
5
|
+
const square_schema_1 = require("../schemas/islands/fog-islands/square.schema");
|
|
6
|
+
const reward_schema_1 = require("../schemas/islands/fog-islands/reward.schema");
|
|
7
|
+
class FogIslandsMapper {
|
|
8
|
+
constructor(localization) {
|
|
9
|
+
this.localization = localization;
|
|
10
|
+
}
|
|
11
|
+
map(fogIslands) {
|
|
12
|
+
return {
|
|
13
|
+
islands: fogIslands.islands.map(island => {
|
|
14
|
+
const squareIds = fogIslands.squares
|
|
15
|
+
.filter(square => square.island_id === island.id)
|
|
16
|
+
.map(square => square.id);
|
|
17
|
+
return this.localization.translate(island_schema_1.fogIslandSchema.parse({
|
|
18
|
+
...island,
|
|
19
|
+
square_ids: squareIds,
|
|
20
|
+
}));
|
|
21
|
+
}),
|
|
22
|
+
squares: fogIslands.squares.map(square => square_schema_1.fogIslandsSquareSchema.parse(square)),
|
|
23
|
+
currencies: fogIslands.currencies,
|
|
24
|
+
rewards: fogIslands.rewards.map(reward => reward_schema_1.fogIslandsRewardSchema.parse(reward)),
|
|
25
|
+
actions: fogIslands.actions,
|
|
26
|
+
hints: fogIslands.hints,
|
|
27
|
+
parameters: fogIslands.parameters,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.FogIslandsMapper = FogIslandsMapper;
|
|
@@ -53,13 +53,13 @@ export declare class GridIslandsMapper {
|
|
|
53
53
|
is_highlight: boolean;
|
|
54
54
|
x: number;
|
|
55
55
|
y: number;
|
|
56
|
-
|
|
56
|
+
cost: number;
|
|
57
57
|
wall: string | undefined;
|
|
58
58
|
wall_suffix: string | undefined;
|
|
59
59
|
}[];
|
|
60
60
|
decorations: {
|
|
61
61
|
id: number;
|
|
62
|
-
|
|
62
|
+
file_name: string;
|
|
63
63
|
x: number;
|
|
64
64
|
y: number;
|
|
65
65
|
}[];
|
package/dist/mappers/index.d.ts
CHANGED
package/dist/mappers/index.js
CHANGED
|
@@ -21,3 +21,5 @@ __exportStar(require("./heroic-races.mapper"), exports);
|
|
|
21
21
|
__exportStar(require("./maze-islands.mapper"), exports);
|
|
22
22
|
__exportStar(require("./tower-islands.mapper"), exports);
|
|
23
23
|
__exportStar(require("./grid-islands.mapper"), exports);
|
|
24
|
+
__exportStar(require("./fog-islands.mapper"), exports);
|
|
25
|
+
__exportStar(require("./runner-islands.mapper"), exports);
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Localization } from "@dchighs/dc-localization";
|
|
2
|
+
import { GameConfigDto } from "@dchighs/dc-config";
|
|
3
|
+
type RunnerIslandDto = GameConfigDto["game_data"]["config"]["runner_island"];
|
|
4
|
+
export declare class RunnerIslandsMapper {
|
|
5
|
+
readonly localization: Localization;
|
|
6
|
+
constructor(localization: Localization);
|
|
7
|
+
map(runnerIslands: RunnerIslandDto): {
|
|
8
|
+
islands: import("@dchighs/dc-localization/dist/types").Translated<{
|
|
9
|
+
id: number;
|
|
10
|
+
availability: {
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
};
|
|
14
|
+
name_key: string;
|
|
15
|
+
sound_tag: string;
|
|
16
|
+
zip_file_name: string;
|
|
17
|
+
run_cost: number;
|
|
18
|
+
mission_pool_ids: number[];
|
|
19
|
+
milestone_reward_ids: number[];
|
|
20
|
+
}>[];
|
|
21
|
+
sections: {
|
|
22
|
+
id: number;
|
|
23
|
+
starting_point: number;
|
|
24
|
+
speed: number;
|
|
25
|
+
level_chunks: Array<{
|
|
26
|
+
id: number;
|
|
27
|
+
weight: number;
|
|
28
|
+
}>;
|
|
29
|
+
rewards: Array<number>;
|
|
30
|
+
background_layers: Array<{
|
|
31
|
+
texture: string;
|
|
32
|
+
speed: number;
|
|
33
|
+
positionY: number;
|
|
34
|
+
}>;
|
|
35
|
+
}[];
|
|
36
|
+
parameters: {
|
|
37
|
+
id: number;
|
|
38
|
+
name: string;
|
|
39
|
+
value: any;
|
|
40
|
+
}[];
|
|
41
|
+
obstacles: {
|
|
42
|
+
id: number;
|
|
43
|
+
texture: string;
|
|
44
|
+
length: number;
|
|
45
|
+
is_tall: boolean;
|
|
46
|
+
}[];
|
|
47
|
+
level_chunks: {
|
|
48
|
+
id: number;
|
|
49
|
+
lane_1: any;
|
|
50
|
+
lane_2: Array<{
|
|
51
|
+
reward?: string;
|
|
52
|
+
position: number;
|
|
53
|
+
jump?: boolean;
|
|
54
|
+
obstacle_id?: number;
|
|
55
|
+
}>;
|
|
56
|
+
lane_3: Array<{
|
|
57
|
+
reward?: string;
|
|
58
|
+
position: number;
|
|
59
|
+
jump?: boolean;
|
|
60
|
+
obstacle_id?: number;
|
|
61
|
+
}>;
|
|
62
|
+
length: number;
|
|
63
|
+
}[];
|
|
64
|
+
level_rewards: {
|
|
65
|
+
id: number;
|
|
66
|
+
resource_id: number;
|
|
67
|
+
type: string;
|
|
68
|
+
custom_texture?: string;
|
|
69
|
+
}[];
|
|
70
|
+
missions: import("@dchighs/dc-localization/dist/types").Translated<{
|
|
71
|
+
id: number;
|
|
72
|
+
type: string;
|
|
73
|
+
name_key: string;
|
|
74
|
+
goal_points: number;
|
|
75
|
+
price: number;
|
|
76
|
+
price_increment: number;
|
|
77
|
+
pool_size: number;
|
|
78
|
+
spawn_time: number;
|
|
79
|
+
collect_chance: number;
|
|
80
|
+
collect_chance_modifier: number;
|
|
81
|
+
points: number;
|
|
82
|
+
}>[];
|
|
83
|
+
rewards: {
|
|
84
|
+
id: number;
|
|
85
|
+
rewards: {
|
|
86
|
+
type: import("../enums/reward-type.enum").RewardType;
|
|
87
|
+
element?: import("@dchighs/dc-core").DragonElement;
|
|
88
|
+
amount?: number;
|
|
89
|
+
chest_id?: number;
|
|
90
|
+
dragon_id?: number;
|
|
91
|
+
dragon_ids?: number[];
|
|
92
|
+
building_id?: number;
|
|
93
|
+
}[];
|
|
94
|
+
type_id: number;
|
|
95
|
+
double_with_video_ad: boolean | undefined;
|
|
96
|
+
premium_rewards: number[] | undefined;
|
|
97
|
+
new_badge: number[] | undefined;
|
|
98
|
+
}[];
|
|
99
|
+
rewards_config: {
|
|
100
|
+
id: number;
|
|
101
|
+
background: string;
|
|
102
|
+
title_tid: string;
|
|
103
|
+
title_show_tid: string;
|
|
104
|
+
description_tid: string;
|
|
105
|
+
description_show_tid: string;
|
|
106
|
+
button_tid: string;
|
|
107
|
+
button_claim_double_tid: string;
|
|
108
|
+
animated_dragon: boolean;
|
|
109
|
+
adult_dragon: boolean;
|
|
110
|
+
}[];
|
|
111
|
+
rewards_tiers: {
|
|
112
|
+
name: string;
|
|
113
|
+
value: any;
|
|
114
|
+
}[];
|
|
115
|
+
milestones: {
|
|
116
|
+
id: number;
|
|
117
|
+
positionX: number;
|
|
118
|
+
positionY: number;
|
|
119
|
+
points: number;
|
|
120
|
+
texture: string;
|
|
121
|
+
animated_asset: string;
|
|
122
|
+
}[];
|
|
123
|
+
milestone_rewards: {
|
|
124
|
+
id: number;
|
|
125
|
+
points: number;
|
|
126
|
+
reward_id: number;
|
|
127
|
+
is_highlight: boolean;
|
|
128
|
+
is_focused: boolean;
|
|
129
|
+
}[];
|
|
130
|
+
mission_pools: {
|
|
131
|
+
id: number;
|
|
132
|
+
buy_all_discounts: number;
|
|
133
|
+
mission_ids: number[];
|
|
134
|
+
price: number;
|
|
135
|
+
price_increment: number;
|
|
136
|
+
}[];
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RunnerIslandsMapper = void 0;
|
|
4
|
+
const island_schema_1 = require("../schemas/islands/runner-islands/island.schema");
|
|
5
|
+
const mission_schema_1 = require("../schemas/islands/runner-islands/mission.schema");
|
|
6
|
+
const reward_schema_1 = require("../schemas/islands/runner-islands/reward.schema");
|
|
7
|
+
const milestone_reward_schema_1 = require("../schemas/islands/runner-islands/milestone-reward.schema");
|
|
8
|
+
const mission_pool_schema_1 = require("../schemas/islands/runner-islands/mission-pool.schema");
|
|
9
|
+
class RunnerIslandsMapper {
|
|
10
|
+
constructor(localization) {
|
|
11
|
+
this.localization = localization;
|
|
12
|
+
}
|
|
13
|
+
map(runnerIslands) {
|
|
14
|
+
return {
|
|
15
|
+
islands: runnerIslands.islands.map(island => this.localization.translate(island_schema_1.runnerIslandSchema.parse(island))),
|
|
16
|
+
sections: runnerIslands.sections,
|
|
17
|
+
parameters: runnerIslands.parameters,
|
|
18
|
+
obstacles: runnerIslands.obstacles,
|
|
19
|
+
level_chunks: runnerIslands.level_chunks,
|
|
20
|
+
level_rewards: runnerIslands.level_rewards,
|
|
21
|
+
missions: runnerIslands.missions.map(mission => this.localization.translate(mission_schema_1.runnerIslandsMissionSchema.parse(mission))),
|
|
22
|
+
rewards: runnerIslands.rewards.map(reward => reward_schema_1.runnerIslandsRewardSchema.parse(reward)),
|
|
23
|
+
rewards_config: runnerIslands.rewards_config,
|
|
24
|
+
rewards_tiers: runnerIslands.rewards_tiers,
|
|
25
|
+
milestones: runnerIslands.milestones,
|
|
26
|
+
milestone_rewards: runnerIslands.milestone_rewards.map(reward => milestone_reward_schema_1.runnerIslandsMilestoneRewardSchema.parse(reward)),
|
|
27
|
+
mission_pools: runnerIslands.mission_pool.map(missionPool => mission_pool_schema_1.runnerIslandsMissionPoolSchema.parse(missionPool)),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.RunnerIslandsMapper = RunnerIslandsMapper;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const fogIslandSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
analytics_id: z.ZodString;
|
|
5
|
+
tid_name: z.ZodString;
|
|
6
|
+
tutorial_id: z.ZodNumber;
|
|
7
|
+
tutorial_claimable_cell_id: z.ZodNumber;
|
|
8
|
+
board_size: z.ZodArray<z.ZodNumber>;
|
|
9
|
+
cell_size: z.ZodArray<z.ZodNumber>;
|
|
10
|
+
origin_offset: z.ZodArray<z.ZodNumber>;
|
|
11
|
+
initial_square_id: z.ZodNumber;
|
|
12
|
+
pool_points: z.ZodNumber;
|
|
13
|
+
pool_time: z.ZodNumber;
|
|
14
|
+
initial_points: z.ZodNumber;
|
|
15
|
+
start_ts: z.ZodNumber;
|
|
16
|
+
end_ts: z.ZodNumber;
|
|
17
|
+
currency_id: z.ZodNumber;
|
|
18
|
+
min_level: z.ZodNumber;
|
|
19
|
+
building_id: z.ZodNumber;
|
|
20
|
+
building_position: z.ZodArray<z.ZodNumber>;
|
|
21
|
+
zip_file: z.ZodString;
|
|
22
|
+
sound_tag: z.ZodString;
|
|
23
|
+
canvas_assets_url: z.ZodString;
|
|
24
|
+
background_plist: z.ZodString;
|
|
25
|
+
foregrounds_plists: z.ZodArray<z.ZodAny>;
|
|
26
|
+
particles_position: z.ZodArray<z.ZodNumber>;
|
|
27
|
+
tutorial_claim_cells: z.ZodArray<z.ZodNumber>;
|
|
28
|
+
square_ids: z.ZodArray<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
30
|
+
id: number;
|
|
31
|
+
availability: {
|
|
32
|
+
from: string;
|
|
33
|
+
to: string;
|
|
34
|
+
};
|
|
35
|
+
name_key: string;
|
|
36
|
+
board_size: {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
};
|
|
40
|
+
cell_size: {
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
};
|
|
44
|
+
initial_square_id: number;
|
|
45
|
+
pool: {
|
|
46
|
+
points: number;
|
|
47
|
+
time: number;
|
|
48
|
+
};
|
|
49
|
+
initial_points: number;
|
|
50
|
+
currency_id: number;
|
|
51
|
+
min_level: number;
|
|
52
|
+
zip_file_name: string;
|
|
53
|
+
sound_tag: string;
|
|
54
|
+
square_ids: number[];
|
|
55
|
+
}, {
|
|
56
|
+
id: number;
|
|
57
|
+
analytics_id: string;
|
|
58
|
+
tid_name: string;
|
|
59
|
+
tutorial_id: number;
|
|
60
|
+
tutorial_claimable_cell_id: number;
|
|
61
|
+
board_size: number[];
|
|
62
|
+
cell_size: number[];
|
|
63
|
+
origin_offset: number[];
|
|
64
|
+
initial_square_id: number;
|
|
65
|
+
pool_points: number;
|
|
66
|
+
pool_time: number;
|
|
67
|
+
initial_points: number;
|
|
68
|
+
start_ts: number;
|
|
69
|
+
end_ts: number;
|
|
70
|
+
currency_id: number;
|
|
71
|
+
min_level: number;
|
|
72
|
+
building_id: number;
|
|
73
|
+
building_position: number[];
|
|
74
|
+
zip_file: string;
|
|
75
|
+
sound_tag: string;
|
|
76
|
+
canvas_assets_url: string;
|
|
77
|
+
background_plist: string;
|
|
78
|
+
foregrounds_plists: any[];
|
|
79
|
+
particles_position: number[];
|
|
80
|
+
tutorial_claim_cells: number[];
|
|
81
|
+
square_ids: number[];
|
|
82
|
+
}>>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.fogIslandSchema = void 0;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
/*
|
|
10
|
+
{
|
|
11
|
+
id: number;
|
|
12
|
+
analytics_id: string;
|
|
13
|
+
tid_name: string;
|
|
14
|
+
tutorial_id: number;
|
|
15
|
+
tutorial_claimable_cell_id: number;
|
|
16
|
+
board_size: Array<number>;
|
|
17
|
+
cell_size: Array<number>;
|
|
18
|
+
origin_offset: Array<number>;
|
|
19
|
+
initial_square_id: number;
|
|
20
|
+
pool_points: number;
|
|
21
|
+
pool_time: number;
|
|
22
|
+
initial_points: number;
|
|
23
|
+
start_ts: number;
|
|
24
|
+
end_ts: number;
|
|
25
|
+
currency_id: number;
|
|
26
|
+
min_level: number;
|
|
27
|
+
building_id: number;
|
|
28
|
+
building_position: Array<number>;
|
|
29
|
+
zip_file: string;
|
|
30
|
+
sound_tag: string;
|
|
31
|
+
canvas_assets_url: string;
|
|
32
|
+
background_plist: string;
|
|
33
|
+
foregrounds_plists: Array<any>;
|
|
34
|
+
particles_position: Array<number>;
|
|
35
|
+
tutorial_claim_cells: Array<number>;
|
|
36
|
+
}
|
|
37
|
+
*/
|
|
38
|
+
exports.fogIslandSchema = zod_1.z.object({
|
|
39
|
+
id: zod_1.z.number(),
|
|
40
|
+
analytics_id: zod_1.z.string(),
|
|
41
|
+
tid_name: zod_1.z.string(),
|
|
42
|
+
tutorial_id: zod_1.z.number(),
|
|
43
|
+
tutorial_claimable_cell_id: zod_1.z.number(),
|
|
44
|
+
board_size: zod_1.z.array(zod_1.z.number()),
|
|
45
|
+
cell_size: zod_1.z.array(zod_1.z.number()),
|
|
46
|
+
origin_offset: zod_1.z.array(zod_1.z.number()),
|
|
47
|
+
initial_square_id: zod_1.z.number(),
|
|
48
|
+
pool_points: zod_1.z.number(),
|
|
49
|
+
pool_time: zod_1.z.number(),
|
|
50
|
+
initial_points: zod_1.z.number(),
|
|
51
|
+
start_ts: zod_1.z.number(),
|
|
52
|
+
end_ts: zod_1.z.number(),
|
|
53
|
+
currency_id: zod_1.z.number(),
|
|
54
|
+
min_level: zod_1.z.number(),
|
|
55
|
+
building_id: zod_1.z.number(),
|
|
56
|
+
building_position: zod_1.z.array(zod_1.z.number()),
|
|
57
|
+
zip_file: zod_1.z.string(),
|
|
58
|
+
sound_tag: zod_1.z.string(),
|
|
59
|
+
canvas_assets_url: zod_1.z.string(),
|
|
60
|
+
background_plist: zod_1.z.string(),
|
|
61
|
+
foregrounds_plists: zod_1.z.array(zod_1.z.any()),
|
|
62
|
+
particles_position: zod_1.z.array(zod_1.z.number()),
|
|
63
|
+
tutorial_claim_cells: zod_1.z.array(zod_1.z.number()),
|
|
64
|
+
// injected props
|
|
65
|
+
square_ids: zod_1.z.array(zod_1.z.number()),
|
|
66
|
+
}).strict().transform(data => {
|
|
67
|
+
return {
|
|
68
|
+
id: data.id,
|
|
69
|
+
availability: {
|
|
70
|
+
from: new Date(data.start_ts * 1000).toISOString(),
|
|
71
|
+
to: new Date(data.end_ts * 1000).toISOString(),
|
|
72
|
+
},
|
|
73
|
+
name_key: data.tid_name,
|
|
74
|
+
board_size: {
|
|
75
|
+
width: data.board_size[0],
|
|
76
|
+
height: data.board_size[1],
|
|
77
|
+
},
|
|
78
|
+
cell_size: {
|
|
79
|
+
width: data.cell_size[0],
|
|
80
|
+
height: data.cell_size[1],
|
|
81
|
+
},
|
|
82
|
+
initial_square_id: data.initial_square_id,
|
|
83
|
+
pool: {
|
|
84
|
+
points: data.pool_points,
|
|
85
|
+
time: data.pool_time,
|
|
86
|
+
},
|
|
87
|
+
initial_points: data.initial_points,
|
|
88
|
+
currency_id: data.currency_id,
|
|
89
|
+
min_level: data.min_level,
|
|
90
|
+
zip_file_name: node_path_1.default.basename(data.zip_file),
|
|
91
|
+
sound_tag: data.sound_tag,
|
|
92
|
+
square_ids: data.square_ids,
|
|
93
|
+
};
|
|
94
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const fogIslandsRewardSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
type: z.ZodString;
|
|
5
|
+
island_id: z.ZodNumber;
|
|
6
|
+
reward_id: z.ZodNumber;
|
|
7
|
+
last_piece_cost: z.ZodNumber;
|
|
8
|
+
num_pieces: z.ZodNumber;
|
|
9
|
+
show_new_badge: z.ZodNumber;
|
|
10
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
11
|
+
id: number;
|
|
12
|
+
type: string;
|
|
13
|
+
dragon_id: number;
|
|
14
|
+
last_piece_cost: number;
|
|
15
|
+
num_pieces: number;
|
|
16
|
+
show_new_badge: boolean;
|
|
17
|
+
}, {
|
|
18
|
+
id: number;
|
|
19
|
+
type: string;
|
|
20
|
+
island_id: number;
|
|
21
|
+
reward_id: number;
|
|
22
|
+
last_piece_cost: number;
|
|
23
|
+
num_pieces: number;
|
|
24
|
+
show_new_badge: number;
|
|
25
|
+
}>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fogIslandsRewardSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
exports.fogIslandsRewardSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.number(),
|
|
8
|
+
type: zod_1.z.string(),
|
|
9
|
+
island_id: zod_1.z.number(),
|
|
10
|
+
reward_id: zod_1.z.number(),
|
|
11
|
+
last_piece_cost: zod_1.z.number(),
|
|
12
|
+
num_pieces: zod_1.z.number(),
|
|
13
|
+
show_new_badge: zod_1.z.number(),
|
|
14
|
+
}).strict().transform(data => {
|
|
15
|
+
return {
|
|
16
|
+
id: data.id,
|
|
17
|
+
type: data.type,
|
|
18
|
+
dragon_id: data.reward_id,
|
|
19
|
+
last_piece_cost: data.last_piece_cost,
|
|
20
|
+
num_pieces: data.num_pieces,
|
|
21
|
+
show_new_badge: (0, utils_1.numberToBoolean)(data.show_new_badge),
|
|
22
|
+
};
|
|
23
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const fogIslandsSquareSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
type: z.ZodString;
|
|
5
|
+
type_id: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
highlight: z.ZodNumber;
|
|
7
|
+
x: z.ZodNumber;
|
|
8
|
+
y: z.ZodNumber;
|
|
9
|
+
island_id: z.ZodNumber;
|
|
10
|
+
claim_cost: z.ZodNumber;
|
|
11
|
+
come_back_cost: z.ZodNumber;
|
|
12
|
+
reward_id: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
14
|
+
id: number;
|
|
15
|
+
type: string;
|
|
16
|
+
reward: {
|
|
17
|
+
chest_id: number | undefined;
|
|
18
|
+
type: string;
|
|
19
|
+
} | {
|
|
20
|
+
piece_dragon_id: number | undefined;
|
|
21
|
+
type: string;
|
|
22
|
+
} | null;
|
|
23
|
+
is_highlight: boolean;
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
cost: number;
|
|
27
|
+
come_back_cost: number;
|
|
28
|
+
reward_id: number | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
id: number;
|
|
31
|
+
type: string;
|
|
32
|
+
highlight: number;
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
island_id: number;
|
|
36
|
+
claim_cost: number;
|
|
37
|
+
come_back_cost: number;
|
|
38
|
+
type_id?: number | undefined;
|
|
39
|
+
reward_id?: number | undefined;
|
|
40
|
+
}>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fogIslandsSquareSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
exports.fogIslandsSquareSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.number(),
|
|
8
|
+
type: zod_1.z.string(),
|
|
9
|
+
type_id: zod_1.z.number().optional(),
|
|
10
|
+
highlight: zod_1.z.number(),
|
|
11
|
+
x: zod_1.z.number(),
|
|
12
|
+
y: zod_1.z.number(),
|
|
13
|
+
island_id: zod_1.z.number(),
|
|
14
|
+
claim_cost: zod_1.z.number(),
|
|
15
|
+
come_back_cost: zod_1.z.number(),
|
|
16
|
+
reward_id: zod_1.z.number().optional(),
|
|
17
|
+
}).strict().transform(data => {
|
|
18
|
+
return {
|
|
19
|
+
id: data.id,
|
|
20
|
+
type: data.type,
|
|
21
|
+
reward: data.type === "NONE" || data.type === "STEP" ? null : {
|
|
22
|
+
type: data.type,
|
|
23
|
+
...(data.type === "CHEST" ? {
|
|
24
|
+
chest_id: data.type_id,
|
|
25
|
+
} : {
|
|
26
|
+
piece_dragon_id: data.type_id,
|
|
27
|
+
})
|
|
28
|
+
},
|
|
29
|
+
is_highlight: (0, utils_1.numberToBoolean)(data.highlight),
|
|
30
|
+
x: data.x,
|
|
31
|
+
y: data.y,
|
|
32
|
+
cost: data.claim_cost,
|
|
33
|
+
come_back_cost: data.come_back_cost,
|
|
34
|
+
reward_id: data.reward_id,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const runnerIslandSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
start_ts: z.ZodNumber;
|
|
5
|
+
end_ts: z.ZodNumber;
|
|
6
|
+
building_id: z.ZodNumber;
|
|
7
|
+
building_position: z.ZodArray<z.ZodNumber>;
|
|
8
|
+
dragon_id: z.ZodNumber;
|
|
9
|
+
dragon_offset: z.ZodArray<z.ZodNumber>;
|
|
10
|
+
dragon_scale: z.ZodNumber;
|
|
11
|
+
runner_dragon_asset: z.ZodOptional<z.ZodString>;
|
|
12
|
+
zip_file: z.ZodString;
|
|
13
|
+
help_id: z.ZodNumber;
|
|
14
|
+
run_cost: z.ZodNumber;
|
|
15
|
+
sound_tag: z.ZodString;
|
|
16
|
+
mission_pool: z.ZodArray<z.ZodNumber>;
|
|
17
|
+
sections: z.ZodArray<z.ZodNumber>;
|
|
18
|
+
building_tooltip_position: z.ZodArray<z.ZodNumber>;
|
|
19
|
+
building_timer_position: z.ZodArray<z.ZodNumber>;
|
|
20
|
+
milestone_rewards: z.ZodArray<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
22
|
+
id: number;
|
|
23
|
+
availability: {
|
|
24
|
+
from: string;
|
|
25
|
+
to: string;
|
|
26
|
+
};
|
|
27
|
+
name_key: string;
|
|
28
|
+
sound_tag: string;
|
|
29
|
+
zip_file_name: string;
|
|
30
|
+
run_cost: number;
|
|
31
|
+
mission_pool_ids: number[];
|
|
32
|
+
milestone_reward_ids: number[];
|
|
33
|
+
}, {
|
|
34
|
+
id: number;
|
|
35
|
+
start_ts: number;
|
|
36
|
+
end_ts: number;
|
|
37
|
+
building_id: number;
|
|
38
|
+
building_position: number[];
|
|
39
|
+
dragon_id: number;
|
|
40
|
+
dragon_offset: number[];
|
|
41
|
+
dragon_scale: number;
|
|
42
|
+
zip_file: string;
|
|
43
|
+
help_id: number;
|
|
44
|
+
run_cost: number;
|
|
45
|
+
sound_tag: string;
|
|
46
|
+
mission_pool: number[];
|
|
47
|
+
sections: number[];
|
|
48
|
+
building_tooltip_position: number[];
|
|
49
|
+
building_timer_position: number[];
|
|
50
|
+
milestone_rewards: number[];
|
|
51
|
+
runner_dragon_asset?: string | undefined;
|
|
52
|
+
}>>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runnerIslandSchema = void 0;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
/*
|
|
10
|
+
{
|
|
11
|
+
id: number;
|
|
12
|
+
start_ts: number;
|
|
13
|
+
end_ts: number;
|
|
14
|
+
building_id: number;
|
|
15
|
+
building_position: Array<number>;
|
|
16
|
+
dragon_id: number;
|
|
17
|
+
dragon_offset: Array<number>;
|
|
18
|
+
dragon_scale: number;
|
|
19
|
+
runner_dragon_asset?: string;
|
|
20
|
+
zip_file: string;
|
|
21
|
+
help_id: number;
|
|
22
|
+
run_cost: number;
|
|
23
|
+
sound_tag: string;
|
|
24
|
+
mission_pool: Array<number>;
|
|
25
|
+
sections: Array<number>;
|
|
26
|
+
building_tooltip_position: Array<number>;
|
|
27
|
+
building_timer_position: Array<number>;
|
|
28
|
+
milestone_rewards: Array<number>;
|
|
29
|
+
}
|
|
30
|
+
*/
|
|
31
|
+
exports.runnerIslandSchema = zod_1.z.object({
|
|
32
|
+
id: zod_1.z.number(),
|
|
33
|
+
start_ts: zod_1.z.number(),
|
|
34
|
+
end_ts: zod_1.z.number(),
|
|
35
|
+
building_id: zod_1.z.number(),
|
|
36
|
+
building_position: zod_1.z.array(zod_1.z.number()),
|
|
37
|
+
dragon_id: zod_1.z.number(),
|
|
38
|
+
dragon_offset: zod_1.z.array(zod_1.z.number()),
|
|
39
|
+
dragon_scale: zod_1.z.number(),
|
|
40
|
+
runner_dragon_asset: zod_1.z.string().optional(),
|
|
41
|
+
zip_file: zod_1.z.string(),
|
|
42
|
+
help_id: zod_1.z.number(),
|
|
43
|
+
run_cost: zod_1.z.number(),
|
|
44
|
+
sound_tag: zod_1.z.string(),
|
|
45
|
+
mission_pool: zod_1.z.array(zod_1.z.number()),
|
|
46
|
+
sections: zod_1.z.array(zod_1.z.number()),
|
|
47
|
+
building_tooltip_position: zod_1.z.array(zod_1.z.number()),
|
|
48
|
+
building_timer_position: zod_1.z.array(zod_1.z.number()),
|
|
49
|
+
milestone_rewards: zod_1.z.array(zod_1.z.number()),
|
|
50
|
+
}).strict().transform(data => {
|
|
51
|
+
return {
|
|
52
|
+
id: data.id,
|
|
53
|
+
availability: {
|
|
54
|
+
from: new Date(data.start_ts * 1000).toISOString(),
|
|
55
|
+
to: new Date(data.end_ts * 1000).toISOString(),
|
|
56
|
+
},
|
|
57
|
+
name_key: `tid_runner_island_${data.id}_title`,
|
|
58
|
+
sound_tag: data.sound_tag,
|
|
59
|
+
zip_file_name: node_path_1.default.basename(data.zip_file),
|
|
60
|
+
run_cost: data.run_cost,
|
|
61
|
+
mission_pool_ids: data.mission_pool,
|
|
62
|
+
milestone_reward_ids: data.milestone_rewards,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const runnerIslandsMilestoneRewardSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
points: z.ZodNumber;
|
|
5
|
+
reward_id: z.ZodNumber;
|
|
6
|
+
highlighted: z.ZodNumber;
|
|
7
|
+
focused: z.ZodNumber;
|
|
8
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
9
|
+
id: number;
|
|
10
|
+
points: number;
|
|
11
|
+
reward_id: number;
|
|
12
|
+
is_highlight: boolean;
|
|
13
|
+
is_focused: boolean;
|
|
14
|
+
}, {
|
|
15
|
+
id: number;
|
|
16
|
+
points: number;
|
|
17
|
+
reward_id: number;
|
|
18
|
+
highlighted: number;
|
|
19
|
+
focused: number;
|
|
20
|
+
}>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runnerIslandsMilestoneRewardSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
exports.runnerIslandsMilestoneRewardSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.number(),
|
|
8
|
+
points: zod_1.z.number(),
|
|
9
|
+
reward_id: zod_1.z.number(),
|
|
10
|
+
highlighted: zod_1.z.number(),
|
|
11
|
+
focused: zod_1.z.number()
|
|
12
|
+
}).strict().transform(data => {
|
|
13
|
+
return {
|
|
14
|
+
id: data.id,
|
|
15
|
+
points: data.points,
|
|
16
|
+
reward_id: data.reward_id,
|
|
17
|
+
is_highlight: (0, utils_1.numberToBoolean)(data.highlighted),
|
|
18
|
+
is_focused: (0, utils_1.numberToBoolean)(data.focused),
|
|
19
|
+
};
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const runnerIslandsMissionPoolSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
buy_all_discounts: z.ZodNumber;
|
|
5
|
+
missions: z.ZodArray<z.ZodNumber>;
|
|
6
|
+
price: z.ZodNumber;
|
|
7
|
+
price_increment: z.ZodNumber;
|
|
8
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
9
|
+
id: number;
|
|
10
|
+
buy_all_discounts: number;
|
|
11
|
+
mission_ids: number[];
|
|
12
|
+
price: number;
|
|
13
|
+
price_increment: number;
|
|
14
|
+
}, {
|
|
15
|
+
id: number;
|
|
16
|
+
buy_all_discounts: number;
|
|
17
|
+
missions: number[];
|
|
18
|
+
price: number;
|
|
19
|
+
price_increment: number;
|
|
20
|
+
}>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runnerIslandsMissionPoolSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.runnerIslandsMissionPoolSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.number(),
|
|
7
|
+
buy_all_discounts: zod_1.z.number(),
|
|
8
|
+
missions: zod_1.z.array(zod_1.z.number()),
|
|
9
|
+
price: zod_1.z.number(),
|
|
10
|
+
price_increment: zod_1.z.number()
|
|
11
|
+
}).strict().transform(data => {
|
|
12
|
+
return {
|
|
13
|
+
id: data.id,
|
|
14
|
+
buy_all_discounts: data.buy_all_discounts,
|
|
15
|
+
mission_ids: data.missions,
|
|
16
|
+
price: data.price,
|
|
17
|
+
price_increment: data.price_increment
|
|
18
|
+
};
|
|
19
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const runnerIslandsMissionSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
type: z.ZodString;
|
|
5
|
+
goal_points: z.ZodNumber;
|
|
6
|
+
price: z.ZodNumber;
|
|
7
|
+
price_increment: z.ZodNumber;
|
|
8
|
+
pool_size: z.ZodNumber;
|
|
9
|
+
spawn_time: z.ZodNumber;
|
|
10
|
+
collect_chance: z.ZodNumber;
|
|
11
|
+
collect_chance_modifier: z.ZodNumber;
|
|
12
|
+
energy: z.ZodNumber;
|
|
13
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
14
|
+
id: number;
|
|
15
|
+
type: string;
|
|
16
|
+
name_key: string;
|
|
17
|
+
goal_points: number;
|
|
18
|
+
price: number;
|
|
19
|
+
price_increment: number;
|
|
20
|
+
pool_size: number;
|
|
21
|
+
spawn_time: number;
|
|
22
|
+
collect_chance: number;
|
|
23
|
+
collect_chance_modifier: number;
|
|
24
|
+
points: number;
|
|
25
|
+
}, {
|
|
26
|
+
id: number;
|
|
27
|
+
type: string;
|
|
28
|
+
goal_points: number;
|
|
29
|
+
price: number;
|
|
30
|
+
price_increment: number;
|
|
31
|
+
pool_size: number;
|
|
32
|
+
spawn_time: number;
|
|
33
|
+
collect_chance: number;
|
|
34
|
+
collect_chance_modifier: number;
|
|
35
|
+
energy: number;
|
|
36
|
+
}>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runnerIslandsMissionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const runner_islands_mission_name_map_util_1 = require("../../../utils/runner-islands-mission-name-map.util");
|
|
6
|
+
exports.runnerIslandsMissionSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.number(),
|
|
8
|
+
type: zod_1.z.string(),
|
|
9
|
+
goal_points: zod_1.z.number(),
|
|
10
|
+
price: zod_1.z.number(),
|
|
11
|
+
price_increment: zod_1.z.number(),
|
|
12
|
+
pool_size: zod_1.z.number(),
|
|
13
|
+
spawn_time: zod_1.z.number(),
|
|
14
|
+
collect_chance: zod_1.z.number(),
|
|
15
|
+
collect_chance_modifier: zod_1.z.number(),
|
|
16
|
+
energy: zod_1.z.number(),
|
|
17
|
+
}).strict().transform(data => {
|
|
18
|
+
return {
|
|
19
|
+
id: data.id,
|
|
20
|
+
type: data.type,
|
|
21
|
+
name_key: runner_islands_mission_name_map_util_1.runnerIslandsMissionNameMap[data.type],
|
|
22
|
+
goal_points: data.goal_points,
|
|
23
|
+
price: data.price,
|
|
24
|
+
price_increment: data.price_increment,
|
|
25
|
+
pool_size: data.pool_size,
|
|
26
|
+
spawn_time: data.spawn_time,
|
|
27
|
+
collect_chance: data.collect_chance,
|
|
28
|
+
collect_chance_modifier: data.collect_chance_modifier,
|
|
29
|
+
points: data.energy,
|
|
30
|
+
};
|
|
31
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const runnerIslandsRewardSchema: z.ZodPipe<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
reward: z.ZodArray<z.ZodObject<{
|
|
5
|
+
chest: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
ep: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
egg: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
c: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
seeds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodNumber;
|
|
11
|
+
amount: z.ZodNumber;
|
|
12
|
+
}, z.core.$strip>>>;
|
|
13
|
+
f: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
g: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
en_runner: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
f_token: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
pu_token: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
i_token: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
wr_token: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
el_token: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
wd_token: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
m_token: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
w_token: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
pr_token: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
e_token: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
d_token: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
p_token: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
li_token: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
l_token: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
type_id: z.ZodNumber;
|
|
32
|
+
double_with_video_ad: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
premium_rewards: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
34
|
+
new_badge: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
35
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
36
|
+
id: number;
|
|
37
|
+
rewards: {
|
|
38
|
+
type: import("../../../enums/reward-type.enum").RewardType;
|
|
39
|
+
element?: import("@dchighs/dc-core").DragonElement;
|
|
40
|
+
amount?: number;
|
|
41
|
+
chest_id?: number;
|
|
42
|
+
dragon_id?: number;
|
|
43
|
+
dragon_ids?: number[];
|
|
44
|
+
building_id?: number;
|
|
45
|
+
}[];
|
|
46
|
+
type_id: number;
|
|
47
|
+
double_with_video_ad: boolean | undefined;
|
|
48
|
+
premium_rewards: number[] | undefined;
|
|
49
|
+
new_badge: number[] | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
id: number;
|
|
52
|
+
reward: {
|
|
53
|
+
chest?: number | undefined;
|
|
54
|
+
ep?: number | undefined;
|
|
55
|
+
egg?: number | undefined;
|
|
56
|
+
c?: number | undefined;
|
|
57
|
+
seeds?: {
|
|
58
|
+
id: number;
|
|
59
|
+
amount: number;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
f?: number | undefined;
|
|
62
|
+
g?: number | undefined;
|
|
63
|
+
en_runner?: number | undefined;
|
|
64
|
+
f_token?: number | undefined;
|
|
65
|
+
pu_token?: number | undefined;
|
|
66
|
+
i_token?: number | undefined;
|
|
67
|
+
wr_token?: number | undefined;
|
|
68
|
+
el_token?: number | undefined;
|
|
69
|
+
wd_token?: number | undefined;
|
|
70
|
+
m_token?: number | undefined;
|
|
71
|
+
w_token?: number | undefined;
|
|
72
|
+
pr_token?: number | undefined;
|
|
73
|
+
e_token?: number | undefined;
|
|
74
|
+
d_token?: number | undefined;
|
|
75
|
+
p_token?: number | undefined;
|
|
76
|
+
li_token?: number | undefined;
|
|
77
|
+
l_token?: number | undefined;
|
|
78
|
+
}[];
|
|
79
|
+
type_id: number;
|
|
80
|
+
double_with_video_ad?: boolean | undefined;
|
|
81
|
+
premium_rewards?: number[] | undefined;
|
|
82
|
+
new_badge?: number[] | undefined;
|
|
83
|
+
}>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runnerIslandsRewardSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
exports.runnerIslandsRewardSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.number(),
|
|
8
|
+
reward: zod_1.z.array(zod_1.z.object({
|
|
9
|
+
chest: zod_1.z.number().optional(),
|
|
10
|
+
ep: zod_1.z.number().optional(),
|
|
11
|
+
egg: zod_1.z.number().optional(),
|
|
12
|
+
c: zod_1.z.number().optional(),
|
|
13
|
+
seeds: zod_1.z.array(zod_1.z.object({
|
|
14
|
+
id: zod_1.z.number(),
|
|
15
|
+
amount: zod_1.z.number(),
|
|
16
|
+
})).optional(),
|
|
17
|
+
f: zod_1.z.number().optional(),
|
|
18
|
+
g: zod_1.z.number().optional(),
|
|
19
|
+
en_runner: zod_1.z.number().optional(),
|
|
20
|
+
f_token: zod_1.z.number().optional(),
|
|
21
|
+
pu_token: zod_1.z.number().optional(),
|
|
22
|
+
i_token: zod_1.z.number().optional(),
|
|
23
|
+
wr_token: zod_1.z.number().optional(),
|
|
24
|
+
el_token: zod_1.z.number().optional(),
|
|
25
|
+
wd_token: zod_1.z.number().optional(),
|
|
26
|
+
m_token: zod_1.z.number().optional(),
|
|
27
|
+
w_token: zod_1.z.number().optional(),
|
|
28
|
+
pr_token: zod_1.z.number().optional(),
|
|
29
|
+
e_token: zod_1.z.number().optional(),
|
|
30
|
+
d_token: zod_1.z.number().optional(),
|
|
31
|
+
p_token: zod_1.z.number().optional(),
|
|
32
|
+
li_token: zod_1.z.number().optional(),
|
|
33
|
+
l_token: zod_1.z.number().optional(),
|
|
34
|
+
})),
|
|
35
|
+
type_id: zod_1.z.number(),
|
|
36
|
+
double_with_video_ad: zod_1.z.boolean().optional(),
|
|
37
|
+
premium_rewards: zod_1.z.array(zod_1.z.number()).optional(),
|
|
38
|
+
new_badge: zod_1.z.array(zod_1.z.number()).optional(),
|
|
39
|
+
}).strict().transform(data => {
|
|
40
|
+
return {
|
|
41
|
+
id: data.id,
|
|
42
|
+
rewards: (0, utils_1.processRewards)(data.reward),
|
|
43
|
+
type_id: data.type_id,
|
|
44
|
+
double_with_video_ad: data.double_with_video_ad,
|
|
45
|
+
premium_rewards: data.premium_rewards,
|
|
46
|
+
new_badge: data.new_badge,
|
|
47
|
+
};
|
|
48
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const runnerIslandsMissionNameMap: Record<string, string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runnerIslandsMissionNameMap = void 0;
|
|
4
|
+
exports.runnerIslandsMissionNameMap = {
|
|
5
|
+
feed: "tid_runner_mission_feed",
|
|
6
|
+
gold: "tid_runner_mission_collect_gold",
|
|
7
|
+
food: "tid_runner_mission_collect_food",
|
|
8
|
+
breed: "tid_runner_mission_breed",
|
|
9
|
+
hatch: "tid_runner_mission_hatch",
|
|
10
|
+
pvp: "tid_runner_mission_pvp",
|
|
11
|
+
battle: "tid_runner_mission_battle"
|
|
12
|
+
};
|
package/package.json
CHANGED