Mercurial > hg > batmud > misc
changeset 219:d352ae078cbb misc
Add support for 'bash' and 'push' skills. Fix some minor warnings.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 08 Aug 2011 11:25:24 +0300 |
parents | e5e8083769fa |
children | 96ab088dba30 |
files | log2template.pl |
diffstat | 1 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/log2template.pl Mon Aug 08 08:16:36 2011 +0300 +++ b/log2template.pl Mon Aug 08 11:25:24 2011 +0300 @@ -325,7 +325,7 @@ } # Check for nun relics - if ($$id{"full"} =~ / \(holy\)/) { + if (defined($$id{"full"}) && $$id{"full"} =~ / \(holy\)/) { $$id{"cat"}{"relic"} = 1; } @@ -338,14 +338,16 @@ } # Check if the weight data is for FW'd item - if ($$id{"full"} =~ / <(yellow|green|white) glow>$/) { - $$id{"kg"} = ""; - $$id{"weight"} = ""; - } else { - if (defined($$id{"kg"}{$$id{"full"}})) { - $$id{"kg"} = $$id{"kg"}{$$id{"full"}}; + if (defined($$id{"full"})) { + if ($$id{"full"} =~ / <(yellow|green|white) glow>$/) { + $$id{"kg"} = ""; + $$id{"weight"} = ""; } else { - $$id{"kg"} = ""; + if (defined($$id{"kg"}{$$id{"full"}})) { + $$id{"kg"} = $$id{"kg"}{$$id{"full"}}; + } else { + $$id{"kg"} = ""; + } } } } @@ -441,7 +443,9 @@ } elsif ($s =~ /^(.+?) did the heroic deed to bring this piece of equipment before you (.+)$/) { parse_id_blob($2); - $ids{$$id{"full"}} = $id; + if (defined($$id{"full"})) { + $ids{$$id{"full"}} = $id; + } set_state(0, $s); } elsif ($s =~ /^It has been in the game for (.+)$/) { @@ -537,6 +541,12 @@ elsif ($s =~ /^([A-Za-z][A-Za-z\'\ -]+?) starts grappling [A-Z][a-z]+\.$/) { $skills{$1}{$line} = "grapple"; } + elsif ($s =~ /^([A-Za-z][A-Za-z\'\ -]+?) pushes [A-Z][a-z]+ extremely hard\.$/) { + $skills{$1}{$line} = "push"; + } + elsif ($s =~ /^([A-Za-z][A-Za-z\'\ -]+?)\'s (powerful bash sends [A-Z][a-z]+ sprawling to the floor|tries to bash [A-Z][a-z]+ but promptly falls flat on his face)\.$/) { + $skills{$1}{$line} = "bash"; + } }