@Override public BecomesBasicLandTargetEffect copy() { return new BecomesBasicLandTargetEffect(this); }
public NavigatorsCompass(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // When Navigator's Compass enters the battlefield, you gain 3 life. Ability etbAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)); this.addAbility(etbAbility); // {tap}: Until end of turn, target land you control becomes the basic land type of your choice in addition to its other types. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, true, false) .setText("Until end of turn, target land you control becomes the basic land type of your choice in addition to its other types"), new TapSourceCost()); ability.addTarget(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); this.addAbility(ability); }
@Override public void init(Ability source, Game game) { super.init(source, game); List<Permanent> targets = new ArrayList<>(game.getBattlefield().getActivePermanents(StaticFilters.FILTER_LAND, source.getControllerId(), source.getSourceId(), game)); this.setTargetPointer(new FixedTargets(targets, game)); }
public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, boolean loseOther, SubType... landNames) { super(duration, Outcome.Detriment); this.landTypes.addAll(Arrays.asList(landNames)); if (landTypes.contains(SubType.MOUNTAIN)) { dependencyTypes.add(DependencyType.BecomeMountain); } if (landTypes.contains(SubType.FOREST)) { dependencyTypes.add(DependencyType.BecomeForest); } if (landTypes.contains(SubType.SWAMP)) { dependencyTypes.add(DependencyType.BecomeSwamp); } if (landTypes.contains(SubType.ISLAND)) { dependencyTypes.add(DependencyType.BecomeIsland); } if (landTypes.contains(SubType.PLAINS)) { dependencyTypes.add(DependencyType.BecomePlains); } this.chooseLandType = chooseLandType; this.staticText = setText(); this.loseOther = loseOther; }
@Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source)); if (land == null) { // if permanent left battlefield the effect can be removed because it was only valid for that object this.discard(); } else if (land.getCounters(game).getCount(CounterType.FLOOD) > 0) { // only if Flood counter is on the object it becomes an Island.(it would be possible to remove and return the counters with e.g. Fate Transfer if the land becomes a creature too) super.apply(layer, sublayer, source, game); } return true; }
@Override public void init(Ability source, Game game) { super.init(source, game); // choose land type if (chooseLandType) { Player controller = game.getPlayer(source.getControllerId()); Choice choice = new ChoiceBasicLandType(); if (controller != null && controller.choose(outcome, choice, game)) { landTypes.add(SubType.byDescription(choice.getChoice())); } else { this.discard(); return; } } if (loseOther) { landTypesToAdd.addAll(landTypes); } }
@Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source)); if (land == null) { // if permanent left battlefield the effect can be removed because it was only valid for that object this.discard(); } else if (land.getCounters(game).getCount(CounterType.MIRE) > 0) { // only if Mire counter is on the object it becomes a Swamp. super.apply(layer, sublayer, source, game); } return true; }
public MysticCompass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); // {1}, {tap}: Target land becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); Target target = new TargetLandPermanent(); ability.addTarget(target); this.addAbility(ability); }
@Override public void init(Ability source, Game game) { landTypes.clear(); Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Set<String> choiceSet = new LinkedHashSet<>(); choiceSet.add("Island"); choiceSet.add("Plains"); ChoiceImpl choice = new ChoiceImpl(true); choice.setChoices(choiceSet); choice.setMessage("Choose a basic land type"); if (!controller.choose(outcome, choice, game)) { discard(); return; } landTypes.add(SubType.byDescription(choice.getChoice())); } else { this.discard(); } super.init(source, game); } }
public SlimyKavu(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(2); 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, SubType.SWAMP), new TapSourceCost()); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public GracefulAntelope(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.subtype.add(SubType.ANTELOPE); this.power = new MageInt(1); this.toughness = new MageInt(4); // 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.UntilSourceLeavesBattlefield, SubType.PLAINS), true); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public SeaSnidd(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); // {T}: Target land becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public KavuRecluse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(2); 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, SubType.FOREST), new TapSourceCost()); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public TideshaperMystic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Target land becomes the basic land type of your choice until end of turn. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost(), MyTurnCondition.instance); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public ReefShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(2); // {T}: Target land becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public UnstableFrontier(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // {tap}: Add {C}. this.addAbility(new ColorlessManaAbility()); // {tap}: Target land you control becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); Target target = new TargetControlledPermanent(new FilterControlledLandPermanent()); ability.addTarget(target); this.addAbility(ability); }
public TidalWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); 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, SubType.ISLAND), new TapSourceCost()); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public CyclopeanGiant(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(2); // When Cyclopean Giant dies, target land becomes a Swamp. Exile Cyclopean Giant. DiesTriggeredAbility ability = new DiesTriggeredAbility(new BecomesBasicLandTargetEffect(Duration.EndOfGame, SubType.SWAMP)); ability.addEffect(new ExileSourceEffect()); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public DreamThrush(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); // Flying this.addAbility(FlyingAbility.getInstance()); // {tap}: Target land becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); Target target = new TargetLandPermanent(); ability.addTarget(target); this.addAbility(ability); }
public GrixisIllusionist(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Target land you control becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetPermanent(new FilterControlledLandPermanent())); this.addAbility(ability); }