Closed GoogleCodeExporter closed 9 years ago
Sorry, first issue, and should have made it low priority.
Original comment by LickThis...@yahoo.com
on 27 Aug 2010 at 11:05
Attaching relevant worker file.
Original comment by LickThis...@yahoo.com
on 27 Aug 2010 at 11:39
Attachments:
committed in r777
Original comment by venjiance
on 28 Aug 2010 at 6:01
Thanks for catching the items I missed (they were not in my inventory).
You need to leave "Swordsmans Plate" in armor, as otherwise it will match on
"sword" and be classified as a weapon. I also tried to eliminate it, but have
Swordsmans Plate...
Original comment by LickThis...@yahoo.com
on 29 Aug 2010 at 7:12
I'll add "Swordsmans Plate" in a couple of days, together with some other epics
and legendaries I've missed.
Original comment by venjiance
on 29 Aug 2010 at 7:23
r778 should fix it
Original comment by venjiance
on 29 Aug 2010 at 9:51
[deleted comment]
[deleted comment]
Oops, "Cowl of the Avenger" is showing as a weapon.
You could change "avenger" to the specifics "^Avenger$|Holy Avenger", then let
the generics match cowl, amulet and plate.
It is not an error, but you could also have changed "|sword|" to "|sword
|sword$|" and omitted the specific checks for "Swordsmans Plate" & "Swordsman
Helm". Something to consider if they ever add more "Swordsman" stuff.
Original comment by LickThis...@yahoo.com
on 30 Aug 2010 at 10:37
I like your solution. I'll implement it in the next upload.
Original comment by venjiance
on 31 Aug 2010 at 6:29
I don't have these, but tunic & grinder are also missing.
Since only 2 of the 8 items with "heart" in their name are amulets, maybe check
for them specifically (all the others match generic patterns).
Weapon: /axe|blade|bow|cleaver|cudgel|dagger|edge|grinder|halberd|lance|mace|morningstar|rod|saber|scepter|spear|staff|stave|sword |sword$|talon|trident|wand|^Avenger$|Celestas Devotion|Crystal Rod|Daedalus|Deliverance|Dragonbane|Dreadnought Greatsword|Excalibur|Holy Avenger|Incarnation|Ironhart's Might|Judgement|Justice|Lightbringer|Oathkeeper|Onslaught|Punisher|Soulforge/i,
Shield: /aegis|buckler|shield|tome|Defender|Dragon Scale|Frost Tear Dagger|Harmony|Sword of Redemption|Terra's Guard|The Dreadnought|Purgatory|Zenarean Crest/i,
Helmet: /cowl|crown|helm|horns|mask|veil|Virtue of Fortitude/i,
Gloves: /gauntlet|glove|hand|bracer|fist|Slayer's Embrace|Soul Crusher|Soul Eater|Virtue of Temperance/i,
Armor: /armor|belt|chainmail|cloak|gear|garb|pauldrons|plate|raiments|robe|tunic|vestment|Faerie Wings|Epaulets of Might/i,
Amulet: /amulet|bauble|charm|crystal|eye|flask|insignia|jewel|lantern|memento|necklace|orb|pendant|shard|signet|soul|talisman|trinket|Paladin's Oath|Poseidons Horn| Ring|Ring of|Ruby Ore|Thawing Star|Mark of the Empire|Transcendence|Heart of Elos|Terra's Heart/i
Original comment by LickThis...@yahoo.com
on 31 Aug 2010 at 5:54
r782 just committed
Original comment by venjiance
on 1 Sep 2010 at 10:33
Several issues remain here.
Sword of Redemption is a shield, matched by weapon pattern /sword /.
Ice Dagger and Frost Tear Dagger are shields, matched by weapon pattern
/dagger/.
The Sword of Redemption and Frost Tear Dagger manage to be classed correctly
due to being matched again by Shield after Weapon in the type loop, but Ice
Dagger still looks like a weapon. It might be safer to correct this so that
Town.blacksmith.Weapon could be used independently without relying on the order.
Many of the word segments stand the potential of mismatching in future because
they aren't word bounded. To be safe it might be best to bracket most with
/\bPATTERN\b/ to ensure the amulet pattern /crystal/ doesn't match things like
weapon Crystalline Rod. Note that even /\bcrystal\b/ or /^crystal\b/ isn't
safe, as it misclassifies weapon Crystal Rod as an amulet.
Weapon Fury Maul Axe could be matched by /\bmaul\b/.
The attached file snippet should match the current items in game, as
represented in the Wiki.
Original comment by lur...@hotmail.com
on 1 Sep 2010 at 7:06
Attachments:
Oops, minor correction to the file:
'|\\bfists\\b' + // 1+1
should read:
'|\\bfists?\\b' + // 1+1
Original comment by lur...@hotmail.com
on 1 Sep 2010 at 7:09
The match isn't based on the order of regexps, but it's based instead on the
length of matching part.
In the following code the name variable contains the name of the item.
for (i in Town.blacksmith) {
if ((match = name.match(Town.blacksmith[i]))) {
for (j=0; j<match.length; j++) {
if (match[j].length > maxlen) {
unit[name].type = i;
maxlen = match[j].length;
}
}
}
}
Original comment by venjiance
on 1 Sep 2010 at 7:25
Given the current matching loop, these likely need adding in:
Weapons:
Crystalline Rod (currently matches Amulet)
Death Dealer
Deathbellow
Lifebane
Moonclaw
Righteousness
Shields:
Feral Staff (currently matches Weapon)
Ice Dagger (currently matches Weapon)
Illusia's Bauble (currently matches Amulet)
Illvasan Crest
Serenes Arrow
Armor:
Death Ward
Lycan Armguard
Helmet:
Gilded Tiara
Gloves:
Tempered Steel
Amulet:
Shadowmoon
Silverlight Seal
Skullstone Relic
Sunstone Crest
Tribal Crest
Original comment by lur...@hotmail.com
on 1 Sep 2010 at 9:20
Lurgid has added / improved the matches. As of this date I think every item is
recognised.
Original comment by RycochetTM
on 8 Jan 2011 at 7:33
Original issue reported on code.google.com by
LickThis...@yahoo.com
on 27 Aug 2010 at 10:53