Skip to content

Commit

Permalink
update level info
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangift committed Aug 1, 2015
1 parent ed48dfa commit b35e6fd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 41 deletions.
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,10 @@
服装数据来自jillhx@贴吧 20150731<br/>
Update 20150801:<br/>
<ul>
<li>衣柜数据更新到了jillhx的20150731版本,共计:2264,占比98%,求求你们赶紧把衣服收集齐吧天天更我受不了了</li>
<li>第七章的关卡权重修正到7-7,第八章还卡在衣服上</li>
<li>衣柜数据更新到了jillhx的20150731版本,共计:2264,占比98%</li>
<li>修正了6-支1到6-支3以及7-1到7-9的权重和tag</li>
<li>加了一个小功能,还没好好测试过,如果上线以后发现不好用我就删掉整个功能以及这句话,就好像什么都没发生过一样。</li>
</ul>
<strong style="color:red">由于新关卡的开放,目前尚有大量新衣服没有数据,请去<a href="http://tieba.baidu.com/p/3860789814?pid=72304636572#72304636572">这一贴</a>看看有没有可以帮到jill的地方,尽快完善衣柜,让我们少更新几次。</strong><br/>
衣服信息纠错请去<a href="http://tieba.baidu.com/p/3860789814">jillhx的新衣柜楼</a>汇报<br/>
功能错误或者有新需求请去<a href="http://tieba.baidu.com/p/3792563906">主贴</a>汇报<br/>
<strong style="color:red">友情提示:竞技场新关卡里镜中花水中月套装分数奇高,大家请小心对待不要被坑了</strong><br/>
Expand Down
73 changes: 35 additions & 38 deletions levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,28 +307,25 @@ function abstractBonusFactory(note, replace, param, tagWhitelist, nameWhitelist,
};
}

function featureBasedScoringFactory(bonus, multiplier){
return function(criteria, clothes) {
var total = 0;
for (var i in FEATURES) {
var f = FEATURES[i];
total += Math.abs(criteria[f] * clothes.type.score[bonus] * multiplier);
}
return total;
}
}

function addScoreBonusFactory(bonus, multiplier, tagWhitelist, nameWhitelist) {
return abstractBonusFactory('各属性依权重加分', false, bonus + " * " + multiplier, tagWhitelist,
nameWhitelist, function(criteria, clothes) {
var total = 0;
for (var i in FEATURES) {
var f = FEATURES[i];
total += Math.abs(criteria[f] * clothes.type.score[bonus] * multiplier);
}
return total;
});
nameWhitelist, featureBasedScoringFactory(bonus, multiplier));
}

function replaceScoreBonusFactory(bonus, tagWhitelist, nameWhitelist) {
return abstractBonusFactory('各属性均视为相符,且替换为', true, bonus, tagWhitelist,
nameWhitelist, function(criteria, clothes) {
var total = 0;
for (var i in FEATURES) {
var f = FEATURES[i];
total += Math.abs(criteria[f] * clothes.type.score[bonus]);
}
return total;
});
function replaceScoreBonusFactory(bonus, multiplier, tagWhitelist, nameWhitelist) {
return abstractBonusFactory('各属性均视为相符,且替换为', true, bonus + " * " + multiplier,
tagWhitelist, nameWhitelist, featureBasedScoringFactory(bonus, multiplier));
}

function swimsuitFactory() {
Expand Down Expand Up @@ -393,7 +390,7 @@ var levelBonus = {
"2-4": [],
"2-5": [],
"2-6": [addScoreBonusFactory('B', 0.25, "和风")],
"2-7": [replaceScoreBonusFactory('SS', "睡衣")],
"2-7": [replaceScoreBonusFactory('SS', 1, "睡衣")],
"2-8": [],
"2-9": [addScoreBonusFactory('B', 0.25, "欧式古典")],
"2-支1": [],
Expand All @@ -403,27 +400,27 @@ var levelBonus = {
"3-3": [],
"3-4": [addScoreBonusFactory('B', 0.25, "森女系列")],
"3-5": [],
"3-6": [replaceScoreBonusFactory('SS', '沐浴'), replaceScoreBonusFactory('S', '和风')],
"3-6": [replaceScoreBonusFactory('SS', 1, '沐浴'), replaceScoreBonusFactory('S', 1, '和风')],
"3-7": [],
"3-8": [],
"3-9": [addScoreBonusFactory('B', 0.25, "侠客联盟")],
"3-10": [addScoreBonusFactory('B', 0.25, "小动物")],
"3-11": [addScoreBonusFactory('B', 1, "欧式古典")],
"3-12": [addScoreBonusFactory('B', 1, "运动系")],
"3-支1": [addScoreBonusFactory('B', 1, "欧式古典")],
"3-支2": [replaceScoreBonusFactory('SS', '婚纱')],
"3-支2": [replaceScoreBonusFactory('SS', 1, '婚纱')],
"4-1": [],
"4-2": [swimsuitFactory()],
"4-3": [swimsuitFactory()],
"4-4": [],
"4-5": [addScoreBonusFactory('B', 0.25, "防晒")],
"4-6": [],
"4-7": [],
"4-8": [replaceScoreBonusFactory('S', "医务使者")],
"4-8": [replaceScoreBonusFactory('S', 1, "医务使者")],
"4-9": [addScoreBonusFactory('B', 1, "中式古典")],
"4-10": [],
"4-11": [],
"4-12": [replaceScoreBonusFactory('SS', "兔女郎")],
"4-12": [replaceScoreBonusFactory('SS', 1, "兔女郎")],
"4-支1": [],
"4-支2": [addScoreBonusFactory('B', 0.25, "围裙")],
"4-支3": [addScoreBonusFactory('B', 0.25, "围裙")],
Expand All @@ -433,48 +430,48 @@ var levelBonus = {
"5-4": [addScoreBonusFactory('SS', 1, null, "鬼姬冥花/枫女忍")],
"5-5": [addScoreBonusFactory('A', 1, "女仆装")],
"5-6": [],
"5-7": [replaceScoreBonusFactory('SS', "波西米亚")],
"5-7": [replaceScoreBonusFactory('SS', 1, "波西米亚")],
"5-8": [],
"5-9": [],
"5-10": [],
"5-11": [replaceScoreBonusFactory('SS', "侠客联盟")],
"5-11": [replaceScoreBonusFactory('SS', 1, "侠客联盟")],
"5-12": [addScoreBonusFactory('SS', 1, "民国服饰")],
"5-支1": [addScoreBonusFactory('B', 0.25, "冬装")],
"5-支2": [],
"5-支3": [replaceScoreBonusFactory('SS', "医务使者")],
"5-支3": [replaceScoreBonusFactory('SS', 1, "医务使者")],
"6-1": [addScoreBonusFactory('B', 0.25, "碎花")],
"6-2": [addScoreBonusFactory('B', 0.25, "中式古典")],
"6-3": [addScoreBonusFactory('B', 0.5, "和风")],
"6-4": [],
"6-5": [],
"6-6": [],
"6-7": [addScoreBonusFactory('S', 0.25, "中式现代")],
"6-8": [replaceScoreBonusFactory('SS', "泳装"), replaceScoreBonusFactory('B', "中式现代")], // TODO
"6-8": [replaceScoreBonusFactory('SS', 1, "泳装"), replaceScoreBonusFactory('B', 1, "中式现代")],
"6-9": [addScoreBonusFactory('B', 1, "旗袍")],
"6-10": [addScoreBonusFactory('SS', 1, "中式现代"), addScoreBonusFactory('S', 1, "冬装")],
"6-11": [addScoreBonusFactory('B', 1, "中式古典")],
"6-支1": [], // Not tested yet, not eligible for this level yet
"6-支2": [], // Not tested yet, not eligible for this level yet
"6-支3": [], // Not tested yet, not eligible for this level yet
"6-支1": [],
"6-支2": [],
"6-支3": [replaceScoreBonusFactory('A', 2, "舞者"), addScoreBonusFactory('A', 1, "印度服饰")],
'7-1': [],
'7-2': [],
'7-3': [],
'7-4': [addScoreBonusFactory('B', 1, "中式古典")],
'7-5': [],
'7-6': [specialFactory76A(), specialFactory76B()],
'7-7': [replaceScoreBonusFactory('SS', "欧式古典"), replaceScoreBonusFactory('SS', "晚礼服")],
'7-8': [replaceScoreBonusFactory('S', "中式古典"), replaceScoreBonusFactory('SS', "侠客联盟")],
'7-7': [replaceScoreBonusFactory('SS', 1, "欧式古典"), replaceScoreBonusFactory('SS', 1, "晚礼服")],
'7-8': [replaceScoreBonusFactory('S', 1, "中式古典"), replaceScoreBonusFactory('SS', 1, "侠客联盟")],
'7-9': [addScoreBonusFactory('A', 1, "冬装")],
'7-支1': [],
'7-支2': [],
'7-支3': [],
'7-支4': [],
'7-支5': [],
'7-支3': [], // Not tested yet, not eligible for this level yet
'7-支4': [], // Not tested yet, not eligible for this level yet
'7-支5': [], // Not tested yet, not eligible for this level yet
'仲夏夜之梦1': [addScoreBonusFactory('S', 1, "童话系")],
'仲夏夜之梦2': [replaceScoreBonusFactory('SS', "和风")],
'仲夏夜之梦2': [replaceScoreBonusFactory('SS', 1, "和风")],
'仲夏夜之梦3': [],
'仲夏夜之梦4': [replaceScoreBonusFactory('S', "摇滚风")],
'仲夏夜之梦5': [replaceScoreBonusFactory('S', "睡衣"), replaceScoreBonusFactory('A', "小动物")]
'仲夏夜之梦4': [replaceScoreBonusFactory('S', 1, "摇滚风")],
'仲夏夜之梦5': [replaceScoreBonusFactory('S', 1, "睡衣"), replaceScoreBonusFactory('A', 1, "小动物")]
};

function parseCriteriaList(criteria) {
Expand Down

0 comments on commit b35e6fd

Please sign in to comment.