mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Add MDFC support to CardCriteria and use it for ZNR
This commit is contained in:
parent
a4ced51058
commit
d357f4a0b0
2 changed files with 29 additions and 6 deletions
|
|
@ -30,6 +30,7 @@ public class CardCriteria {
|
|||
private final List<SubType> subtypes;
|
||||
private final List<Rarity> rarities;
|
||||
private Boolean doubleFaced;
|
||||
private Boolean modalDoubleFaced;
|
||||
private boolean black;
|
||||
private boolean blue;
|
||||
private boolean green;
|
||||
|
|
@ -100,6 +101,11 @@ public class CardCriteria {
|
|||
return this;
|
||||
}
|
||||
|
||||
public CardCriteria modalDoubleFaced(boolean modalDoubleFaced) {
|
||||
this.modalDoubleFaced = modalDoubleFaced;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CardCriteria name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
|
|
@ -215,6 +221,11 @@ public class CardCriteria {
|
|||
clausesCount++;
|
||||
}
|
||||
|
||||
if (modalDoubleFaced != null) {
|
||||
where.eq("modalDoubleFacesCard", modalDoubleFaced);
|
||||
clausesCount++;
|
||||
}
|
||||
|
||||
for (Rarity rarity : rarities) {
|
||||
where.eq("rarity", rarity);
|
||||
}
|
||||
|
|
@ -412,6 +423,10 @@ public class CardCriteria {
|
|||
return doubleFaced;
|
||||
}
|
||||
|
||||
public Boolean getModalDoubleFaced() {
|
||||
return modalDoubleFaced;
|
||||
}
|
||||
|
||||
public boolean isBlack() {
|
||||
return black;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue