mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Merge branch 'upcoming_rix2' into 'master'
Updates to card-based deck generation data and improvements to handling of… See merge request core-developers/forge!162
This commit is contained in:
Binary file not shown.
@@ -58,8 +58,8 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
|||||||
protected Predicate<CardRules> hasColor;
|
protected Predicate<CardRules> hasColor;
|
||||||
protected final List<PaperCard> availableList;
|
protected final List<PaperCard> availableList;
|
||||||
protected final List<PaperCard> aiPlayables;
|
protected final List<PaperCard> aiPlayables;
|
||||||
protected final List<PaperCard> deckList = new ArrayList<PaperCard>();
|
protected final List<PaperCard> deckList = new ArrayList<>();
|
||||||
protected final List<String> setsWithBasicLands = new ArrayList<String>();
|
protected final List<String> setsWithBasicLands = new ArrayList<>();
|
||||||
protected List<PaperCard> rankedColorList;
|
protected List<PaperCard> rankedColorList;
|
||||||
|
|
||||||
// Views for aiPlayable
|
// Views for aiPlayable
|
||||||
@@ -424,7 +424,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
|||||||
* Find the sets that have basic lands for the available cards.
|
* Find the sets that have basic lands for the available cards.
|
||||||
*/
|
*/
|
||||||
private void findBasicLandSets() {
|
private void findBasicLandSets() {
|
||||||
final Set<String> sets = new HashSet<String>();
|
final Set<String> sets = new HashSet<>();
|
||||||
for (final PaperCard cp : aiPlayables) {
|
for (final PaperCard cp : aiPlayables) {
|
||||||
final CardEdition ee = FModel.getMagicDb().getEditions().get(cp.getEdition());
|
final CardEdition ee = FModel.getMagicDb().getEditions().get(cp.getEdition());
|
||||||
if( !sets.contains(cp.getEdition()) && CardEdition.Predicates.hasBasicLands.apply(ee)) {
|
if( !sets.contains(cp.getEdition()) && CardEdition.Predicates.hasBasicLands.apply(ee)) {
|
||||||
@@ -575,6 +575,13 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
|||||||
// (a) dual-land of the correct two colors, or
|
// (a) dual-land of the correct two colors, or
|
||||||
// (b) a land that generates colorless mana and has some other
|
// (b) a land that generates colorless mana and has some other
|
||||||
// beneficial effect.
|
// beneficial effect.
|
||||||
|
if (!card.getRules().getColorIdentity().isColorless() && card.getRules().getColorIdentity().getSharedColors(colors).countColors()==0){
|
||||||
|
//skip as does not match colours
|
||||||
|
if (logToConsole) {
|
||||||
|
System.out.println("Excluding NonBasicLand: " + card.getName());
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!inverseDLands.contains(card.getName())&&!dLands.contains(card.getName())&&r.nextInt(100)<90) {
|
if (!inverseDLands.contains(card.getName())&&!dLands.contains(card.getName())&&r.nextInt(100)<90) {
|
||||||
landsToAdd.add(card);
|
landsToAdd.add(card);
|
||||||
landsNeeded--;
|
landsNeeded--;
|
||||||
|
|||||||
Reference in New Issue
Block a user