HOTFIX: patch atree json for charge, and display code

This commit is contained in:
hppeng 2022-06-30 21:21:25 -07:00
parent 53f502b96d
commit 4632bba69a
3 changed files with 5125 additions and 13 deletions

View file

@ -474,9 +474,6 @@ const atree_collect_spells = new (class extends ComputeNode {
let found_part = false;
for (let part of ret_spell.parts) { // TODO: replace with Map? to avoid this linear search... idk prolly good since its not more verbose to type in json
if (part.name === target_part) {
if ('display' in effect) {
part.display = effect.display;
}
if ('multipliers' in effect) {
for (const [idx, v] of effect.multipliers.entries()) { // python: enumerate()
part.multipliers[idx] += v;
@ -503,6 +500,9 @@ const atree_collect_spells = new (class extends ComputeNode {
spell_part.name = target_part; // has some extra fields but whatever
ret_spell.parts.push(spell_part);
}
if ('display' in effect) {
ret_spell.display = effect.display;
}
continue;
}
case 'convert_spell_conv':

View file

@ -2158,19 +2158,15 @@ const atrees = {
"base_spell": 2,
"spell_type": "damage",
"scaling": "spell",
"display": "Total Damage",
"parts": [
{
"name": "Total Damage",
"hits": {}
}
]
"display": "",
"parts": []
}]
},
{
"display_name": "Heavy Impact",
"desc": "After using Charge, violently crash down into the ground and deal damage",
"base_abil": "Charge",
"parents": ["Uppercut"],
"dependencies": [],
"blockers": [],
@ -2190,6 +2186,13 @@ const atrees = {
"target_part": "Heavy Impact",
"cost": 0,
"multipliers": [100, 0, 0, 0, 0, 0]
},
{
"type": "add_spell_prop",
"base_spell": 2,
"target_part": "Contact Damage",
"display": "Contact Damage",
"hits": { "Heavy Impact": 1 }
}
]
},
@ -2374,14 +2377,14 @@ const atrees = {
"base_spell": 4,
"spell_type": "damage",
"scaling": "spell",
"display": "Total Damage Average",
"display": "Total Damage",
"parts": [
{
"name": "War Scream",
"multipliers": [50, 0, 0, 0, 50, 0]
},
{
"name": "Total Damage Average",
"name": "Total Damage",
"hits": { "War Scream": 1 }
}
]
@ -2656,6 +2659,13 @@ const atrees = {
"base_spell": 2,
"target_part": "Flyby Jab",
"multipliers": [20, 0, 0, 0, 0, 40]
},
{
"type": "add_spell_prop",
"base_spell": 2,
"target_part": "Contact Damage",
"display": "Contact Damage",
"hits": { "Flyby Jab": 1 }
}
]
},

File diff suppressed because one or more lines are too long