Explosion damage affected by transonic warp

also cap stat scalers
This commit is contained in:
hppeng 2022-07-16 19:09:19 -07:00
parent ef6ed85c25
commit fb499c3820
4 changed files with 34 additions and 14 deletions

View file

@ -1,5 +1,6 @@
How to convert: How to convert:
0. start in the `js` directory
1. edit `atree_constants.js` 1. edit `atree_constants.js`
2. run `python3 ../py_script/atree-generateID.py 2. run `python3 ../py_script/atree-generateID.py
3. check that the site still works 3. check that the site still works

View file

@ -750,6 +750,7 @@ const atree_stats = new (class extends ComputeNode {
for (const [scaling, input] of zip2(effect.scaling, effect.inputs)) { for (const [scaling, input] of zip2(effect.scaling, effect.inputs)) {
total += scaling * item_stats.get(input.name); total += scaling * item_stats.get(input.name);
} }
if (total < 0) { total = 0; } // Normal stat scaling will not go negative.
if ('max' in effect && total > effect.max) { total = effect.max; } if ('max' in effect && total > effect.max) { total = effect.max; }
// TODO: output (list...) // TODO: output (list...)
if (Array.isArray(effect.output)) { if (Array.isArray(effect.output)) {

View file

@ -4981,7 +4981,7 @@ const atrees = {
"behavior": "modify", "behavior": "modify",
"target_part": "Total Damage", "target_part": "Total Damage",
"base_spell": 2, "base_spell": 2,
"hits": {"Wind Slash": 1} "hits": {"Wind Slash": 1, "Explosion Damage": 1}
} }
] ]
}, },
@ -5074,30 +5074,48 @@ const atrees = {
"type": "stat_scaling", "type": "stat_scaling",
"slider": true, "slider": true,
"slider_name": "Winded", "slider_name": "Winded",
"output": { "output": [
"type": "stat", {
"name": "nConvBase:2.Wind Slash" "type": "stat",
}, "name": "nConvBase:2.Wind Slash"
},
{
"type": "stat",
"name": "nConvBase:2.Explosion Damage"
}
],
"scaling": [30] "scaling": [30]
}, },
{ {
"type": "stat_scaling", "type": "stat_scaling",
"slider": true, "slider": true,
"slider_name": "Winded", "slider_name": "Winded",
"output": { "output": [
"type": "stat", {
"name": "tConvBase:2.Wind Slash" "type": "stat",
}, "name": "tConvBase:2.Wind Slash"
},
{
"type": "stat",
"name": "tConvBase:2.Explosion Damage"
}
],
"scaling": [10] "scaling": [10]
}, },
{ {
"type": "stat_scaling", "type": "stat_scaling",
"slider": true, "slider": true,
"slider_name": "Winded", "slider_name": "Winded",
"output": { "output": [
"type": "stat", {
"name": "aConvBase:2.Wind Slash" "type": "stat",
}, "name": "aConvBase:2.Wind Slash"
},
{
"type": "stat",
"name": "aConvBase:2.Explosion Damage"
}
],
"scaling": [5] "scaling": [5]
} }
] ]

File diff suppressed because one or more lines are too long