mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
made card recognition insensitive to case of set (will recognize both Cancel|RTR and Cancel|rtr cards in decks and import)
This commit is contained in:
@@ -229,7 +229,7 @@ public final class CardDb implements ICardDatabase {
|
|||||||
PaperCard[] candidates = new PaperCard[9]; // 9 cards with same name per set is a maximum of what has been printed (Arnchenemy)
|
PaperCard[] candidates = new PaperCard[9]; // 9 cards with same name per set is a maximum of what has been printed (Arnchenemy)
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
for( PaperCard pc : cards ) {
|
for( PaperCard pc : cards ) {
|
||||||
if( pc.getEdition().equals(setName) )
|
if( pc.getEdition().equalsIgnoreCase(setName) )
|
||||||
candidates[cnt++] = pc;
|
candidates[cnt++] = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ public final class CardDb implements ICardDatabase {
|
|||||||
result = cnt == 1 ? candidates[0] : candidates[MyRandom.getRandom().nextInt(cnt)];
|
result = cnt == 1 ? candidates[0] : candidates[MyRandom.getRandom().nextInt(cnt)];
|
||||||
} else
|
} else
|
||||||
for( PaperCard pc : cards ) {
|
for( PaperCard pc : cards ) {
|
||||||
if( pc.getEdition().equals(setName) && index == pc.getArtIndex() ) {
|
if( pc.getEdition().equalsIgnoreCase(setName) && index == pc.getArtIndex() ) {
|
||||||
result = pc;
|
result = pc;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user