Skip to content

Commit

Permalink
Fix supplementalDamage calc (#351)
Browse files Browse the repository at this point in the history
When other than OugiDamage, supplementalDamage is not affected by damageUP.
  • Loading branch information
エッケザックス authored Sep 30, 2019
1 parent 59bf41b commit 37106d3
Showing 1 changed file with 12 additions and 12 deletions.
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

0 comments on commit 37106d3

Please sign in to comment.