Browse Source

再次优化代码

tags/v7.3
枫谷剑仙 5 years ago
parent
commit
5f07622f2a
1 changed files with 12 additions and 18 deletions
  1. +12
    -18
      script-universal_function.js

+ 12
- 18
script-universal_function.js View File

@@ -120,30 +120,24 @@ fetch("library/jy4340132-aaa/adpcm.wasm").then((response) => response.arrayBuffe
//▲ADPCM播放相关
function latentUseHole(latentId)
{
if (latentId < 12)
switch (true)
{
return 1;
}else if (latentId === 12 || latentId >= 16 && latentId <= 36)
{
return 2;
}else if (latentId >= 13 && latentId <= 15 || latentId >= 37 && latentId <= 38)
{
return 6;
}else
{
return 1;
case (latentId === 12):
case (latentId >= 16 && latentId <= 36):
return 2;
case (latentId >= 13 && latentId <= 15):
case (latentId >= 37):
return 6;
case (latentId < 12):
default:
return 1;
}
}
//获取最大潜觉数量
function getMaxLatentCount(id)
{ //转生2和超转生3为8个格子
if (Cards[id])
{
return Cards[id].is8Latent ? 8 : 6;
}else
{
return 6;
}
const card = Cards[id];
return card && card.is8Latent ? 8 : 6;
}
//计算用了多少潜觉格子
function usedHole(latents)


Loading…
Cancel
Save