Quantcast

Several parsing fixes for enchants

Kevin Lyles [09-29-12 - 19:15]
Several parsing fixes for enchants
Filename
Locales/enUS/patterns-enchant-items.lua
Locales/enUS/patterns-enchants.lua
Locales/enUS/patterns.lua
diff --git a/Locales/enUS/patterns-enchant-items.lua b/Locales/enUS/patterns-enchant-items.lua
index e38f08c..9098d6f 100644
--- a/Locales/enUS/patterns-enchant-items.lua
+++ b/Locales/enUS/patterns-enchant-items.lua
@@ -4,56 +4,71 @@ end

 local PreprocessLines = {
 	{" +%(1 sec cooldown%)$", ""},
+	{"^use: attaches a ghost iron spike to your shield that sometimes deals 210 to 350 damage when you block with it%.[\r\n]+attaching a ghost iron spike to your shield causes it to become soulbound%.$", "ghost iron shield spike"},
+	{"^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]+attaching this scope to a ranged weapon causes it to become soulbound%.$", "gnomish x-ray scope"},
+	{"^use: attaches a pyrium spike to your shield that sometimes deals 210 to 350 damage when you block with it%.[\r\n]+attaching a pyrium spike to your shield causes it to become soulbound%.$", "pyrium shield spike"},
 	{"^use: enchants a weapon to have a 15%% chance to inflict 9 to 13 fire damage to all enemies within 3 yards%.$", "fiery blaze"},
-	{"^use: permanently enchant a melee weapon to often strike for 40 additional fire damage%.$", "fiery weapon"},
+	{"^use: permanently attaches a mirrored scope to a ranged weapon, sometimes increasi?n?g?e?s? critical strike by 900 for 10 sec when dealing damage with ranged attacks%.[\r\n]+attaching this scope to a ranged weapon causes it to become soulbound%.$", "mirror scope"},
+	{"^use: permanently attaches lord blastington's special scope to a ranged weapon, sometimes increasing agility by 1,?800 for 10 sec when dealing damage with ranged attacks%.[\r\n]+attaching this scope to a ranged weapon causes it to become soulbound%.$", "lord blastington's scope of doom"},
+	{"^use: permanently enchant a melee weapon to cause your damaging spells and melee weapon hits to occasionally inflict additional frost damage and slow the target%. +requires a level 60 or higher item%.[\r\n\\n]+slow effect does not work on targets 73 or higher%.$", "deathfrost"},
+	{"^use: permanently enchant a melee weapon to cause your harmful spells to sometimes increase haste by 250%. +requires a level 60 or higher item%.$", "black magic"},
+	{"^use: permanently enchant a melee weapon to have a chance of reducing movement speed and doing additional damage against giants%. +requires a level 60 or higher item%.$", "giant slayer"},
 	{"^use: permanently enchant a melee weapon to have a chance of stunning and doing additional damage against demons%.$", "demonslaying"},
-	{"^use: permanently enchant a melee weapon to often chill the target, reducing their movement and attack speed%.  has a reduced effect for players above level 60%.$", "icy chill"},
-	{"^use: permanently enchant a melee weapon to often steal life from the enemy and give it to the wielder%.  has a reduced effect for players above level 60%.$", "lifestealing"},
-	{"^use: permanently enchant a melee weapon to often inflict a curse on the target, inflicting shadow damage and reducing their melee damage%.$", "unholy weapon"},
+	{"^use: permanently enchant a melee weapon to make your spells sometimes restore 100 mana to nearby party members%. +requires a level 35 or higher item%.$", "spellsurge"},
+	{"^use: permanently enchant a melee weapon to occasionally grant you 120 critical strike%. +only one instance of this effect can be active at a time%. +requires a level 60 or higher item%.$", "executioner"},
+	{"^use: permanently enchant a melee weapon to occasionally heal nearby party members for 180 to 300 when attacking in melee%. +requires a level 35 or higher item%.$", "battlemaster"},
+	{"^use: permanently enchant a melee weapon to occasionally increase agility by 120 and haste by 30%. +requires a level 35 or higher item%.$", "mongoose"},
+	{"^use: permanently enchant a melee weapon to often chill the target, reducing their movement and attack speed%. +has a reduced effect for players above level 60%.$", "icy chill"},
 	{"^use: permanently enchant a melee weapon to often heal for 75 to 125 and increase strength by 100 for 15 sec%. when attacking in melee%. has a reduced effect for players above level 60%.$", "crusader"},
-	{"^use: permanently enchant a melee weapon to occasionally increase agility by 120 and attack speed slightly%.  requires a level 35 or higher item%.$", "mongoose"},
-	{"^use: permanently enchant a melee weapon to make your spells sometimes restore 100 mana to nearby party members%.  requires a level 35 or higher item%.$", "spellsurge"},
-	{"^use: permanently enchant a melee weapon to occasionally heal nearby party members for 180 to 300 when attacking in melee%.  requires a level 35 or higher item%.$", "battlemaster"},
-	{"^use: permanently enchant a melee weapon to occasionally grant you 120 critical strike%.  only one instance of this effect can be active at a time%.  requires a level 60 or higher item%.$", "executioner"},
-	{"^use: permanently enchant a melee weapon to sometimes inflict fire damage%.  requires a level 60 or higher item%.$", "icebreaker"},
-	{"^use: permanently enchant a melee weapon to sometimes heal the wielder when striking in melee%.  requires a level 60 or higher item%.$", "lifeward"},
-	{"^use: permanently enchant a melee weapon to have a chance of reducing movement speed and doing additional damage against giants%.  requires a level 60 or higher item%.$", "giant slayer"},
-	{"^use: permanently enchant a melee weapon to cause your damaging spells and melee weapon hits to occasionally inflict additional frost damage and slow the target%.  requires a level 60 or higher item%.\r\n\r\nslow effect does not work on targets 73 or higher%.$", "deathfrost"},
-	{"^use: permanently enchant a melee weapon to sometimes increase your attack power by 400, but at the cost of reduced armor%.  requires a level 60 or higher item%.$", "berserking"},
-	{"^use: permanently enchant a melee weapon to cause your harmful spells to sometimes increase haste by 250%.  requires a level 60 or higher item%.$", "black magic"},
-	{"^use: permanently enchants a weapon to sometimes grant blade warding when striking an enemy%.  blade warding increases your parry by 200 and inflicts 600 to 800 damage on your next parry%.  lasts 10 sec%.\r\n\r\nthis enchantment requires the wielder is at least level 75%.$", "blade ward"},
-	{"^use: permanently enchants your weapon to sometimes grant blood reserve when striking an enemy or inflicting damage with bleed attacks%.  when you fall below 35%% health, blood reserve restores 360 to 440 health%.  lasts 20 sec and stacks up to 5 times%.\r\n\r\nthis enchantment requires the wielder is at least level 75%.$", "blood draining"},
-	{"^use: permanently enchant a weapon to sometimes heal you when damaging an enemy with spells and melee attacks%.  requires a level 300 or higher item%.$", "mending"},
-	{"^use: permanently enchant a weapon to often deal %d%d%d to %d%d%d nature damage to an enemy damaged by your spells or struck by your melee attacks%.  requires a level 300 or higher item%.$", "avalanche"},
-	{"^use: permanently enchant a melee weapon to sometimes disrupt elementals when struck by your melee attacks, dealing arcane damage and silencing them for 5 sec%.  requires a level 300 or higher item%.$", "elemental slayer"},
-	{"^use: permanently enchant a melee weapon to sometimes increase haste by 450 for 12 sec when healing or dealing spell or melee damage%.  requires a level 300 or higher item%.$", "hurricane"},
-	{"^use: permanently enchant a weapon to sometimes increase spirit by 200 for 15 sec when healing or dealing damage with spells%.  requires a level 300 or higher item%.$", "heartsong"},
-	{"^use: permanently enchant a weapon to sometimes increase intellect by 500 for 12 sec when dealing damage or healing with spells%.  requires a level 300 or higher item%.$", "power torrent"},
-	{"^use: permanently enchant a weapon to sometimes increase dodge by 600 and movement speed by 15%% for 10 sec when striking in melee, stacking with passive movement speed effects%.  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 a pyrium spike to your shield that sometimes deals 210 to 350 damage when you block with it%.\r\n\r\nattaching a pyrium spike to your shield causes it to become soulbound%.$", "pyrium shield spike"},
-	{"^use: teaches you how to permanently enchant a melee weapon to cause your damaging spells and melee weapon hits to occasionally inflict additional frost damage and slow the target%.  requires a level 60 or higher item%.$", "deathfrost"},
-	{"^use: teaches you how to permanently enchant a melee weapon to cause your harmful spells to sometimes increase haste%.  requires a level 60 or higher item%.$", "black magic"},
-	{"^use: teaches you how to permanently enchant a melee weapon to have a chance of reducing movement speed and doing additional damage against giants%.  requires a level 60 or higher item%.$", "giant slayer"},
+	{"^use: permanently enchant a melee weapon to often inflict a curse on the target, inflicting shadow damage and reducing their melee damage%.$", "unholy weapon"},
+	{"^use: permanently enchant a melee weapon to often steal life from the enemy and give it to the wielder%. +has a reduced effect for players above level 60%.$", "lifestealing"},
+	{"^use: permanently enchant a melee weapon to often strike for 40 additional fire damage%.$", "fiery weapon"},
+	{"^use: permanently enchant a melee weapon to sometimes disrupt elementals when struck by your melee attacks, dealing arcane damage and silencing them for 5 sec%. +requires a level 300 or higher item%.$", "elemental slayer"},
+	{"^use: permanently enchant a melee weapon to sometimes heal the wielder when striking in melee%. +requires a level 60 or higher item%.$", "lifeward"},
+	{"^use: permanently enchant a melee weapon to sometimes increase haste by 450 for 12 sec when healing or dealing spell or melee damage%. +requires a level 300 or higher item%.$", "hurricane"},
+	{"^use: permanently enchant a melee weapon to sometimes increase your attack power by 400, but at the cost of reduced armor%. +requires a level 60 or higher item%.$", "berserking"},
+	{"^use: permanently enchant a melee weapon to sometimes inflict fire damage%. +requires a level 60 or higher item%.$", "icebreaker"},
+	{"^use: permanently enchant a weapon to often deal %d%d%d to %d%d%d nature damage to an enemy damaged by your spells or struck by your melee attacks%. +requires a level 300 or higher item%.$", "avalanche"},
+	{"^use: permanently enchant a weapon to sometimes grant blade warding when striking an enemy%. +blade warding increases your parry by 200 and inflicts 600 to 800 damage on your next parry%. +lasts 10 sec%.[\r\n ]+this enchantment requires the wielder is at least level 75%.$", "blade ward"},
+	{"^use: permanently enchant a weapon to sometimes heal you when damaging an enemy with spells and melee attacks%. +requires a level 300 or higher item%.$", "mending"},
+	{"^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: permanently enchant a weapon to sometimes increase dodge by 600 and movement speed by 15%% for 10 sec when striking in melee, stacking with passive movement speed effects%. +requires a level 300 or higher item%.$", "windwalk"},
+	{"^use: permanently enchant a weapon to sometimes increase intellect by 500 for 12 sec when dealing damage or healing with spells%. +requires a level 300 or higher item%.$", "power torrent"},
+	{"^use: permanently enchant a weapon to sometimes increase spirit by 200 for 15 sec when healing or dealing damage with spells%. +requires a level 300 or higher item%.$", "heartsong"},
+	{"^use: permanently enchant your weapon to sometimes grant blood reserve when striking an enemy or inflicting damage with bleed attacks%. +when you fall below 35%% health, blood reserve restores 360 to 440 health%. +lasts 20 sec and stacks up to 5 times%.[\r\n ]+this enchantment requires the wielder is at least level 75%.$", "blood draining"},
+	{"^use: permanently enchants a melee weapon to make your damaging melee strikes sometimes activate a mogu protection spell, absorbing up to 7,?500 damage%. +requires a level 372 or higher item%.$", "colossus"},
+	{"^use: permanently enchants a melee weapon to sometimes increase your dodge by 1,?650 for 7 sec when dealing melee damage%. +requires a level 372 or higher item%.$", "river's song"},
+	{"^use: permanently enchants a melee weapon to sometimes increase your strength or agility by 1,?650 when dealing melee damage%. +your highest stat is always chosen%. +requires a level 372 or higher item%.$", "dancing steel"},
+	{"^use: permanently enchants a melee weapon to sometimes inflict 2,?775 to 3,?225 additional elemental damage when dealing damage with spells and melee attacks%. +requires a level 372 or higher item%.$", "elemental force"},
+	{"^use: permanently enchants? a melee weapon to sometimes increase your critical strike, haste, or mastery by 1,?500 for 12 sec when dealing damage or healing with spells and melee attacks%. +requires a level 372 or higher item%.$", "windsong"},
+	{"^use: permanently enchants? a melee weapon to sometimes increase your intellect by 1,?650 when healing or dealing damage with spells%. +if less than 25%% of your mana remains when the effect is triggered, your spirit will also increase by 750%. +requires a level 372 or higher item%.$", "jade spirit"},
+	{"^use: teaches you how to permanently enchant a melee weapon to cause your damaging spells and melee weapon hits to occasionally inflict additional frost damage and slow the target%. +requires a level 60 or higher item%.$", "deathfrost"},
+	{"^use: teaches you how to permanently enchant a melee weapon to cause your harmful spells to sometimes increase haste%. +requires a level 60 or higher item%.$", "black magic"},
+	{"^use: teaches you how to permanently enchant a melee weapon to have a chance of reducing movement speed and doing additional damage against giants%. +requires a level 60 or higher item%.$", "giant slayer"},
 	{"^use: teaches you how to permanently enchant a melee weapon to have a chance of stunning and doing additional damage against demons%.$", "demonslaying"},
-	{"^use: teaches you how to permanently enchant a melee weapon to make your spells sometimes restore 100 mana to nearby party members%.  requires a level 35 or higher item%.$", "spellsurge"},
+	{"^use: teaches you how to permanently enchant a melee weapon to make your damaging melee strikes sometimes activate a mogu protection spell, absorbing damage%. +requires a level 372 or higher item%.$", "colossus"},
+	{"^use: teaches you how to permanently enchant a melee weapon to make your spells sometimes restore 100 mana to nearby party members%. +requires a level 35 or higher item%.$", "spellsurge"},
 	{"^use: teaches you how to permanently enchant a melee weapon to occasionally grant you 120 critical strike%. requires a level 60 or higher item%.$", "executioner"},
-	{"^use: teaches you how to permanently enchant a melee weapon to occasionally heal nearby party members for 180 to 300 when attacking in melee%.  requires a level 35 or higher item%.$", "battlemaster"},
-	{"^use: teaches you how to permanently enchant a melee weapon to occasionally increase agility by 120 and attack speed slightly%.  requires a level 35 or higher item%.$", "mongoose"},
-	{"^use: teaches you how to permanently enchant a melee weapon to often chill the target, reducing their movement and attack speed%.  has a reduced effect for players above level 60%.$", "icy chill"},
+	{"^use: teaches you how to permanently enchant a melee weapon to occasionally heal nearby party members for 180 to 300 when attacking in melee%. +requires a level 35 or higher item%.$", "battlemaster"},
+	{"^use: teaches you how to permanently enchant a melee weapon to occasionally increase agility by 120 and attack speed slightly%. +requires a level 35 or higher item%.$", "mongoose"},
+	{"^use: teaches you how to permanently enchant a melee weapon to often chill the target, reducing their movement and attack speed%. +has a reduced effect for players above level 60%.$", "icy chill"},
 	{"^use: teaches you how to permanently enchant a melee weapon to often heal for 75 to 125 and increase strength by 100 for 15 sec%. when attacking in melee%. has a reduced effect for players above level 60%.$", "crusader"},
 	{"^use: teaches you how to permanently enchant a melee weapon to often inflict a curse on the target, inflicting shadow damage and reducing their melee damage%.$", "unholy weapon"},
-	{"^use: teaches you how to permanently enchant a melee weapon to often steal life from the enemy and give it to the wielder%.  has a reduced effect for players above level 60%.$", "lifestealing"},
+	{"^use: teaches you how to permanently enchant a melee weapon to often steal life from the enemy and give it to the wielder%. +has a reduced effect for players above level 60%.$", "lifestealing"},
 	{"^use: teaches you how to permanently enchant a melee weapon to often strike for 40 additional fire damage%.$", "fiery weapon"},
-	{"^use: teaches you how to permanently enchant a melee weapon to sometimes grant blood reserve when striking an enemy or inflicting damage with bleed attacks, healing you when your health is low%.  enchantment requires level 75%.$", "blood draining"},
-	{"^use: teaches you how to permanently enchant a melee weapon to sometimes heal the wielder when striking in melee%.  requires a level 60 or higher item%.$", "lifeward"},
-	{"^use: teaches you how to permanently enchant a melee weapon to sometimes increase your attack power at the cost of reduced armor%.  requires a level 60 or higher item%.$", "berserking"},
-	{"^use: teaches you how to permanently enchant a melee weapon to sometimes inflict fire damage%.  requires a level 60 or higher item%.$", "icebreaker"},
-	{"^use: teaches you how to permanently enchant a weapon to sometimes grant blade warding when striking an enemy, increasing parry and inflicting damage on your next parry%.  enchantment requires level 75%.$", "blade ward"},
-	{"^use: teaches you how to permanently enchant a weapon to sometimes increase attack power when striking with melee attacks%.  requires a level 300 or higher item%.$", "landslide"},
-	{"^use: teaches you how to permanently enchant a weapon to sometimes increase dodge and movement speed when striking in melee%.  requires a level 300 or higher item%.$", "windwalk"},
-	{"^use: teaches you how to permanently enchant a weapon to sometimes increase spell power when dealing damage or healing with spells%.  requires a level 300 or higher item%.$", "power torrent"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes grant blood reserve when striking an enemy or inflicting damage with bleed attacks, healing you when your health is low%. +enchantment requires level 75%.$", "blood draining"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes heal the wielder when striking in melee%. +requires a level 60 or higher item%.$", "lifeward"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes increase intellect when healing or dealing damage with spells%. +also increases spirit if your mana is low%. +requires a level 372 or higher item%.$", "jade spirit"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes increase your attack power at the cost of reduced armor%. +requires a level 60 or higher item%.$", "berserking"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes increase your critical strike, haste, or mastery by 1,?500 for 12 sec when dealing damage with spells and melee attacks%. +requires a level 372 or higher item%.$", "windsong"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes increase your dodge when dealing melee damage%. +requires a level 372 or higher item%.$", "river's song"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes increase your strength or agility by 1,?650 when dealing melee damage%. +requires a level 372 or higher item%.$", "dancing steel"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes inflict additional damage when dealing damage with spells and melee attacks%. +requires a level 372 or higher item%.$", "elemental force"},
+	{"^use: teaches you how to permanently enchant a melee weapon to sometimes inflict fire damage%. +requires a level 60 or higher item%.$", "icebreaker"},
+	{"^use: teaches you how to permanently enchant a weapon to sometimes grant blade warding when striking an enemy, increasing parry and inflicting damage on your next parry%. +enchantment requires level 75%.$", "blade ward"},
+	{"^use: teaches you how to permanently enchant a weapon to sometimes increase attack power when striking with melee attacks%. +requires a level 300 or higher item%.$", "landslide"},
+	{"^use: teaches you how to permanently enchant a weapon to sometimes increase dodge and movement speed when striking in melee%. +requires a level 300 or higher item%.$", "windwalk"},
+	{"^use: teaches you how to permanently enchant a weapon to sometimes increase spell power when dealing damage or healing with spells%. +requires a level 300 or higher item%.$", "power torrent"},
 }

 local MatchLines = {}
diff --git a/Locales/enUS/patterns-enchants.lua b/Locales/enUS/patterns-enchants.lua
index 7503785..efbba31 100644
--- a/Locales/enUS/patterns-enchants.lua
+++ b/Locales/enUS/patterns-enchants.lua
@@ -48,6 +48,7 @@ local EnchantPreprocessLines = {
 	{" from all attacks and spells ", " caused "},
 	{" reduce threat slightly ", " 2%% reduced threat "},
 	{" a minor movement speed ", " minor run speed "},
+	{" movement speed by 8%%", " minor run speed increase"},
 	{" reducing the duration of disarm effects by ", " disarm duration reduced by "},
 	-- item 22023
 	{" to add (%d+) to ", " +%1 "},
@@ -61,6 +62,8 @@ local EnchantPreprocessLines = {
 	{" (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 "},
+	-- items 38813 and 38814
+	{" a melee weapon to increase damage to ", " melee damage to "},
 }

 local EnchantAffixes = {
@@ -78,6 +81,7 @@ local EnchantAffixes = {
 	"weapon to increase its +",
 	"^spurs to your +",

+	"^pair of +",
 	"^boots +",
 	"^bracers? +",
 	"^cloak +",
@@ -93,8 +97,10 @@ local EnchantAffixes = {
 	"^ring +",
 	"^shoulder slot item +",
 	"^or held item +",
+	"^or off%-hand item +",

-	"^%a+ l?e?g? ?armor onto pants +",
+	"^%a+ l?e?g? ?armor +",
+	"^onto pants +",
 	"^embroiders spellthread into pants, +",
 	"lightweight titanium plating to a shield, +",

@@ -131,14 +137,15 @@ local EnchantAffixes = {
 	" +only the enchanter's rings can be enchanted,? and enchanting a ring will cause it to become soulbound%.$",
 	" +fur lining requires at least %d+ skill in leatherworking to remain active%.$",
 	"[\r\n]+can only be used on the leatherworker's bracers, and doing so will cause them to become soulbound%.$",
-	-- TODO: flag this somehow and handle it in scoring
+	-- TODO: flag these somehow and handle it in scoring
 	" +does not stack with other similar effects%.",
+	" +does not stack with other passive movement speed bonuses%.",
 	" +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 +",
+	"^%a+ ?%a* belt buckle onto a belt, adding a +",
 	" +to the belt%.$",
 	" +to shoulder armor%.$",
 	" +t?o[fn]? any? item worn on the %a[%a ,]+ or %a+",
diff --git a/Locales/enUS/patterns.lua b/Locales/enUS/patterns.lua
index 231de20..4ebb3f1 100644
--- a/Locales/enUS/patterns.lua
+++ b/Locales/enUS/patterns.lua
@@ -282,6 +282,21 @@ ww_MultipleStatLines = {
 		end,
 		{"enchant"},
 	},
+	-- item 38960
+	{"^(%a+), (%a+), and (%a+) skills by (%d+)$",
+		function(text, pattern)
+			local start, _, stat1, stat2, stat3, value = string.find(text, pattern)
+			if start then
+				value = tonumber(value)
+				local stats = WeightsWatcher.newStatTable()
+				stats[stat1] = value
+				stats[stat2] = value
+				stats[stat3] = value
+				return stats
+			end
+		end,
+		{"enchant"},
+	},
 	{"^chance to resist (%a+) and (%a+) effects by (%d+)%%$",
 		function(text, pattern)
 			local start, _, effect1, effect2, value = string.find(text, pattern)
@@ -362,7 +377,6 @@ ww_SingleStatLines = {
 		end,
 		{"enchant", "equipEffect", "generic"},
 	},
-	{"^([+-]?%d+) (ranged attack power)$", WeightsWatcher.statNumFirst, {"equipEffect", "generic"}},
 	{"^([+-]?%d+) (health)$", WeightsWatcher.statNumFirst, {"cooldownUseEffect", "elixir", "enchant", "useEffect"}},
 	{"^(%d+) to (%d+) (health)$", WeightsWatcher.statRangeFirst, {"cooldownUseEffect", "elixir", "enchant", "useEffect"}},
 	{"^(fishing) by ([+-]?%d+)$", WeightsWatcher.statNameFirst, {"enchant", "fishing"}},
@@ -392,6 +406,7 @@ ww_SingleStatLines = {
 		end,
 		{"enchant"},
 	},
+	{"^([+-]?%d+) (ranged %a+ ?%a+)$", WeightsWatcher.statNumFirst, {"enchant", "equipEffect", "generic"}},
 	{"^effective stealth level by (%d+)$",
 		function(text, pattern)
 			return WeightsWatcher.singleStatValueOnly(text, pattern, "increased stealth")