mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Change to isCardType Matching: from contains to startswith
This is to avoid matching things like "island" as a "land" card type token Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This commit is contained in:
@@ -640,13 +640,13 @@ public class DeckRecognizer {
|
||||
/* -----------------------------------------------------------------------------
|
||||
Note: Card types, CMC, and Rarity Tokens are **only** used for style formatting
|
||||
in the Import Editor. This won't affect the import process in any way.
|
||||
The use of this token has been borrowed by Deckstats.net format export.
|
||||
The use of these tokens has been borrowed by Deckstats.net format export.
|
||||
----------------------------------------------------------------------------- */
|
||||
public static boolean isCardType(final String lineAsIs) {
|
||||
String nonCardToken = nonCardTokenMatch(lineAsIs);
|
||||
if (nonCardToken == null)
|
||||
return false;
|
||||
return StringUtils.containsAny(nonCardToken.toLowerCase(), CARD_TYPES);
|
||||
return StringUtils.startsWithAny(nonCardToken.toLowerCase(), CARD_TYPES);
|
||||
}
|
||||
|
||||
public static boolean isCardRarity(final String lineAsIs){
|
||||
|
||||
Reference in New Issue
Block a user