From 33f63672d326522d1429c1bf155f72c046e64722 Mon Sep 17 00:00:00 2001 From: North Date: Sun, 17 Jul 2011 12:06:30 +0300 Subject: [PATCH] Fixes issue 187. --- Utils/gen-card.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Utils/gen-card.pl b/Utils/gen-card.pl index 59c2c92594..1d638b1294 100755 --- a/Utils/gen-card.pl +++ b/Utils/gen-card.pl @@ -175,14 +175,14 @@ foreach my $setName (keys %{$cards{$cardName}}) { my $notKeyWord; foreach my $keyword (keys %keywords) { - if (index(toCamelCase($ability), $keyword) eq 0) { - $notKeyWord = 'no'; + if (toCamelCase($ability) =~ m/^$keyword(?=[A-Z{\d]|$)/g) { + $notKeyWord = 'false'; my @ka = split(', ', $ability); foreach my $kw (@ka) { my $kwUnchanged = $kw; - foreach my $keyword (keys %keywords) { - if (index(toCamelCase($kw), $keyword) eq 0) { - $kw = $keyword; + foreach my $kk (keys %keywords) { + if (toCamelCase($kw) =~ m/^$kk(?=[A-Z{\d]|$)/g) { + $kw = $kk; } } if ($keywords{$kw}) {