BasicLandcyclingAbility uses FilterBasicLandCard filter now.

Imports cleanup.
This commit is contained in:
North 2011-07-16 14:59:18 +03:00
parent 4ee06c2b85
commit d5c06da679
13 changed files with 17 additions and 34 deletions

View file

@ -30,14 +30,15 @@ package mage.sets.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.AttachmentType;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.MustBlockSourceEffect;
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
@ -57,10 +58,10 @@ public class Lure extends CardImpl<Lure> {
this.color.setGreen(true);
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.AddAbility));
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new MustBlockSourceEffect()), Constants.AttachmentType.AURA)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBlockSourceEffect()), AttachmentType.AURA)));
}
public Lure (final Lure card) {

View file

@ -30,23 +30,18 @@ package mage.sets.riseoftheeldrazi;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Abilities;
import mage.abilities.AbilitiesImpl;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.LevelAbility;
import mage.abilities.keyword.LevelUpAbility;
import mage.cards.LevelerCard;
import mage.target.common.TargetCreaturePermanent;
/**
*

View file

@ -33,8 +33,7 @@ import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.common.DiscardSourceCost;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.filter.Filter.ComparisonScope;
import mage.filter.FilterCard;
import mage.filter.common.FilterBasicLandCard;
import mage.target.common.TargetCardInLibrary;
/**
@ -42,12 +41,7 @@ import mage.target.common.TargetCardInLibrary;
* @author Loki
*/
public class BasicLandcyclingAbility extends ActivatedAbilityImpl<BasicLandcyclingAbility>{
private static FilterCard filter = new FilterCard("Basic land");
static {
filter.getSupertype().add("Basic");
filter.setScopeSupertype(ComparisonScope.Any);
}
private static final FilterBasicLandCard filter = new FilterBasicLandCard();
public BasicLandcyclingAbility(ManaCosts costs) {
super(Zone.HAND, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter)), costs);

View file

@ -1,16 +1,14 @@
package mage.abilities.keyword;
import mage.Constants;
import mage.Constants.Duration;
import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility;
import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.game.Game;
import mage.game.events.GameEvent;
public class BushidoAbility extends BlocksOrBecomesBlockedTriggeredAbility {
private int value;
public BushidoAbility(int value) {
super(new BoostSourceEffect(value, value, Constants.Duration.EndOfTurn), false);
super(new BoostSourceEffect(value, value, Duration.EndOfTurn), false);
this.value = value;
}

View file

@ -31,7 +31,6 @@ package mage.abilities.keyword;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Zone;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.OneShotEffect;

View file

@ -54,7 +54,7 @@ public class FirstStrikeAbility extends StaticAbility<FirstStrikeAbility> {
@Override
public String getRule() {
return "First Strike";
return "First strike";
}
@Override

View file

@ -28,7 +28,6 @@
package mage.abilities.keyword;
import java.io.ObjectStreamException;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterLandPermanent;
@ -38,7 +37,7 @@ import mage.filter.common.FilterLandPermanent;
*/
public class ForestwalkAbility extends LandwalkAbility {
private static FilterLandPermanent filter = new FilterLandPermanent("Forest");
private static final FilterLandPermanent filter = new FilterLandPermanent("Forest");
static {
filter.getSubtype().add("Forest");

View file

@ -45,7 +45,7 @@ import mage.target.common.TargetLandPermanent;
//20091005 - 702.64
public class FortifyAbility extends ActivatedAbilityImpl<FortifyAbility> {
private static FilterLandPermanent filter = new FilterLandPermanent("land you control");
private static final FilterLandPermanent filter = new FilterLandPermanent("land you control");
static {
filter.setTargetController(TargetController.YOU);

View file

@ -12,7 +12,7 @@ import mage.filter.FilterStackObject;
* @author loki
*/
public class HexproofAbility extends SimpleStaticAbility {
private static FilterStackObject filter = new FilterStackObject("spells or abilities your opponents control");
private static final FilterStackObject filter = new FilterStackObject("spells or abilities your opponents control");
static {
filter.setTargetController(Constants.TargetController.OPPONENT);

View file

@ -28,7 +28,6 @@
package mage.abilities.keyword;
import java.io.ObjectStreamException;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterLandPermanent;
@ -38,7 +37,7 @@ import mage.filter.common.FilterLandPermanent;
*/
public class IslandwalkAbility extends LandwalkAbility {
private static final IslandwalkAbility fINSTANCE = new IslandwalkAbility(); private static FilterLandPermanent filter = new FilterLandPermanent("Island");
private static final FilterLandPermanent filter = new FilterLandPermanent("Island");
static {
filter.getSubtype().add("Island");

View file

@ -28,7 +28,6 @@
package mage.abilities.keyword;
import java.io.ObjectStreamException;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterLandPermanent;
@ -38,7 +37,7 @@ import mage.filter.common.FilterLandPermanent;
*/
public class MountainwalkAbility extends LandwalkAbility {
private static FilterLandPermanent filter = new FilterLandPermanent("Mountain");
private static final FilterLandPermanent filter = new FilterLandPermanent("Mountain");
static {
filter.getSubtype().add("Mountain");

View file

@ -37,7 +37,7 @@ import mage.filter.common.FilterLandPermanent;
*/
public class PlainswalkAbility extends LandwalkAbility {
private static FilterLandPermanent filter = new FilterLandPermanent("Plains");
private static final FilterLandPermanent filter = new FilterLandPermanent("Plains");
static {
filter.getSubtype().add("Plains");

View file

@ -28,7 +28,6 @@
package mage.abilities.keyword;
import java.io.ObjectStreamException;
import mage.filter.Filter.ComparisonScope;
import mage.filter.common.FilterLandPermanent;
@ -38,7 +37,7 @@ import mage.filter.common.FilterLandPermanent;
*/
public class SwampwalkAbility extends LandwalkAbility {
private static FilterLandPermanent filter = new FilterLandPermanent("Swamp");
private static final FilterLandPermanent filter = new FilterLandPermanent("Swamp");
static {
filter.getSubtype().add("Swamp");