mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Sold basic lands that could have been added through "Add basic land" will not be removed from decks.
This commit is contained in:
@@ -121,6 +121,7 @@ public final class PaperCard implements Comparable<IPaperCard>, InventoryItemFro
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public PaperCard(final CardRules rules0, final String edition0, final CardRarity rarity0, final int artIndex0) {
|
||||
this(rules0, edition0, rarity0, artIndex0, false);
|
||||
}
|
||||
@@ -228,4 +229,16 @@ public final class PaperCard implements Comparable<IPaperCard>, InventoryItemFro
|
||||
}
|
||||
return imageKey;
|
||||
}
|
||||
|
||||
// Return true if card is one of the five basic lands that can be added for free
|
||||
public boolean isVeryBasicLand() {
|
||||
if ((this.getName().equals("Swamp"))
|
||||
|| (this.getName().equals("Plains"))
|
||||
|| (this.getName().equals("Island"))
|
||||
|| (this.getName().equals("Forest"))
|
||||
|| (this.getName().equals("Mountain"))) {
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -415,6 +415,13 @@ public final class QuestUtilCards {
|
||||
|
||||
final int leftInPool = questAssets.getCardPool().count(card);
|
||||
|
||||
// If card is a nonfoil basic land of the "free" kind, do not remove from the deck
|
||||
// but pretend as if it was added through "Add Basic Land".
|
||||
if ((!card.isFoil())
|
||||
&& (card.isVeryBasicLand())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// remove sold cards from all decks:
|
||||
for (final Deck deck : questController.getMyDecks()) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user