Skip to content

Commit

Permalink
Aug 30
Browse files Browse the repository at this point in the history
  • Loading branch information
xulai1001 committed Aug 30, 2020
1 parent 4a0b13b commit de450ee
Show file tree
Hide file tree
Showing 505 changed files with 288,333 additions and 75,876 deletions.
6 changes: 3 additions & 3 deletions _docs/character.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function load() {
let charData = AKDATA.Data.character_table[char];
if (charData.profession == "TOKEN" || charData.profession == "TRAP") continue;
let phaseData = charData.phases[0].attributesKeyFrames[0].data;
selector[char] = charData.displayNumber + ' ' + charData.name;
selector[char] = (charData.displayNumber || "Roguelike")+ ' ' + charData.name;
body.push([
charData.displayNumber,
`<a href="#!/${char}">${charData.name}</a>`,
Expand Down Expand Up @@ -220,7 +220,7 @@ function show(hash) {
}
///////////////////////////////////////////////
let skillLvlupHtml = '';
if (charData.phases.length > 1) {
if (charData.phases.length > 1 && charData.phases[0].evolveCost) {
skillLvlupHtml += pmBase.component.create({
type: 'list',
card: true,
Expand All @@ -233,7 +233,7 @@ function show(hash) {
});
}

if (charData.allSkillLvlup.length > 0) {
if (charData.allSkillLvlup.length > 0 && charData.allSkillLvlup[0].lvlUpCost) {
skillLvlupHtml += pmBase.component.create({
type: 'list',
card: true,
Expand Down
2 changes: 1 addition & 1 deletion _docs/dps.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ function calculate(index) {

// skill dps
if (s.hps == 0 || s.dps == 0) {
var color = (s.dps == 0) ? DamageColors[2] : DamageColors[dps.normal.damageType];
var color = (s.dps == 0) ? DamageColors[2] : DamageColors[s.damageType];
getElement('s_dps', index).html(Math.round(s.dps || s.hps)).css("color", color);
} else {
getElement('s_dps', index).html(`DPS: ${Math.round(s.dps)}, HPS: ${Math.round(s.hps)}`);
Expand Down
35 changes: 22 additions & 13 deletions _docs/mastery.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,12 @@ function load() {
methods: {
changeChar: function(event) {
this.resultView = calculate(this.charId);
$("#mats_table").text("正在计算...");
beginCalcMats(this.resultView);
if (this.resultView.rhodes) {
$("#mats_table").text("集成战略临时干员");
} else {
$("#mats_table").text("正在计算...");
beginCalcMats(this.resultView);
}
this.updateLevelingTable();
},
debugPrint: function(obj) {
Expand Down Expand Up @@ -402,11 +406,14 @@ function calculate(charId) {
resultView.mats[k] = [];
mats[k].forEach(level => {
var i = {};
level.forEach(x => {
i[itemdb[x.id].name] = x.count;
itemCache[itemdb[x.id].name] = {id: x.id, name: itemdb[x.id].name, rarity: itemdb[x.id].rarity};
});
resultView.mats[k].push(i);
if (level) {
level.forEach(x => {
i[itemdb[x.id].name] = x.count;
itemCache[itemdb[x.id].name] = {id: x.id, name: itemdb[x.id].name, rarity: itemdb[x.id].rarity};
});
resultView.mats[k].push(i);
}
else resultView["rhodes"] = true;
});
};

Expand Down Expand Up @@ -448,7 +455,7 @@ function buildChartView(resultView, key) {

if (view.dps[skill]["满潜"].spType != 8) {
if (line != "") line += "\n";
line += `点火时间 ${view.dps[skill]["基准"].s_ssp}s -> ${view.dps[skill]["满潜"].s_ssp}s`;
line += `启动技力 ${view.dps[skill]["基准"].s_ssp}s -> ${view.dps[skill]["满潜"].s_ssp}s`;
console.log(view.dps[skill]["满潜"].spType);
if (view.dps[skill]["满潜"].s_ssp <= 0)
line += " (落地点火)";
Expand Down Expand Up @@ -520,11 +527,13 @@ function beginCalcMats(resultView) {
for (var sk in resultView.mats) {
let level = 7; // 7->8
resultView.mats[sk].forEach(m => {
(function (_m, _s, _l) { // closure to bind args to setTimeout
setTimeout(function () {
queryArkPlanner(_m, matsCallback, {mats: _m, id: resultView.id, skill: _s, level: _l});
}, delay);
}(m, sk, level));
if (Object.keys(m).length > 0) {
(function (_m, _s, _l) { // closure to bind args to setTimeout
setTimeout(function () {
queryArkPlanner(_m, matsCallback, {mats: _m, id: resultView.id, skill: _s, level: _l});
}, delay);
}(m, sk, level));
}
level += 1; delay += 300;
});
}
Expand Down
3 changes: 3 additions & 0 deletions _docs/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ order: 4
category: 工具
icon: info-circle
---
## 20.08.25-30
- [update] 森蚺等,30日更新集成战略干员。增加了对无视魔抗的计算

## 20.08.17
- [bugfix] 绝影攻击间隔错误
- [bugfix] 跃浪击/砾技能时间错误
Expand Down
8 changes: 4 additions & 4 deletions resources/akdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const useCache = true;
const cacheBeginTime = new Date(2019, 12, 10).getTime();

window.AKDATA = {
akdata: "200812", // 主程序Tag版本
gamedata: "20-08-10-07-52-45-69cad6", // CDN游戏数据版本
customdata: "200812", // 额外数据版本
akdata: "200830", // 主程序Tag版本
gamedata: "20-08-24-09-47-26-b1935e", // CDN游戏数据版本
customdata: "200830", // 额外数据版本

Data: {},

Expand All @@ -28,7 +28,7 @@ window.AKDATA = {
let path = `https://cdn.jsdelivr.net/gh/xulai1001/akdata@${window.AKDATA.akdata}/resources/gamedata/${paths[i].toLowerCase()}`;

// custom json data: always use local copy
if (!paths[i].includes("excel"))
if (!paths[i].includes("excel")) // 本地调试开关
path = `../resources/gamedata/${paths[i].toLowerCase()}`;

paths[i] = loadJSON(path, data => AKDATA.Data[name] = data);
Expand Down
56 changes: 47 additions & 9 deletions resources/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ function calculateDps(char, enemy, raidBuff) {
globalHps = Math.round((normalAttack.totalHeal + skillAttack.totalHeal) / (normalAttack.dur.duration + skillAttack.dur.duration + normalAttack.dur.stunDuration));
//console.log(globalDps, globalHps);
let killTime = 0;

return {
normal: normalAttack,
skill: skillAttack,
Expand Down Expand Up @@ -373,6 +372,10 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
buffFrame.edef_pene_scale = blackboard[key];
writeBuff(`无视护甲(最终乘算): -${blackboard[key]*100}%`);
break;
case "emr_pene": // 无视魔抗加算值
buffFrame.emr_pene += blackboard[key];
writeBuff(`无视魔抗(加算): -${blackboard[key]}`);
break;
case "prob_override": // 计算后的暴击概率
buffFrame.prob = blackboard[key];
writeBuff(`概率(计算): ${Math.round(buffFrame.prob*100)}%`);
Expand All @@ -389,8 +392,10 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
// 特判
//----------------------------------------------------------------------------------------
// 备注信息
if (isSkill && checkSpecs(tag, "note"))
if (isSkill && !isCrit && checkSpecs(tag, "note")) {
log.writeNote(checkSpecs(tag, "note"));
console.log("here");
}

if (checkSpecs(tag, "cond")) { // 触发天赋类
if (!options.cond) { // 未触发时依然生效的天赋
Expand Down Expand Up @@ -450,6 +455,10 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
if (isSkill && skillId == "skchr_lisa_3")
delete blackboard.damage_scale; // 治疗不计易伤
break;
case "tachr_366_acdrop_1": // 酸糖1: 不在这里计算
done = true; break;
case "tachr_416_zumama_1":
delete blackboard.hp_ratio; break;
}
}
} else if (checkSpecs(tag, "ranged_penalty")) { // 距离惩罚类
Expand Down Expand Up @@ -546,12 +555,18 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
break;
case "tachr_344_beewax_trait":
if (isSkill) done = true; break;
case "tachr_411_tomimi_1":
if (!isSkill) done = true; break;
case "tachr_509_acast_1":
blackboard.emr_pene = blackboard.magic_resist_penetrate_fixed;
break;
// ---- 技能 ----
case "skchr_swllow_1":
case "skchr_helage_1":
case "skchr_helage_2":
case "skchr_excu_2":
case "skchr_bpipe_2":
case "skchr_acdrop_2":
buffFrame.times = 2;
writeBuff(`攻击次数 = ${buffFrame.times}`);
break;
Expand Down Expand Up @@ -679,7 +694,8 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_spot_1":
case "tachr_193_frostl_1":
case "skchr_mantic_2":
case "skchr_glaze_2": // 攻击间隔延长,但是是加算
case "skchr_glaze_2":
case "skchr_zumama_2": // 攻击间隔延长,但是是加算
buffFrame.baseAttackTime += blackboard.base_attack_time;
writeBuff(`base_attack_time + ${blackboard.base_attack_time}s`);
blackboard.base_attack_time = 0;
Expand Down Expand Up @@ -783,6 +799,14 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_beewax_2":
delete blackboard["atk_scale"];
break;
case "skchr_tomimi_2":
blackboard.prob_override = blackboard["attack@tomimi_s_2.prob"] / 3;
delete blackboard.base_attack_time;
if (isCrit) {
blackboard.atk_scale = blackboard["attack@tomimi_s_2.atk_scale"];
log.writeNote(`每种状态概率: ${(blackboard.prob_override*100).toFixed(1)}%`);
}
break;
}
}

Expand Down Expand Up @@ -1357,7 +1381,7 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
}
}
let edef = Math.max(0, (enemy.def + enemyBuffFrame.edef) * enemyBuffFrame.edef_scale * (1-enemyBuffFrame.edef_pene_scale) - enemyBuffFrame.edef_pene);
let emr = Math.max(0, (enemy.magicResistance + enemyBuffFrame.emr) * enemyBuffFrame.emr_scale);
let emr = Math.max(0, (enemy.magicResistance + enemyBuffFrame.emr) * enemyBuffFrame.emr_scale - enemyBuffFrame.emr_pene);
let emrpct = emr / 100;
let ecount = Math.min(buffFrame.maxTarget, enemy.count);

Expand Down Expand Up @@ -1425,7 +1449,11 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
let move = 0;

function calculateHitDamage(frame, scale) {
let minRate = (buffList["tachr_144_red_1"] ? buffList["tachr_144_red_1"].atk_scale : 0.05);
let minRate = 0.05;
if (buffList["tachr_144_red_1"]) minRate = buffList["tachr_144_red_1"].atk_scale;
if (buffList["tachr_366_acdrop_1"]) {
minRate = options.cond ? buffList["tachr_366_acdrop_1"].atk_scale_2 : buffList["tachr_366_acdrop_1"].atk_scale;
}
if (damageType == 0)
ret = Math.max(frame.atk - edef, frame.atk * minRate);
else if (damageType == 1)
Expand Down Expand Up @@ -1645,10 +1673,18 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
break;
case "skchr_beewax_2":
if (isSkill) {
damage = finalFrame.atk * bb.atk_scale * (1-emrpct) * ecount;
pool[1] = damage;
}
break;
damage = finalFrame.atk * bb.atk_scale * (1-emrpct) * ecount;
pool[1] = damage;
}
break;
case "skchr_tomimi_2":
if (isSkill && options.crit) {
damage = Math.max(finalFrame.atk - enemy.def, finalFrame.atk * 0.05);
log.write(`[特殊] ${displayNames[buffName]}: 范围伤害 ${damage.toFixed(1)}, 命中 ${dur.critHitCount * (enemy.count-1)}`);
log.write(`[特殊] ${displayNames[buffName]}: 总共眩晕 ${(dur.critHitCount * bb["attack@tomimi_s_2.stun"]).toFixed(1)} 秒`)
pool[0] += damage * dur.critHitCount * (enemy.count-1);
}
break;
// 间接治疗
case "skchr_tiger_2":
pool[2] += damagePool[1] * bb.heal_scale; break;
Expand Down Expand Up @@ -1747,6 +1783,7 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
case "tachr_254_vodfox_1":
case "tachr_343_tknogi_1":
case "tachr_405_absin_1":
case "tachr_416_zumama_1":
break;
case "skchr_gravel_2":
case "skchr_phatom_1":
Expand Down Expand Up @@ -1838,6 +1875,7 @@ function initBuffFrame() {
edef_scale:1,
edef_pene:0,
edef_pene_scale:0,
emr_pene:0, // 无视魔抗
emr:0,
emr_scale:1,
atk:0,
Expand Down
11 changes: 8 additions & 3 deletions resources/customdata/dps_options.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"tags" : {
"crit" : { "type" : "bool", "displaytext" : "计算暴击", "explain": "计算时考虑暴击期望" },
"crit" : { "type" : "bool", "displaytext" : "计算暴击/概率触发", "explain": "计算时考虑暴击和概率触发的期望" },
"cond" : { "type" : "bool", "displaytext" : "触发天赋", "explain": "计算满足天赋条件时的dps(一部分天赋在未满足条件时依然生效)" },
"ranged_penalty" : { "type" : "bool", "displaytext" : "距离惩罚", "explain": "计算远卫/广域奶的远程攻击系数惩罚(一部分技能不受惩罚)" },
"token" : { "type" : "bool", "displaytext" : "计算召唤物数据", "explain": "勾选时表示召唤物dps,否则为本体" },
"stack" : { "type" : "bool", "displaytext" : "被动叠满", "explain": "按天赋叠满层数计算" },
"noblock" : { "type" : "bool", "displaytext" : "未阻挡", "explain": "计算未阻挡时恢复的生命" },
"noblock" : { "type" : "bool", "displaytext" : "未阻挡", "explain": "自身未阻挡敌人" },
"cannon": { "type": "bool", "displaytext": "水炮充能", "explain": "模拟温蒂水炮的充能情况" },
"buff": { "type": "bool", "displaytext": "计算团辅", "explain": "加算页面下方填写的团辅增益" },
"warmup": { "type": "bool", "displaytext": "多段暖机完成", "explain": "勾选计算特定技能开启第二次和以后的效果,否则计算第一次启动效果" },
Expand Down Expand Up @@ -73,6 +73,11 @@
"char_349_chiave": [ "cond" ],
"char_336_folivo": [ "token" ],
"char_272_strong": [ "cond" ],
"char_293_thorns": [ "ranged_penalty", "warmup", "thorns_ranged"]
"char_293_thorns": [ "ranged_penalty", "warmup", "thorns_ranged"],
"char_366_acdrop": [ "cond" ],
"char_411_tomimi": [ "crit" ],
"char_415_flint": [ "cond" ],
"char_416_zumama": [ "cond" ],
"char_511_asnipe": [ "crit" ]
}
}
14 changes: 13 additions & 1 deletion resources/customdata/dps_specialtags.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"char_110_deepcl": { "token": "token_10001_deepcl_tentac", "token_damage_type": "0" },
"char_242_otter": { "token": "token_10004_otter_motter", "token_damage_type": "0" },
"char_400_weedy": { "token": "token_10009_weedy_cannon" },
"char_411_tomimi": { "frame_corr": 1 },
"skchr_absin_2": { "reset_attack": true },
"skchr_acdrop_2": { "reset_attack": true },
"skchr_aglina_1": { "reset_attack": true, "attack_begin": 19 },
"skchr_aglina_2": { "attack_begin": 10 },
"skchr_aglina_3": { "attack_begin": 23 },
Expand Down Expand Up @@ -72,6 +74,7 @@
"skchr_excu_2": { "attack_begin": 23 },
"skchr_finlpp_1": { "reset_attack": "ogcd", "cast_time": 40, "attack_begin": 17 },
"skchr_finlpp_2": { "attack_begin": 11, "frame_corr": 1 },
"skchr_flint_2": { "note": "阻挡0,天赋一定触发"},
"skchr_fmout_2": { "reset_attack": true, "attack_begin": 17 },
"skchr_franka_2": { "reset_attack": true },
"skchr_frostl_1": { "sim": true},
Expand Down Expand Up @@ -133,10 +136,14 @@
"skchr_thorns_2": { "reset_attack": true },
"skchr_thorns_3": { "reset_attack": true },
"skchr_tknogi_2": { "sec": true },
"skchr_tomimi_1": { "damage_type": "0", "reset_attack": true },
"skchr_tomimi_2": { "damage_type": "0", "reset_attack": true },
"skchr_vodfox_2": { "instant_buff": true, "duration": 15, "note": "召唤类技能,结果无意义" },
"skchr_whitew_2": { "reset_attack": true },
"skchr_yak_1": { "damage_type": "0" },
"skchr_yuki_2": { "reset_attack": true, "attack_begin": 22, "note": "可能丢失最多33%伤害" },
"skchr_zumama_1": { "passive": true },
"skchr_zumama_3": { "reset_attack": true },
"skcom_assist_cost[2]": { "reset_attack": true },
"tachr_106_franka_1": { "crit": true },
"tachr_113_cqbw_2": { "cond": true },
Expand Down Expand Up @@ -195,5 +202,10 @@
"tachr_254_vodfox_1": { "cond": true },
"tachr_333_sidero_1": { "cond": true },
"tachr_405_absin_1": { "cond": true },
"tachr_349_chiave_1": { "cond": true, "note": "天赋按1层计算" }
"tachr_349_chiave_1": { "cond": true, "note": "天赋按1层计算" },
"tachr_366_acdrop_1": { "cond": true },
"tachr_415_flint_1": { "cond": true },
"tachr_416_zumama_1": { "cond": true },
"tachr_416_zumama_2": { "note": "假设第二天赋一直生效" },
"tachr_511_asnipe_1": { "crit": true }
}
2 changes: 1 addition & 1 deletion resources/gamedata/[uc]lua/globalconfig.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GlobalConfig =
{
CUR_FUNC_VER = "V011",
CUR_FUNC_VER = "V012",
}

------保证GlobalConfig是只读的------
Expand Down
Loading

0 comments on commit de450ee

Please sign in to comment.