diff --git a/script.js b/script.js index 92016a2f..36ff1d52 100644 --- a/script.js +++ b/script.js @@ -29,6 +29,7 @@ var showSearch; //整个程序都可以用的显示搜索函数 //队员基本的留空 var Member = function(){ this.id=0; + this.ability = [0,0,0]; }; Member.prototype.outObj = function(){ const m = this; @@ -51,7 +52,6 @@ Member.prototype.outObj = function(){ const skill = Skills[card.activeSkillId]; //有技能等级,并且技能等级低于最大等级时才记录技能 if (m.skilllevel != undefined && m.skilllevel < skill.maxLevel) obj[6] = m.skilllevel; - m.ability = [0,0,0]; return obj; }; Member.prototype.loadObj = function(m,dataVersion){ @@ -947,7 +947,7 @@ function initialize() btnNull.onclick(); return; } - const mon = editBox.isAssist?new MemberAssist():new MemberTeam(); + const mon = editBox.isAssist ? new MemberAssist() : new MemberTeam(); const teamData = formation.teams[editBox.memberIdx[0]]; const teamBigBox = teamBigBoxs[editBox.memberIdx[0]]; const teamBox = teamBigBox.querySelector(".team-box"); @@ -1969,7 +1969,7 @@ function refreshFormationTotalHP(totalDom, teams){ const tRCV = tRCVArr.reduce(function(value, teamRCV){ return [value[0] + teamRCV[0], value[1] + Math.round(teamRCV[0] * (1 + 0.10 * teamRCV[1]))]; },[0,0]); - + console.log(teams,tHPArr) if (tHpDom) { tHpDom.innerHTML = tHP[0].toString() + diff --git a/universal_function.js b/universal_function.js index d4fb7e28..7fca2fd1 100644 --- a/universal_function.js +++ b/universal_function.js @@ -256,7 +256,7 @@ function calculateAbility(member = null, assist = null, solo = true) 0; //console.log("基础值:%d,加蛋值:%d,觉醒x%d增加:%d,潜觉增加:%d",n_base,n_plus,awokenCount,n_awoken,n_latent); let reValue = n_base + n_plus + n_awoken + n_latent + (n_assist_base + n_assist_plus) * bonusScale[idx]; - if (awokenList.indexOf(30)>=0)console.log(member,reValue); + //协力觉醒的倍率 reValue = Math.round(awokenScale[idx].reduce(function(previous,aw){ const awokenCount = awokenList.filter(function(a){return a==aw.index;}).length; //每个协力觉醒的数量 @@ -269,7 +269,6 @@ function calculateAbility(member = null, assist = null, solo = true) return previous; } },reValue)); - if (awokenList.indexOf(30)>=0)console.log(reValue,awokenList.filter(function(a){return a==30;}).length); if (idx<2 && reValue<1) reValue = 1; //HP和ATK最低为1 return reValue;