Mercurial > hg > batmud > misc
changeset 221:23d445908f41 misc
spellnames: Show caster and next line if no fumble detected for given unknown spell.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 08 Aug 2011 13:00:48 +0300 |
parents | 96ab088dba30 |
children | 1c0b3b4cef40 |
files | spellnames.pl |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/spellnames.pl Mon Aug 08 12:41:35 2011 +0300 +++ b/spellnames.pl Mon Aug 08 13:00:48 2011 +0300 @@ -43,6 +43,7 @@ $sp_mob = $1; $sp_words = $3; $sp_flag = 1; + $spells{$sp_words} = "#$line ($sp_mob): "; } elsif ($s =~ /^([A-Za-z][A-Za-z\ -]+?) hesitates as (he|she|it) casts (.+?)\.$/o) { my $sp_name = $3; @@ -50,8 +51,12 @@ $spells{$sp_words} = $sp_name; $sp_flag = 0; } - } else + } + else { + if ($sp_flag) { + $spells{$sp_words} .= $s; + } $sp_flag = 0; } }