mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
change BEcomesBasicLandTargetEffect to use SubType
This commit is contained in:
parent
ba4d9c9f44
commit
8d52e995e8
6 changed files with 39 additions and 33 deletions
|
|
@ -27,10 +27,6 @@
|
|||
*/
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
|
|
@ -61,6 +57,11 @@ import mage.target.common.TargetLandPermanent;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MTGfan
|
||||
|
|
@ -80,7 +81,7 @@ public class CyclopeanTomb extends CardImpl {
|
|||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.MIRE.createInstance()), new GenericManaCost(2), new IsStepCondition(PhaseStep.UPKEEP), "{2}, {T}: Put a mire counter on target non-Swamp land. That land is a Swamp for as long as it has a mire counter on it. Activate this ability only during your upkeep.");
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetLandPermanent(filter));
|
||||
ability.addEffect(new BecomeSwampEffect(Duration.Custom, false, true, "Swamp"));
|
||||
ability.addEffect(new BecomeSwampEffect(Duration.Custom, false, true, SubType.SWAMP));
|
||||
this.addAbility(ability, new CyclopeanTombCounterWatcher());
|
||||
// When Cyclopean Tomb is put into a graveyard from the battlefield, at the beginning of each of your upkeeps for the rest of the game, remove all mire counters from a land that a mire counter was put onto with Cyclopean Tomb but that a mire counter has not been removed from with Cyclopean Tomb.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CyclopeanTombCreateTriggeredEffect()));
|
||||
|
|
@ -98,7 +99,7 @@ public class CyclopeanTomb extends CardImpl {
|
|||
|
||||
class BecomeSwampEffect extends BecomesBasicLandTargetEffect {
|
||||
|
||||
public BecomeSwampEffect(Duration duration, boolean chooseLandType, boolean loseOther, String... landNames) {
|
||||
public BecomeSwampEffect(Duration duration, boolean chooseLandType, boolean loseOther, SubType... landNames) {
|
||||
super(duration, chooseLandType, loseOther, landNames);
|
||||
staticText = "That land is a Swamp for as long as it has a mire counter on it";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -49,6 +48,8 @@ import mage.target.Target;
|
|||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cbt33, LevelX2 (Walk the Aeons), KholdFuzion (Dandan)
|
||||
|
|
@ -65,7 +66,7 @@ public class Dreamwinder extends CardImpl {
|
|||
// Dreamwinder can't attack unless defending player controls an Island.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(new FilterLandPermanent(SubType.ISLAND,"an Island"))));
|
||||
// {U}, Sacrifice an Island: 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}"));
|
||||
Target target = new TargetLandPermanent();
|
||||
ability.addTarget(target);
|
||||
FilterControlledLandPermanent filter = new FilterControlledLandPermanent("an Island");
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility;
|
||||
|
|
@ -48,6 +47,8 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
|
@ -72,7 +73,7 @@ public class KukemssaSerpent extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(new FilterLandPermanent(SubType.ISLAND, "an Island"))));
|
||||
|
||||
// {U}, Sacrifice an Island: Target land an opponent controls 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 SacrificeTargetCost(new TargetControlledPermanent(1, 1, filterControlledLand, true)));
|
||||
ability.addTarget(new TargetLandPermanent(filterOpponentLand));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.q;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
|
|
@ -52,6 +51,8 @@ import mage.target.Target;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
|
@ -105,7 +106,7 @@ class QuicksilverFountainEffect extends OneShotEffect {
|
|||
if (player.choose(Outcome.Neutral, targetNonIslandLand, source.getId(), game)) {
|
||||
Permanent landChosen = game.getPermanent(targetNonIslandLand.getFirstTarget());
|
||||
landChosen.addCounters(CounterType.FLOOD.createInstance(), source, game);
|
||||
ContinuousEffect becomesBasicLandTargetEffect = new BecomesBasicLandTargetEffect(Duration.OneUse, "Island");
|
||||
ContinuousEffect becomesBasicLandTargetEffect = new BecomesBasicLandTargetEffect(Duration.OneUse, SubType.ISLAND);
|
||||
becomesBasicLandTargetEffect.addDependencyType(DependencyType.BecomeIsland);
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(becomesBasicLandTargetEffect, new LandHasFloodCounterCondition(this), staticText);
|
||||
this.setTargetPointer(new FixedTarget(landChosen, game));
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.AddCardSubtypeAllEffect;
|
||||
|
|
@ -38,6 +37,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.*;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue