Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New stuff from Ancestor To Do #6288

Merged
merged 20 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions src/Classes/ModStore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ function ModStoreClass:EvalMod(mod, cfg)
if tag.actor then
target = self.actor[tag.actor] and self.actor[tag.actor].modDB
end
if target then
if target and (tag.var or tag.varList) then
if tag.varList then
for _, var in pairs(tag.varList) do
if target:GetCondition(var, cfg) then
Expand All @@ -524,7 +524,7 @@ function ModStoreClass:EvalMod(mod, cfg)
else
match = target:GetCondition(tag.var, cfg)
end
elseif tag.actor and cfg and tag.var == nil and tag.varList == nil and tag.actor == cfg.actor then
elseif tag.actor and cfg and tag.actor == cfg.actor then
match = true
end
if tag.neg then
Expand All @@ -534,35 +534,51 @@ function ModStoreClass:EvalMod(mod, cfg)
return
end
elseif tag.type == "ItemCondition" then
local matches = {}
local match = false
local searchCond = tag.var
local itemSlot = tag.itemSlot:gsub("(%l)(%w*)", function(a,b) return string.upper(a)..b end):gsub('^%s*(.-)%s*$', '%1')
local bCheckAllAppropriateSlots = tag.allSlots
if searchCond and itemSlot then
local searchCond = tag.searchCond
local rarityCond = tag.rarityCond
local allSlots = tag.allSlots
local itemSlot = tag.itemSlot:lower():gsub("(%l)(%w*)", function(a,b) return string.upper(a)..b end):gsub('^%s*(.-)%s*$', '%1')
local bCheckAllAppropriateSlots = tag.bothSlots
local items
if allSlots then
items = self.actor.itemList
elseif self.actor.itemList then
items = {self.actor.itemList[itemSlot] or (cfg and cfg.item)}
if bCheckAllAppropriateSlots then
local match1 = false
local match2 = false
local itemSlot1 = self.actor.itemList[itemSlot .. " 1"]
local itemSlot2 = self.actor.itemList[itemSlot .. " 2"]
if itemSlot1 and itemSlot1.name:match("Kalandra's Touch") then itemSlot1 = itemSlot2 end
if itemSlot2 and itemSlot2.name:match("Kalandra's Touch") then itemSlot2 = itemSlot1 end
if itemSlot1 then
match1 = itemSlot1:FindModifierSubstring(searchCond:lower(), itemSlot:lower())
if itemSlot1 and itemSlot2 then
t_insert(items, itemSlot1)
t_insert(items, itemSlot2)
end
if itemSlot2 then
match2 = itemSlot2:FindModifierSubstring(searchCond:lower(), itemSlot:lower())
end
end
if items and #items > 0 or allSlots then
if searchCond then
for slot, item in pairs(items) do
if slot ~= itemSlot or not tag.excludeSelf then
t_insert(matches, item:FindModifierSubstring(searchCond:lower(), itemSlot:lower()))
end
end
match = match1 and match2
else
if self.actor.itemList[itemSlot] then
match = self.actor.itemList[itemSlot]:FindModifierSubstring(searchCond:lower(), itemSlot:lower())
end
if rarityCond then
for _, item in pairs(items) do
t_insert(matches, item.rarity == rarityCond)
end
end
end
if tag.neg then
match = not match
for _, bool in ipairs(matches) do
if bool then
match = not tag.neg
break
end
match = tag.neg == true
end
if not match then
if not match and #matches > 0 then
return
end
elseif tag.type == "SocketedIn" then
Expand Down
41 changes: 40 additions & 1 deletion src/Data/Uniques/Special/New.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,46 @@
data.uniques.new = {

-- New

[[
Kitava's Hunger
Majestic Plate
(60-100)% increased Armour
Recover (1-3)% of Life on Kill
(30-40)% Increased Stun and Block Recovery
+(700-1000) to maximum Life if there are no Life Modifiers on other Equipped items
]],
[[
Arohongui's Tending
Coral Amulet
Implicits: 1
{tags:life}Regenerate (2-4) Life per second
{tags:mana}Regenerate (3-5) Mana per second
{tags:life}(30-40)% increased Life Recovery from Flasks
{tags:mana}(15-30)% increased Mana Recovery from Flasks
Life Flasks used while on Low Life apply Recovery Instantly
Mana Flasks used while on Low Mana apply Recovery Instantly
]],
[[
Bound Fate
Cloth Belt
{tags:jewellery_attribute}+(20-30) to Dexterity
{tags:jewellery_attribute}+(20-30) to Intelligence
{tags:life}+(60-80) to Maximum Life
Every 5 seconds, gain one of the following for 5 seconds:
Your Hits are always Critical Strikes
Hits against you always are Critical Strikes
Attacks cannot Hit you
Attacks against you always Hit
Your Damage with Hits is Lucky
Damage of Hits against you is Lucky
]],[[
Maata's Teaching
Karui Sceptre
+(30-40) to Intelligence
(25-50)% increased Critical Strike Chance
+2 to Level of all Minion Skill Gems
Minions' Base Attack Critical Strike Chance is equal to the Critical Strike Chance of your Main Hand Weapon"
]],
-- Reworked

}
1 change: 1 addition & 0 deletions src/Data/Uniques/boots.lua
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ Adds 1 to 80 Chaos Damage to Attacks
{variant:2}25% increased Movement Speed
{variant:1}+1 to Maximum number of Skeletons
{variant:2}Summoned Skeleton Warriors are Permanent and Follow you
{variant:2}Summon Skeletons cannot Summon more than 1 Skeleton Warrior
]],[[
Replica Alberon's Warpath
Soldier Boots
Expand Down
Loading
Loading