From 9d40d7890a50d3792250ca6b02e4ccdfa1d715d3 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 05:38:10 +0000 Subject: [PATCH] - Converted the following cards to keyword and commented out the card object for these cards: Regress; Repulse; Temporal Fissure; Temporal Spring and Unsummon. - Removed a duplicate filter from spBounceTgt. - Added an AI check for Overwhelming Forces --- res/cards.txt | 59 +++++++++++++++++++++----------------- src/forge/CardFactory.java | 37 +++++++++++++----------- 2 files changed, 53 insertions(+), 43 deletions(-) diff --git a/res/cards.txt b/res/cards.txt index 37a769cc5b1..c2e3fab4e23 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,35 @@ +Regress +2 U +Instant +Return target permanent to its owner's hand. +spBounceTgt:Permanent:Hand + +Repulse +2 U +Instant +Return target creature to its owner's hand. +spBounceTgt:Creature:Hand +Draw a card. + +Temporal Fissure +4 U +Sorcery +Return target permanent to its owner's hand. Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies.) +spBounceTgt:Permanent:Hand +Storm + +Temporal Spring +1 G U +Sorcery +Put target permanent on top of its owner's library. +spBounceTgt:Permanent:TopofLibrary + +Unsummon +U +Instant +Return target creature to its owner's hand. +spBounceTgt:Creature:Hand + Boomerang U U Instant @@ -5257,12 +5289,6 @@ Sorcery Target player loses 2 life and you gain 2 life. Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies.) Storm -Temporal Fissure -4 U -Sorcery -Return target permanent to its owner's hand. Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies.) -Storm - Sprouting Vines 2 G Instant @@ -13226,11 +13252,6 @@ Legendary Creature Human Monk You may play two additional lands on each of your turns. 1/2 -Temporal Spring -1 G U -Sorcery -Put target permanent on top of its owner's library. - Eviscerator 3 B B Creature Horror @@ -16230,11 +16251,6 @@ Creature Elemental As Nyxathid comes into play, choose an opponent. Nyxathid gets -1/-1 for each card in the chosen player's hand. 7/7 -Unsummon -U -Instant -Return target creature to its owner's hand. - Lorescale Coatl 1 G U Creature Snake @@ -23178,12 +23194,6 @@ Impulse Instant Look at the top four cards of your library. Put one of them into your hand and the rest on the bottom of your library. -Repulse -2 U -Instant -Return target creature to its owner's hand. -Draw a card. - Echoing Truth 1 U Instant @@ -23808,11 +23818,6 @@ U U Instant no text -Regress -2 U -Instant -Return target permanent to its owner's hand. - Opt U Instant diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 7f4f5e2c892..43dd87bdf51 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -2190,15 +2190,7 @@ public class CardFactory implements NewConstants { if (AllZone.Phase.getTurn() <= 3) return false; CardList results = new CardList(); - CardList choices = getTargets(); - - choices = choices.filter(new CardListFilter(){ - public boolean addCard(Card c) - { - return CardFactoryUtil.canTarget(card, c); - } - }); - + CardList choices = getTargets(); if(choices.size() > 0) { for(int i = 0; i < Tgts.length; i++) { @@ -8660,7 +8652,8 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); }//*************** END ************ END ************************** - + +/* Converted to keyword //*************** START *********** START ************************** else if(cardName.equals("Temporal Fissure")) { final SpellAbility spell = new Spell(card) { @@ -8738,6 +8731,7 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); }//*************** END ************ END ************************** +*/ //*************** START *********** START ************************** if(cardName.equals("Brain Freeze")) { final SpellAbility spell = new Spell(card) { @@ -10450,6 +10444,17 @@ public class CardFactory implements NewConstants { AllZone.GameAction.drawCard(card.getController()); } }//resolve() + + @Override + public boolean canPlayAI() { + CardList human = new CardList(AllZone.Human_Play.getCards()); + + human = human.getType("Creature"); + human = human.getNotKeyword("Indestructible"); + + // the computer will at least destroy 1 creature + return !human.isEmpty(); + } };//SpellAbility card.clearSpellAbility(); card.addSpellAbility(spell); @@ -10860,7 +10865,7 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }//*************** END ************ END ************************** - +/* Converted to keyword //*************** START *********** START ************************** else if(cardName.equals("Regress")) { SpellAbility spell = new Spell(card) { @@ -10901,7 +10906,7 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); }//*************** END ************ END ************************** - +*/ //*************** START *********** START ************************** else if(cardName.equals("Echoing Truth")) { @@ -10993,7 +10998,7 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }//*************** END ************ END ************************** - +/* Converted to keyword //*************** START *********** START ************************** else if(cardName.equals("Repulse")) { final SpellAbility spell = new Spell(card) { @@ -11134,7 +11139,7 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); }//*************** END ************ END ************************** - +*/ //*************** START *********** START ************************** else if(cardName.equals("Impulse")) { @@ -13358,7 +13363,8 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); }//*************** END ************ END ************************** - + +/* Converted to keyword //*************** START *********** START ************************** else if(cardName.equals("Temporal Spring")) { final SpellAbility spell = new Spell(card) { @@ -13426,7 +13432,6 @@ public class CardFactory implements NewConstants { }//*************** END ************ END ************************** -/* Converted to keyword //*************** START *********** START ************************** else if(cardName.equals("Boomerang") || cardName.equals("Eye of Nowhere") || cardName.equals("Rescind") || cardName.equals("Surging AEther") || cardName.equals("Deny Reality")) { final SpellAbility spell = new Spell(card) {