进一步修订
This commit is contained in:
parent
f0fef51334
commit
4b9ff2555e
|
@ -48,6 +48,9 @@
|
|||
.edit-box .setting-box .row-mon-level::before{
|
||||
content: "▼Monster Level";
|
||||
}
|
||||
.m-level-btn-min::before{
|
||||
content: "Lv";
|
||||
}
|
||||
.m-level-btn-max::before{
|
||||
content: "Max Lv";
|
||||
}
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
.edit-box .setting-box .row-mon-level::before{
|
||||
content: "▼モンスターレベル";
|
||||
}
|
||||
.m-level-btn-min::before{
|
||||
content: "Lv";
|
||||
}
|
||||
.m-level-btn-max::before{
|
||||
content: "最高Lv";
|
||||
}
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
.edit-box .setting-box .row-mon-level::before{
|
||||
content: "▼몬스터 레벨";
|
||||
}
|
||||
.m-level-btn-min::before{
|
||||
content: "Lv";
|
||||
}
|
||||
.m-level-btn-max::before{
|
||||
content: "최고Lv";
|
||||
}
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
.edit-box .setting-box .row-mon-level::before{
|
||||
content: "▼怪物等級";
|
||||
}
|
||||
.m-level-btn-min::before{
|
||||
content: "Lv";
|
||||
}
|
||||
.m-level-btn-max::before{
|
||||
content: "最高Lv";
|
||||
}
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
.edit-box .setting-box .row-mon-level::before{
|
||||
content: "▼怪物等级";
|
||||
}
|
||||
.m-level-btn-min::before{
|
||||
content: "Lv";
|
||||
}
|
||||
.m-level-btn-max::before{
|
||||
content: "最高Lv";
|
||||
}
|
||||
|
|
11
multi.html
11
multi.html
|
@ -398,10 +398,12 @@ var formation = new Formation(2,5);
|
|||
<div class="edit-box display-none">
|
||||
<div class="edit-box-title"><!--修改怪物--></div>
|
||||
<div class="monsterinfo-box">
|
||||
<a class="monster" target="_blank">
|
||||
<div class="property"></div>
|
||||
<div class="subproperty"></div>
|
||||
</a>
|
||||
<div class="monster-head">
|
||||
<a class="monster" target="_blank">
|
||||
<div class="property"></div>
|
||||
<div class="subproperty"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="monster-id"></div>
|
||||
<div class="monster-rare"></div>
|
||||
<div class="monster-name"></div>
|
||||
|
@ -449,6 +451,7 @@ var formation = new Formation(2,5);
|
|||
<div class="setting-row row-mon-level">
|
||||
<!--怪物等级-->
|
||||
<input type="number" class="m-level" min=1 max=110/>
|
||||
<button class="m-level-btn-min" value="1">1</button>
|
||||
<button class="m-level-btn-max" value="99">99</button>
|
||||
</div>
|
||||
<div class="setting-row row-mon-plus">
|
||||
|
|
51
script.js
51
script.js
|
@ -514,6 +514,9 @@ function initialize()
|
|||
//等级
|
||||
const monEditLv = settingBox.querySelector(".m-level");
|
||||
monEditLv.onchange = function(){editBox.reCalculateAbility();};
|
||||
const monEditLvMin = settingBox.querySelector(".m-level-btn-min");
|
||||
monEditLvMin.ipt = monEditLv;
|
||||
monEditLvMin.onclick = setIptToMyValue;
|
||||
const monEditLvMax = settingBox.querySelector(".m-level-btn-max");
|
||||
monEditLvMax.ipt = monEditLv;
|
||||
monEditLvMax.onclick = setIptToMyValue;
|
||||
|
@ -824,23 +827,25 @@ function interchangeCard(formArr,toArr)
|
|||
function changeid(mon,monDom,latentDom)
|
||||
{
|
||||
let fragment = document.createDocumentFragment(); //创建节点用的临时空间
|
||||
const parentNode = monDom.parentNode;
|
||||
fragment.appendChild(monDom);
|
||||
const monId = mon.id;
|
||||
const card = Cards[monId]; //怪物固定数据
|
||||
monDom.setAttribute("data-cardid", monId); //设定新的id
|
||||
if (monId<0) //如果是延迟
|
||||
{
|
||||
monDom.parentNode.classList.add("delay");
|
||||
monDom.parentNode.classList.remove("null");
|
||||
parentNode.classList.add("delay");
|
||||
parentNode.classList.remove("null");
|
||||
return;
|
||||
}else if (monId==0) //如果是空
|
||||
{
|
||||
monDom.parentNode.classList.add("null");
|
||||
monDom.parentNode.classList.remove("delay");
|
||||
parentNode.classList.add("null");
|
||||
parentNode.classList.remove("delay");
|
||||
return;
|
||||
}else (monId>-1) //如果提供了id
|
||||
{
|
||||
monDom.parentNode.classList.remove("null");
|
||||
monDom.parentNode.classList.remove("delay");
|
||||
parentNode.classList.remove("null");
|
||||
parentNode.classList.remove("delay");
|
||||
monDom.className = "monster";
|
||||
monDom.classList.add("pet-cards-" + Math.ceil(monId/100)); //添加图片编号
|
||||
const idxInPage = (monId-1) % 100; //获取当前页面的总序号
|
||||
|
@ -856,7 +861,7 @@ function changeid(mon,monDom,latentDom)
|
|||
{
|
||||
const level = mon.level || 1;
|
||||
levelDom.innerHTML = level;
|
||||
if (level == card.maxLv)
|
||||
if (level == card.maxLevel)
|
||||
{ //如果等级刚好等于最大等级,则修改为“最大”的字
|
||||
levelDom.classList.add("max");
|
||||
}else
|
||||
|
@ -970,23 +975,23 @@ function changeid(mon,monDom,latentDom)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
parentNode.appendChild(fragment);
|
||||
}
|
||||
//点击怪物头像,出现编辑窗
|
||||
function editMon(AorB,isAssist,tempIdx)
|
||||
{
|
||||
//数据
|
||||
var mD = formation.team[AorB][isAssist][tempIdx];
|
||||
let mD = formation.team[AorB][isAssist][tempIdx];
|
||||
let card = Cards[mD.id] || Cards[0];
|
||||
|
||||
//对应的Dom
|
||||
var formationBox = AorB?document.querySelector(".formation-box .formation-B-box"):document.querySelector(".formation-box .formation-A-box");
|
||||
const formationBox = document.querySelector(".formation-box .formation-"+(AorB?"B":"A")+"-box");
|
||||
|
||||
var teamBox = isAssist?formationBox.querySelector(".formation-assist"):formationBox.querySelector(".formation-team");
|
||||
var memberBox = teamBox.querySelector(".member-" + (tempIdx+1));
|
||||
const teamBox = formationBox.querySelector(isAssist?".formation-assist":".formation-team");
|
||||
const memberBox = teamBox.querySelector(".member-" + (tempIdx+1));
|
||||
|
||||
var editBox = document.querySelector(".edit-box");
|
||||
var monsterBox = memberBox.querySelector(".monster");
|
||||
const editBox = document.querySelector(".edit-box");
|
||||
const monsterBox = memberBox.querySelector(".monster");
|
||||
|
||||
editBox.show();
|
||||
|
||||
|
@ -1047,17 +1052,17 @@ function editBoxChangeMonId(id)
|
|||
id = 0;
|
||||
card = Cards[0]
|
||||
}
|
||||
var editBox = document.querySelector(".edit-box");
|
||||
const editBox = document.querySelector(".edit-box");
|
||||
//id搜索
|
||||
var monstersID = editBox.querySelector(".edit-box .m-id");
|
||||
var monInfoBox = editBox.querySelector(".monsterinfo-box");
|
||||
var me = monInfoBox.querySelector(".monster");
|
||||
changeid({id:id,},me); //改变图像
|
||||
var mId = monInfoBox.querySelector(".monster-id");
|
||||
const monstersID = editBox.querySelector(".edit-box .m-id");
|
||||
const monInfoBox = editBox.querySelector(".monsterinfo-box");
|
||||
const monHead = monInfoBox.querySelector(".monster");
|
||||
changeid({id:id},monHead); //改变图像
|
||||
const mId = monInfoBox.querySelector(".monster-id");
|
||||
mId.innerHTML = id;
|
||||
var mRare = monInfoBox.querySelector(".monster-rare");
|
||||
const mRare = monInfoBox.querySelector(".monster-rare");
|
||||
mRare.className = "monster-rare rare-" + card.rarity;
|
||||
var mName = monInfoBox.querySelector(".monster-name");
|
||||
const mName = monInfoBox.querySelector(".monster-name");
|
||||
mName.innerHTML = returnMonsterNameArr(card, currentLanguage.searchlist, currentDataSource.code)[0];
|
||||
|
||||
var evoCardUl = document.querySelector(".edit-box .search-box .evo-card-list");
|
||||
|
@ -1173,7 +1178,7 @@ function editBoxChangeMonId(id)
|
|||
if (editBox.assist)
|
||||
{
|
||||
var btnDone = editBox.querySelector(".button-done");
|
||||
if (!md.assist)
|
||||
if (!card.canAssist)
|
||||
{
|
||||
btnDone.classList.add("cant-assist");
|
||||
btnDone.disabled = true;
|
||||
|
|
11
solo.html
11
solo.html
|
@ -362,10 +362,12 @@ var formation = new Formation(1,6);
|
|||
<div class="edit-box display-none">
|
||||
<div class="edit-box-title"><!--修改怪物--></div>
|
||||
<div class="monsterinfo-box">
|
||||
<a class="monster" target="_blank">
|
||||
<div class="property"></div>
|
||||
<div class="subproperty"></div>
|
||||
</a>
|
||||
<div class="monster-head">
|
||||
<a class="monster" target="_blank">
|
||||
<div class="property"></div>
|
||||
<div class="subproperty"></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="monster-id"></div>
|
||||
<div class="monster-rare"></div>
|
||||
<div class="monster-name"></div>
|
||||
|
@ -413,6 +415,7 @@ var formation = new Formation(1,6);
|
|||
<div class="setting-row row-mon-level">
|
||||
<!--怪物等级-->
|
||||
<input type="number" class="m-level" min=1 max=110/>
|
||||
<button class="m-level-btn-min" value="1">1</button>
|
||||
<button class="m-level-btn-max" value="99">99</button>
|
||||
</div>
|
||||
<div class="setting-row row-mon-plus">
|
||||
|
|
15
style.css
15
style.css
|
@ -59,7 +59,6 @@ ul{
|
|||
height: 100px;
|
||||
margin: 0;
|
||||
display: block;
|
||||
float: left;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
|
@ -451,7 +450,8 @@ ul{
|
|||
.edit-box .setting-row{
|
||||
width: 100%;
|
||||
}
|
||||
.monsterinfo-box .monster{
|
||||
.monsterinfo-box .monster-head{
|
||||
float: left;
|
||||
margin-right:5px;
|
||||
}
|
||||
.monsterinfo-box .monster-id{
|
||||
|
@ -508,15 +508,20 @@ ul{
|
|||
.edit-box .setting-box .m-level{
|
||||
font-size: 25px;
|
||||
height: 40px;
|
||||
width: calc(100% - 150px);
|
||||
width: calc(100% - 215px);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.m-level-btn-max{
|
||||
.m-level-btn-min,.m-level-btn-max{
|
||||
height: 40px;
|
||||
width: 145px;
|
||||
box-sizing: border-box;
|
||||
font-size: 25px;
|
||||
}
|
||||
.m-level-btn-min{
|
||||
width: 60px;
|
||||
}
|
||||
.m-level-btn-max{
|
||||
width: 145px;
|
||||
}
|
||||
/*.m-level-btn-max::before{
|
||||
content: "最高Lv";
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ function calculateAbility(monid = 0,level = 1,plus = [0,0,0],awoken = 0,latent =
|
|||
const n_base = Math.round(curve(ab, card.maxLevel, card.limitBreakIncr)); //等级基础三维
|
||||
const n_plus = plus[idx]*plusAdd[idx]; //加值增加量
|
||||
let awokenList = card.awakenings.slice(0,awoken); //储存点亮的觉醒
|
||||
if (weaponId) //如果有武器还要计算武器的觉醒
|
||||
if (weaponId>0) //如果有武器还要计算武器的觉醒
|
||||
{
|
||||
const weaponAwokenList = Cards[weaponId].awakenings.slice(0,weaponAwoken); //储存武器点亮的觉醒
|
||||
if (weaponAwokenList.indexOf(49)>=0) //49是武器觉醒,确认已经点亮了武器觉醒
|
||||
|
|
Loading…
Reference in New Issue