Merge pull request #94 from hppeng-wynn/merge-mastery

Merge mastery
This commit is contained in:
hppeng-wynn 2022-07-08 21:41:39 -07:00 committed by GitHub
commit 25e55bec92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 12 deletions

View file

@ -92,6 +92,9 @@ scaling_target: {
} }
*/ */
const elem_mastery_abil = { display_name: "Elemental Mastery", id: 998, properties: {}, effects: [] };
// TODO: Range numbers // TODO: Range numbers
const default_abils = { const default_abils = {
wand: [{ wand: [{
@ -100,35 +103,35 @@ const default_abils = {
desc: "Mage basic attack.", desc: "Mage basic attack.",
properties: {range: 5000}, properties: {range: 5000},
effects: [default_spells.wand[0]] effects: [default_spells.wand[0]]
}], }, elem_mastery_abil ],
spear: [{ spear: [{
display_name: "Warrior Melee", display_name: "Warrior Melee",
id: 999, id: 999,
desc: "Warrior basic attack.", desc: "Warrior basic attack.",
properties: {range: 2}, properties: {range: 2},
effects: [default_spells.spear[0]] effects: [default_spells.spear[0]]
}], }, elem_mastery_abil ],
bow: [{ bow: [{
display_name: "Archer Melee", display_name: "Archer Melee",
id: 999, id: 999,
desc: "Archer basic attack.", desc: "Archer basic attack.",
properties: {range: 20}, properties: {range: 20},
effects: [default_spells.bow[0]] effects: [default_spells.bow[0]]
}], }, elem_mastery_abil ],
dagger: [{ dagger: [{
display_name: "Assassin Melee", display_name: "Assassin Melee",
id: 999, id: 999,
desc: "Assassin basic attack.", desc: "Assassin basic attack.",
properties: {range: 2}, properties: {range: 2},
effects: [default_spells.dagger[0]] effects: [default_spells.dagger[0]]
}], }, elem_mastery_abil ],
relik: [{ relik: [{
display_name: "Shaman Melee", display_name: "Shaman Melee",
id: 999, id: 999,
desc: "Shaman basic attack.", desc: "Shaman basic attack.",
properties: {range: 15, speed: 0}, properties: {range: 15, speed: 0},
effects: [default_spells.relik[0]] effects: [default_spells.relik[0]]
}], }, elem_mastery_abil ],
}; };
@ -261,7 +264,10 @@ const atree_merge = new (class extends ComputeNode {
let abils_merged = new Map(); let abils_merged = new Map();
for (const abil of default_abils[build.weapon.statMap.get('type')]) { for (const abil of default_abils[build.weapon.statMap.get('type')]) {
let tmp_abil = deepcopy(abil); let tmp_abil = deepcopy(abil);
if (!Array.isArray(tmp_abil.desc)) { if (!('desc' in tmp_abil)) {
tmp_abil.desc = [];
}
else if (!Array.isArray(tmp_abil.desc)) {
tmp_abil.desc = [tmp_abil.desc]; tmp_abil.desc = [tmp_abil.desc];
} }
tmp_abil.subparts = [abil.id]; tmp_abil.subparts = [abil.id];
@ -447,11 +453,15 @@ const atree_render_active = new (class extends ComputeNode {
} }
} }
const ret_map = new Map(); const ret_map = new Map();
const to_render_id = [999, 998];
for (const node of atree_order) { for (const node of atree_order) {
if (!merged_abils.has(node.ability.id)) { if (!merged_abils.has(node.ability.id)) {
continue; continue;
} }
const abil = merged_abils.get(node.ability.id); to_render_id.push(node.ability.id);
}
for (const id of to_render_id) {
const abil = merged_abils.get(id);
let active_tooltip = document.createElement('div'); let active_tooltip = document.createElement('div');
active_tooltip.classList.add("rounded-bottom", "dark-4", "border", "p-0", "mx-2", "my-4", "dark-shadow"); active_tooltip.classList.add("rounded-bottom", "dark-4", "border", "p-0", "mx-2", "my-4", "dark-shadow");

View file

@ -989,6 +989,7 @@ const atrees = {
}, },
{ {
"display_name": "Earth Mastery", "display_name": "Earth Mastery",
"base_abil": 998,
"desc": "Increases your base damage from all Earth attacks", "desc": "Increases your base damage from all Earth attacks",
"archetype": "Trapper", "archetype": "Trapper",
"archetype_req": 0, "archetype_req": 0,
@ -1027,6 +1028,7 @@ const atrees = {
}, },
{ {
"display_name": "Thunder Mastery", "display_name": "Thunder Mastery",
"base_abil": 998,
"desc": "Increases your base damage from all Thunder attacks", "desc": "Increases your base damage from all Thunder attacks",
"archetype": "Boltslinger", "archetype": "Boltslinger",
"archetype_req": 0, "archetype_req": 0,
@ -1065,6 +1067,7 @@ const atrees = {
}, },
{ {
"display_name": "Water Mastery", "display_name": "Water Mastery",
"base_abil": 998,
"desc": "Increases your base damage from all Water attacks", "desc": "Increases your base damage from all Water attacks",
"archetype": "Sharpshooter", "archetype": "Sharpshooter",
"archetype_req": 0, "archetype_req": 0,
@ -1103,6 +1106,7 @@ const atrees = {
}, },
{ {
"display_name": "Air Mastery", "display_name": "Air Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Air attacks", "desc": "Increases base damage from all Air attacks",
"archetype": "Boltslinger", "archetype": "Boltslinger",
"archetype_req": 0, "archetype_req": 0,
@ -1141,6 +1145,7 @@ const atrees = {
}, },
{ {
"display_name": "Fire Mastery", "display_name": "Fire Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Fire attacks", "desc": "Increases base damage from all Fire attacks",
"archetype": "Sharpshooter", "archetype": "Sharpshooter",
"archetype_req": 0, "archetype_req": 0,
@ -2364,6 +2369,7 @@ const atrees = {
{ {
"display_name": "Earth Mastery", "display_name": "Earth Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Earth attacks", "desc": "Increases base damage from all Earth attacks",
"archetype": "Fallen", "archetype": "Fallen",
"archetype_req": 0, "archetype_req": 0,
@ -2392,6 +2398,7 @@ const atrees = {
{ {
"display_name": "Thunder Mastery", "display_name": "Thunder Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Thunder attacks", "desc": "Increases base damage from all Thunder attacks",
"archetype": "Fallen", "archetype": "Fallen",
"archetype_req": 0, "archetype_req": 0,
@ -2420,6 +2427,7 @@ const atrees = {
{ {
"display_name": "Water Mastery", "display_name": "Water Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Water attacks", "desc": "Increases base damage from all Water attacks",
"archetype": "Battle Monk", "archetype": "Battle Monk",
"archetype_req": 0, "archetype_req": 0,
@ -2448,6 +2456,7 @@ const atrees = {
{ {
"display_name": "Air Mastery", "display_name": "Air Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Air attacks", "desc": "Increases base damage from all Air attacks",
"archetype": "Battle Monk", "archetype": "Battle Monk",
"archetype_req": 0, "archetype_req": 0,
@ -2476,6 +2485,7 @@ const atrees = {
{ {
"display_name": "Fire Mastery", "display_name": "Fire Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Fire attacks", "desc": "Increases base damage from all Fire attacks",
"archetype": "Paladin", "archetype": "Paladin",
"archetype_req": 0, "archetype_req": 0,
@ -4154,6 +4164,7 @@ const atrees = {
}, },
{ {
"display_name": "Earth Mastery", "display_name": "Earth Mastery",
"base_abil": 998,
"desc": "Increases your base damage from all Earth attacks", "desc": "Increases your base damage from all Earth attacks",
"archetype": "Arcanist", "archetype": "Arcanist",
"archetype_req": 0, "archetype_req": 0,
@ -4192,6 +4203,7 @@ const atrees = {
}, },
{ {
"display_name": "Thunder Mastery", "display_name": "Thunder Mastery",
"base_abil": 998,
"desc": "Increases your base damage from all Thunder attacks", "desc": "Increases your base damage from all Thunder attacks",
"archetype": "Riftwalker", "archetype": "Riftwalker",
"archetype_req": 0, "archetype_req": 0,
@ -4230,6 +4242,7 @@ const atrees = {
}, },
{ {
"display_name": "Water Mastery", "display_name": "Water Mastery",
"base_abil": 998,
"desc": "Increases your base damage from all Water attacks", "desc": "Increases your base damage from all Water attacks",
"archetype": "Light Bender", "archetype": "Light Bender",
"archetype_req": 0, "archetype_req": 0,
@ -4268,6 +4281,7 @@ const atrees = {
}, },
{ {
"display_name": "Air Mastery", "display_name": "Air Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Air attacks", "desc": "Increases base damage from all Air attacks",
"archetype": "Riftwalker", "archetype": "Riftwalker",
"archetype_req": 0, "archetype_req": 0,
@ -4306,6 +4320,7 @@ const atrees = {
}, },
{ {
"display_name": "Fire Mastery", "display_name": "Fire Mastery",
"base_abil": 998,
"desc": "Increases base damage from all Fire attacks", "desc": "Increases base damage from all Fire attacks",
"archetype": "Arcanist", "archetype": "Arcanist",
"archetype_req": 0, "archetype_req": 0,
@ -4363,7 +4378,6 @@ const atrees = {
"desc": "For every 2% or 2 Raw Spell Damage you have from items, gain +1/5s mana regen (Max 5/5s)", "desc": "For every 2% or 2 Raw Spell Damage you have from items, gain +1/5s mana regen (Max 5/5s)",
"archetype": "Arcanist", "archetype": "Arcanist",
"archetype_req": 0, "archetype_req": 0,
"base_abil": 999,
"parents": ["Teleport"], "parents": ["Teleport"],
"dependencies": [], "dependencies": [],
"blockers": ["Wand Proficiency II"], "blockers": ["Wand Proficiency II"],
@ -4484,7 +4498,7 @@ const atrees = {
}, },
{ {
"display_name": "Stronger Meteor", "display_name": "Stronger Meteor",
"desc": "Incrase the damage of Meteor.", "desc": "Increase the damage of Meteor.",
"base_abil": "Meteor", "base_abil": "Meteor",
"archetype": "Arcanist", "archetype": "Arcanist",
"archetype_req": 2, "archetype_req": 2,
@ -4547,10 +4561,10 @@ const atrees = {
"desc": "Heal emit a strong light, damaging nearby enemies.", "desc": "Heal emit a strong light, damaging nearby enemies.",
"archetype": "Light Bender", "archetype": "Light Bender",
"archetype_req": 0, "archetype_req": 0,
"base_abil": "Heal",
"parents": ["Water Mastery"], "parents": ["Water Mastery"],
"dependencies": ["Heal"], "dependencies": ["Heal"],
"blockers": ["Arcane Transfer"], "blockers": ["Arcane Transfer"],
"cost": 2,
"display": { "display": {
"row": 13, "row": 13,
"col": 4, "col": 4,
@ -4701,7 +4715,7 @@ const atrees = {
{ {
"display_name": "Eye Piercer", "display_name": "Eye Piercer",
"desc": "Teleport will blind enemies, confusing them for a short amount of time.", "desc": "Teleport will blind enemies, confusing them for a short amount of time.",
"base_abil": 2, "base_abil": "Heal",
"parents": ["Cheaper Heal"], "parents": ["Cheaper Heal"],
"dependencies": ["Teleport"], "dependencies": ["Teleport"],
"blockers": [], "blockers": [],
@ -4971,6 +4985,7 @@ const atrees = {
"desc": "For every 1% Water Damage Bonus you have, buff Heal's healing power by +0.3%.", "desc": "For every 1% Water Damage Bonus you have, buff Heal's healing power by +0.3%.",
"archetype": "Light Bender", "archetype": "Light Bender",
"archetype_req": 0, "archetype_req": 0,
"base_abil": "Heal",
"parents": ["Healthier Ophanim I", "Transonic Warp"], "parents": ["Healthier Ophanim I", "Transonic Warp"],
"dependencies": [], "dependencies": [],
"blockers": [], "blockers": [],
@ -5124,6 +5139,7 @@ const atrees = {
{ {
"display_name": "Arcane Speed", "display_name": "Arcane Speed",
"desc": "After casting Heal or Arcane Transfer, gain +80% speed for 3s. (8s Cooldown)", "desc": "After casting Heal or Arcane Transfer, gain +80% speed for 3s. (8s Cooldown)",
"base_abil": "Heal",
"parents": ["Lightweaver", "Larger Mana Bank II"], "parents": ["Lightweaver", "Larger Mana Bank II"],
"dependencies": ["Heal"], "dependencies": ["Heal"],
"blockers": [], "blockers": [],

File diff suppressed because one or more lines are too long