Skip to content

Commit

Permalink
Sept 24 update Surtr, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
xulai1001 committed Sep 24, 2020
1 parent de450ee commit 6ce01bf
Show file tree
Hide file tree
Showing 87 changed files with 137,283 additions and 56,916 deletions.
38 changes: 36 additions & 2 deletions _docs/test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
// UA test
let ua = navigator.userAgent;
document.getElementById("user_agent").innerText = ua;

$("#jquery").text($.fn.jquery);
$("#vue").html("Vue: {{ error }}");
$("#vue").html("Vue: {{ error }} <br> <div v-html='content'></div>");

let vue_app = new Vue({
el: "#vue",
data: { error: Vue.version }
data: { error: Vue.version, content: "test content" }
});

// AKDATA load test
function init() {
AKDATA.load([
'excel/character_table.json',
'excel/skill_table.json',
'../version.json',
'../customdata/dps_specialtags.json',
'../customdata/dps_options.json',
'../resources/dpsv2.js'
], load);
}

function load() {
test_dps();
}

pmBase.hook.on('init', init);

// dpsv2 test
function test_dps() {
var charId = "char_290_vigna";
var skillId = 'skchr_vigna_2';
var dps = new AKDATA.Dps.DpsState();
dps.setChar({ charId, skillId });
dps.setEnemy();
dps.setRaidBuff();
dps.basicFrame = dps.calcBasicFrame();
dps.addTalents();
dps.test();
console.log(dps);
vue_app.content = dps.log.toString().replace(new RegExp('\n', "g"), "<br>");
}
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.09.24
- [update] 史尔特尔等。开始开发新版引擎

## 20.08.25-30
- [update] 森蚺等,30日更新集成战略干员。增加了对无视魔抗的计算

Expand Down
6 changes: 3 additions & 3 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: "200830", // 主程序Tag版本
gamedata: "20-08-24-09-47-26-b1935e", // CDN游戏数据版本
customdata: "200830", // 额外数据版本
akdata: "200924", // 主程序Tag版本
gamedata: "20-09-23-10-12-25-72c56a", // CDN游戏数据版本
customdata: "200924", // 额外数据版本

Data: {},

Expand Down
33 changes: 30 additions & 3 deletions resources/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,13 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
delete blackboard["damage_scale"];
break;
case "tachr_344_beewax_trait":
case "tachr_388_mint_trait":
case "tachr_388_mint_1":
if (isSkill) done = true; break;
case "tachr_411_tomimi_1":
if (!isSkill) done = true; break;
case "tachr_509_acast_1":
case "tachr_350_surtr_1":
blackboard.emr_pene = blackboard.magic_resist_penetrate_fixed;
break;
// ---- 技能 ----
Expand All @@ -567,6 +570,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_excu_2":
case "skchr_bpipe_2":
case "skchr_acdrop_2":
case "skchr_spikes_1":
buffFrame.times = 2;
writeBuff(`攻击次数 = ${buffFrame.times}`);
break;
Expand Down Expand Up @@ -715,10 +719,11 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
blackboard.base_attack_time *= 2;
break;
case "skchr_whitew_2":
case "skchr_spikes_2":
buffFrame.maxTarget = 2;
writeBuff(`最大目标数 = ${buffFrame.maxTarget}`);
if (options.ranged_penalty) {
buffFrame.atk_scale = 1;
buffFrame.atk_scale /= 0.8;
writeBuff(`不受距离惩罚`);
}
break;
Expand Down Expand Up @@ -797,6 +802,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
delete blackboard["damage_scale"];
break;
case "skchr_beewax_2":
case "skchr_mint_2":
delete blackboard["atk_scale"];
break;
case "skchr_tomimi_2":
Expand All @@ -807,6 +813,15 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
log.writeNote(`每种状态概率: ${(blackboard.prob_override*100).toFixed(1)}%`);
}
break;
case "skchr_surtr_2":
if (enemy.count == 1) {
blackboard.atk_scale = blackboard["attack@surtr_s_2[critical].atk_scale"];
log.writeNote(`对单目标倍率 ${blackboard.atk_scale.toFixed(1)}x`);
}
break;
case "skchr_surtr_3":
delete blackboard.hp_ratio;
break;
}
}

Expand Down Expand Up @@ -1010,7 +1025,13 @@ function calcDurations(isSkill, attackTime, attackSpeed, levelData, buffList, bu
// 技能类型
if (levelData.description.includes("持续时间无限")) {
if (skillId == "skchr_thorns_3" && !options.warmup) {}
else {
else if (skillId == "skchr_surtr_3") {
var lock_time = buffList["tachr_350_surtr_2"]["surtr_t_2[withdraw].interval"];
duration = Math.sqrt(600) + lock_time;
attackCount = Math.ceil(duration / attackTime);
log.write(`损失100%血量耗时: ${Math.sqrt(600).toFixed(1)}s,锁血时间: ${lock_time}s`);
log.writeNote("不治疗最大维持时间");
} else {
attackCount = Math.ceil(1800 / attackTime);
duration = attackCount * attackTime;
tags.push("infinity"); log.writeNote("持续时间无限 (记为1800s)");
Expand Down Expand Up @@ -1559,6 +1580,8 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
case "skchr_aglina_3":
case "skchr_beewax_1":
case "skchr_beewax_2":
case "skchr_mint_1":
case "skchr_mint_2":
damagePool[1] = 0;
log.write(`[特殊] ${displayNames[buffName]}: 伤害为0 (以上计算无效)`);
break;
Expand Down Expand Up @@ -1672,6 +1695,7 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
pool[1] = damage; damagePool[1] = 0;
break;
case "skchr_beewax_2":
case "skchr_mint_2":
if (isSkill) {
damage = finalFrame.atk * bb.atk_scale * (1-emrpct) * ecount;
pool[1] = damage;
Expand Down Expand Up @@ -1789,7 +1813,10 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
case "skchr_phatom_1":
pool[4] += bb.hp_ratio * finalFrame.maxHp;
log.write(`[特殊] ${displayNames[buffName]}: 护盾量 ${pool[4]}`);
break;
break;
case "skchr_surtr_3":
pool[4] -= finalFrame.maxHp + 5000;
break;
default:
pool[2] += bb.hp_ratio * finalFrame.maxHp * dur.attackCount;
};
Expand Down
3 changes: 2 additions & 1 deletion resources/customdata/dps_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"char_411_tomimi": [ "crit" ],
"char_415_flint": [ "cond" ],
"char_416_zumama": [ "cond" ],
"char_511_asnipe": [ "crit" ]
"char_511_asnipe": [ "crit" ],
"char_271_spikes": [ "cond", "ranged_penalty"]
}
}
6 changes: 5 additions & 1 deletion resources/customdata/dps_specialtags.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"skchr_midn_1": { "reset_attack": true },
"skchr_milu_1": { "frame_corr": 1 },
"skchr_milu_2": { "cast_time": 46, "reset_attack": "ogcd" },
"skchr_mint_1": { "reset_attack": true },
"skchr_mm_2": { "attack_begin": 3 },
"skchr_moeshd_2": { "cast_time": 34 },
"skchr_mostma_2": { "reset_attack": true, "sec": true },
Expand Down Expand Up @@ -130,6 +131,8 @@
"skchr_snsant_1": { "cast_time": 50 },
"skchr_snsant_2": { "cast_time": 75 },
"skchr_strong_2": { "damage_type": "0" },
"skchr_surtr_1": { "damage_type": 1 },
"skchr_surtr_3": { "damage_type": 1 },
"skchr_swllow_1": { "sim": true },
"skchr_swllow_2": { "reset_attack": true, "attack_begin": 2 },
"skchr_texas_2": { "cast_time": 65 },
Expand Down Expand Up @@ -172,7 +175,8 @@
"tachr_225_haak_1": { "crit": true },
"tachr_226_hmau_1": { "cond": true },
"tachr_230_savage_1": { "cond": true },
"tachr_243_waaifu_1": { "crit": true },
"tachr_243_waaifu_1": { "crit": true },
"tachr_271_spikes_1": { "cond": true },
"tachr_272_strong_1": { "cond": true },
"tachr_274_astesi_1": { "stack": true },
"tachr_279_excu_trait": { "cond": true },
Expand Down
Binary file added resources/customdata/specialtags.xlsx
Binary file not shown.
Loading

0 comments on commit 6ce01bf

Please sign in to comment.