diff --git a/multi.html b/multi.html
index b8180c5a..c81df4ca 100644
--- a/multi.html
+++ b/multi.html
@@ -487,6 +487,16 @@ var formation = new Formation(teamsCount,5);
+
diff --git a/script-json_data.js b/script-json_data.js
index ff7970b0..3ae3399e 100644
--- a/script-json_data.js
+++ b/script-json_data.js
@@ -28,15 +28,16 @@ const typekiller_for_type = [
{type:3,awoken:38,latent:27,typeKiller:[4,6]}, //3回复
{type:9,awoken:null,latent:null,typeKiller:[]}, //特殊保护
];
-typekiller_for_type.forEach(t=>
- t.typeKiller.push(0,12,14,15) //补充4种特殊杀
-);
//类型允许的潜觉杀
const type_allowable_latent = [];
typekiller_for_type.forEach(t=>
- type_allowable_latent[t.type] = t.typeKiller.map(tn=>
- typekiller_for_type.find(_t=>_t.type == tn).latent
- )
+ {
+ t.allowableLatent = t.typeKiller.concat([0,12,14,15]) //补充4种特殊杀
+ .map(tn=>
+ typekiller_for_type.find(_t=>_t.type == tn).latent
+ );
+ type_allowable_latent[t.type] = t.allowableLatent;
+ }
);
//等效觉醒列表
const equivalent_awoken = [
diff --git a/script.js b/script.js
index 4d55dd60..0528a096 100644
--- a/script.js
+++ b/script.js
@@ -835,16 +835,55 @@ function initialize() {
const s_typesLi = Array.from(s_typesUl.querySelectorAll("li"));
const s_typesCheckBox = s_typesLi.map(li=>li.querySelector(".type-check"));
s_typesCheckBox.forEach(checkBox=>
- checkBox.onchange = function(){
- const newClassName = `type-killer-${this.value}`;
- if (this.checked && s_typeAndOr.checked)
- s_typesUl.classList.add(newClassName);
- else
- s_typesUl.classList.remove(newClassName);
+ {
+ checkBox.onchange = function(){
+ const newClassName = `type-killer-${this.value}`;
+ if (this.checked && s_typeAndOr.checked) //and的时候才生效
+ s_typesUl.classList.add(newClassName);
+ else
+ s_typesUl.classList.remove(newClassName);
+ }
}
);
+
+ const s_types_latentUl = s_typesDiv.querySelector(".latent-list");
+ const s_types_latentli = Array.from(s_types_latentUl.querySelectorAll("li"));
+ s_types_latentli.forEach(latent=>
+ {
+ latent.onclick = function(){
+ const latenttype = parseInt(this.getAttribute("data-latent-icon"));
+ const killerTypes = typekiller_for_type.filter(o=>o.allowableLatent.includes(latenttype)).map(o=>o.type);
+ s_typesCheckBox.forEach(checkbox=>{
+ const type = parseInt(checkbox.value);
+ checkbox.checked = killerTypes.includes(type);
+ });
+ };
+ });
+/* const s_typesCheckBoxIcon = s_typesLi.map(li=>li.querySelector(".type-icon"));
+ s_typesCheckBoxIcon.forEach(icon=>
+ {
+ icon.onclick = function(e){
+ console.log(e,s_typeAndOr.checked);
+ if (!s_typeAndOr.checked) //or的时候才生效
+ {
+ const type = parseInt(this.getAttribute("data-type-icon"));
+ const killerTypes = typekiller_for_type.filter(o=>o.typeKiller.includes(type)).map(o=>o.type);
+ console.log(killerTypes);
+ s_typesCheckBox.forEach(checkbox=>{
+ const type = parseInt(checkbox.value);
+ checkbox.checked = killerTypes.includes(type);
+ });
+ }
+ }
+ }
+ );
+*/
s_typeAndOr.onchange = function(){
s_typesCheckBox.forEach(checkBox=>checkBox.onchange());
+ if (this.checked)
+ s_types_latentUl.classList.add(className_displayNone);
+ else
+ s_types_latentUl.classList.remove(className_displayNone);
};
s_typeAndOr.onchange();
diff --git a/solo.html b/solo.html
index 296a6ea4..2cadd746 100644
--- a/solo.html
+++ b/solo.html
@@ -437,6 +437,16 @@ var formation = new Formation(teamsCount,6);
+
diff --git a/style.css b/style.css
index 5f3849cc..f318345e 100644
--- a/style.css
+++ b/style.css
@@ -989,6 +989,18 @@ ul{
{
display: block;
}
+.types-div .latent-list .latent-icon
+{
+ cursor: pointer;
+ box-shadow: none;
+}
+.types-div .latent-list .latent-icon:before
+{
+ margin-left: -23px;
+ margin-right: -25px;
+ margin-top: -3px;
+ margin-bottom: -5px;
+}
/*.search-box .awoken-div::before{
content: "觉醒";
}*/
diff --git a/triple.html b/triple.html
index 25879ed6..f7d3c29a 100644
--- a/triple.html
+++ b/triple.html
@@ -1132,6 +1132,16 @@ var formation = new Formation(teamsCount,6);
+