Merge branch 'atree' into misc-bugfix
This commit is contained in:
commit
250627f9a9
4 changed files with 156 additions and 33 deletions
|
@ -673,9 +673,11 @@ const atree_make_interactives = new (class extends ComputeNode {
|
||||||
if (effect['type'] === "stat_scaling" && effect['slider'] === true) {
|
if (effect['type'] === "stat_scaling" && effect['slider'] === true) {
|
||||||
const { slider_name, slider_behavior = 'merge', slider_max, slider_step } = effect;
|
const { slider_name, slider_behavior = 'merge', slider_max, slider_step } = effect;
|
||||||
if (slider_map.has(slider_name)) {
|
if (slider_map.has(slider_name)) {
|
||||||
|
if (slider_max !== undefined) {
|
||||||
const slider_info = slider_map.get(slider_name);
|
const slider_info = slider_map.get(slider_name);
|
||||||
slider_info.max += slider_max;
|
slider_info.max += slider_max;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (slider_behavior === 'merge') {
|
else if (slider_behavior === 'merge') {
|
||||||
slider_map.set(slider_name, {
|
slider_map.set(slider_name, {
|
||||||
label_name: slider_name,
|
label_name: slider_name,
|
||||||
|
|
|
@ -88,7 +88,6 @@ const atrees = {
|
||||||
"cost": 50,
|
"cost": 50,
|
||||||
"base_spell": 3,
|
"base_spell": 3,
|
||||||
"spell_type": "damage",
|
"spell_type": "damage",
|
||||||
"scaling": "spell",
|
|
||||||
"display": "Total Damage",
|
"display": "Total Damage",
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
|
@ -237,7 +236,6 @@ const atrees = {
|
||||||
"cost": 40,
|
"cost": 40,
|
||||||
"base_spell": 1,
|
"base_spell": 1,
|
||||||
"spell_type": "damage",
|
"spell_type": "damage",
|
||||||
"scaling": "spell",
|
|
||||||
"display": "Total Damage",
|
"display": "Total Damage",
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
|
@ -4586,17 +4584,39 @@ const atrees = {
|
||||||
"archetype": "Riftwalker",
|
"archetype": "Riftwalker",
|
||||||
"archetype_req": 3,
|
"archetype_req": 3,
|
||||||
"parents": ["Wind Slash", "Thunderstorm"],
|
"parents": ["Wind Slash", "Thunderstorm"],
|
||||||
"dependencies": [],
|
"dependencies": ["Ice Snake"],
|
||||||
"blockers": [],
|
"blockers": [],
|
||||||
"cost": 2,
|
"cost": 2,
|
||||||
"display": {
|
"display": {
|
||||||
"row": 15,
|
"row": 15,
|
||||||
"col": 1,
|
"col": 1,
|
||||||
"icon": "node_3",
|
"icon": "node_3"
|
||||||
"__TODO": "hppeng please fix"
|
|
||||||
},
|
},
|
||||||
"properties": { "max": 5 },
|
"properties": { "max": 5 },
|
||||||
"effects": []
|
"effects": [
|
||||||
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"output": {
|
||||||
|
"type": "stat",
|
||||||
|
"name": "nConvBase:4.Ice Snake Damage"
|
||||||
|
},
|
||||||
|
"scaling": [20],
|
||||||
|
"slider_step": 1,
|
||||||
|
"slider_max": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"output": {
|
||||||
|
"type": "stat",
|
||||||
|
"name": "wConvBase:4.Ice Snake Damage"
|
||||||
|
},
|
||||||
|
"scaling": [10]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"display_name": "Ophanim",
|
"display_name": "Ophanim",
|
||||||
|
@ -4735,7 +4755,7 @@ const atrees = {
|
||||||
"archetype": "Riftwalker",
|
"archetype": "Riftwalker",
|
||||||
"archetype_req": 0,
|
"archetype_req": 0,
|
||||||
"parents": ["Cheaper Heal"],
|
"parents": ["Cheaper Heal"],
|
||||||
"dependencies": ["Windsweeper"],
|
"dependencies": ["Windsweeper", "Purification"],
|
||||||
"blockers": [],
|
"blockers": [],
|
||||||
"cost": 2,
|
"cost": 2,
|
||||||
"display": {
|
"display": {
|
||||||
|
@ -4744,8 +4764,32 @@ const atrees = {
|
||||||
"icon": "node_1"
|
"icon": "node_1"
|
||||||
},
|
},
|
||||||
"properties": {},
|
"properties": {},
|
||||||
"effects": [],
|
"effects": [
|
||||||
"__TODO": "I still don't really know how to do this, for the record though the ratio is 20% neutral 20% earth per stack"
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"output": [
|
||||||
|
{
|
||||||
|
"type": "stat",
|
||||||
|
"name": "nConvBase:3.Meteor Damage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat",
|
||||||
|
"name": "eConvBase:3.Meteor Damage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat",
|
||||||
|
"name": "nConvBase:3.Per Orb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat",
|
||||||
|
"name": "eConvBase:3.Per Orb"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"scaling": [15]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"display_name": "Larger Heal",
|
"display_name": "Larger Heal",
|
||||||
|
@ -5028,7 +5072,38 @@ const atrees = {
|
||||||
"icon": "node_2"
|
"icon": "node_2"
|
||||||
},
|
},
|
||||||
"properties": {},
|
"properties": {},
|
||||||
"effects": []
|
"effects": [
|
||||||
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"output": {
|
||||||
|
"type": "stat",
|
||||||
|
"name": "nConvBase:2.Wind Slash"
|
||||||
|
},
|
||||||
|
"scaling": [30]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"output": {
|
||||||
|
"type": "stat",
|
||||||
|
"name": "tConvBase:2.Wind Slash"
|
||||||
|
},
|
||||||
|
"scaling": [10]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"output": {
|
||||||
|
"type": "stat",
|
||||||
|
"name": "aConvBase:2.Wind Slash"
|
||||||
|
},
|
||||||
|
"scaling": [5]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"display_name": "Healthier Ophanim I",
|
"display_name": "Healthier Ophanim I",
|
||||||
|
@ -5204,15 +5279,25 @@ const atrees = {
|
||||||
"icon": "node_0"
|
"icon": "node_0"
|
||||||
},
|
},
|
||||||
"properties": {},
|
"properties": {},
|
||||||
"effects": [{
|
"effects": [
|
||||||
|
{
|
||||||
"type": "raw_stat",
|
"type": "raw_stat",
|
||||||
"bonuses": [{
|
"bonuses": [
|
||||||
|
{
|
||||||
"type": "prop",
|
"type": "prop",
|
||||||
"abil": "Windsweeper",
|
"abil": "Windsweeper",
|
||||||
"name": "max",
|
"name": "max",
|
||||||
"value": 5
|
"value": 5
|
||||||
}]
|
}
|
||||||
}]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"slider_max": 5
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"display_name": "Cheaper Ice Snake II",
|
"display_name": "Cheaper Ice Snake II",
|
||||||
|
@ -5348,8 +5433,8 @@ const atrees = {
|
||||||
"desc": "When sprinting, create an area that increases the speed of all allies the longer they run in it. (Step out or stop running to cancel)",
|
"desc": "When sprinting, create an area that increases the speed of all allies the longer they run in it. (Step out or stop running to cancel)",
|
||||||
"archetype": "Riftwalker",
|
"archetype": "Riftwalker",
|
||||||
"archetype_req": 7,
|
"archetype_req": 7,
|
||||||
"parents": ["Cheaper Ice Snake II", "Explosive Entrance"],
|
"parents": ["Cheaper Ice Snake II"],
|
||||||
"dependencies": ["Ice Snake"],
|
"dependencies": [],
|
||||||
"blockers": [],
|
"blockers": [],
|
||||||
"cost": 2,
|
"cost": 2,
|
||||||
"display": {
|
"display": {
|
||||||
|
@ -5429,7 +5514,25 @@ const atrees = {
|
||||||
"icon": "node_0"
|
"icon": "node_0"
|
||||||
},
|
},
|
||||||
"properties": {},
|
"properties": {},
|
||||||
"effects": []
|
"effects": [
|
||||||
|
{
|
||||||
|
"type": "raw_stat",
|
||||||
|
"bonuses": [
|
||||||
|
{
|
||||||
|
"type": "prop",
|
||||||
|
"abil": "Windsweeper",
|
||||||
|
"name": "max",
|
||||||
|
"value": 5
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "stat_scaling",
|
||||||
|
"slider": true,
|
||||||
|
"slider_name": "Winded",
|
||||||
|
"slider_max": 5
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"display_name": "Dynamic Faith",
|
"display_name": "Dynamic Faith",
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -26,7 +26,7 @@ function get_base_dps(item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function calculateSpellDamage(stats, weapon, conversions, use_spell_damage, ignore_speed=false, part_filter=undefined) {
|
function calculateSpellDamage(stats, weapon, _conversions, use_spell_damage, ignore_speed=false, part_filter=undefined) {
|
||||||
// TODO: Roll all the loops together maybe
|
// TODO: Roll all the loops together maybe
|
||||||
|
|
||||||
// Array of neutral + ewtfa damages. Each entry is a pair (min, max).
|
// Array of neutral + ewtfa damages. Each entry is a pair (min, max).
|
||||||
|
@ -40,7 +40,28 @@ function calculateSpellDamage(stats, weapon, conversions, use_spell_damage, igno
|
||||||
}
|
}
|
||||||
let present = deepcopy(weapon.get(damage_present_key));
|
let present = deepcopy(weapon.get(damage_present_key));
|
||||||
|
|
||||||
|
// Also theres prop and rainbow!!
|
||||||
|
const damage_elements = ['n'].concat(skp_elements); // netwfa
|
||||||
|
|
||||||
// 2. Conversions.
|
// 2. Conversions.
|
||||||
|
// 2.0: First, modify conversions.
|
||||||
|
let conversions = deepcopy(_conversions);
|
||||||
|
if (part_filter !== undefined) {
|
||||||
|
const conv_postfix = ':'+part_filter;
|
||||||
|
for (let i in damage_elements) {
|
||||||
|
const stat_name = damage_elements[i]+'ConvBase'+conv_postfix;
|
||||||
|
if (stats.has(stat_name)) {
|
||||||
|
conversions[i] += stats.get(stat_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i in damage_elements) {
|
||||||
|
const stat_name = damage_elements[i]+'ConvBase';
|
||||||
|
if (stats.has(stat_name)) {
|
||||||
|
conversions[i] += stats.get(stat_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 2.1. First, apply neutral conversion (scale weapon damage). Keep track of total weapon damage here.
|
// 2.1. First, apply neutral conversion (scale weapon damage). Keep track of total weapon damage here.
|
||||||
let damages = [];
|
let damages = [];
|
||||||
const neutral_convert = conversions[0] / 100;
|
const neutral_convert = conversions[0] / 100;
|
||||||
|
@ -68,9 +89,6 @@ function calculateSpellDamage(stats, weapon, conversions, use_spell_damage, igno
|
||||||
}
|
}
|
||||||
total_convert += conversions[0]/100;
|
total_convert += conversions[0]/100;
|
||||||
|
|
||||||
// Also theres prop and rainbow!!
|
|
||||||
const damage_elements = ['n'].concat(skp_elements); // netwfa
|
|
||||||
|
|
||||||
if (!ignore_speed) {
|
if (!ignore_speed) {
|
||||||
// 3. Apply attack speed multiplier. Ignored for melee single hit
|
// 3. Apply attack speed multiplier. Ignored for melee single hit
|
||||||
const attack_speed_mult = baseDamageMultiplier[attackSpeeds.indexOf(weapon.get("atkSpd"))];
|
const attack_speed_mult = baseDamageMultiplier[attackSpeeds.indexOf(weapon.get("atkSpd"))];
|
||||||
|
@ -81,7 +99,7 @@ function calculateSpellDamage(stats, weapon, conversions, use_spell_damage, igno
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Add additive damage. TODO: Is there separate additive damage?
|
// 4. Add additive damage. TODO: Is there separate additive damage?
|
||||||
for (let i = 0; i < 6; ++i) {
|
for (let i in damage_elements) {
|
||||||
if (present[i]) {
|
if (present[i]) {
|
||||||
damages[i][0] += stats.get(damage_elements[i]+'DamAddMin');
|
damages[i][0] += stats.get(damage_elements[i]+'DamAddMin');
|
||||||
damages[i][1] += stats.get(damage_elements[i]+'DamAddMax');
|
damages[i][1] += stats.get(damage_elements[i]+'DamAddMax');
|
||||||
|
@ -104,10 +122,10 @@ function calculateSpellDamage(stats, weapon, conversions, use_spell_damage, igno
|
||||||
// These do not count raw damage. I think. Easy enough to change
|
// These do not count raw damage. I think. Easy enough to change
|
||||||
let total_min = 0;
|
let total_min = 0;
|
||||||
let total_max = 0;
|
let total_max = 0;
|
||||||
for (let i in damages) {
|
for (let i in damage_elements) {
|
||||||
let damage_prefix = damage_elements[i] + specific_boost_str;
|
let damage_specific = damage_elements[i] + specific_boost_str + 'Pct';
|
||||||
let damageBoost = 1 + skill_boost[i] + static_boost
|
let damageBoost = 1 + skill_boost[i] + static_boost
|
||||||
+ ((stats.get(damage_prefix+'Pct') + stats.get(damage_elements[i]+'DamPct')) /100);
|
+ ((stats.get(damage_specific) + stats.get(damage_elements[i]+'DamPct')) /100);
|
||||||
damages[i][0] *= Math.max(damageBoost, 0);
|
damages[i][0] *= Math.max(damageBoost, 0);
|
||||||
damages[i][1] *= Math.max(damageBoost, 0);
|
damages[i][1] *= Math.max(damageBoost, 0);
|
||||||
// Collect total damage post %boost
|
// Collect total damage post %boost
|
||||||
|
|
Loading…
Reference in a new issue