Skip to content
Open
31 changes: 21 additions & 10 deletions Mage.Sets/src/mage/cards/b/BaithookAngler.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package mage.cards.b;

import mage.MageInt;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.keyword.DisturbAbility;
import mage.cards.CardImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.SubType;

Expand All @@ -13,19 +12,31 @@
/**
* @author TheElk801
*/
public final class BaithookAngler extends CardImpl {
public final class BaithookAngler extends TransformingDoubleFacedCard {

public BaithookAngler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
super(
ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.PEASANT}, "{1}{U}",
"Hook-Haunt Drifter",
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.SPIRIT}, "U"
);
this.getLeftHalfCard().setPT(2, 1);
this.getRightHalfCard().setPT(1, 2);

this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.PEASANT);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
this.secondSideCardClazz = mage.cards.h.HookHauntDrifter.class;

// Disturb {1}{U}
this.addAbility(new DisturbAbility(this, "{1}{U}"));
this.getLeftHalfCard().addAbility(new DisturbAbility(this, "{1}{U}"));

// Hook-Haunt Drifter
// Flying
this.getRightHalfCard().addAbility(FlyingAbility.getInstance());

// If Hook-Haunt Drifter would be put into a graveyard from anywhere, exile it instead.
this.getRightHalfCard().addAbility(DisturbAbility.makeBackAbility());

this.finalizeDFC();
}

private BaithookAngler(final BaithookAngler card) {
Expand Down
10 changes: 2 additions & 8 deletions Mage.Sets/src/mage/cards/b/BelenonWarAnthem.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package mage.cards.b;

import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.Duration;

import java.util.UUID;

Expand All @@ -16,12 +14,8 @@ public final class BelenonWarAnthem extends CardImpl {

public BelenonWarAnthem(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");

this.color.setWhite(true);
this.nightCard = true;

// Creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield)));
TransformingDoubleFacedCard.copyToBackFace(new mage.cards.i.InvasionOfBelenon(ownerId, setInfo), this);
}

private BelenonWarAnthem(final BelenonWarAnthem card) {
Expand Down
35 changes: 2 additions & 33 deletions Mage.Sets/src/mage/cards/b/BladewheelChariot.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
package mage.cards.b;

import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.effects.common.continuous.AddCardTypeSourceEffect;
import mage.abilities.keyword.CrewAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.target.common.TargetControlledPermanent;

import java.util.UUID;

Expand All @@ -23,30 +12,10 @@
*/
public final class BladewheelChariot extends CardImpl {

private static final FilterControlledPermanent filter
= new FilterControlledArtifactPermanent("other untapped artifacts you control");

static {
filter.add(AnotherPredicate.instance);
filter.add(TappedPredicate.UNTAPPED);
}

public BladewheelChariot(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");

this.subtype.add(SubType.VEHICLE);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
this.nightCard = true;
this.color.setWhite(true);

// Tap two other untapped artifacts you control: Bladewheel Chariot becomes an artifact creature until end of turn.
this.addAbility(new SimpleActivatedAbility(new AddCardTypeSourceEffect(
Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE
).setText("{this} becomes an artifact creature until end of turn"), new TapTargetCost(new TargetControlledPermanent(2, filter))));

// Crew 1
this.addAbility(new CrewAbility(1));
TransformingDoubleFacedCard.copyToBackFace(new mage.cards.s.SpringLoadedSawblades(ownerId, setInfo), this);
}

private BladewheelChariot(final BladewheelChariot card) {
Expand Down
37 changes: 22 additions & 15 deletions Mage.Sets/src/mage/cards/c/CloisteredYouth.java
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@

package mage.cards.c;

import java.util.UUID;

import mage.MageInt;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.SubType;

import java.util.UUID;

/**
* @author Loki
*/
public final class CloisteredYouth extends CardImpl {
public final class CloisteredYouth extends TransformingDoubleFacedCard {

public CloisteredYouth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);

this.power = new MageInt(1);
this.toughness = new MageInt(1);
super(
ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN}, "{1}{W}",
"Unholy Fiend",
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HORROR}, "B"
);
this.getLeftHalfCard().setPT(1, 1);
this.getRightHalfCard().setPT(3, 3);

this.secondSideCardClazz = mage.cards.u.UnholyFiend.class;

// At the beginning of your upkeep, you may transform Cloistered Youth.
this.addAbility(new TransformAbility());
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), true));
this.getLeftHalfCard().addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), true));

// Unholy Fiend
// At the beginning of your end step, you lose 1 life.
this.getRightHalfCard().addAbility(new BeginningOfEndStepTriggeredAbility(new LoseLifeSourceControllerEffect(1)));

this.finalizeDFC();
}

private CloisteredYouth(final CloisteredYouth card) {
Expand Down
62 changes: 50 additions & 12 deletions Mage.Sets/src/mage/cards/g/GarrukRelentless.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,87 @@
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.StateTriggeredAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.WolfToken;
import mage.game.permanent.token.WolfTokenWithDeathtouch;
import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCreaturePermanent;

import java.util.UUID;

/**
* @author nantuko
*/
public final class GarrukRelentless extends CardImpl {
public final class GarrukRelentless extends TransformingDoubleFacedCard {

private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);

public GarrukRelentless(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.GARRUK);
super(
ownerId, setInfo,
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.PLANESWALKER}, new SubType[]{SubType.GARRUK}, "{3}{G}",
"Garruk, the Veil-Cursed",
new SuperType[]{SuperType.LEGENDARY}, new CardType[]{CardType.PLANESWALKER}, new SubType[]{SubType.GARRUK}, "BG"
);
this.getLeftHalfCard().setStartingLoyalty(3);

this.secondSideCardClazz = mage.cards.g.GarrukTheVeilCursed.class;

this.setStartingLoyalty(3);

// When Garruk Relentless has two or fewer loyalty counters on him, transform him.
this.addAbility(new TransformAbility());
this.addAbility(new GarrukRelentlessStateTrigger());
this.getLeftHalfCard().addAbility(new GarrukRelentlessStateTrigger());

// 0: Garruk Relentless deals 3 damage to target creature. That creature deals damage equal to its power to him
Ability ability = new LoyaltyAbility(new DamageTargetEffect(3), 0);
ability.addEffect(new GarrukRelentlessDamageEffect());
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
this.getLeftHalfCard().addAbility(ability);

// 0: Create a 2/2 green Wolf creature token.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new WolfToken()), 0));
this.getLeftHalfCard().addAbility(new LoyaltyAbility(new CreateTokenEffect(new WolfToken()), 0));

// Garruk, the Veil-Cursed
// +1 : Create a 1/1 black Wolf creature token with deathtouch.
this.getRightHalfCard().addAbility(new LoyaltyAbility(new CreateTokenEffect(new WolfTokenWithDeathtouch()), 1));

// -1 : Sacrifice a creature. If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle your library.
this.getRightHalfCard().addAbility(new LoyaltyAbility(new DoIfCostPaid(
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(
StaticFilters.FILTER_CARD_CREATURE_A
), true),
null,
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE),
false
), -1));

// -3 : Creatures you control gain trample and get +X/+X until end of turn, where X is the number of creature cards in your graveyard.
ability = new LoyaltyAbility(new GainAbilityControlledEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURE
).setText("creatures you control gain trample"), -3);
ability.addEffect(new BoostControlledEffect(
xValue, xValue, Duration.EndOfTurn
).setText("and get +X/+X until end of turn, where X is the number of creature cards in your graveyard"));
this.getRightHalfCard().addAbility(ability);

this.finalizeDFC();
}

private GarrukRelentless(final GarrukRelentless card) {
Expand Down
50 changes: 2 additions & 48 deletions Mage.Sets/src/mage/cards/g/GarrukTheVeilCursed.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
package mage.cards.g;

import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.WolfTokenWithDeathtouch;
import mage.target.common.TargetCardInLibrary;

import java.util.UUID;

Expand All @@ -28,40 +12,10 @@
*/
public final class GarrukTheVeilCursed extends CardImpl {

private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE);

public GarrukTheVeilCursed(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.GARRUK);

// this card is the second face of double-faced card
this.nightCard = true;

this.color.setGreen(true);
this.color.setBlack(true);

// +1 : Create a 1/1 black Wolf creature token with deathtouch.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new WolfTokenWithDeathtouch()), 1));

// -1 : Sacrifice a creature. If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle your library.
this.addAbility(new LoyaltyAbility(new DoIfCostPaid(
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(
StaticFilters.FILTER_CARD_CREATURE_A
), true),
null,
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE),
false
), -1));

// -3 : Creatures you control gain trample and get +X/+X until end of turn, where X is the number of creature cards in your graveyard.
Ability ability = new LoyaltyAbility(new GainAbilityControlledEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURE
).setText("creatures you control gain trample"), -3);
ability.addEffect(new BoostControlledEffect(
xValue, xValue, Duration.EndOfTurn
).setText("and get +X/+X until end of turn, where X is the number of creature cards in your graveyard"));
this.addAbility(ability);
TransformingDoubleFacedCard.copyToBackFace(new mage.cards.g.GarrukRelentless(ownerId, setInfo), this);
}

private GarrukTheVeilCursed(final GarrukTheVeilCursed card) {
Expand Down
Loading