|
9 | 9 | logging.basicConfig(level=logging.INFO) |
10 | 10 |
|
11 | 11 |
|
12 | | -@dataclasses.dataclass(frozen=True, slots=True) |
| 12 | +@dataclasses.dataclass(frozen=True) #, slots=True) #, slots breaks becouse its already defined? |
13 | 13 | class Point2D: |
14 | 14 | """Two-dimensional point. Supports subtracting points.""" |
15 | 15 | x: int |
@@ -40,6 +40,42 @@ def __sub__(self, other: Point2D) -> Point2D: |
40 | 40 | "Saboteur": Point2D(10200, -2200), |
41 | 41 | "Ascendant": Point2D(-7800, 7200), |
42 | 42 | } |
| 43 | +EXTRA_NODES = { |
| 44 | + "Necromancer": [{"Node": {"name": "Nine Lives", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/Int.png", "isNotable": True, "skill" : 27602}, |
| 45 | + "offset": Point2D(-1500, -1000)}], |
| 46 | + "Guardian": [{"Node": {"name": "Searing Purity", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/StrInt.png", "isNotable": True, "skill" : 57568}, |
| 47 | + "offset": Point2D(-1000, 1500)}], |
| 48 | + "Berserker": [{"Node": {"name": "Indomitable Resolve", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/Str.png", "isNotable": True, "skill" : 52435}, |
| 49 | + "offset": Point2D(-1000, 0)}], |
| 50 | + "Ascendant": [{"Node": {"name": "Unleashed Potential", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/SkillPoint.png", "skill" : 19355}, |
| 51 | + "offset": Point2D(-1000, 1000)}], |
| 52 | + "Champion": [{"Node": {"name": "Fatal Flourish", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/StrDex.png", "isNotable": True, "skill" : 42469}, |
| 53 | + "offset": Point2D(0, 1000)}], |
| 54 | + "Raider": [{"Node": {"name": "Fury of Nature", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/Dex.png", "isNotable": True, "skill" : 18054}, |
| 55 | + "offset": Point2D(1000, -1500)}], |
| 56 | + "Saboteur": [{"Node": {"name": "Harness the Void", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/DexInt.png", "isNotable": True, "skill" : 57331}, |
| 57 | + "offset": Point2D(1000, -1500)}], |
| 58 | +} |
| 59 | +EXTRA_NODE_IDS = { #these can be any value but for now they are hardcoded to what random numbers generated last time for consistancy, the "hash" value is what we should probs use though as its the value in the ggpk |
| 60 | + "Nine Lives": {"NodeID": 33600, "GroupID" : 44472}, |
| 61 | + "Searing Purity": {"NodeID": 22278, "GroupID" : 50933}, |
| 62 | + "Soul Drinker": {"NodeID": 19264, "GroupID" : 37841, "hash" : 45999}, |
| 63 | + "Harness the Void": {"GroupID" : 37841}, |
| 64 | + "Fury of Nature": {"NodeID": 62630, "GroupID" : 56600}, |
| 65 | + "Fatal Flourish": {"NodeID": 11264, "GroupID" : 63033}, |
| 66 | + "Indomitable Resolve": {"NodeID": 15386, "GroupID" : 25519}, |
| 67 | + "Unleashed Potential": {"NodeID": 55193, "GroupID" : 60495}, |
| 68 | +} |
| 69 | +EXTRA_NODES_STATS = { # these should not be hardcoded here, but should by inserted later via the exporter from the ggpk (they are AsendencySpecialEdlritch in PassiveSkills.dat, though reminder text seems to be missing) |
| 70 | + "Nine Lives": {"stats": ["25% of Damage taken Recouped as Life, Mana and Energy Shield", "Recoup Effects instead occur over 3 seconds"], "reminderText": ["(Only Damage from Hits can be Recouped, over 4 seconds following the Hit)"]}, |
| 71 | + "Searing Purity": {"stats": ["45% of Chaos Damage taken as Fire Damage", "45% of Chaos Damage taken as Lightning Damage"], "reminderText": []}, |
| 72 | + "Soul Drinker": {"stats": ["2% of Damage Leeched as Energy Shield", "20% increased Attack and Cast Speed while Leeching Energy Shield", "Energy Shield Leech effects are not removed when Energy Shield is Filled"], "reminderText": ["(Leeched Energy Shield is recovered over time. Multiple Leeches can occur simultaneously, up to a maximum rate)"]}, |
| 73 | + "Harness the Void": {"stats": ["27% chance to gain 25% of Non-Chaos Damage with Hits as Extra Chaos Damage", "13% chance to gain 50% of Non-Chaos Damage with Hits as Extra Chaos Damage", "7% chance to gain 100% of Non-Chaos Damage with Hits as Extra Chaos Damage"], "reminderText": []}, |
| 74 | + "Fury of Nature" : {"stats": ["Non-Damaging Elemental Ailments you inflict spread to nearby enemies in a radius of 20", "Non-Damaging Elemental Ailments you inflict have 100% more Effect"], "reminderText": ["(Elemental Ailments are Ignited, Scorched, Chilled, Frozen, Brittled, Shocked, and Sapped)"]}, |
| 75 | + "Fatal Flourish": {"stats": ["Final Repeat of Attack Skills deals 60% more Damage", "Non-Travel Attack Skills Repeat an additional Time"], "reminderText": []}, |
| 76 | + "Indomitable Resolve": {"stats": ["Deal 10% less Damage", "Take 25% less Damage"], "reminderText": []}, |
| 77 | + "Unleashed Potential" : {"stats": ["400% increased Endurance, Frenzy and Power Charge Duration", "25% chance to gain a Power, Frenzy or Endurance Charge on Kill", "+1 to Maximum Endurance Charges", "+1 to Maximum Frenzy Charges", "+1 to Maximum Power Charges"], "reminderText": []}, |
| 78 | +} |
43 | 79 |
|
44 | 80 |
|
45 | 81 | def fix_ascendancy_positions(path: os.PathLike) -> None: |
@@ -70,6 +106,17 @@ def fix_ascendancy_positions(path: os.PathLike) -> None: |
70 | 106 | offset = NODE_GROUPS[ascendancy] - ascendancy_starting_point[ascendancy] |
71 | 107 | group["x"] += offset.x |
72 | 108 | group["y"] += offset.y |
| 109 | + for ascendancy in EXTRA_NODES: |
| 110 | + for node in EXTRA_NODES[ascendancy]: |
| 111 | + if str(EXTRA_NODE_IDS[node["Node"]["name"]]["GroupID"]) in data["groups"]: #using hardcoded value from last time, can use another method instead, like just grabbing the next avalible value |
| 112 | + print("GroupID already taken") |
| 113 | + return |
| 114 | + node["Node"]["group"] = EXTRA_NODE_IDS[node["Node"]["name"]]["GroupID"] |
| 115 | + data["groups"][node["Node"]["group"]] = {"x": NODE_GROUPS[ascendancy].x + node["offset"].x, "y": NODE_GROUPS[ascendancy].y + node["offset"].y, "orbits": [0], "nodes": [node["Node"]["skill"]]} |
| 116 | + data["nodes"][node["Node"]["skill"]] = node["Node"] | {"ascendancyName": ascendancy, "orbit": 0, "orbitIndex": 0, "out": [], "in": [], "stats": [], "reminderText": []} |
| 117 | + if node["Node"]["name"] in EXTRA_NODES_STATS: |
| 118 | + data["nodes"][node["Node"]["skill"]]["stats"] = EXTRA_NODES_STATS[node["Node"]["name"]]["stats"] |
| 119 | + data["nodes"][node["Node"]["skill"]]["reminderText"] = EXTRA_NODES_STATS[node["Node"]["name"]]["reminderText"] |
73 | 120 | with open(path, "w", encoding="utf-8") as o: |
74 | 121 | json.dump(data, o, indent=4) |
75 | 122 |
|
|
0 commit comments