-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add supplemental damage buff + Add Covenant skills + Limit Hollowsky ( 1 per grid) #233
Conversation
Add fields to save data.
How about "buffsCount" and "enemyDebuffsCount" ?
|
General logic sounds nice 👍 |
|
@h-yasha - [ ] Supplemental damage logic based on: https://gbf.wiki/Supplemental_Damage
- [ ] Added Covenant Skills (Akasha/Hollowsky skill 2)
- [x] Limit Hollowsky per combination based on #222
- [ ] Added a new field for Arms that only appears on specific skill for extra input.
(currently only for Victorious Covenant and Calamitous Covenant)
- [ ] Changed expectedTurn being Infinity "solution",
doing calculations with Infinity introduces an unwanted 'overhead'. |
this is they currently just 'thrown' in Djeeta. buff
These fields value are loaded from through Arm (skillxDetail) currently. and they do load fine after save/load (did not check backward compatibility) |
@h-yasha |
|
self reply. |
Edit: hmm ... it needed to set two similar and different info. |
Separate filter and damage calculation.// filtering only, type specific code should be here
if (!types.includes(supplemental.type))
continue;
if (supplemental.type == "hp_based") {
if (!("threshold" in supplemental)) {
console.error("Missing HP threshold in: " + supplemental);
continue;
}
if (remainHP < supplemental.threshold) {
continue;
}
}
// calc damage only, either if/else or switch/default
if (supplemental.type === "third_hit") {
if (expectedTurn === Infinity) {
expectedTurn = 1;
}
vals[0] += supplemental.damage;
vals[1] += supplemental.damage * expectedTurn;
} else {
vals[0] += supplemental.damage;
vals[1] += supplemental.damageWithoutCritical;
vals[2] += supplemental.ougiDamage;
vals[3] += supplemental.chainBurst;
}
|
@h-yasha switch (type) {
case A: // fall through
case B: // fall through
case C: break;
} the relation is B include C ... mean B is extended of C If there are many types added in future, then fall through approach will break soon. when others want to add something B specific code. switch (type) {
case A: // fall through
case B:
if (type == B) { /* do not want to effect to A case */ }
// fall through
case C:
break;
} so I think the solution is use "else" of if/else or default case of switch. |
switch (type) {
case A: // fall through to C
case B: // fall through to C
case C: break;
} Reader can notice B should not have type specific code. other idea is: switch (supplemental.type) {
case "third_hit": break;
case "hp_based": // fall through to default
default: break;
}
|
I will make PR. it's hard to explain with my English. |
This patch contains various sub topics Each topics are explained in MotocalDevelopers/pull/233 - supplemental.js - calcSupplementalDamage - rearrange cases in switch - minor coding style fix (as adviced by Prettier) - NOTE: FALLTHROUGH indent level - drop tableHeader function - and remove the translate.js dependency - supplemental.test.js - drop tableHeader test - test only keys data for checking isAvailable works - result.js - move a lot font-size styles to the parent element. - using arrow function - using supplementalDamageArray's key as list key - FIXME: now {value} replace logic is hard coded
just note, naming a bit conflict
if anyone had better rename idea, rename this to avoid |
Remove supplemental.js module dependency
@h-yasha
Update summary #233 (comment) |
(I got a bit busy, nonetheless)
|
- Add comment for empty fields (that are supposed to be empty)
ok, as it replaced with {value}, plain name I worried was mislead of the supplemental/additional, |
I went for let djeetaBuffCount = Math.min(10, totals['Djeeta']['buffCount']);
let value = Math.ceil(djeetaBuffCount * 3000 * (1 + damageUP));
supplementalDamageArray["凱歌の誓約"] = {
damage: value,
damageWithoutCritical: value,
ougiDamage: value,
chainBurst: value,
type: "djeeta_buff_based",
extraValue: djeetaBuffCount,
} |
与ダメ上昇&虚空武器第2スキル実装のレビュー完了です。 制限は以下の通り
Update: 全員共通 → 杖・琴キャラのみなので、表現を訂正 |
if this is reference to Victorious Covenant
It is based on MC number of buffs for everyone. |
@h-yasha Yes. it's just explain the current implementation |
@h-yasha I got your point, Yes I should not say "everyone" that only stuff, harp allies |
(currently only for Victorious Covenant and Calamitous Covenant)
doing calculations with Infinity introduces an unwanted 'overhead'.
Uncompleted/extra details:
Update: (missed): translate 'debuff resistance' in results table
Update 2: Supplemental Damage now is calculated in Graph too