diff --git a/multi.html b/multi.html
index 9529ab81..8e7d452d 100644
--- a/multi.html
+++ b/multi.html
@@ -94,6 +94,8 @@ var formation = new Formation(2,5);
+
+
@@ -104,6 +106,8 @@ var formation = new Formation(2,5);
+
+
@@ -114,6 +118,8 @@ var formation = new Formation(2,5);
+
+
@@ -124,6 +130,8 @@ var formation = new Formation(2,5);
+
+
@@ -134,6 +142,8 @@ var formation = new Formation(2,5);
+
+
@@ -264,6 +274,8 @@ var formation = new Formation(2,5);
+
+
@@ -274,6 +286,8 @@ var formation = new Formation(2,5);
+
+
@@ -284,6 +298,8 @@ var formation = new Formation(2,5);
+
+
@@ -294,6 +310,8 @@ var formation = new Formation(2,5);
+
+
@@ -304,6 +322,8 @@ var formation = new Formation(2,5);
+
+
@@ -449,6 +469,8 @@ var formation = new Formation(2,5);
+
+
diff --git a/script.js b/script.js
index 4bbeda75..64bde968 100644
--- a/script.js
+++ b/script.js
@@ -115,6 +115,12 @@ Formation.prototype.loadObj= function(f){
})
});
}
+//获取最大潜觉数量
+function getMaxLatentCount(id)
+{ //转生2和超转生3为8个格子
+ let m = ms[id],mEvoType = m.evoType;
+ return (mEvoType == 2 || mEvoType == 3) ? 8 : 6;
+}
//创建一个新的怪物头像
function createCardHead(id)
{
@@ -497,18 +503,19 @@ function initialize()
var monEditLatents = Array.prototype.slice.call(monEditLatentUl.querySelectorAll("li"));
var monEditLatentAllowableUl = settingBox.querySelector(".m-latent-allowable-ul");
var monEditLatentsAllowable = Array.prototype.slice.call(monEditLatentAllowableUl.querySelectorAll("li"));
- editBox.refreshLatent = function(latent) //刷新潜觉
+ editBox.refreshLatent = function(latent,monid) //刷新潜觉
{
if (this.value<0) return;
+ let maxLatentCount = getMaxLatentCount(monid); //最大潜觉数量
var usedHoleN = usedHole(latent);
- for (var ai=0;ai<6;ai++)
+ for (var ai=0;ai= 12 && usedHoleN<=4)
+ let maxLatentCount = getMaxLatentCount(editBox.mid); //最大潜觉数量
+ if (lIdx >= 12 && usedHoleN<=(maxLatentCount-2))
editBox.latent.push(lIdx);
- else if (lIdx < 12 && usedHoleN<=5)
+ else if (lIdx < 12 && usedHoleN<=(maxLatentCount-1))
editBox.latent.push(lIdx);
editBox.reCalculateAbility();
- editBox.refreshLatent(editBox.latent);
+ editBox.refreshLatent(editBox.latent,editBox.mid);
}
})
@@ -826,13 +834,15 @@ function changeid(mon,monDom,latentDom)
latentDom.classList.remove("display-none");
var latentDoms = Array.prototype.slice.call(latentDom.querySelectorAll("li"));
var usedHoleN = usedHole(latent);
- for (var ai=0;ai<6;ai++)
+ let maxLatentCount = getMaxLatentCount(mon.id); //最大潜觉数量
+ for (var ai=0;ai
+
+
@@ -135,6 +137,8 @@ var formation = new Formation(1,6);
+
+
@@ -145,6 +149,8 @@ var formation = new Formation(1,6);
+
+
@@ -155,6 +161,8 @@ var formation = new Formation(1,6);
+
+
@@ -165,6 +173,8 @@ var formation = new Formation(1,6);
+
+
@@ -175,6 +185,8 @@ var formation = new Formation(1,6);
+
+
@@ -421,6 +433,8 @@ var formation = new Formation(1,6);
+
+