Winded implementation
also general raw spell base modifier
This commit is contained in:
parent
392bad62a5
commit
ebe322cbb3
4 changed files with 153 additions and 30 deletions
|
@ -641,9 +641,11 @@ const atree_make_interactives = new (class extends ComputeNode {
|
|||
if (effect['type'] === "stat_scaling" && effect['slider'] === true) {
|
||||
const { slider_name, slider_behavior = 'merge', slider_max, slider_step } = effect;
|
||||
if (slider_map.has(slider_name)) {
|
||||
if (slider_max !== undefined) {
|
||||
const slider_info = slider_map.get(slider_name);
|
||||
slider_info.max += slider_max;
|
||||
}
|
||||
}
|
||||
else if (slider_behavior === 'merge') {
|
||||
slider_map.set(slider_name, {
|
||||
label_name: slider_name,
|
||||
|
|
|
@ -88,7 +88,6 @@ const atrees = {
|
|||
"cost": 50,
|
||||
"base_spell": 3,
|
||||
"spell_type": "damage",
|
||||
"scaling": "spell",
|
||||
"display": "Total Damage",
|
||||
"parts": [
|
||||
{
|
||||
|
@ -237,7 +236,6 @@ const atrees = {
|
|||
"cost": 40,
|
||||
"base_spell": 1,
|
||||
"spell_type": "damage",
|
||||
"scaling": "spell",
|
||||
"display": "Total Damage",
|
||||
"parts": [
|
||||
{
|
||||
|
@ -4592,11 +4590,33 @@ const atrees = {
|
|||
"display": {
|
||||
"row": 15,
|
||||
"col": 1,
|
||||
"icon": "node_3",
|
||||
"__TODO": "hppeng please fix"
|
||||
"icon": "node_3"
|
||||
},
|
||||
"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",
|
||||
|
@ -4744,8 +4764,32 @@ const atrees = {
|
|||
"icon": "node_1"
|
||||
},
|
||||
"properties": {},
|
||||
"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"
|
||||
"effects": [
|
||||
{
|
||||
"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",
|
||||
|
@ -5028,7 +5072,38 @@ const atrees = {
|
|||
"icon": "node_2"
|
||||
},
|
||||
"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",
|
||||
|
@ -5204,15 +5279,25 @@ const atrees = {
|
|||
"icon": "node_0"
|
||||
},
|
||||
"properties": {},
|
||||
"effects": [{
|
||||
"effects": [
|
||||
{
|
||||
"type": "raw_stat",
|
||||
"bonuses": [{
|
||||
"bonuses": [
|
||||
{
|
||||
"type": "prop",
|
||||
"abil": "Windsweeper",
|
||||
"name": "max",
|
||||
"value": 5
|
||||
}]
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat_scaling",
|
||||
"slider": true,
|
||||
"slider_name": "Winded",
|
||||
"slider_max": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"display_name": "Cheaper Ice Snake II",
|
||||
|
@ -5348,7 +5433,7 @@ 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)",
|
||||
"archetype": "Riftwalker",
|
||||
"archetype_req": 7,
|
||||
"parents": ["Cheaper Ice Snake II", "Explosive Entrance"],
|
||||
"parents": ["Cheaper Ice Snake II"],
|
||||
"dependencies": ["Ice Snake"],
|
||||
"blockers": [],
|
||||
"cost": 2,
|
||||
|
@ -5429,7 +5514,25 @@ const atrees = {
|
|||
"icon": "node_0"
|
||||
},
|
||||
"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",
|
||||
|
|
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
|
||||
|
||||
// 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));
|
||||
|
||||
// Also theres prop and rainbow!!
|
||||
const damage_elements = ['n'].concat(skp_elements); // netwfa
|
||||
|
||||
// 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.
|
||||
let damages = [];
|
||||
const neutral_convert = conversions[0] / 100;
|
||||
|
@ -68,9 +89,6 @@ function calculateSpellDamage(stats, weapon, conversions, use_spell_damage, igno
|
|||
}
|
||||
total_convert += conversions[0]/100;
|
||||
|
||||
// Also theres prop and rainbow!!
|
||||
const damage_elements = ['n'].concat(skp_elements); // netwfa
|
||||
|
||||
if (!ignore_speed) {
|
||||
// 3. Apply attack speed multiplier. Ignored for melee single hit
|
||||
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?
|
||||
for (let i = 0; i < 6; ++i) {
|
||||
for (let i in damage_elements) {
|
||||
if (present[i]) {
|
||||
damages[i][0] += stats.get(damage_elements[i]+'DamAddMin');
|
||||
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
|
||||
let total_min = 0;
|
||||
let total_max = 0;
|
||||
for (let i in damages) {
|
||||
let damage_prefix = damage_elements[i] + specific_boost_str;
|
||||
for (let i in damage_elements) {
|
||||
let damage_specific = damage_elements[i] + specific_boost_str + 'Pct';
|
||||
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][1] *= Math.max(damageBoost, 0);
|
||||
// Collect total damage post %boost
|
||||
|
|
Loading…
Reference in a new issue