Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix supplementalDamage calc #351

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/global_logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -835,21 +835,21 @@ module.exports.calcBasedOneSummon = function (summonind, prof, buff, totals) {
Math.max(
totals[key]["supplementalDamageBuff"],
buff["supplementalDamageBuff"]
) * (1.0 + damageUP) * (1.0 - enemyResistance)
) * (1.0 - enemyResistance)
);

if (supplementalDamageBuff > 0) {
supplementalDamageArray["バフ"] = {
damage: supplementalDamageBuff,
damageWithoutCritical: supplementalDamageBuff,
ougiDamage: supplementalDamageBuff,
ougiDamage: supplementalDamageBuff * (1.0 + damageUP),
chainBurst: supplementalDamageBuff,
type: "other",
};
}
if (totals[key]["supplementalThirdHit"].length > 0) {
for (let key2 in totals[key]["supplementalThirdHit"]) {
let value = Math.ceil(taRate * totals[key]["supplementalThirdHit"][key2].value * (1.0 + damageUP) * (1.0 - enemyResistance));
let value = Math.ceil(taRate * totals[key]["supplementalThirdHit"][key2].value * (1.0 - enemyResistance));
supplementalDamageArray[totals[key]["supplementalThirdHit"][key2].source] = {
damage: value,
type: "third_hit",
Expand All @@ -858,51 +858,51 @@ module.exports.calcBasedOneSummon = function (summonind, prof, buff, totals) {
}
}
if (totals[key]['covenant'] === "impervious") {
let value = Math.ceil(30000 * (1.0 + damageUP) * (1.0 - enemyResistance));
let value = Math.ceil(30000 * (1.0 - enemyResistance));
supplementalDamageArray["不壊の誓約"] = {
damage: value,
damageWithoutCritical: value,
ougiDamage: value,
ougiDamage: value * (1.0 + damageUP),
chainBurst: value,
threshold: 0.80,
type: "hp_based",
//extraValue: totals[key].remainHP,
};
} else if (totals[key]['covenant'] === 'victorious' && totals['Djeeta']['buffCount'] > 0) {
let djeetaBuffCount = Math.min(10, totals['Djeeta']['buffCount']);
let value = Math.ceil(djeetaBuffCount * 3000 * (1.0 + damageUP) * (1.0 - enemyResistance));
let value = Math.ceil(djeetaBuffCount * 3000 * (1.0 - enemyResistance));
supplementalDamageArray["凱歌の誓約"] = {
damage: value,
damageWithoutCritical: value,
ougiDamage: value,
ougiDamage: value * (1.0 + damageUP),
chainBurst: value,
type: "djeeta_buff_based",
extraValue: djeetaBuffCount,
};
} else if (totals[key]['covenant'] === 'contentious' && taRate > 0) {
let value = Math.ceil(taRate * 100000 * (1.0 + damageUP) * (1.0 - enemyResistance));
let value = Math.ceil(taRate * 100000 * (1.0 - enemyResistance));
supplementalDamageArray["修羅の誓約"] = {
damage: value,
type: "third_hit",
//extraValue: taRate,
};
} else if (totals[key]['covenant'] === 'deleterious' && Object.keys(criticalArray).length > 0) {
let value = Math.ceil(critRate * 30000 * (1.0 + damageUP) * (1.0 - enemyResistance));
let value = Math.ceil(critRate * 30000 * (1.0 - enemyResistance));
supplementalDamageArray["致命の誓約"] = {
damage: value,
damageWithoutCritical: 0,
ougiDamage: value,
ougiDamage: value * (1.0 + damageUP),
chainBurst: 0,
type: "on_critical",
extraValue: (100 * critRate).toFixed(2),
};
} else if (totals[key]['covenant'] === 'calamitous') {
let enemyDebuffCount = Math.min(10, buff['enemyDebuffCount']);
let value = Math.ceil(enemyDebuffCount * 3000 * (1.0 + damageUP) * (1.0 - enemyResistance));
let value = Math.ceil(enemyDebuffCount * 3000 * (1.0 - enemyResistance));
supplementalDamageArray["災禍の誓約"] = {
damage: value,
damageWithoutCritical: value,
ougiDamage: value,
ougiDamage: value * (1.0 + damageUP),
chainBurst: value,
type: "boss_debuff_based",
extraValue: enemyDebuffCount,
Expand Down