Merge pull request #3962 from theelk801/master

various changes
This commit is contained in:
theelk801 2017-09-09 10:49:15 -04:00 committed by GitHub
commit 61a36f10d2
26 changed files with 195 additions and 68 deletions

View file

@ -51,10 +51,10 @@ public class BlackcleaveCliffs extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent(); private static final FilterLandPermanent filter = new FilterLandPermanent();
public BlackcleaveCliffs(UUID ownerId, CardSetInfo setInfo) { public BlackcleaveCliffs(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());

View file

@ -49,11 +49,11 @@ import mage.filter.common.FilterLandPermanent;
public class BloomingMarsh extends CardImpl { public class BloomingMarsh extends CardImpl {
public BloomingMarsh(UUID ownerId, CardSetInfo setInfo) { public BloomingMarsh(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},""); super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Blooming Marsh enters the battlefield tapped unless you control two or fewer other lands. // Blooming Marsh enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
// {T}: Add {B} or {G} to your mana pool. // {T}: Add {B} or {G} to your mana pool.

View file

@ -49,11 +49,11 @@ import mage.filter.common.FilterLandPermanent;
public class BotanicalSanctum extends CardImpl { public class BotanicalSanctum extends CardImpl {
public BotanicalSanctum(UUID ownerId, CardSetInfo setInfo) { public BotanicalSanctum(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},""); super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Botanical Sanctum enters the battlefield tapped unless you control two or fewer other lands. // Botanical Sanctum enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
// {T}: Add {G} or {U} to your mana pool. // {T}: Add {G} or {U} to your mana pool.

View file

@ -32,7 +32,7 @@ import mage.MageObject;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.ChooseColorEffect; import mage.abilities.effects.common.ChooseColorEffect;
import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.DoIfCostPaid;
@ -58,7 +58,7 @@ public class CircleOfAffliction extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
// As Circle of Affliction enters the battlefield, choose a color. // As Circle of Affliction enters the battlefield, choose a color.
this.addAbility(new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral))); this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral)));
// Whenever a source of the chosen color deals damage to you, you may pay {1}. If you do, target player loses 1 life and you gain 1 life. // Whenever a source of the chosen color deals damage to you, you may pay {1}. If you do, target player loses 1 life and you gain 1 life.
Ability ability = new CircleOfAfflictionTriggeredAbility(); Ability ability = new CircleOfAfflictionTriggeredAbility();

View file

@ -61,7 +61,7 @@ public class ClifftopRetreat extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Mountain or a Plains"; String abilityText = " tapped unless you control a Mountain or a Plains";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());

View file

@ -49,11 +49,11 @@ import mage.filter.StaticFilters;
public class ConcealedCourtyard extends CardImpl { public class ConcealedCourtyard extends CardImpl {
public ConcealedCourtyard(UUID ownerId, CardSetInfo setInfo) { public ConcealedCourtyard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},""); super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Concealed Courtyard enters the battlefield tapped unless you control two or fewer other lands. // Concealed Courtyard enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
// {T}: Add {W} or {B} to your mana pool.this.addAbility(new BlackManaAbility()); // {T}: Add {W} or {B} to your mana pool.this.addAbility(new BlackManaAbility());

View file

@ -47,12 +47,13 @@ import mage.filter.StaticFilters;
* @author maurer.it_at_gmail.com * @author maurer.it_at_gmail.com
*/ */
public class CopperlineGorge extends CardImpl { public class CopperlineGorge extends CardImpl {
public CopperlineGorge(UUID ownerId, CardSetInfo setInfo) { public CopperlineGorge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
// Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands. // Copperline Gorge enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control two or fewer other lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID; import java.util.UUID;
@ -56,19 +55,19 @@ public class DarkslickShores extends CardImpl {
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }
public DarkslickShores (UUID ownerId, CardSetInfo setInfo) { public DarkslickShores(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
// Darkslick Shores enters the battlefield tapped unless you control two or fewer other lands. // Darkslick Shores enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control two or fewer other lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());
} }
public DarkslickShores (final DarkslickShores card) { public DarkslickShores(final DarkslickShores card) {
super(card); super(card);
} }

View file

@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the * The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.d; package mage.cards.d;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -59,10 +58,10 @@ public class DragonskullSummit extends CardImpl {
} }
public DragonskullSummit(UUID ownerId, CardSetInfo setInfo) { public DragonskullSummit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tapped unless you control a Swamp or a Mountain"; String abilityText = " tapped unless you control a Swamp or a Mountain";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.d; package mage.cards.d;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -59,10 +58,10 @@ public class DrownedCatacomb extends CardImpl {
} }
public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) { public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Island or a Swamp"; String abilityText = " tapped unless you control a Island or a Swamp";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.e; package mage.cards.e;
import java.util.UUID; import java.util.UUID;
@ -40,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
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.Zone; import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
@ -50,19 +50,19 @@ import mage.target.TargetPlayer;
*/ */
public class EtchedMonstrosity extends CardImpl { public class EtchedMonstrosity extends CardImpl {
public EtchedMonstrosity (UUID ownerId, CardSetInfo setInfo) { public EtchedMonstrosity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
this.subtype.add("Golem"); this.subtype.add(SubType.GOLEM);
this.power = new MageInt(10); this.power = new MageInt(10);
this.toughness = new MageInt(10); this.toughness = new MageInt(10);
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(5)), "{this} gets five -1/-1 counters")); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(5)), " with five -1/-1 counters on it"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(3), new ManaCostsImpl("{W}{U}{B}{R}{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(3), new ManaCostsImpl("{W}{U}{B}{R}{G}"));
ability.addCost(new RemoveCountersSourceCost(CounterType.M1M1.createInstance(5))); ability.addCost(new RemoveCountersSourceCost(CounterType.M1M1.createInstance(5)));
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(ability); this.addAbility(ability);
} }
public EtchedMonstrosity (final EtchedMonstrosity card) { public EtchedMonstrosity(final EtchedMonstrosity card) {
super(card); super(card);
} }

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.g; package mage.cards.g;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -59,10 +58,10 @@ public class GlacialFortress extends CardImpl {
} }
public GlacialFortress(UUID ownerId, CardSetInfo setInfo) { public GlacialFortress(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Plains or an Island"; String abilityText = " tapped unless you control a Plains or an Island";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.g; package mage.cards.g;
import java.util.UUID; import java.util.UUID;
@ -57,7 +56,7 @@ public class GreenwheelLiberator extends CardImpl {
// permanent you controlled left the battlefield this turn. // permanent you controlled left the battlefield this turn.
Ability ability = new EntersBattlefieldAbility( Ability ability = new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), false, RevoltCondition.instance, new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), false, RevoltCondition.instance,
"<i>Revolt</i> &mdash; enters the battlefield with two +1/+1 counters on it if a permanent you controlled left the battlefield this turn", null); "<i>Revolt</i> &mdash; {this} enters the battlefield with two +1/+1 counters on it if a permanent you controlled left the battlefield this turn", null);
ability.addWatcher(new RevoltWatcher()); ability.addWatcher(new RevoltWatcher());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the * The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.h; package mage.cards.h;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -58,10 +57,10 @@ public class HinterlandHarbor extends CardImpl {
} }
public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) { public HinterlandHarbor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tapped unless you control a Forest or an Island"; String abilityText = " tapped unless you control a Forest or an Island";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());

View file

@ -52,7 +52,7 @@ public class InspiringVantage extends CardImpl {
// Inspiring Vantage enters the battlefield tapped unless you control two or fewer other lands. // Inspiring Vantage enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
// {T}: Add {R} or {W} to your mana pool. // {T}: Add {R} or {W} to your mana pool.

View file

@ -61,7 +61,7 @@ public class IsolatedChapel extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Plains or a Swamp"; String abilityText = " tapped unless you control a Plains or a Swamp";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());

View file

@ -32,8 +32,8 @@ import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.MageObjectReference; import mage.MageObjectReference;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.DealsCombatDamageTriggeredAbility; import mage.abilities.common.DealsCombatDamageTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -61,13 +61,13 @@ import mage.util.CardUtil;
public class LivingLore extends CardImpl { public class LivingLore extends CardImpl {
public LivingLore(UUID ownerId, CardSetInfo setInfo) { public LivingLore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add("Avatar"); this.subtype.add("Avatar");
this.power = new MageInt(0); this.power = new MageInt(0);
this.toughness = new MageInt(0); this.toughness = new MageInt(0);
// As Living Lore enters the battlefield, exile an instant or sorcery card from your graveyard. // As Living Lore enters the battlefield, exile an instant or sorcery card from your graveyard.
this.addAbility(new EntersBattlefieldAbility(new LivingLoreExileEffect(), "exile an instant or sorcery card from your graveyard")); this.addAbility(new AsEntersBattlefieldAbility(new LivingLoreExileEffect(), "exile an instant or sorcery card from your graveyard"));
// Living Lore's power and toughness are each equal to the exiled card's converted mana cost. // Living Lore's power and toughness are each equal to the exiled card's converted mana cost.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new LivingLoreSetPowerToughnessSourceEffect())); this.addAbility(new SimpleStaticAbility(Zone.ALL, new LivingLoreSetPowerToughnessSourceEffect()));

View file

@ -49,10 +49,10 @@ import mage.filter.StaticFilters;
public class RazorvergeThicket extends CardImpl { public class RazorvergeThicket extends CardImpl {
public RazorvergeThicket(UUID ownerId, CardSetInfo setInfo) { public RazorvergeThicket(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
String abilityText = "tap it unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());

View file

@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the * The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.r; package mage.cards.r;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -59,10 +58,10 @@ public class RootboundCrag extends CardImpl {
} }
public RootboundCrag(UUID ownerId, CardSetInfo setInfo) { public RootboundCrag(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Mountain or a Forest"; String abilityText = " tapped unless you control a Mountain or a Forest";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());

View file

@ -47,12 +47,13 @@ import mage.filter.StaticFilters;
* @author maurer.it_at_gmail.com * @author maurer.it_at_gmail.com
*/ */
public class SeachromeCoast extends CardImpl { public class SeachromeCoast extends CardImpl {
public SeachromeCoast(UUID ownerId, CardSetInfo setInfo) { public SeachromeCoast(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
// Seachrome Coast enters the battlefield tapped unless you control two or fewer other lands. // Seachrome Coast enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
String abilityText = "tap it unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
// {T}: Add {W} or {U} to your mana pool. // {T}: Add {W} or {U} to your mana pool.

View file

@ -49,11 +49,11 @@ import mage.filter.StaticFilters;
public class SpirebluffCanal extends CardImpl { public class SpirebluffCanal extends CardImpl {
public SpirebluffCanal(UUID ownerId, CardSetInfo setInfo) { public SpirebluffCanal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},""); super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Spirebluff Canal enters the battlefield tapped unless you control two or fewer other lands. // Spirebluff Canal enters the battlefield tapped unless you control two or fewer other lands.
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.FEWER_THAN, 3));
String abilityText = "tapped unless you control fewer than 3 lands"; String abilityText = " tapped unless you control two or fewer other lands";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
// {T}: Add {U} or {R} to your mana pool. // {T}: Add {U} or {R} to your mana pool.

View file

@ -61,7 +61,7 @@ public class SulfurFalls extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Island or a Mountain"; String abilityText = " tapped unless you control a Island or a Mountain";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());
this.addAbility(new RedManaAbility()); this.addAbility(new RedManaAbility());

View file

@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the * The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.s; package mage.cards.s;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -59,10 +58,10 @@ public class SunpetalGrove extends CardImpl {
} }
public SunpetalGrove(UUID ownerId, CardSetInfo setInfo) { public SunpetalGrove(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Forest or a Plains"; String abilityText = " tapped unless you control a Forest or a Plains";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());
this.addAbility(new WhiteManaAbility()); this.addAbility(new WhiteManaAbility());

View file

@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the * The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed * authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com. * or implied, of BetaSteward_at_googlemail.com.
*/ */
package mage.cards.w; package mage.cards.w;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
@ -58,10 +57,10 @@ public class WoodlandCemetery extends CardImpl {
} }
public WoodlandCemetery(UUID ownerId, CardSetInfo setInfo) { public WoodlandCemetery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter));
String abilityText = "tap it unless you control a Swamp or a Forest"; String abilityText = " tapped unless you control a Swamp or a Forest";
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());
this.addAbility(new GreenManaAbility()); this.addAbility(new GreenManaAbility());

View file

@ -82,7 +82,7 @@ public class SubTypeChangingEffectsTest extends CardTestPlayerBase {
for (Card card : playerB.getLibrary().getCards(currentGame)) { for (Card card : playerB.getLibrary().getCards(currentGame)) {
if (card.isCreature()) { if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC)); Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAR type", true, card.getSubtype(currentGame).contains(SubType.ORC)); Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
} }
} }
@ -171,4 +171,137 @@ public class SubTypeChangingEffectsTest extends CardTestPlayerBase {
} }
} }
@Test
public void testArcaneAdaptationGiveType() {
// As Arcane Adaptation enters the battlefield, choose a creature type.
// Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield.
addCard(Zone.HAND, playerA, "Arcane Adaptation", 1); // Enchantment {2}{U}
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
addCard(Zone.HAND, playerA, "Silvercoat Lion");
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion");
addCard(Zone.HAND, playerB, "Silvercoat Lion");
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Arcane Adaptation");
setChoice(playerA, "Orc");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, "Arcane Adaptation", 1);
Permanent silvercoatLion = getPermanent("Silvercoat Lion", playerA);
Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT));
Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC));
silvercoatLion = getPermanent("Silvercoat Lion", playerB);
Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT));
Assert.assertEquals(false, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC));
for (Card card : playerA.getLibrary().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
for (Card card : playerB.getLibrary().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
for (Card card : playerA.getHand().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
for (Card card : playerB.getHand().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
for (Card card : playerA.getGraveyard().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should have ORC type", true, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
for (Card card : playerB.getGraveyard().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
}
/**
* Arcane Adaptation doesn't revert creature types of non-permanent cards
* when it leaves the battlefield
*/
@Test
public void testArcaneAdaptationIsRestCorrectly() {
// As Arcane Adaptation enters the battlefield, choose a creature type.
// Creatures you control are the chosen type in addition to their other types. The same is true for creature spells you control and creature cards you own that aren't on the battlefield.
addCard(Zone.HAND, playerA, "Arcane Adaptation", 1); // Enchantment {2}{U}
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
addCard(Zone.HAND, playerA, "Silvercoat Lion");
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion");
addCard(Zone.HAND, playerB, "Disenchant", 1); // Instant
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
addCard(Zone.HAND, playerB, "Silvercoat Lion");
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Arcane Adaptation");
setChoice(playerA, "Orc");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Disenchant", "Arcane Adaptation");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertGraveyardCount(playerA, "Arcane Adaptation", 1);
assertGraveyardCount(playerB, "Disenchant", 1);
Permanent silvercoatLion = getPermanent("Silvercoat Lion", playerA);
Assert.assertEquals(true, silvercoatLion.getSubtype(currentGame).contains(SubType.CAT));
Assert.assertEquals(false, silvercoatLion.getSubtype(currentGame).contains(SubType.ORC));
for (Card card : playerA.getLibrary().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
for (Card card : playerA.getHand().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
for (Card card : playerA.getGraveyard().getCards(currentGame)) {
if (card.isCreature()) {
Assert.assertEquals(card.getName() + " should not have ORC type", false, card.getSubtype(currentGame).contains(SubType.ORC));
Assert.assertEquals(card.getName() + " should have CAT type", true, card.getSubtype(currentGame).contains(SubType.CAT));
}
}
}
} }

View file

@ -108,6 +108,7 @@ public class EntersBattlefieldAbility extends StaticAbility {
if (abilityRule != null && !abilityRule.isEmpty()) { if (abilityRule != null && !abilityRule.isEmpty()) {
return abilityRule; return abilityRule;
} }
return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield" + super.getRule(); String superRule = super.getRule();
return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield" + (superRule.charAt(0) == ' ' ? "" : " ") + superRule;
} }
} }