-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlevels.js
724 lines (695 loc) · 24.9 KB
/
levels.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
// Ivan's Workshop
var competitionsRaw = {
'海边派对的搭配': [0.67, 1.33, 1.0, -1.33, 1.33],
'春天在哪里': [0.67, 1.33, 1.33, 1.33, 1.0],
'办公室明星': [1.33, -1.33, -1.33, -1.0, 0.67],
'夏日物语': [1.33, 0.67, -1.33, 1.0, 1.33],
'圣诞家庭聚会': [1.33, 1.0, 0.67, 1.33, -1.33],
'年轻的春游': [1.33, 1.33, 1.33, 1.0, 0.67],
'运动进行时': [1.0, 0.67, 1.33, 1.33, 1.33],
'金色音乐厅': [-1.33, -1.33, -1.33, -1.0, -0.67],
'夏季游园会': [1.33, 1.0, 0.67, 1.33, 1.33],
'女王大人': [-1.0, -1.33, -1.33, -1.33, 0.67],
'冬天里的一把火': [-0.67, 1.0, 1.33, -1.33, -1.33],
'大侦探福尔摩斯': [1.33, -1.33, -1.33, 0.67, -1.0],
'宫廷歌舞会': [-1.33, -1.0, -1.33, -1.33, -0.67],
'奇幻童话园': [-1.33, 1.33, -1.33, 1.0, 0.67],
'有女初长成': [0.67, -1.33, -1.33, 1.33, -1.0],
'绝色无双': [-1.33, -1.0, -1.33, 1.33, -0.67],
'清秀佳人': [1.33, 0.67, -1.33, 1.33, 1.0]
};
var tasksRaw = {
'运动饮料的推广会': [0.87, 0.67, 0.87, 0.67, 0.67],
'牛仔布的逆袭': [1.2, -0.93, 1.2, 0.93, -0.93],
'海边的比基尼对决!': [0.8, -0.8, -0.8, -1.0, 1.0],
'睡衣兜风派对': [0.47, 0.67, 0.47, 0.67, -0.47],
'苹果联邦高级成衣展': [1.4, -1.4, -1.13, -1.13, -1.13],
'少女的茶会': [-0.67, 0.47, 0.67, 0.47, -0.47],
'云端汉服聚会': [-0.47, -0.47, -0.67, 0.67, -0.47],
'保育员面试': [0.53, 0.53, 0.73, 0.73, -0.53],
'花田摄影会': [0.73, 0.93, 0.73, 0.93, 0.73],
'云端和风茶室': [-0.53, -0.73, -0.73, 0.53, -0.53],
'摇滚演唱会': [0.53, -0.53, 0.53, -0.73, 0.73],
'话剧甄选会': [-0.73, -0.53, -0.73, -0.53, -0.53],
'爱斯基摩旅游节': [1.13, 1.4, 1.13, 1.13, -1.4],
'裤装游行': [1.53, 1.27, 1.27, -1.27, -1.53]
};
var extraRaw = {
'精灵的月下舞会1': [-1.5, -1.2, -1.5, 1.2, -1.2],
'精灵的月下舞会2': [-1.1, -1.1, -1.5, -1.5, 1.1],
'精灵的月下舞会3': [-0.8, -0.8, -0.6, -0.6, 0.6],
'精灵的月下舞会4': [1.5, 1.2, 1.5, 1.2, 1.2],
'精灵的月下舞会5': [1.5, -1.2, -1.2, 1.5, 1.3]
}
// all data are presented in order "simple", "cute", "active", "pure", "cool"
var levelsRaw = {
'1-1': [1, 2, 3, 2, 1],
'1-2': [3, 1.5, -3, 3, -1],
'1-3': [-2, -1, -3, 2, 1],
'1-4': [2, -3, -2, -1, -1],
'1-5': [-1, 3, 2, -2, 1],
'1-6': [2, 1, -2, 3, 1],
'1-7': [3, -2, -2, 1, 1],
'1-8': [-1, -2, -2, -4, 1],
'1-9': [-1, -2, 2, -3, 1],
'2-1': [-2, 3, 1, 2, 1],
'2-2': [3, 1, 2, 2, -1],
'2-3': [2, -2, -3, -1, -1],
'2-4': [1, 2, 1, 2, -3],
'2-5': [2, -2, 3, 1, -1],
'2-6': [-1, 3, -2, 2, 1],
'2-7': [1, 2, 2, 1, -3],
'2-8': [-2, 2, -2, 2, 1],
'2-9': [-3, -2, -2, -1, 1],
'2-支1': [-3, -2, -2, -1, -1],
'2-支2': [2, -2, -3, 1, 1],
'3-1': [2, -1, -3, 2, 1],
'3-2': [-4, -1, 2, -2, 1],
'3-3': [2, -3, -2, 1, -1],
'3-4': [2, 1, -2, 3, 1],
'3-5': [2, 1, 3, 1, 2],
'3-6': [2, 2, 1, -1, 3],
'3-7': [-2, 2, -2, 1, 1],
'3-8': [2, 1, 3, 1, 2],
'3-9': [2, -1, -2, -3, 1],
'3-10': [-1, 3, 2, 2, 1],
'3-11': [-3, -2, -2, -2, 1],
'3-12': [2, 1, 3, 1, -2],
'3-支1': [-3, -2, -2, 1, -1],
'3-支2': [-3, -1, -2, -1, 2],
'4-1': [3, 1, 2, 1, -3],
'4-2': [0.2, 3, 0.2, 3, 0.2],
'4-3': [0.2, -3, 0.2, -3, 0.2],
'4-4': [1, 2, -2, 3, 1],
'4-5': [2, -1, 2, 1, 3],
'4-6': [-1, -2, -3, -2, -1],
'4-7': [-3, -1, -2, 2, -1],
'4-8': [3, 2, 2, -1, 1],
'4-9': [2, -1, -3, 2, 1],
'4-10': [1, 2, 3, 2, 1],
'4-11': [2, -2, -3, -1, 1],
'4-12': [2, 3, 3, -2, 1],
'4-支1': [-1, 3, 2, 2, 1],
'4-支2': [3, 2, 2, 1, 1],
'4-支3': [2, 2, 3, -1, -1],
'5-1': [2, 1, 3, 1, 2],
'5-2': [3, -2, -2, 1, 1],
'5-3': [-3, -2, -2, 1, 1],
'5-4': [-1.2, -0.75, -1.25, -2, 0.75],
'5-5': [-3, 2, -2, 1, 1],
'5-6': [3, 1, -2, 2, -1],
'5-7': [-1, 1, 2, 2, 1],
'5-8': [2, -1, -2, 1, -3],
'5-9': [-3, -2, -2, -1, 1],
'5-10': [-3, 3, -4, 1.5, 1.5],
'5-11': [2, -1, 3, -2, 1],
'5-12': [2, 1.125, -3.375, 2, -1.35],
'5-支1': [1, 2, -1, 2, -3],
'5-支2': [2, 2, 1, 3, 1],
'5-支3': [2, 1, -3, -2, 1],
'6-1': [-2, 3, 1, 2, -1],
'6-2': [2, -1, -3, 2, 1],
'6-3': [-1, 2, -1, 3, 2],
'6-4': [2, 3, 2, 1, -1],
'6-5': [-2, 3, 2, 1, 1],
'6-6': [3, 1, 2, 2, 1],
'6-7': [-1, 3, 2, 2, 1],
'6-8': [1, -1, -3, -2, 2],
'6-9': [-1, -2, -3, -2, 1],
'6-10': [-1, 2, -1, 1, -1],
'6-11': [2, -1, -3, 2, 1],
'6-支1': [-2, -2, -1, -3, 1],
'6-支2': [-1, 2, 2, 1, 3],
'6-支3': [-2, -1, 2, -3, 1],
'7-1': [2, -2.5, -3, -2, 1.5],
'7-2': [-3, -2, -3, 3, -2],
'7-3': [3, -2.5, 2, -3, 3],
'7-4': [-1.25, -2, -2, 1.5, -1],
'7-5': [3, 2, 3, 2, 2],
'7-6': [-2, -1, -2, 1.5, 1.5],
'7-7': [-1.8, -1.8, -1.2, -1.2, 0.6],
'7-8': [2, -1.34, 2, -1.34, 0.66],
'7-9': [2, -3, 1.5, 2, -3],
'7-支1': [2, -3, -3, 2, 2],
'7-支2': [2, 3, -3, 2, 1.5],
'7-支3': [3, -3, 2, -2, 2],
'7-支4': [2, 2.5, -2, 2.5, 1.75],
'7-支5': [2.5, 2, 2.5, 2, 1.75],
'8-1': [2, 2.5, 2.5, 2, 1.5],
'8-2': [-2.5, -2, 2.5, -2, 1.5],
'8-3': [2.7, 2, -2, 2.7, -1.66],
'8-4': [2, -2.5, -2.5, 1.5, -2],
'8-5': [1.25, 1.25, -2, 1.25, 1.25],
'8-6': [-2, -1.25, -2, -1.25, 1.25],
'8-7': [2.5, 2, 2.5, 2, 1.75],
'8-8': [-3, -2.5, -2.5, -2.5, 3],
'8-9': [-2.5, 2.5, -2, 2, 1.5],
'8-支1': [2.5, -1.75, 2, -2.5, 2],
'8-支2': [2, 2, -2.5, 2.5, -1.5],
'8-支3': [-2.5, -2, -2.5, -2, 1.75],
'9-1': [2.75, 2, 2.75, 2, 1.75],
'9-2': [-1.75, 1.33, -1.75, -1.33, 1.25],
'9-3': [1.5, -1.5, -2, 1.5, -2],
'9-4': [-1, -1.5, -1.5, -1, -1],
'9-5': [2, 2.25, 2.25, 2, 2.25],
'9-6-1': [2, -1.25, -2, 1.25, 1.25],
'9-6-2': [1.4, -2, -2.25, -1.4, 1.2],
'9-7': [1.6, 1.4, 1.4, -1.5, 1.25],
'9-8': [1.75, 1.5, 1.75, 1.5, -1.5],
'9-9-1': [-2, 1, 1.4, -1, 1],
'9-9-2': [-2.5, 2, 2, -2.4, 1.5],
'9-9-3': [-2.5, -2, -2.5, 1.75, 1.5],
'9-支1': [1.5, 1.5, 2, 1.5, 2],
'9-支2': [-1.5, 1.5, -1.8, 2, 1.6],
'9-支3': [2, -2.5, 2, -2.5, 1.75],
'10-1': [-1.33, 1.33, 1.67, 1.67, -1.67],
'10-2': [1.5, -1.1, -1.1, 1.5, -1.1],
'10-3': [1.33, 1.0, 1.33, 1.0, 1.0],
'10-4': [1.0, -1.33, -1.67, -1.33, -3.0],
'10-5': [1.67, -1.33, -1.67, -1.33, 1.33],
'10-6': [-1.6, 1.9, 1.9, -1.6, 1.6],
'10-7': [-1.5, 1.2, 1.2, 1.5, -1.5],
'10-8': [1.67, -1.33, -1.67, 1.6, -1.6],
'10-9-1': [-1.9, 2.5, 2.5, -1.9, 1.9],
'10-9-2': [1.2, -1.9, -1.9, 1.2, 1.2],
'10-支1': [1.7, 1.4, 1.7, 1.4, 1.4],
'10-支2': [1.4, 1.7, 1.4, 1.4, 1.7],
'10-支3': [-1.4, -1.1, -1.4, -1.1, -1.1]
};
function tagMatcher(whitelist, clothes) {
for (var i in clothes.tags) {
var tag = clothes.tags[i];
if (tag.length > 0 && whitelist.indexOf(tag) >= 0) {
return true;
}
}
return false;
}
function nameMatcher(whitelist, clothes) {
var names = whitelist.split('/');
for (var i in names) {
if (clothes.name.indexOf(names[i]) >= 0) {
return true;
}
}
return false;
}
function weightedFilter(tagWhitelist, nameWhitelist, weight) {
return {
tagWhitelist: tagWhitelist,
nameWhitelist: nameWhitelist,
filter: function(clothes) {
if (tagWhitelist && tagMatcher(tagWhitelist, clothes)) {
return;
}
if (nameWhitelist && nameMatcher(nameWhitelist, clothes)) {
return;
}
clothes.tmpScore /= weight;
}
}
}
function normalFilter(tagWhitelist, nameWhitelist) {
return weightedFilter(tagWhitelist, nameWhitelist, 10);
}
function noOp() {
return {
filter: function() {
return;
}
};
}
// Note: filters decides which clothes will be penalized (usually 1/10 of the score)
// Only applicable to dresses, coats, tops and bottoms
var levelFilters = {
'1-1': noOp(),
'1-2': noOp(),
'1-3': normalFilter("中式古典/中式现代/旗袍/民国服饰"),
'1-4': noOp(),
'1-5': noOp(),
'1-6': noOp(),
'1-7': normalFilter("中性风"),
'1-8': noOp(),
'1-9': noOp(),
'2-1': noOp(),
'2-2': noOp(),
'2-3': noOp(),
'2-4': noOp(),
'2-5': noOp(),
'2-6': normalFilter("和风"),
'2-7': normalFilter("睡衣"),
'2-8': noOp(),
'2-9': normalFilter("欧式古典/晚礼服/女神系/波西米亚"),
'2-支1': normalFilter(""), // TODO: check
'2-支2': normalFilter("中性风"),
'3-1': normalFilter("英伦", "名媛连衣裙"),
'3-2': normalFilter("摇滚风"),
'3-3': noOp(),
'3-4': normalFilter("森女系列"),
'3-5': normalFilter("运动系", "运动"),
'3-6': weightedFilter("沐浴/和风", null, 160),
'3-7': normalFilter("运动系"), // TODO: double check
'3-8': noOp(),
'3-9': normalFilter("侠客联盟/摇滚风"),
'3-10': noOp(),
'3-11': normalFilter("欧式古典/晚礼服/女神系/波西米亚"),
'3-12': noOp(),
'3-支1': normalFilter("欧式古典/晚礼服/女神系/波西米亚"),
'3-支2': normalFilter("婚纱"),
'4-1': noOp(),
'4-2': weightedFilter("泳装", null, 32),
'4-3': weightedFilter("泳装", null, 32),
'4-4': noOp(),
'4-5': noOp(),
'4-6': normalFilter("OL"),
'4-7': normalFilter("欧式古典/晚礼服/女神系/波西米亚"),
'4-8': normalFilter("医务使者"),
'4-9': normalFilter("中式古典/中式现代/旗袍/民国服饰"),
'4-10': noOp(),
'4-11': noOp(),
'4-12': normalFilter("兔女郎"),
'4-支1': noOp(),
'4-支2': normalFilter("围裙"),
'4-支3': normalFilter("围裙"),
'5-1': normalFilter("运动系", "运动"),
'5-2': noOp(),
'5-3': noOp(),
'5-4': noOp(),
'5-5': noOp(),
'5-6': normalFilter("民国服饰"),
'5-7': normalFilter("波西米亚"),
'5-8': noOp(),
'5-9': noOp(),
'5-10': noOp(),
'5-11': normalFilter("侠客联盟"),
'5-12': normalFilter("中式古典/中式现代/旗袍/民国服饰"),
'5-支1': noOp(),
'5-支2': normalFilter("运动系"), // TODO: double check,
'5-支3': normalFilter("医务使者"),
'6-1': noOp(),
'6-2': normalFilter("中式古典/中式现代/旗袍/民国服饰"),
'6-3': normalFilter("和风"),
'6-4': noOp(),
'6-5': noOp(),
'6-6': normalFilter("中性风"),
'6-7': noOp(),
'6-8': normalFilter("中式现代/泳装"),
'6-9': normalFilter("旗袍"),
'6-10': normalFilter("中式现代/冬装"),
'6-11': normalFilter("中式古典/中式现代/旗袍/民国服饰"),
'6-支1': noOp(), // Not tested yet, not eligible for this level yet
'6-支2': noOp(), // Not tested yet, not eligible for this level yet
'6-支3': noOp(), // Not tested yet, not eligible for this level yet
'7-1': noOp(),
'7-2': noOp(),
'7-3': noOp(),
'7-4': noOp(),
'7-5': noOp(),
'7-6': noOp(),
'7-7': noOp(),
'7-8': noOp(),
'7-9': noOp(),
'7-支1': noOp(),
'7-支2': noOp(),
'7-支3': noOp(),
'7-支4': noOp(),
'7-支5': noOp(),
'仲夏夜之梦1': noOp(),
'仲夏夜之梦2': noOp(),
'仲夏夜之梦3': noOp(),
'仲夏夜之梦4': noOp(),
'仲夏夜之梦5': noOp()
};
function abstractBonusFactory(note, replace, param, tagWhitelist, nameWhitelist, callback) {
return function(criteria) {
return {
tagWhitelist: tagWhitelist,
nameWhitelist: nameWhitelist,
note: note,
replace: replace,
param: param,
filter: function(clothes) {
if ((tagWhitelist && tagMatcher(tagWhitelist, clothes))
|| (nameWhitelist && nameMatcher(nameWhitelist, clothes))) {
return callback(criteria, clothes);
}
return [0, {}];
}
}
};
}
function featureBasedScoringFactory(bonus, multiplier){
return function(criteria, clothes) {
var total = 0;
var byFeature = {};
for (var i in FEATURES) {
var f = FEATURES[i];
var addon = Math.abs(criteria[f] * clothes.type.score[bonus] * multiplier);
byFeature[f] = addon;
total += addon;
}
return [total, byFeature];
}
}
function addScoreBonusFactory(bonus, multiplier, tagWhitelist, nameWhitelist) {
return abstractBonusFactory('各属性依权重加分', false, bonus + " * " + multiplier, tagWhitelist,
nameWhitelist, featureBasedScoringFactory(bonus, multiplier));
}
function replaceScoreBonusFactory(bonus, multiplier, tagWhitelist, nameWhitelist) {
return abstractBonusFactory('各属性均视为相符,且替换为', true, bonus + " * " + multiplier,
tagWhitelist, nameWhitelist, featureBasedScoringFactory(bonus, multiplier));
}
function swimsuitFactory() {
return abstractBonusFactory('仅可爱/成熟与清纯/性感依权重加分', false, 'SS', "泳装",
null, function(criteria, clothes) {
var total = 0;
var onlyFeatures = ['cute', 'pure'];
var byFeature = {};
for (var i in onlyFeatures) {
var f = onlyFeatures[i];
var addon = Math.abs(criteria[f] * clothes.type.score['SS']);
byFeature[f] = addon;
total += addon;
}
return [total, byFeature];
});
}
function specialFactory76A() {
return abstractBonusFactory('华丽 成熟 优雅 清纯 清凉 分别按照权重增加', false, 'B, SS, B, C, C', "晚礼服",
null, function(criteria, clothes) {
var total = 0;
var byFeature = {};
byFeature['simple'] = Math.abs(criteria['simple'] * clothes.type.score['B']);
byFeature['cute'] = Math.abs(criteria['cute'] * clothes.type.score['SS']);
byFeature['active'] = Math.abs(criteria['active'] * clothes.type.score['B']);
byFeature['pure'] = Math.abs(criteria['pure'] * clothes.type.score['C']);
byFeature['cool'] = Math.abs(criteria['cool'] * clothes.type.score['C']);
total += byFeature['simple'];
total += byFeature['cute'];
total += byFeature['active'];
total += byFeature['pure'];
total += byFeature['cool'];
return [total, byFeature];
});
}
function specialFactory76B() {
return abstractBonusFactory('华丽 成熟 优雅 清纯 清凉 分别按照权重增加', false, 'B, SS, B, C, C', "中式现代",
null, function(criteria, clothes) {
var total = 0;
var byFeature = {};
byFeature['simple'] = Math.abs(criteria['simple'] * clothes.type.score['B']);
byFeature['cute'] = Math.abs(criteria['cute'] * clothes.type.score['SS']);
byFeature['active'] = Math.abs(criteria['active'] * clothes.type.score['B']);
byFeature['pure'] = Math.abs(criteria['pure'] * clothes.type.score['C']);
byFeature['cool'] = Math.abs(criteria['cool'] * clothes.type.score['C']);
total += byFeature['simple'];
total += byFeature['cute'];
total += byFeature['active'];
total += byFeature['pure'];
total += byFeature['cool'];
return [total, byFeature];
});
}
function bonusInfo(base, weight, tag, replace) {
return {
base: base,
weight: weight,
tag: tag,
replace: replace
}
}
function replaceBonusInfo(base, weight, tag) {
return bonusInfo(base, weight, tag, true);
}
function addBonusInfo(base, weight, tag) {
return bonusInfo(base, weight, tag, false);
}
/*
* There are three major types of bonus:
* - Add a fixed number to each feature (weight applied)
* - Replace current clothes features to another one
* - Special rules
*/
var levelBonus = {
"1-1": [],
"1-2": [],
"1-3": [addBonusInfo('B', 0.25, "中式古典")],
"1-4": [],
"1-5": [],
"1-6": [],
"1-7": [addBonusInfo('B', 0.25, "中性风")],
"1-8": [],
"1-9": [],
"2-1": [],
"2-2": [],
"2-3": [],
"2-4": [],
"2-5": [],
"2-6": [addBonusInfo('B', 0.25, "和风")],
"2-7": [replaceBonusInfo('SS', 1, "睡衣")],
"2-8": [],
"2-9": [addBonusInfo('B', 0.25, "欧式古典")],
"2-支1": [],
"2-支2": [addBonusInfo('A', 1, "中性风")],
"3-1": [addBonusInfo('B', 0.25, "英伦")],
"3-2": [addBonusInfo('B', 1, "摇滚风")],
"3-3": [],
"3-4": [addBonusInfo('B', 0.25, "森女系列")],
"3-5": [],
"3-6": [replaceBonusInfo('SS', 1, '沐浴'), replaceBonusInfo('S', 1, '和风')],
"3-7": [],
"3-8": [],
"3-9": [addBonusInfo('B', 0.25, "侠客联盟")],
"3-10": [addBonusInfo('B', 0.25, "小动物")],
"3-11": [addBonusInfo('B', 1, "欧式古典")],
"3-12": [addBonusInfo('B', 1, "运动系")],
"3-支1": [addBonusInfo('B', 1, "欧式古典")],
"3-支2": [replaceBonusInfo('SS', 1, '婚纱')],
"4-1": [],
"4-4": [],
"4-5": [addBonusInfo('S', 0.25, "防晒")],
"4-6": [],
"4-7": [],
"4-8": [replaceBonusInfo('S', 1, "医务使者")],
"4-9": [addBonusInfo('B', 1, "中式古典")],
"4-10": [],
"4-11": [],
"4-12": [replaceBonusInfo('SS', 1, "兔女郎")],
"4-支1": [],
"4-支2": [addBonusInfo('B', 0.25, "围裙")],
"4-支3": [addBonusInfo('B', 0.25, "围裙")],
"5-1": [],
"5-2": [],
"5-3": [],
"5-4": [addBonusInfo('S', 2, "和风"), addBonusInfo('SS', 1, "舞者")],
"5-5": [addBonusInfo('A', 1, "女仆装")],
"5-6": [],
"5-7": [replaceBonusInfo('SS', 1, "波西米亚")],
"5-8": [],
"5-9": [],
"5-10": [],
"5-11": [replaceBonusInfo('SS', 1, "侠客联盟")],
"5-12": [addBonusInfo('A', 1, "民国服饰"), addBonusInfo('A', 1, "中式现代")],
"5-支1": [addBonusInfo('B', 0.25, "冬装")],
"5-支2": [],
"5-支3": [replaceBonusInfo('SS', 1, "医务使者")],
"6-1": [addBonusInfo('B', 0.25, "碎花")],
"6-2": [addBonusInfo('B', 0.25, "中式古典")],
"6-3": [addBonusInfo('B', 0.5, "和风")],
"6-4": [],
"6-5": [],
"6-6": [],
"6-7": [addBonusInfo('S', 0.25, "中式现代")],
"6-8": [replaceBonusInfo('SS', 1, "泳装"), replaceBonusInfo('B', 1, "中式现代")],
"6-9": [addBonusInfo('B', 1, "旗袍")],
"6-10": [addBonusInfo('SS', 1, "中式现代"), addBonusInfo('S', 1, "冬装")],
"6-11": [addBonusInfo('B', 1, "中式古典")],
"6-支1": [],
"6-支2": [],
"6-支3": [replaceBonusInfo('A', 2, "舞者"), addBonusInfo('A', 1, "印度服饰")],
'7-1': [],
'7-2': [],
'7-3': [],
'7-4': [addBonusInfo('B', 1, "中式古典")],
'7-5': [],
'7-7': [replaceBonusInfo('SS', 1, "欧式古典"), replaceBonusInfo('SS', 1, "晚礼服")],
'7-8': [replaceBonusInfo('S', 1, "中式古典"), replaceBonusInfo('SS', 1, "侠客联盟")],
'7-9': [addBonusInfo('A', 1, "冬装")],
'7-支1': [],
'7-支2': [],
'7-支3': [replaceBonusInfo('SS', 1, "军装")],
'7-支4': [addBonusInfo('A', 0.5, "中式现代")],
'7-支5': [addBonusInfo('S', 0.25, "运动系"), addBonusInfo('S', 0.25, "海军风")],
'8-1': [addBonusInfo('A', 0.5, "小动物")],
'8-2': [addBonusInfo('S', 0.5, "摇滚风")],
'8-3': [addBonusInfo('A', 0.5, "中式古典")],
'8-4': [addBonusInfo('A', 0.5, "中性风")],
'8-5': [addBonusInfo('B', 1, "中式古典")],
'8-6': [addBonusInfo('S', 1, "中式现代")],
'8-7': [addBonusInfo('A', 0.5, "中性风")],
'8-8': [],
'8-9': [addBonusInfo('A', 0.5, "童话系")],
'8-支1': [addBonusInfo('A', 0.5, "侠客联盟")],
'8-支2': [],
'8-支3': [addBonusInfo('A', 0.5, "欧式古典")],
'9-1': [],
'9-2': [addBonusInfo('S', 1, "哥特风")],
'9-3': [addBonusInfo('C', 1, "冬装")],
'9-4': [addBonusInfo('A', 1, "中式古典")],
'9-5': [addBonusInfo('A', 1, "中式现代")],
'9-6-1': [],
'9-6-2': [],
'9-7': [addBonusInfo('S', 1, "未来系")],
'9-8': [addBonusInfo('B', 1, "森女系列")],
'9-9-1': [addBonusInfo('SS', 1, "侠客联盟")],
'9-9-2': [],
'9-9-3': [],
'9-支1': [addBonusInfo('A', 1, "泳装")],
'9-支2': [addBonusInfo('A', 1, "旗袍")],
'9-支3': [],
'10-1': [addBonusInfo('B', 1, "森女系列")],
'10-2': [addBonusInfo('B', 1, "中式古典")],
'10-3': [addBonusInfo('A', 1, "中式现代")],
'10-4': [addBonusInfo('B', 1, "军装")],
'10-5': [addBonusInfo('B', 1, "晚礼服")],
'10-6': [addBonusInfo('S', 1, "民族风")],
'10-7': [addBonusInfo('B', 1, "洛丽塔")],
'10-8': [addBonusInfo('S', 1, "学院系")],
'10-9-1': [addBonusInfo('S', 1, "原宿系")],
'10-支1': [addBonusInfo('A', 1, "运动系")],
'10-支2': [addBonusInfo('A', 1, "碎花")],
'10-支3': [addBonusInfo('B', 1, "欧式古典")],
'精灵的月下舞会3': [addBonusInfo('S', 1, "欧式古典")],
'清秀佳人': [addBonusInfo('A', 1, "中式现代")],
'绝色无双': [addBonusInfo('A', 1, "中式现代")],
'保育员面试': [addBonusInfo('S', 1, "小动物")],
'海边的比基尼对决!': [addBonusInfo('A', 1, "泳装")],
'少女的茶会': [addBonusInfo('SS', 1, "洛丽塔")],
'摇滚演唱会': [addBonusInfo('S', 1, "摇滚风")],
'花田摄影会': [addBonusInfo('A', 1, "碎花")],
'牛仔布的逆袭': [addBonusInfo('B', 1, "牛仔布")],
'云端和风茶室': [addBonusInfo('S', 1, "和风")],
'运动饮料的推广会': [addBonusInfo('S', 1, "运动系")],
'睡衣兜风派对': [addBonusInfo('SS', 1, "睡衣"), addBonusInfo('SS', 1, "居家服")],
'云端汉服聚会': [addBonusInfo('SS', 1, "中式古典")],
'话剧甄选会': [addBonusInfo('SS', 1, "欧式古典")],
};
var additionalLevelInfo = {
"4-2": [swimsuitFactory()],
"4-3": [swimsuitFactory()],
'7-6': [specialFactory76A(), specialFactory76B()]
};
var addSkillsInfo = {
'1-1': [["暖暖的微笑"],["暖暖的微笑","挑剔的目光","灰姑娘时钟","沉睡魔咒"]],
'1-2': [["暖暖的微笑"]],
'9-1': [["挑剔","沉睡","时钟"],["挑剔","沉睡","时钟"]],
'9-2': [["挑剔","沉睡","时钟"],["挑剔","沉睡","时钟"]],
'9-3': [["挑剔","免疫","反弹"],["挑剔","免疫","反弹"]],
'9-4': [["挑剔","沉睡","反弹"],["挑剔","沉睡","反弹"]],
'9-5': [["挑剔","免疫","礼物"],["挑剔","免疫","礼物"]],
'9-6-1': [["挑剔","灰姑娘","真爱"],["挑剔","灰姑娘","真爱"]],
'9-6-2': [["挑剔","灰姑娘"],["挑剔","灰姑娘"]],
'9-7': [["挑剔","沉睡","反弹"],["挑剔","沉睡","反弹"]],
'9-8': [["挑剔","沉睡","反弹"],["挑剔","沉睡","反弹"]],
'9-9-1': [["挑剔","灰姑娘","免疫"],["挑剔","灰姑娘","免疫"]],
'9-9-2': [["挑剔","沉睡","反弹"],["挑剔","沉睡","反弹"]],
'9-9-3': [["挑剔","沉睡","反弹"],["挑剔","沉睡","反弹"]],
'9-支1': [["挑剔","沉睡","反弹"],["挑剔","沉睡","反弹"]],
'9-支2': [["挑剔","免疫","反弹"],["挑剔","免疫","反弹"]],
'9-支3': [["挑剔","灰姑娘","沉睡"],["挑剔","灰姑娘","沉睡"]],
'运动饮料的推广会': [null,null,["挑剔","灰姑娘","反弹","微笑"]],
'裤装游行': [null,null,["沉睡","挑剔","礼物"]],
'少女的茶会': [null,null,["沉睡","挑剔","微笑"]],
'摇滚演唱会': [null,null,["挑剔","真爱","微笑"]],
'花田摄影会': [null,null,["沉睡","挑剔","灰姑娘"]],
'话剧甄选会': [null,null,["挑剔","沉睡","灰姑娘"]],
'苹果联邦高级成衣展': [null,null,["挑剔","礼物"]],
'云端和风茶室': [null,null,["挑剔","沉睡","礼物"]],
'牛仔布的逆袭': [null,null,["沉睡","挑剔","礼物"]],
'保育员面试': [null,null,["挑剔","反弹","微笑"]],
'爱斯基摩旅游节': [null,null,["微笑","挑剔","沉睡","礼物"]],
'海边的比基尼对决!': [null,null,["挑剔","反弹"]],
'睡衣兜风派对': [null,null,["挑剔","礼物","免疫","反弹"]],
'云端汉服聚会': [null,null,["挑剔","反弹"]]
};
var addHintInfo = {
'9-3': "枫叶套装",
'9-5': "游鲤套装,穿外套会F",
'9-7': "未来套装,穿外套会F",
'9-9-1': "刺客套装,穿外套会F",
'10-6': "公主级需要做大地图腾, 少女级可用荒原之花",
'10-8': "必须做学士服, 不穿外套",
'10-9-1': "上下装/外套只允许魔力(及进化),前沿少女(及进化),纱网(及进化)",
'10-9-2': "推荐穿无tag的衣服",
'精灵的月下舞会1': "连衣裙需要欧式古典",
'精灵的月下舞会2': "排斥刺客 精灵 中国风,",
'精灵的月下舞会3': "欧式古典",
'精灵的月下舞会4': "",
'精灵的月下舞会5': "连衣裙需要晚礼服"
};
function parseCriteriaList(criteria) {
return {
'simple': criteria[0],
'cute': criteria[1],
'active': criteria[2],
'pure': criteria[3],
'cool': criteria[4]
}
}
function level(name, criteria) {
var filter = null;
if (levelFilters[name]) {
filter = levelFilters[name];
}
var bonusFilter = [];
if (levelBonus[name]) {
for (var i in levelBonus[name]) {
bonusFilter.push(levelBonus[name][i]);
}
}
var additionalBonus = [];
if (additionalLevelInfo[name]) {
for (var i in additionalLevelInfo[name]) {
additionalBonus.push(additionalLevelInfo[name][i](criteria));
}
}
var skills = [];
if (addSkillsInfo[name]) {
for (var i in addSkillsInfo[name]) {
skills.push(addSkillsInfo[name][i]);
}
}
var hint;
if(addHintInfo[name]) {
hint = addHintInfo[name];
}
return {
name: name, // useful?
weight: criteria,
filter: filter,
bonus: bonusFilter,
additionalBonus: additionalBonus,
skills: skills,
hint: hint
}
}
allThemes = function() {
var ret = {};
for (var theme in extraRaw) {
var criteria = extraRaw[theme];
ret['活动地图: ' + theme] = level(theme, parseCriteriaList(criteria));
}
for (var theme in competitionsRaw) {
var criteria = competitionsRaw[theme];
ret['评选赛: ' + theme] = level(theme, parseCriteriaList(criteria));
}
for (var theme in tasksRaw) {
var criteria = tasksRaw[theme];
ret['联盟委托: ' + theme] = level(theme, parseCriteriaList(criteria));
}
for (var theme in levelsRaw) {
var criteria = levelsRaw[theme];
ret['关卡: ' + theme] = level(theme, parseCriteriaList(criteria));
}
return ret;
}();