mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[filters] Replaced CardType conditions with Predicate
This commit is contained in:
parent
0d2053c634
commit
ecf765ecf5
385 changed files with 1278 additions and 1249 deletions
|
@ -35,6 +35,8 @@
|
||||||
package mage.client.deckeditor;
|
package mage.client.deckeditor;
|
||||||
|
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.ObjectColor;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.ExpansionSet;
|
import mage.cards.ExpansionSet;
|
||||||
import mage.client.cards.BigCard;
|
import mage.client.cards.BigCard;
|
||||||
|
@ -44,8 +46,12 @@ import mage.client.cards.ICardGrid;
|
||||||
import mage.client.constants.Constants.SortBy;
|
import mage.client.constants.Constants.SortBy;
|
||||||
import mage.client.deckeditor.table.TableModel;
|
import mage.client.deckeditor.table.TableModel;
|
||||||
import mage.client.util.sets.ConstructedFormats;
|
import mage.client.util.sets.ConstructedFormats;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.Predicate;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||||
import mage.sets.Sets;
|
import mage.sets.Sets;
|
||||||
import mage.view.CardsView;
|
import mage.view.CardsView;
|
||||||
|
|
||||||
|
@ -63,7 +69,7 @@ import java.util.List;
|
||||||
public class CardSelector extends javax.swing.JPanel implements ComponentListener {
|
public class CardSelector extends javax.swing.JPanel implements ComponentListener {
|
||||||
|
|
||||||
private final List<Card> cards = new ArrayList<Card>();
|
private final List<Card> cards = new ArrayList<Card>();
|
||||||
private final FilterCard filter = new FilterCard();
|
private FilterCard filter = new FilterCard();
|
||||||
private BigCard bigCard;
|
private BigCard bigCard;
|
||||||
private boolean limited = false;
|
private boolean limited = false;
|
||||||
|
|
||||||
|
@ -140,7 +146,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
||||||
for (Card card: sideboard) {
|
for (Card card: sideboard) {
|
||||||
this.cards.add(card);
|
this.cards.add(card);
|
||||||
}
|
}
|
||||||
initFilter();
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,37 +159,70 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
||||||
cbExpansionSet.insertItemAt("-- All sets", 0);
|
cbExpansionSet.insertItemAt("-- All sets", 0);
|
||||||
cbExpansionSet.insertItemAt("-- Standard", 1);
|
cbExpansionSet.insertItemAt("-- Standard", 1);
|
||||||
cbExpansionSet.setSelectedIndex(0);
|
cbExpansionSet.setSelectedIndex(0);
|
||||||
initFilter();
|
|
||||||
|
filterCards();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buildFilter() {
|
||||||
|
filter = new FilterCard();
|
||||||
|
ArrayList<Predicate<MageObject>> predicates = new ArrayList<Predicate<MageObject>>();
|
||||||
|
|
||||||
|
if (this.rdoGreen.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.GREEN));
|
||||||
|
}
|
||||||
|
if (this.rdoRed.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.RED));
|
||||||
|
}
|
||||||
|
if (this.rdoBlack.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.BLACK));
|
||||||
|
}
|
||||||
|
if (this.rdoBlue.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.BLUE));
|
||||||
|
}
|
||||||
|
if (this.rdoWhite.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.WHITE));
|
||||||
|
}
|
||||||
|
if (this.rdoColorless.isSelected()) {
|
||||||
|
predicates.add(new ColorlessPredicate());
|
||||||
|
}
|
||||||
|
filter.add(Predicates.or(predicates));
|
||||||
|
|
||||||
|
predicates.clear();
|
||||||
|
if (this.rdoLand.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.LAND));
|
||||||
|
}
|
||||||
|
if (this.rdoArtifacts.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
|
}
|
||||||
|
if (this.rdoCreatures.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
|
}
|
||||||
|
if (this.rdoEnchantments.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
|
}
|
||||||
|
if (this.rdoInstants.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.INSTANT));
|
||||||
|
}
|
||||||
|
if (this.rdoSorceries.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.SORCERY));
|
||||||
|
}
|
||||||
|
if (this.rdoPlaneswalkers.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.PLANESWALKER));
|
||||||
|
}
|
||||||
|
filter.add(Predicates.or(predicates));
|
||||||
|
|
||||||
|
String name = jTextFieldSearch.getText().trim();
|
||||||
|
filter.setText(name);
|
||||||
|
|
||||||
if (this.cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
if (this.cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
||||||
filter.getExpansionSetCode().add(((ExpansionSet) this.cbExpansionSet.getSelectedItem()).getCode());
|
filter.getExpansionSetCode().add(((ExpansionSet) this.cbExpansionSet.getSelectedItem()).getCode());
|
||||||
} else if (this.cbExpansionSet.getSelectedItem().equals("-- Standard")) {
|
} else if (this.cbExpansionSet.getSelectedItem().equals("-- Standard")) {
|
||||||
filter.getExpansionSetCode().addAll(ConstructedFormats.getSetsByFormat("Standard"));
|
filter.getExpansionSetCode().addAll(ConstructedFormats.getSetsByFormat("Standard"));
|
||||||
}
|
}
|
||||||
filterCards();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initFilter() {
|
|
||||||
filter.setUseColor(true);
|
|
||||||
filter.getColor().setBlack(true);
|
|
||||||
filter.getColor().setBlue(true);
|
|
||||||
filter.getColor().setGreen(true);
|
|
||||||
filter.getColor().setWhite(true);
|
|
||||||
filter.getColor().setRed(true);
|
|
||||||
filter.setColorless(true);
|
|
||||||
filter.setUseColorless(true);
|
|
||||||
filter.setNotColor(false);
|
|
||||||
filter.setScopeColor(ComparisonScope.Any);
|
|
||||||
filter.getCardType().add(CardType.LAND);
|
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
|
||||||
filter.getCardType().add(CardType.PLANESWALKER);
|
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void filterCards() {
|
private void filterCards() {
|
||||||
|
buildFilter();
|
||||||
try {
|
try {
|
||||||
List<Card> filteredCards = new ArrayList<Card>();
|
List<Card> filteredCards = new ArrayList<Card>();
|
||||||
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
||||||
|
@ -648,99 +687,62 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void rdoGreenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoGreenActionPerformed
|
private void rdoGreenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoGreenActionPerformed
|
||||||
filter.getColor().setGreen(this.rdoGreen.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoGreenActionPerformed
|
}//GEN-LAST:event_rdoGreenActionPerformed
|
||||||
|
|
||||||
private void rdoBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlackActionPerformed
|
private void rdoBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlackActionPerformed
|
||||||
filter.getColor().setBlack(this.rdoBlack.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoBlackActionPerformed
|
}//GEN-LAST:event_rdoBlackActionPerformed
|
||||||
|
|
||||||
private void rdoWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoWhiteActionPerformed
|
private void rdoWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoWhiteActionPerformed
|
||||||
filter.getColor().setWhite(this.rdoWhite.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoWhiteActionPerformed
|
}//GEN-LAST:event_rdoWhiteActionPerformed
|
||||||
|
|
||||||
private void rdoRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoRedActionPerformed
|
private void rdoRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoRedActionPerformed
|
||||||
filter.getColor().setRed(this.rdoRed.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoRedActionPerformed
|
}//GEN-LAST:event_rdoRedActionPerformed
|
||||||
|
|
||||||
private void rdoBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlueActionPerformed
|
private void rdoBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlueActionPerformed
|
||||||
filter.getColor().setBlue(this.rdoBlue.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoBlueActionPerformed
|
}//GEN-LAST:event_rdoBlueActionPerformed
|
||||||
|
|
||||||
private void rdoColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoColorlessActionPerformed
|
private void rdoColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoColorlessActionPerformed
|
||||||
filter.setColorless(this.rdoColorless.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoColorlessActionPerformed
|
}//GEN-LAST:event_rdoColorlessActionPerformed
|
||||||
|
|
||||||
private void rdoLandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoLandActionPerformed
|
private void rdoLandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoLandActionPerformed
|
||||||
if (this.rdoLand.isSelected())
|
|
||||||
filter.getCardType().add(CardType.LAND);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.LAND);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoLandActionPerformed
|
}//GEN-LAST:event_rdoLandActionPerformed
|
||||||
|
|
||||||
private void rdoCreaturesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoCreaturesActionPerformed
|
private void rdoCreaturesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoCreaturesActionPerformed
|
||||||
if (this.rdoCreatures.isSelected())
|
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.CREATURE);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoCreaturesActionPerformed
|
}//GEN-LAST:event_rdoCreaturesActionPerformed
|
||||||
|
|
||||||
private void rdoArtifactsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoArtifactsActionPerformed
|
private void rdoArtifactsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoArtifactsActionPerformed
|
||||||
if (this.rdoArtifacts.isSelected())
|
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.ARTIFACT);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoArtifactsActionPerformed
|
}//GEN-LAST:event_rdoArtifactsActionPerformed
|
||||||
|
|
||||||
private void rdoEnchantmentsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoEnchantmentsActionPerformed
|
private void rdoEnchantmentsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoEnchantmentsActionPerformed
|
||||||
if (this.rdoEnchantments.isSelected())
|
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.ENCHANTMENT);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoEnchantmentsActionPerformed
|
}//GEN-LAST:event_rdoEnchantmentsActionPerformed
|
||||||
|
|
||||||
private void rdoInstantsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoInstantsActionPerformed
|
private void rdoInstantsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoInstantsActionPerformed
|
||||||
if (this.rdoInstants.isSelected())
|
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.INSTANT);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoInstantsActionPerformed
|
}//GEN-LAST:event_rdoInstantsActionPerformed
|
||||||
|
|
||||||
private void rdoSorceriesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoSorceriesActionPerformed
|
private void rdoSorceriesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoSorceriesActionPerformed
|
||||||
if (this.rdoSorceries.isSelected())
|
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.SORCERY);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoSorceriesActionPerformed
|
}//GEN-LAST:event_rdoSorceriesActionPerformed
|
||||||
|
|
||||||
private void rdoPlaneswalkersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoPlaneswalkersActionPerformed
|
private void rdoPlaneswalkersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoPlaneswalkersActionPerformed
|
||||||
if (this.rdoPlaneswalkers.isSelected())
|
|
||||||
filter.getCardType().add(CardType.PLANESWALKER);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.PLANESWALKER);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoPlaneswalkersActionPerformed
|
}//GEN-LAST:event_rdoPlaneswalkersActionPerformed
|
||||||
|
|
||||||
private void cbExpansionSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbExpansionSetActionPerformed
|
private void cbExpansionSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbExpansionSetActionPerformed
|
||||||
filter.getExpansionSetCode().clear();
|
|
||||||
if (cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
if (cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
||||||
filter.getExpansionSetCode().add(((ExpansionSet)this.cbExpansionSet.getSelectedItem()).getCode());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
} else {
|
} else {
|
||||||
if (this.cbExpansionSet.getSelectedItem().equals("-- Standard")) {
|
if (this.cbExpansionSet.getSelectedItem().equals("-- Standard")) {
|
||||||
filter.getExpansionSetCode().addAll(ConstructedFormats.getSetsByFormat("Standard"));
|
|
||||||
filterCards();
|
filterCards();
|
||||||
} else {
|
} else {
|
||||||
// auto switch for ListView for "All sets" (too many cards to load)
|
// auto switch for ListView for "All sets" (too many cards to load)
|
||||||
|
@ -838,14 +840,11 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
||||||
|
|
||||||
|
|
||||||
private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSearchActionPerformed
|
private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSearchActionPerformed
|
||||||
String name = jTextFieldSearch.getText().trim();
|
|
||||||
filter.setText(name);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_jButtonSearchActionPerformed
|
}//GEN-LAST:event_jButtonSearchActionPerformed
|
||||||
|
|
||||||
private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCleanActionPerformed
|
private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCleanActionPerformed
|
||||||
jTextFieldSearch.setText("");
|
jTextFieldSearch.setText("");
|
||||||
filter.setText("");
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_jButtonCleanActionPerformed
|
}//GEN-LAST:event_jButtonCleanActionPerformed
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
package mage.client.deckeditor.table;
|
package mage.client.deckeditor.table;
|
||||||
|
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.ObjectColor;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.ExpansionSet;
|
import mage.cards.ExpansionSet;
|
||||||
import mage.client.cards.BigCard;
|
import mage.client.cards.BigCard;
|
||||||
|
@ -37,8 +39,13 @@ import mage.client.cards.CardsStorage;
|
||||||
import mage.client.cards.ICardGrid;
|
import mage.client.cards.ICardGrid;
|
||||||
import mage.client.constants.Constants.DeckEditorMode;
|
import mage.client.constants.Constants.DeckEditorMode;
|
||||||
import mage.client.constants.Constants.SortBy;
|
import mage.client.constants.Constants.SortBy;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
import mage.client.util.sets.ConstructedFormats;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.Predicate;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||||
import mage.sets.Sets;
|
import mage.sets.Sets;
|
||||||
import mage.view.CardsView;
|
import mage.view.CardsView;
|
||||||
|
|
||||||
|
@ -59,7 +66,7 @@ import java.util.List;
|
||||||
public class CardTableSelector extends javax.swing.JPanel implements ComponentListener {
|
public class CardTableSelector extends javax.swing.JPanel implements ComponentListener {
|
||||||
|
|
||||||
private final List<Card> cards = new ArrayList<Card>();
|
private final List<Card> cards = new ArrayList<Card>();
|
||||||
private final FilterCard filter = new FilterCard();
|
private FilterCard filter = new FilterCard();
|
||||||
private BigCard bigCard;
|
private BigCard bigCard;
|
||||||
protected CardEventSource cardEventSource = new CardEventSource();
|
protected CardEventSource cardEventSource = new CardEventSource();
|
||||||
private DeckEditorMode mode = DeckEditorMode.Constructed;
|
private DeckEditorMode mode = DeckEditorMode.Constructed;
|
||||||
|
@ -86,6 +93,64 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void buildFilter() {
|
||||||
|
filter = new FilterCard();
|
||||||
|
ArrayList<Predicate<MageObject>> predicates = new ArrayList<Predicate<MageObject>>();
|
||||||
|
|
||||||
|
if (this.rdoGreen.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.GREEN));
|
||||||
|
}
|
||||||
|
if (this.rdoRed.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.RED));
|
||||||
|
}
|
||||||
|
if (this.rdoBlack.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.BLACK));
|
||||||
|
}
|
||||||
|
if (this.rdoBlue.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.BLUE));
|
||||||
|
}
|
||||||
|
if (this.rdoWhite.isSelected()) {
|
||||||
|
predicates.add(new ColorPredicate(ObjectColor.WHITE));
|
||||||
|
}
|
||||||
|
if (this.rdoColorless.isSelected()) {
|
||||||
|
predicates.add(new ColorlessPredicate());
|
||||||
|
}
|
||||||
|
filter.add(Predicates.or(predicates));
|
||||||
|
|
||||||
|
predicates.clear();
|
||||||
|
if (this.rdoLand.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.LAND));
|
||||||
|
}
|
||||||
|
if (this.rdoArtifacts.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
|
}
|
||||||
|
if (this.rdoCreatures.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
|
}
|
||||||
|
if (this.rdoEnchantments.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
|
}
|
||||||
|
if (this.rdoInstants.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.INSTANT));
|
||||||
|
}
|
||||||
|
if (this.rdoSorceries.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.SORCERY));
|
||||||
|
}
|
||||||
|
if (this.rdoPlaneswalkers.isSelected()) {
|
||||||
|
predicates.add(new CardTypePredicate(CardType.PLANESWALKER));
|
||||||
|
}
|
||||||
|
filter.add(Predicates.or(predicates));
|
||||||
|
|
||||||
|
String name = jTextFieldSearch.getText().trim();
|
||||||
|
filter.setText(name);
|
||||||
|
|
||||||
|
if (this.cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
||||||
|
filter.getExpansionSetCode().add(((ExpansionSet) this.cbExpansionSet.getSelectedItem()).getCode());
|
||||||
|
} else if (this.cbExpansionSet.getSelectedItem().equals("-- Standard")) {
|
||||||
|
filter.getExpansionSetCode().addAll(ConstructedFormats.getSetsByFormat("Standard"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void loadCards(List<Card> sideboard, BigCard bigCard, boolean construct) {
|
public void loadCards(List<Card> sideboard, BigCard bigCard, boolean construct) {
|
||||||
this.bigCard = bigCard;
|
this.bigCard = bigCard;
|
||||||
this.btnBooster.setVisible(false);
|
this.btnBooster.setVisible(false);
|
||||||
|
@ -95,7 +160,7 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
|
||||||
for (Card card: sideboard) {
|
for (Card card: sideboard) {
|
||||||
this.cards.add(card);
|
this.cards.add(card);
|
||||||
}
|
}
|
||||||
initFilter();
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,35 +179,12 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
|
||||||
cbExpansionSet.setModel(new DefaultComboBoxModel(l));
|
cbExpansionSet.setModel(new DefaultComboBoxModel(l));
|
||||||
cbExpansionSet.insertItemAt("-- All sets -- ", 0);
|
cbExpansionSet.insertItemAt("-- All sets -- ", 0);
|
||||||
cbExpansionSet.setSelectedIndex(0);
|
cbExpansionSet.setSelectedIndex(0);
|
||||||
initFilter();
|
|
||||||
if (this.cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
|
||||||
filter.getExpansionSetCode().add(((ExpansionSet)this.cbExpansionSet.getSelectedItem()).getCode());
|
|
||||||
}
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initFilter() {
|
|
||||||
filter.setUseColor(true);
|
|
||||||
filter.getColor().setBlack(true);
|
|
||||||
filter.getColor().setBlue(true);
|
|
||||||
filter.getColor().setGreen(true);
|
|
||||||
filter.getColor().setWhite(true);
|
|
||||||
filter.getColor().setRed(true);
|
|
||||||
filter.setColorless(true);
|
|
||||||
filter.setUseColorless(true);
|
|
||||||
filter.setNotColor(false);
|
|
||||||
filter.setScopeColor(ComparisonScope.Any);
|
|
||||||
filter.getCardType().add(CardType.LAND);
|
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
|
||||||
filter.getCardType().add(CardType.PLANESWALKER);
|
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void filterCards() {
|
private void filterCards() {
|
||||||
|
buildFilter();
|
||||||
try {
|
try {
|
||||||
List<Card> filteredCards = new ArrayList<Card>();
|
List<Card> filteredCards = new ArrayList<Card>();
|
||||||
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
||||||
|
@ -539,96 +581,58 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rdoGreenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoGreenActionPerformed
|
private void rdoGreenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoGreenActionPerformed
|
||||||
filter.getColor().setGreen(this.rdoGreen.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoGreenActionPerformed
|
}//GEN-LAST:event_rdoGreenActionPerformed
|
||||||
|
|
||||||
private void rdoBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlackActionPerformed
|
private void rdoBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlackActionPerformed
|
||||||
filter.getColor().setBlack(this.rdoBlack.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoBlackActionPerformed
|
}//GEN-LAST:event_rdoBlackActionPerformed
|
||||||
|
|
||||||
private void rdoWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoWhiteActionPerformed
|
private void rdoWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoWhiteActionPerformed
|
||||||
filter.getColor().setWhite(this.rdoWhite.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoWhiteActionPerformed
|
}//GEN-LAST:event_rdoWhiteActionPerformed
|
||||||
|
|
||||||
private void rdoRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoRedActionPerformed
|
private void rdoRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoRedActionPerformed
|
||||||
filter.getColor().setRed(this.rdoRed.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoRedActionPerformed
|
}//GEN-LAST:event_rdoRedActionPerformed
|
||||||
|
|
||||||
private void rdoBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlueActionPerformed
|
private void rdoBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlueActionPerformed
|
||||||
filter.getColor().setBlue(this.rdoBlue.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoBlueActionPerformed
|
}//GEN-LAST:event_rdoBlueActionPerformed
|
||||||
|
|
||||||
private void rdoColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoColorlessActionPerformed
|
private void rdoColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoColorlessActionPerformed
|
||||||
filter.setColorless(this.rdoColorless.isSelected());
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoColorlessActionPerformed
|
}//GEN-LAST:event_rdoColorlessActionPerformed
|
||||||
|
|
||||||
private void rdoLandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoLandActionPerformed
|
private void rdoLandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoLandActionPerformed
|
||||||
if (this.rdoLand.isSelected())
|
|
||||||
filter.getCardType().add(CardType.LAND);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.LAND);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoLandActionPerformed
|
}//GEN-LAST:event_rdoLandActionPerformed
|
||||||
|
|
||||||
private void rdoCreaturesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoCreaturesActionPerformed
|
private void rdoCreaturesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoCreaturesActionPerformed
|
||||||
if (this.rdoCreatures.isSelected())
|
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.CREATURE);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoCreaturesActionPerformed
|
}//GEN-LAST:event_rdoCreaturesActionPerformed
|
||||||
|
|
||||||
private void rdoArtifactsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoArtifactsActionPerformed
|
private void rdoArtifactsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoArtifactsActionPerformed
|
||||||
if (this.rdoArtifacts.isSelected())
|
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.ARTIFACT);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoArtifactsActionPerformed
|
}//GEN-LAST:event_rdoArtifactsActionPerformed
|
||||||
|
|
||||||
private void rdoEnchantmentsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoEnchantmentsActionPerformed
|
private void rdoEnchantmentsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoEnchantmentsActionPerformed
|
||||||
if (this.rdoEnchantments.isSelected())
|
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.ENCHANTMENT);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoEnchantmentsActionPerformed
|
}//GEN-LAST:event_rdoEnchantmentsActionPerformed
|
||||||
|
|
||||||
private void rdoInstantsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoInstantsActionPerformed
|
private void rdoInstantsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoInstantsActionPerformed
|
||||||
if (this.rdoInstants.isSelected())
|
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.INSTANT);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoInstantsActionPerformed
|
}//GEN-LAST:event_rdoInstantsActionPerformed
|
||||||
|
|
||||||
private void rdoSorceriesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoSorceriesActionPerformed
|
private void rdoSorceriesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoSorceriesActionPerformed
|
||||||
if (this.rdoSorceries.isSelected())
|
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.SORCERY);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoSorceriesActionPerformed
|
}//GEN-LAST:event_rdoSorceriesActionPerformed
|
||||||
|
|
||||||
private void rdoPlaneswalkersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoPlaneswalkersActionPerformed
|
private void rdoPlaneswalkersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoPlaneswalkersActionPerformed
|
||||||
if (this.rdoPlaneswalkers.isSelected())
|
|
||||||
filter.getCardType().add(CardType.PLANESWALKER);
|
|
||||||
else
|
|
||||||
filter.getCardType().remove(CardType.PLANESWALKER);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_rdoPlaneswalkersActionPerformed
|
}//GEN-LAST:event_rdoPlaneswalkersActionPerformed
|
||||||
|
|
||||||
private void cbExpansionSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbExpansionSetActionPerformed
|
private void cbExpansionSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbExpansionSetActionPerformed
|
||||||
filter.getExpansionSetCode().clear();
|
|
||||||
if (cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
|
||||||
filter.getExpansionSetCode().add(((ExpansionSet)this.cbExpansionSet.getSelectedItem()).getCode());
|
|
||||||
}
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_cbExpansionSetActionPerformed
|
}//GEN-LAST:event_cbExpansionSetActionPerformed
|
||||||
|
|
||||||
|
@ -690,14 +694,11 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
|
||||||
}
|
}
|
||||||
|
|
||||||
private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
private void jButtonSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||||
String name = jTextFieldSearch.getText().trim();
|
|
||||||
filter.setText(name);
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_jButton1ActionPerformed
|
}//GEN-LAST:event_jButton1ActionPerformed
|
||||||
|
|
||||||
private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
|
private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
|
||||||
jTextFieldSearch.setText("");
|
jTextFieldSearch.setText("");
|
||||||
filter.setText("");
|
|
||||||
filterCards();
|
filterCards();
|
||||||
}//GEN-LAST:event_jButton2ActionPerformed
|
}//GEN-LAST:event_jButton2ActionPerformed
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.mana.BlueManaAbility;
|
import mage.abilities.mana.BlueManaAbility;
|
||||||
import mage.abilities.mana.WhiteManaAbility;
|
import mage.abilities.mana.WhiteManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ public class FieldmistBorderpost extends CardImpl<FieldmistBorderpost> {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SupertypePredicate("Basic"));
|
filter.add(new SupertypePredicate("Basic"));
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FieldmistBorderpost (UUID ownerId) {
|
public FieldmistBorderpost (UUID ownerId) {
|
||||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -73,11 +74,10 @@ public class FiligreeAngel extends CardImpl<FiligreeAngel> {
|
||||||
}
|
}
|
||||||
|
|
||||||
class FiligreeAngelEffect extends OneShotEffect<FiligreeAngelEffect> {
|
class FiligreeAngelEffect extends OneShotEffect<FiligreeAngelEffect> {
|
||||||
private static FilterPermanent filter = new FilterPermanent();
|
private static final FilterPermanent filter = new FilterPermanent();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.All);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FiligreeAngelEffect() {
|
public FiligreeAngelEffect() {
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.mana.GreenManaAbility;
|
import mage.abilities.mana.GreenManaAbility;
|
||||||
import mage.abilities.mana.RedManaAbility;
|
import mage.abilities.mana.RedManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ public class FirewildBorderpost extends CardImpl<FirewildBorderpost> {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SupertypePredicate("Basic"));
|
filter.add(new SupertypePredicate("Basic"));
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FirewildBorderpost (UUID ownerId) {
|
public FirewildBorderpost (UUID ownerId) {
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.mana.BlackManaAbility;
|
import mage.abilities.mana.BlackManaAbility;
|
||||||
import mage.abilities.mana.BlueManaAbility;
|
import mage.abilities.mana.BlueManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ public class MistveinBorderpost extends CardImpl<MistveinBorderpost> {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SupertypePredicate("Basic"));
|
filter.add(new SupertypePredicate("Basic"));
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MistveinBorderpost (UUID ownerId) {
|
public MistveinBorderpost (UUID ownerId) {
|
||||||
|
|
|
@ -39,8 +39,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.keyword.ExaltedAbility;
|
import mage.abilities.keyword.ExaltedAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,9 +53,9 @@ public class QasaliPridemage extends CardImpl<QasaliPridemage> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public QasaliPridemage(UUID ownerId) {
|
public QasaliPridemage(UUID ownerId) {
|
||||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.effects.common.CantCounterSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ public class SpellbreakerBehemoth extends CardImpl<SpellbreakerBehemoth> {
|
||||||
private static final FilterSpell filter = new FilterSpell("Creature spells you control with power 5 or greater");
|
private static final FilterSpell filter = new FilterSpell("Creature spells you control with power 5 or greater");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.mana.BlackManaAbility;
|
import mage.abilities.mana.BlackManaAbility;
|
||||||
import mage.abilities.mana.RedManaAbility;
|
import mage.abilities.mana.RedManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ public class VeinfireBorderpost extends CardImpl<VeinfireBorderpost> {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SupertypePredicate("Basic"));
|
filter.add(new SupertypePredicate("Basic"));
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public VeinfireBorderpost (UUID ownerId) {
|
public VeinfireBorderpost (UUID ownerId) {
|
||||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,8 +48,7 @@ public class VithianRenegades extends CardImpl<VithianRenegades> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public VithianRenegades (UUID ownerId) {
|
public VithianRenegades (UUID ownerId) {
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.mana.GreenManaAbility;
|
import mage.abilities.mana.GreenManaAbility;
|
||||||
import mage.abilities.mana.WhiteManaAbility;
|
import mage.abilities.mana.WhiteManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ public class WildfieldBorderpost extends CardImpl<WildfieldBorderpost> {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SupertypePredicate("Basic"));
|
filter.add(new SupertypePredicate("Basic"));
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public WildfieldBorderpost (UUID ownerId) {
|
public WildfieldBorderpost (UUID ownerId) {
|
||||||
|
|
|
@ -37,7 +37,6 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.TapTargetCost;
|
import mage.abilities.costs.common.TapTargetCost;
|
||||||
import mage.abilities.effects.common.TapTargetEffect;
|
import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -52,7 +51,6 @@ public class DiversionaryTactics extends CardImpl<DiversionaryTactics> {
|
||||||
static {
|
static {
|
||||||
filter.setTapped(false);
|
filter.setTapped(false);
|
||||||
filter.setUseTapped(true);
|
filter.setUseTapped(true);
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DiversionaryTactics(UUID ownerId) {
|
public DiversionaryTactics(UUID ownerId) {
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -53,8 +53,7 @@ public class GoblinTrenches extends CardImpl<GoblinTrenches> {
|
||||||
final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GoblinTrenches(UUID ownerId) {
|
public GoblinTrenches(UUID ownerId) {
|
||||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,8 +49,7 @@ public class OvergrownEstate extends CardImpl<OvergrownEstate> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public OvergrownEstate(UUID ownerId) {
|
public OvergrownEstate(UUID ownerId) {
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ColoredManaCost;
|
import mage.abilities.costs.mana.ColoredManaCost;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ public class QuagmireDruid extends CardImpl<QuagmireDruid> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +46,7 @@ public class Smash extends CardImpl<Smash> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Smash(UUID ownerId) {
|
public Smash(UUID ownerId) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
@ -70,8 +71,7 @@ class TranquilPathEffect extends OneShotEffect<TranquilPathEffect> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("");
|
private final static FilterPermanent filter = new FilterPermanent("");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TranquilPathEffect() {
|
public TranquilPathEffect() {
|
||||||
|
|
|
@ -33,8 +33,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||||
import mage.abilities.keyword.MiracleAbility;
|
import mage.abilities.keyword.MiracleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -48,10 +49,10 @@ public class BanishingStroke extends CardImpl<BanishingStroke> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact, creature, or enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("artifact, creature, or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BanishingStroke(UUID ownerId) {
|
public BanishingStroke(UUID ownerId) {
|
||||||
|
|
|
@ -27,12 +27,13 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.avacynrestored;
|
package mage.sets.avacynrestored;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.effects.common.SacrificeAllEffect;
|
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -43,7 +44,7 @@ public class BarterInBlood extends CardImpl<BarterInBlood> {
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("creature");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BarterInBlood(UUID ownerId) {
|
public BarterInBlood(UUID ownerId) {
|
||||||
|
|
|
@ -41,6 +41,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterAura;
|
import mage.filter.common.FilterAura;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -91,7 +92,7 @@ class BrunaLightOfAlabasterEffect extends OneShotEffect<BrunaLightOfAlabasterEff
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterAuraCard.add(new SubtypePredicate("Aura"));
|
filterAuraCard.add(new SubtypePredicate("Aura"));
|
||||||
filterAuraCard.getCardType().add(CardType.ENCHANTMENT);
|
filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BrunaLightOfAlabasterEffect() {
|
public BrunaLightOfAlabasterEffect() {
|
||||||
|
|
|
@ -32,8 +32,8 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -46,8 +46,7 @@ public class Cursebreak extends CardImpl<Cursebreak> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cursebreak(UUID ownerId) {
|
public Cursebreak(UUID ownerId) {
|
||||||
|
|
|
@ -37,10 +37,11 @@ import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.common.TapTargetCost;
|
import mage.abilities.costs.common.TapTargetCost;
|
||||||
import mage.abilities.effects.common.ExileTargetEffect;
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -54,9 +55,9 @@ public class DevoutChaplain extends CardImpl<DevoutChaplain> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static FilterControlledPermanent humanFilter = new FilterControlledPermanent("untapped Human you control");
|
private final static FilterControlledPermanent humanFilter = new FilterControlledPermanent("untapped Human you control");
|
||||||
|
|
|
@ -42,8 +42,9 @@ import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -56,9 +57,9 @@ public class DualCasting extends CardImpl<DualCasting> {
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
new CardTypePredicate(CardType.INSTANT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.SORCERY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DualCasting(UUID ownerId) {
|
public DualCasting(UUID ownerId) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
@ -51,7 +52,7 @@ public class GeistSnatch extends CardImpl<GeistSnatch> {
|
||||||
private static final FilterSpell filter = new FilterSpell("creature spell");
|
private static final FilterSpell filter = new FilterSpell("creature spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GeistSnatch(UUID ownerId) {
|
public GeistSnatch(UUID ownerId) {
|
||||||
|
|
|
@ -34,8 +34,9 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
@ -50,10 +51,10 @@ public class GhostlyFlicker extends CardImpl<GhostlyFlicker> {
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifacts, creatures, and/or lands you control");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifacts, creatures, and/or lands you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.LAND);
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
new CardTypePredicate(CardType.LAND),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.ARTIFACT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GhostlyFlicker(UUID ownerId) {
|
public GhostlyFlicker(UUID ownerId) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ public class LunarMystic extends CardImpl<LunarMystic> {
|
||||||
private static final FilterSpell filter = new FilterSpell("an instant spell");
|
private static final FilterSpell filter = new FilterSpell("an instant spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
filter.add(new CardTypePredicate(CardType.INSTANT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LunarMystic(UUID ownerId) {
|
public LunarMystic(UUID ownerId) {
|
||||||
|
|
|
@ -33,8 +33,9 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,9 +47,9 @@ public class NaturalEnd extends CardImpl<NaturalEnd> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public NaturalEnd(UUID ownerId) {
|
public NaturalEnd(UUID ownerId) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.choices.ChoiceImpl;
|
import mage.choices.ChoiceImpl;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -111,7 +112,7 @@ class RiteOfRuinEffect extends OneShotEffect<RiteOfRuinEffect> {
|
||||||
int count = 1;
|
int count = 1;
|
||||||
for (CardType cardType : order) {
|
for (CardType cardType : order) {
|
||||||
FilterControlledPermanent filter = new FilterControlledPermanent(cardType + " permanent you control");
|
FilterControlledPermanent filter = new FilterControlledPermanent(cardType + " permanent you control");
|
||||||
filter.getCardType().add(cardType);
|
filter.add(new CardTypePredicate(cardType));
|
||||||
|
|
||||||
for (UUID playerId : controller.getInRange()) {
|
for (UUID playerId : controller.getInRange()) {
|
||||||
int amount = Math.min(count, game.getBattlefield().countAll(filter, playerId, game));
|
int amount = Math.min(count, game.getBattlefield().countAll(filter, playerId, game));
|
||||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.common.DiesTriggeredAbility;
|
||||||
import mage.abilities.effects.common.SacrificeAllEffect;
|
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -45,7 +46,7 @@ public class AkkiBlizzardHerder extends CardImpl<AkkiBlizzardHerder> {
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AkkiBlizzardHerder(UUID ownerId) {
|
public AkkiBlizzardHerder(UUID ownerId) {
|
||||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
@ -70,8 +70,7 @@ class FinalJudgmentEffect extends OneShotEffect<FinalJudgmentEffect> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("");
|
private final static FilterPermanent filter = new FilterPermanent("");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FinalJudgmentEffect() {
|
public FinalJudgmentEffect() {
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.TapTargetEffect;
|
import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
import mage.target.common.TargetLandPermanent;
|
import mage.target.common.TargetLandPermanent;
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ public class Floodbringer extends CardImpl<Floodbringer> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Floodbringer(UUID ownerId) {
|
public Floodbringer(UUID ownerId) {
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.ActivateOncePerTurnActivatedAbility;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +51,7 @@ public class AkkiAvalanchers extends CardImpl<AkkiAvalanchers> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AkkiAvalanchers(UUID ownerId) {
|
public AkkiAvalanchers(UUID ownerId) {
|
||||||
|
|
|
@ -41,7 +41,6 @@ import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.abilities.effects.common.UntapEnchantedEffect;
|
import mage.abilities.effects.common.UntapEnchantedEffect;
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
@ -57,7 +56,6 @@ public class AuraOfDominion extends CardImpl<AuraOfDominion> {
|
||||||
static {
|
static {
|
||||||
filter.setTapped(false);
|
filter.setTapped(false);
|
||||||
filter.setUseTapped(true);
|
filter.setUseTapped(true);
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,9 @@ import mage.ObjectColor;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,10 +51,11 @@ public class Befoul extends CardImpl<Befoul> {
|
||||||
public static final FilterPermanent filter = new FilterPermanent("land or nonblack creature");
|
public static final FilterPermanent filter = new FilterPermanent("land or nonblack creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
new CardTypePredicate(CardType.LAND),
|
||||||
filter.setNotColor(true);
|
Predicates.and(
|
||||||
filter.setColor(ObjectColor.BLACK);
|
Predicates.not(new ColorPredicate(ObjectColor.BLACK)),
|
||||||
|
new CardTypePredicate(CardType.CREATURE))));
|
||||||
}
|
}
|
||||||
public Befoul (UUID ownerId) {
|
public Befoul (UUID ownerId) {
|
||||||
super(ownerId, 102, "Befoul", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
|
super(ownerId, 102, "Befoul", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
|
||||||
|
|
|
@ -45,9 +45,9 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterLandCard;
|
import mage.filter.common.FilterLandCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
@ -137,8 +137,7 @@ class DokaiWeaverofLifeToken extends Token {
|
||||||
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("lands");
|
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("lands");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterLands.getCardType().add(CardType.LAND);
|
filterLands.add(new CardTypePredicate(CardType.LAND));
|
||||||
filterLands.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DokaiWeaverofLifeToken() {
|
DokaiWeaverofLifeToken() {
|
||||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.abilities.effects.common.DestroyAllEffect;
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
|
@ -45,8 +45,7 @@ public class Cleanfall extends CardImpl<Cleanfall> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("enchantments");
|
private final static FilterPermanent filter = new FilterPermanent("enchantments");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cleanfall(UUID ownerId) {
|
public Cleanfall(UUID ownerId) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -44,7 +45,7 @@ public class CommuneWithNature extends CardImpl<CommuneWithNature> {
|
||||||
|
|
||||||
private final static FilterCard filter = new FilterCard("creature card");
|
private final static FilterCard filter = new FilterCard("creature card");
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,4 +68,3 @@ public class CommuneWithNature extends CardImpl<CommuneWithNature> {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -52,7 +53,7 @@ public class FeastOfWorms extends CardImpl<FeastOfWorms> {
|
||||||
|
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ class FeastOfWormsEffect extends OneShotEffect<FeastOfWormsEffect> {
|
||||||
if (targetPlayer != null && permanent != null
|
if (targetPlayer != null && permanent != null
|
||||||
&& (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
|
&& (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
|
||||||
FilterControlledPermanent filter = new FilterControlledPermanent("land to sacrifice");
|
FilterControlledPermanent filter = new FilterControlledPermanent("land to sacrifice");
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.getControllerId().add(targetPlayer.getId());
|
filter.getControllerId().add(targetPlayer.getId());
|
||||||
filter.setNotController(false);
|
filter.setNotController(false);
|
||||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
||||||
|
|
|
@ -43,8 +43,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -61,8 +61,7 @@ public class Frostwielder extends CardImpl<Frostwielder> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Frostwielder(UUID ownerId) {
|
public Frostwielder(UUID ownerId) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -44,7 +45,7 @@ public class JoyousRespite extends CardImpl<JoyousRespite> {
|
||||||
|
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +51,7 @@ public class KamiOfAncientLaw extends CardImpl<KamiOfAncientLaw> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public KamiOfAncientLaw (UUID ownerId) {
|
public KamiOfAncientLaw (UUID ownerId) {
|
||||||
|
|
|
@ -45,8 +45,8 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -65,8 +65,7 @@ public class KumanoMasterYamabushi extends CardImpl<KumanoMasterYamabushi> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public KumanoMasterYamabushi(UUID ownerId) {
|
public KumanoMasterYamabushi(UUID ownerId) {
|
||||||
|
@ -131,11 +130,11 @@ class KumanaoMasterYamabushiEffect extends ReplacementEffectImpl<KumanaoMasterYa
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) {
|
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) {
|
||||||
DamagedByWatcher watcher =
|
DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
|
||||||
(DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
|
if (watcher != null) {
|
||||||
if (watcher != null)
|
|
||||||
return watcher.damagedCreatures.contains(event.getTargetId());
|
return watcher.damagedCreatures.contains(event.getTargetId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
@ -57,8 +57,7 @@ public class KumanosPupil extends CardImpl<KumanosPupil> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public KumanosPupil(UUID ownerId) {
|
public KumanosPupil(UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ public class MelokuTheCloudedMirror extends CardImpl<MelokuTheCloudedMirror> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MelokuTheCloudedMirror(UUID ownerId) {
|
public MelokuTheCloudedMirror(UUID ownerId) {
|
||||||
|
|
|
@ -50,6 +50,7 @@ import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.watchers.common.CastFromHandWatcher;
|
import mage.watchers.common.CastFromHandWatcher;
|
||||||
|
|
||||||
|
@ -60,7 +61,7 @@ public class MyojinOfLifesWeb extends CardImpl<MyojinOfLifesWeb> {
|
||||||
|
|
||||||
private static final FilterCard filter = new FilterCard("any number of creature cards from your hand");
|
private static final FilterCard filter = new FilterCard("any number of creature cards from your hand");
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
filter.setTargetOwner(TargetController.YOU);
|
filter.setTargetOwner(TargetController.YOU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,9 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -45,9 +46,9 @@ public class PeerThroughDepths extends CardImpl<PeerThroughDepths> {
|
||||||
|
|
||||||
private final static FilterCard filter = new FilterCard("instant or sorcery card");
|
private final static FilterCard filter = new FilterCard("instant or sorcery card");
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
new CardTypePredicate(CardType.SORCERY),
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
new CardTypePredicate(CardType.INSTANT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +46,7 @@ public class QuietPurity extends CardImpl<QuietPurity> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("Enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("Enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public QuietPurity(UUID ownerId) {
|
public QuietPurity(UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,8 +53,7 @@ public class SoratamiCloudskater extends CardImpl<SoratamiCloudskater> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoratamiCloudskater(UUID ownerId) {
|
public SoratamiCloudskater(UUID ownerId) {
|
||||||
|
|
|
@ -45,6 +45,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -58,8 +59,7 @@ public class SoratamiMirrorGuard extends CardImpl<SoratamiMirrorGuard> {
|
||||||
private final static FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature with power 2 or less");
|
private final static FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature with power 2 or less");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
filterCreature.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3));
|
filterCreature.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ public class SoratamiMirrorMage extends CardImpl<SoratamiMirrorMage> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("lands");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("lands");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoratamiMirrorMage(UUID ownerId) {
|
public SoratamiMirrorMage(UUID ownerId) {
|
||||||
|
|
|
@ -42,8 +42,8 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.ShroudAbility;
|
import mage.abilities.keyword.ShroudAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -55,8 +55,7 @@ public class SoratamiRainshaper extends CardImpl<SoratamiRainshaper> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoratamiRainshaper(UUID ownerId) {
|
public SoratamiRainshaper(UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ public class SoratamiSavant extends CardImpl<SoratamiSavant> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoratamiSavant(UUID ownerId) {
|
public SoratamiSavant(UUID ownerId) {
|
||||||
|
|
|
@ -42,8 +42,8 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
@ -56,8 +56,7 @@ public class SoratamiSeer extends CardImpl<SoratamiSeer> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("lands");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("lands");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoratamiSeer(UUID ownerId) {
|
public SoratamiSeer(UUID ownerId) {
|
||||||
|
|
|
@ -36,8 +36,8 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,8 +48,7 @@ public class StrengthOfCedars extends CardImpl<StrengthOfCedars> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land your control");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land your control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public StrengthOfCedars (UUID ownerId) {
|
public StrengthOfCedars (UUID ownerId) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ public class TimeOfNeed extends CardImpl<TimeOfNeed> {
|
||||||
private final static FilterCard filter = new FilterCard("legendary creature card");
|
private final static FilterCard filter = new FilterCard("legendary creature card");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
filter.add(new SupertypePredicate("Legendary"));
|
filter.add(new SupertypePredicate("Legendary"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,10 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -55,9 +56,9 @@ public class UyoSilentProphet extends CardImpl<UyoSilentProphet> {
|
||||||
private final static FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
private final static FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
new CardTypePredicate(CardType.INSTANT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.SORCERY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public UyoSilentProphet(UUID ownerId) {
|
public UyoSilentProphet(UUID ownerId) {
|
||||||
|
|
|
@ -34,6 +34,8 @@ import mage.abilities.effects.common.CounterTargetEffect;
|
||||||
import mage.abilities.effects.common.LoseLifeControllerEffect;
|
import mage.abilities.effects.common.LoseLifeControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +47,7 @@ public class Countersquall extends CardImpl<Countersquall> {
|
||||||
private static final FilterSpell filter = new FilterSpell("noncreature spell");
|
private static final FilterSpell filter = new FilterSpell("noncreature spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getNotCardType().add(CardType.CREATURE);
|
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Countersquall(UUID ownerId) {
|
public Countersquall(UUID ownerId) {
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +51,7 @@ public class Esperzoa extends CardImpl<Esperzoa> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("artifact");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Esperzoa (UUID ownerId) {
|
public Esperzoa (UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,9 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.effects.common.UntapSourceEffect;
|
import mage.abilities.effects.common.UntapSourceEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,9 +54,9 @@ public class EtherswornAdjudicator extends CardImpl<EtherswornAdjudicator> {
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("creature or enchantment");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("creature or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public EtherswornAdjudicator(UUID ownerId) {
|
public EtherswornAdjudicator(UUID ownerId) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -47,7 +48,7 @@ public class FaerieMechanist extends CardImpl<FaerieMechanist> {
|
||||||
|
|
||||||
private final static FilterCard filter = new FilterCard("artifact card");
|
private final static FilterCard filter = new FilterCard("artifact card");
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public FaerieMechanist(UUID ownerId) {
|
public FaerieMechanist(UUID ownerId) {
|
||||||
|
|
|
@ -36,8 +36,9 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -52,9 +53,9 @@ public class FiligreeFracture extends CardImpl<FiligreeFracture> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public FiligreeFracture(UUID ownerId) {
|
public FiligreeFracture(UUID ownerId) {
|
||||||
|
|
|
@ -44,8 +44,8 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -54,11 +54,10 @@ import mage.target.common.TargetControlledPermanent;
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public class GoblinRazerunners extends CardImpl<GoblinRazerunners> {
|
public class GoblinRazerunners extends CardImpl<GoblinRazerunners> {
|
||||||
private static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GoblinRazerunners (UUID ownerId) {
|
public GoblinRazerunners (UUID ownerId) {
|
||||||
|
|
|
@ -44,10 +44,10 @@ import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
import mage.filter.common.FilterLandCard;
|
import mage.filter.common.FilterLandCard;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
@ -61,8 +61,7 @@ public class KnightOfTheReliquary extends CardImpl<KnightOfTheReliquary> {
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest or Plains");
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest or Plains");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
|
||||||
filter.add(Predicates.or(new SubtypePredicate("Forest"), new SubtypePredicate("Plains")));
|
filter.add(Predicates.or(new SubtypePredicate("Forest"), new SubtypePredicate("Plains")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.keyword.CyclingAbility;
|
import mage.abilities.keyword.CyclingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter.ComparisonScope;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,8 +48,7 @@ public class MoltenFrame extends CardImpl<MoltenFrame> {
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MoltenFrame(UUID ownerId) {
|
public MoltenFrame(UUID ownerId) {
|
||||||
|
|
|
@ -42,6 +42,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -55,7 +57,7 @@ public class NicolBolasPlaneswalker extends CardImpl<NicolBolasPlaneswalker> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
|
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getNotCardType().add(CardType.CREATURE);
|
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public NicolBolasPlaneswalker(UUID ownerId) {
|
public NicolBolasPlaneswalker(UUID ownerId) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.common.SpellCastTriggeredAbility;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.permanent.token.AngelToken;
|
import mage.game.permanent.token.AngelToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +47,7 @@ public class SigilOfTheEmptyThrone extends CardImpl<SigilOfTheEmptyThrone> {
|
||||||
private static final FilterSpell filter = new FilterSpell("an enchantment spell");
|
private static final FilterSpell filter = new FilterSpell("an enchantment spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SigilOfTheEmptyThrone(UUID ownerId) {
|
public SigilOfTheEmptyThrone(UUID ownerId) {
|
||||||
|
|
|
@ -43,8 +43,8 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -95,8 +95,7 @@ class WerewolfRansackerAbility extends TriggeredAbilityImpl<WerewolfRansackerAbi
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public WerewolfRansackerAbility() {
|
public WerewolfRansackerAbility() {
|
||||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.effects.common.CounterTargetEffect;
|
||||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +46,7 @@ public class BoneToAsh extends CardImpl<BoneToAsh> {
|
||||||
private static final FilterSpell filter = new FilterSpell("creature spell");
|
private static final FilterSpell filter = new FilterSpell("creature spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoneToAsh(UUID ownerId) {
|
public BoneToAsh(UUID ownerId) {
|
||||||
|
|
|
@ -27,16 +27,20 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.darkascension;
|
package mage.sets.darkascension;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Constants;
|
import mage.Constants;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.Predicate;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.StackObject;
|
import mage.game.stack.StackObject;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -94,11 +98,13 @@ class CounterlashEffect extends OneShotEffect<CounterlashEffect> {
|
||||||
game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game);
|
game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game);
|
||||||
if (player.chooseUse(Constants.Outcome.PutCardInPlay, "Cast a nonland card in your hand that shares a card type with that spell without paying its mana cost?", game)) {
|
if (player.chooseUse(Constants.Outcome.PutCardInPlay, "Cast a nonland card in your hand that shares a card type with that spell without paying its mana cost?", game)) {
|
||||||
FilterCard filter = new FilterCard();
|
FilterCard filter = new FilterCard();
|
||||||
|
ArrayList<Predicate<MageObject>> types = new ArrayList<Predicate<MageObject>>();
|
||||||
for (CardType type: stackObject.getCardType()) {
|
for (CardType type: stackObject.getCardType()) {
|
||||||
if (type != CardType.LAND)
|
if (type != CardType.LAND) {
|
||||||
filter.getCardType().add(type);
|
types.add(new CardTypePredicate(type));
|
||||||
}
|
}
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
}
|
||||||
|
filter.add(Predicates.or(types));
|
||||||
TargetCardInHand target = new TargetCardInHand(filter);
|
TargetCardInHand target = new TargetCardInHand(filter);
|
||||||
if (player.choose(Constants.Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
|
if (player.choose(Constants.Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
|
||||||
Card card = player.getHand().get(target.getFirstTarget(), game);
|
Card card = player.getHand().get(target.getFirstTarget(), game);
|
||||||
|
|
|
@ -38,8 +38,9 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -87,9 +88,9 @@ class CurseOfEchoesCopyTriggeredAbility extends TriggeredAbilityImpl<CurseOfEcho
|
||||||
private static final FilterSpell filter = new FilterSpell();
|
private static final FilterSpell filter = new FilterSpell();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
new CardTypePredicate(CardType.INSTANT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.SORCERY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CurseOfEchoesCopyTriggeredAbility() {
|
public CurseOfEchoesCopyTriggeredAbility() {
|
||||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterNonTokenPermanent;
|
import mage.filter.common.FilterNonTokenPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.WolfToken;
|
import mage.game.permanent.token.WolfToken;
|
||||||
|
@ -76,8 +76,7 @@ class FeedThePackEffect extends OneShotEffect<FeedThePackEffect> {
|
||||||
private static final FilterNonTokenPermanent filter = new FilterNonTokenPermanent("nontoken creature");
|
private static final FilterNonTokenPermanent filter = new FilterNonTokenPermanent("nontoken creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
filter.setTargetController(Constants.TargetController.YOU);
|
filter.setTargetController(Constants.TargetController.YOU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.keyword.FlashbackAbility;
|
import mage.abilities.keyword.FlashbackAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
|
@ -51,9 +52,9 @@ public class IncreasingVengeance extends CardImpl<IncreasingVengeance> {
|
||||||
private final static FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
private final static FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
new CardTypePredicate(CardType.INSTANT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.SORCERY)));
|
||||||
filter.setTargetController(Constants.TargetController.YOU);
|
filter.setTargetController(Constants.TargetController.YOU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.keyword.FlashbackAbility;
|
import mage.abilities.keyword.FlashbackAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,9 +49,9 @@ public class MysticRetrieval extends CardImpl<MysticRetrieval> {
|
||||||
private static final FilterCard filter = new FilterCard("instant or sorcery card from your graveyard");
|
private static final FilterCard filter = new FilterCard("instant or sorcery card from your graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.INSTANT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.SORCERY);
|
new CardTypePredicate(CardType.INSTANT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.SORCERY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public MysticRetrieval(UUID ownerId) {
|
public MysticRetrieval(UUID ownerId) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.keyword.FlashbackAbility;
|
import mage.abilities.keyword.FlashbackAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +48,7 @@ public class RayOfRevelation extends CardImpl<RayOfRevelation> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public RayOfRevelation(UUID ownerId) {
|
public RayOfRevelation(UUID ownerId) {
|
||||||
|
|
|
@ -46,8 +46,9 @@ import mage.abilities.keyword.LifelinkAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.command.Emblem;
|
import mage.game.command.Emblem;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -66,9 +67,9 @@ public class SorinLordOfInnistrad extends CardImpl<SorinLordOfInnistrad> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("creature or planeswalker");
|
private static final FilterPermanent filter = new FilterPermanent("creature or planeswalker");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.PLANESWALKER);
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.PLANESWALKER)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public SorinLordOfInnistrad(UUID ownerId) {
|
public SorinLordOfInnistrad(UUID ownerId) {
|
||||||
|
|
|
@ -43,8 +43,8 @@ import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,8 +56,7 @@ public class ArcaneSpyglass extends CardImpl<ArcaneSpyglass> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArcaneSpyglass (UUID ownerId) {
|
public ArcaneSpyglass (UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,8 +53,7 @@ public class Coretapper extends CardImpl<Coretapper> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Coretapper(UUID ownerId) {
|
public Coretapper(UUID ownerId) {
|
||||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
|
@ -48,8 +48,7 @@ public class DarksteelForge extends CardImpl<DarksteelForge> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Artifacts");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Artifacts");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarksteelForge(UUID ownerId) {
|
public DarksteelForge(UUID ownerId) {
|
||||||
|
|
|
@ -35,8 +35,8 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
@ -48,8 +48,7 @@ public class EchoingCalm extends CardImpl<EchoingCalm> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EchoingCalm(UUID ownerId) {
|
public EchoingCalm(UUID ownerId) {
|
||||||
|
|
|
@ -40,6 +40,7 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
@ -77,8 +78,7 @@ class EmissaryOfHopeEffect extends OneShotEffect<EmissaryOfHopeEffect> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
filter.setTargetController(Constants.TargetController.YOU);
|
filter.setTargetController(Constants.TargetController.YOU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.effects.common.BasicManaEffect;
|
import mage.abilities.effects.common.BasicManaEffect;
|
||||||
import mage.abilities.mana.BasicManaAbility;
|
import mage.abilities.mana.BasicManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +51,7 @@ public class KrarkClanStoker extends CardImpl<KrarkClanStoker> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public KrarkClanStoker(UUID ownerId) {
|
public KrarkClanStoker(UUID ownerId) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
|
@ -46,8 +47,8 @@ public class MagneticFlux extends CardImpl<MagneticFlux> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Artifact creatures");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Artifact creatures");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public MagneticFlux(UUID ownerId) {
|
public MagneticFlux(UUID ownerId) {
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.DiscardTargetCost;
|
||||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +51,7 @@ public class NeurokProdigy extends CardImpl<NeurokProdigy> {
|
||||||
private final static FilterCard filter = new FilterCard("an artifact card");
|
private final static FilterCard filter = new FilterCard("an artifact card");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NeurokProdigy(UUID ownerId) {
|
public NeurokProdigy(UUID ownerId) {
|
||||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +46,7 @@ public class Oxidize extends CardImpl<Oxidize> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Oxidize(UUID ownerId) {
|
public Oxidize(UUID ownerId) {
|
||||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
import mage.abilities.effects.common.RegenerateTargetEffect;
|
import mage.abilities.effects.common.RegenerateTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,8 +52,7 @@ public class PteronGhost extends CardImpl<PteronGhost> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PteronGhost(UUID ownerId) {
|
public PteronGhost(UUID ownerId) {
|
||||||
|
|
|
@ -40,9 +40,9 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -55,10 +55,8 @@ public class SlobadGoblinTinkerer extends CardImpl<SlobadGoblinTinkerer> {
|
||||||
private final static FilterControlledPermanent filterControlled = new FilterControlledPermanent("an artifact");
|
private final static FilterControlledPermanent filterControlled = new FilterControlledPermanent("an artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
filterControlled.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filterControlled.getCardType().add(CardType.ARTIFACT);
|
|
||||||
filterControlled.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SlobadGoblinTinkerer(UUID ownerId) {
|
public SlobadGoblinTinkerer(UUID ownerId) {
|
||||||
|
|
|
@ -36,8 +36,9 @@ import mage.Constants.Rarity;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
@ -71,9 +72,7 @@ class SoulscourEffect extends OneShotEffect<SoulscourEffect> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("");
|
private final static FilterPermanent filter = new FilterPermanent("");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT)));
|
||||||
filter.getNotCardType().add(true);
|
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoulscourEffect() {
|
public SoulscourEffect() {
|
||||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.costs.mana.ColoredManaCost;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ public class SteelshaperApprentice extends CardImpl<SteelshaperApprentice> {
|
||||||
private static final FilterCard filter = new FilterCard("Equipment card");
|
private static final FilterCard filter = new FilterCard("Equipment card");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.add(new SubtypePredicate("Equipment"));
|
filter.add(new SubtypePredicate("Equipment"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,9 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,9 +53,9 @@ public class ViridianZealot extends CardImpl<ViridianZealot> {
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ViridianZealot(UUID ownerId) {
|
public ViridianZealot(UUID ownerId) {
|
||||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.UntapTargetEffect;
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +51,7 @@ public class VoltaicConstruct extends CardImpl<VoltaicConstruct> {
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public VoltaicConstruct(UUID ownerId) {
|
public VoltaicConstruct(UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.effects.common.BasicManaEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.mana.SimpleManaAbility;
|
import mage.abilities.mana.SimpleManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ public class AzoriusChancery extends CardImpl<AzoriusChancery> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AzoriusChancery(UUID ownerId) {
|
public AzoriusChancery(UUID ownerId) {
|
||||||
|
|
|
@ -36,8 +36,9 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,9 +49,9 @@ public class IndrikStomphowler extends CardImpl<IndrikStomphowler> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
private final static FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IndrikStomphowler(UUID ownerId) {
|
public IndrikStomphowler(UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.effects.common.BasicManaEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.mana.SimpleManaAbility;
|
import mage.abilities.mana.SimpleManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -53,8 +53,7 @@ public class RakdosCarnarium extends CardImpl<RakdosCarnarium> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public RakdosCarnarium(UUID ownerId) {
|
public RakdosCarnarium(UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.effects.common.BasicManaEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.mana.SimpleManaAbility;
|
import mage.abilities.mana.SimpleManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ public class SimicGrowthChamber extends CardImpl<SimicGrowthChamber> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimicGrowthChamber(UUID ownerId) {
|
public SimicGrowthChamber(UUID ownerId) {
|
||||||
|
|
|
@ -42,6 +42,7 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.PersistAbility;
|
import mage.abilities.keyword.PersistAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,10 +50,10 @@ import mage.target.TargetPermanent;
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public class KithkinSpellduster extends CardImpl<KithkinSpellduster> {
|
public class KithkinSpellduster extends CardImpl<KithkinSpellduster> {
|
||||||
private static FilterPermanent filter = new FilterPermanent("enchantment");
|
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public KithkinSpellduster(UUID ownerId) {
|
public KithkinSpellduster(UUID ownerId) {
|
||||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,8 +48,7 @@ public class NoggleBridgebreaker extends CardImpl<NoggleBridgebreaker> {
|
||||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NoggleBridgebreaker(UUID ownerId) {
|
public NoggleBridgebreaker(UUID ownerId) {
|
||||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,9 +53,8 @@ public class Scarecrone extends CardImpl<Scarecrone> {
|
||||||
private final static FilterCard filter = new FilterCard("artifact creature card from your graveyard");
|
private final static FilterCard filter = new FilterCard("artifact creature card from your graveyard");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
filter.getCardType().add(CardType.CREATURE);
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.All);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Scarecrone(UUID ownerId) {
|
public Scarecrone(UUID ownerId) {
|
||||||
|
|
|
@ -44,6 +44,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,9 +56,9 @@ public class WickerboughElder extends CardImpl<WickerboughElder> {
|
||||||
private final static FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
private final static FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.or(
|
||||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public WickerboughElder(UUID ownerId) {
|
public WickerboughElder(UUID ownerId) {
|
||||||
|
|
|
@ -36,6 +36,8 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DamageControllerEffect;
|
import mage.abilities.effects.common.DamageControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
@ -49,7 +51,7 @@ public class AshesToAshes extends CardImpl<AshesToAshes> {
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonartifact creature");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonartifact creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getNotCardType().add(CardType.ARTIFACT);
|
filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AshesToAshes(UUID ownerId) {
|
public AshesToAshes(UUID ownerId) {
|
||||||
|
|
|
@ -35,8 +35,8 @@ import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,8 +47,7 @@ public class DuneBroodNephilim extends CardImpl<DuneBroodNephilim> {
|
||||||
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("land you control");
|
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("land you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filterLands.getCardType().add(CardType.LAND);
|
filterLands.add(new CardTypePredicate(CardType.LAND));
|
||||||
filterLands.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DuneBroodNephilim(UUID ownerId) {
|
public DuneBroodNephilim(UUID ownerId) {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue