mirror of
https://github.com/correl/mage.git
synced 2025-04-07 17:00:08 -09:00
commit
61a36f10d2
26 changed files with 195 additions and 68 deletions
Mage.Sets/src/mage/cards
b
c
d
e
g
h
i
l
r
s
w
Mage.Tests/src/test/java/org/mage/test/cards/continuous
Mage/src/main/java/mage/abilities/common
|
@ -51,10 +51,10 @@ public class BlackcleaveCliffs extends CardImpl {
|
|||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||
|
||||
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));
|
||||
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 BlackManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
|
|
@ -49,11 +49,11 @@ import mage.filter.common.FilterLandPermanent;
|
|||
public class BloomingMarsh extends CardImpl {
|
||||
|
||||
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.
|
||||
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));
|
||||
|
||||
// {T}: Add {B} or {G} to your mana pool.
|
||||
|
|
|
@ -49,11 +49,11 @@ import mage.filter.common.FilterLandPermanent;
|
|||
public class BotanicalSanctum extends CardImpl {
|
||||
|
||||
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.
|
||||
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));
|
||||
|
||||
// {T}: Add {G} or {U} to your mana pool.
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.MageObject;
|
|||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.ChooseColorEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
|
@ -58,7 +58,7 @@ public class CircleOfAffliction extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
|
||||
|
||||
// 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.
|
||||
Ability ability = new CircleOfAfflictionTriggeredAbility();
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ClifftopRetreat extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
|
||||
|
||||
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 RedManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
|
|
@ -49,11 +49,11 @@ import mage.filter.StaticFilters;
|
|||
public class ConcealedCourtyard extends CardImpl {
|
||||
|
||||
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.
|
||||
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));
|
||||
|
||||
// {T}: Add {W} or {B} to your mana pool.this.addAbility(new BlackManaAbility());
|
||||
|
|
|
@ -47,12 +47,13 @@ import mage.filter.StaticFilters;
|
|||
* @author maurer.it_at_gmail.com
|
||||
*/
|
||||
public class CopperlineGorge extends CardImpl {
|
||||
|
||||
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.
|
||||
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 RedManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -51,24 +50,24 @@ import mage.filter.predicate.permanent.AnotherPredicate;
|
|||
public class DarkslickShores extends CardImpl {
|
||||
|
||||
private final static FilterLandPermanent filter = new FilterLandPermanent();
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public DarkslickShores (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
|
||||
public DarkslickShores(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
|
||||
|
||||
// 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));
|
||||
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 BlueManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
}
|
||||
|
||||
public DarkslickShores (final DarkslickShores card) {
|
||||
public DarkslickShores(final DarkslickShores card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
* 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
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -59,10 +58,10 @@ public class DragonskullSummit extends CardImpl {
|
|||
}
|
||||
|
||||
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));
|
||||
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 BlackManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -59,10 +58,10 @@ public class DrownedCatacomb extends CardImpl {
|
|||
}
|
||||
|
||||
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));
|
||||
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 BlackManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -40,6 +39,7 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.TargetPlayer;
|
||||
|
@ -50,19 +50,19 @@ import mage.target.TargetPlayer;
|
|||
*/
|
||||
public class EtchedMonstrosity extends CardImpl {
|
||||
|
||||
public EtchedMonstrosity (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}");
|
||||
this.subtype.add("Golem");
|
||||
public EtchedMonstrosity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
|
||||
this.subtype.add(SubType.GOLEM);
|
||||
this.power = 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.addCost(new RemoveCountersSourceCost(CounterType.M1M1.createInstance(5)));
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public EtchedMonstrosity (final EtchedMonstrosity card) {
|
||||
public EtchedMonstrosity(final EtchedMonstrosity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -59,10 +58,10 @@ public class GlacialFortress extends CardImpl {
|
|||
}
|
||||
|
||||
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));
|
||||
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 BlueManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -57,7 +56,7 @@ public class GreenwheelLiberator extends CardImpl {
|
|||
// permanent you controlled left the battlefield this turn.
|
||||
Ability ability = new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), false, RevoltCondition.instance,
|
||||
"<i>Revolt</i> — enters the battlefield with two +1/+1 counters on it if a permanent you controlled left the battlefield this turn", null);
|
||||
"<i>Revolt</i> — {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());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
* 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
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.cards.h;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -58,10 +57,10 @@ public class HinterlandHarbor extends CardImpl {
|
|||
}
|
||||
|
||||
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));
|
||||
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 GreenManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
|
|
@ -52,7 +52,7 @@ public class InspiringVantage extends CardImpl {
|
|||
|
||||
// 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));
|
||||
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));
|
||||
|
||||
// {T}: Add {R} or {W} to your mana pool.
|
||||
|
|
|
@ -61,7 +61,7 @@ public class IsolatedChapel extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
|
||||
|
||||
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 WhiteManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
|
|
|
@ -32,8 +32,8 @@ import mage.MageInt;
|
|||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.DealsCombatDamageTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -61,13 +61,13 @@ import mage.util.CardUtil;
|
|||
public class LivingLore extends CardImpl {
|
||||
|
||||
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.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// 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.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new LivingLoreSetPowerToughnessSourceEffect()));
|
||||
|
|
|
@ -49,10 +49,10 @@ import mage.filter.StaticFilters;
|
|||
public class RazorvergeThicket extends CardImpl {
|
||||
|
||||
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));
|
||||
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 GreenManaAbility());
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
* 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
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -59,10 +58,10 @@ public class RootboundCrag extends CardImpl {
|
|||
}
|
||||
|
||||
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));
|
||||
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 RedManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
|
|
@ -47,12 +47,13 @@ import mage.filter.StaticFilters;
|
|||
* @author maurer.it_at_gmail.com
|
||||
*/
|
||||
public class SeachromeCoast extends CardImpl {
|
||||
|
||||
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.
|
||||
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));
|
||||
|
||||
// {T}: Add {W} or {U} to your mana pool.
|
||||
|
|
|
@ -49,11 +49,11 @@ import mage.filter.StaticFilters;
|
|||
public class SpirebluffCanal extends CardImpl {
|
||||
|
||||
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.
|
||||
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));
|
||||
|
||||
// {T}: Add {U} or {R} to your mana pool.
|
||||
|
|
|
@ -61,7 +61,7 @@ public class SulfurFalls extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
|
||||
|
||||
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 BlueManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
* 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
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -59,10 +58,10 @@ public class SunpetalGrove extends CardImpl {
|
|||
}
|
||||
|
||||
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));
|
||||
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 GreenManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
* 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
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.cards.w;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -58,10 +57,10 @@ public class WoodlandCemetery extends CardImpl {
|
|||
}
|
||||
|
||||
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));
|
||||
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 BlackManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
|
|
@ -82,7 +82,7 @@ public class SubTypeChangingEffectsTest extends CardTestPlayerBase {
|
|||
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 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,6 +108,7 @@ public class EntersBattlefieldAbility extends StaticAbility {
|
|||
if (abilityRule != null && !abilityRule.isEmpty()) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue