Implementing Daybound/Nightbound mechanic (#8200)

* adding initial day/night support in game state

* remove card exclusion for testing

* added functional implementation to abilities from main branch

* functionally implemented NightCondition

* updated DayNightHint

* added support for nightbound entering transformed at night

* [MID] Implemented Unnatural Moonrise

* [MID] Implemented The Celestus

* added some docs

* changed access for state day/night methods

* added transformation to day/night switch

* re-added unfinished filter, removed day/night cards

* fixed some errors with transforming

* added hints to all day/night cards

* added transformation prevention plus a test

* added Immerwolf test

* [MID] Implemented Tovolar, Dire Overlord / Tovolar, The Midnight Scourge

* refactored some cards to not use isTransformable

* removed transformable parameter

* simplified some transform code

* fixed null pointer exception

* removed unnecessary canTransform method

* fixed a small error

* reworked implementation of rule 701.28f

* small change in transform logic

* fixed failiing test

* fixed verify failure

* small merge change

* added support for day/night switching based on spells cast

* [MID] Implemented Curse of Leeches / Leeching Lurkers

* moved day/night handling to untap step

* added tests for cards which set day and trigger from a change

* [MID] Implemented Ludevic, Necrogenius / Olag, Ludevic's Hubris

* added support for creatures transforming to match day/night when necessary

* fixed verify failures

* fixed another verify failure

* remove temporary verify skip

* added transform message

* removed unnecessary transform message

* [MID] Implemented Angelic Enforcer / Enduring Angel

* updated DayNightHint with more information

* fixed verify failure

* merge fix

* fixed Startled Awake / Persistent Nightmare / Moonmist interaction

* added another test for Moonmist

* merge fix

* merge fix

* [MID] Implemented Baneblade Scoundrel / Baneclaw Marauder

* merge fix

* [MID] various text fixes

* [MID] a few more text fixes

* Merge fix

* Improved transform game logs (hints, source), fixed day/night logs, fixed miss game param (due code style);

* fixed a test failure

* Merge fix

Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
Evan Kranzler 2021-11-05 15:11:23 -04:00 committed by GitHub
parent 6d4e5672c3
commit 30afb11cd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
305 changed files with 2174 additions and 1064 deletions

View file

@ -28,7 +28,6 @@ public final class AberrantResearcher extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.p.PerfectedForm.class; this.secondSideCardClazz = mage.cards.p.PerfectedForm.class;
// Flying // Flying
@ -71,7 +70,7 @@ class AberrantResearcherEffect extends OneShotEffect {
.noneMatch(card -> card.isInstantOrSorcery(game))) { .noneMatch(card -> card.isInstantOrSorcery(game))) {
return false; return false;
} }
new TransformSourceEffect(true).apply(game, source); new TransformSourceEffect().apply(game, source);
return true; return true;
} }

View file

@ -30,7 +30,6 @@ public final class AccursedWitch extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.i.InfectiousCurse.class; this.secondSideCardClazz = mage.cards.i.InfectiousCurse.class;
// Spells your opponents cast that target Accursed Witch cost {1} less to cast. // Spells your opponents cast that target Accursed Witch cost {1} less to cast.

View file

@ -20,7 +20,6 @@ public final class AfflictedDeserter extends CardImpl {
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.transformable = true;
this.secondSideCardClazz = mage.cards.w.WerewolfRansacker.class; this.secondSideCardClazz = mage.cards.w.WerewolfRansacker.class;
this.power = new MageInt(3); this.power = new MageInt(3);

View file

@ -36,7 +36,6 @@ public final class AmbitiousFarmhand extends CardImpl {
this.subtype.add(SubType.PEASANT); this.subtype.add(SubType.PEASANT);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.s.SeasonedCathar.class; this.secondSideCardClazz = mage.cards.s.SeasonedCathar.class;
// When Ambitious Farmhand enters the battlefield, you may search your library for a basic Plains card, reveal it, put it into your hand, then shuffle. // When Ambitious Farmhand enters the battlefield, you may search your library for a basic Plains card, reveal it, put it into your hand, then shuffle.
@ -47,7 +46,7 @@ public final class AmbitiousFarmhand extends CardImpl {
// Coven{1}{W}{W}: Transform Ambitious Farmhand. Activate only if you control three or more creatures with different powers. // Coven{1}{W}{W}: Transform Ambitious Farmhand. Activate only if you control three or more creatures with different powers.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new ActivateIfConditionActivatedAbility( this.addAbility(new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD, new TransformSourceEffect(true), Zone.BATTLEFIELD, new TransformSourceEffect(),
new ManaCostsImpl<>("{1}{W}{W}"), CovenCondition.instance new ManaCostsImpl<>("{1}{W}{W}"), CovenCondition.instance
).setAbilityWord(AbilityWord.COVEN).addHint(CovenHint.instance)); ).setAbilityWord(AbilityWord.COVEN).addHint(CovenHint.instance));
} }

View file

@ -38,7 +38,6 @@ public final class AnakinSkywalker extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = mage.cards.d.DarthVader.class; this.secondSideCardClazz = mage.cards.d.DarthVader.class;
// Whenever another creature dies, put a +1/+1 counter on Anakin Skywalker. // Whenever another creature dies, put a +1/+1 counter on Anakin Skywalker.
@ -82,7 +81,7 @@ class AnakinSkywalkerEffect extends ReplacementEffectImpl {
Permanent permanent = game.getPermanent(event.getTargetId()); Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent != null) { if (permanent != null) {
permanent.regenerate(source, game); permanent.regenerate(source, game);
return new TransformSourceEffect(true).apply(game, source); return new TransformSourceEffect().apply(game, source);
} }
return false; return false;
} }

View file

@ -0,0 +1,60 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.ControllerLifeCount;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.GainAbilityControllerEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofAbility;
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 java.util.UUID;
/**
* @author TheElk801
*/
public final class AngelicEnforcer extends CardImpl {
public AngelicEnforcer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.ANGEL);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
this.color.setWhite(true);
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// You have hexproof.
this.addAbility(new SimpleStaticAbility(new GainAbilityControllerEffect(HexproofAbility.getInstance())));
// Angelic Enforcer's power and toughness are each equal to your life total.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(
ControllerLifeCount.instance, Duration.EndOfGame
).setText("{this}'s power and toughness are each equal to your life total")));
// Whenever Angelic Enforcer attacks, double your life total.
this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(
ControllerLifeCount.instance
).setText("double your life total")));
}
private AngelicEnforcer(final AngelicEnforcer card) {
super(card);
}
@Override
public AngelicEnforcer copy() {
return new AngelicEnforcer(this);
}
}

View file

@ -1,30 +1,23 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.common.TransformTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.keyword.*; import mage.abilities.keyword.*;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent; import java.util.UUID;
import mage.target.targetpointer.FixedTarget;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class ArchangelAvacyn extends CardImpl { public final class ArchangelAvacyn extends CardImpl {
@ -37,14 +30,13 @@ public final class ArchangelAvacyn extends CardImpl {
} }
public ArchangelAvacyn(UUID ownerId, CardSetInfo setInfo) { public ArchangelAvacyn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ANGEL); this.subtype.add(SubType.ANGEL);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = AvacynThePurifier.class; this.secondSideCardClazz = AvacynThePurifier.class;
// Flash // Flash
@ -57,15 +49,18 @@ public final class ArchangelAvacyn extends CardImpl {
this.addAbility(VigilanceAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance());
// When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn. // When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility( this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(
new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, IndestructibleAbility.getInstance(), Duration.EndOfTurn,
new FilterControlledCreaturePermanent("creatures you control")), false); StaticFilters.FILTER_PERMANENT_CREATURES
this.addAbility(ability); ), false));
// When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep. // When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new DiesCreatureTriggeredAbility(new ArchangelAvacynEffect(), false, filter)); this.addAbility(new DiesCreatureTriggeredAbility(
new CreateDelayedTriggeredAbilityEffect(
new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new TransformSourceEffect())
).setText("transform {this} at the beginning of the next upkeep"), false, filter
).setTriggerPhrase("When a non-Angel creature you control dies, "));
} }
private ArchangelAvacyn(final ArchangelAvacyn card) { private ArchangelAvacyn(final ArchangelAvacyn card) {
@ -77,36 +72,3 @@ public final class ArchangelAvacyn extends CardImpl {
return new ArchangelAvacyn(this); return new ArchangelAvacyn(this);
} }
} }
class ArchangelAvacynEffect extends OneShotEffect {
private static final String effectText = "transform {this} at the beginning of the next upkeep";
ArchangelAvacynEffect() {
super(Outcome.Benefit);
staticText = effectText;
}
ArchangelAvacynEffect(ArchangelAvacynEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
MageObject sourceObject = source.getSourceObjectIfItStillExists(game);
if (sourceObject instanceof Permanent) {
//create delayed triggered ability
Effect effect = new TransformTargetEffect(false);
effect.setTargetPointer(new FixedTarget((Permanent) sourceObject, game));
AtTheBeginOfNextUpkeepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(effect);
game.addDelayedTriggeredAbility(delayedAbility, source);
}
return true;
}
@Override
public ArchangelAvacynEffect copy() {
return new ArchangelAvacynEffect(this);
}
}

View file

@ -39,7 +39,6 @@ public final class ArchdemonOfGreed extends CardImpl {
this.color.setBlack(true); this.color.setBlack(true);
this.nightCard = true; this.nightCard = true;
this.transformable = true;
this.power = new MageInt(9); this.power = new MageInt(9);
this.toughness = new MageInt(9); this.toughness = new MageInt(9);

View file

@ -26,7 +26,6 @@ public final class ArchiveHaunt extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.color.setBlue(true); this.color.setBlue(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Flying // Flying

View file

@ -29,7 +29,6 @@ public final class ArguelsBloodFast extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.transformable = true;
this.secondSideCardClazz = mage.cards.t.TempleOfAclazotz.class; this.secondSideCardClazz = mage.cards.t.TempleOfAclazotz.class;
// {1}{B}, Pay 2 life: Draw a card. // {1}{B}, Pay 2 life: Draw a card.
@ -40,7 +39,7 @@ public final class ArguelsBloodFast extends CardImpl {
// At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast. // At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, true), new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), TargetController.YOU, true),
FatefulHourCondition.instance, FatefulHourCondition.instance,
"At the beginning of your upkeep, if you have 5 or less life, you may transform {this}" "At the beginning of your upkeep, if you have 5 or less life, you may transform {this}"
)); ));

View file

@ -35,7 +35,6 @@ public final class ArlinnEmbracedByTheMoon extends CardImpl {
this.color.setGreen(true); this.color.setGreen(true);
this.nightCard = true; this.nightCard = true;
this.transformable = true;
// +1: Creatures you control get +1/+1 and gain trample until end of turn. // +1: Creatures you control get +1/+1 and gain trample until end of turn.
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE); Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE);
@ -50,7 +49,7 @@ public final class ArlinnEmbracedByTheMoon extends CardImpl {
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
ability = new LoyaltyAbility(new DamageTargetEffect(3), -1); ability = new LoyaltyAbility(new DamageTargetEffect(3), -1);
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
ability.addEffect(new TransformSourceEffect(false)); ability.addEffect(new TransformSourceEffect());
this.addAbility(ability); this.addAbility(ability);
// -6: You get an emblem with "Creatures you control have haste and '{T}: This creature deals damage equal to its power to any target.'" // -6: You get an emblem with "Creatures you control have haste and '{T}: This creature deals damage equal to its power to any target.'"

View file

@ -32,7 +32,6 @@ public final class ArlinnKord extends CardImpl {
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ARLINN); this.subtype.add(SubType.ARLINN);
this.transformable = true;
this.secondSideCardClazz = ArlinnEmbracedByTheMoon.class; this.secondSideCardClazz = ArlinnEmbracedByTheMoon.class;
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3)); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3));
@ -53,7 +52,7 @@ public final class ArlinnKord extends CardImpl {
// 0: Create a 2/2 green Wolf creature token. Transform Arlinn Kord. // 0: Create a 2/2 green Wolf creature token. Transform Arlinn Kord.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
ability = new LoyaltyAbility(new CreateTokenEffect(new WolfToken()), 0); ability = new LoyaltyAbility(new CreateTokenEffect(new WolfToken()), 0);
ability.addEffect(new TransformSourceEffect(true)); ability.addEffect(new TransformSourceEffect());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -31,7 +31,6 @@ public final class ArlinnTheMoonsFury extends CardImpl {
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4)); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
this.color.setRed(true); this.color.setRed(true);
this.color.setGreen(true); this.color.setGreen(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Nightbound // Nightbound

View file

@ -35,7 +35,6 @@ public final class ArlinnThePacksHope extends CardImpl {
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ARLINN); this.subtype.add(SubType.ARLINN);
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4)); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
this.transformable = true;
this.secondSideCardClazz = mage.cards.a.ArlinnTheMoonsFury.class; this.secondSideCardClazz = mage.cards.a.ArlinnTheMoonsFury.class;
// Daybound // Daybound

View file

@ -26,7 +26,6 @@ public final class AshmouthDragon extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.color.setRed(true); this.color.setRed(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Flying // Flying

View file

@ -25,7 +25,6 @@ public final class AutumnalGloom extends CardImpl {
public AutumnalGloom(UUID ownerId, CardSetInfo setInfo) { public AutumnalGloom(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.transformable = true;
this.secondSideCardClazz = AncientOfTheEquinox.class; this.secondSideCardClazz = AncientOfTheEquinox.class;
// {B}: Put the top card of your library into your graveyard. // {B}: Put the top card of your library into your graveyard.
@ -33,7 +32,7 @@ public final class AutumnalGloom extends CardImpl {
// <i>Delirium</i> &mdash; At the beginning of your end step, if there are four or more card types among cards in your graveyard, transform Autumnal Gloom. // <i>Delirium</i> &mdash; At the beginning of your end step, if there are four or more card types among cards in your graveyard, transform Autumnal Gloom.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, DeliriumCondition.instance, false); Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), TargetController.YOU, DeliriumCondition.instance, false);
ability.setAbilityWord(AbilityWord.DELIRIUM); ability.setAbilityWord(AbilityWord.DELIRIUM);
ability.addHint(CardTypesInGraveyardHint.YOU); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);

View file

@ -27,12 +27,11 @@ public final class AvacynianMissionaries extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = mage.cards.l.LunarchInquisitors.class; this.secondSideCardClazz = mage.cards.l.LunarchInquisitors.class;
// At the beginning of your end step, if Avacynian Missionaries is equipped, transform it. // At the beginning of your end step, if Avacynian Missionaries is equipped, transform it.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, EquippedSourceCondition.instance, false)); this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), TargetController.YOU, EquippedSourceCondition.instance, false));
} }

View file

@ -20,7 +20,6 @@ public final class AwokenDemon extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.color.setBlack(true); this.color.setBlack(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
} }

View file

@ -37,7 +37,6 @@ public final class AzcantaTheSunkenRuin extends CardImpl {
// this card is the second face of double-faced card // this card is the second face of double-faced card
this.nightCard = true; this.nightCard = true;
this.transformable = true;
// (Transforms from Search for Azcanta)/ // (Transforms from Search for Azcanta)/
// {T} : Add {U}. // {T} : Add {U}.

View file

@ -36,7 +36,6 @@ public final class AzorsGateway extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
this.transformable = true;
this.secondSideCardClazz = mage.cards.s.SanctumOfTheSun.class; this.secondSideCardClazz = mage.cards.s.SanctumOfTheSun.class;
// {1}, {T}: Draw a card, then exile a card from your hand. If cards with five or more different converted mana costs are exiled with Azor's Gateway, you gain 5 life, untap Azor's Gateway, and transform it. // {1}, {T}: Draw a card, then exile a card from your hand. If cards with five or more different converted mana costs are exiled with Azor's Gateway, you gain 5 life, untap Azor's Gateway, and transform it.
@ -94,7 +93,7 @@ class AzorsGatewayEffect extends OneShotEffect {
if (usedCMC.size() > 4) { if (usedCMC.size() > 4) {
controller.gainLife(4, game, source); controller.gainLife(4, game, source);
new UntapSourceEffect().apply(game, source); new UntapSourceEffect().apply(game, source);
new TransformSourceEffect(true).apply(game, source); new TransformSourceEffect().apply(game, source);
} }
} }
return true; return true;

View file

@ -23,7 +23,6 @@ public final class BaithookAngler extends CardImpl {
this.subtype.add(SubType.PEASANT); this.subtype.add(SubType.PEASANT);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.h.HookHauntDrifter.class; this.secondSideCardClazz = mage.cards.h.HookHauntDrifter.class;
// Disturb {1}{U} // Disturb {1}{U}

View file

@ -22,7 +22,6 @@ public final class BaneOfHanweir extends CardImpl {
// this card is the second face of double-faced card // this card is the second face of double-faced card
this.nightCard = true; this.nightCard = true;
this.transformable = true;
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);

View file

@ -0,0 +1,57 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.keyword.DayboundAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.BlockingOrBlockedBySourcePredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BanebladeScoundrel extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(BlockingOrBlockedBySourcePredicate.BLOCKING);
}
public BanebladeScoundrel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
this.secondSideCardClazz = mage.cards.b.BaneclawMarauder.class;
// Whenever Baneblade Scoundrel becomes blocked, each creature blocking it gets -1/-1 until end of turn.
this.addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostAllEffect(
-1, -1, Duration.EndOfTurn, filter, false
).setText("each creature blocking it gets -1/-1 until end of turn"), false));
// Daybound
this.addAbility(new TransformAbility());
this.addAbility(new DayboundAbility());
}
private BanebladeScoundrel(final BanebladeScoundrel card) {
super(card);
}
@Override
public BanebladeScoundrel copy() {
return new BanebladeScoundrel(this);
}
}

View file

@ -0,0 +1,126 @@
package mage.cards.b;
import mage.MageInt;
import mage.MageObjectReference;
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.common.LoseLifeTargetControllerEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.keyword.NightboundAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.WatcherScope;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.filter.predicate.permanent.BlockingOrBlockedBySourcePredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.watchers.Watcher;
import java.util.*;
/**
* @author TheElk801
*/
public final class BaneclawMarauder extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
private static final FilterPermanent filter2 = new FilterCreaturePermanent("a creature blocking {this}");
static {
filter.add(BlockingOrBlockedBySourcePredicate.BLOCKING);
filter2.add(BaneclawMarauderPredicate.instance);
}
public BaneclawMarauder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(5);
this.toughness = new MageInt(4);
this.color.setBlack(true);
this.nightCard = true;
// Whenever Baneclaw Marauder becomes blocked, each creature blocking it gets -1/-1 until end of turn.
this.addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostAllEffect(
-1, -1, Duration.EndOfTurn, filter, false
).setText("each creature blocking it gets -1/-1 until end of turn"), false));
// Whenever a creature blocking Baneclaw Marauder dies, its controller loses 1 life.
this.addAbility(new DiesCreatureTriggeredAbility(
new LoseLifeTargetControllerEffect(1)
.setText("that creature's controller loses 1 life"),
false, filter2, true
), new BaneclawMarauderWatcher());
// Nightbound
this.addAbility(new NightboundAbility());
}
private BaneclawMarauder(final BaneclawMarauder card) {
super(card);
}
@Override
public BaneclawMarauder copy() {
return new BaneclawMarauder(this);
}
}
enum BaneclawMarauderPredicate implements ObjectSourcePlayerPredicate<Permanent> {
instance;
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
return BaneclawMarauderWatcher.check(input.getSourceId(), input.getObject(), game);
}
}
class BaneclawMarauderWatcher extends Watcher {
private final Map<MageObjectReference, Set<MageObjectReference>> blockerMap = new HashMap<>();
BaneclawMarauderWatcher() {
super(WatcherScope.GAME);
}
@Override
public void watch(GameEvent event, Game game) {
switch (event.getType()) {
case BLOCKER_DECLARED:
blockerMap
.computeIfAbsent(new MageObjectReference(event.getTargetId(), game), x -> new HashSet<>())
.add(new MageObjectReference(event.getSourceId(), game));
return;
case END_COMBAT_STEP_POST:
blockerMap.clear();
return;
case REMOVED_FROM_COMBAT:
blockerMap
.values()
.stream()
.forEach(set -> set.removeIf(mor -> mor.refersTo(event.getTargetId(), game)));
}
}
@Override
public void reset() {
super.reset();
blockerMap.clear();
}
static boolean check(UUID sourceId, Permanent blocker, Game game) {
return game.getState()
.getWatcher(BaneclawMarauderWatcher.class)
.blockerMap
.getOrDefault(new MageObjectReference(sourceId, game), Collections.emptySet())
.stream()
.anyMatch(mor -> mor.refersTo(blocker, game));
}
}

View file

@ -28,7 +28,6 @@ public final class BenevolentGeist extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.color.setBlue(true); this.color.setBlue(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Flying // Flying

View file

@ -24,13 +24,12 @@ public final class BereavedSurvivor extends CardImpl {
this.subtype.add(SubType.PEASANT); this.subtype.add(SubType.PEASANT);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.d.DauntlessAvenger.class; this.secondSideCardClazz = mage.cards.d.DauntlessAvenger.class;
// When another creature you control dies, transform Bereaved Survivor. // When another creature you control dies, transform Bereaved Survivor.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new DiesCreatureTriggeredAbility( this.addAbility(new DiesCreatureTriggeredAbility(
new TransformSourceEffect(true), false, new TransformSourceEffect(), false,
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE
).setTriggerPhrase("When another creature you control dies, ")); ).setTriggerPhrase("When another creature you control dies, "));
} }

View file

@ -24,7 +24,6 @@ public final class BirdAdmirer extends CardImpl {
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = mage.cards.w.WingShredder.class; this.secondSideCardClazz = mage.cards.w.WingShredder.class;
// Reach // Reach

View file

@ -41,7 +41,6 @@ public final class BloodlineKeeper extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = mage.cards.l.LordOfLineage.class; this.secondSideCardClazz = mage.cards.l.LordOfLineage.class;
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
@ -50,7 +49,7 @@ public final class BloodlineKeeper extends CardImpl {
// {B}: Transform Bloodline Keeper. Activate this ability only if you control five or more Vampires. // {B}: Transform Bloodline Keeper. Activate this ability only if you control five or more Vampires.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
new TransformSourceEffect(true), new TransformSourceEffect(),
new ManaCostsImpl("{B}"), new ManaCostsImpl("{B}"),
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4)); new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4));
this.addAbility(ability); this.addAbility(ability);

View file

@ -33,8 +33,6 @@ public final class BloodswornSquire extends CardImpl {
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = mage.cards.b.BloodswornKnight.class; this.secondSideCardClazz = mage.cards.b.BloodswornKnight.class;
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
@ -47,7 +45,7 @@ public final class BloodswornSquire extends CardImpl {
ability.addCost(new DiscardCardCost()); ability.addCost(new DiscardCardCost());
ability.addEffect(new TapSourceEffect().setText("tap it")); ability.addEffect(new TapSourceEffect().setText("tap it"));
ability.addEffect(new ConditionalOneShotEffect( ability.addEffect(new ConditionalOneShotEffect(
new TransformSourceEffect(true, true), new TransformSourceEffect(),
new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_CREATURES), new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_CREATURES),
"Then if there are four or more creature cards in your graveyard, transform {this}" "Then if there are four or more creature cards in your graveyard, transform {this}"
)); ));

View file

@ -2,18 +2,11 @@ package mage.cards.b;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.WerewolfBackTriggeredAbility; import mage.abilities.common.WerewolfBackTriggeredAbility;
import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController;
/** /**
* *
@ -30,7 +23,6 @@ public final class BrandedHowler extends CardImpl {
// this card is the second face of double-faced card // this card is the second face of double-faced card
this.nightCard = true; this.nightCard = true;
this.transformable = true;
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler. // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler.
this.addAbility(new WerewolfBackTriggeredAbility()); this.addAbility(new WerewolfBackTriggeredAbility());

View file

@ -21,7 +21,6 @@ public final class BreakneckRider extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = mage.cards.n.NeckBreaker.class; this.secondSideCardClazz = mage.cards.n.NeckBreaker.class;
// At the beginning of each upkeep, if no spells were cast last turn, transform Breakneck Rider. // At the beginning of each upkeep, if no spells were cast last turn, transform Breakneck Rider.

View file

@ -32,7 +32,6 @@ public final class BrutalCathar extends CardImpl {
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.m.MoonrageBrute.class; this.secondSideCardClazz = mage.cards.m.MoonrageBrute.class;
// When this creature enters the battlefield or transforms into Brutal Cathar, exile target creature an opponent controls until this creature leaves the battlefield. // When this creature enters the battlefield or transforms into Brutal Cathar, exile target creature an opponent controls until this creature leaves the battlefield.

View file

@ -24,7 +24,6 @@ public final class BurlyBreaker extends CardImpl {
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(6); this.power = new MageInt(6);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
this.transformable = true;
this.secondSideCardClazz = mage.cards.d.DireStrainDemolisher.class; this.secondSideCardClazz = mage.cards.d.DireStrainDemolisher.class;
// Ward {1} // Ward {1}

View file

@ -28,14 +28,12 @@ public final class CatapultFodder extends CardImpl {
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
this.transformable = true;
this.secondSideCardClazz = mage.cards.c.CatapultCaptain.class; this.secondSideCardClazz = mage.cards.c.CatapultCaptain.class;
// At the beginning of combat on your turn, if you control three or more creatures that each have toughness greater than their power, transform Catapult Fodder. // At the beginning of combat on your turn, if you control three or more creatures that each have toughness greater than their power, transform Catapult Fodder.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfCombatTriggeredAbility(new TransformSourceEffect(true, true), TargetController.YOU, false), new BeginningOfCombatTriggeredAbility(new TransformSourceEffect(), TargetController.YOU, false),
CatapultFodderCondition.instance, CatapultFodderCondition.instance,
"At the beginning of combat on your turn, if you control three or more creatures that each have toughness greater than their power, transform {this}" "At the beginning of combat on your turn, if you control three or more creatures that each have toughness greater than their power, transform {this}"
)); ));

View file

@ -25,7 +25,6 @@ public final class ChaliceOfLife extends CardImpl {
public ChaliceOfLife(UUID ownerId, CardSetInfo setInfo) { public ChaliceOfLife(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
this.transformable = true;
this.secondSideCardClazz = ChaliceOfDeath.class; this.secondSideCardClazz = ChaliceOfDeath.class;
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
@ -66,8 +65,7 @@ class ChaliceOfLifeEffect extends OneShotEffect {
// if you have at least 10 life more than your starting life total, transform Chalice of Life. // if you have at least 10 life more than your starting life total, transform Chalice of Life.
if (player.getLife() >= game.getStartingLife() + 10) { if (player.getLife() >= game.getStartingLife() + 10) {
permanent.transform(game); permanent.transform(source, game);
game.informPlayers(permanent.getName() + " transforms into " + permanent.getSecondCardFace().getName());
} }
} }
} }

View file

@ -45,7 +45,6 @@ public final class ChandraFireOfKaladesh extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = ChandraRoaringFlame.class; this.secondSideCardClazz = ChandraRoaringFlame.class;
// Whenever you cast a red spell, untap Chandra, Fire of Kaladesh. // Whenever you cast a red spell, untap Chandra, Fire of Kaladesh.

View file

@ -33,7 +33,6 @@ public final class ChandraRoaringFlame extends CardImpl {
this.color.setRed(true); this.color.setRed(true);
this.nightCard = true; this.nightCard = true;
this.transformable = true;
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4)); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));

View file

@ -31,7 +31,6 @@ public final class ChapelShieldgeist extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.color.setWhite(true); this.color.setWhite(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Flying // Flying

View file

@ -25,7 +25,6 @@ public final class ChaplainOfAlms extends CardImpl {
this.subtype.add(SubType.CLERIC); this.subtype.add(SubType.CLERIC);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.c.ChapelShieldgeist.class; this.secondSideCardClazz = mage.cards.c.ChapelShieldgeist.class;
// First strike // First strike

View file

@ -22,13 +22,12 @@ public final class ChillingChronicle extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, ""); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.color.setBlue(true); this.color.setBlue(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// {1}, {T}: Tap target nonland permanent. Transform Chilling Chronicle. // {1}, {T}: Tap target nonland permanent. Transform Chilling Chronicle.
Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new GenericManaCost(1)); Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new GenericManaCost(1));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addEffect(new TransformSourceEffect(false)); ability.addEffect(new TransformSourceEffect());
ability.addTarget(new TargetNonlandPermanent()); ability.addTarget(new TargetNonlandPermanent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -37,12 +37,11 @@ public final class ChosenOfMarkov extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.m.MarkovsServant.class; this.secondSideCardClazz = mage.cards.m.MarkovsServant.class;
// {tap}, Tap an untapped Vampire you control: Transform Chosen of Markov. // {tap}, Tap an untapped Vampire you control: Transform Chosen of Markov.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new TapSourceCost()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), new TapSourceCost());
ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter))); ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter)));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,4 +1,3 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID; import java.util.UUID;
@ -12,7 +11,6 @@ import mage.abilities.keyword.TransformAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.cards.h.HomicidalBruteWatcher;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
@ -31,7 +29,6 @@ public final class CivilizedScholar extends CardImpl {
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ADVISOR); this.subtype.add(SubType.ADVISOR);
this.transformable = true;
this.secondSideCardClazz = mage.cards.h.HomicidalBrute.class; this.secondSideCardClazz = mage.cards.h.HomicidalBrute.class;
this.power = new MageInt(0); this.power = new MageInt(0);
@ -39,7 +36,7 @@ public final class CivilizedScholar extends CardImpl {
// {tap}: Draw a card, then discard a card. If a creature card is discarded this way, untap Civilized Scholar, then transform it. // {tap}: Draw a card, then discard a card. If a creature card is discarded this way, untap Civilized Scholar, then transform it.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CivilizedScholarEffect(), new TapSourceCost())); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CivilizedScholarEffect(), new TapSourceCost()));
this.addAbility(new TransformAbility(), new HomicidalBruteWatcher()); this.addAbility(new TransformAbility());
} }
private CivilizedScholar(final CivilizedScholar card) { private CivilizedScholar(final CivilizedScholar card) {
@ -80,7 +77,7 @@ class CivilizedScholarEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(source.getSourceId()); Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) { if (permanent != null) {
permanent.untap(game); permanent.untap(game);
permanent.transform(game); permanent.transform(source, game);
} }
} }
return true; return true;

View file

@ -25,12 +25,11 @@ public final class CloisteredYouth extends CardImpl {
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.u.UnholyFiend.class; this.secondSideCardClazz = mage.cards.u.UnholyFiend.class;
// At the beginning of your upkeep, you may transform Cloistered Youth. // At the beginning of your upkeep, you may transform Cloistered Youth.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, true)); this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), TargetController.YOU, true));
} }
private CloisteredYouth(final CloisteredYouth card) { private CloisteredYouth(final CloisteredYouth card) {

View file

@ -33,7 +33,6 @@ public final class ConduitOfStorms extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = ConduitOfEmrakul.class; this.secondSideCardClazz = ConduitOfEmrakul.class;
// Whenever Conduit of Storms attacks, add {R} at the beginning of your next main phase this turn. // Whenever Conduit of Storms attacks, add {R} at the beginning of your next main phase this turn.
@ -44,7 +43,7 @@ public final class ConduitOfStorms extends CardImpl {
this.addAbility(new AttacksTriggeredAbility(effect, false)); this.addAbility(new AttacksTriggeredAbility(effect, false));
// {3}{R}{R}: Transform Conduit of Storms. // {3}{R}{R}: Transform Conduit of Storms.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl("{3}{R}{R}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), new ManaCostsImpl("{3}{R}{R}")));
} }
private ConduitOfStorms(final ConduitOfStorms card) { private ConduitOfStorms(final ConduitOfStorms card) {

View file

@ -27,7 +27,6 @@ public final class ConquerorsGalleon extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(10); this.toughness = new MageInt(10);
this.transformable = true;
this.secondSideCardClazz = ConquerorsFoothold.class; this.secondSideCardClazz = ConquerorsFoothold.class;
// When Conqueror's Galleon attacks, exile it at the end of combat, then return it to the battlefield transformed under your control. // When Conqueror's Galleon attacks, exile it at the end of combat, then return it to the battlefield transformed under your control.

View file

@ -3,18 +3,12 @@ package mage.cards.c;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.WerewolfFrontTriggeredAbility; import mage.abilities.common.WerewolfFrontTriggeredAbility;
import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController;
/** /**
* @author fireshoes * @author fireshoes
@ -28,7 +22,6 @@ public final class ConvictedKiller extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.b.BrandedHowler.class; this.secondSideCardClazz = mage.cards.b.BrandedHowler.class;
// At the beginning of each upkeep, if no spells were cast last turn, transform Convicted Killer. // At the beginning of each upkeep, if no spells were cast last turn, transform Convicted Killer.

View file

@ -39,7 +39,6 @@ public final class CovertCutpurse extends CardImpl {
this.subtype.add(SubType.ROGUE); this.subtype.add(SubType.ROGUE);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.c.CovetousGeist.class; this.secondSideCardClazz = mage.cards.c.CovetousGeist.class;
// When Covert Cutpurse enters the battlefield, destroy target creature you don't control that was dealt damage this turn. // When Covert Cutpurse enters the battlefield, destroy target creature you don't control that was dealt damage this turn.

View file

@ -24,7 +24,6 @@ public final class CovetousCastaway extends CardImpl {
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = mage.cards.g.GhostlyCastigator.class; this.secondSideCardClazz = mage.cards.g.GhostlyCastigator.class;
// When Covetous Castaway dies, mill three cards. // When Covetous Castaway dies, mill three cards.

View file

@ -25,7 +25,6 @@ public final class CovetousGeist extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.color.setBlack(true); this.color.setBlack(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Flying // Flying

View file

@ -37,7 +37,6 @@ public final class CreepingInn extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(7); this.toughness = new MageInt(7);
this.color.setBlack(true); this.color.setBlack(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Whenever Creeping Inn attacks, you may exile a creature card from your graveyard. // Whenever Creeping Inn attacks, you may exile a creature card from your graveyard.
@ -46,7 +45,7 @@ public final class CreepingInn extends CardImpl {
this.addAbility(new AttacksTriggeredAbility(new CreepingInnEffect())); this.addAbility(new AttacksTriggeredAbility(new CreepingInnEffect()));
// {4}: Creeping Inn phases out. // {4}: Creeping Inn phases out.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PhaseOutSourceEffect(), new ManaCostsImpl("{4}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PhaseOutSourceEffect(), new ManaCostsImpl<>("{4}")));
} }
private CreepingInn(final CreepingInn card) { private CreepingInn(final CreepingInn card) {

View file

@ -25,7 +25,6 @@ public final class CryptolithFragment extends CardImpl {
public CryptolithFragment(UUID ownerId, CardSetInfo setInfo) { public CryptolithFragment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
this.transformable = true;
this.secondSideCardClazz = mage.cards.a.AuroraOfEmrakul.class; this.secondSideCardClazz = mage.cards.a.AuroraOfEmrakul.class;
// Cryptolith Fragment enters the battlefield tapped. // Cryptolith Fragment enters the battlefield tapped.
@ -39,7 +38,7 @@ public final class CryptolithFragment extends CardImpl {
// At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment. // At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), TargetController.YOU, false),
new XorLessLifeCondition(XorLessLifeCondition.CheckType.EACH_PLAYER, 10), new XorLessLifeCondition(XorLessLifeCondition.CheckType.EACH_PLAYER, 10),
"At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment.")); "At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment."));
} }

View file

@ -33,7 +33,6 @@ public final class CuriousHomunculus extends CardImpl {
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.v.VoraciousReader.class; this.secondSideCardClazz = mage.cards.v.VoraciousReader.class;
// {T}: Add {C}. Spend this mana only to cast an instant or sorcery spell. // {T}: Add {C}. Spend this mana only to cast an instant or sorcery spell.
@ -42,7 +41,7 @@ public final class CuriousHomunculus extends CardImpl {
// At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform Curious Homunculus. // At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform Curious Homunculus.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(), TargetController.YOU, false),
new InstantOrSorceryCardsInControllerGraveyardCondition(3), new InstantOrSorceryCardsInControllerGraveyardCondition(3),
"At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform {this}")); "At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform {this}"));
} }

View file

@ -0,0 +1,111 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.DayboundAbility;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CurseOfLeeches extends CardImpl {
public CurseOfLeeches(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
this.subtype.add(SubType.AURA);
this.subtype.add(SubType.CURSE);
this.secondSideCardClazz = mage.cards.l.LeechingLurker.class;
// Enchant player
TargetPlayer auraTarget = new TargetPlayer();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// As this permanent transforms into Curse of Leeches, attach it to a player.
this.addAbility(new SimpleStaticAbility(new CurseOfLeechesEffect()));
// At the beginning of enchanted player's upkeep, they lose 1 life and you gain 1 life.
ability = new BeginningOfUpkeepTriggeredAbility(
Zone.BATTLEFIELD, new LoseLifeTargetEffect(1).setText("they lose 1 life"),
TargetController.ENCHANTED, false, true
);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addAbility(ability);
// Daybound
this.addAbility(new TransformAbility());
this.addAbility(new DayboundAbility());
}
private CurseOfLeeches(final CurseOfLeeches card) {
super(card);
}
@Override
public CurseOfLeeches copy() {
return new CurseOfLeeches(this);
}
}
class CurseOfLeechesEffect extends ReplacementEffectImpl {
CurseOfLeechesEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "as this permanent transforms into {this}, attach it to a player";
}
private CurseOfLeechesEffect(final CurseOfLeechesEffect effect) {
super(effect);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
TargetPlayer target = new TargetPlayer();
target.withChooseHint("Player to attach to").setNotTarget(true);
controller.choose(Outcome.Detriment, target, source.getSourceId(), game);
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (permanent == null) {
return false;
}
permanent.addAttachment(target.getFirstTarget(), source, game);
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.TRANSFORMING;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return source.getSourceId().equals(event.getTargetId());
}
@Override
public CurseOfLeechesEffect copy() {
return new CurseOfLeechesEffect(this);
}
}

View file

@ -12,7 +12,6 @@ import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import java.util.UUID; import java.util.UUID;
@ -28,7 +27,6 @@ public final class DaringSleuth extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.b.BearerOfOverwhelmingTruths.class; this.secondSideCardClazz = mage.cards.b.BearerOfOverwhelmingTruths.class;
// When you sacrifice a Clue, transform Daring Sleuth. // When you sacrifice a Clue, transform Daring Sleuth.
@ -49,7 +47,7 @@ public final class DaringSleuth extends CardImpl {
class DaringSleuthTriggeredAbility extends TriggeredAbilityImpl { class DaringSleuthTriggeredAbility extends TriggeredAbilityImpl {
public DaringSleuthTriggeredAbility() { public DaringSleuthTriggeredAbility() {
super(Zone.BATTLEFIELD, new TransformSourceEffect(true)); super(Zone.BATTLEFIELD, new TransformSourceEffect());
} }
public DaringSleuthTriggeredAbility(final DaringSleuthTriggeredAbility ability) { public DaringSleuthTriggeredAbility(final DaringSleuthTriggeredAbility ability) {

View file

@ -36,7 +36,6 @@ public final class DauntlessAvenger extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.color.setWhite(true); this.color.setWhite(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Whenever Dauntless Avenger attacks, return target creature card with mana value 2 or less from your graveyard to the battlefield tapped and attacking. // Whenever Dauntless Avenger attacks, return target creature card with mana value 2 or less from your graveyard to the battlefield tapped and attacking.

View file

@ -37,7 +37,6 @@ public final class DaybreakRanger extends CardImpl {
this.subtype.add(SubType.RANGER); this.subtype.add(SubType.RANGER);
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.transformable = true;
this.secondSideCardClazz = mage.cards.n.NightfallPredator.class; this.secondSideCardClazz = mage.cards.n.NightfallPredator.class;
this.power = new MageInt(2); this.power = new MageInt(2);

View file

@ -30,7 +30,6 @@ public final class DeathbonnetHulk extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.color.setGreen(true); this.color.setGreen(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// At the beginning of your upkeep, you may exile a card from a graveyard. If a creature card was exiled this way, put a +1/+1 counter on Deathbonnet Hulk. // At the beginning of your upkeep, you may exile a card from a graveyard. If a creature card was exiled this way, put a +1/+1 counter on Deathbonnet Hulk.

View file

@ -39,7 +39,6 @@ public final class DeathbonnetSprout extends CardImpl {
this.subtype.add(SubType.FUNGUS); this.subtype.add(SubType.FUNGUS);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.d.DeathbonnetHulk.class; this.secondSideCardClazz = mage.cards.d.DeathbonnetHulk.class;
// At the beginning of your upkeep, mill a card. Then if there are three or more creature cards in your graveyard, transform Deathbonnet Sprout. // At the beginning of your upkeep, mill a card. Then if there are three or more creature cards in your graveyard, transform Deathbonnet Sprout.
@ -48,7 +47,7 @@ public final class DeathbonnetSprout extends CardImpl {
new MillCardsControllerEffect(1), TargetController.YOU, false new MillCardsControllerEffect(1), TargetController.YOU, false
); );
ability.addEffect(new ConditionalOneShotEffect( ability.addEffect(new ConditionalOneShotEffect(
new TransformSourceEffect(true), condition, new TransformSourceEffect(), condition,
"Then if there are three or more creature cards in your graveyard, transform {this}" "Then if there are three or more creature cards in your graveyard, transform {this}"
)); ));
this.addAbility(ability.addHint(hint)); this.addAbility(ability.addHint(hint));

View file

@ -33,7 +33,6 @@ public final class DelverOfSecrets extends CardImpl {
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.i.InsectileAberration.class; this.secondSideCardClazz = mage.cards.i.InsectileAberration.class;
// At the beginning of your upkeep, look at the top card of your library. You may reveal that card. If an instant or sorcery card is revealed this way, transform Delver of Secrets. // At the beginning of your upkeep, look at the top card of your library. You may reveal that card. If an instant or sorcery card is revealed this way, transform Delver of Secrets.
@ -73,25 +72,25 @@ class DelverOfSecretsEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (player != null && sourcePermanent != null) { if (player == null || sourcePermanent == null) {
if (player.getLibrary().hasCards()) { return false;
Card card = player.getLibrary().getFromTop(game);
if(card == null){
return false;
}
Cards cards = new CardsImpl();
cards.add(card);
player.lookAtCards(sourcePermanent.getName(), cards, game);
if (player.chooseUse(Outcome.DrawCard, "Reveal the top card of your library?", source, game)) {
player.revealCards(sourcePermanent.getName(), cards, game);
if (filter.match(card, game)) {
return new TransformSourceEffect(true, true).apply(game, source);
}
}
}
return true;
} }
return false; if (player.getLibrary().hasCards()) {
Card card = player.getLibrary().getFromTop(game);
if(card == null){
return false;
}
Cards cards = new CardsImpl();
cards.add(card);
player.lookAtCards(sourcePermanent.getName(), cards, game);
if (player.chooseUse(Outcome.DrawCard, "Reveal the top card of your library?", source, game)) {
player.revealCards(sourcePermanent.getName(), cards, game);
if (filter.match(card, game)) {
return new TransformSourceEffect().apply(game, source);
}
}
}
return true;
} }
} }

View file

@ -76,7 +76,7 @@ enum DemilichValue implements DynamicValue {
SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class); SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class);
if (watcher != null) { if (watcher != null) {
for (Spell spell : watcher.getSpellsCastThisTurn(sourceAbility.getControllerId())) { for (Spell spell : watcher.getSpellsCastThisTurn(sourceAbility.getControllerId())) {
if (spell.isInstantOrSorcery()) { if (spell.isInstantOrSorcery(game)) {
spells++; spells++;
} }
} }

View file

@ -29,7 +29,6 @@ public final class DennickPiousApprentice extends CardImpl {
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = mage.cards.d.DennickPiousApparition.class; this.secondSideCardClazz = mage.cards.d.DennickPiousApparition.class;
// Lifelink // Lifelink

View file

@ -25,7 +25,6 @@ public final class DepartedSoulkeeper extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.color.setWhite(true); this.color.setWhite(true);
this.color.setBlue(true); this.color.setBlue(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Flying // Flying

View file

@ -32,7 +32,6 @@ public final class DevotedGrafkeeper extends CardImpl {
this.subtype.add(SubType.PEASANT); this.subtype.add(SubType.PEASANT);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.d.DepartedSoulkeeper.class; this.secondSideCardClazz = mage.cards.d.DepartedSoulkeeper.class;
// When Devoted Grafkeeper enters the battlefield, mill two cards. // When Devoted Grafkeeper enters the battlefield, mill two cards.

View file

@ -22,7 +22,6 @@ public final class DireStrainBrawler extends CardImpl {
this.power = new MageInt(6); this.power = new MageInt(6);
this.toughness = new MageInt(6); this.toughness = new MageInt(6);
this.color.setGreen(true); this.color.setGreen(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Vigilance // Vigilance

View file

@ -23,7 +23,6 @@ public final class DireStrainDemolisher extends CardImpl {
this.power = new MageInt(8); this.power = new MageInt(8);
this.toughness = new MageInt(7); this.toughness = new MageInt(7);
this.color.setGreen(true); this.color.setGreen(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Ward {3} // Ward {3}

View file

@ -45,7 +45,6 @@ public final class DocentOfPerfection extends CardImpl {
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = mage.cards.f.FinalIteration.class; this.secondSideCardClazz = mage.cards.f.FinalIteration.class;
// Flying // Flying
@ -98,7 +97,7 @@ class DocentOfPerfectionEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
if (game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) >= 3) { if (game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) >= 3) {
return new TransformSourceEffect(true).apply(game, source); return new TransformSourceEffect().apply(game, source);
} }
} }
return false; return false;

View file

@ -27,7 +27,6 @@ public final class DormantGrove extends CardImpl {
public DormantGrove(UUID ownerId, CardSetInfo setInfo) { public DormantGrove(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
this.transformable = true;
this.secondSideCardClazz = mage.cards.g.GnarledGrovestrider.class; this.secondSideCardClazz = mage.cards.g.GnarledGrovestrider.class;
// At the beginning of combat on your turn, put a +1/+1 counter on target creature you control. // At the beginning of combat on your turn, put a +1/+1 counter on target creature you control.
@ -39,7 +38,7 @@ public final class DormantGrove extends CardImpl {
TargetController.YOU, false TargetController.YOU, false
); );
ability.addEffect(new ConditionalOneShotEffect( ability.addEffect(new ConditionalOneShotEffect(
new TransformSourceEffect(true, true), new TransformSourceEffect(),
DormatGroveCondition.instance, DormatGroveCondition.instance,
"Then if that creature has toughness 6 or greater, transform {this}" "Then if that creature has toughness 6 or greater, transform {this}"
)); ));

View file

@ -33,7 +33,6 @@ public final class DowsingDagger extends CardImpl {
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
this.transformable = true;
this.secondSideCardClazz = mage.cards.l.LostVale.class; this.secondSideCardClazz = mage.cards.l.LostVale.class;
// When Dowsing Dagger enters the battlefield, target opponent creates two 0/2 green Plant creature tokens with defender. // When Dowsing Dagger enters the battlefield, target opponent creates two 0/2 green Plant creature tokens with defender.
@ -47,7 +46,7 @@ public final class DowsingDagger extends CardImpl {
// Whenever equipped creature deals combat damage to a player, you may transform Dowsing Dagger. // Whenever equipped creature deals combat damage to a player, you may transform Dowsing Dagger.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new TransformSourceEffect(true), "equipped", true)); this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new TransformSourceEffect(), "equipped", true));
// Equip 2 // Equip 2
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));

View file

@ -3,21 +3,15 @@ package mage.cards.d;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.WerewolfFrontTriggeredAbility; import mage.abilities.common.WerewolfFrontTriggeredAbility;
import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
@ -34,7 +28,6 @@ public final class DuskwatchRecruiter extends CardImpl {
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.transformable = true;
this.secondSideCardClazz = mage.cards.k.KrallenhordeHowler.class; this.secondSideCardClazz = mage.cards.k.KrallenhordeHowler.class;
this.power = new MageInt(2); this.power = new MageInt(2);

View file

@ -30,7 +30,6 @@ public final class EcstaticAwakener extends CardImpl {
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.a.AwokenDemon.class; this.secondSideCardClazz = mage.cards.a.AwokenDemon.class;
// {2}{B}, Sacrifice another creature: Draw a card, then transform Ecstatic Awakener. Activate only once each turn. // {2}{B}, Sacrifice another creature: Draw a card, then transform Ecstatic Awakener. Activate only once each turn.
@ -38,7 +37,7 @@ public final class EcstaticAwakener extends CardImpl {
Ability ability = new LimitedTimesPerTurnActivatedAbility( Ability ability = new LimitedTimesPerTurnActivatedAbility(
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}{B}") Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}{B}")
); );
ability.addEffect(new TransformSourceEffect(true).concatBy(", then")); ability.addEffect(new TransformSourceEffect().concatBy(", then"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,4 +1,3 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID; import java.util.UUID;
@ -31,7 +30,6 @@ public final class ElbrusTheBindingBlade extends CardImpl {
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
this.transformable = true;
this.secondSideCardClazz = mage.cards.w.WithengarUnbound.class; this.secondSideCardClazz = mage.cards.w.WithengarUnbound.class;
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
@ -70,9 +68,7 @@ class ElbrusTheBindingBladeEffect extends OneShotEffect {
Permanent attachedTo = game.getPermanent(equipment.getAttachedTo()); Permanent attachedTo = game.getPermanent(equipment.getAttachedTo());
if (attachedTo != null) { if (attachedTo != null) {
attachedTo.removeAttachment(equipment.getId(), source, game); attachedTo.removeAttachment(equipment.getId(), source, game);
equipment.transform(game); equipment.transform(source, game);
game.informPlayers(equipment.getName() + " transforms into " + equipment.getSecondCardFace().getName());
} }
} }
return false; return false;

View file

@ -28,12 +28,11 @@ public final class ElusiveTormentor extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = mage.cards.i.InsidiousMist.class; this.secondSideCardClazz = mage.cards.i.InsidiousMist.class;
// {1}, Discard a card: Transform Elusive Tormentor. // {1}, Discard a card: Transform Elusive Tormentor.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new GenericManaCost(1)); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), new GenericManaCost(1));
ability.addCost(new DiscardCardCost()); ability.addCost(new DiscardCardCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -34,7 +34,6 @@ public final class EmbodimentOfFlame extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.color.setRed(true); this.color.setRed(true);
this.nightCard = true; this.nightCard = true;
this.transformable = true;
// Whenever a spell you control deals damage, put a flame counter on Embodiment of Flame. // Whenever a spell you control deals damage, put a flame counter on Embodiment of Flame.
this.addAbility(new EmbodimentOfFlameTriggeredAbility()); this.addAbility(new EmbodimentOfFlameTriggeredAbility());

View file

@ -0,0 +1,110 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.continuous.GainAbilityControllerEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EnduringAngel extends CardImpl {
public EnduringAngel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}{W}");
this.subtype.add(SubType.ANGEL);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.secondSideCardClazz = mage.cards.a.AngelicEnforcer.class;
// Flying
this.addAbility(FlyingAbility.getInstance());
// Double strike
this.addAbility(DoubleStrikeAbility.getInstance());
// You have hexproof.
this.addAbility(new SimpleStaticAbility(new GainAbilityControllerEffect(HexproofAbility.getInstance())));
// If your life total would be reduced to 0 or less, instead transform Enduring Angel and your life total becomes 3. Then if Enduring Angel didn't transform this way, you lose the game.
this.addAbility(new TransformAbility());
this.addAbility(new SimpleStaticAbility(new EnduringAngelEffect()));
}
private EnduringAngel(final EnduringAngel card) {
super(card);
}
@Override
public EnduringAngel copy() {
return new EnduringAngel(this);
}
}
class EnduringAngelEffect extends ReplacementEffectImpl {
EnduringAngelEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "if your life total would be reduced to 0 or less, instead transform {this} " +
"and your life total becomes 3. Then if {this} didn't transform this way, you lose the game";
}
private EnduringAngelEffect(final EnduringAngelEffect effect) {
super(effect);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (player == null || permanent == null || player.getLife() - event.getAmount() > 0) {
return false;
}
boolean transformed = permanent.transform(source, game);
if (player.getLife() > 3) {
event.setAmount(player.getLife() - 3);
} else if (player.getLife() < 3) {
event.setAmount(0);
player.setLife(3, game, source);
} else {
event.setAmount(0);
}
if (!transformed) {
player.lost(game);
}
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.LOSE_LIFE;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return source.isControlledBy(event.getPlayerId());
}
@Override
public EnduringAngelEffect copy() {
return new EnduringAngelEffect(this);
}
}

View file

@ -42,7 +42,6 @@ public final class ExtricatorOfSin extends CardImpl {
this.power = new MageInt(0); this.power = new MageInt(0);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = ExtricatorOfFlesh.class; this.secondSideCardClazz = ExtricatorOfFlesh.class;
// When Extricator of Sin enters the battlefield, you may sacrifice another permanent. If you do, create a 3/2 colorless Eldrazi Horror creature token. // When Extricator of Sin enters the battlefield, you may sacrifice another permanent. If you do, create a 3/2 colorless Eldrazi Horror creature token.
@ -52,7 +51,7 @@ public final class ExtricatorOfSin extends CardImpl {
// <i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, transform Extricator of Sin. // <i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, transform Extricator of Sin.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, false), new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), TargetController.YOU, false),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, "
+ " transform {this}.") + " transform {this}.")

View file

@ -29,7 +29,6 @@ public final class FangbladeBrigand extends CardImpl {
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = mage.cards.f.FangbladeEviscerator.class; this.secondSideCardClazz = mage.cards.f.FangbladeEviscerator.class;
// {1}{R}: Fangblade Brigand gets +1/+0 and gains first strike until end of turn. // {1}{R}: Fangblade Brigand gets +1/+0 and gains first strike until end of turn.

View file

@ -29,7 +29,6 @@ public final class FangbladeEviscerator extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
this.color.setRed(true); this.color.setRed(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// {1}{R}: Fangblade Eviscerator gets +1/+0 and gains first strike until end of turn. // {1}{R}: Fangblade Eviscerator gets +1/+0 and gains first strike until end of turn.

View file

@ -27,7 +27,7 @@ public final class FlameChanneler extends CardImpl {
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable=true;this.secondSideCardClazz=mage.cards.e.EmbodimentOfFlame.class; this.secondSideCardClazz = mage.cards.e.EmbodimentOfFlame.class;
// When a spell you control deals damage, transform Flame Channeler. // When a spell you control deals damage, transform Flame Channeler.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
@ -47,7 +47,7 @@ public final class FlameChanneler extends CardImpl {
class FlameChannelerTriggeredAbility extends TriggeredAbilityImpl { class FlameChannelerTriggeredAbility extends TriggeredAbilityImpl {
FlameChannelerTriggeredAbility() { FlameChannelerTriggeredAbility() {
super(Zone.BATTLEFIELD, new TransformSourceEffect(true)); super(Zone.BATTLEFIELD, new TransformSourceEffect());
} }
private FlameChannelerTriggeredAbility(final FlameChannelerTriggeredAbility ability) { private FlameChannelerTriggeredAbility(final FlameChannelerTriggeredAbility ability) {

View file

@ -26,7 +26,6 @@ public final class FlameheartWerewolf extends CardImpl {
// this card is the second face of double-faced card // this card is the second face of double-faced card
this.nightCard = true; this.nightCard = true;
this.transformable = true;
// Whenever Flameheart Werewolf blocks or becomes blocked by a creature, Flameheart Werewolf deals 2 damage to that creature. // Whenever Flameheart Werewolf blocks or becomes blocked by a creature, Flameheart Werewolf deals 2 damage to that creature.
this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(new DamageTargetEffect(2, true, "that creature"), this.addAbility(new BlocksOrBecomesBlockedSourceTriggeredAbility(new DamageTargetEffect(2, true, "that creature"),

View file

@ -39,7 +39,6 @@ public final class FrenziedTrapbreaker extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.color.setGreen(true); this.color.setGreen(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// {1}, Sacrifice Frenzied Trapbreaker: Destroy target artifact or enchantment. // {1}, Sacrifice Frenzied Trapbreaker: Destroy target artifact or enchantment.

View file

@ -23,7 +23,6 @@ public final class Galedrifter extends CardImpl {
this.subtype.add(SubType.HIPPOGRIFF); this.subtype.add(SubType.HIPPOGRIFF);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.w.Waildrifter.class; this.secondSideCardClazz = mage.cards.w.Waildrifter.class;
// Flying // Flying

View file

@ -31,7 +31,6 @@ public final class GarrukRelentless extends CardImpl {
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GARRUK); this.subtype.add(SubType.GARRUK);
this.transformable = true;
this.secondSideCardClazz = GarrukTheVeilCursed.class; this.secondSideCardClazz = GarrukTheVeilCursed.class;
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3)); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3));
@ -63,7 +62,7 @@ public final class GarrukRelentless extends CardImpl {
class GarrukRelentlessStateTrigger extends StateTriggeredAbility { class GarrukRelentlessStateTrigger extends StateTriggeredAbility {
public GarrukRelentlessStateTrigger() { public GarrukRelentlessStateTrigger() {
super(Zone.BATTLEFIELD, new TransformSourceEffect(true)); super(Zone.BATTLEFIELD, new TransformSourceEffect());
} }
public GarrukRelentlessStateTrigger(final GarrukRelentlessStateTrigger ability) { public GarrukRelentlessStateTrigger(final GarrukRelentlessStateTrigger ability) {

View file

@ -38,7 +38,6 @@ public final class GarrukTheVeilCursed extends CardImpl {
// this card is the second face of double-faced card // this card is the second face of double-faced card
this.nightCard = true; this.nightCard = true;
this.transformable = true;
this.color.setGreen(true); this.color.setGreen(true);
this.color.setBlack(true); this.color.setBlack(true);

View file

@ -2,18 +2,12 @@ package mage.cards.g;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.WerewolfFrontTriggeredAbility; import mage.abilities.common.WerewolfFrontTriggeredAbility;
import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController;
/** /**
* *
@ -28,7 +22,6 @@ public final class GatstafArsonists extends CardImpl {
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = GatstafRavagers.class; this.secondSideCardClazz = GatstafRavagers.class;
// At the beginning of each upkeep, if no spells were cast last turn, transform Gatstaf Arsonists. // At the beginning of each upkeep, if no spells were cast last turn, transform Gatstaf Arsonists.

View file

@ -22,7 +22,6 @@ public final class GatstafHowler extends CardImpl {
// this card is the second face of double-faced card // this card is the second face of double-faced card
this.nightCard = true; this.nightCard = true;
this.transformable = true;
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);

View file

@ -23,7 +23,6 @@ public final class GatstafRavagers extends CardImpl {
this.color.setRed(true); this.color.setRed(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Menace // Menace

View file

@ -20,7 +20,6 @@ public final class GatstafShepherd extends CardImpl {
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.transformable = true;
this.secondSideCardClazz = GatstafHowler.class; this.secondSideCardClazz = GatstafHowler.class;
this.power = new MageInt(2); this.power = new MageInt(2);

View file

@ -24,7 +24,6 @@ public final class GeierReachBandit extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.transformable = true;
this.secondSideCardClazz = mage.cards.v.VildinPackAlpha.class; this.secondSideCardClazz = mage.cards.v.VildinPackAlpha.class;
// Haste // Haste

View file

@ -25,7 +25,6 @@ public final class GhastlyHaunting extends CardImpl {
// this card is the second face of double-faced card // this card is the second face of double-faced card
this.nightCard = true; this.nightCard = true;
this.transformable = true;
// Enchant creature // Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent(); TargetPermanent auraTarget = new TargetCreaturePermanent();

View file

@ -27,7 +27,6 @@ public final class GhostlyCastigator extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.color.setBlue(true); this.color.setBlue(true);
this.transformable = true;
this.nightCard = true; this.nightCard = true;
// Flying // Flying

View file

@ -42,7 +42,6 @@ public final class GideonBattleForged extends CardImpl {
this.color.setWhite(true); this.color.setWhite(true);
this.nightCard = true; this.nightCard = true;
this.transformable = true;
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3)); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3));

View file

@ -47,7 +47,6 @@ public final class GoldenGuardian extends CardImpl {
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = GoldForgeGarrison.class; this.secondSideCardClazz = GoldForgeGarrison.class;
// Defender // Defender

View file

@ -35,7 +35,6 @@ public final class GraveyardGlutton extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.color.setBlack(true); this.color.setBlack(true);
this.nightCard = true; this.nightCard = true;
this.transformable = true;
// WardDiscard a card. // WardDiscard a card.
this.addAbility(new WardAbility(new DiscardCardCost())); this.addAbility(new WardAbility(new DiscardCardCost()));

View file

@ -35,7 +35,6 @@ public final class GraveyardTrespasser extends CardImpl {
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = mage.cards.g.GraveyardGlutton.class; this.secondSideCardClazz = mage.cards.g.GraveyardGlutton.class;
// WardDiscard a card. // WardDiscard a card.

View file

@ -47,7 +47,6 @@ public final class GrimlockDinobotLeader extends CardImpl{
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.transformable = true;
this.secondSideCardClazz = GrimlockFerociousKing.class; this.secondSideCardClazz = GrimlockFerociousKing.class;
// Dinosaurs, Vehicles and other Transformers creatures you control get +2/+0. // Dinosaurs, Vehicles and other Transformers creatures you control get +2/+0.
@ -56,7 +55,7 @@ public final class GrimlockDinobotLeader extends CardImpl{
// {2}: Grimlock, Dinobot Leader becomes Grimlock, Ferocious King. // {2}: Grimlock, Dinobot Leader becomes Grimlock, Ferocious King.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl("{2}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), new ManaCostsImpl("{2}")));
} }
private GrimlockDinobotLeader(final GrimlockDinobotLeader card) { private GrimlockDinobotLeader(final GrimlockDinobotLeader card) {

View file

@ -31,15 +31,14 @@ public final class GrimlockFerociousKing extends CardImpl{
this.color.setGreen(true); this.color.setGreen(true);
this.color.setWhite(true); this.color.setWhite(true);
this.transformable = true; this.nightCard = true;
this.nightCard = true;
// Trample // Trample
this.addAbility(TrampleAbility.getInstance()); this.addAbility(TrampleAbility.getInstance());
// {2}: Grimlock, Ferocious King becomes Grimlock, Dinobot Leader. // {2}: Grimlock, Ferocious King becomes Grimlock, Dinobot Leader.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(false), new ManaCostsImpl("{2}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TransformSourceEffect(), new ManaCostsImpl("{2}")));
} }
private GrimlockFerociousKing(final GrimlockFerociousKing card) { private GrimlockFerociousKing(final GrimlockFerociousKing card) {

View file

@ -32,7 +32,6 @@ public final class GrizzledAngler extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.transformable = true;
this.secondSideCardClazz = GrislyAnglerfish.class; this.secondSideCardClazz = GrislyAnglerfish.class;
// {T}: Put the top two cards of your library into your graveyard. Then if there is a colorless creature card in your graveyard, transform Grizzled Angler. // {T}: Put the top two cards of your library into your graveyard. Then if there is a colorless creature card in your graveyard, transform Grizzled Angler.
@ -78,7 +77,7 @@ class GrizzledAnglerEffect extends OneShotEffect {
if (controller != null) { if (controller != null) {
controller.millCards(2, source, game); controller.millCards(2, source, game);
if (controller.getGraveyard().count(filter, source.getSourceId(), source.getControllerId(), game) >= 1) { if (controller.getGraveyard().count(filter, source.getSourceId(), source.getControllerId(), game) >= 1) {
return new TransformSourceEffect(true).apply(game, source); return new TransformSourceEffect().apply(game, source);
} }
} }
return false; return false;

View file

@ -20,7 +20,6 @@ public final class GrizzledOutcasts extends CardImpl {
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WEREWOLF); this.subtype.add(SubType.WEREWOLF);
this.transformable = true;
this.secondSideCardClazz = mage.cards.k.KrallenhordeWantons.class; this.secondSideCardClazz = mage.cards.k.KrallenhordeWantons.class;
this.power = new MageInt(4); this.power = new MageInt(4);

View file

@ -36,7 +36,6 @@ public final class GrowingRitesOfItlimoc extends CardImpl {
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
this.transformable = true;
this.secondSideCardClazz = mage.cards.i.ItlimocCradleOfTheSun.class; this.secondSideCardClazz = mage.cards.i.ItlimocCradleOfTheSun.class;
// When Growing Rites of Itlimoc enters the battlefield, look at the top four cards of your library. // When Growing Rites of Itlimoc enters the battlefield, look at the top four cards of your library.
@ -47,7 +46,7 @@ public final class GrowingRitesOfItlimoc extends CardImpl {
// At the beginning of your end step, if you control four or more creatures, transform Growing Rites of Itlimoc. // At the beginning of your end step, if you control four or more creatures, transform Growing Rites of Itlimoc.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect(), TargetController.YOU, false),
new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_A_CREATURE, ComparisonType.MORE_THAN, 3), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_A_CREATURE, ComparisonType.MORE_THAN, 3),
"At the beginning of your end step, if you control four or more creatures, transform {this}")); "At the beginning of your end step, if you control four or more creatures, transform {this}"));
} }

View file

@ -27,14 +27,13 @@ public final class HadanasClimb extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{U}");
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
this.transformable = true;
this.secondSideCardClazz = mage.cards.w.WingedTempleOfOrazca.class; this.secondSideCardClazz = mage.cards.w.WingedTempleOfOrazca.class;
// At the beginning of combat on your turn, put a +1/+1 counter on target creature you control. Then if that creature has three or more +1/+1 counters on it, transform Hadana's Climb. // At the beginning of combat on your turn, put a +1/+1 counter on target creature you control. Then if that creature has three or more +1/+1 counters on it, transform Hadana's Climb.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
Ability ability = new BeginningOfCombatTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false); Ability ability = new BeginningOfCombatTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false);
ability.addEffect(new ConditionalOneShotEffect(new TransformSourceEffect(true), new TargetHasCounterCondition(CounterType.P1P1, 3, Integer.MAX_VALUE), ability.addEffect(new ConditionalOneShotEffect(new TransformSourceEffect(), new TargetHasCounterCondition(CounterType.P1P1, 3, Integer.MAX_VALUE),
"Then if that creature has three or more +1/+1 counters on it, transform {this}")); "Then if that creature has three or more +1/+1 counters on it, transform {this}"));
ability.addTarget(new TargetControlledCreaturePermanent()); ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);

Some files were not shown because too many files have changed in this diff Show more