Fixes unsupported Thorns calculations and related support interactions#1778
Fixes unsupported Thorns calculations and related support interactions#1778DS-Koala wants to merge 9 commits intoPathOfBuildingCommunity:devfrom
Conversation
|
Made a small tweak to future-proof the Thorns skill; it will now be displayed if you have any source of "PhysicalThornsMin", "ChaosThornsMax", etc. |
| thorns = true, | ||
| }, | ||
| baseMods = { | ||
| flag("CannotBleed"), |
There was a problem hiding this comment.
I believe this is incorrect (though there is no way to demonstrate it available in-game right now). Rather, the issue is that the player’s modifiers that increase the chance of an ailment, or that guarantee that you inflict an ailment, don’t apply to Thorns. I would have to double-check (been a while since I tested it) but I believe effects changing ailment magnitudes are also ignored.
So chill, freeze, flammability, ignite, and shock can happen because cold, fire, and lightning damage have an inherent chance to do those things. Bleed and poison cannot happen because physical and poison damage have no inherent ability to inflict them, and everything that would add them doesn’t apply to Thorns.
I mention this because
- future-proofing, in case some ability to bleed or poison with Thorns becomes available
- your calculations for the chances of other ailments are wrong if they’re not ignoring those mods
I think ailment calculations are going to have to be redone for, or have a special case for, Thorns hits. This applies both to the default Retaliate with Thorns, and Barbs or Quill Burst.
| -- Thorns | ||
|
|
||
| -- Thorns base damage | ||
| ["(%d+) to (%d+) physical thorns damage"] = function(_, minStr, maxStr) |
There was a problem hiding this comment.
Newbie question: can we just use
["(%d+) to (%d+) (%a) thorns damage"] = function(_, minStr, maxStr, typeStr)
return {
flag("GrantsThorns"),
mod(typeStr .. "ThornsMin", "BASE", tonumber(minStr)),
mod(typeStr .. "ThornsMax", "BASE", tonumber(maxStr)),
}
end,
here? I suppose there’s a risk of a non-(phys/cold/lightning/fire/chaos) entry here, but that seems small.
…chance to ignore Enemy Armour)
Changed the calcs to use a ModFlag as it reduces the amount of extra code required Still need to fix implementation for when Thorns damage is applied to hits
Adds support for thorns as a standalone damage source and connects that to relevant support interactions. There is now a "Thorns" skill that will appear if you have thorns damage in your build.
Also added a config checkbox for "Currently Shapeshifted?", since shapeshifting isn't only used for active skills (defensive stats and the "Rough Carapace" node check to see if you're shapeshifted).
Includes support for:
Description of the problem being solved:
Steps taken to verify a working solution:
Link to a build that showcases this PR:
https://pobb.in/icDxyhOiMSLm
After screenshot: