From 6395299ff9b1ffc30182ee780c1e14dc357ce485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Thu, 28 Nov 2019 01:36:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=8E=92=E5=BA=8F=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=B8=8D=E5=86=8D=E8=B0=83=E6=95=B4=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E5=AE=BD=E5=BA=A6=E7=AD=89=E7=BA=A7=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index f58e829c..355b5f82 100644 --- a/script.js +++ b/script.js @@ -827,7 +827,11 @@ function changeid(mon,monDom,latentDom) } if (latentDom && mon.latent) //如果提供了潜觉 { - var latent = mon.latent.sort(function(a,b){return b-a;}); + var latent = mon.latent.sort(function(a,b){ + if(b>=12 && a<12) {return 1;} //如果大于12,就排到前面 + else if(b<12 && a>=12) {return -1} //如果小于12就排到后面 + else {return 0} //其他情况不变 + }); if (latent.length < 1) latentDom.classList.add("display-none"); else