mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Make Add Land dialog no longer add a random mix of regular and snow-covered basic lands (#9353)
The Add Land dialog now only adds regular basic lands and never snow-covered ones, unless you specifically select a set that only contains snow basics (e.g. MH1) Sets that only contain snow basics are not selectable when adding lands to a Limited deck.
This commit is contained in:
parent
ebdb6b53a4
commit
7554a2b6b5
7 changed files with 32 additions and 13 deletions
|
|
@ -246,7 +246,7 @@ public class CardCriteria {
|
|||
where.ne("setCode", ignoreSetCode);
|
||||
}
|
||||
if (!ignoreSetCodes.isEmpty()) {
|
||||
where.or(ignoreSetCodes.size());
|
||||
where.and(ignoreSetCodes.size());
|
||||
clausesCount++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,13 +37,11 @@ public enum CardRepository {
|
|||
private Dao<CardInfo, Object> cardDao;
|
||||
private Set<String> classNames;
|
||||
|
||||
// sets with exclusively snow basics
|
||||
public static final Set<String> snowLandSetCodes = new HashSet<>(Arrays.asList(
|
||||
"CSP",
|
||||
"MH1",
|
||||
"SLD",
|
||||
"ME2",
|
||||
"ICE",
|
||||
"KHM"
|
||||
"ME2"
|
||||
));
|
||||
|
||||
CardRepository() {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public final class TournamentUtil {
|
|||
} else {
|
||||
criteria.ignoreSetsWithSnowLands();
|
||||
}
|
||||
criteria.rarities(Rarity.LAND).name(landName);
|
||||
criteria.rarities(Rarity.LAND).nameExact(landName);
|
||||
List<CardInfo> lands = CardRepository.instance.findCards(criteria);
|
||||
List<Card> cards = new ArrayList<>();
|
||||
if (!lands.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue