Skip to content

Commit 721a803

Browse files
authored
fix: wrong string match pattern (#735)
(%d.+) is incorrect for decimal. It should be ([%d%.]+).
1 parent 91f42bd commit 721a803

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Modules/ModParser.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ local specialModList = {
22232223
["(%d+)%% of damage taken bypasses ward"] = function(num) return { mod("WardBypass", "BASE", num) } end,
22242224
["maximum energy shield is (%d+)"] = function(num) return { mod("EnergyShield", "OVERRIDE", num ) } end,
22252225
["cannot have energy shield"] = { flag("CannotHaveES") },
2226-
["regenerate (%d.+) life per second per maximum energy shield"] = function(num) return {
2226+
["regenerate ([%d%.]+) life per second per maximum energy shield"] = function(num) return {
22272227
mod("LifeRegen", "BASE", num, { type = "PerStat", stat = "MaximumEnergyShield", div = 1 })
22282228
} end,
22292229
["while not on full life, sacrifice ([%d%.]+)%% of mana per second to recover that much life"] = function(num) return {
@@ -2341,16 +2341,16 @@ local specialModList = {
23412341
["life leech is instant"] = { mod("InstantLifeLeech", "BASE", 100), },
23422342
["mana leech is instant"] = { mod("InstantManaLeech", "BASE", 100), },
23432343
["mana leech effects also recover energy shield"] = { flag("ManaLeechRecoversEnergyShield") },
2344-
["leeche?s? (%d.+)%% of (%a+) damage as mana"] = function(num, _, dmgType) return {
2344+
["leeche?s? ([%d%.]+)%% of (%a+) damage as mana"] = function(num, _, dmgType) return {
23452345
mod(firstToUpper(dmgType) .. "DamageManaLeech", "BASE", num),
23462346
} end,
2347-
["leeche?s? (%d.+)%% of (%a+) damage as life"] = function(num, _, dmgType) return {
2347+
["leeche?s? ([%d%.]+)%% of (%a+) damage as life"] = function(num, _, dmgType) return {
23482348
mod(firstToUpper(dmgType) .. "DamageLifeLeech", "BASE", num),
23492349
} end,
2350-
["leeche?s? (%d.+)%% of (%a+) attack damage as mana"] = function(num, _, dmgType) return {
2350+
["leeche?s? ([%d%.]+)%% of (%a+) attack damage as mana"] = function(num, _, dmgType) return {
23512351
mod(firstToUpper(dmgType) .. "DamageManaLeech", "BASE", num, nil, ModFlag.Attack, 0),
23522352
} end,
2353-
["leeche?s? (%d.+)%% of (%a+) attack damage as life"] = function(num, _, dmgType) return {
2353+
["leeche?s? ([%d%.]+)%% of (%a+) attack damage as life"] = function(num, _, dmgType) return {
23542354
mod(firstToUpper(dmgType) .. "DamageLifeLeech", "BASE", num, nil, ModFlag.Attack, 0),
23552355
} end,
23562356
-- Ascendant

0 commit comments

Comments
 (0)