From f459f6484deda83d3cc1e074f7e8952ba1f89612 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Tue, 9 Feb 2010 13:20:29 -0600 Subject: [PATCH] Simplified and combind the hp5 and mp5 patterns into one each --- Regexps.lua | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/Regexps.lua b/Regexps.lua index f9abb4f..7b594bd 100644 --- a/Regexps.lua +++ b/Regexps.lua @@ -204,22 +204,7 @@ SingleStatLines = { return WeightsWatcher.singleStatValueOnly(text, pattern, "dps") end }, - -- Normal item stats - {"^([+-]?%d+) mana every 5 seconds%.?$", - function(text, pattern) - return WeightsWatcher.singleStatValueOnly(text, pattern, "mp5") - end}, - -- Random suffix enchants and socket bonuses - {"^([+-]?%d+) mana every 5 sec%.?$", - function(text, pattern) - return WeightsWatcher.singleStatValueOnly(text, pattern, "mp5") - end}, - {"^([+-]?%d+) mana per 5 seconds%.?$", - function(text, pattern) - return WeightsWatcher.singleStatValueOnly(text, pattern, "mp5") - end}, - -- Socket bonuses - {"^([+-]?%d+) mana per 5 sec%.?$", + {"^([+-]?%d+) mana %a+ 5 seco?n?d?s?%.?$", function(text, pattern) return WeightsWatcher.singleStatValueOnly(text, pattern, "mp5") end}, @@ -242,21 +227,7 @@ SingleStatLines = { return WeightsWatcher.singleStatValueOnly(text, pattern, "block value") end}, {"^([+-]?%d+) (block value)$", WeightsWatcher.statNumFirst}, - {"^([+-]?%d+) health every 5 seconds%.?$", - function(text, pattern) - return WeightsWatcher.singleStatValueOnly(text, pattern, "hp5") - end}, - -- random suffix enchants - {"^([+-]?%d+) health every 5 sec%.?$", - function(text, pattern) - return WeightsWatcher.singleStatValueOnly(text, pattern, "hp5") - end}, --- {"^([+-]?%d+) health per 5 seconds%.?$", --- function(text, pattern) --- return WeightsWatcher.singleStatValueOnly(text, pattern, "hp5") --- end}, - -- Random suffix enchants - {"^([+-]?%d+) health per 5 sec%.?$", + {"^([+-]?%d+) health %a+ 5 seco?n?d?s?%.?$", function(text, pattern) return WeightsWatcher.singleStatValueOnly(text, pattern, "hp5") end}, -- 1.7.9.5