Skip to content

Commit

Permalink
Dec 16 201216 dpsv2 test version
Browse files Browse the repository at this point in the history
  • Loading branch information
xulai1001 committed Dec 16, 2020
1 parent 531d1df commit d3b47c7
Show file tree
Hide file tree
Showing 224 changed files with 7,335 additions and 3,688 deletions.
524 changes: 524 additions & 0 deletions _docs/dpsv2.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions _docs/dpsv2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: DPSv2(测试)
withjs: true
order: 1
category: 工具
icon: calculator
---
<span id="vue_version">正在载入游戏数据,请耐心等待……</span>
<button id="btn_update_data" type="button" class="btn btn-primary" onclick="AKDATA.reload();">清除缓存</button>

6 changes: 3 additions & 3 deletions _docs/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ function buildArgs(info, enemy, raidBuff, key) {
};
info.options.forEach(x => { char_obj.options[x] = true; });
let enemy_obj = {
def: parseFloat(enemy.def),
magicResistance: parseFloat(enemy.magicResistance),
count: parseFloat(enemy.count)
def: parseFloat(enemy.def) || 0,
magicResistance: parseFloat(enemy.magicResistance) || 0 ,
count: parseFloat(enemy.count) || 1
};
Object.keys(raidBuff).forEach(k => { raidBuff[k] = parseFloat(raidBuff[k]); });
return {
Expand Down
49 changes: 39 additions & 10 deletions _docs/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let ua = navigator.userAgent;
document.getElementById("user_agent").innerText = ua;

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

let vue_app = new Vue({
el: "#vue",
Expand All @@ -18,7 +18,7 @@ function init() {
'excel/char_patch_table.json',
'excel/skill_table.json',
'../version.json',
'../customdata/dps_specialtags.json',
'../customdata/dps_specialtags_v2.json',
'../customdata/dps_options.json',
'../resources/dps_actions.js',
'../resources/dpsv2.js',
Expand All @@ -28,23 +28,52 @@ function init() {

function load() {
AKDATA.patchAllChars();
test_dps();
test_dps_all();
//find_skills(x => x.indexOf("instant") >= 0);
}

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

function card(title, str) {
return `
<div class="card col-3">
<div class="card-header">
<div class="card-title mb-0">${title}</div>
</div>
${str}
</div>`;
}

// dpsv2 test
function test_dps() {
var charId = "char_185_frncat";
var skillId = 'skchr_frncat_2';
var ch = "char_126_shotst";
var sk = 'skchr_shotst_1';
var options = { cond: true };
var dps = new AKDATA.Dps.DpsCalculator();
dps.calculateDps({ charId, skillId });
var char = { charId: ch, skillId: sk, options };
var enemy = { def: 200, magicResistance: 20, count: 1 };
vue_app.content = "";
console.log (`-- ${ch} - ${sk}`);
dps.calculateDps(char, enemy);
vue_app.content += card(`${ch} - ${sk}`, "<pre>" + JSON.stringify(dps.summary, null, 2) + "</pre>");
}

vue_app.content = `<pre>
${JSON.stringify(dps.summary, null, 2)}
</pre>`;
console.log(dps);
function test_dps_all() {
vue_app.content = "";
Object.keys(AKDATA.Data.character_table).forEach(ch => {
var charData = AKDATA.Data.character_table[ch];
charData.skills.map(x => x.skillId).forEach(sk => {
var options = { cond: true };
var char = { charId: ch, skillId: sk, options };
var enemy = { def: 200, magicResistance: 20, count: 1 };
var dps = new AKDATA.Dps.DpsCalculator();
if (ch.startsWith("char")) {
console.log (`-- ${ch} - ${sk}`);
dps.calculateDps(char, enemy);
vue_app.content += card(`${ch} - ${sk}`, "<pre>" + JSON.stringify(dps.summary, null, 2) + "</pre>");
}
});
});
}

function find_skills(filter) {
Expand Down
3 changes: 1 addition & 2 deletions _docs/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ icon: bug

jQuery: <span id="jquery">Error</span>

<div id="vue">
</div>
<div id="vue"></div>

如果不能正常显示,您可以换个浏览器试试。

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
---
## 20.12.16
- [dpsv2] v2测试版页面开放
- [issue] 已知问题:原版计算中,多数额外伤害没有计算damage_scale
- [gamedata] 更新游戏数据,增加了角色头像

## 20.12.02
- [dpsv2] 阶段性进展
- [bugfix] 灼地等每秒计算的技能在叠加攻速团辅时应该仍然以1秒间隔计算
Expand Down
4 changes: 2 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<div class="l-header__body">
<div class="l-header__logo">
<a href="{{ gameHome | default: "/" | relative_url }}">
<img src="{{ site.logo | relative_url }}" alt="{{ site.logo }}">
<img src="/akdata/logo.png">
<div style="width:30%; float:left"><img src="{{ site.logo | relative_url }}" alt="{{ site.logo }}"></div>
<div style="width:70%; float:left;"><img src="/akdata/logo.png" style="width:100%; margin-top: 5px;"></div>
</a>
</div>
<div class="l-header__left">
Expand Down
9 changes: 6 additions & 3 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

<div class="l-main__body">
<div class="l-page">
<div class="l-page__header">
<div class="l-page__header form-inline">
<h1 class="l-page__title">
<a href="{{page.url | relative_url }}">{{ page.title}}</a>
</h1>
<hr>
<div class="l-content ml-4" style="margin-top: 16px">
{{ content }}
</div>
</div>
<hr style="width:100%; color: rgba(0, 0, 0, 0.3)" class="m-0">
<div class="l-page__body">
<div class="l-content">{{ content }}</div>

<div class="l-dynamic"></div>
</div>
<div class="l-page__footer">
Expand Down
3 changes: 3 additions & 0 deletions _sass/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ table.table td {
.p-page__control {
margin-bottom:1em;
}
.p {
margin-bottom: 0.5em;
}

.c-infotable {
/*
Expand Down
2 changes: 1 addition & 1 deletion _sass/layout/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

&__logo {
height: 100%;
width: 300px;
width: 250px;
align-items: center;
display: flex;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion _sass/layout/_sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.l-layout__sidebar {
flex: 0 0 300px;
flex: 0 0 250px;
background: $side-background-color;
box-shadow: inset -1px 0 0 $layout-border-color;

Expand Down
Binary file added assets/images/char/char_002_amiya.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_009_12fce.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_010_chen.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_017_huang.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_1001_amiya2.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_101_sora.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_102_texas.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_103_angel.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_106_franka.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_107_liskam.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_108_silent.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_109_fmout.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_110_deepcl.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_112_siege.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_113_cqbw.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_115_headbr.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_117_myrrh.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_118_yuki.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_120_hibisc.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_121_lava.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_122_beagle.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_123_fang.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_124_kroos.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_126_shotst.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_127_estell.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_128_plosis.png
Binary file added assets/images/char/char_129_bluep.png
Binary file added assets/images/char/char_130_doberm.png
Binary file added assets/images/char/char_131_flameb.png
Binary file added assets/images/char/char_133_mm.png
Binary file added assets/images/char/char_134_ifrit.png
Binary file added assets/images/char/char_136_hsguma.png
Binary file added assets/images/char/char_137_brownb.png
Binary file added assets/images/char/char_140_whitew.png
Binary file added assets/images/char/char_141_nights.png
Binary file added assets/images/char/char_143_ghost.png
Binary file added assets/images/char/char_144_red.png
Binary file added assets/images/char/char_145_prove.png
Binary file added assets/images/char/char_147_shining.png
Binary file added assets/images/char/char_148_nearl.png
Binary file added assets/images/char/char_149_scave.png
Binary file added assets/images/char/char_150_snakek.png
Binary file added assets/images/char/char_151_myrtle.png
Binary file added assets/images/char/char_155_tiger.png
Binary file added assets/images/char/char_158_milu.png
Binary file added assets/images/char/char_159_peacok.png
Binary file added assets/images/char/char_163_hpsts.png
Binary file added assets/images/char/char_164_nightm.png
Binary file added assets/images/char/char_166_skfire.png
Binary file added assets/images/char/char_171_bldsk.png
Binary file added assets/images/char/char_172_svrash.png
Binary file added assets/images/char/char_173_slchan.png
Binary file added assets/images/char/char_174_slbell.png
Binary file added assets/images/char/char_179_cgbird.png
Binary file added assets/images/char/char_180_amgoat.png
Binary file added assets/images/char/char_181_flower.png
Binary file added assets/images/char/char_183_skgoat.png
Binary file added assets/images/char/char_185_frncat.png
Binary file added assets/images/char/char_187_ccheal.png
Binary file added assets/images/char/char_188_helage.png
Binary file added assets/images/char/char_190_clour.png
Binary file added assets/images/char/char_192_falco.png
Binary file added assets/images/char/char_193_frostl.png
Binary file added assets/images/char/char_195_glassb.png
Binary file added assets/images/char/char_196_sunbr.png
Binary file added assets/images/char/char_197_poca.png
Binary file added assets/images/char/char_198_blackd.png
Binary file added assets/images/char/char_199_yak.png
Binary file added assets/images/char/char_2013_cerber.png
Binary file added assets/images/char/char_2014_nian.png
Binary file added assets/images/char/char_201_moeshd.png
Binary file added assets/images/char/char_202_demkni.png
Binary file added assets/images/char/char_204_platnm.png
Binary file added assets/images/char/char_208_melan.png
Binary file added assets/images/char/char_209_ardign.png
Binary file added assets/images/char/char_210_stward.png
Binary file added assets/images/char/char_211_adnach.png
Binary file added assets/images/char/char_212_ansel.png
Binary file added assets/images/char/char_213_mostma.png
Binary file added assets/images/char/char_215_mantic.png
Binary file added assets/images/char/char_218_cuttle.png
Binary file added assets/images/char/char_219_meteo.png
Binary file added assets/images/char/char_220_grani.png
Binary file added assets/images/char/char_222_bpipe.png
Binary file added assets/images/char/char_225_haak.png
Binary file added assets/images/char/char_226_hmau.png
Binary file added assets/images/char/char_230_savage.png
Binary file added assets/images/char/char_235_jesica.png
Binary file added assets/images/char/char_236_rope.png
Binary file added assets/images/char/char_237_gravel.png
Binary file added assets/images/char/char_240_wyvern.png
Binary file added assets/images/char/char_241_panda.png
Binary file added assets/images/char/char_242_otter.png
Binary file added assets/images/char/char_243_waaifu.png
Binary file added assets/images/char/char_248_mgllan.png
Binary file added assets/images/char/char_250_phatom.png
Binary file added assets/images/char/char_252_bibeak.png
Binary file added assets/images/char/char_253_greyy.png
Binary file added assets/images/char/char_254_vodfox.png
Binary file added assets/images/char/char_258_podego.png
Binary file added assets/images/char/char_260_durnar.png
Binary file added assets/images/char/char_261_sddrag.png
Binary file added assets/images/char/char_263_skadi.png
Binary file added assets/images/char/char_265_sophia.png
Binary file added assets/images/char/char_271_spikes.png
Binary file added assets/images/char/char_272_strong.png
Binary file added assets/images/char/char_274_astesi.png
Binary file added assets/images/char/char_275_breeze.png
Binary file added assets/images/char/char_277_sqrrel.png
Binary file added assets/images/char/char_278_orchid.png
Binary file added assets/images/char/char_279_excu.png
Binary file added assets/images/char/char_281_popka.png
Binary file added assets/images/char/char_282_catap.png
Binary file added assets/images/char/char_283_midn.png
Binary file added assets/images/char/char_284_spot.png
Binary file added assets/images/char/char_285_medic2.png
Binary file added assets/images/char/char_286_cast3.png
Binary file added assets/images/char/char_289_gyuki.png
Binary file added assets/images/char/char_290_vigna.png
Binary file added assets/images/char/char_291_aglina.png
Binary file added assets/images/char/char_293_thorns.png
Binary file added assets/images/char/char_294_ayer.png
Binary file added assets/images/char/char_298_susuro.png
Binary file added assets/images/char/char_301_cutter.png
Binary file added assets/images/char/char_302_glaze.png
Binary file added assets/images/char/char_306_leizi.png
Binary file added assets/images/char/char_308_swire.png
Binary file added assets/images/char/char_311_mudrok.png
Binary file added assets/images/char/char_325_bison.png
Binary file added assets/images/char/char_326_glacus.png
Binary file added assets/images/char/char_328_cammou.png
Binary file added assets/images/char/char_333_sidero.png
Binary file added assets/images/char/char_336_folivo.png
Binary file added assets/images/char/char_337_utage.png
Binary file added assets/images/char/char_340_shwaz.png
Binary file added assets/images/char/char_343_tknogi.png
Binary file added assets/images/char/char_344_beewax.png
Binary file added assets/images/char/char_345_folnic.png
Binary file added assets/images/char/char_346_aosta.png
Binary file added assets/images/char/char_347_jaksel.png
Binary file added assets/images/char/char_348_ceylon.png
Binary file added assets/images/char/char_349_chiave.png
Binary file added assets/images/char/char_350_surtr.png
Binary file added assets/images/char/char_355_ethan.png
Binary file added assets/images/char/char_356_broca.png
Binary file added assets/images/char/char_358_lisa.png
Binary file added assets/images/char/char_365_aprl.png
Binary file added assets/images/char/char_366_acdrop.png
Binary file added assets/images/char/char_367_swllow.png
Binary file added assets/images/char/char_373_lionhd.png
Binary file added assets/images/char/char_376_therex.png
Binary file added assets/images/char/char_378_asbest.png
Binary file added assets/images/char/char_379_sesa.png
Binary file added assets/images/char/char_381_bubble.png
Binary file added assets/images/char/char_383_snsant.png
Binary file added assets/images/char/char_385_finlpp.png
Binary file added assets/images/char/char_388_mint.png
Binary file added assets/images/char/char_391_rosmon.png
Binary file added assets/images/char/char_400_weedy.png
Binary file added assets/images/char/char_401_elysm.png
Binary file added assets/images/char/char_405_absin.png
Binary file added assets/images/char/char_411_tomimi.png
Binary file added assets/images/char/char_415_flint.png
Binary file added assets/images/char/char_416_zumama.png
Binary file added assets/images/char/char_423_blemsh.png
Binary file added assets/images/char/char_436_whispr.png
Binary file added assets/images/char/char_500_noirc.png
Binary file added assets/images/char/char_501_durin.png
Binary file added assets/images/char/char_502_nblade.png
Binary file added assets/images/char/char_503_rang.png
Binary file added assets/images/char/char_505_rcast.png
Binary file added assets/images/char/char_506_rmedic.png
Binary file added assets/images/char/char_507_rsnipe.png
Binary file added assets/images/char/char_508_aguard.png
Binary file added assets/images/char/char_509_acast.png
Binary file added assets/images/char/char_510_amedic.png
Binary file added assets/images/char/char_511_asnipe.png
Binary file added assets/images/char/token_10000_silent_healrb.png
Binary file added assets/images/char/token_10003_cgbird_bird.png
Binary file added assets/images/char/token_10005_mgllan_drone1.png
Binary file added assets/images/char/token_10005_mgllan_drone2.png
Binary file added assets/images/char/token_10005_mgllan_drone3.png
Binary file added assets/images/char/token_10007_phatom_twin.png
Binary file added assets/images/char/token_10008_cqbw_box.png
Binary file added assets/images/char/token_10010_folivo_car.png
Binary file added assets/images/char/token_10011_beewax_oblisk.png
Binary file added assets/images/char/trap_001_crate.png
Binary file added assets/images/char/trap_007_ballis.png
34 changes: 34 additions & 0 deletions assets/images/pic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#encoding: utf-8
import json, urllib.request, os, sys, time

gamedata_path = "../../resources/gamedata/excel"
f = open(gamedata_path + "/character_table.json", "r", encoding="utf-8")
chardb = json.load(f)
names = list(chardb.keys())
names.append("char_1001_amiya2");

total = len(names)
success = 0
skip = 0
error = 0

for ch in names:
filename = "char/%s.png" % ch
url = "https://andata.somedata.top/dataX/char/profile/%s.png" % ch
sys.stdout.write("%s ..." % ch)
if (os.path.exists(filename)):
print("skipped")
skip+=1
else:
try:
img = urllib.request.urlopen(url).read()
with open(filename, "wb") as fi:
fi.write(img)
print("ok")
success+=1
except urllib.error.HTTPError as e:
print(e)
error+=1
time.sleep(0.5)
print("total %d, success %d, skip %d, error %d" % (total, success, skip, error))

3 changes: 3 additions & 0 deletions debug.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[1030/160423.466:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳ�Ҳ���ָ����·���� (0x3)
[1102/001739.474:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳ�Ҳ���ָ����·���� (0x3)
[1114/011731.961:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳ�Ҳ���ָ����·���� (0x3)
[1203/010732.491:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳ�Ҳ���ָ����·���� (0x3)
[1208/212419.094:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳ�Ҳ���ָ����·���� (0x3)
[1215/130220.202:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳ�Ҳ���ָ����·���� (0x3)
Binary file modified logo.png
15 changes: 14 additions & 1 deletion resources/akdata.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,18 @@
}

.table th {
font-weight: 400;
font-weight: 600;
}
.card-header {
padding: 0.5rem 1.5rem!important;
}
.card-title {
font-weight: 600!important;
}
.card-body {
padding: 1rem 1.875rem!important;
}

h5 {
font-weight: 600!important;
}
2 changes: 1 addition & 1 deletion resources/akdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const useCache = true;
const cacheBeginTime = new Date(2019, 12, 10).getTime();

window.AKDATA = {
akdata: "201119", // jsdelivr tag version
akdata: "201216", // jsdelivr tag version

Data: {},

Expand Down
13 changes: 7 additions & 6 deletions resources/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class NoLog {
}

// 天赋/技能名字cache
displayNames = {};
var displayNames = {};

function calculateDps(char, enemy, raidBuff) {
let log = new Log();
Expand Down Expand Up @@ -143,9 +143,9 @@ function calculateDps(char, enemy, raidBuff) {
let normalAttack = calculateAttack(attr, enemy, raidBlackboard, false, charData, levelData, log);
if (!normalAttack) return;

globalDps = Math.round((normalAttack.totalDamage + skillAttack.totalDamage) /
var globalDps = Math.round((normalAttack.totalDamage + skillAttack.totalDamage) /
(normalAttack.dur.duration + normalAttack.dur.stunDuration + skillAttack.dur.duration + skillAttack.dur.prepDuration));
globalHps = Math.round((normalAttack.totalHeal + skillAttack.totalHeal) /
var globalHps = Math.round((normalAttack.totalHeal + skillAttack.totalHeal) /
(normalAttack.dur.duration + normalAttack.dur.stunDuration + skillAttack.dur.duration + skillAttack.dur.prepDuration));
//console.log(globalDps, globalHps);
let killTime = 0;
Expand Down Expand Up @@ -871,6 +871,7 @@ function applyBuff(charAttr, buffFrm, tag, blackbd, isSkill, isCrit, log, enemy)
} else if (skillId == "skchr_sophia_2") {
blackboard.def *= ts;
blackboard.attack_speed *= ts;
blackboard.max_target = basic.blockCnt;
writeBuff("2技能 - 自身享受全部增益");
}
} else {
Expand Down Expand Up @@ -1272,7 +1273,7 @@ function calcDurations(isSkill, attackTime, attackSpeed, levelData, buffList, bu
case 1: // 普通,前面已经算过一遍了,这里只特判
let sp_rate = 1 + buffFrame.spRecoveryPerSec;
if (buffList["tachr_002_amiya_1"]) { // 情绪吸收
attackCount = Math.ceil((spData.spCost - stunDuration) / (buffList["tachr_002_amiya_1"]["amiya_t_1[atk].sp"] + attackTime*sp_rate));
attackCount = Math.ceil((spData.spCost - stunDuration*sp_rate) / (buffList["tachr_002_amiya_1"]["amiya_t_1[atk].sp"] + attackTime*sp_rate));
log.write(`[特殊] ${displayNames["tachr_002_amiya_1"]}: attack sp = ${attackCount * buffList["tachr_002_amiya_1"]["amiya_t_1[atk].sp"]}`);
duration = attackCount * attackTime;
} else if (buffList["tachr_134_ifrit_2"]) { // [莱茵回路]. 需要解出攻击次数
Expand Down Expand Up @@ -1486,7 +1487,7 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
if (isSkill && blackboard.id == "skchr_platnm_2") { // 白金
let rate = (attackTime - 1) / (buffList["tachr_204_platnm_1"]["attack@max_delta"] - 1);
// 熔断
rate = Math.min(Math.max(rate, 0), buffList["tachr_204_platnm_1"]["attack@max_delta"]);
rate = Math.min(Math.max(rate, 0), 1);
buffFrame.atk_scale = 1 + rate * (buffList["tachr_204_platnm_1"]["attack@max_atk_scale"] - 1);
finalFrame = getBuffedAttributes(basicFrame, buffFrame); // 重算
log.write(`[特殊] ${displayNames["tachr_204_platnm_1"]}: atk_scale = ${buffFrame.atk_scale.toFixed(3)} (${(rate*100).toFixed(1)}%蓄力)`);
Expand Down Expand Up @@ -1680,7 +1681,7 @@ function calculateAttack(charAttr, enemy, raidBlackboard, isSkill, charData, lev
switch (buffName) {
// 伤害
case "skchr_ethan_1":
pool[1] += bb["attack@poison_damage"] * dur.duration * (1-emrpct);
pool[1] += bb["attack@poison_damage"] * dur.duration * (1-emrpct) * ecount;
break;
case "skchr_aglina_2":
case "skchr_aglina_3":
Expand Down
2 changes: 1 addition & 1 deletion resources/customdata/dps_specialtags.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,4 @@
"tachr_436_whispr_1": { "cond": true },
"tachr_503_rang_1": { "cond": true },
"tachr_511_asnipe_1": { "crit": true }
}
}
Loading

0 comments on commit d3b47c7

Please sign in to comment.