Rudimentary display code and repair atree file

This commit is contained in:
hppeng 2022-06-24 04:56:56 -07:00
parent 2e287447ff
commit eb84f1de6e
3 changed files with 9 additions and 6 deletions

View file

@ -3871,7 +3871,7 @@ const atrees =
"desc": "Every time you hit an enemy, briefly increase your elemental damage dealt to them by +2 (Additive, Max +50). This bonus decays -5 every second",
"archetype": "Battle Monk",
"archetype_req": 12,
"parents": ["Thunderclap"],
"parents": ["Cyclone"],
"dependencies": [],
"blockers": [],
"cost": 2,
@ -3935,13 +3935,13 @@ const atrees =
"desc": "After casting War Scream, envelop yourself with a vortex that damages nearby enemies every 0.5s",
"archetype": "Battle Monk",
"archetype_req": 0,
"parents": ["Thunderclap"],
"parents": ["Spirit of the Rabbit"],
"dependencies": [],
"blockers": [],
"cost": 1,
"display": {
"row": 31,
"col": 4
"col": 4,
"icon": "node_1"
},
"properties": {

File diff suppressed because one or more lines are too long

View file

@ -100,7 +100,11 @@ function construct_AT(elem, tree) {
// create node
let node_elem = document.createElement('div')
node_elem.style = "background-image: url('../media/atree/node.png'); background-size: cover; width: 100%; height: 100%;";
let icon = node.display.icon;
if (icon === undefined) {
icon = "node";
}
node_elem.style = "background-image: url('../media/atree/"+icon+".png'); background-size: cover; width: 100%; height: 100%;";
// add tooltip
node_elem.addEventListener('mouseover', function(e) {