Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Openarl committed Apr 5, 2017
2 parents 74ced69 + b89d521 commit 710aa4f
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 13 deletions.
67 changes: 66 additions & 1 deletion Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,44 @@ You can get this from your web browser's cookies while logged into the Path of E
self.controls.generateCodeCopy.enabled = function()
return #self.controls.generateCodeOut.buf > 0
end
self.controls.generateCodeNote = common.New("LabelControl", {"TOPLEFT",self.controls.generateCodeOut,"BOTTOMLEFT"}, 0, 4, 0, 14, "^7Note: this code can be very long; it may be easiest to share it using Pastebin or similar.")
self.controls.generateCodePastebin = common.New("ButtonControl", {"LEFT",self.controls.generateCodeCopy,"RIGHT"}, 8, 0, 140, 20, "Share with Pastebin", function()
local id = LaunchSubScript([[
local code = ...
local curl = require("lcurl.safe")
local page = ""
local easy = curl.easy()
easy:setopt_url("https://pastebin.com/api/api_post.php")
easy:setopt(curl.OPT_POST, true)
easy:setopt(curl.OPT_POSTFIELDS, "api_dev_key=c4757f22e50e65e21c53892fd8e0a9ff&api_option=paste&api_paste_code="..code)
easy:setopt_writefunction(function(data)
page = page..data
return true
end)
easy:perform()
easy:close()
if page:match("pastebin.com") then
return page
else
return nil, page
end
]], "", "", self.controls.generateCodeOut.buf)
if id then
self.controls.generateCodeOut:SetText("")
self.controls.generateCodePastebin.label = "Creating paste..."
launch:RegisterSubScript(id, function(pasteLink, errMsg)
self.controls.generateCodePastebin.label = "Share with Pastebin"
if errMsg then
main:OpenMessagePopup("Pastebin.com", "Error creating paste:\n"..errMsg)
else
self.controls.generateCodeOut:SetText(pasteLink)
end
end)
end
end)
self.controls.generateCodePastebin.enabled = function()
return #self.controls.generateCodeOut.buf > 0 and not self.controls.generateCodeOut.buf:match("pastebin%.com")
end
self.controls.generateCodeNote = common.New("LabelControl", {"TOPLEFT",self.controls.generateCodeOut,"BOTTOMLEFT"}, 0, 4, 0, 14, "^7Note: this code can be very long; you can use 'Share with Pastebin' to shrink it.")
self.controls.importCodeHeader = common.New("LabelControl", {"TOPLEFT",self.controls.generateCodeNote,"BOTTOMLEFT"}, 0, 26, 0, 16, "^7To import a build, enter the code here:")
self.controls.importCodeIn = common.New("EditControl", {"TOPLEFT",self.controls.importCodeHeader,"BOTTOMLEFT"}, 0, 4, 250, 20, "", nil, "^%w_%-=", nil, function(buf)
if #buf == 0 then
Expand All @@ -146,6 +183,34 @@ You can get this from your web browser's cookies while logged into the Path of E
self.controls.importCodeState.label = function()
return (self.importCodeState == "VALID" and data.colorCodes.POSITIVE.."Code is valid") or (self.importCodeState == "INVALID" and data.colorCodes.NEGATIVE.."Invalid code") or ""
end
self.controls.importCodePastebin = common.New("ButtonControl", {"LEFT",self.controls.importCodeIn,"RIGHT"}, 90, 0, 160, 20, "Import from Pastebin...", function()
local controls = { }
controls.editLabel = common.New("LabelControl", nil, 0, 20, 0, 16, "Enter Pastebin.com link:")
controls.edit = common.New("EditControl", nil, 0, 40, 250, 18, "", nil, nil, nil, function(buf)
controls.msg.label = ""
end)
controls.msg = common.New("LabelControl", nil, 0, 58, 0, 16, "")
controls.import = common.New("ButtonControl", nil, -45, 80, 80, 20, "Import", function()
controls.import.enabled = false
controls.msg.label = "Retrieving paste..."
launch:DownloadPage(controls.edit.buf:gsub("pastebin%.com/(%w+)$","pastebin.com/raw/%1"), function(page, errMsg)
if errMsg then
controls.msg.label = "^1"..errMsg
controls.import.enabled = true
else
self.controls.importCodeIn:SetText(page, true)
main:ClosePopup()
end
end)
end)
controls.import.enabled = function()
return #controls.edit.buf > 0 and controls.edit.buf:match("pastebin%.com/%w+")
end
controls.cancel = common.New("ButtonControl", nil, 45, 80, 80, 20, "Cancel", function()
main:ClosePopup()
end)
main:OpenPopup(280, 110, "Import from Pastebin", controls, "import", "edit")
end)
self.controls.importCodeMode = common.New("DropDownControl", {"TOPLEFT",self.controls.importCodeIn,"BOTTOMLEFT"}, 0, 4, 160, 20, { "Import to this build", "Import to a new build:" })
self.controls.importCodeMode.enabled = function()
return self.importCodeState == "VALID" and self.build.dbFileName
Expand Down
2 changes: 1 addition & 1 deletion Data/Bases/amulet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ itemBases["Splitnewt Talisman"] = {
itemBases["Wereclaw Talisman"] = {
type = "Amulet",
subType = "Talisman",
implicit = "+(16-24)% to Global Critical Strike Multiplier",
implicit = "+(24-36)% to Global Critical Strike Multiplier",
}
itemBases["Longtooth Talisman"] = {
type = "Amulet",
Expand Down
2 changes: 1 addition & 1 deletion Data/New.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Requires Level 8
Implicits: 0
During Flask Effect, 10% reduced Damage taken of each Element for which your Uncapped
Elemental Resistance is lowest
During Flask Effect, Damage Penetrates 20% of Resistance of each Element for which your
During Flask Effect, Damage Penetrates 20% Resistance of each Element for which your
Uncapped Elemental Resistance is highest
]],[[
Ahn's Heritage
Expand Down
6 changes: 5 additions & 1 deletion Data/Uniques/amulet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,14 @@ Cannot gain Power Charges
]],[[
Rigwald's Curse
Wereclaw Talisman
Variant: Pre 2.2.0
Variant: Current
League: Talisman Standard
Requires Level 28
Talisman Tier: 2
+(16-24)% to Global Critical Strike Multiplier
Implicits: 2
{variant:1}+(16-24)% to Global Critical Strike Multiplier
{variant:2}+(24-36)% to Global Critical Strike Multiplier
+7% Base Unarmed Critical Strike Chance
Modifiers to Claw Damage also apply to Unarmed
Modifiers to Claw Attack Speed also apply to Unarmed
Expand Down
24 changes: 24 additions & 0 deletions Modules/Calcs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,30 @@ local function performCalcs(env)
end
end
end
if modDB:Sum("FLAG", nil, "ClawDamageAppliesToUnarmed") then
-- Claw Damage conversion from Rigwald's Curse
for i, mod in ipairs(modDB.mods.PhysicalDamage or { }) do
if band(mod.flags, ModFlag.Claw) ~= 0 then
modDB:NewMod("PhysicalDamage", mod.type, mod.value, mod.source, bor(band(mod.flags, bnot(ModFlag.Claw)), ModFlag.Unarmed), mod.keywordFlags, unpack(mod.tagList))
end
end
end
if modDB:Sum("FLAG", nil, "ClawAttackSpeedAppliesToUnarmed") then
-- Claw Attack Speed conversion from Rigwald's Curse
for i, mod in ipairs(modDB.mods.Speed or { }) do
if band(mod.flags, ModFlag.Claw) ~= 0 and band(mod.flags, ModFlag.Attack) ~= 0 then
modDB:NewMod("Speed", mod.type, mod.value, mod.source, bor(band(mod.flags, bnot(ModFlag.Claw)), ModFlag.Unarmed), mod.keywordFlags, unpack(mod.tagList))
end
end
end
if modDB:Sum("FLAG", nil, "ClawCritChanceAppliesToUnarmed") then
-- Claw Crit Chance conversion from Rigwald's Curse
for i, mod in ipairs(modDB.mods.CritChance or { }) do
if band(mod.flags, ModFlag.Claw) ~= 0 then
modDB:NewMod("CritChance", mod.type, mod.value, mod.source, bor(band(mod.flags, bnot(ModFlag.Claw)), ModFlag.Unarmed), mod.keywordFlags, unpack(mod.tagList))
end
end
end

local isAttack = (env.mode_skillType == "ATTACK")

Expand Down
5 changes: 4 additions & 1 deletion Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ local specialModList = {
["socketed lightning spells have (%d+)%% increased spell damage if triggered"] = function(num) return { mod("Damage", "INC", num, nil, ModFlag.Spell, { type = "SocketedIn", keyword = "lightning" }, { type = "Condition", var = "SkillIsTriggered" }) } end,
["arrows always pierce"] = { mod("PierceChance", "BASE", 100, nil, ModFlag.Attack) },
["arrows that pierce cause bleeding"] = { flag("ArrowsThatPierceCauseBleeding") },
["during flask effect, damage penetrates (%d+)%% of resistance of each element for which your uncapped elemental resistance is highest"] = function(num) return {
["during flask effect, damage penetrates (%d+)%% o?f? ?resistance of each element for which your uncapped elemental resistance is highest"] = function(num) return {
mod("LightningPenetration", "BASE", num, { type = "Condition", var = "UncappedLightningResistIsHighest" }),
mod("ColdPenetration", "BASE", num, { type = "Condition", var = "UncappedColdResistIsHighest" }),
mod("FirePenetration", "BASE", num, { type = "Condition", var = "UncappedFireResistIsHighest" }),
Expand All @@ -746,6 +746,9 @@ local specialModList = {
["cannot leech mana"] = { flag("CannotLeechMana") },
["cannot leech when on low life"] = { flag("CannotLeechLife", { type = "Condition", var = "LowLife" }), flag("CannotLeechMana", { type = "Condition", var = "LowLife" }) },
["cannot leech life from critical strikes"] = { flag("CannotLeechLife", { type = "Condition", var = "CriticalStrike" }) },
["modifiers to claw damage also apply to unarmed"] = { flag("ClawDamageAppliesToUnarmed") },
["modifiers to claw attack speed also apply to unarmed"] = { flag("ClawAttackSpeedAppliesToUnarmed") },
["modifiers to claw critical strike chance also apply to unarmed"] = { flag("ClawCritChanceAppliesToUnarmed") },
}
local keystoneList = {
-- List of keystones that can be found on uniques
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ Head over to the [Releases](https://github.com/Openarl/PathOfBuilding/releases)
![ss3](https://cloud.githubusercontent.com/assets/19189971/18089780/f0ff234a-6f04-11e6-8c88-6193fe59a5c4.png)

## Changelog
### 1.3.25 - 2017/04/06
* You can now export and import builds directly to/from Pastebin.com links
* Added support for the "Claw X also apply to Unarmed" modifiers on Rigwald's Curse
* The conditional penetration modifier on imported copies of The Wise Oak should now be recognised correctly

### 1.3.24 - 2017/04/05
This update adds support for Life/Mana Leech and Life/Mana/ES Gain on Hit:
* All sources of Leech and Gain on Hit are supported, including "Damage dealt by your Totems is Leeched to you"
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
VERSION[1.3.25][2017/04/06]
* You can now export and import builds directly to/from Pastebin.com links
* Added support for the "Claw X also apply to Unarmed" modifiers on Rigwald's Curse
* The conditional penetration modifier on imported copies of The Wise Oak should now be recognised correctly
VERSION[1.3.24][2017/04/05]
This update adds support for Life/Mana Leech and Life/Mana/ES Gain on Hit:
* All sources of Leech and Gain on Hit are supported, including "Damage dealt by your Totems is Leeched to you"
Expand Down
16 changes: 8 additions & 8 deletions manifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<PoBVersion>
<Version number="1.3.24"/>
<Version number="1.3.25"/>
<Source part="program" url="https://raw.githubusercontent.com/Openarl/PathOfBuilding/{branch}/"/>
<Source part="tree" url="https://raw.githubusercontent.com/Openarl/PathOfBuilding/{branch}/tree.zip"/>
<Source url="https://raw.githubusercontent.com/Openarl/PathOfBuilding/{branch}/runtime-win32.zip" part="runtime" platform="win32"/>
<File sha1="7912b22666567d5f0ff46378f5cb22e589e84efd" name="Launch.lua" part="program"/>
<File sha1="d8e42beeb38baabcc197d658e4c0af33419eeff3" name="UpdateCheck.lua" part="program"/>
<File sha1="4f17937f2b37784e169a3792b235f2a0a3961e61" name="UpdateApply.lua" part="program"/>
<File sha1="5d0b732beabd4638a96dd2b94ea57be64978a314" name="changelog.txt" part="program"/>
<File sha1="0c8ae9ffc96e8a466b85bb4230bab8e8cb6eda75" name="changelog.txt" part="program"/>
<File sha1="74fff9f369b6e2c98cfdf978c251c9828bcf39dc" name="Classes/BuildListControl.lua" part="program"/>
<File sha1="deffd663ba726d938fcbe2870aab8a4e982587fa" name="Classes/ButtonControl.lua" part="program"/>
<File sha1="ec81fc6c0ee4a4d228f88ec165a0bc7e994278bc" name="Classes/CalcBreakdownControl.lua" part="program"/>
Expand All @@ -20,7 +20,7 @@
<File sha1="9f05f72260f896eea09c1a8fb28f58973ce4d3ff" name="Classes/DropDownControl.lua" part="program"/>
<File sha1="b9ac0558364612a1f439c830ea0569e3fae673cb" name="Classes/EditControl.lua" part="program"/>
<File sha1="1f3e330b2f7df3e3ed4aec32c939e6355b2a50e8" name="Classes/GemSelectControl.lua" part="program"/>
<File sha1="ee5e12ecfca6d69becad050af6b5c70fcc2e5a96" name="Classes/ImportTab.lua" part="program"/>
<File sha1="17826e2a2e545280ae97a7aa742d6a096fd2c71c" name="Classes/ImportTab.lua" part="program"/>
<File sha1="973a8e8aef65bcaf71812707fb671ee090b67793" name="Classes/ItemDBControl.lua" part="program"/>
<File sha1="5ecb01b4b82c19420b15a116027e00530f673045" name="Classes/ItemListControl.lua" part="program"/>
<File sha1="bda86df3dca469c831eb6d0bc2721d73cf3096b1" name="Classes/ItemSlotControl.lua" part="program"/>
Expand All @@ -44,21 +44,21 @@
<File sha1="4b7675c8b4fe71cade7dd3d70793df1ed8022d01" name="Classes/UndoHandler.lua" part="program"/>
<File sha1="7d0513cd27337b904889dc34b651163a81c34eaa" name="Modules/Build.lua" part="program"/>
<File sha1="8a07fe01c53b785ebb6256236e781fbaabd36c0e" name="Modules/BuildList.lua" part="program"/>
<File sha1="9dfa707a103425eae4d831c6d4af00e982b5db73" name="Modules/Calcs.lua" part="program"/>
<File sha1="8a4c1896b22b0d24105dd508a556d68dc5ac036f" name="Modules/Calcs.lua" part="program"/>
<File sha1="f6334814e7e478bcdfd467c945aaccff1790fcc5" name="Modules/CalcSections.lua" part="program"/>
<File sha1="761af85f3e1c5601fdb790356a09aefe2f5a64e3" name="Modules/Common.lua" part="program"/>
<File sha1="c8ef5bcd468ad851cf48fbef48680c963a748a6b" name="Modules/Data.lua" part="program"/>
<File sha1="06088f7cb8a4080a530f257e64e3c4ecbd1dd628" name="Modules/ItemTools.lua" part="program"/>
<File sha1="5a276cfd0bad3ce60585edf734420943c632a9cb" name="Modules/Main.lua" part="program"/>
<File sha1="d95e24efad45e163d94fc90b498add35ccf144a8" name="Modules/ModParser.lua" part="program"/>
<File sha1="70c074d5d5307de540fbeda6eff46d015a1582fe" name="Modules/ModParser.lua" part="program"/>
<File sha1="b906cad5c54d675f680096caef514bd1bd2a7681" name="Modules/ModTools.lua" part="program"/>
<File sha1="e7ee7e5b6388facb7bf568517ecc401590757df7" name="Assets/ring.png" part="program"/>
<File sha1="9a320bfe629b1cf3f14fc77fbbf2508d0a5b2841" name="Assets/small_ring.png" part="program"/>
<File sha1="4a2651bfcb3beb6fe8b9acab18a6792072f7e9b4" name="Data/EnchantmentBoots.lua" part="program"/>
<File sha1="b305198cafc6800aa5556da07a5eea699c718d3b" name="Data/EnchantmentHelmet.lua" part="program"/>
<File sha1="d06292de8b169e3adedc7fda69edae6ac466442e" name="Data/ModFlask.lua" part="program"/>
<File sha1="15664631a501d837c5c6796217c663457f115bb1" name="Data/ModJewel.lua" part="program"/>
<File sha1="57e45a4b184fb5822e49b5c9be0c7f75b7dd48f7" name="Data/New.lua" part="program"/>
<File sha1="d57c1505a06530c9f4d273edbfc5d44213e967be" name="Data/New.lua" part="program"/>
<File sha1="0d6e592ba125e721062cf1d388aa5eccd44703f1" name="Data/Rares.lua" part="program"/>
<File sha1="a2273c4018e15bce0fdc47ef4c8ce32e995fb410" name="Data/Gems/act_dex.lua" part="program"/>
<File sha1="d6234b37154d78b920c88a602f2d3770aabdb8ca" name="Data/Gems/act_int.lua" part="program"/>
Expand All @@ -67,7 +67,7 @@
<File sha1="4e82aafe55b1ef7a42e590f6fd6d30ca8430d15b" name="Data/Gems/sup_dex.lua" part="program"/>
<File sha1="9dea051759cc611f03c773264faac19ab8cfed92" name="Data/Gems/sup_int.lua" part="program"/>
<File sha1="d3a3d28df6efe5baa96c89f1628c818c8e18061f" name="Data/Gems/sup_str.lua" part="program"/>
<File sha1="8163089cecf7253ec1f5d658141de81bc6e4046c" name="Data/Bases/amulet.lua" part="program"/>
<File sha1="91ba12a1eeb94fa8d20e959a4d3b97a8dafab0b6" name="Data/Bases/amulet.lua" part="program"/>
<File sha1="9871414663d5da9fa564f959e42dcdc22c66f486" name="Data/Bases/axe.lua" part="program"/>
<File sha1="8504a4003c30cdfb94f354faa2789de7712cee1c" name="Data/Bases/belt.lua" part="program"/>
<File sha1="14a674f0b530fb7604580165db93cd8944f33843" name="Data/Bases/body.lua" part="program"/>
Expand All @@ -86,7 +86,7 @@
<File sha1="167ef0fa2bc11e9b48030d351e8a83fe6c898b4e" name="Data/Bases/staff.lua" part="program"/>
<File sha1="4fbaf5151664b31057bebab733ba8537a4388a66" name="Data/Bases/sword.lua" part="program"/>
<File sha1="8ef2fa5612846d7795aabe655b36a0fd46ad8260" name="Data/Bases/wand.lua" part="program"/>
<File sha1="6dcd3fdd4466645513d14c8af638c9f665514901" name="Data/Uniques/amulet.lua" part="program"/>
<File sha1="886d02b814d3c311e2c6dc0ad2dab644f4095a6d" name="Data/Uniques/amulet.lua" part="program"/>
<File sha1="595e3816af08514a6d86b53f737bff913d953c69" name="Data/Uniques/axe.lua" part="program"/>
<File sha1="5b4826e6f9242b68a4fe3f008bdd1204cda58f85" name="Data/Uniques/belt.lua" part="program"/>
<File sha1="7ecea8e2420fdcab13e0338c2491eb802d7f8e74" name="Data/Uniques/body.lua" part="program"/>
Expand Down

0 comments on commit 710aa4f

Please sign in to comment.