Mercurial > hg > batmud > misc
changeset 194:1b5fdb431582 misc
Random improvements in identify parsing.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 05 Feb 2011 21:18:32 +0200 |
parents | 5052cb36ad34 |
children | c75ca644f2df |
files | log2template.pl |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/log2template.pl Mon Jan 24 23:47:36 2011 +0200 +++ b/log2template.pl Sat Feb 05 21:18:32 2011 +0200 @@ -74,6 +74,9 @@ sub { return $_[0] =~ s/^ability at the (skill|spell) (.+)$/$2/ }, sub { return $_[0] =~ s/^mental regeneration$/spr/g }, sub { return $_[0] =~ s/^physical regeneration$/hpr/g }, + sub { return $_[0] =~ s/^agility in combat$/avoid/g }, + sub { return $_[0] =~ s/^damage you do in combat$/dam/g }, + sub { return $_[0] =~ s/^resistance you have against physical damage/physical resistance/g }, # sub { return $_[0] =~ s///g }, ); @@ -312,8 +315,8 @@ $$id{"cat"}{"aura of darkness"} = 1; $id_tale2 = 0; } - elsif ($s =~ /^It will (.+?) (improve|reduce) your (.+?)\.$/) { - my ($amt, $imp, $stat) = ($1, $2, $3); + elsif ($s =~ /^It will (.+?) (improve|reduce) (your|the) (.+?)\.$/) { + my ($amt, $imp, $stat) = ($1, $2, $4); push(@{$$id{"stats"}}, ($imp eq "improve" ? "+" : "-").$amt." ".trans_stat($stat)); $$id{"cat"}{trans_stat($stat)} = 1 if ($imp eq "improve"); $id_tale2 = 0; @@ -328,7 +331,7 @@ elsif ($s =~ /^It contains a tale;$/) { $id_tale2 = 1; } - elsif ($s =~ /^(.+?) did the heroic deed to bring this piece of equipment before you (.+)$/) { + elsif ($s =~ /^(.+?) did the heroic deed to bring this piece of equipment before you (.+)$|^It has been in the game for (.+)$/) { my $info = $2; $$id{""} = "";