Skip to content

Commit

Permalink
Nov 4 nearl
Browse files Browse the repository at this point in the history
  • Loading branch information
xulai1001 committed Nov 4, 2021
1 parent 34de4f7 commit b32605a
Show file tree
Hide file tree
Showing 59 changed files with 248,110 additions and 131,349 deletions.
13 changes: 10 additions & 3 deletions _docs/equip.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ function load() {
let item = edb["equipDict"][key];
let info = getEquipInfo(key);
let missions = "<ul>" + item.missionList.map(x => `<li> ${edb["missionList"][x].desc} </li>`).join() + "</ul>";
let charName = chardb[item.charId].name;
let subName = edb["subProfDict"][chardb[item.charId].subProfessionId].subProfessionName
;
// 三围以外的属性补正
Object.keys(info.attr).forEach(k => {
if (!["max_hp", "atk", "def"].includes(k))
info.blackboard[k] = info.attr[k];
});
return [
chardb[item.charId].name,
subName,
charName,
item.uniEquipName,
// item.uniEquipDesc
item.unlockLevel,
Expand All @@ -90,13 +94,13 @@ function load() {
info.attr.def || 0,
AKDATA.formatString(info.description, false, info.blackboard),
missions,
JSON.stringify(info.blackboard)
JSON.stringify(info.blackboard).replace(/,/g, ",<br>")
];
});

let list = pmBase.component.create({
type: 'list',
columns: [ '干员', '模组名称', '解锁等级',
columns: [ '子职业', '干员', '模组名称', '解锁等级',
'生命值', '攻击力', ' 防御力',
{header:'特性变更',width:'20%'}, {header:'解锁任务',width:'20%'}, {header:'具体数值',width:'10%'} ],
list: view,
Expand All @@ -109,6 +113,9 @@ function load() {
content: list,
}]
});

$("th:nth-child(4)").trigger("click");
$("th:nth-child(4)").trigger("click");
}

pmBase.hook.on( 'init', init );
9 changes: 8 additions & 1 deletion _docs/mastery.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ function calculate(charId) {
let result = {}, mats = {};
let equipId = null, equipName = null;

if (['char_306_leizi', 'char_472_pasngr', 'char_4004_pudd'].includes(charId)) {
enemy.count = 2;
}

// calculate dps for each recipe case.
db.skills.forEach(skill => {
var entry = {};
Expand Down Expand Up @@ -893,7 +897,10 @@ function plot2(chartView) {
axisLabel: {
fontSize: 16,
fontWeight: 'bold',
margin: 5
margin: 5,
formatter: function (v, i) {
return `${["I", "II", "III"][i]}-${v}`;
}
}
},
dataset: dataset,
Expand Down
5 changes: 5 additions & 0 deletions _docs/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ order: 4
category: 工具
icon: info-circle
---
## 21.11.04
- [update] 耀骑士临光等
- [update] 改进了链法的计算逻辑。在专精计算器中,链法的收益以2目标计算
- [equip] 更新模组;优化了模组页面的默认排序

## 21.10.17-19
- [update] 远牙等
- [bugfix] 远牙2-3技能重置普攻
Expand Down
4 changes: 2 additions & 2 deletions resources/akdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const useCache = true;
const cacheBeginTime = new Date(2019, 12, 10).getTime();

window.AKDATA = {
akdata: "211017", // jsdelivr tag version
akdata: "211104", // jsdelivr tag version

Data: {},

new_op: ["char_430_fartth", "char_431_ashlok"],
new_op: ["char_1014_nearl2", "char_420_flamtl", "char_489_serum", "char_496_wildmn", "char_4004_pudd", "char_449_glider"],

professionNames: {
"PIONEER": "先锋",
Expand Down
67 changes: 60 additions & 7 deletions resources/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_excu_1":
delete blackboard.atk_scale; break;
case "skchr_texas_2":
case "skchr_flamtl_2":
buffFrame.times = 2;
buffFrame.maxTarget = 999;
writeBuff(`攻击次数 = ${buffFrame.times} 最大目标数 = ${buffFrame.maxTarget}`);
Expand Down Expand Up @@ -885,6 +886,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_iris_1":
case "skchr_indigo_2":
case "skchr_mberry_2":
case "skchr_flamtl_3":
writeBuff(`base_attack_time: ${blackboard.base_attack_time}x`);
blackboard.base_attack_time = (blackboard.base_attack_time - 1) * basic.baseAttackTime;
break;
Expand Down Expand Up @@ -1224,6 +1226,17 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_fartth_3":
if (!options.far) delete blackboard.damage_scale;
break;
case "tachr_1014_nearl2_1":
delete blackboard.atk_scale; break;
case "tachr_1014_nearl2_2":
blackboard.edef_pene_scale = blackboard["def_penetrate"];
break;
case "skchr_nearl2_2":
delete blackboard.times; break;
case "tachr_489_serum_1":
done = true; break;
case "skchr_glider_1":
buffFrame.maxTarget = 2; break;
}

}
Expand Down Expand Up @@ -1273,6 +1286,9 @@ function extractDamageType(charData, chr, isSkill, skillDesc, skillBlackboard, o
}
// special character/skill overrides
ret = checkSpecs(charId, "damage_type") || checkSpecs(skillId, "damage_type") || ret;
if (skillId == "skchr_nearl2_3") {
ret = (options.block) ? 3 : 0;
}
if (options.token)
ret = checkSpecs(skillId, "token_damage_type") || ret;
} else if (chr.options.token) {
Expand Down Expand Up @@ -1618,7 +1634,7 @@ function calcDurations(isSkill, attackTime, attackSpeed, levelData, buffList, bu
} else if (skillId == "skchr_peacok_2") {
stunDuration = blackboard["failure.stun"] * (1 - blackboard.prob);
log.write(`[特殊] 计算平均晕眩时间`);
} else if (["skchr_amiya_2", "skchr_liskam_2", "skchr_ghost_2", "skchr_broca_2"].includes(skillId)) {
} else if (["skchr_amiya_2", "skchr_liskam_2", "skchr_ghost_2", "skchr_broca_2", "skchr_serum_1"].includes(skillId)) {
stunDuration = blackboard.stun;
} else if (skillId == "skchr_folivo_2" && options.token) {
stunDuration = blackboard.stun;
Expand Down Expand Up @@ -1777,7 +1793,14 @@ function calcDurations(isSkill, attackTime, attackSpeed, levelData, buffList, bu
attackCount = Math.ceil((spData.spCost - stunDuration*sp_rate) / (buffList["uniequip_002_milu"].sp + attackTime*sp_rate));
log.write(`[特殊] ${displayNames["uniequip_002_milu"]}: attack sp = ${attackCount * buffList["uniequip_002_milu"].sp}`);
duration = attackCount * attackTime;
}
} else if (buffList["tachr_489_serum_1"] && skillId == "skchr_serum_1") {
let esp = buffList["tachr_489_serum_1"].sp_recovery_per_sec *
(stunDuration - buffList["tachr_489_serum_1"].delay);
log.write(`眩晕时额外恢复 ${esp.toFixed(1)}sp`);
attackDuration = (spData.spCost - esp) / (1 + buffFrame.spRecoveryPerSec) - stunDuration;
attackCount = Math.ceil(attackDuration / attackTime);
duration = attackDuration;
}
break;
// todo: cast time
} // switch
Expand Down Expand Up @@ -1831,6 +1854,7 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
// 备注信息
if (isSkill && checkSpecs(charId, "note"))
log.writeNote(checkSpecs(charId, "note"));
//console.log(buffList);

// 计算面板属性
log.write("**【Buff计算】**");
Expand Down Expand Up @@ -1986,13 +2010,19 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
emr = Math.max(emr - enemyBuffFrame.emr_pene, 0);
let emrpct = emr / 100;
let ecount = Math.min(buffFrame.maxTarget, enemy.count);
if (blackboard.id == "skchr_pudd_2" && isSkill && ecount > 1)
ecount = buffFrame.maxTarget;

// 平均化惊蛰/异客伤害
if ((charId == 'char_306_leizi' || charId == "char_472_pasngr") &&
!(isSkill && blackboard.id == "skchr_leizi_2")) {
let scale = 1, tot = 1, sks = [1];
if (['char_306_leizi', 'char_472_pasngr', 'char_4004_pudd'].includes(charId)) {
let scale = 0.85, s = 1; tot = 1, sks = [1];
if (isSkill && blackboard.id == "skchr_leizi_2")
scale = 1;
else if (charAttr.char.equipId && AKDATA.Data.battle_equip_table[charAttr.char.equipId])
scale = basicFrame.equip_blackboard["attack@chain.atk_scale"];

for (var i=0; i<ecount-1; ++i) {
scale *= 0.85; tot += scale; sks.push(scale);
s*=scale; tot += s; sks.push(s);
}
log.write(`[特殊] 电法: 原本伤害倍率: ${buffFrame.damage_scale.toFixed(2)}`);
buffFrame.damage_scale *= tot / ecount;
Expand All @@ -2006,7 +2036,17 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
if (damageType != 2) {
if (buffList["tachr_155_tiger_1"])
dur.critCount = dur.duration / 3 * critBuffFrame.prob;
else
else if (charId == "char_420_flamtl") {
dur.critCount = Math.floor(dur.duration / 5);
switch (blackboard.id) {
case "skchr_flamtl_1":
case "skchr_flamtl_2":
if (!isSkill) dur.critCount += 1; break;
case "skchr_flamtl_3":
if (isSkill) dur.critCount += 2; break;
}
console.log(`按闪避 ${dur.critCount} 次计算`);
} else
dur.critCount = dur.attackCount * critBuffFrame.prob;

if (dur.critCount > 1) dur.critCount = Math.floor(dur.critCount);
Expand All @@ -2015,6 +2055,8 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
dur.critHitCount = dur.critCount * dur.times * ecount;
if (buffList["tachr_222_bpipe_1"]) {
dur.critHitCount = dur.critCount * dur.times * Math.min(enemy.count, 2);
} else if (charId == "char_420_flamtl") {
dur.critHitCount = dur.critCount * 2 * enemy.count;
}
} else {
dur.critCount = 0; dur.critHitCount = 0;
Expand Down Expand Up @@ -2443,6 +2485,14 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
pool[1] += damage * nHit;
log.write(`[特殊] ${displayNames[buffName]}: 法术伤害 ${damage.toFixed(1)}, 命中 ${nHit}`);
break;
case "tachr_1014_nearl2_1":
case "skchr_nearl2_3":
let _scale = bb.value ? bb.value : bb.atk_scale;
let _nHit = options.cond ? 2 : 1;
damage = finalFrame.atk * _scale * (1-emrpct) * buffFrame.damage_scale;
pool[3] += damage * ecount * _nHit;
log.write(`[特殊] ${displayNames[buffName]}: 落地伤害 ${damage.toFixed(1)}, 命中 ${ecount*_nHit}`);
break;
// 间接治疗
case "skchr_tiger_2":
pool[2] += damagePool[1] * bb.heal_scale; break;
Expand Down Expand Up @@ -2574,9 +2624,12 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
}
break;
case "tachr_473_mberry_trait":
case "tachr_449_glider_trait":
let ep_ratio = bb.ep_heal_ratio;
if (blackboard.id == "skchr_mberry_1" && isSkill)
ep_ratio = buffList.skill.ep_heal_ratio;
else if (blackboard.id == "skchr_glider_1" && isSkill)
ep_ratio = buffList.skill["glider_s_1.ep_heal_ratio"];
damage = finalFrame.atk / buffFrame.heal_scale * ep_ratio;
log.writeNote(`元素治疗 ${damage.toFixed(1)} (${ep_ratio.toFixed(2)} x)`);
break;
Expand Down
Loading

0 comments on commit b32605a

Please sign in to comment.