Skip to content

Commit

Permalink
Revert "Squashed commit of the following:"
Browse files Browse the repository at this point in the history
This reverts commit 1d7c641.
  • Loading branch information
QuickStick123 committed Aug 14, 2022
1 parent 3345c74 commit b0ebcd7
Show file tree
Hide file tree
Showing 45 changed files with 495 additions and 130,274 deletions.
49 changes: 1 addition & 48 deletions fix_ascendancy_positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
logging.basicConfig(level=logging.INFO)


@dataclasses.dataclass(frozen=True) #, slots=True) #, slots breaks becouse its already defined?
@dataclasses.dataclass(frozen=True, slots=True)
class Point2D:
"""Two-dimensional point. Supports subtracting points."""
x: int
Expand Down Expand Up @@ -40,42 +40,6 @@ def __sub__(self, other: Point2D) -> Point2D:
"Saboteur": Point2D(10200, -2200),
"Ascendant": Point2D(-7800, 7200),
}
EXTRA_NODES = {
"Necromancer": [{"Node": {"name": "Nine Lives", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/Int.png", "isNotable": True, "skill" : 27602},
"offset": Point2D(-1500, -1000)}],
"Guardian": [{"Node": {"name": "Searing Purity", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/StrInt.png", "isNotable": True, "skill" : 57568},
"offset": Point2D(-1000, 1500)}],
"Berserker": [{"Node": {"name": "Indomitable Resolve", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/Str.png", "isNotable": True, "skill" : 52435},
"offset": Point2D(-1000, 0)}],
"Ascendant": [{"Node": {"name": "Unleashed Potential", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/SkillPoint.png", "skill" : 19355},
"offset": Point2D(-1000, 1000)}],
"Champion": [{"Node": {"name": "Fatal Flourish", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/StrDex.png", "isNotable": True, "skill" : 42469},
"offset": Point2D(0, 1000)}],
"Raider": [{"Node": {"name": "Fury of Nature", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/Dex.png", "isNotable": True, "skill" : 18054},
"offset": Point2D(1000, -1500)}],
"Saboteur": [{"Node": {"name": "Harness the Void", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/DexInt.png", "isNotable": True, "skill" : 57331},
"offset": Point2D(1000, -1500)}],
}
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
"Nine Lives": {"NodeID": 33600, "GroupID" : 44472},
"Searing Purity": {"NodeID": 22278, "GroupID" : 50933},
"Soul Drinker": {"NodeID": 19264, "GroupID" : 37841, "hash" : 45999},
"Harness the Void": {"GroupID" : 37841},
"Fury of Nature": {"NodeID": 62630, "GroupID" : 56600},
"Fatal Flourish": {"NodeID": 11264, "GroupID" : 63033},
"Indomitable Resolve": {"NodeID": 15386, "GroupID" : 25519},
"Unleashed Potential": {"NodeID": 55193, "GroupID" : 60495},
}
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)
"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)"]},
"Searing Purity": {"stats": ["45% of Chaos Damage taken as Fire Damage", "45% of Chaos Damage taken as Lightning Damage"], "reminderText": []},
"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)"]},
"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": []},
"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)"]},
"Fatal Flourish": {"stats": ["Final Repeat of Attack Skills deals 60% more Damage", "Non-Travel Attack Skills Repeat an additional Time"], "reminderText": []},
"Indomitable Resolve": {"stats": ["Deal 10% less Damage", "Take 25% less Damage"], "reminderText": []},
"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": []},
}


def fix_ascendancy_positions(path: os.PathLike) -> None:
Expand Down Expand Up @@ -106,17 +70,6 @@ def fix_ascendancy_positions(path: os.PathLike) -> None:
offset = NODE_GROUPS[ascendancy] - ascendancy_starting_point[ascendancy]
group["x"] += offset.x
group["y"] += offset.y
for ascendancy in EXTRA_NODES:
for node in EXTRA_NODES[ascendancy]:
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
print("GroupID already taken")
return
node["Node"]["group"] = EXTRA_NODE_IDS[node["Node"]["name"]]["GroupID"]
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"]]}
data["nodes"][node["Node"]["skill"]] = node["Node"] | {"ascendancyName": ascendancy, "orbit": 0, "orbitIndex": 0, "out": [], "in": [], "stats": [], "reminderText": []}
if node["Node"]["name"] in EXTRA_NODES_STATS:
data["nodes"][node["Node"]["skill"]]["stats"] = EXTRA_NODES_STATS[node["Node"]["name"]]["stats"]
data["nodes"][node["Node"]["skill"]]["reminderText"] = EXTRA_NODES_STATS[node["Node"]["name"]]["reminderText"]
with open(path, "w", encoding="utf-8") as o:
json.dump(data, o, indent=4)

Expand Down
25 changes: 5 additions & 20 deletions src/Classes/PassiveSpec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ function PassiveSpecClass:AllocateMasteryEffects(masteryEffects)
self.tree:ProcessStats(self.allocNodes[id])
self.masterySelections[id] = effectId
self.allocatedMasteryCount = self.allocatedMasteryCount + 1
if not self.allocatedMasteryTypes[self.allocNodes[id].name] then
self.allocatedMasteryTypes[self.allocNodes[id].name] = true
self.allocatedMasteryTypeCount = self.allocatedMasteryTypeCount + 1
end
end
end

Expand Down Expand Up @@ -853,25 +849,14 @@ function PassiveSpecClass:BuildAllDependsAndPaths()
-- Add selected mastery effect mods to mastery nodes
self.allocatedMasteryCount = 0
self.allocatedNotableCount = 0
self.allocatedMasteryTypes = { }
self.allocatedMasteryTypeCount = 0
for id, node in pairs(self.nodes) do
if node.type == "Mastery" and self.masterySelections[id] then
local effect = self.tree.masteryEffects[self.masterySelections[id]]
if effect then
node.sd = effect.sd
node.allMasteryOptions = false
node.reminderText = { "Tip: Right click to select a different effect" }
self.tree:ProcessStats(node)
self.allocatedMasteryCount = self.allocatedMasteryCount + 1
if not self.allocatedMasteryTypes[node.name] then
self.allocatedMasteryTypes[node.name] = true
self.allocatedMasteryTypeCount = self.allocatedMasteryTypeCount + 1
end
else
self.nodes[id].alloc = false
self.allocNodes[id] = nil
end
node.sd = effect.sd
node.allMasteryOptions = false
node.reminderText = { "Tip: Right click to select a different effect" }
self.tree:ProcessStats(node)
self.allocatedMasteryCount = self.allocatedMasteryCount + 1
elseif node.type == "Mastery" then
self:AddMasteryEffectOptionsToNode(node)
elseif node.type == "Notable" and node.alloc then
Expand Down
17 changes: 0 additions & 17 deletions src/Classes/PassiveTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,6 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
self.orbitAnglesByOrbit[orbit] = self:CalcOrbitAngles(skillsInOrbit)
end

if versionNum >= 3.19 then
local treeTextOLD
local treeFileOLD = io.open("TreeData/".. "3_18" .."/tree.lua", "r")
if treeFileOLD then
treeTextOLD = treeFileOLD:read("*a")
treeFileOLD:close()
end
local temp = {}
for k, v in pairs(assert(loadstring(treeTextOLD))()) do
temp[k] = v
end
self.assets = temp.assets
self.skillSprites = self.sprites
end
ConPrintf("Loading passive tree assets...")
for name, data in pairs(self.assets) do
self:LoadImage(name..".png", cdnRoot..(data[0.3835] or data[1]), data, not name:match("[OL][ri][bn][ie][tC]") and "ASYNC" or nil)--, not name:match("[OL][ri][bn][ie][tC]") and "MIPMAP" or nil)
Expand All @@ -151,9 +137,6 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
local spriteSheets = { }
for type, data in pairs(self.skillSprites) do
local maxZoom = data[#data]
if versionNum >= 3.19 then
maxZoom = data[0.3835] or data[1]
end
local sheet = spriteSheets[maxZoom.filename]
if not sheet then
sheet = { }
Expand Down
4 changes: 2 additions & 2 deletions src/Classes/SkillSetListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function SkillSetListClass:OnSelDelete(index, skillSetId)
if #self.list > 1 then
main:OpenConfirmPopup("Delete Item Set", "Are you sure you want to delete '"..(skillSet.title or "Default").."'?", "Delete", function()
t_remove(self.list, index)
self.skillsTab.skillSets[skillSetId] = nil
t_remove(self.skillsTab.skillSets, skillSetId)
self.selIndex = nil
self.selValue = nil
if skillSetId == self.skillsTab.activeSkillSetId then
Expand All @@ -115,4 +115,4 @@ function SkillSetListClass:OnSelKeyDown(index, skillSetId, key)
if key == "F2" then
self:RenameSet(skillSetId)
end
end
end

0 comments on commit b0ebcd7

Please sign in to comment.