Misc bugfix

Fix bug with skillpoints and negative set bonus
Add final multiplier for echo
This commit is contained in:
hppeng 2023-03-13 08:09:03 -07:00
parent 9e72e44ffe
commit b14cde01c5
4 changed files with 50 additions and 11 deletions

File diff suppressed because one or more lines are too long

View file

@ -7906,7 +7906,6 @@ const atrees = {
"desc": "After leaving Vanish, summon 3 Clones that will follow you and protect you (15s Cooldown). When hit, gain a chance to take 80% less damage and lose 1 Clone.",
"archetype": "Trickster",
"archetype_req": 2,
"base_abil": "Dash",
"parents": [
"Sticky Bomb"
],
@ -8545,7 +8544,7 @@ const atrees = {
"desc": "Your Clones will mimic your spells and abilities. While they are active, deal -60% damage.",
"archetype": "Trickster",
"archetype_req": 6,
"base_abil": "Dash",
"base_abil": "Mirror Image",
"parents": [
"Sandbagging",
"Shurikens"
@ -8581,6 +8580,22 @@ const atrees = {
"behavior": "modify",
"target_part": "Slash Damage",
"multipliers": [ 690, 0, 0, 110, 0, 0 ]
},
{
"type": "stat_scaling",
"slider": true,
"slider_name": "Spell Copies",
"slider_step": 1,
"slider_max": 3,
"output": [
{
"type": "stat",
"name": "damMult.EchoCast"
}
],
"scaling": [
100
]
}
]
},
@ -9123,7 +9138,7 @@ const atrees = {
"desc": "Improve your damage while your Clones are active by +15%",
"archetype": "Trickster",
"archetype_req": 7,
"base_abil": "Dash",
"base_abil": "Mirror Image",
"parents": [
"Cheaper Smoke Bomb 2",
"Blade Fury"
@ -9222,7 +9237,7 @@ const atrees = {
"desc": "Summon +3 additional Clones. (+15s Cooldown)",
"archetype": "Trickster",
"archetype_req": 8,
"base_abil": "Dash",
"base_abil": "Mirror Image",
"parents": [
"Cheaper Smoke Bomb 2"
],
@ -9237,7 +9252,14 @@ const atrees = {
"icon": "node_2"
},
"properties": {},
"effects": []
"effects": [
{
"type": "stat_scaling",
"slider": true,
"slider_name": "Spell Copies",
"slider_max": 3
}
]
},
{
"display_name": "Diversion",

File diff suppressed because one or more lines are too long

View file

@ -240,15 +240,31 @@ function construct_scc_graph(items_to_consider) {
parents: [],
};
for (const item of items_to_consider) {
nodes.push({item: item, children: [terminal_node], parents: [root_node]});
const set_neg = [false, false, false, false, false];
const set_pos = [false, false, false, false, false];
const set_name = item.set;
if (set_name) {
const bonuses = sets.get(set_name).bonuses;
for (const bonus of bonuses) {
for (const i in skp_order) {
if (bonus[skp_order[i]] > 0) { set_pos[i] = true; }
if (bonus[skp_order[i]] < 0) { set_neg[i] = true; }
}
}
}
nodes.push({item: item, children: [terminal_node], parents: [root_node], set_pos: set_pos, set_neg: set_neg});
}
// Dependency graph construction.
for (const node_a of nodes) {
const {item: a, children: a_children} = node_a;
const {item: a, children: a_children, set_pos: a_set_pos} = node_a;
for (const node_b of nodes) {
const {item: b, parents: b_parents} = node_b;
const {item: b, parents: b_parents, set_neg: b_set_neg} = node_b;
const setName = b.set;
for (let i = 0; i < 5; ++i) {
if (a.skillpoints[i] > 0 && (a.reqs[i] < b.reqs[i] || b.skillpoints[i] < 0)) {
if ((a.skillpoints[i] > 0 || a_set_pos[i] > 0)
&& (a.reqs[i] < b.reqs[i] || b.skillpoints[i] < 0 || b_set_neg[i] < 0)) {
a_children.push(node_b);
b_parents.push(node_a);
break;
@ -259,3 +275,4 @@ function construct_scc_graph(items_to_consider) {
const sccs = make_SCC_graph(root_node, nodes);
return [root_node, terminal_node, sccs];
}