spjspj - Rudimentary help for wrong card name in gen-card.pl

This commit is contained in:
spjspj 2016-10-29 16:14:00 +11:00
parent 1655df614a
commit e07ff25be6

View file

@ -96,7 +96,14 @@ if(!$cardName) {
chomp $cardName;
}
if (!exists $cards{$cardName}) {
my $possible;
foreach $possible (sort keys (%cards)) {
if ($possible =~ m/^$cardName.*/img && $cardName =~ m/..../) {
print ("Did you mean $possible ?\n");
}
}
die "Card name doesn't exist: $cardName\n";
}