fix some subtypes for becomesBasiclandTargetEffect

This commit is contained in:
igoudt 2017-08-07 22:25:22 +02:00
parent 8d52e995e8
commit 4dc3419efa
12 changed files with 45 additions and 28 deletions

View file

@ -27,7 +27,6 @@
*/
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
@ -44,6 +43,8 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author ilcartographer
@ -65,7 +66,7 @@ public class AquitectsWill extends CardImpl {
this.getSpellAbility().addTarget(new TargetLandPermanent());
// That land is an Island in addition to its other types for as long as it has a flood counter on it.
this.getSpellAbility().addEffect(new AquitectsWillEffect(Duration.Custom, false, false, "Island"));
this.getSpellAbility().addEffect(new AquitectsWillEffect(Duration.Custom, false, false, SubType.ISLAND));
// If you control a Merfolk, draw a card.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
@ -86,7 +87,7 @@ public class AquitectsWill extends CardImpl {
class AquitectsWillEffect extends BecomesBasicLandTargetEffect {
public AquitectsWillEffect(Duration duration, boolean chooseLandType, boolean loseType, String... landNames) {
public AquitectsWillEffect(Duration duration, boolean chooseLandType, boolean loseType, SubType... landNames) {
super(duration, chooseLandType, loseType, landNames);
staticText = "That land is an Island in addition to its other types for as long as it has a flood counter on it";
}

View file

@ -27,7 +27,6 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
@ -48,6 +47,8 @@ import mage.counters.CounterType;
import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
@ -67,7 +68,7 @@ public class Floodchaser extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(new FilterLandPermanent(SubType.ISLAND,"an Island"))));
// {U}, Remove a +1/+1 counter from Floodchaser: Target land becomes an Island until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Island"), new ManaCostsImpl("{U}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, SubType.ISLAND), new ManaCostsImpl("{U}"));
ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)));
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);

View file

@ -27,7 +27,6 @@
*/
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -55,6 +54,8 @@ import mage.game.combat.CombatGroup;
import mage.game.permanent.Permanent;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author anonymous
@ -81,7 +82,7 @@ public class GaeasLiege extends CardImpl {
new InvertCondition(SourceAttackingCondition.instance),
"As long as {this} isn't attacking, its power and toughness are each equal to the number of Forests you control. As long as {this} is attacking, its power and toughness are each equal to the number of Forests defending player controls.")));
// {tap}: Target land becomes a Forest until Gaea's Liege leaves the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield, "Forest"), new TapSourceCost());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield, SubType.FOREST), new TapSourceCost());
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}

View file

@ -27,7 +27,6 @@
*/
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
@ -37,9 +36,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.target.Target;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author cbt33, Loki (Contaminated Ground), Plopman (Larceny)
@ -56,7 +58,7 @@ public class GracefulAntelope extends CardImpl {
// Plainswalk
this.addAbility(new PlainswalkAbility());
// Whenever Graceful Antelope deals combat damage to a player, you may have target land become a Plains until Graceful Antelope leaves the battlefield.
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield,"Plains"), true);
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield, SubType.PLAINS), true);
Target target = new TargetLandPermanent();
ability.addTarget(target);
this.addAbility(ability);

View file

@ -27,7 +27,6 @@
*/
package mage.cards.k;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -37,9 +36,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author LoneFox
@ -53,7 +55,7 @@ public class KavuRecluse extends CardImpl {
this.toughness = new MageInt(2);
// {T}: Target land becomes a Forest until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Forest"), new TapSourceCost());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, SubType.FOREST), new TapSourceCost());
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}

View file

@ -27,7 +27,6 @@
*/
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -37,9 +36,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author LoneFox
@ -53,7 +55,7 @@ public class SlimyKavu extends CardImpl {
this.toughness = new MageInt(2);
// {T}: Target land becomes a Swamp until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Swamp"), new TapSourceCost());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, SubType.SWAMP), new TapSourceCost());
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}

View file

@ -27,7 +27,6 @@
*/
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -48,6 +47,8 @@ import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author LevelX2
@ -75,7 +76,7 @@ public class StreambedAquitects extends CardImpl {
this.addAbility(ability);
// {tap}: Target land becomes an Island until end of turn.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Island"), new TapSourceCost());
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, SubType.ISLAND), new TapSourceCost());
target = new TargetLandPermanent();
ability.addTarget(target);
this.addAbility(ability);

View file

@ -27,7 +27,6 @@
*/
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
@ -39,12 +38,15 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
@ -66,7 +68,7 @@ public class TheloniteMonk extends CardImpl {
this.toughness = new MageInt(2);
// {tap}, Sacrifice a green creature: Target land becomes a Forest.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield, "Forest"), new TapSourceCost());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield, SubType.FOREST), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);

View file

@ -27,7 +27,6 @@
*/
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -37,9 +36,12 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author LoneFox
@ -55,7 +57,7 @@ public class TidalWarrior extends CardImpl {
this.toughness = new MageInt(1);
// {tap}: Target land becomes an Island until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Island"), new TapSourceCost());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, SubType.ISLAND), new TapSourceCost());
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}

View file

@ -27,9 +27,6 @@
*/
package mage.cards.t;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -40,11 +37,16 @@ import mage.cards.CardSetInfo;
import mage.choices.ChoiceImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetLandPermanent;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LoneFox
@ -76,7 +78,7 @@ public class TundraKavu extends CardImpl {
class TundraKavuEffect extends BecomesBasicLandTargetEffect {
public TundraKavuEffect() {
super(Duration.EndOfTurn, false, true, "");
super(Duration.EndOfTurn, false, true);
staticText = "Target land becomes a Plains or an Island until end of turn.";
}
@ -105,7 +107,7 @@ class TundraKavuEffect extends BecomesBasicLandTargetEffect {
return;
}
}
landTypes.add(choice.getChoice());
landTypes.add(SubType.byDescription(choice.getChoice()));
} else {
this.discard();
}

View file

@ -27,7 +27,6 @@
*/
package mage.cards.z;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -49,6 +48,8 @@ import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
@ -70,7 +71,7 @@ public class ZombieTrailblazer extends CardImpl {
// Tap an untapped Zombie you control: Target land becomes a Swamp until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Swamp"), new TapTargetCost(new TargetControlledPermanent(filter)));
new BecomesBasicLandTargetEffect(Duration.EndOfTurn, SubType.SWAMP), new TapTargetCost(new TargetControlledPermanent(filter)));
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);

View file

@ -50,8 +50,8 @@ import java.util.UUID;
public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
protected boolean chooseLandType;
protected List<SubType> landTypes = new ArrayList();
protected List<SubType> landTypesToAdd = new ArrayList();
protected List<SubType> landTypes = new ArrayList<>();
protected List<SubType> landTypesToAdd = new ArrayList<>();
protected boolean loseOther; // loses all other abilities, card types, and creature types
public BecomesBasicLandTargetEffect(Duration duration) {