Skip to content

Commit

Permalink
June 1
Browse files Browse the repository at this point in the history
  • Loading branch information
xulai1001 committed Jun 1, 2021
1 parent 6ab69bc commit 4ed6dfe
Show file tree
Hide file tree
Showing 69 changed files with 99,522 additions and 29,893 deletions.
16 changes: 12 additions & 4 deletions _docs/mastery.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ const CostStages = [
{ potential: 5, desc: "满潜" }
];

const ChartKeys = {
dps: "平均DPS/HPS",
s_dps: "技能DPS/HPS",
s_dmg: "技能总伤害/治疗"
};

const LevelingCost = {4: [2391, 9], 5: [3699, 13], 6: [5874, 21] };

let itemCache = {};
Expand Down Expand Up @@ -121,7 +127,8 @@ function buildVueModel() {
jobs: 0,
test: "",
img_char: "/akdata/assets/images/char/char_504_rguard.png",
txt_char: "请选择"
txt_char: "请选择",
txt_gain_title: "提升率分布图 - 平均DPS"
};
}

Expand Down Expand Up @@ -214,7 +221,7 @@ function load() {
<div class="card mb-2 col-12">
<div class="card-header">
<div class="card-title mb-0">提升率分布图</div>
<div class="card-title mb-0">{{ txt_gain_title }}</div>
</div>
<div id="pie_chart" class="row">
</div>
Expand Down Expand Up @@ -305,7 +312,7 @@ function load() {
updateCostPlot(costResult, this.chartKey);
*/
for (var sk in rv.cost) {
matsView[sk] = {title: rv.skill[sk] || `精英化材料(不包含红票/龙门币)`};
matsView[sk] = {title: rv.skill[sk] || `精英化材料(不含龙门币)`};
matsView[sk].list = [];
let base_lv = sk.includes("elite") ? 0 : 7;
for (i=0; i<rv.mats[sk].length; ++i) {
Expand All @@ -328,7 +335,7 @@ function load() {
type: 'list',
card: true,
title: `${matsView[sk].title}`,
header: ['等级', '素材', "等效绿票"],
header: ['等级', '素材', "绿票"],
list: matsView[sk].list
});
}
Expand Down Expand Up @@ -374,6 +381,7 @@ function load() {
let pv = buildPieView(cv);
plotPie(pv);
updatePlot(cv);
this.txt_gain_title = `提升率分布图 - ${ChartKeys[_new]}`;
},

}
Expand Down
5 changes: 4 additions & 1 deletion _docs/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ order: 4
category: 工具
icon: info-circle
---
## 21.05.27-31
## 21.06.01
- [update] 卡涅利安等
- [dps] 新版选人菜单测试
- [dps] 切换类技能(银灰2,山2)统一按永续类计算
- [mastery] 专精收益计算器改版。全面修改为无需后台工作的绿票算法
- [mastery] 去除了部分图表,增加了精二材料计算和收益饼图
- [fix] 修正异客3持续时间,凯尔希3增加误差说明
- [fix] 修正因陀罗1,贝娜1的无视防御计算
- [fix] 修正爱丽丝/守林人/W的炸弹计算,现在炸弹的数量不会超过设定的敌人数量

## 21.05.02 2周年版本
- [update] 浊心斯卡蒂等
Expand Down
Binary file added assets/images/char/char_369_bena.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/char/char_426_billro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/char/char_469_indigo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/char/char_478_kirara.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 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: "210502", // jsdelivr tag version
akdata: "210601", // jsdelivr tag version

Data: {},

new_op: ["char_1012_skadi2", "char_003_kalts", "char_474_glady", "char_475_akafyu"],
new_op: ["char_426_billro", "char_478_kirara", "char_369_bena", "char_469_indigo"],

professionNames: {
"PIONEER": "先锋",
Expand Down Expand Up @@ -46,7 +46,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()}?_=${Math.round(Math.random()*1e8)}`;
console.log(`Loading -> ${name}`);
paths[i] = loadJSON(path, data => AKDATA.Data[name] = data);
Expand Down
103 changes: 79 additions & 24 deletions resources/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
delete blackboard.times;
break;
case "tachr_197_poca_1": // 早露
case "skchr_tiger_1":
blackboard.edef_pene_scale = blackboard["def_penetrate"];
break;
case "tachr_358_lisa_2": // 铃兰2
Expand Down Expand Up @@ -614,6 +613,13 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "tachr_388_mint_trait":
case "tachr_388_mint_1":
if (isSkill) done = true; break;
case "tachr_426_billro_2":
done = true; break;
case "tachr_426_billro_trait":
if (isSkill && !(skillId == "skchr_billro_1" && options.charge)) {
done = true;
}
break;
case "tachr_411_tomimi_1":
if (!isSkill) done = true; break;
case "tachr_509_acast_1":
Expand Down Expand Up @@ -645,19 +651,19 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
writeBuff(`攻击次数 = ${buffFrame.times}`);
break;
case "skchr_milu_2": // 守林(茂名版)
buffFrame.times = blackboard.max_cnt;
buffFrame.times = Math.min(enemy.count, blackboard.max_cnt);
log.writeNote(`核弹数量: ${buffFrame.times} (按全中计算)`);
buffFrame.maxTarget = 999;
break;
case "skchr_cqbw_3": // D12(茂名版)
buffFrame.times = blackboard.max_target;
buffFrame.times = Math.min(enemy.count, blackboard.max_target);
blackboard.max_target = 999;
log.writeNote(`核弹数量: ${buffFrame.times} (按全中计算)`);
log.writeNote(`炸弹数量: ${buffFrame.times} (按全中计算)`);
break;
case "skchr_iris_2": // 爱丽丝2
buffFrame.times = blackboard.max_target;
buffFrame.times = Math.min(enemy.count, blackboard.max_target);
blackboard.max_target = 999;
log.writeNote(`按全中计算`);
log.writeNote(`睡眠目标数量: ${buffFrame.times}\n其余目标按全中计算`);
break;
case "skchr_lava2_1": // sp炎熔1
delete blackboard["attack@max_target"];
Expand Down Expand Up @@ -811,6 +817,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_brownb_2": // 攻击间隔缩短,但是是乘算负数
case "skchr_whispr_2":
case "skchr_pasngr_2":
case "skchr_indigo_1":
writeBuff(`base_attack_time: ${blackboard.base_attack_time}x`);
blackboard.base_attack_time *= basic.baseAttackTime;
break;
Expand All @@ -834,6 +841,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
case "skchr_finlpp_2":
case "skchr_jaksel_2":
case "skchr_iris_1":
case "skchr_indigo_2":
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 @@ -1028,6 +1036,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
delete blackboard.max_target;
break;
case "tachr_338_iris_trait":
case "tachr_469_indigo_trait":
case "tachr_338_iris_1":
case "tachr_362_saga_2":
done = true; break;
Expand Down Expand Up @@ -1093,6 +1102,15 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
blackboard.edef_scale = blackboard.def;
delete blackboard.def;
break;
case "skchr_tiger_1":
case "skchr_bena_1":
blackboard.edef_pene_scale = blackboard["def_penetrate"];
break;
case "skchr_billro_2":
if (!options.charge) {
delete blackboard.atk;
}
break;
}
}

Expand Down Expand Up @@ -1729,15 +1747,14 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev

// sec spec
if (checkSpecs(blackboard.id, "sec") && isSkill) {
finalFrame.baseAttackTime = 1;
finalFrame.attackSpeed = 100;
buffFrame.attackSpeed = 0;
log.writeNote("每秒造成一次伤害/治疗");
} else if (isSkill && blackboard.id == "skchr_glady_3") {
finalFrame.baseAttackTime = 1.5;
let intv = 1;
if (checkSpecs(blackboard.id, "interval")) {
intv = checkSpecs(blackboard.id, "interval");
}
finalFrame.baseAttackTime = intv;
finalFrame.attackSpeed = 100;
buffFrame.attackSpeed = 0;
log.write(`[特殊] 攻击间隔 1.5s`);
log.writeNote(`每 ${intv} 秒造成一次伤害/治疗`);
}

let realAttackTime = finalFrame.baseAttackTime * 100 / finalFrame.attackSpeed;
Expand Down Expand Up @@ -1784,7 +1801,7 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
for (var b in buffList) {
let buffName = (b=="skill") ? buffList[b].id : b;
if (checkSpecs(buffName, "keep_debuff") && !enemyBuffFrame.applied[buffName]){
log.writeNote("假设全程覆盖Debuff");
log.writeNote("假设全程覆盖Debuff");
enemyBuffFrame = applyBuff(charAttr, enemyBuffFrame, buffName, buffList[b], true, false, new Log(), enemy);
}
}
Expand Down Expand Up @@ -1979,6 +1996,9 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
case "skchr_aglina_3":
case "skchr_beewax_1":
case "skchr_beewax_2":
case "skchr_billro_1":
case "skchr_billro_2":
case "skchr_billro_3":
case "skchr_mint_1":
case "skchr_mint_2":
damagePool[1] = 0;
Expand Down Expand Up @@ -2156,15 +2176,16 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
pool[0] += hitDamage * hit;
}
break;
case "tachr_338_iris_1":
if (isSkill && blackboard.id == "skchr_iris_2") break;
else {
damage = hitDamage * bb.atk_scale;
let md = damage * 3 + hitDamage;
log.write(`[特殊] ${displayNames[buffName]}: 蓄力伤害 ${damage.toFixed(1)}, 满蓄力伤害(3蓄+普攻) ${md.toFixed(1)}, 不计入dps`);
if (isSkill) log.writeNote("蓄力伤害不计入dps");
log.writeNote(`满蓄力伤害 ${md.toFixed(1)}`);
}
case "tachr_338_iris_trait":
case "tachr_469_indigo_trait":
if (isSkill && ["skchr_iris_2", "skchr_indigo_2"].includes(blackboard.id)) {}
else {
damage = hitDamage * (bb.atk_scale || 1);
let md = damage * 3 + hitDamage;
log.write(`[特殊] ${displayNames[buffName]}: 蓄力伤害 ${damage.toFixed(1)}, 满蓄力伤害(3蓄+普攻) ${md.toFixed(1)}, 不计入dps`);
log.writeNote(`满蓄力伤害 ${md.toFixed(1)}`);
if (isSkill) log.writeNote("(不计入dps)");
}
break;
case "skchr_ash_3":
atk = finalFrame.atk / bb.atk_scale * (options.cond ? bb.hitwall_scale : bb.not_hitwall_scale);
Expand Down Expand Up @@ -2198,10 +2219,26 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
break;
case "skchr_toddi_2":
atk = finalFrame.atk / bb["attack@atk_scale"] * bb["attack@splash_atk_scale"];
damage = Math.max(atk - enemy.def, atk * 0.05);
damage = Math.max(atk - enemy.def, atk * 0.05) * buffFrame.damage_scale;
pool[0] += damage * enemy.count * dur.hitCount;
log.write(`[特殊] ${displayNames[buffName]}: 爆炸伤害 ${damage.toFixed(1)}, 命中 ${enemy.count * dur.hitCount}`);
break;
case "skchr_indigo_2":
if (options.cond) {
atk = finalFrame.atk * bb["indigo_s_2[damage].atk_scale"];
damage = Math.max(atk * (1-emrpct), atk*0.05) * buffFrame.damage_scale;
pool[1] += damage * enemy.count * dur.duration * 2;
log.write(`[特殊] ${displayNames[buffName]}: 法术伤害 ${damage.toFixed(1)}, 命中 ${enemy.count * dur.duration * 2}`);
log.writeNote(`触发束缚伤害`);
}
break;
case "tachr_426_billro_1":
if (isSkill) {
damage = bb.heal_scale * finalFrame.maxHp;
if (options.charge) damage *= 2;
pool[2] += damage;
}
break;
// 间接治疗
case "skchr_tiger_2":
pool[2] += damagePool[1] * bb.heal_scale; break;
Expand Down Expand Up @@ -2275,6 +2312,12 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
pool[1] += damage;
log.write(`${displayNames[buffName]}: 法术伤害 ${damage.toFixed(1)}`);
break;
case "skchr_kirara_1":
damage = finalFrame.atk * bb["kirara_s_1.atk_scale"];
damage = Math.max(damage * (1-emrpct), damage * 0.05) * dur.hitCount;
pool[1] += damage;
log.write(`${displayNames[buffName]}: 法术伤害 ${damage.toFixed(1)}`);
break;
case "skchr_amiya2_2":
var arts_atk = finalFrame.atk * bb.atk_scale;
var real_atk = finalFrame.atk * bb.atk_scale_2;
Expand Down Expand Up @@ -2325,6 +2368,14 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
let hpratiosec = bb["hp_recovery_per_sec_by_max_hp_ratio"];
let hpsec = bb["hp_recovery_per_sec"];
if (hpratiosec) {
if (buffName == "tachr_478_kirara_1") {
if (options.cond) hpratiosec = bb["kirara_t_2.hp_recovery_per_sec_by_max_hp_ratio"];
if (isSkill && blackboard.id == "skchr_kirara_2") {
hpratiosec *= buffList["skill"].talent_scale;
}
log.write(`天赋回血比例: ${(hpratiosec * 100).toFixed(1)}%/s`);
}

if (buffName == "tachr_344_beewax_1" && isSkill) {}
else if (buffName == "tachr_362_saga_2") {}
else if (buffName == "tachr_293_thorns_2") {
Expand Down Expand Up @@ -2365,6 +2416,10 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
pool[2] += heal * dur.critHitCount;
}
break;
case "skchr_bena_2":
pool[2] -= bb.hp_ratio * dur.attackCount * finalFrame.maxHp;
log.writeNote(`每次攻击生命流失 ${(bb.hp_ratio * finalFrame.maxHp).toFixed(1)}`);
break;
case "tachr_017_huang_1":
case "skchr_ccheal_1":
case "skchr_ccheal_2":
Expand Down
8 changes: 6 additions & 2 deletions resources/customdata/dps_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"thorns_ranged": { "type": "bool", "displaytext": "远程敌人", "explain": "对远程敌人毒伤翻倍" },
"rosmon_double": { "type": "bool", "displaytext": "双剑重叠", "explain": "3技能2把剑同时命中同一目标", "off": true },
"archet": { "type": "bool", "displaytext": "兰登战术(团辅)", "explain": "攻回技能每2.5s恢复1sp", "off": true },
"chen": { "type": "bool", "displaytext": "呵斥(团辅)", "explain": "攻回技能每4s恢复1sp", "off": true }
"chen": { "type": "bool", "displaytext": "呵斥(团辅)", "explain": "攻回技能每4s恢复1sp", "off": true },
"charge": { "type": "bool", "displaytext": "蓄力", "explain": "积攒2层技能再释放" }
},
"char" : {
"char_503_rang" : [ "cond" ],
Expand Down Expand Up @@ -108,6 +109,9 @@
"char_363_toddi": [ "cond" ],
"char_003_kalts": [ "token" ],
"char_474_glady": [ "cond" ],
"char_475_akafyu" : [ "stack" ]
"char_475_akafyu" : [ "stack" ],
"char_478_kirara": [ "cond" ],
"char_469_indigo": [ "cond" ],
"char_426_billro": [ "charge" ]
}
}
8 changes: 7 additions & 1 deletion resources/customdata/dps_specialtags.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"char_336_folivo": { "token": "token_10010_folivo_car", "token_damage_type": "0", "use_token_for_mastery": true },
"char_348_ceylon": { "frame_corr": 1 },
"char_358_lisa": { "frame_corr": 1 },
"char_369_bena": { "note": "暂无替身数据" },
"char_426_billro": { "note": "计算公式调整中,目前计算无效" },
"char_2013_cerber": { "frame_corr": 1 },
"char_2015_dusk": { "token": "token_10015_dusk_drgn" },
"char_250_phatom": { "token": "token_10007_phatom_twin" },
Expand Down Expand Up @@ -56,6 +58,7 @@
"skchr_ayer_2": { "reset_attack": true },
"skchr_beewax_1": { "reset_attack": true },
"skchr_beewax_2": { "reset_attack": true },
"skchr_bena_2": { "note": "不治疗最多攻击25次" },
"skchr_bibeak_1": { "times": 2, "damage_type":"0" },
"skchr_bibeak_2": { "cast_time": 22, "attack_begin": 9, "reset_attack": "ogcd" },
"skchr_blksk_1": { "cast_time": 35, "attack_begin": 15, "attack_animation": 30, "sim": true },
Expand Down Expand Up @@ -102,7 +105,7 @@
"skchr_franka_2": { "reset_attack": true },
"skchr_frostl_1": { "sim": true},
"skchr_glacus_2": { "cond": true, "cast_time": 50, "reset_attack": "ogcd", "frame_corr": 0 },
"skchr_glady_3": { "damage_type": 1 },
"skchr_glady_3": { "damage_type": 1, "sec": true, "interval": 1.5 },
"skchr_glassb_2": { "frame_corr": 0 },
"skchr_glaze_2": { "attack_begin": 28 },
"skchr_hpsts_2": { "damage_type": "0" },
Expand All @@ -120,6 +123,8 @@
"skchr_kalts_1": { "token_damage_type": "0" },
"skchr_kalts_2": { "token_damage_type": "0", "use_token_for_mastery": true },
"skchr_kalts_3": { "damage_type": 2, "token_damage_type": 3, "grad": true, "use_token_for_mastery": true, "note": "每击伤害为估算平均值,实际会偏高" },
"skchr_kirara_1": { "damage_type": "0" },
"skchr_kirara_2": { "sec": true },
"skchr_kroos_1": { "sim": true },
"skchr_lava2_2": { "sec": true, "note": "不重叠部分伤害减半" },
"skchr_lionhd_2": { "reset_attack": "ogcd", "cast_time": 32 },
Expand Down Expand Up @@ -278,6 +283,7 @@
"tachr_472_pasngr_2": { "cond": true },
"tachr_474_glady_2": { "cond": true, "note": "敌人重量<=3"},
"tachr_475_akafyu_1": { "stack": true },
"tachr_478_kirara_1": { "cond": true },
"tachr_503_rang_1": { "cond": true },
"tachr_511_asnipe_1": { "crit": true },
"tachr_1012_skadi2_2": { "cond": true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function WardrobeSkinItem:Render(skin)
self._skinImg.sprite = CS.Torappu.CharacterUtil.LoadCharPortrait(skin.data:GetPortraitId())
CS.Torappu.Lua.Util.SetActiveIfNecessary(self._onSaleObj,WardrobeUtil.CheckSkinOnSale(skin))
self._skinName.text = skin.data.displaySkin.skinName
self._charName.text = CS.Torappu.CharacterUtil.GetCharAppellation(skin.data.charId)
self._brandName.text = CS.Torappu.DataConvertUtil.GetSkinBrandCapitalName(skin.data.displaySkin.skinGroupId)
if (skin.data.displaySkin.displayTagId ~= nil) then
CS.Torappu.Lua.Util.SetActiveIfNecessary(self._tagItem,true)
self._tagText.text = skin.data.displaySkin.displayTagId
Expand Down
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 = "V018",
CUR_FUNC_VER = "V019",
}


Expand Down
Loading

0 comments on commit 4ed6dfe

Please sign in to comment.