forked from External/mage
Now random decks contain non basic lands.
This commit is contained in:
parent
d5d3a1a77e
commit
770e5673f5
4 changed files with 81 additions and 10 deletions
|
|
@ -6,17 +6,29 @@ import java.util.Set;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.sets.Sets;
|
||||
import mage.utils.CardUtil;
|
||||
|
||||
public class CardsStorage {
|
||||
private static Set<Card> allCards = new LinkedHashSet<Card>();
|
||||
private static Set<Card> landCards = new LinkedHashSet<Card>();
|
||||
|
||||
static {
|
||||
for (ExpansionSet set: Sets.getInstance().values()) {
|
||||
allCards.addAll(set.createCards());
|
||||
Set<Card> cards = set.createCards();
|
||||
allCards.addAll(cards);
|
||||
for (Card card : cards) {
|
||||
if (CardUtil.isLand(card)) {
|
||||
landCards.add(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Set<Card> getAllCards() {
|
||||
return allCards;
|
||||
}
|
||||
|
||||
public static Set<Card> getLandCards() {
|
||||
return landCards;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue