-
Notifications
You must be signed in to change notification settings - Fork 41
/
main.js
5577 lines (5089 loc) · 234 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { barbarianData } from "./data/barbarian.js";
import { druidData } from "./data/druid.js";
import { necromancerData } from "./data/necromancer.js";
import { rogueData } from "./data/rogue.js";
import { sorcererData } from "./data/sorcerer.js";
import { paragonData } from "./data/paragon.js";
import { codexData } from "./data/codex-of-power.js";
// splitMulti allows String.prototype.split to process multiple delimiters at once
function splitMulti(str, tokens) {
let tempChar = tokens[0];
for (let i = 1, n = tokens.length; i < n; i++) {
str = str.split(tokens[i]).join(tempChar);
}
str = str.split(tempChar);
return str;
}
var splitOrig = String.prototype.split;
String.prototype.split = function() {
if (arguments[0].length > 0) {
if (Object.prototype.toString.call(arguments[0]) == "[object Array]") {
return splitMulti(this, arguments[0]);
}
}
return splitOrig.apply(this, arguments);
};
// check browser for AVIF or WEBP support
async function supportsEncode() {
if (!createImageBitmap) return "jpg";
const avifData = "data:image/avif;base64,AAAAHGZ0eXBtaWYxAAAAAG1pZjFhdmlmbWlhZgAAAPFtZXRhAAAAAAAAACFoZGxyAAAAAAAAAABwaWN0AAAAAAAAAAAAAAAAAAAAAA5waXRtAAAAAAABAAAAHmlsb2MAAAAABEAAAQABAAAAAAEVAAEAAAAeAAAAKGlpbmYAAAAAAAEAAAAaaW5mZQIAAAAAAQAAYXYwMUltYWdlAAAAAHBpcHJwAAAAUWlwY28AAAAUaXNwZQAAAAAAAAABAAAAAQAAABBwYXNwAAAAAQAAAAEAAAAVYXYxQ4EgAAAKBzgABpAQ0AIAAAAQcGl4aQAAAAADCAgIAAAAF2lwbWEAAAAAAAAAAQABBAECg4QAAAAmbWRhdAoHOAAGkBDQAjITFkAAAEgAAAB5TNw9UxdXU6F6oA==",
webpData = "data:image/webp;base64,UklGRhwAAABXRUJQVlA4TBAAAAAvAAAAEAfQpv5HmQMR0f8A",
avifBlob = await fetch(avifData).then((r) => r.blob());
return createImageBitmap(avifBlob)
.then(() => "avif")
.catch(async() => {
const webpBlob = await fetch(webpData).then((r) => r.blob());
return createImageBitmap(webpBlob).then(() => "webp")
}).catch(() => "jpg");
}
(async () => { document.body.classList.add(await supportsEncode()); })();
// lineIntersect returns [x, y] intersect coordinates for two given lines [[[x1, y1], [x2, y2]], [[x3, y3], [x4, y4]]]
// lines will automatically rotate around c1, c2, c3, and c4 center points if the optional angle parameter is provided
function lineIntersect(x1, y1, x2, y2, x3, y3, x4, y4, angle = 0, c1 = [], c2 = [], c3 = [], c4 = []) {
if (angle % 360 != 0) {
if (c1.length > 0) [x1, y1] = rotateAngle(c1[0], c1[1], x1, y1, angle);
if (c2.length > 0) [x2, y2] = rotateAngle(c2[0], c2[1], x2, y2, angle);
if (c3.length > 0) [x3, y3] = rotateAngle(c3[0], c3[1], x3, y3, angle);
if (c4.length > 0) [x4, y4] = rotateAngle(c4[0], c4[1], x4, y4, angle);
}
if ((x1 == x2 && y1 == y2) || (x3 == x4 && y3 == y4)) return [ NaN, NaN ];
const denominator = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
if (denominator == 0) return [ NaN, NaN ];
const ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;
const ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator;
if (ua < 0 || ua > 1 || ub < 0 || ub > 1) return [ NaN, NaN ];
const x = x1 + ua * (x2 - x1);
const y = y1 + ua * (y2 - y1);
return [ x, y ];
}
// rotateAngle returns [x, y] rotated around [cx, cy] by angle (in degrees)
function rotateAngle(cx, cy, x, y, angle) {
const radians = (Math.PI / 180) * angle,
cos = Math.cos(radians),
sin = Math.sin(radians),
nx = (cos * (x - cx)) + (sin * (y - cy)) + cx,
ny = (cos * (y - cy)) - (sin * (x - cx)) + cy;
return [ nx, ny ];
}
// populateMap fills a map with the values of an object, using nested maps
function populateMap(map, object, keys) {
if (!keys.length) return map;
let key = keys.shift();
let value = object[key];
if (typeof value === "object" && value !== null) value = populateMap(new Map(), value, Object.keys(value));
map.set(key, value);
return populateMap(map, object, keys);
}
// convertBase returns an input value converted from one base (radix) to another, up to base 62
function convertBase(value, from_base, to_base) {
const range = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
const from_range = range.slice(0, from_base);
const to_range = range.slice(0, to_base);
var dec_value = value.split("").reverse().reduce((carry, digit, index) => {
if (from_range.indexOf(digit) == -1) throw new Error("Invalid digit `" + digit + "` for base `" + from_base + "`.");
return carry += from_range.indexOf(digit) * Math.pow(from_base, index);
}, 0);
var new_value = "";
while (dec_value > 0) {
new_value = to_range[dec_value % to_base] + new_value;
dec_value = (dec_value - (dec_value % to_base)) / to_base;
}
return new_value || "0";
}
// rgba2hex converts a `rgba(255, 255, 255, 1)` string into an equivalent hex string: `0xffffffff`
function rgba2hex(rgba) {
return `0x${rgba.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/).slice(1).map((n, i) => (i == 3 ? Math.round(parseFloat(n) * 255) : parseFloat(n)).toString(16).padStart(2, "0").replace("NaN", "")).join("")}`;
}
// construct a nested map of all class data
const classObj = { "barbarian": barbarianData, "druid": druidData, "necromancer": necromancerData, "rogue": rogueData, "sorcerer": sorcererData };
var classMap = new Map();
populateMap(classMap, classObj, Object.keys(classObj));
// canvas size constants
const minCanvasWidth = 0;
const maxCanvasWidth = 65535;
const minCanvasHeight = 0;
const maxCanvasHeight = 65535;
const nodeWidth = 100;
const nodeHeight = 100;
const tooltipWidth = 680;
// evil magic variables that probably need to be replaced later to support multiple languages
const BUILD_LOAD_ERROR_PREFIX = `An error occurred while loading this build: "`;
const BUILD_LOAD_ERROR_SUFFIX = `"; have you tried reloading the page?`;
const DESIRED_ZOOM_LEVEL_PROMPT = "Please enter your desired UI zoom level (min: 0.25, max: 4):\nThis applies mostly to buttons, including the one you just clicked.";
const DESIRED_ZOOM_LEVEL_TOOLTIP_PROMPT = "Please enter your desired tooltip zoom level (min: 0.25, max: 4):\nThis applies exclusively to node tooltips drawn inside the canvas.";
const DATABASE_LINK_HTML = `<a href="./database/" target="_blank">[Click here if you're looking for datamined information.]</a>`;
const UPDATE_AVAILABLE_TEXT = "An updated version is available, refresh the page (Ctrl+F5)!";
const UPDATE_AVAILABLE_LABEL_TEXT = "[Update!]";
const OVERCAPPED_TEXT = "Your build currently has too many points allocated and is considered invalid!";
const OVERCAPPED_LABEL_TEXT = "[Error!]";
const TOOLTIP_COPY_TEXT = "[Copy to Clipboard]";
const TOOLTIP_COPIED_TEXT = "[Copied!]";
const RESET_BUTTON_CONFIRM_TEXT = "Are you sure you want to reset? All of your changes will be lost.";
const OPEN_MENU_TEXT = "Open Menu";
const CLOSE_MENU_TEXT = "Close Menu";
const COPY_BUILD_SUMMARY_TEXT = "Copy Summary";
const COPY_BUILD_SUMMARY_SUCCESS_TEXT = "Copied to Clipboard!";
const ADJUST_ZOOM_LEVEL_TEXT = "Adjust Zoom";
const SHOW_DETAILS_WINDOW_TEXT = "Show Details";
const HIDE_DETAILS_WINDOW_TEXT = "Hide Details";
const ENABLE_TOOLTIP_CLAMP_TEXT = "Enable Tooltip Clamping";
const DISABLE_TOOLTIP_CLAMP_TEXT = "Disable Tooltip Clamping";
const VERSION_HISTORY_TEXT = "Version History";
const MATCH_FOUND_TEXT = " match found for query: ";
const MATCHES_FOUND_TEXT = " matches found for query: ";
const REQUIRED_POINTS_DESC = "Spend {requiredPoints} additional skill points to unlock.";
const COOLDOWN_PREFIX = "Cooldown: ";
const ULTIMATE = "Ultimate";
const KEY_PASSIVE = "Key Passive";
const SKILL_TREE = "Skill Tree";
const PARAGON_BOARD = "Paragon Board";
const PARAGON_BOARD_RESET_PROMPT_PREFIX = "Are you sure you want to reset ";
const PARAGON_BOARD_RESET_ALL_PROMPT = "Are you sure you want to completely reset every paragon board?";
const PARAGON_BOARD_GRID_PROMPT_PREFIX = "Please select a grid location for the ";
const PARAGON_BOARD_GRID_PROMPT_SUFFIX = " Paragon Board:\n";
const PARAGON_BOARD_GRID_PROMPT_END = `You can reset the position of this board by entering 0.\nIf you're unsure what to enter, try 2 and look directly above [Start].`;
const PARAGON_BOARD_EQUIP_PROMPT_HEADER = "Please select a paragon board to attach to ";
const CURRENT_GRID_LOCATION_TEXT = "Current grid location";
const GLYPH_SELECT_PROMPT_PREFIX = "Please select a glyph to socket in ";
const GLYPH_SELECT_PROMPT_SUFFIX = "(You cannot socket the same glyph multiple times.)";
const ASSIGN_INDEX_LABEL_TEXT = "Assign Index";
const RESET_BOARD_LABEL_TEXT = "Reset Board";
const RESET_ALL_BOARDS_LABEL_TEXT = "Reset Everything";
const ALTARS_OF_LILITH = "Altars of Lilith";
const EQUIPMENT_PANEL_PROMPT_HEADER_PREFIX = "Please select a legendary aspect or unique item to equip in your ";
const EQUIPMENT_PANEL_PROMPT_HEADER_SUFFIX = " slot:";
const EQUIPMENT_PANEL = "Equipment Panel";
const EQUIPMENT_PANEL_ITEM_DESC = "Click to see a list of legendary aspects and unique items.";
const TECHNIQUE_SLOT = "Technique Slot";
const TECHNIQUE_SLOT_DESC = "Click to see a list of weapon expertise effects.";
const TECHNIQUE_SLOT_PROMPT_HEADER = "Please select a weapon expertise type to use as your [Technique]:";
const ENCHANT_EFFECT_DESC = "— Enchantment Effect —";
const ENCHANT_SLOTS = "Enchantment Slots";
const ENCHANT_SLOT = "Enchantment";
const ENCHANT_SLOT_PROMPT_HEADER_PREFIX = "Please select a skill to use as your ";
const ENCHANT_FIRST = "primary";
const ENCHANT_SECOND = "secondary";
const ENCHANT_SLOT_PROMPT_HEADER_SUFFIX = " [Enchantment]:";
const ENCHANT_SLOT_DESC = "Click to see a list of enchantment effects.";
const CODEX_OF_POWER = "Codex of Power";
const CODEX_OF_POWER_DESC_BEFORE = "Legendary aspects in this category can be applied to: ";
const CODEX_OF_POWER_DESC_AFTER = "Unique items are only listed here for convenience, and cannot have their powers extracted.";
const SPIRIT_BOONS = "Spirit Boons";
const SPIRIT_BOON_DESC = "Specializing in this spirit type will allow you to allocate two boons instead of only one.";
const BOOK_OF_THE_DEAD = "Book of the Dead";
const COLOR_OVERRIDE = {
"Magic": 0x0077FF,
"Rare": 0xFFFF00,
"Legendary": 0xFF7700,
"Start": 0xFFFF00,
"Gate": 0xFFFF00,
"Socket": 0xFF00FF,
"Allocated": 0xFF0000,
"Allocated Socket": 0xFF00FF
};
// sorted object groups, mostly used for summary text processing
const sortedTreeGroupTypes = [
"Basic",
"Core",
"Spirit", // Druid - 2
"Defensive",
"Macabre", // Necromancer - 3
"Agility", // Rogue - 3
"Brawling", // Barbarian - 4
"Companion", // Druid - 4
"Corruption", // Necromancer - 4
"Subterfuge", // Rogue - 4
"Conjuration", // Sorcerer - 4
"Weapon Mastery", // Barbarian - 5
"Wrath", // Druid - 5
"Summoning", // Necromancer - 5
"Imbuements", // Rogue - 5
"Mastery", // Sorcerer - 5
"Ultimate",
KEY_PASSIVE
];
const sortedParagonNodeTypes = [
"Normal",
"Magic",
"Rare",
"Socket",
"Legendary"
];
const sortedCodexCategoryTypes = [
"Offensive",
"Defensive",
"Utility",
"Resource",
"Mobility",
"Other",
"Unknown"
];
var pixiTooltipZoomLevel = 1; // configured via handleZoomButton
const pixiScalingFloor = devicePixelRatio < 2 ? 0.15 : 0.1;
const pixiScalingCeiling = 2;
const fontFamily = $("body").css("fontFamily");
const fontFamilyOverride = fontFamily.includes("Homenaje") ? fontFamily : "Homenaje, " + fontFamily;
const textColor = 0xFFFFFF;//Number(rgba2hex($("body").css("color")));
//const backgroundColorHEX = rgba2hex($("#header").css("background-color"));
const backgroundColor = 0;//backgroundColorHEX.length == 8 ? Number(backgroundColorHEX) : backgroundColorHEX >>> 8;
const backgroundOpacity = 0.8;//backgroundColorHEX.length == 8 ? 1 : (backgroundColorHEX & 0xFF) / 255;
//const borderColorHEX = rgba2hex($("#header").css("border-color"));
const borderColor = 0xFFFFFF;//borderColorHEX.length == 8 ? Number(borderColorHEX) : borderColorHEX >>> 8;
const borderOpacity = 1;//borderColorHEX.length == 8 ? 1 : (borderColorHEX & 0xFF) / 255;
const activeConnectorColor = 0xFF0000;
const activeNodeColor = 0xFF0000;
const searchQueryMatchColor = 0x00FF00;
const lineStyleThinSquare = { alpha: borderOpacity, cap: PIXI.LINE_CAP.SQUARE, color: borderColor, native: true, width: 1 };
const lineStyleThinButt = { alpha: borderOpacity, cap: PIXI.LINE_CAP.BUTT, color: borderColor, native: true, width: 1 };
const lineStyleThickSquareTooltip = { alpha: borderOpacity, cap: PIXI.LINE_CAP.SQUARE, color: borderColor, native: false, width: 8 };
const lineStyleThickSquare = { alpha: borderOpacity, cap: PIXI.LINE_CAP.SQUARE, color: activeNodeColor, native: false, width: 8 };
const lineStyleThickButt = { alpha: 1, cap: PIXI.LINE_CAP.BUTT, color: activeConnectorColor, native: false, width: 8 };
var pixiAllocatedPoints = new Map();
var pixiAllocatedParagonPoints = 0;
var pixiNodes = [];
var pixiConnectors = [];
var pixiConnectorPairs = [];
var pixiEventQueue = new Set();
var pixiBackground = PIXI.Sprite.from(PIXI.Texture.EMPTY);
var pixiTooltip = new PIXI.Container();
var pixiDragging = null;
var debugMode = false;
var detailsMode = readCookie("detailsMode") == "false" ? false : true;
var clampMode = readCookie("clampMode") == "true" ? true : false;
var touchTimer = null;
var isTouching = false;
var initialTouchDistance = 0;
var initialScale = 1;
var stageScale = 1;
var curRenderScale = 1;
var newRenderScale = 1;
var frameTimer = Date.now();
var isEventHandlerBusy = false;
var curWidth = 0;
var curHeight = 0;
PIXI.settings.RENDER_OPTIONS.resolution = devicePixelRatio;
PIXI.settings.RENDER_OPTIONS.autoDensity = true;
PIXI.BaseTexture.defaultOptions.scaleMode = PIXI.SCALE_MODES.LINEAR;
// construct pixiJS custom application
const pixiJS = (() => {
try {
return {
"renderer": new PIXI.Renderer({
backgroundAlpha: 0,
height: minCanvasHeight,
width: minCanvasWidth
}),
"stage": new PIXI.Container(),
"ticker": new PIXI.Ticker()
}
} catch (e) {
$("#classSelectBox").addClass("disabled");
$("#modalBox").text(e).removeClass("disabled");
throw new Error(e);
}
})();
pixiJS.ticker.add(() => pixiJS.renderer.render(pixiJS.stage), PIXI.UPDATE_PRIORITY.LOW);
pixiJS.ticker.start();
PIXI.Graphics.prototype.updateLineStyle = function({ alpha = null, cap = null, color = null, width = null, native = null } = {}) {
let styleChanged = false;
this.geometry.graphicsData.forEach(data => {
if (alpha != null && alpha != data.lineStyle.alpha) {
data.lineStyle.alpha = alpha;
styleChanged = true;
}
if (cap != null && cap != data.lineStyle.cap) {
data.lineStyle.cap = cap;
styleChanged = true;
}
if (color != null && color != data.lineStyle.color) {
data.lineStyle.color = color;
styleChanged = true;
}
if (width != null && width != data.lineStyle.width) {
data.lineStyle.width = width;
styleChanged = true;
}
if (native != null && native != data.lineStyle.native) {
data.lineStyle.native = native;
styleChanged = true;
}
});
if (styleChanged) {
this.geometry.invalidate();
}
}
var PIXI_TEXTURES = {};
function rebuildTextures() {
const className = $(classString).length == 0 ? "none" : $(classString).val();
PIXI_TEXTURES = {
NODE_PASSIVE: PIXI.Texture.from("images/tree/node_passive.png"),
NODE_PASSIVE_ALLOCATED: PIXI.Texture.from("images/tree/node_passive_allocated.png"),
NODE_ACTIVE_SKILL: PIXI.Texture.from("images/tree/node_active_skill.png"),
NODE_ACTIVE_SKILL_ALLOCATED: PIXI.Texture.from("images/tree/node_active_skill_allocated.png"),
NODE_ACTIVE_SKILL_MODIFIER: PIXI.Texture.from("images/tree/node_active_skill_modifier.png"),
NODE_ACTIVE_SKILL_MODIFIER_ALLOCATED: PIXI.Texture.from("images/tree/node_active_skill_modifier_allocated.png"),
NODE_GROUP: PIXI.Texture.from("images/tree/node_group.png"),
NODE_GROUP_ALLOCATED: PIXI.Texture.from("images/tree/node_group_allocated.png"),
NODE_KEY_PASSIVE: PIXI.Texture.from("images/tree/node_key_passive.png"),
NODE_KEY_PASSIVE_ALLOCATED: PIXI.Texture.from("images/tree/node_key_passive_allocated.png"),
GLYPH_RADIUS_INDICATOR: PIXI.Texture.from("images/tree/glyph_overlay.png")
}
if (className == "barbarian") {
PIXI_TEXTURES = {
...PIXI_TEXTURES,
BASH: {
MAX: PIXI.Texture.from("images/tree/barbarian_1.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_2.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_3.png")
},
GROUND_STOMP: {
MAX: PIXI.Texture.from("images/tree/barbarian_5.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_6.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_7.png")
},
HAMMER_OF_THE_ANCIENTS: {
MAX: PIXI.Texture.from("images/tree/barbarian_9.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_10.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_11.png")
},
CHARGE: {
MAX: PIXI.Texture.from("images/tree/barbarian_18.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_19.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_17.png")
},
DOUBLE_SWING: {
MAX: PIXI.Texture.from("images/tree/barbarian_22.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_23.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_21.png")
},
STEEL_GRASP: {
MAX: PIXI.Texture.from("images/tree/barbarian_26.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_27.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_25.png")
},
KICK: {
MAX: PIXI.Texture.from("images/tree/barbarian_30.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_31.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_29.png")
},
LEAP: {
MAX: PIXI.Texture.from("images/tree/barbarian_34.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_35.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_33.png")
},
WHIRLWIND: {
MAX: PIXI.Texture.from("images/tree/barbarian_38.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_39.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_37.png")
},
FRENZY: {
MAX: PIXI.Texture.from("images/tree/barbarian_42.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_43.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_41.png")
},
DEATH_BLOW: {
MAX: PIXI.Texture.from("images/tree/barbarian_46.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_47.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_45.png")
},
IRON_MAELSTROM: {
MAX: PIXI.Texture.from("images/tree/barbarian_50.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_51.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_49.png")
},
REND: {
MAX: PIXI.Texture.from("images/tree/barbarian_54.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_55.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_53.png")
},
WRATH_OF_THE_BERSERKER: {
MAX: PIXI.Texture.from("images/tree/barbarian_58.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_59.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_57.png")
},
UPHEAVAL: {
MAX: PIXI.Texture.from("images/tree/barbarian_62.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_63.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_61.png")
},
RUPTURE: {
MAX: PIXI.Texture.from("images/tree/barbarian_66.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_67.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_65.png")
},
RALLYING_CRY: {
MAX: PIXI.Texture.from("images/tree/barbarian_70.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_71.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_69.png")
},
FLAY: {
MAX: PIXI.Texture.from("images/tree/barbarian_74.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_75.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_73.png")
},
LUNGING_STRIKE: {
MAX: PIXI.Texture.from("images/tree/barbarian_78.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_79.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_77.png")
},
IRON_SKIN: {
MAX: PIXI.Texture.from("images/tree/barbarian_82.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_83.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_81.png")
},
WAR_CRY: {
MAX: PIXI.Texture.from("images/tree/barbarian_86.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_87.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_85.png")
},
CHALLENGING_SHOUT: {
MAX: PIXI.Texture.from("images/tree/barbarian_89.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_88.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_90.png")
},
CALL_OF_THE_ANCIENTS: {
MAX: PIXI.Texture.from("images/tree/barbarian_93.png"),
ALLOCATED: PIXI.Texture.from("images/tree/barbarian_92.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/barbarian_94.png")
}
}
} else if (className == "druid") {
PIXI_TEXTURES = {
...PIXI_TEXTURES,
BOULDER: {
MAX: PIXI.Texture.from("images/tree/druid_2.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_3.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_1.png")
},
CATACLYSM: {
MAX: PIXI.Texture.from("images/tree/druid_6.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_7.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_5.png")
},
CYCLONE_ARMOR: {
MAX: PIXI.Texture.from("images/tree/druid_10.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_11.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_9.png")
},
DEBILITATING_ROAR: {
MAX: PIXI.Texture.from("images/tree/druid_14.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_15.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_13.png")
},
EARTHEN_BULWARK: {
MAX: PIXI.Texture.from("images/tree/druid_18.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_19.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_17.png")
},
EARTH_SPIKE: {
MAX: PIXI.Texture.from("images/tree/druid_22.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_23.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_21.png")
},
GRIZZLY_RAGE: {
MAX: PIXI.Texture.from("images/tree/druid_26.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_27.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_25.png")
},
HURRICANE: {
MAX: PIXI.Texture.from("images/tree/druid_30.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_31.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_29.png")
},
LACERATE: {
MAX: PIXI.Texture.from("images/tree/druid_34.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_35.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_33.png")
},
LANDSLIDE: {
MAX: PIXI.Texture.from("images/tree/druid_38.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_39.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_37.png")
},
MAUL: {
MAX: PIXI.Texture.from("images/tree/druid_42.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_43.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_41.png")
},
PETRIFY: {
MAX: PIXI.Texture.from("images/tree/druid_46.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_47.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_45.png")
},
PULVERIZE: {
MAX: PIXI.Texture.from("images/tree/druid_50.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_51.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_49.png")
},
RAVENS: {
MAX: PIXI.Texture.from("images/tree/druid_54.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_55.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_53.png")
},
STORM_STRIKE: {
MAX: PIXI.Texture.from("images/tree/druid_58.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_59.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_57.png")
},
TORNADO: {
MAX: PIXI.Texture.from("images/tree/druid_62.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_63.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_61.png")
},
TRAMPLE: {
MAX: PIXI.Texture.from("images/tree/druid_66.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_67.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_65.png")
},
POISON_CREEPER: {
MAX: PIXI.Texture.from("images/tree/druid_70.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_71.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_69.png")
},
WIND_SHEAR: {
MAX: PIXI.Texture.from("images/tree/druid_74.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_75.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_73.png")
},
WOLVES: {
MAX: PIXI.Texture.from("images/tree/druid_78.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_79.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_77.png")
},
CLAW: {
MAX: PIXI.Texture.from("images/tree/druid_82.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_83.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_81.png")
},
BLOOD_HOWL: {
MAX: PIXI.Texture.from("images/tree/druid_86.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_87.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_85.png")
},
RABIES: {
MAX: PIXI.Texture.from("images/tree/druid_90.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_91.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_89.png")
},
SHRED: {
MAX: PIXI.Texture.from("images/tree/druid_94.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_95.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_93.png")
},
LIGHTNING_STORM: {
MAX: PIXI.Texture.from("images/tree/druid_97.png"),
ALLOCATED: PIXI.Texture.from("images/tree/druid_96.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/druid_98.png")
}
}
} else if (className == "necromancer") {
PIXI_TEXTURES = {
...PIXI_TEXTURES,
ARMY_OF_THE_DEAD: {
MAX: PIXI.Texture.from("images/tree/necromancer_2.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_3.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_1.png")
},
BLIGHT: {
MAX: PIXI.Texture.from("images/tree/necromancer_6.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_7.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_5.png")
},
BLOOD_LANCE: {
MAX: PIXI.Texture.from("images/tree/necromancer_10.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_11.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_9.png")
},
BLOOD_MIST: {
MAX: PIXI.Texture.from("images/tree/necromancer_14.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_15.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_13.png")
},
BLOOD_SURGE: {
MAX: PIXI.Texture.from("images/tree/necromancer_18.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_19.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_17.png")
},
BLOOD_WAVE: {
MAX: PIXI.Texture.from("images/tree/necromancer_22.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_23.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_21.png")
},
BONE_SPEAR: {
MAX: PIXI.Texture.from("images/tree/necromancer_26.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_27.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_25.png")
},
BONE_SPIRIT: {
MAX: PIXI.Texture.from("images/tree/necromancer_30.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_31.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_29.png")
},
BONE_SPLINTERS: {
MAX: PIXI.Texture.from("images/tree/necromancer_34.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_35.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_33.png")
},
BONE_STORM: {
MAX: PIXI.Texture.from("images/tree/necromancer_38.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_39.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_37.png")
},
BONE_PRISON: {
MAX: PIXI.Texture.from("images/tree/necromancer_42.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_43.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_41.png")
},
CORPSE_EXPLOSION: {
MAX: PIXI.Texture.from("images/tree/necromancer_46.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_47.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_45.png")
},
CORPSE_TENDRILS: {
MAX: PIXI.Texture.from("images/tree/necromancer_50.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_51.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_49.png")
},
DECOMPOSE: {
MAX: PIXI.Texture.from("images/tree/necromancer_54.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_55.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_53.png")
},
DECREPIFY: {
MAX: PIXI.Texture.from("images/tree/necromancer_58.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_59.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_57.png")
},
HEMORRHAGE: {
MAX: PIXI.Texture.from("images/tree/necromancer_66.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_67.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_65.png")
},
IRON_MAIDEN: {
MAX: PIXI.Texture.from("images/tree/necromancer_70.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_71.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_69.png")
},
REAP: {
MAX: PIXI.Texture.from("images/tree/necromancer_74.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_75.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_73.png")
},
SEVER: {
MAX: PIXI.Texture.from("images/tree/necromancer_78.png"),
ALLOCATED: PIXI.Texture.from("images/tree/necromancer_79.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/necromancer_77.png")
}
}
} else if (className == "rogue") {
PIXI_TEXTURES = {
...PIXI_TEXTURES,
SMOKE_GRENADE: {
MAX: PIXI.Texture.from("images/tree/rogue_0.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_1.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_213.png")
},
DASH: {
MAX: PIXI.Texture.from("images/tree/rogue_4.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_5.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_3.png")
},
FLURRY: {
MAX: PIXI.Texture.from("images/tree/rogue_19.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_20.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_18.png")
},
HEARTSEEKER: {
MAX: PIXI.Texture.from("images/tree/rogue_35.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_36.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_34.png")
},
COLD_IMBUEMENT: {
MAX: PIXI.Texture.from("images/tree/rogue_51.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_52.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_50.png")
},
POISON_IMBUEMENT: {
MAX: PIXI.Texture.from("images/tree/rogue_55.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_56.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_54.png")
},
SHADOW_IMBUEMENT: {
MAX: PIXI.Texture.from("images/tree/rogue_59.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_60.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_58.png")
},
PENETRATING_SHOT: {
MAX: PIXI.Texture.from("images/tree/rogue_63.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_64.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_62.png")
},
PUNCTURE: {
MAX: PIXI.Texture.from("images/tree/rogue_79.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_80.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_78.png")
},
RAPID_FIRE: {
MAX: PIXI.Texture.from("images/tree/rogue_95.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_96.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_94.png")
},
SHADOW_CLONE: {
MAX: PIXI.Texture.from("images/tree/rogue_111.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_112.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_110.png")
},
SHADOW_STEP: {
MAX: PIXI.Texture.from("images/tree/rogue_115.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_116.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_114.png")
},
CALTROPS: {
MAX: PIXI.Texture.from("images/tree/rogue_131.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_132.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_130.png")
},
BLADE_SHIFT: {
MAX: PIXI.Texture.from("images/tree/rogue_135.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_136.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_134.png")
},
TWISTING_BLADES: {
MAX: PIXI.Texture.from("images/tree/rogue_151.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_152.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_150.png")
},
FORCEFUL_ARROW: {
MAX: PIXI.Texture.from("images/tree/rogue_167.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_168.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_166.png")
},
RAIN_OF_ARROWS: {
MAX: PIXI.Texture.from("images/tree/rogue_183.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_184.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_182.png")
},
INVIGORATING_STRIKE: {
MAX: PIXI.Texture.from("images/tree/rogue_199.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_200.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_198.png")
},
BARRAGE: {
MAX: PIXI.Texture.from("images/tree/rogue_217.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_218.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_216.png")
},
DEATH_TRAP: {
MAX: PIXI.Texture.from("images/tree/rogue_237.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_238.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_236.png")
},
POISON_TRAP: {
MAX: PIXI.Texture.from("images/tree/rogue_241.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_242.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_240.png")
},
CONCEALMENT: {
MAX: PIXI.Texture.from("images/tree/rogue_249.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_248.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_250.png")
},
DARK_SHROUD: {
MAX: PIXI.Texture.from("images/tree/rogue_253.png"),
ALLOCATED: PIXI.Texture.from("images/tree/rogue_252.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/rogue_254.png")
}
}
} else if (className == "sorcerer") {
PIXI_TEXTURES = {
...PIXI_TEXTURES,
CHARGED_BOLTS: {
MAX: PIXI.Texture.from("images/tree/sorcerer_2.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_3.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_1.png")
},
TELEPORT: {
MAX: PIXI.Texture.from("images/tree/sorcerer_6.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_7.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_5.png")
},
FIREWALL: {
MAX: PIXI.Texture.from("images/tree/sorcerer_10.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_11.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_9.png")
},
INFERNO: {
MAX: PIXI.Texture.from("images/tree/sorcerer_14.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_15.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_13.png")
},
SPARK: {
MAX: PIXI.Texture.from("images/tree/sorcerer_18.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_19.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_17.png")
},
FIREBALL: {
MAX: PIXI.Texture.from("images/tree/sorcerer_22.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_23.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_21.png")
},
LIGHTNING_SPEAR: {
MAX: PIXI.Texture.from("images/tree/sorcerer_26.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_27.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_25.png")
},
BALL_LIGHTNING: {
MAX: PIXI.Texture.from("images/tree/sorcerer_34.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_35.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_33.png")
},
CHAIN_LIGHTNING: {
MAX: PIXI.Texture.from("images/tree/sorcerer_38.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_39.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_37.png")
},
FLAME_SHIELD: {
MAX: PIXI.Texture.from("images/tree/sorcerer_42.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_43.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_41.png")
},
ICE_ARMOR: {
MAX: PIXI.Texture.from("images/tree/sorcerer_45.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_46.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_47.png")
},
BLIZZARD: {
MAX: PIXI.Texture.from("images/tree/sorcerer_50.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_51.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_49.png")
},
ARC_LASH: {
MAX: PIXI.Texture.from("images/tree/sorcerer_54.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_55.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_53.png")
},
DEEP_FREEZE: {
MAX: PIXI.Texture.from("images/tree/sorcerer_58.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_59.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_57.png")
},
FIRE_BOLT: {
MAX: PIXI.Texture.from("images/tree/sorcerer_66.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_67.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_65.png")
},
FROST_BOLT: {
MAX: PIXI.Texture.from("images/tree/sorcerer_70.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_71.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_69.png")
},
FROST_NOVA: {
MAX: PIXI.Texture.from("images/tree/sorcerer_74.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_75.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_73.png")
},
FROZEN_ORB: {
MAX: PIXI.Texture.from("images/tree/sorcerer_78.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_79.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_77.png")
},
HYDRA: {
MAX: PIXI.Texture.from("images/tree/sorcerer_82.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_83.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_81.png")
},
ICE_BLADES: {
MAX: PIXI.Texture.from("images/tree/sorcerer_86.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_87.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_85.png")
},
ICE_SHARDS: {
MAX: PIXI.Texture.from("images/tree/sorcerer_90.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_91.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_89.png")
},
INCINERATE: {
MAX: PIXI.Texture.from("images/tree/sorcerer_94.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_95.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_93.png")
},
METEOR: {
MAX: PIXI.Texture.from("images/tree/sorcerer_98.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_99.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_97.png")
},
UNSTABLE_CURRENTS: {
MAX: PIXI.Texture.from("images/tree/sorcerer_106.png"),
ALLOCATED: PIXI.Texture.from("images/tree/sorcerer_107.png"),
UNALLOCATED: PIXI.Texture.from("images/tree/sorcerer_105.png")
}
}
}
}
function setNodeStyleThick(curNode) {
const allocatedPoints = curNode.nodeData.get("allocatedPoints");
const searchQueryMatch = curNode.nodeData.get("searchQueryMatch");
const desiredNodeStyle = `thick${allocatedPoints > 0 ? "-allocated" : ""}${searchQueryMatch ? "-match" : ""}`;
if (curNode.activeNodeStyle == desiredNodeStyle) return;
const colorOverride = curNode.nodeData.get("colorOverride");
const _textColor = searchQueryMatch ? searchQueryMatchColor : colorOverride == undefined ? textColor : colorOverride;
let _lineStyleThickSquare = { ...lineStyleThickSquare };
if (searchQueryMatch) {
_lineStyleThickSquare.color = searchQueryMatchColor;
} else if (curNode.groupName == PARAGON_BOARD) {
_lineStyleThickSquare.color = COLOR_OVERRIDE[curNode.nodeData.get("nodeType") == "Socket" ? "Allocated Socket" : "Allocated"];
} else if (colorOverride != undefined) {
_lineStyleThickSquare.color = colorOverride;
}
for (let i = 1, n = curNode.children[0].children.length; i < n; i++) {
const extraText = curNode.children[0].children[i].children[0];
if (extraText == undefined) continue;
extraText.style.fontWeight = "normal";
extraText.style.fill = _textColor;
}
curNode.children[1].style.fill = _textColor;
if (allocatedPoints > 0) curNode.children[1].style.fontWeight = "bold";
if (curNode.children.length > 3) {
curNode.children[2].style.fill = _textColor;
curNode.children[3].children[0].style.fill = _textColor;
curNode.children[4].children[0].style.fill = _textColor;
if (allocatedPoints > 0) {
curNode.children[2].style.fontWeight = "bold";
curNode.children[3].children[0].style.fontWeight = "bold";