Quantcast

Handle all shield spikes

Kevin Lyles [06-04-11 - 01:18]
Handle all shield spikes
Filename
EnchantIDs.lua
Locales/enUS/patterns-enchant-items.lua
Locales/enUS/patterns-enchants.lua
Locales/enUS/patterns.lua
Locales/enUS/stats.lua
defaults.lua
diff --git a/EnchantIDs.lua b/EnchantIDs.lua
index 77cd2e5..2349fcd 100644
--- a/EnchantIDs.lua
+++ b/EnchantIDs.lua
@@ -135,8 +135,7 @@ local EnchantIDs = {
 			["off hand"] = "Iron Shield Spike",
 		},
 		stats = {
-			["maximum damage dealt on block"] = 12,
-			["minimum damage dealt on block"] = 8,
+			["average damage dealt on block"] = 10,
 		},
 	},
 	[44] = {
@@ -325,8 +324,7 @@ local EnchantIDs = {
 			["off hand"] = "Mithril Shield Spike",
 		},
 		stats = {
-			["maximum damage dealt on block"] = 20,
-			["minimum damage dealt on block"] = 16,
+			["average damage dealt on block"] = 18,
 		},
 	},
 	[464] = {
@@ -1178,8 +1176,7 @@ local EnchantIDs = {
 			["off hand"] = "Thorium Shield Spike",
 		},
 		stats = {
-			["maximum damage dealt on block"] = 30,
-			["minimum damage dealt on block"] = 20,
+			["average damage dealt on block"] = 25,
 		},
 	},
 	[1843] = {
@@ -2169,8 +2166,7 @@ local EnchantIDs = {
 			["off hand"] = "Felsteel Shield Spike",
 		},
 		stats = {
-			["maximum damage dealt on block"] = 38,
-			["minimum damage dealt on block"] = 26,
+			["average damage dealt on block"] = 32,
 		},
 	},
 	[2715] = {
@@ -3366,8 +3362,7 @@ local EnchantIDs = {
 			["off hand"] = "Titanium Shield Spike",
 		},
 		stats = {
-			["maximum damage dealt on block"] = 67,
-			["minimum damage dealt on block"] = 45,
+			["average damage dealt on block"] = 56,
 		},
 	},
 	[3754] = {
@@ -4953,8 +4948,7 @@ local EnchantIDs = {
 			["off hand"] = "Elementium Shield Spike",
 		},
 		stats = {
-			["maximum damage dealt on block"] = 133,
-			["minimum damage dealt on block"] = 90,
+			["average damage dealt on block"] = 111.5,
 		},
 	},
 	[4216] = {
@@ -4963,8 +4957,7 @@ local EnchantIDs = {
 			["off hand"] = "Pyrium Shield Spike",
 		},
 		stats = {
-			["maximum damage dealt on block"] = 350,
-			["minimum damage dealt on block"] = 210,
+			["pyrium shield spike"] = 1,
 		},
 	},
 	[4217] = {
@@ -5049,6 +5042,7 @@ local EnchantIDs = {
 		},
 	},
 	[4256] = {
+		itemID = { 68785 },
 		name = {
 			wrist = "Enchant Bracer - Major Strength",
 		},
@@ -5058,6 +5052,7 @@ local EnchantIDs = {
 		},
 	},
 	[4257] = {
+		itemID = { 68786 },
 		name = {
 			wrist = "Enchant Bracer - Mighty Intellect",
 		},
@@ -5067,6 +5062,7 @@ local EnchantIDs = {
 		},
 	},
 	[4258] = {
+		itemID = { 68784 },
 		name = {
 			wrist = "Enchant Bracer - Agility",
 		},
diff --git a/Locales/enUS/patterns-enchant-items.lua b/Locales/enUS/patterns-enchant-items.lua
index 8d55593..1fbc70a 100644
--- a/Locales/enUS/patterns-enchant-items.lua
+++ b/Locales/enUS/patterns-enchant-items.lua
@@ -32,6 +32,7 @@ local PreprocessLines = {
 	{"^use: permanently enchant a weapon to sometimes increase dodge rating by 600 and movement speed by 15%% for 10 sec when striking in melee%.  requires a level 300 or higher item%.$", "windwalk"},
 	{"^use: permanently enchant a weapon to sometimes increase attack power by 1000 for 12 sec when striking in melee%.  requires a level 300 or higher item%.$", "landslide"},
 	{"^use: attaches a permanent scope to a bow or gun that sometimes increases ranged attack power by 800 for 10 sec when dealing damage with ranged attacks%.\r\n\r\nattaching this scope to a ranged weapon causes it to become soulbound%.$", "gnomish x-ray scope"},
+	{"^use: attaches an pyrium spike to your shield that sometimes deals 210 to 350 damage when you block with it%.\r\n\r\nattaching an pyrium spike to your shield causes it to become soulbound%.$", "pyrium shield spike"},
 }

 local MatchLines = {}
diff --git a/Locales/enUS/patterns-enchants.lua b/Locales/enUS/patterns-enchants.lua
index 48afb5e..424be26 100644
--- a/Locales/enUS/patterns-enchants.lua
+++ b/Locales/enUS/patterns-enchants.lua
@@ -55,6 +55,16 @@ local EnchantPreprocessLines = {
 	{" reducing the duration of disarm effects by ", " disarm duration reduced by "},
 	-- item 22023
 	{" to add (%d+) to ", " +%1 "},
+	-- item 23530
+	{" (deals %d+)-(%d+ damage) ", " %1 to %2 "},
+	-- item 55055
+	{" each time you block ", " every time you block "},
+	-- item 6042
+	{" (attaches an iron spike to your shield that deals) damage ", " %1 8 to 12 damage "},
+	-- item 7967
+	{" (attaches a mithril spike to your shield that deals) damage ", " %1 16 to 20 damage "},
+	-- item 12645
+	{" (attaches a thorium spike to your shield that deals) damage ", " %1 20 to 30 damage "},
 }

 local EnchantAffixes = {
@@ -65,6 +75,7 @@ local EnchantAffixes = {
 	"^enchants? +",
 	"^attache?s? +",
 	"^an? +",
+	"^[%a ]+ to your shield that +",
 	"^chain to your weapon, +",
 	"^counterweight to a two%-handed sword, mace, axe or polearm increasing the wielder's +",
 	"^permanent scope to a bow or gun +",
@@ -129,6 +140,8 @@ local EnchantAffixes = {
 	" +does not stack with other enchantments for the selected equipment slot%.",
 	"[\r\n]+wearer must be level %d+ or higher to receive the benefits of this armor kit%.$",

+	" +with it%.$",
+
 	"^%a+ belt buckle onto a belt, adding a +",
 	" +to the belt%.$",
 	" +to shoulder armor%.$",
diff --git a/Locales/enUS/patterns.lua b/Locales/enUS/patterns.lua
index 9dc2904..c6f60c8 100644
--- a/Locales/enUS/patterns.lua
+++ b/Locales/enUS/patterns.lua
@@ -437,6 +437,15 @@ ww_SingleStatLines = {
 		end,
 		{"elixir", "enchant"},
 	},
+	{"^deals (%d+) to (%d+) damage every time you block$",
+		function(text, pattern)
+			local start, _, minimum, maximum = text:find(pattern)
+			if start then
+				return WeightsWatcher.newStatTable({["average damage dealt on block"] = (minimum + maximum) / 2})
+			end
+		end,
+		{"enchant"},
+	},
 	{"^([+-]?%d+) (mana)$", WeightsWatcher.statNumFirst, {"enchant", "elixir"}},
 	{"^([+-]?%d+) ranged damage$",
 		function(text, pattern)
diff --git a/Locales/enUS/stats.lua b/Locales/enUS/stats.lua
index 19ba6f2..52e84b7 100644
--- a/Locales/enUS/stats.lua
+++ b/Locales/enUS/stats.lua
@@ -14,6 +14,7 @@ ww_localizedStats = {
 -- 	["armor penetration rating"] = "armor penetration rating",
 	["attack power"] = "attack power",
 	["avalanche"] = "avalanche",
+	["average damage dealt on block"] = "average damage dealt on block",
 	["average melee weapon damage"] = "average melee weapon damage",
 	["average ranged weapon damage"] = "average ranged weapon damage",
 	["battlemaster"] = "battlemaster",
@@ -91,6 +92,7 @@ ww_localizedStats = {
 	["parry rating"] = "parry rating",
 	["power torrent"] = "power torrent",
 	["prismatic socket"] = "prismatic socket",
+	["pyrium shield spike"] = "pyrium shield spike",
 	["ranged attack power"] = "ranged attack power",
 	["ranged critical strike rating"] = "ranged critical strike rating",
 	["ranged dps"] = "ranged dps",
@@ -140,6 +142,7 @@ ww_statDisplayNames = {
 -- 	[ww_localizedStats["armor penetration rating"]] = "Armor Penetration Rating",
 	[ww_localizedStats["attack power"]] = "Attack Power",
 	[ww_localizedStats["avalanche"]] = "Avalanche",
+	[ww_localizedStats["average damage dealt on block"]] = "Average Damage Dealt on Block",
 	[ww_localizedStats["average melee weapon damage"]] = "Average Melee Weapon Damage",
 	[ww_localizedStats["average ranged weapon damage"]] = "Average Ranged Weapon Damage",
 	[ww_localizedStats["battlemaster"]] = "Battlemaster",
@@ -217,6 +220,7 @@ ww_statDisplayNames = {
 	[ww_localizedStats["parry rating"]] = "Parry Rating",
 	[ww_localizedStats["power torrent"]] = "Power Torrent",
 	[ww_localizedStats["prismatic socket"]] = "Prismatic Socket",
+	[ww_localizedStats["pyrium shield spike"]] = "Pyrium Shield Spike",
 	[ww_localizedStats["ranged attack power"]] = "Ranged Attack Power",
 	[ww_localizedStats["ranged critical strike rating"]] = "Ranged Critical Strike Rating",
 	[ww_localizedStats["ranged dps"]] = "Ranged DPS",
diff --git a/defaults.lua b/defaults.lua
index 0106290..01433e1 100644
--- a/defaults.lua
+++ b/defaults.lua
@@ -67,6 +67,7 @@ ww_trackedStats = {
 		[ww_statCategories["Enchant/Meta Gem Effects"]] = {
 			"armor (percent)",
 			"armor from items (percent)",
+			"average damage dealt on block",
 			"block value (percent)",
 			"chance to restore health on hit",
 			"spell damage taken reduction (percent)",
@@ -177,6 +178,7 @@ ww_trackedStats = {
 		"mending",
 		"mongoose",
 		"power torrent",
+		"pyrium shield spike",
 		"spellsurge",
 		"unholy weapon",
 		"windwalk",