koishi-plugin-rocom 1.0.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/lib/client.d.ts +53 -0
- package/lib/client.js +473 -0
- package/lib/commands/account.d.ts +5 -0
- package/lib/commands/account.js +205 -0
- package/lib/commands/admin.d.ts +2 -0
- package/lib/commands/admin.js +117 -0
- package/lib/commands/egg.d.ts +2 -0
- package/lib/commands/egg.js +196 -0
- package/lib/commands/merchant.d.ts +2 -0
- package/lib/commands/merchant.js +242 -0
- package/lib/commands/query.d.ts +2 -0
- package/lib/commands/query.js +1264 -0
- package/lib/commands/wiki.d.ts +2 -0
- package/lib/commands/wiki.js +11 -0
- package/lib/egg-service.d.ts +229 -0
- package/lib/egg-service.js +705 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.js +3746 -0
- package/lib/render-templates/bind-list/index.html +51 -0
- package/lib/render-templates/bind-list/style.css +178 -0
- package/lib/render-templates/exchange-hall/css/_@astro-renderers.0KDkAyVb.css +1 -0
- package/lib/render-templates/exchange-hall/css/index.B3tv56V6.css +1 -0
- package/lib/render-templates/exchange-hall/css/index.D2LGPudy.css +1 -0
- package/lib/render-templates/exchange-hall/extracted.css +393 -0
- package/lib/render-templates/exchange-hall/index.html +99 -0
- package/lib/render-templates/exchange-hall/style.css +267 -0
- package/lib/render-templates/friendship/index.html +58 -0
- package/lib/render-templates/friendship/style.css +182 -0
- package/lib/render-templates/home/data/home_item_list.json +122 -0
- package/lib/render-templates/home/img/home_icon/100604.png +0 -0
- package/lib/render-templates/home/img/home_icon/100604_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100604_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100605.png +0 -0
- package/lib/render-templates/home/img/home_icon/100605_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100605_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100606.png +0 -0
- package/lib/render-templates/home/img/home_icon/100606_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100606_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100607.png +0 -0
- package/lib/render-templates/home/img/home_icon/100607_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100607_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100608.png +0 -0
- package/lib/render-templates/home/img/home_icon/100608_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100608_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100622.png +0 -0
- package/lib/render-templates/home/img/home_icon/100622_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100622_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100623.png +0 -0
- package/lib/render-templates/home/img/home_icon/100623_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100623_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100624.png +0 -0
- package/lib/render-templates/home/img/home_icon/100624_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100624_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100627.png +0 -0
- package/lib/render-templates/home/img/home_icon/100627_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100627_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100684.png +0 -0
- package/lib/render-templates/home/img/home_icon/100684_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100684_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100686.png +0 -0
- package/lib/render-templates/home/img/home_icon/100686_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100686_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100687.png +0 -0
- package/lib/render-templates/home/img/home_icon/100687_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100687_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100689.png +0 -0
- package/lib/render-templates/home/img/home_icon/100689_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100689_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100690.png +0 -0
- package/lib/render-templates/home/img/home_icon/100690_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100690_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100691.png +0 -0
- package/lib/render-templates/home/img/home_icon/100691_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100691_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100692.png +0 -0
- package/lib/render-templates/home/img/home_icon/100692_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100692_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100693.png +0 -0
- package/lib/render-templates/home/img/home_icon/100693_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100693_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100694.png +0 -0
- package/lib/render-templates/home/img/home_icon/100694_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100694_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100706.png +0 -0
- package/lib/render-templates/home/img/home_icon/100706_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100706_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100751.png +0 -0
- package/lib/render-templates/home/img/home_icon/100751_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100751_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100755.png +0 -0
- package/lib/render-templates/home/img/home_icon/100755_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100755_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100762.png +0 -0
- package/lib/render-templates/home/img/home_icon/100762_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100762_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100764.png +0 -0
- package/lib/render-templates/home/img/home_icon/100764_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100764_2.png +0 -0
- package/lib/render-templates/home/img/home_icon/100869.png +0 -0
- package/lib/render-templates/home/img/home_icon/100869_1.png +0 -0
- package/lib/render-templates/home/img/home_icon/100869_2.png +0 -0
- package/lib/render-templates/home/img/img_HomeVisit_Icon1.png +0 -0
- package/lib/render-templates/home/img/img_LevelReward_Bg2.png +0 -0
- package/lib/render-templates/home/index.html +139 -0
- package/lib/render-templates/home/style.css +537 -0
- package/lib/render-templates/ingame-shop/index.html +87 -0
- package/lib/render-templates/ingame-shop/style.css +220 -0
- package/lib/render-templates/inspect/index.html +47 -0
- package/lib/render-templates/inspect/style.css +149 -0
- package/lib/render-templates/lineup/index.html +77 -0
- package/lib/render-templates/lineup/style.css +255 -0
- package/lib/render-templates/lineup-detail/index.html +63 -0
- package/lib/render-templates/lineup-detail/style.css +218 -0
- package/lib/render-templates/menu/index.html +36 -0
- package/lib/render-templates/menu/style.css +126 -0
- package/lib/render-templates/package/index.html +115 -0
- package/lib/render-templates/package/style.css +352 -0
- package/lib/render-templates/personal-card/index.html +292 -0
- package/lib/render-templates/personal-card/style.css +2114 -0
- package/lib/render-templates/pet-wiki/index.html +118 -0
- package/lib/render-templates/pet-wiki/style.css +382 -0
- package/lib/render-templates/player-search/index.html +60 -0
- package/lib/render-templates/player-search/style.css +192 -0
- package/lib/render-templates/record/index.html +86 -0
- package/lib/render-templates/record/style.css +322 -0
- package/lib/render-templates/searcheggs/Pets.json +104328 -0
- package/lib/render-templates/searcheggs/candidates.html +52 -0
- package/lib/render-templates/searcheggs/eggs.py +599 -0
- package/lib/render-templates/searcheggs/index.html +198 -0
- package/lib/render-templates/searcheggs/pair.html +81 -0
- package/lib/render-templates/searcheggs/size.html +82 -0
- package/lib/render-templates/searcheggs/style.css +586 -0
- package/lib/render-templates/searcheggs/want.html +63 -0
- package/lib/render-templates/skill-wiki/index.html +68 -0
- package/lib/render-templates/skill-wiki/style.css +182 -0
- package/lib/render-templates/student/index.html +95 -0
- package/lib/render-templates/student/style.css +255 -0
- package/lib/render-templates/student-perks/index.html +78 -0
- package/lib/render-templates/student-perks/style.css +238 -0
- package/lib/render-templates/student-state/index.html +52 -0
- package/lib/render-templates/student-state/style.css +157 -0
- package/lib/render-templates/yuanxing-shangren/index.html +371 -0
- package/lib/render-templates/yuanxing-shangren/style.css +371 -0
- package/lib/render.d.ts +11 -0
- package/lib/render.js +226 -0
- package/lib/role-token.d.ts +27 -0
- package/lib/role-token.js +137 -0
- package/lib/send-image.d.ts +3 -0
- package/lib/send-image.js +135 -0
- package/lib/subscription-send.d.ts +8 -0
- package/lib/subscription-send.js +48 -0
- package/lib/types.d.ts +32 -0
- package/lib/types.js +2 -0
- package/lib/user.d.ts +67 -0
- package/lib/user.js +176 -0
- package/package.json +58 -0
- package/readme.md +575 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.register = register;
|
|
4
|
+
const WIKI_CLOSED_MESSAGE = '该功能暂时关闭';
|
|
5
|
+
function register(deps) {
|
|
6
|
+
const { ctx } = deps;
|
|
7
|
+
ctx.command('洛克').subcommand('.wiki <name:text>', '查询精灵 wiki')
|
|
8
|
+
.action(() => WIKI_CLOSED_MESSAGE);
|
|
9
|
+
ctx.command('洛克').subcommand('.技能 <name:text>', '查询技能 wiki')
|
|
10
|
+
.action(() => WIKI_CLOSED_MESSAGE);
|
|
11
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
export declare const EGG_GROUP_META: Record<number, {
|
|
2
|
+
label: string;
|
|
3
|
+
desc: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function getEggGroupLabel(id: number): string;
|
|
6
|
+
export declare function formatEggGroups(ids: number[]): string;
|
|
7
|
+
export interface SearchResult {
|
|
8
|
+
matchType: 'exact' | 'fuzzy' | 'multi' | 'not_found';
|
|
9
|
+
pet?: any;
|
|
10
|
+
candidates?: any[];
|
|
11
|
+
}
|
|
12
|
+
export declare class EggService {
|
|
13
|
+
private pets;
|
|
14
|
+
private byId;
|
|
15
|
+
private byZh;
|
|
16
|
+
private byEn;
|
|
17
|
+
constructor(dataDir: string);
|
|
18
|
+
private load;
|
|
19
|
+
getEggGroups(pet: any): number[];
|
|
20
|
+
search(keyword: string): SearchResult;
|
|
21
|
+
searchBySize(height?: number, weight?: number): {
|
|
22
|
+
perfect: any[];
|
|
23
|
+
range: any[];
|
|
24
|
+
};
|
|
25
|
+
private formatMatchSummary;
|
|
26
|
+
private calcLocalMatchInfo;
|
|
27
|
+
private rangeMatchScore;
|
|
28
|
+
private formatPetCard;
|
|
29
|
+
private formatSizeApiCard;
|
|
30
|
+
private mergeCardsByName;
|
|
31
|
+
private mergeSizeCard;
|
|
32
|
+
private minValue;
|
|
33
|
+
private maxValue;
|
|
34
|
+
getCompatiblePets(pet: any): any[];
|
|
35
|
+
getBreedingParents(pet: any): any[];
|
|
36
|
+
evaluatePair(a: any, b: any): {
|
|
37
|
+
compatible: boolean;
|
|
38
|
+
reasons: string[];
|
|
39
|
+
shared_egg_groups: number[];
|
|
40
|
+
shared_egg_group_labels: string[];
|
|
41
|
+
hatch_label: string;
|
|
42
|
+
weight_label: string;
|
|
43
|
+
height_label: string;
|
|
44
|
+
};
|
|
45
|
+
buildSizeSearchText(height?: number, weight?: number, results?: {
|
|
46
|
+
perfect: any[];
|
|
47
|
+
range: any[];
|
|
48
|
+
}, heightDisplay?: string): string;
|
|
49
|
+
buildSizeSearchTextFromApi(height?: number, weight?: number, results?: any, heightDisplay?: string): string;
|
|
50
|
+
buildSearchText(pet: any): string;
|
|
51
|
+
buildCandidatesText(keyword: string, candidates: any[]): string;
|
|
52
|
+
buildWantPetText(pet: any): string;
|
|
53
|
+
buildPairText(a: any, b: any): string;
|
|
54
|
+
buildSearchData(pet: any): {
|
|
55
|
+
pet_name: string;
|
|
56
|
+
pet_id: any;
|
|
57
|
+
pet_icon: string;
|
|
58
|
+
pet_image: string;
|
|
59
|
+
type_label: string;
|
|
60
|
+
egg_groups_label: string;
|
|
61
|
+
egg_groups: number[];
|
|
62
|
+
egg_group_labels: {
|
|
63
|
+
[k: string]: string;
|
|
64
|
+
};
|
|
65
|
+
male_rate: any;
|
|
66
|
+
female_rate: any;
|
|
67
|
+
hatch_label: string;
|
|
68
|
+
weight_label: string;
|
|
69
|
+
height_label: string;
|
|
70
|
+
total_compatible: number;
|
|
71
|
+
is_undiscovered: boolean;
|
|
72
|
+
egg_group_sections: {
|
|
73
|
+
id: number;
|
|
74
|
+
label: string;
|
|
75
|
+
desc: string;
|
|
76
|
+
count: number;
|
|
77
|
+
members: {
|
|
78
|
+
name: string;
|
|
79
|
+
id: any;
|
|
80
|
+
type_label: string;
|
|
81
|
+
egg_groups_label: string;
|
|
82
|
+
}[];
|
|
83
|
+
has_more: boolean;
|
|
84
|
+
total: number;
|
|
85
|
+
}[];
|
|
86
|
+
total_stats: any;
|
|
87
|
+
egg_details: {
|
|
88
|
+
has_data: boolean;
|
|
89
|
+
base_prob_str?: undefined;
|
|
90
|
+
base_prob_pct?: undefined;
|
|
91
|
+
add_prob_str?: undefined;
|
|
92
|
+
add_prob_pct?: undefined;
|
|
93
|
+
is_contact_add_glass?: undefined;
|
|
94
|
+
is_contact_add_shining?: undefined;
|
|
95
|
+
precious_egg_type?: undefined;
|
|
96
|
+
precious_egg_label?: undefined;
|
|
97
|
+
variants?: undefined;
|
|
98
|
+
variant_count?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
has_data: boolean;
|
|
101
|
+
base_prob_str: string;
|
|
102
|
+
base_prob_pct: number;
|
|
103
|
+
add_prob_str: string;
|
|
104
|
+
add_prob_pct: number;
|
|
105
|
+
is_contact_add_glass: any;
|
|
106
|
+
is_contact_add_shining: any;
|
|
107
|
+
precious_egg_type: any;
|
|
108
|
+
precious_egg_label: string;
|
|
109
|
+
variants: any;
|
|
110
|
+
variant_count: any;
|
|
111
|
+
};
|
|
112
|
+
commandHint: string;
|
|
113
|
+
copyright: string;
|
|
114
|
+
};
|
|
115
|
+
buildPairData(a: any, b: any): {
|
|
116
|
+
commandHint: string;
|
|
117
|
+
copyright: string;
|
|
118
|
+
compatible: boolean;
|
|
119
|
+
reasons: string[];
|
|
120
|
+
shared_egg_groups: number[];
|
|
121
|
+
shared_egg_group_labels: string[];
|
|
122
|
+
hatch_label: string;
|
|
123
|
+
weight_label: string;
|
|
124
|
+
height_label: string;
|
|
125
|
+
mother: {
|
|
126
|
+
name: string;
|
|
127
|
+
id: any;
|
|
128
|
+
type_label: string;
|
|
129
|
+
egg_groups_label: string;
|
|
130
|
+
};
|
|
131
|
+
father: {
|
|
132
|
+
name: string;
|
|
133
|
+
id: any;
|
|
134
|
+
type_label: string;
|
|
135
|
+
egg_groups_label: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
buildWantPetData(pet: any): {
|
|
139
|
+
target: {
|
|
140
|
+
id: any;
|
|
141
|
+
name: string;
|
|
142
|
+
icon: string;
|
|
143
|
+
image: string;
|
|
144
|
+
type_label: string;
|
|
145
|
+
egg_group_ids: number[];
|
|
146
|
+
egg_groups_label: string;
|
|
147
|
+
height_min: number;
|
|
148
|
+
height_max: number;
|
|
149
|
+
height_label: string;
|
|
150
|
+
weight_min: number;
|
|
151
|
+
weight_max: number;
|
|
152
|
+
weight_label: string;
|
|
153
|
+
probability: number;
|
|
154
|
+
match_count: number;
|
|
155
|
+
match_info_label: string;
|
|
156
|
+
};
|
|
157
|
+
egg_groups_label: string;
|
|
158
|
+
female_rate: any;
|
|
159
|
+
male_rate: any;
|
|
160
|
+
is_undiscovered: boolean;
|
|
161
|
+
fathers: {
|
|
162
|
+
id: any;
|
|
163
|
+
name: string;
|
|
164
|
+
icon: string;
|
|
165
|
+
image: string;
|
|
166
|
+
type_label: string;
|
|
167
|
+
egg_group_ids: number[];
|
|
168
|
+
egg_groups_label: string;
|
|
169
|
+
height_min: number;
|
|
170
|
+
height_max: number;
|
|
171
|
+
height_label: string;
|
|
172
|
+
weight_min: number;
|
|
173
|
+
weight_max: number;
|
|
174
|
+
weight_label: string;
|
|
175
|
+
probability: number;
|
|
176
|
+
match_count: number;
|
|
177
|
+
match_info_label: string;
|
|
178
|
+
}[];
|
|
179
|
+
father_count: number;
|
|
180
|
+
commandHint: string;
|
|
181
|
+
copyright: string;
|
|
182
|
+
};
|
|
183
|
+
buildCandidatesRenderData(keyword: string, candidates: any[]): {
|
|
184
|
+
keyword: string;
|
|
185
|
+
count: number;
|
|
186
|
+
candidates: {
|
|
187
|
+
id: any;
|
|
188
|
+
name: string;
|
|
189
|
+
icon: string;
|
|
190
|
+
image: string;
|
|
191
|
+
type_label: string;
|
|
192
|
+
egg_group_ids: number[];
|
|
193
|
+
egg_groups_label: string;
|
|
194
|
+
height_min: number;
|
|
195
|
+
height_max: number;
|
|
196
|
+
height_label: string;
|
|
197
|
+
weight_min: number;
|
|
198
|
+
weight_max: number;
|
|
199
|
+
weight_label: string;
|
|
200
|
+
probability: number;
|
|
201
|
+
match_count: number;
|
|
202
|
+
match_info_label: string;
|
|
203
|
+
}[];
|
|
204
|
+
commandHint: string;
|
|
205
|
+
copyright: string;
|
|
206
|
+
};
|
|
207
|
+
buildSizeSearchData(height?: number, weight?: number, results?: {
|
|
208
|
+
perfect: any[];
|
|
209
|
+
range: any[];
|
|
210
|
+
}, heightDisplay?: string): {
|
|
211
|
+
query_label: string;
|
|
212
|
+
perfect_matches: any[];
|
|
213
|
+
range_matches: any[];
|
|
214
|
+
total_count: number;
|
|
215
|
+
has_results: boolean;
|
|
216
|
+
commandHint: string;
|
|
217
|
+
copyright: string;
|
|
218
|
+
};
|
|
219
|
+
buildSizeSearchDataFromApi(height?: number, weight?: number, results?: any, heightDisplay?: string): {
|
|
220
|
+
query_label: string;
|
|
221
|
+
perfect_matches: any[];
|
|
222
|
+
range_matches: any[];
|
|
223
|
+
total_count: number;
|
|
224
|
+
has_results: boolean;
|
|
225
|
+
commandHint: string;
|
|
226
|
+
copyright: string;
|
|
227
|
+
};
|
|
228
|
+
private buildEggDetails;
|
|
229
|
+
}
|