updated code to handle flip cards
Also handles special character cards. ( ie Call of the Herd (Card of the Herd) ) *** Not sure why the title is repeated in some of these.
This commit is contained in:
@@ -56,6 +56,23 @@ while (<>)
|
|||||||
elsif (/^Name=(.*)/)
|
elsif (/^Name=(.*)/)
|
||||||
{
|
{
|
||||||
my $cardName = $1;
|
my $cardName = $1;
|
||||||
|
$cardName =~ s/^\s*|\s*$//g;
|
||||||
|
if ($cardName =~ /\((.*?)\)/ )
|
||||||
|
{
|
||||||
|
my $m = $1;
|
||||||
|
my $pre = $`;
|
||||||
|
$m =~ s/^\s*|\s*$//g;
|
||||||
|
$pre =~ s/^\s*|\s*$//g;
|
||||||
|
if ( ($knownCards{$m} == 1) || ($knownCards{$pre} == 1) )
|
||||||
|
{
|
||||||
|
$skip = 1;
|
||||||
|
print STDERR "*$cardName\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# print STDERR "No Match. $cardName\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($knownCards{$cardName} == 1)
|
if ($knownCards{$cardName} == 1)
|
||||||
{
|
{
|
||||||
@@ -165,6 +182,7 @@ sub getKnownCards
|
|||||||
{
|
{
|
||||||
chomp;
|
chomp;
|
||||||
s/
|
s/
|
||||||
|
//g;
|
||||||
s/^\s*|\s*$//g;
|
s/^\s*|\s*$//g;
|
||||||
next if (/Token$/);
|
next if (/Token$/);
|
||||||
$m->{$_} = 1;
|
$m->{$_} = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user