mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Merge branch 'filters'
This commit is contained in:
commit
43322d3c1a
969 changed files with 4088 additions and 3447 deletions
|
@ -35,6 +35,8 @@
|
|||
package mage.client.deckeditor;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.MageObject;
|
||||
import mage.ObjectColor;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.client.cards.BigCard;
|
||||
|
@ -44,8 +46,12 @@ import mage.client.cards.ICardGrid;
|
|||
import mage.client.constants.Constants.SortBy;
|
||||
import mage.client.deckeditor.table.TableModel;
|
||||
import mage.client.util.sets.ConstructedFormats;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
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.view.CardsView;
|
||||
|
||||
|
@ -63,7 +69,7 @@ import java.util.List;
|
|||
public class CardSelector extends javax.swing.JPanel implements ComponentListener {
|
||||
|
||||
private final List<Card> cards = new ArrayList<Card>();
|
||||
private final FilterCard filter = new FilterCard();
|
||||
private FilterCard filter = new FilterCard();
|
||||
private BigCard bigCard;
|
||||
private boolean limited = false;
|
||||
|
||||
|
@ -140,7 +146,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
for (Card card: sideboard) {
|
||||
this.cards.add(card);
|
||||
}
|
||||
initFilter();
|
||||
|
||||
filterCards();
|
||||
}
|
||||
|
||||
|
@ -153,37 +159,70 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
cbExpansionSet.insertItemAt("-- All sets", 0);
|
||||
cbExpansionSet.insertItemAt("-- Standard", 1);
|
||||
cbExpansionSet.setSelectedIndex(0);
|
||||
initFilter();
|
||||
if (this.cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
||||
|
||||
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) {
|
||||
filter.getExpansionSetCode().add(((ExpansionSet) this.cbExpansionSet.getSelectedItem()).getCode());
|
||||
} else if (this.cbExpansionSet.getSelectedItem().equals("-- 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() {
|
||||
buildFilter();
|
||||
try {
|
||||
List<Card> filteredCards = new ArrayList<Card>();
|
||||
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
||||
|
@ -648,99 +687,62 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void rdoGreenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoGreenActionPerformed
|
||||
filter.getColor().setGreen(this.rdoGreen.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoGreenActionPerformed
|
||||
|
||||
private void rdoBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlackActionPerformed
|
||||
filter.getColor().setBlack(this.rdoBlack.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoBlackActionPerformed
|
||||
|
||||
private void rdoWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoWhiteActionPerformed
|
||||
filter.getColor().setWhite(this.rdoWhite.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoWhiteActionPerformed
|
||||
|
||||
private void rdoRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoRedActionPerformed
|
||||
filter.getColor().setRed(this.rdoRed.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoRedActionPerformed
|
||||
|
||||
private void rdoBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlueActionPerformed
|
||||
filter.getColor().setBlue(this.rdoBlue.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoBlueActionPerformed
|
||||
|
||||
private void rdoColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoColorlessActionPerformed
|
||||
filter.setColorless(this.rdoColorless.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoColorlessActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoLandActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoCreaturesActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoArtifactsActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoEnchantmentsActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoInstantsActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoSorceriesActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoPlaneswalkersActionPerformed
|
||||
|
||||
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();
|
||||
} else {
|
||||
if (this.cbExpansionSet.getSelectedItem().equals("-- Standard")) {
|
||||
filter.getExpansionSetCode().addAll(ConstructedFormats.getSetsByFormat("Standard"));
|
||||
filterCards();
|
||||
} else {
|
||||
// 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
|
||||
String name = jTextFieldSearch.getText().trim();
|
||||
filter.setText(name);
|
||||
filterCards();
|
||||
}//GEN-LAST:event_jButtonSearchActionPerformed
|
||||
|
||||
private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCleanActionPerformed
|
||||
jTextFieldSearch.setText("");
|
||||
filter.setText("");
|
||||
filterCards();
|
||||
}//GEN-LAST:event_jButtonCleanActionPerformed
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
package mage.client.deckeditor.table;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.MageObject;
|
||||
import mage.ObjectColor;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.client.cards.BigCard;
|
||||
|
@ -37,8 +39,13 @@ import mage.client.cards.CardsStorage;
|
|||
import mage.client.cards.ICardGrid;
|
||||
import mage.client.constants.Constants.DeckEditorMode;
|
||||
import mage.client.constants.Constants.SortBy;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.client.util.sets.ConstructedFormats;
|
||||
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.view.CardsView;
|
||||
|
||||
|
@ -59,7 +66,7 @@ import java.util.List;
|
|||
public class CardTableSelector extends javax.swing.JPanel implements ComponentListener {
|
||||
|
||||
private final List<Card> cards = new ArrayList<Card>();
|
||||
private final FilterCard filter = new FilterCard();
|
||||
private FilterCard filter = new FilterCard();
|
||||
private BigCard bigCard;
|
||||
protected CardEventSource cardEventSource = new CardEventSource();
|
||||
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) {
|
||||
this.bigCard = bigCard;
|
||||
this.btnBooster.setVisible(false);
|
||||
|
@ -95,7 +160,7 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
|
|||
for (Card card: sideboard) {
|
||||
this.cards.add(card);
|
||||
}
|
||||
initFilter();
|
||||
|
||||
filterCards();
|
||||
}
|
||||
|
||||
|
@ -114,35 +179,12 @@ public class CardTableSelector extends javax.swing.JPanel implements ComponentLi
|
|||
cbExpansionSet.setModel(new DefaultComboBoxModel(l));
|
||||
cbExpansionSet.insertItemAt("-- All sets -- ", 0);
|
||||
cbExpansionSet.setSelectedIndex(0);
|
||||
initFilter();
|
||||
if (this.cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
||||
filter.getExpansionSetCode().add(((ExpansionSet)this.cbExpansionSet.getSelectedItem()).getCode());
|
||||
}
|
||||
|
||||
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() {
|
||||
buildFilter();
|
||||
try {
|
||||
List<Card> filteredCards = new ArrayList<Card>();
|
||||
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
|
||||
filter.getColor().setGreen(this.rdoGreen.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoGreenActionPerformed
|
||||
|
||||
private void rdoBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlackActionPerformed
|
||||
filter.getColor().setBlack(this.rdoBlack.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoBlackActionPerformed
|
||||
|
||||
private void rdoWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoWhiteActionPerformed
|
||||
filter.getColor().setWhite(this.rdoWhite.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoWhiteActionPerformed
|
||||
|
||||
private void rdoRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoRedActionPerformed
|
||||
filter.getColor().setRed(this.rdoRed.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoRedActionPerformed
|
||||
|
||||
private void rdoBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlueActionPerformed
|
||||
filter.getColor().setBlue(this.rdoBlue.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoBlueActionPerformed
|
||||
|
||||
private void rdoColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoColorlessActionPerformed
|
||||
filter.setColorless(this.rdoColorless.isSelected());
|
||||
filterCards();
|
||||
}//GEN-LAST:event_rdoColorlessActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoLandActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoCreaturesActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoArtifactsActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoEnchantmentsActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoInstantsActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoSorceriesActionPerformed
|
||||
|
||||
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();
|
||||
}//GEN-LAST:event_rdoPlaneswalkersActionPerformed
|
||||
|
||||
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();
|
||||
}//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
|
||||
String name = jTextFieldSearch.getText().trim();
|
||||
filter.setText(name);
|
||||
filterCards();
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
|
||||
private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
|
||||
jTextFieldSearch.setText("");
|
||||
filter.setText("");
|
||||
filterCards();
|
||||
}//GEN-LAST:event_jButton2ActionPerformed
|
||||
|
||||
|
|
|
@ -40,8 +40,9 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,16 +50,14 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class FieldmistBorderpost extends CardImpl<FieldmistBorderpost> {
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Fieldmist Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Basic");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public FieldmistBorderpost (UUID ownerId) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -73,11 +74,10 @@ public class FiligreeAngel extends CardImpl<FiligreeAngel> {
|
|||
}
|
||||
|
||||
class FiligreeAngelEffect extends OneShotEffect<FiligreeAngelEffect> {
|
||||
private static FilterPermanent filter = new FilterPermanent();
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.All);
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public FiligreeAngelEffect() {
|
||||
|
|
|
@ -40,8 +40,9 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,16 +50,14 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class FirewildBorderpost extends CardImpl<FirewildBorderpost> {
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Firewild Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Basic");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public FirewildBorderpost (UUID ownerId) {
|
||||
|
|
|
@ -43,8 +43,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
|
@ -56,8 +56,7 @@ public class LichLordOfUnx extends CardImpl<LichLordOfUnx> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public LichLordOfUnx (UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,9 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -55,10 +56,8 @@ public class MistveinBorderpost extends CardImpl<MistveinBorderpost> {
|
|||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Mistvein Borderpos's mana cost";
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Basic");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public MistveinBorderpost (UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.ExaltedAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,9 +53,9 @@ public class QasaliPridemage extends CardImpl<QasaliPridemage> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public QasaliPridemage(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,8 @@ import mage.abilities.effects.common.CantCounterSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -51,9 +53,8 @@ public class SpellbreakerBehemoth extends CardImpl<SpellbreakerBehemoth> {
|
|||
private static final FilterSpell filter = new FilterSpell("Creature spells you control with power 5 or greater");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.setPower(4);
|
||||
filter.setPowerComparison(Filter.ComparisonType.GreaterThan);
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
||||
}
|
||||
|
||||
public SpellbreakerBehemoth(UUID ownerId) {
|
||||
|
|
|
@ -32,23 +32,24 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class SphinxOfTheSteelWind extends CardImpl<SphinxOfTheSteelWind> {
|
||||
private static FilterCard filter = new FilterCard("red and from green");
|
||||
private static final FilterCard filter = new FilterCard("red and from green");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new ColorPredicate(ObjectColor.RED),
|
||||
new ColorPredicate(ObjectColor.GREEN)));
|
||||
}
|
||||
|
||||
public SphinxOfTheSteelWind (UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,9 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,16 +50,14 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class VeinfireBorderpost extends CardImpl<VeinfireBorderpost> {
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Veinfire Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Basic");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public VeinfireBorderpost (UUID ownerId) {
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,8 +48,7 @@ public class VithianRenegades extends CardImpl<VithianRenegades> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public VithianRenegades (UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,9 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,16 +50,14 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class WildfieldBorderpost extends CardImpl<WildfieldBorderpost> {
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Wildfield Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Basic");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public WildfieldBorderpost (UUID ownerId) {
|
||||
|
|
|
@ -42,6 +42,8 @@ import mage.abilities.effects.common.DamageAllEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -51,8 +53,7 @@ public class BloodfireDwarf extends CardImpl<BloodfireDwarf> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying");
|
||||
|
||||
static {
|
||||
filter.getAbilities().add(FlyingAbility.getInstance());
|
||||
filter.setNotAbilities(true);
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
}
|
||||
|
||||
public BloodfireDwarf(UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
@ -74,8 +75,7 @@ class BogGnarrTriggeredAbility extends TriggeredAbilityImpl<BogGnarrTriggeredAbi
|
|||
private static final FilterCard filter = new FilterCard("a black spell");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public BogGnarrTriggeredAbility() {
|
||||
|
|
|
@ -37,7 +37,6 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -52,7 +51,6 @@ public class DiversionaryTactics extends CardImpl<DiversionaryTactics> {
|
|||
static {
|
||||
filter.setTapped(false);
|
||||
filter.setUseTapped(true);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public DiversionaryTactics(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
@ -73,8 +74,7 @@ class GladeGnarrTriggeredAbility extends TriggeredAbilityImpl<GladeGnarrTriggere
|
|||
private static final FilterCard filter = new FilterCard("a black spell");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public GladeGnarrTriggeredAbility() {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -53,8 +53,7 @@ public class GoblinTrenches extends CardImpl<GoblinTrenches> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public GoblinTrenches(UUID ownerId) {
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,7 @@ public class OvergrownEstate extends CardImpl<OvergrownEstate> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public OvergrownEstate(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.costs.mana.ColoredManaCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
|
@ -54,8 +54,7 @@ public class QuagmireDruid extends CardImpl<QuagmireDruid> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +46,7 @@ public class Smash extends CardImpl<Smash> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
}
|
||||
|
||||
public Smash(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.common.DrawCardControllerEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -70,8 +71,7 @@ class TranquilPathEffect extends OneShotEffect<TranquilPathEffect> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public TranquilPathEffect() {
|
||||
|
|
|
@ -36,12 +36,12 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.players.Player;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -83,10 +83,8 @@ class AngelOfGlorysRiseEffect extends OneShotEffect<AngelOfGlorysRiseEffect> {
|
|||
private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filterZombie.getSubtype().add("Zombie");
|
||||
filterZombie.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterHuman.getSubtype().add("Human");
|
||||
filterHuman.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filterZombie.add(new SubtypePredicate("Zombie"));
|
||||
filterHuman.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public AngelOfGlorysRiseEffect() {
|
||||
|
|
|
@ -39,6 +39,8 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -52,9 +54,7 @@ public class AngelOfJubilation extends CardImpl<AngelOfJubilation> {
|
|||
private final static FilterCreaturePermanent filterNonBlack = new FilterCreaturePermanent("nonblack creatures");
|
||||
|
||||
static {
|
||||
filterNonBlack.setUseColor(true);
|
||||
filterNonBlack.setColor(ObjectColor.BLACK);
|
||||
filterNonBlack.setNotColor(true);
|
||||
filterNonBlack.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public AngelOfJubilation(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
@ -92,8 +93,7 @@ class AppetiteForBrainsEffect extends OneShotEffect<AppetiteForBrainsEffect> {
|
|||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null && targetPlayer != null) {
|
||||
FilterCard filter = new FilterCard("with converted mana cost 4 or greater");
|
||||
filter.setConvertedManaCost(3);
|
||||
filter.setConvertedManaCostComparison(Filter.ComparisonType.GreaterThan);
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3));
|
||||
|
||||
targetPlayer.revealCards("Appetite for Brains", targetPlayer.getHand(), game);
|
||||
TargetCard target = new TargetCard(Zone.PICK, filter);
|
||||
|
|
|
@ -33,8 +33,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||
import mage.abilities.keyword.MiracleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public BanishingStroke(UUID ownerId) {
|
||||
|
|
|
@ -27,12 +27,13 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.cards.CardImpl;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
public BarterInBlood(UUID ownerId) {
|
||||
|
|
|
@ -40,6 +40,8 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterAura;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -89,8 +91,8 @@ class BrunaLightOfAlabasterEffect extends OneShotEffect<BrunaLightOfAlabasterEff
|
|||
private static final FilterCard filterAuraCard = new FilterCard("Aura card");
|
||||
|
||||
static {
|
||||
filterAuraCard.getSubtype().add("Aura");
|
||||
filterAuraCard.getCardType().add(CardType.ENCHANTMENT);
|
||||
filterAuraCard.add(new SubtypePredicate("Aura"));
|
||||
filterAuraCard.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public BrunaLightOfAlabasterEffect() {
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
|
@ -42,6 +43,8 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -50,12 +53,10 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class CallToServe extends CardImpl<CallToServe> {
|
||||
private static FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.setNotColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public CallToServe(UUID ownerId) {
|
||||
|
|
|
@ -32,8 +32,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -46,8 +46,7 @@ public class Cursebreak extends CardImpl<Cursebreak> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Cursebreak(UUID ownerId) {
|
||||
|
|
|
@ -27,22 +27,26 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
|
@ -96,8 +100,13 @@ class DescendantsPathEffect extends OneShotEffect<DescendantsPathEffect> {
|
|||
player.revealCards("DescendantsPath", new CardsImpl(card), game);
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
filter.getSubtype().addAll(card.getSubtype());
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
|
||||
ArrayList<Predicate<MageObject>> subtypes = new ArrayList<Predicate<MageObject>>();
|
||||
for (String subtype: card.getSubtype()) {
|
||||
subtypes.add(new SubtypePredicate(subtype));
|
||||
}
|
||||
filter.add(Predicates.or(subtypes));
|
||||
|
||||
int count = game.getBattlefield().getAllActivePermanents(filter, player.getId(), game).size();
|
||||
if (count > 0) {
|
||||
game.informPlayers("DescendantsPath: Found a creature that shares a creature type with the revealed card.");
|
||||
|
|
|
@ -37,9 +37,11 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -53,9 +55,9 @@ public class DevoutChaplain extends CardImpl<DevoutChaplain> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
private final static FilterControlledPermanent humanFilter = new FilterControlledPermanent("untapped Human you control");
|
||||
|
@ -63,8 +65,7 @@ public class DevoutChaplain extends CardImpl<DevoutChaplain> {
|
|||
static {
|
||||
humanFilter.setTapped(false);
|
||||
humanFilter.setUseTapped(true);
|
||||
humanFilter.getSubtype().add("Human");
|
||||
humanFilter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
humanFilter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public DevoutChaplain(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.keyword.SoulbondAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class DiregrafEscort extends CardImpl<DiregrafEscort> {
|
|||
private static final FilterPermanent filter = new FilterCreaturePermanent("Zombies");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Zombie");
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
}
|
||||
|
||||
public DiregrafEscort(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
|
@ -49,8 +50,7 @@ public class DriverOfTheDead extends CardImpl<DriverOfTheDead> {
|
|||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard to the battlefield");
|
||||
|
||||
static {
|
||||
filter.setConvertedManaCost(3);
|
||||
filter.setConvertedManaCostComparison(Filter.ComparisonType.LessThan);
|
||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
}
|
||||
|
||||
public DriverOfTheDead(UUID ownerId) {
|
||||
|
|
|
@ -42,8 +42,9 @@ import mage.abilities.effects.common.CopyTargetSpellEffect;
|
|||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.TargetSpell;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.INSTANT);
|
||||
filter.getCardType().add(CardType.SORCERY);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.INSTANT),
|
||||
new CardTypePredicate(CardType.SORCERY)));
|
||||
}
|
||||
|
||||
public DualCasting(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -50,7 +51,7 @@ public class EatenBySpiders extends CardImpl<EatenBySpiders> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
|
||||
|
||||
static {
|
||||
filter.getAbilities().add(FlyingAbility.getInstance());
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
public EatenBySpiders(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -47,7 +48,7 @@ public class FavorableWinds extends CardImpl<FavorableWinds> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control with flying");
|
||||
|
||||
static {
|
||||
filter.getAbilities().add(FlyingAbility.getInstance());
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
public FavorableWinds(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.costs.common.TapTargetCost;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SpiritWhiteToken;
|
||||
|
@ -59,8 +59,7 @@ public class GallowsAtWillowHill extends CardImpl<GallowsAtWillowHill> {
|
|||
static {
|
||||
humanFilter.setTapped(false);
|
||||
humanFilter.setUseTapped(true);
|
||||
humanFilter.getSubtype().add("Human");
|
||||
humanFilter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
humanFilter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public GallowsAtWillowHill(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetSpell;
|
||||
|
@ -51,7 +52,7 @@ public class GeistSnatch extends CardImpl<GeistSnatch> {
|
|||
private static final FilterSpell filter = new FilterSpell("creature spell");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
public GeistSnatch(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,9 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.LAND),
|
||||
new CardTypePredicate(CardType.ARTIFACT)));
|
||||
}
|
||||
|
||||
public GhostlyFlicker(UUID ownerId) {
|
||||
|
|
|
@ -32,6 +32,7 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -44,7 +45,7 @@ public class HumanFrailty extends CardImpl<HumanFrailty> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creature");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public HumanFrailty(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -48,7 +49,7 @@ public class KessigMalcontents extends CardImpl<KessigMalcontents> {
|
|||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Humans you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public KessigMalcontents(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.DoIfCostPaid;
|
|||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -48,7 +49,7 @@ public class LunarMystic extends CardImpl<LunarMystic> {
|
|||
private static final FilterSpell filter = new FilterSpell("an instant spell");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.INSTANT);
|
||||
filter.add(new CardTypePredicate(CardType.INSTANT));
|
||||
}
|
||||
|
||||
public LunarMystic(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -45,7 +46,7 @@ public class MassAppeal extends CardImpl<MassAppeal> {
|
|||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Human you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public MassAppeal(UUID ownerId) {
|
||||
|
|
|
@ -32,9 +32,9 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -48,8 +48,7 @@ public class MidnightDuelist extends CardImpl<MidnightDuelist> {
|
|||
private static final FilterPermanent filter = new FilterCreaturePermanent("Vampires");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Vampire");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Vampire"));
|
||||
}
|
||||
|
||||
public MidnightDuelist(UUID ownerId) {
|
||||
|
|
|
@ -33,8 +33,9 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,9 +47,9 @@ public class NaturalEnd extends CardImpl<NaturalEnd> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ARTIFACT);
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT)));
|
||||
}
|
||||
|
||||
public NaturalEnd(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,8 @@ import mage.abilities.keyword.FlashAbility;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -52,8 +54,7 @@ public class RestorationAngel extends CardImpl<RestorationAngel> {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Angel");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Angel");
|
||||
filter.setNotSubtype(true);
|
||||
filter.add(Predicates.not(new SubtypePredicate("Angel")));
|
||||
}
|
||||
|
||||
public RestorationAngel(UUID ownerId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -124,7 +125,7 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl<Rid
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human creatures you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
protected FilterPermanent protectionFilter;
|
||||
|
@ -152,7 +153,7 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl<Rid
|
|||
String subtype = (String) game.getState().getValue(permanent.getId() + "_type");
|
||||
if (subtype != null) {
|
||||
protectionFilter = new FilterPermanent(subtype+"s");
|
||||
protectionFilter.getSubtype().add(subtype);
|
||||
protectionFilter.add(new SubtypePredicate(subtype));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
|
|||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +47,7 @@ public class RiotRingleader extends CardImpl<RiotRingleader> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Human creatures");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Human");
|
||||
filter.add(new SubtypePredicate("Human"));
|
||||
}
|
||||
|
||||
public RiotRingleader(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -111,7 +112,7 @@ class RiteOfRuinEffect extends OneShotEffect<RiteOfRuinEffect> {
|
|||
int count = 1;
|
||||
for (CardType cardType : order) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent(cardType + " permanent you control");
|
||||
filter.getCardType().add(cardType);
|
||||
filter.add(new CardTypePredicate(cardType));
|
||||
|
||||
for (UUID playerId : controller.getInRange()) {
|
||||
int amount = Math.min(count, game.getBattlefield().countAll(filter, playerId, game));
|
||||
|
|
|
@ -41,19 +41,18 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
|
|||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class ScrollOfAvacyn extends CardImpl<ScrollOfAvacyn> {
|
||||
private static FilterPermanent filter = new FilterPermanent("an Angel");
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Angel");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Angel"));
|
||||
}
|
||||
|
||||
public ScrollOfAvacyn(UUID ownerId) {
|
||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
|
|||
import mage.abilities.effects.common.DiscardTargetEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
|
@ -50,11 +50,10 @@ import mage.target.common.TargetOpponent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class ScrollOfGriselbrand extends CardImpl<ScrollOfGriselbrand> {
|
||||
private static FilterPermanent filter = new FilterPermanent("a Demon");
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Demon");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Demon"));
|
||||
}
|
||||
|
||||
public ScrollOfGriselbrand(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -47,7 +48,7 @@ public class Thunderbolt extends CardImpl<Thunderbolt> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
|
||||
|
||||
static {
|
||||
filter.getAbilities().add(FlyingAbility.getInstance());
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
public Thunderbolt(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.common.DiesTriggeredAbility;
|
|||
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
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");
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public AkkiBlizzardHerder(UUID ownerId) {
|
||||
|
|
|
@ -35,8 +35,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,8 +47,7 @@ public class DayOfDestiny extends CardImpl<DayOfDestiny> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Legendary creatures");
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Legendary");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
}
|
||||
|
||||
public DayOfDestiny(UUID ownerId) {
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -70,8 +70,7 @@ class FinalJudgmentEffect extends OneShotEffect<FinalJudgmentEffect> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
public FinalJudgmentEffect() {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
|
@ -54,8 +54,7 @@ public class Floodbringer extends CardImpl<Floodbringer> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public Floodbringer(UUID ownerId) {
|
||||
|
|
|
@ -32,8 +32,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,8 +45,7 @@ public class HerosDemise extends CardImpl<HerosDemise> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Legendary");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
}
|
||||
|
||||
public HerosDemise(UUID ownerId) {
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +46,7 @@ public class IreOfKaminari extends CardImpl<IreOfKaminari> {
|
|||
private final static FilterCard filter = new FilterCard("Arcane");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Arcane"));
|
||||
}
|
||||
|
||||
public IreOfKaminari(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.RegenerateTargetEffect;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -53,8 +53,7 @@ public class IsaoEnlightenedBushi extends CardImpl<IsaoEnlightenedBushi> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Samurai");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Samurai");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public IsaoEnlightenedBushi(UUID ownerId) {
|
||||
|
@ -66,6 +65,7 @@ public class IsaoEnlightenedBushi extends CardImpl<IsaoEnlightenedBushi> {
|
|||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Isao, Enlightened Bushi can't be countered.
|
||||
this.addAbility(new CantCounterAbility());
|
||||
this.addAbility(new BushidoAbility(2));
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +51,7 @@ public class NezumiShadowWatcher extends CardImpl<NezumiShadowWatcher> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Ninja");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Ninja");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Ninja"));
|
||||
}
|
||||
|
||||
public NezumiShadowWatcher(UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
|
@ -41,6 +42,8 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.abilities.keyword.SoulshiftAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,9 +55,7 @@ public class PusKami extends CardImpl<PusKami> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setNotColor(true);
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
||||
public PusKami(UUID ownerId) {
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -45,8 +45,7 @@ public class RibbonsOfTheReikai extends CardImpl<RibbonsOfTheReikai> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Spirit you control");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public RibbonsOfTheReikai(UUID ownerId) {
|
||||
|
@ -54,6 +53,7 @@ public class RibbonsOfTheReikai extends CardImpl<RibbonsOfTheReikai> {
|
|||
this.expansionSetCode = "BOK";
|
||||
this.subtype.add("Arcane");
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Draw a card for each Spirit you control.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter)));
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.BushidoAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterAttackingOrBlockingCreature;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetAttackingOrBlockingCreature;
|
||||
|
||||
/**
|
||||
|
@ -52,8 +52,7 @@ public class TakenosCavalry extends CardImpl<TakenosCavalry> {
|
|||
private final static FilterAttackingOrBlockingCreature filter = new FilterAttackingOrBlockingCreature("attacking or blocking Spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public TakenosCavalry(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
|
||||
/**
|
||||
|
@ -45,8 +46,7 @@ public class TerashisVerdict extends CardImpl<TerashisVerdict> {
|
|||
private final static FilterAttackingCreature filter = new FilterAttackingCreature("attacking creature with power 3 or less");
|
||||
|
||||
static {
|
||||
filter.setPower(4);
|
||||
filter.setPowerComparison(Filter.ComparisonType.LessThan);
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 4));
|
||||
}
|
||||
|
||||
public TerashisVerdict(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.effects.common.continious.BoostSourceEffect;
|
|||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,8 +52,7 @@ public class TraprootKami extends CardImpl<TraprootKami> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Forest");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Forest"));
|
||||
}
|
||||
|
||||
public TraprootKami(UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.ActivateOncePerTurnActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +51,7 @@ public class AkkiAvalanchers extends CardImpl<AkkiAvalanchers> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public AkkiAvalanchers(UUID ownerId) {
|
||||
|
|
|
@ -15,8 +15,8 @@ import mage.abilities.keyword.HasteAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -90,8 +90,7 @@ class TokTokVolcanoBorn extends Token {
|
|||
private final static FilterCard filter = new FilterCard("red");
|
||||
|
||||
static {
|
||||
filter.setColor(ObjectColor.RED);
|
||||
filter.setScopeColor(Filter.ComparisonScope.Any);
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
TokTokVolcanoBorn() {
|
||||
|
|
|
@ -41,7 +41,6 @@ import mage.abilities.effects.common.AttachEffect;
|
|||
import mage.abilities.effects.common.UntapEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -57,7 +56,6 @@ public class AuraOfDominion extends CardImpl<AuraOfDominion> {
|
|||
static {
|
||||
filter.setTapped(false);
|
||||
filter.setUseTapped(true);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,9 +52,7 @@ public class AzamiLadyOfScrolls extends CardImpl<AzamiLadyOfScrolls> {
|
|||
static {
|
||||
filter.setTapped(false);
|
||||
filter.setUseTapped(true);
|
||||
filter.getSubtype().add("Wizard");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Wizard"));
|
||||
}
|
||||
|
||||
public AzamiLadyOfScrolls(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,9 @@ import mage.ObjectColor;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -48,10 +51,11 @@ public class Befoul extends CardImpl<Befoul> {
|
|||
public static final FilterPermanent filter = new FilterPermanent("land or nonblack creature");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.setNotColor(true);
|
||||
filter.setColor(ObjectColor.BLACK);
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.LAND),
|
||||
Predicates.and(
|
||||
Predicates.not(new ColorPredicate(ObjectColor.BLACK)),
|
||||
new CardTypePredicate(CardType.CREATURE))));
|
||||
}
|
||||
public Befoul (UUID ownerId) {
|
||||
super(ownerId, 102, "Befoul", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
|
||||
/**
|
||||
|
@ -55,8 +55,7 @@ public class BenBenAkkiHermit extends CardImpl<BenBenAkkiHermit> {
|
|||
static {
|
||||
filter.setTapped(false);
|
||||
filter.setUseTapped(true);
|
||||
filter.getSubtype().add("Mountain");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
|
||||
public BenBenAkkiHermit (UUID ownerId) {
|
||||
|
|
|
@ -38,8 +38,9 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.effects.common.continious.GainControlTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -51,9 +52,7 @@ public class BlindWithAnger extends CardImpl<BlindWithAnger> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("nonlegendary creature");
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Legendary");
|
||||
filter.setNotSupertype(true);
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.not(new SupertypePredicate("Legendary")));
|
||||
}
|
||||
|
||||
public BlindWithAnger(UUID ownerId) {
|
||||
|
|
|
@ -45,8 +45,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.common.DevotionCounter;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -57,8 +57,7 @@ public class BloodthirstyOgre extends CardImpl<BloodthirstyOgre> {
|
|||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
|
||||
static {
|
||||
filter.getSubtype().add("Demon");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Demon"));
|
||||
}
|
||||
|
||||
public BloodthirstyOgre(UUID ownerId) {
|
||||
|
|
|
@ -45,9 +45,9 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
@ -137,8 +137,7 @@ class DokaiWeaverofLifeToken extends Token {
|
|||
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("lands");
|
||||
|
||||
static {
|
||||
filterLands.getCardType().add(CardType.LAND);
|
||||
filterLands.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filterLands.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
DokaiWeaverofLifeToken() {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -52,8 +52,7 @@ public class CallToGlory extends CardImpl<CallToGlory> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Samurai");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Samurai"));
|
||||
}
|
||||
|
||||
public CallToGlory(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -45,8 +45,7 @@ public class Cleanfall extends CardImpl<Cleanfall> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("enchantments");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public Cleanfall(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.dynamicvalue.common.StaticValue;
|
|||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -44,14 +45,14 @@ public class CommuneWithNature extends CardImpl<CommuneWithNature> {
|
|||
|
||||
private final static FilterCard filter = new FilterCard("creature card");
|
||||
static {
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
}
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
}
|
||||
|
||||
|
||||
public CommuneWithNature (UUID ownerId) {
|
||||
super(ownerId, 204, "Commune with Nature", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{G}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.color.setGreen(true);
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Look at the top five cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), filter, false));
|
||||
|
@ -67,4 +68,3 @@ public class CommuneWithNature extends CardImpl<CommuneWithNature> {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
|
@ -41,6 +40,8 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterSpiritOrArcaneCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -51,8 +52,7 @@ public class Earthshaker extends CardImpl<Earthshaker> {
|
|||
private final static FilterCreaturePermanent creatureFilter = new FilterCreaturePermanent("creature without flying");
|
||||
|
||||
static {
|
||||
creatureFilter.getAbilities().add((Ability) FlyingAbility.getInstance());
|
||||
creatureFilter.setNotAbilities(true);
|
||||
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
}
|
||||
|
||||
public Earthshaker(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +46,7 @@ public class EerieProcession extends CardImpl<EerieProcession> {
|
|||
private final static FilterCard filter = new FilterCard("Arcane card");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Arcane"));
|
||||
}
|
||||
|
||||
public EerieProcession(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.ColoredManaCost;
|
|||
import mage.abilities.effects.common.PreventDamageTargetEffect;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,8 +52,7 @@ public class EiganjoCastle extends CardImpl<EiganjoCastle> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
|
||||
|
||||
static {
|
||||
filter.getSupertype().add("Legendary");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
}
|
||||
|
||||
public EiganjoCastle(UUID ownerId) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import mage.abilities.effects.common.continious.SetCardColorTargetEffect;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetSpellOrPermanent;
|
||||
|
||||
|
@ -55,8 +56,7 @@ public class EightAndAHalfTale extends CardImpl<EightAndAHalfTale> {
|
|||
private final static FilterCard filter = new FilterCard("white");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public EightAndAHalfTale(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -52,15 +53,15 @@ public class FeastOfWorms extends CardImpl<FeastOfWorms> {
|
|||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
}
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
|
||||
public FeastOfWorms (UUID ownerId) {
|
||||
super(ownerId, 216, "Feast of Worms", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
this.color.setGreen(true);
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Destroy target land. If that land was legendary, its controller sacrifices another land.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
|
@ -103,7 +104,7 @@ class FeastOfWormsEffect extends OneShotEffect<FeastOfWormsEffect> {
|
|||
if (targetPlayer != null && permanent != null
|
||||
&& (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("land to sacrifice");
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.getControllerId().add(targetPlayer.getId());
|
||||
filter.setNotController(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.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
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");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public Frostwielder(UUID ownerId) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageAllEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -45,7 +46,7 @@ public class GaleForce extends CardImpl<GaleForce> {
|
|||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
|
||||
|
||||
static {
|
||||
filter.getAbilities().add(FlyingAbility.getInstance());
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
}
|
||||
|
||||
public GaleForce(UUID ownerId) {
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.common.SacrificeSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
|
@ -52,8 +52,7 @@ public class HanaKami extends CardImpl<HanaKami> {
|
|||
private final static FilterCard filter = new FilterCard("Arcane card from your graveyard");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Arcane"));
|
||||
}
|
||||
|
||||
public HanaKami(UUID ownerId) {
|
||||
|
|
|
@ -45,8 +45,8 @@ import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetOpponentE
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.SoulshiftAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
|
@ -60,8 +60,7 @@ public class HeWhoHungers extends CardImpl<HeWhoHungers> {
|
|||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a Spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public HeWhoHungers(UUID ownerId) {
|
||||
|
|
|
@ -34,8 +34,9 @@ import mage.Constants.CardType;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
|
@ -46,9 +47,7 @@ public class HisokasDefiance extends CardImpl<HisokasDefiance> {
|
|||
private final static FilterSpell filter = new FilterSpell("Spirit or Arcane spell");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.getSubtype().add("Arcane");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(Predicates.or(new SubtypePredicate("Spirit"), new SubtypePredicate("Arcane")));
|
||||
}
|
||||
|
||||
public HisokasDefiance(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -48,8 +48,7 @@ public class HondenOfCleansingFire extends CardImpl<HondenOfCleansingFire> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfCleansingFire(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -50,8 +50,7 @@ public class HondenOfInfiniteRage extends CardImpl<HondenOfInfiniteRage> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfInfiniteRage (UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.SpiritToken;
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,7 @@ public class HondenOfLifesWeb extends CardImpl<HondenOfLifesWeb> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfLifesWeb(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DiscardTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,7 @@ public class HondenOfNightsReach extends CardImpl<HondenOfNightsReach> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfNightsReach(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -48,8 +48,7 @@ public class HondenOfSeeingWinds extends CardImpl<HondenOfSeeingWinds> {
|
|||
final static FilterControlledPermanent filter = new FilterControlledPermanent("Shrine");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Shrine");
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Shrine"));
|
||||
}
|
||||
|
||||
public HondenOfSeeingWinds(UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.TapTargetCost;
|
|||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -53,8 +53,7 @@ public class HonorWornShaku extends CardImpl<HonorWornShaku> {
|
|||
static {
|
||||
filter.setTapped(false);
|
||||
filter.setUseTapped(true);
|
||||
filter.getSupertype().add("Legendary");
|
||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SupertypePredicate("Legendary"));
|
||||
}
|
||||
|
||||
public HonorWornShaku(UUID ownerId) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -53,8 +53,7 @@ public class HorobiDeathsWail extends CardImpl<HorobiDeathsWail> {
|
|||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Demon");
|
||||
static {
|
||||
filter.getSubtype().add("Demon");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Demon"));
|
||||
}
|
||||
|
||||
public HorobiDeathsWail(UUID ownerId) {
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.SearchEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
@ -76,8 +76,7 @@ class InameDeathAspectEffect extends SearchEffect<InameDeathAspectEffect> {
|
|||
private final static FilterCreatureCard filter = new FilterCreatureCard();
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public InameDeathAspectEffect() {
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.common.DiesTriggeredAbility;
|
|||
import mage.abilities.effects.common.ExileSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
|
@ -49,8 +49,7 @@ public class InameLifeAspect extends CardImpl<InameLifeAspect> {
|
|||
private final static FilterCard filter = new FilterCard("Spirit cards from your graveyard");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public InameLifeAspect(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -44,8 +45,8 @@ public class JoyousRespite extends CardImpl<JoyousRespite> {
|
|||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
static {
|
||||
filter.getCardType().add(CardType.LAND);
|
||||
}
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
|
||||
public JoyousRespite (UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,8 +51,7 @@ public class KamiOfAncientLaw extends CardImpl<KamiOfAncientLaw> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("enchantment");
|
||||
|
||||
static {
|
||||
filter.getCardType().add(CardType.ENCHANTMENT);
|
||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
||||
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
}
|
||||
|
||||
public KamiOfAncientLaw (UUID ownerId) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -52,8 +52,7 @@ public class KitsuneDiviner extends CardImpl<KitsuneDiviner> {
|
|||
private final static FilterPermanent filter = new FilterPermanent("Spirit");
|
||||
|
||||
static {
|
||||
filter.getSubtype().add("Spirit");
|
||||
filter.setScopeSubtype(Filter.ComparisonScope.Any);
|
||||
filter.add(new SubtypePredicate("Spirit"));
|
||||
}
|
||||
|
||||
public KitsuneDiviner (UUID ownerId) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue