Merge remote-tracking branch 'magefree/master'

This commit is contained in:
JotaPeRL 2015-03-12 23:46:02 -04:00
commit d135cd34b9
147 changed files with 4012 additions and 473 deletions

View file

@ -30,14 +30,14 @@
<artifactId>jspf-core</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>

View file

@ -14,6 +14,7 @@ import javax.swing.*;
import java.awt.*;
import java.net.URL;
import java.util.ArrayList;
import mage.constants.Rarity;
import org.mage.plugins.card.utils.impl.ImageManagerImpl;
public class GuiDisplayUtil {
@ -221,21 +222,27 @@ public class GuiDisplayUtil {
}
buffer.append(getTypes(card));
buffer.append("</td><td align='right'>");
switch (card.getRarity()) {
case RARE:
buffer.append("<b color='#FFBF00'>");
break;
case UNCOMMON:
buffer.append("<b color='silver'>");
break;
case COMMON:
buffer.append("<b color='black'>");
break;
case MYTHIC:
buffer.append("<b color='#D5330B'>");
break;
String rarity ;
if (card.getRarity() == null) {
rarity = Rarity.COMMON.getCode();
buffer.append("<b color='black'>");
}else {
switch (card.getRarity()) {
case RARE:
buffer.append("<b color='#FFBF00'>");
break;
case UNCOMMON:
buffer.append("<b color='silver'>");
break;
case COMMON:
buffer.append("<b color='black'>");
break;
case MYTHIC:
buffer.append("<b color='#D5330B'>");
break;
}
rarity = card.getRarity().getCode();
}
String rarity = card.getRarity().getCode();
if (card.getExpansionSetCode() != null) {
buffer.append(ManaSymbols.replaceSetCodeWithHTML(card.getExpansionSetCode().toUpperCase(), rarity));
}

View file

@ -721,13 +721,13 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
private BufferedImage getFaceDownImage() {
if (isPermanent) {
if (gameCard.isMorphCard() && ((PermanentView) gameCard).isMorphed()) {
if (((PermanentView) gameCard).isMorphed()) {
return ImageCache.getMorphImage();
} else {
return ImageCache.getManifestImage();
}
} else {
if (gameCard.isMorphCard() && this.gameCard instanceof StackAbilityView) {
if (this.gameCard instanceof StackAbilityView) {
return ImageCache.getMorphImage();
} else {
return ImageCache.loadImage(new TFile(DirectLinksForDownload.outDir + File.separator + DirectLinksForDownload.cardbackFilename));

View file

@ -90,7 +90,7 @@ public class CardPluginImpl implements CardPlugin {
@Override
public MagePermanent getMageCard(CardView permanent, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil, boolean loadImage) {
CardPanel cardPanel = new CardPanel(permanent, gameId, loadImage, callback, false, dimension);
boolean implemented = !permanent.getRarity().equals(Rarity.NA);
boolean implemented = permanent.getRarity() != null && !permanent.getRarity().equals(Rarity.NA);
cardPanel.setShowCastingCost(implemented);
return cardPanel;
}

View file

@ -31,7 +31,11 @@ package org.mage.plugins.card.dl.sources;
import org.mage.plugins.card.images.CardDownloadData;
/**
*
* Site was shutdown by wizards Feb. 2015
*
*
*
*
* @author LevelX2
*/

View file

@ -140,7 +140,7 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
p0.add(jLabel1);
p0.add(Box.createVerticalStrut(5));
ComboBoxModel jComboBox1Model = new DefaultComboBoxModel(new String[] { "magiccards.info", "wizards.com", "mtgimage.com (HQ)" /*, "mtgathering.ru HQ", "mtgathering.ru MQ", "mtgathering.ru LQ"*/});
ComboBoxModel jComboBox1Model = new DefaultComboBoxModel(new String[] { "magiccards.info", "wizards.com"/*, "mtgimage.com (HQ)" , "mtgathering.ru HQ", "mtgathering.ru MQ", "mtgathering.ru LQ"*/});
jComboBox1 = new JComboBox();
cardImageSource = MagicCardsImageSource.getInstance();
@ -158,9 +158,6 @@ public class DownloadPictures extends DefaultBoundedRangeModel implements Runnab
case 1:
cardImageSource = WizardCardsImageSource.getInstance();
break;
case 2:
cardImageSource = MtgImageSource.getInstance();
break;
}
int count = DownloadPictures.this.cards.size();
float mb = (count * cardImageSource.getAverageSize()) / 1024;

View file

@ -11,9 +11,14 @@
#|Generate|TOK:PTC|Wolf|
#|Generate|TOK:PTC|Wurm|
$|Generate|TOK:DTK|Djinn Monk|
$|Generate|TOK:DTK|Goblin|
$|Generate|TOK:DTK|Zombie|
#|Generate|TOK:DTK|Djinn Monk|
#|Generate|TOK:DTK|Dragon|
#|Generate|TOK:DTK|Goblin|
#|Generate|TOK:DTK|Morph|
#|Generate|TOK:DTK|Warrior|
#|Generate|TOK:DTK|Zombie|
#|Generate|TOK:DTK|Zombie Horror|
#|Generate|EMBLEM!:DTK|Emblem Narset Transcendent|
#|Generate|TOK:GRC|Bird|
#|Generate|TOK:GRC|Golem|
@ -28,7 +33,7 @@ $|Generate|TOK:DTK|Zombie|
#|Generate|TOK:MBP|Goblin|
#|Generate|TOK:MBP|Zombie|
$|Generate|TOK:MLP|Thopter|
#|Generate|TOK:MLP|Thopter|
#|Generate|TOK:WMCQ|Angel|
@ -46,6 +51,8 @@ $|Generate|TOK:MLP|Thopter|
#|Generate|TOK:MGDC|Sliver|
#|Generate|TOK:FNMP|Centaur|
|Generate|TOK:FNMP|Human|
|Generate|TOK:FNMP|Wolf|
#|Generate|TOK:FNMP|Wurm|
|Generate|TOK:DDN|Goblin|
@ -175,6 +182,7 @@ $|Generate|TOK:MLP|Thopter|
|Generate|TOK:RTR|Assassin|
|Generate|TOK:RTR|Dragon|
|Generate|TOK:RTR|Goblin|
|Generate|TOK:RTR|Centaur 1|
|Generate|TOK:RTR|Ooze|
|Generate|TOK:RTR|Rhino|
|Generate|TOK:RTR|Saproling|

View file

@ -87,7 +87,7 @@ public class CardView extends SimpleCardView {
protected boolean transformed;
protected boolean flipCard;
protected boolean morphCard;
protected boolean faceDown;
protected String alternateName;
protected String originalName;
@ -134,17 +134,16 @@ public class CardView extends SimpleCardView {
*
* @param card
* @param game
* @param cardId
* @param cardId not used?
* @param controlled is the card view created for the card controller - used for morph / face down cards to know which player may see information for the card
*/
public CardView(Card card, Game game, UUID cardId, boolean controlled) {
super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.isFaceDown(), card.getUsesVariousArt(), card.getTokenSetCode());
this.morphCard = card.isMorphCard();
super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode());
// no information available for face down cards as long it's not a controlled face down morph card
// TODO: Better handle this in Framework (but currently I'm not sure how to do it there) LevelX2
if (card.isFaceDown()) {
if (card.isFaceDown(game)) {
this.fillEmpty(card, controlled);
if (card.isMorphCard() && card instanceof Spell) {
if (card instanceof Spell) {
// special handling for casting of Morph cards
if (controlled) {
this.name = card.getName();
@ -198,7 +197,11 @@ public class CardView extends SimpleCardView {
this.name = card.getImageName();
this.displayName = card.getName();
this.rules = card.getRules(game);
if (game == null) {
this.rules = card.getRules();
} else {
this.rules = card.getRules(game);
}
this.manaCost = card.getManaCost().getSymbols();
this.convertedManaCost = card.getManaCost().convertedManaCost();
@ -238,7 +241,7 @@ public class CardView extends SimpleCardView {
this.color = card.getColor();
this.canTransform = card.canTransform();
this.flipCard = card.isFlipCard();
this.faceDown = game != null ? card.isFaceDown(game) : false;
if (card instanceof PermanentToken) {
this.isToken = true;
@ -295,7 +298,7 @@ public class CardView extends SimpleCardView {
}
public CardView(MageObject object) {
super(object.getId(), "", 0, false, false, "");
super(object.getId(), "", 0, false, "");
this.name = object.getName();
this.displayName = object.getName();
if (object instanceof Permanent) {
@ -339,7 +342,7 @@ public class CardView extends SimpleCardView {
}
protected CardView() {
super(null, "", 0, false, false, "");
super(null, "", 0, false, "");
}
public CardView(EmblemView emblem) {
@ -355,7 +358,7 @@ public class CardView extends SimpleCardView {
}
public CardView(boolean empty) {
super(null, "", 0, false, false, "");
super(null, "", 0, false, "");
if (!empty) {
throw new IllegalArgumentException("Not supported.");
}
@ -413,7 +416,7 @@ public class CardView extends SimpleCardView {
}
CardView(Token token) {
super(token.getId(), "", 0, false, false, "");
super(token.getId(), "", 0, false, "");
this.isToken = true;
this.id = token.getId();
this.name = token.getName();
@ -577,7 +580,6 @@ public class CardView extends SimpleCardView {
return getName() + " [" + getId() + "]";
}
@Override
public boolean isFaceDown() {
return faceDown;
}
@ -692,10 +694,6 @@ public class CardView extends SimpleCardView {
return flipCard;
}
public boolean isMorphCard() {
return morphCard;
}
public boolean isToRotate() {
return rotate;
}

View file

@ -27,22 +27,20 @@
*/
package mage.view;
import java.io.Serializable;
import mage.cards.Card;
import mage.constants.MageObjectType;
import mage.game.Game;
import mage.game.command.Commander;
import java.io.Serializable;
/**
*
* @author Plopman
*/
public class CommanderView extends CardView implements CommandObjectView, Serializable{
public CommanderView(Commander commander, Card sourceCard) {
super(sourceCard);
public CommanderView(Commander commander, Card sourceCard, Game game) {
super(sourceCard, game, null, false);
this.mageObjectType = MageObjectType.COMMANDER;
}
}
}

View file

@ -46,7 +46,7 @@ public class LookedAtView implements Serializable {
public LookedAtView(String name, Cards cards, Game game) {
this.name = name;
for (Card card: cards.getCards(game)) {
this.cards.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.isFaceDown(), card.getTokenSetCode()));
this.cards.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode()));
}
}

View file

@ -84,10 +84,7 @@ public class PermanentView extends CardView {
} else {
if (card != null) {
// original may not be face down
boolean wasfaceDown = card.isFaceDown();
card.setFaceDown(false);
original = new CardView(card);
card.setFaceDown(wasfaceDown);
} else {
original = null;
}
@ -119,7 +116,7 @@ public class PermanentView extends CardView {
this.nameOwner = "";
}
if (permanent.isFaceDown() && card != null) {
if (permanent.isFaceDown(game) && card != null) {
if (controlled){
// must be a morphed or manifested card
for (Ability permanentAbility : permanent.getAbilities()) {

View file

@ -132,7 +132,7 @@ public class PlayerView implements Serializable {
if(commander.getControllerId().equals(this.playerId)){
Card sourceCard = game.getCard(commander.getSourceId());
if(sourceCard != null){
commandList.add(new CommanderView(commander, sourceCard));
commandList.add(new CommanderView(commander, sourceCard, game));
}
}
}

View file

@ -45,7 +45,7 @@ public class RevealedView implements Serializable {
public RevealedView(String name, Cards cards, Game game) {
this.name = name;
for (Card card: cards.getCards(game)) {
this.cards.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.isFaceDown(), card.getTokenSetCode()));
this.cards.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode()));
}
}

View file

@ -40,14 +40,12 @@ public class SimpleCardView implements Serializable {
protected String expansionSetCode;
protected String tokenSetCode;
protected int cardNumber;
protected boolean faceDown;
protected boolean usesVariousArt;
public SimpleCardView(UUID id, String expansionSetCode, int cardNumber, boolean faceDown, boolean usesVariousArt, String tokenSetCode) {
public SimpleCardView(UUID id, String expansionSetCode, int cardNumber, boolean usesVariousArt, String tokenSetCode) {
this.id = id;
this.expansionSetCode = expansionSetCode;
this.cardNumber = cardNumber;
this.faceDown = faceDown;
this.usesVariousArt = usesVariousArt;
this.tokenSetCode = tokenSetCode;
}
@ -64,10 +62,6 @@ public class SimpleCardView implements Serializable {
return cardNumber;
}
public boolean isFaceDown() {
return faceDown;
}
public boolean getUsesVariousArt() {
return usesVariousArt;
}

View file

@ -44,7 +44,7 @@ public class SimpleCardsView extends LinkedHashMap<UUID, SimpleCardView> {
public SimpleCardsView(Collection<Card> cards) {
for (Card card: cards) {
this.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.isFaceDown(), card.getUsesVariousArt(), card.getTokenSetCode()));
this.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode()));
}
}

View file

@ -74,7 +74,7 @@ public class StackAbilityView extends CardView {
this.power = ability.getPower().toString();
this.toughness = ability.getToughness().toString();
String nameToShow;
if (sourceCard.isMorphCard() && sourceCard.isFaceDown()) {
if (sourceCard.isFaceDown()) {
CardView tmpSourceCard = this.getSourceCard();
tmpSourceCard.displayName = "Face Down";
tmpSourceCard.superTypes.clear();

View file

@ -38,6 +38,7 @@ import mage.cards.decks.Deck;
import mage.cards.decks.DeckValidator;
import mage.constants.CardType;
import mage.filter.FilterMana;
import mage.game.GameTinyLeadersImpl;
import mage.util.CardUtil;
/**
@ -121,6 +122,7 @@ public class TinyLeaders extends DeckValidator {
List<String> basicLandNames = new ArrayList<>(Arrays.asList("Forest", "Island", "Mountain", "Swamp", "Plains",
"Snow-Covered Forest", "Snow-Covered Island", "Snow-Covered Mountain", "Snow-Covered Swamp", "Snow-Covered Plains"));
Map<String, Integer> counts = new HashMap<>();
counts.put(deck.getName(), 1); // add the commander to the counts, so it can't be in the deck or sideboard again
countCards(counts, deck.getCards());
countCards(counts, deck.getSideboard());
for (Map.Entry<String, Integer> entry : counts.entrySet()) {
@ -139,15 +141,8 @@ public class TinyLeaders extends DeckValidator {
}
}
if (deck.getSideboard().size() <= 11) {
Card commander = null;
for (Card card : deck.getSideboard()) {
if (card.getName().equalsIgnoreCase(deck.getName())) {
commander = card;
}
}
if (deck.getSideboard().size() <= 10) {
Card commander = GameTinyLeadersImpl.getCommanderCard(deck.getName(), null);
/**
* 905.5b - Each card must have a converted mana cost of three of less.
* Cards with {X} in their mana cost count X as zero.
@ -156,10 +151,10 @@ public class TinyLeaders extends DeckValidator {
if (commander == null || commander.getManaCost().convertedManaCost() > 3) {
if (commander == null) {
invalid.put("Leader", "Please be sure to set your leader in the NAME field in the DECK EDITOR");
invalid.put("Leader", "Please be sure to set your leader in the NAME field in the DECK EDITOR (use the names Mardu, Sultai or Jeskai as default Commanders)");
}
if (commander != null && commander.getManaCost().convertedManaCost() > 3) {
invalid.put("Leader", "Commander CMC is Greater than 3");
invalid.put("Leader", "Commanders converted mana cost is greater than 3");
}
return false;
}
@ -188,7 +183,7 @@ public class TinyLeaders extends DeckValidator {
valid = false;
}
} else {
invalid.put("Commander", "Sideboard must contain only the commander and a maximum of 10 sideboard cards");
invalid.put("Commander", "Sideboard must contain only a maximum of 10 sideboard cards (the Tiny Leader name must be written to the deck name)");
valid = false;
}

View file

@ -575,7 +575,7 @@ public class HumanPlayer extends PlayerImpl {
if (object != null) {
Zone zone = game.getState().getZone(object.getId());
if (zone != null) {
if (object instanceof Card && ((Card) object).isFaceDown()) {
if (object instanceof Card && ((Card) object).isFaceDown(game)) {
revealFaceDownCard((Card) object, game);
result = true;
}

View file

@ -0,0 +1,110 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.sets.antiquities;
import java.util.UUID;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.constants.AbilityType;
import mage.constants.CardType;
import mage.constants.CostModificationType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetArtifactPermanent;
import mage.util.CardUtil;
/**
*
* @author nick.myers
*/
public class PowerArtifact extends CardImpl {
public PowerArtifact(UUID ownerId) {
super(ownerId, 55, "Power Artifact", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}");
this.expansionSetCode = "ATQ";
this.subtype.add("Aura");
// Enchant artifact
TargetPermanent auraTarget = new TargetArtifactPermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// The activation cost of target artifact is reduced by {2}. If this would reduce target
// artifact's activation cost below {1}, target artifact's activation cost becomes {1}.
// Power Artifact has no effect on artifacts that have no activation cost or whose activation
// cost is {0}.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PowerArtifactCostModificationEffect()));
}
public PowerArtifact(final PowerArtifact card) {
super(card);
}
@Override
public PowerArtifact copy() {
return new PowerArtifact(this);
}
}
class PowerArtifactCostModificationEffect extends CostModificationEffectImpl {
PowerArtifactCostModificationEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST);
staticText = "The activation cost of target artifact is reduced by {2}. If this would reduce target artifact's activation cost below {1}, target artifact's activation cost becomes {1}. Power artifact has no effect on artifacts that have no activation cost or whose activation cost is {0}.";
}
PowerArtifactCostModificationEffect(PowerArtifactCostModificationEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source, Ability abilityToModify) {
Player controller = game.getPlayer(abilityToModify.getControllerId());
if (controller != null) {
Mana mana = abilityToModify.getManaCostsToPay().getMana();
int reduce = mana.getColorless();
if (reduce > 0 && mana.count() == mana.getColorless()) {
reduce--;
}
if (reduce > 2) {
reduce = 2;
}
CardUtil.reduceCost(abilityToModify, reduce);
}
return true;
}
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
Permanent artifact = game.getPermanent(abilityToModify.getSourceId());
if (artifact != null && artifact.getAttachments().contains(source.getSourceId())) {
if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED)) {
return true;
}
}
return false;
}
@Override
public PowerArtifactCostModificationEffect copy() {
return new PowerArtifactCostModificationEffect(this);
}
}

View file

@ -31,7 +31,6 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.StateTriggeredAbility;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SkipUntapOptionalAbility;
import mage.abilities.condition.CompoundCondition;
@ -39,6 +38,7 @@ import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SourceTappedCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -126,7 +126,7 @@ result is save to a state value to be available for the condition of the continu
class OldManOfTheSeaStateBasedTriggeredAbility extends StateTriggeredAbility {
public OldManOfTheSeaStateBasedTriggeredAbility() {
super(Zone.BATTLEFIELD, new EmptyEffect(""));
super(Zone.BATTLEFIELD, new InfoEffect(""));
this.setRuleVisible(false);
this.usesStack = false;
}

View file

@ -65,7 +65,10 @@ public class UmezawasJitte extends CardImpl {
this.addAbility(new UmezawasJitteAbility());
// Remove a charge counter from Umezawa's Jitte: Choose one Equipped creature gets +2/+2 until end of turn; or target creature gets -1/-1 until end of turn; or you gain 2 life.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2, Duration.EndOfTurn), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()));
Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new BoostEquippedEffect(2, 2, Duration.EndOfTurn),
new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()));
Mode mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(-1, -1, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());

View file

@ -31,9 +31,9 @@ package mage.sets.championsofkamigawa;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
@ -69,7 +69,7 @@ public class KondasBanner extends CardImpl {
this.subtype.add("Equipment");
// Konda's Banner can be attached only to a legendary creature.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EmptyEffect("{this} can be attached only to a legendary creature")));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("{this} can be attached only to a legendary creature")));
// Creatures that share a color with equipped creature get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KondasBannerColorBoostEffect()));

View file

@ -29,13 +29,13 @@ package mage.sets.coldsnap;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardTargetCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
@ -71,7 +71,7 @@ public class LightningStorm extends CardImpl {
new LightningStormAddCounterEffect() ,
new DiscardTargetCost(new TargetCardInHand(new FilterLandCard())));
ability.setMayActivate(TargetController.ANY);
ability.addEffect(new EmptyEffect("Any player may activate this ability but only if {this} is on the stack"));
ability.addEffect(new InfoEffect("Any player may activate this ability but only if {this} is on the stack"));
this.addAbility(ability);
}

View file

@ -30,21 +30,15 @@ package mage.sets.commander2013;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.ManaEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.CommanderColorIdentityManaAbility;
import mage.abilities.mana.ManaAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;

View file

@ -94,7 +94,7 @@ class LifebloodHydraComesIntoPlayEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null && !permanent.isFaceDown()) {
if (permanent != null && !permanent.isFaceDown(game)) {
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
if (obj != null && obj instanceof SpellAbility) {
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();

View file

@ -27,23 +27,24 @@
*/
package mage.sets.darkascension;
import mage.constants.CardType;
import mage.constants.Rarity;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import java.util.UUID;
/**
*
@ -70,7 +71,7 @@ public class RavagerOfTheFells extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// Whenever this creature transforms into Ravager of the Fells, it deals 2 damage to target opponent and 2 damage to up to one target creature that player controls.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EmptyEffect(rule)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect(rule)));
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Ravager of the Fells.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);

View file

@ -35,11 +35,11 @@ import mage.abilities.Ability;
import mage.abilities.TriggeredAbility;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
@ -72,7 +72,7 @@ public class WerewolfRansacker extends CardImpl {
this.toughness = new MageInt(4);
// Whenever this creature transforms into Werewolf Ransacker, you may destroy target artifact. If that artifact is put into a graveyard this way, Werewolf Ransacker deals 3 damage to that artifact's controller.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EmptyEffect(WerewolfRansackerAbility.RULE_TEXT)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect(WerewolfRansackerAbility.RULE_TEXT)));
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf Ransacker.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.permanent.token.Token;
/**
*
* @author fireshoes
*/
public class AtarkaMonument extends CardImpl {
public AtarkaMonument(UUID ownerId) {
super(ownerId, 235, "Atarka Monument", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "DTK";
// {T}: Add {R} or {G} to your mana pool.
this.addAbility(new RedManaAbility());
this.addAbility(new GreenManaAbility());
// {4}{R}{G}: Atarka Monument becomes a 4/4 red and green Dragon artifact creature with flying until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect
(new AtarkaMonumentToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{4}{R}{G}")));
}
public AtarkaMonument(final AtarkaMonument card) {
super(card);
}
@Override
public AtarkaMonument copy() {
return new AtarkaMonument(this);
}
private class AtarkaMonumentToken extends Token {
AtarkaMonumentToken() {
super("", "a 4/4 red and green Dragon artifact creature with flying");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
color.setRed(true);
color.setGreen(true);
this.subtype.add("Dragon");
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
}
}
}

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.CounterPredicate;
/**
*
* @author jeffwadsworth
*/
public class AvatarOfTheResolute extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creature you control with a +1/+1 counter on it");
static {
filter.add(new CounterPredicate(CounterType.P1P1));
filter.add(new AnotherPredicate());
}
public AvatarOfTheResolute(UUID ownerId) {
super(ownerId, 175, "Avatar of the Resolute", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}{G}");
this.expansionSetCode = "DTK";
this.subtype.add("Avatar");
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Reach
this.addAbility(ReachAbility.getInstance());
// Trample
this.addAbility(TrampleAbility.getInstance());
// Avatar of the Resolute enters the battlefield with a +1/+1 counter on it for each other creature you control with a +1/+1 counter on it.
DynamicValue numberCounters = new PermanentsOnBattlefieldCount(filter);
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), numberCounters, true)));
}
public AvatarOfTheResolute(final AvatarOfTheResolute card) {
super(card);
}
@Override
public AvatarOfTheResolute copy() {
return new AvatarOfTheResolute(this);
}
}

View file

@ -0,0 +1,85 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
/**
*
* @author fireshoes
*/
public class BelltollDragon extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control");
static {
filter.add(new AnotherPredicate());
filter.add(new SubtypePredicate("Dragon"));
}
public BelltollDragon(UUID ownerId) {
super(ownerId, 46, "Belltoll Dragon", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{U}");
this.expansionSetCode = "DTK";
this.subtype.add("Dragon");
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Hexproof
this.addAbility(HexproofAbility.getInstance());
// Megamorph {5}{U}{U}
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{U}{U}"), true));
// When Belltoll Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control.
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false));
}
public BelltollDragon(final BelltollDragon card) {
super(card);
}
@Override
public BelltollDragon copy() {
return new BelltollDragon(this);
}
}

View file

@ -0,0 +1,102 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.EmptyToken;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.util.CardUtil;
/**
*
* @author jeffwadsworth
*/
public class CloneLegion extends CardImpl {
public CloneLegion(UUID ownerId) {
super(ownerId, 48, "Clone Legion", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{7}{U}{U}");
this.expansionSetCode = "DTK";
// For each creature target player controls, put a token onto the the battlefield that's a copy of that creature.
this.getSpellAbility().addEffect(new CloneLegionEffect());
this.getSpellAbility().addTarget(new TargetPlayer());
}
public CloneLegion(final CloneLegion card) {
super(card);
}
@Override
public CloneLegion copy() {
return new CloneLegion(this);
}
}
class CloneLegionEffect extends OneShotEffect {
public CloneLegionEffect() {
super(Outcome.Benefit);
this.staticText = "For each creature target player controls, put a token onto the the battlefield that's a copy of that creature";
}
public CloneLegionEffect(final CloneLegionEffect effect) {
super(effect);
}
@Override
public CloneLegionEffect copy() {
return new CloneLegionEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
if (targetPlayer != null) {
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), targetPlayer.getId(), game)) {
if (permanent != null) {
EmptyToken token = new EmptyToken();
CardUtil.copyTo(token).from(permanent);
token.putOntoBattlefield(1, game, source.getSourceId(), targetPlayer.getId());
}
}
return true;
}
return false;
}
}

View file

@ -0,0 +1,152 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.AsThoughEffectType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.PhaseStep;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
/**
*
* @author jeffwadsworth
*/
public class CommuneWithLava extends CardImpl {
public CommuneWithLava(UUID ownerId) {
super(ownerId, 131, "Commune with Lava", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{X}{R}{R}");
this.expansionSetCode = "DTK";
// Exile the top X cards of your library. Until the end of your next turn, you may play those cards.
this.getSpellAbility().addEffect(new CommuneWithLavaEffect());
}
public CommuneWithLava(final CommuneWithLava card) {
super(card);
}
@Override
public CommuneWithLava copy() {
return new CommuneWithLava(this);
}
}
class CommuneWithLavaEffect extends OneShotEffect {
public CommuneWithLavaEffect() {
super(Outcome.PlayForFree);
this.staticText = "Exile the top X cards of your library. Until the end of your next turn, you may play those cards";
}
public CommuneWithLavaEffect(final CommuneWithLavaEffect effect) {
super(effect);
}
@Override
public CommuneWithLavaEffect copy() {
return new CommuneWithLavaEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Card sourceCard = game.getCard(source.getSourceId());
if (controller != null) {
int amount = source.getManaCostsToPay().getX();
List<Card> cards = controller.getLibrary().getTopCards(game, amount);
for (Card card : cards) {
if (card != null) {
controller.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), sourceCard.getName(), source.getSourceId(), game, Zone.LIBRARY);
ContinuousEffect effect = new CommuneWithLavaMayPlayEffect();
effect.setTargetPointer(new FixedTarget(card.getId()));
game.addEffect(effect, source);
}
}
return true;
}
return false;
}
}
class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl {
public CommuneWithLavaMayPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NON_HAND_ZONE, Duration.Custom, Outcome.Benefit);
this.staticText = "Until the end of your next turn, you may play that card.";
}
public CommuneWithLavaMayPlayEffect(final CommuneWithLavaMayPlayEffect effect) {
super(effect);
}
@Override
public CommuneWithLavaMayPlayEffect copy() {
return new CommuneWithLavaMayPlayEffect(this);
}
@Override
public boolean isInactive(Ability source, Game game) {
if (game.getPhase().getStep().getType() == PhaseStep.END_TURN) {
if (game.getActivePlayerId().equals(source.getControllerId())) {
return true;
}
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
if (targetPointer.getTargets(game, source).contains(sourceId)) {
return game.getState().getZone(sourceId).equals(Zone.EXILED);
}
return false;
}
}

View file

@ -0,0 +1,66 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author fireshoes
*/
public class CustodianOfTheTrove extends CardImpl {
public CustodianOfTheTrove(UUID ownerId) {
super(ownerId, 236, "Custodian of the Trove", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
this.expansionSetCode = "DTK";
this.subtype.add("Golem");
this.power = new MageInt(2);
this.toughness = new MageInt(5);
// Defender
this.addAbility(DefenderAbility.getInstance());
// Custodian of the Trove enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
}
public CustodianOfTheTrove(final CustodianOfTheTrove card) {
super(card);
}
@Override
public CustodianOfTheTrove copy() {
return new CustodianOfTheTrove(this);
}
}

View file

@ -0,0 +1,141 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.SetTargetPointer;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreatureOrPlayer;
/**
*
* @author LevelX2
*/
public class DragonTempest extends CardImpl {
private static final FilterCreaturePermanent filterFlying = new FilterCreaturePermanent("a creature with flying");
static {
filterFlying.add(new AbilityPredicate(FlyingAbility.class));
}
public DragonTempest(UUID ownerId) {
super(ownerId, 136, "Dragon Tempest", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
this.expansionSetCode = "DTK";
// Whenever a creature with flying enters the battlefield under your control, it gains haste until the end of turn.
Effect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
effect.setText("it gains haste until the end of turn");
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filterFlying, false, SetTargetPointer.PERMANENT, ""));
// Whenever a Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(
Zone.BATTLEFIELD,
new DragonTempestDamageEffect(),
new FilterCreaturePermanent("Dragon", "a Dragon"),
false,
SetTargetPointer.PERMANENT,
""
);
ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability);
}
public DragonTempest(final DragonTempest card) {
super(card);
}
@Override
public DragonTempest copy() {
return new DragonTempest(this);
}
}
class DragonTempestDamageEffect extends OneShotEffect {
private static final FilterControlledPermanent dragonFilter = new FilterControlledPermanent();
static {
dragonFilter.add(new SubtypePredicate("Dragon"));
}
public DragonTempestDamageEffect() {
super(Outcome.Damage);
staticText = "it deals X damage to target creature or player, where X is the number of Dragons you control";
}
public DragonTempestDamageEffect(final DragonTempestDamageEffect effect) {
super(effect);
}
@Override
public DragonTempestDamageEffect copy() {
return new DragonTempestDamageEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int amount = game.getBattlefield().countAll(dragonFilter, controller.getId(), game);
if (amount > 0) {
Permanent targetCreature = game.getPermanent(source.getTargets().getFirstTarget());
if (targetCreature != null) {
targetCreature.damage(amount, getTargetPointer().getFirst(game, source), game, false, true);
} else {
Player player = game.getPlayer(source.getTargets().getFirstTarget());
if (player != null) {
player.damage(amount, getTargetPointer().getFirst(game, source), game, false, true);
}
}
}
return true;
}
return false;
}
}

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.permanent.token.Token;
/**
*
* @author fireshoes
*/
public class DromokaMonument extends CardImpl {
public DromokaMonument(UUID ownerId) {
super(ownerId, 238, "Dromoka Monument", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "DTK";
// {T}: Add {G} or {W} to your mana pool.
this.addAbility(new GreenManaAbility());
this.addAbility(new WhiteManaAbility());
// {4}{G}{W}: Dromoka Monument becomes a 4/4 green and white Dragon artifact creature with flying until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect
(new DromokaMonumentToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{4}{G}{W}")));
}
public DromokaMonument(final DromokaMonument card) {
super(card);
}
@Override
public DromokaMonument copy() {
return new DromokaMonument(this);
}
private class DromokaMonumentToken extends Token {
DromokaMonumentToken() {
super("", "a 4/4 green and white Dragon artifact creature with flying");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
color.setGreen(true);
color.setWhite(true);
this.subtype.add("Dragon");
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
}
}
}

View file

@ -0,0 +1,114 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.abilities.Mode;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.abilities.effects.common.PreventDamageByTargetEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.FilterStackObject;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.TargetPlayer;
import mage.target.TargetStackObject;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author jeffwadsworth
*/
public class DromokasCommand extends CardImpl {
private static final FilterStackObject filterInstantOrSorcery = new FilterStackObject("instant or sorcery spell");
private static final FilterPermanent filterEnchantment = new FilterPermanent("enchantment");
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature to put the +1/+1 counter on");
private static final FilterCreaturePermanent filterUncontrolledCreature = new FilterCreaturePermanent("creature you don't control");
static {
filterInstantOrSorcery.add(Predicates.or(new CardTypePredicate(CardType.INSTANT),
new CardTypePredicate(CardType.SORCERY)));
filterUncontrolledCreature.add(new ControllerPredicate(TargetController.NOT_YOU));
}
public DromokasCommand(UUID ownerId) {
super(ownerId, 221, "Dromoka's Command", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{G}{W}");
this.expansionSetCode = "DTK";
// Choose two - Prevent all damage target instant or sorcery spell would deal this turn; Target player sacrifices an enchantment; Put a +1/+1 counter on target creature; or Target creature you control fights target creature you don't control.
this.getSpellAbility().getModes().setMinModes(2);
this.getSpellAbility().getModes().setMaxModes(2);
// Prevent all damage target instant or sorcery spell would deal this turn;
this.getSpellAbility().getEffects().add(new PreventDamageByTargetEffect(Duration.EndOfTurn));
this.getSpellAbility().getTargets().add(new TargetStackObject(filterInstantOrSorcery));
// or Target player sacrifices an enchantment;
Mode mode = new Mode();
mode.getEffects().add(new SacrificeEffect(filterEnchantment, 1, "target player"));
mode.getTargets().add(new TargetPlayer());
this.getSpellAbility().getModes().addMode(mode);
// Put a +1/+1 counter on target creature;
mode = new Mode();
mode.getEffects().add(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
this.getSpellAbility().getModes().addMode(mode);
// or Target creature you control fights target creature you don't control.
mode = new Mode();
Effect effect = new FightTargetsEffect();
effect.setText("Target creature you control fights target creature you don't control");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetControlledCreaturePermanent());
mode.getTargets().add(new TargetCreaturePermanent(filterUncontrolledCreature));
this.getSpellAbility().getModes().addMode(mode);
}
public DromokasCommand(final DromokasCommand card) {
super(card);
}
@Override
public DromokasCommand copy() {
return new DromokasCommand(this);
}
}

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Duress extends mage.sets.magic2010.Duress {
public Duress(UUID ownerId) {
super(ownerId);
this.cardNumber = 98;
this.expansionSetCode = "DTK";
}
public Duress(final Duress card) {
super(card);
}
@Override
public Duress copy() {
return new Duress(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Forest1 extends mage.cards.basiclands.Forest {
public Forest1(UUID ownerId) {
super(ownerId, 262);
this.expansionSetCode = "DTK";
}
public Forest1(final Forest1 card) {
super(card);
}
@Override
public Forest1 copy() {
return new Forest1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Forest2 extends mage.cards.basiclands.Forest {
public Forest2(UUID ownerId) {
super(ownerId, 263);
this.expansionSetCode = "DTK";
}
public Forest2(final Forest2 card) {
super(card);
}
@Override
public Forest2 copy() {
return new Forest2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Forest3 extends mage.cards.basiclands.Forest {
public Forest3(UUID ownerId) {
super(ownerId, 264);
this.expansionSetCode = "DTK";
}
public Forest3(final Forest3 card) {
super(card);
}
@Override
public Forest3 copy() {
return new Forest3(this);
}
}

View file

@ -0,0 +1,167 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.ConditionalMana;
import mage.MageObject;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.ConditionalAnyColorManaAbility;
import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.abilities.mana.conditional.CreatureCastManaCondition;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author jeffwadsworth
*/
public class HavenOfTheSpiritDragon extends CardImpl {
private static final FilterCard filter = new FilterCard("Dragon creature card or Ugin planeswalker card from your graveyard");
static {
filter.add(Predicates.or(new DragonCreatureCardPredicate(),
new UginPlaneswalkerCardPredicate()));
}
public HavenOfTheSpiritDragon(UUID ownerId) {
super(ownerId, 249, "Haven of the Spirit Dragon", Rarity.RARE, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "DTK";
// {T}: Add {1} to your mana pool.
this.addAbility(new ColorlessManaAbility());
// {T}: add one mana of any color to your mana pool. Spend this mana only to cast a Dragon creature spell.
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new HavenOfTheSpiritManaBuilder(), true));
// {2}, {T}, Sacrifice Haven of the Spirit Dragon: Return target Dragon creature card or Ugin planeswalker card from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{2}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}
public HavenOfTheSpiritDragon(final HavenOfTheSpiritDragon card) {
super(card);
}
@Override
public HavenOfTheSpiritDragon copy() {
return new HavenOfTheSpiritDragon(this);
}
}
class HavenOfTheSpiritManaBuilder extends ConditionalManaBuilder {
@Override
public ConditionalMana build(Object... options) {
this.mana.setFlag(true); // indicates that the mana is from second ability
return new HavenOfTheSpiritConditionalMana(this.mana);
}
@Override
public String getRule() {
return "Spend this mana only to cast a Dragon creature spell.";
}
}
class HavenOfTheSpiritConditionalMana extends ConditionalMana {
HavenOfTheSpiritConditionalMana(Mana mana) {
super(mana);
staticText = "Spend this mana only to cast a Dragon creature spell.";
addCondition(new HavenOfTheSpiritManaCondition());
}
}
class HavenOfTheSpiritManaCondition extends CreatureCastManaCondition {
@Override
public boolean apply(Game game, Ability source, UUID manaProducer) {
if (super.apply(game, source)) {
MageObject object = game.getObject(source.getSourceId());
if (object.hasSubtype("Dragon")
&& object.getCardType().contains(CardType.CREATURE)) {
return true;
}
}
return false;
}
}
class DragonCreatureCardPredicate implements Predicate<Card> {
public DragonCreatureCardPredicate() {
}
@Override
public boolean apply(Card input, Game game) {
return input.getCardType().contains(CardType.CREATURE)
&& input.getSubtype().contains("Dragon");
}
@Override
public String toString() {
return "";
}
}
class UginPlaneswalkerCardPredicate implements Predicate<Card> {
public UginPlaneswalkerCardPredicate() {
}
@Override
public boolean apply(Card input, Game game) {
return input.getCardType().contains(CardType.PLANESWALKER)
&& input.getName().contains("Ugin, the Spirit Dragon");
}
@Override
public String toString() {
return "";
}
}

View file

@ -0,0 +1,239 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.CostModificationType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.PhaseStep;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.WatcherScope;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import static mage.filter.predicate.permanent.ControllerControlsIslandPredicate.filter;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
import mage.util.CardUtil;
import mage.watchers.Watcher;
/**
*
* @author fireshoes
*/
public class IcefallRegent extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));
}
public IcefallRegent(UUID ownerId) {
super(ownerId, 58, "Icefall Regent", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.expansionSetCode = "DTK";
this.subtype.add("Dragon");
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Icefall Regent enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Icefall Regent.
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
ability.addEffect(new IcefallRegentEffect());
Target target = new TargetCreaturePermanent(filter);
ability.addTarget(target);
this.addAbility(ability, new IcefallRegentWatcher());
// Spells your opponents cast that target Icefall Regent cost {2} more to cast.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IcefallRegentCostIncreaseEffect()));
}
public IcefallRegent(final IcefallRegent card) {
super(card);
}
@Override
public IcefallRegent copy() {
return new IcefallRegent(this);
}
}
class IcefallRegentEffect extends ContinuousRuleModifyingEffectImpl {
public IcefallRegentEffect() {
super(Duration.Custom, Outcome.Detriment, false, false);
this.staticText = "That creature doesn't untap during its controller's untap step for as long as you control {this}";
}
public IcefallRegentEffect(final IcefallRegentEffect effect) {
super(effect);
}
@Override
public IcefallRegentEffect copy() {
return new IcefallRegentEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
// Source must be on the battlefield (it's neccessary to check here because if as response to the enter
// the battlefield triggered ability the source dies (or will be exiled), then the ZONE_CHANGE or LOST_CONTROL
// event will happen before this effect is applied ever)
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent == null || !sourcePermanent.getControllerId().equals(source.getControllerId())) {
this.used = true;
return false;
}
if (event.getType() == GameEvent.EventType.LOST_CONTROL) {
if (event.getTargetId().equals(source.getSourceId())) {
discard();
return false;
}
}
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId())) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
discard();
return false;
}
}
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) {
if (event.getTargetId().equals(targetPointer.getFirst(game, source))) {
return true;
}
}
return false;
}
}
class IcefallRegentWatcher extends Watcher {
IcefallRegentWatcher () {
super("ControlLost", WatcherScope.CARD);
}
IcefallRegentWatcher(IcefallRegentWatcher watcher) {
super(watcher);
}
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) {
condition = true;
game.replaceEvent(event);
return;
}
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(sourceId)) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
condition = true;
game.replaceEvent(event);
}
}
}
@Override
public void reset() {
//don't reset condition each turn - only when this leaves the battlefield
}
@Override
public IcefallRegentWatcher copy() {
return new IcefallRegentWatcher(this);
}
}
class IcefallRegentCostIncreaseEffect extends CostModificationEffectImpl {
private static final String effectText = "Spells your opponents cast that target Icefall Regent cost {2} more to cast";
IcefallRegentCostIncreaseEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
staticText = effectText;
}
IcefallRegentCostIncreaseEffect(IcefallRegentCostIncreaseEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source, Ability abilityToModify) {
SpellAbility spellAbility = (SpellAbility) abilityToModify;
CardUtil.adjustCost(spellAbility, -2);
return true;
}
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify instanceof SpellAbility) {
if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) {
for (Target target :abilityToModify.getTargets()) {
for (UUID targetUUID :target.getTargets()) {
if (targetUUID.equals(source.getSourceId())) {
return true;
}
}
}
}
}
return false;
}
@Override
public IcefallRegentCostIncreaseEffect copy() {
return new IcefallRegentCostIncreaseEffect(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Island1 extends mage.cards.basiclands.Island {
public Island1(UUID ownerId) {
super(ownerId, 253);
this.expansionSetCode = "DTK";
}
public Island1(final Island1 card) {
super(card);
}
@Override
public Island1 copy() {
return new Island1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Island2 extends mage.cards.basiclands.Island {
public Island2(UUID ownerId) {
super(ownerId, 254);
this.expansionSetCode = "DTK";
}
public Island2(final Island2 card) {
super(card);
}
@Override
public Island2 copy() {
return new Island2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Island3 extends mage.cards.basiclands.Island {
public Island3(UUID ownerId) {
super(ownerId, 255);
this.expansionSetCode = "DTK";
}
public Island3(final Island3 card) {
super(card);
}
@Override
public Island3 copy() {
return new Island3(this);
}
}

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.permanent.token.Token;
/**
*
* @author fireshoes
*/
public class KolaghanMonument extends CardImpl {
public KolaghanMonument(UUID ownerId) {
super(ownerId, 241, "Kolaghan Monument", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "DTK";
// {T}: Add {B} or {R} to your mana pool.
this.addAbility(new BlackManaAbility());
this.addAbility(new RedManaAbility());
// {4}{B}{R}: Kolaghan Monument becomes a 4/4 black and red Dragon artifact creature with flying until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect
(new KolaghanMonumentToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{4}{B}{R}")));
}
public KolaghanMonument(final KolaghanMonument card) {
super(card);
}
@Override
public KolaghanMonument copy() {
return new KolaghanMonument(this);
}
private class KolaghanMonumentToken extends Token {
KolaghanMonumentToken() {
super("", "a 4/4 black and red Dragon artifact creature with flying");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
color.setBlack(true);
color.setRed(true);
this.subtype.add("Dragon");
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
}
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Mountain1 extends mage.cards.basiclands.Mountain {
public Mountain1(UUID ownerId) {
super(ownerId, 259);
this.expansionSetCode = "DTK";
}
public Mountain1(final Mountain1 card) {
super(card);
}
@Override
public Mountain1 copy() {
return new Mountain1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Mountain2 extends mage.cards.basiclands.Mountain {
public Mountain2(UUID ownerId) {
super(ownerId, 260);
this.expansionSetCode = "DTK";
}
public Mountain2(final Mountain2 card) {
super(card);
}
@Override
public Mountain2 copy() {
return new Mountain2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Mountain3 extends mage.cards.basiclands.Mountain {
public Mountain3(UUID ownerId) {
super(ownerId, 261);
this.expansionSetCode = "DTK";
}
public Mountain3(final Mountain3 card) {
super(card);
}
@Override
public Mountain3 copy() {
return new Mountain3(this);
}
}

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.permanent.token.Token;
/**
*
* @author fireshoes
*/
public class OjutaiMonument extends CardImpl {
public OjutaiMonument(UUID ownerId) {
super(ownerId, 242, "Ojutai Monument", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "DTK";
// {T}: Add {W} or {U} to your mana pool.
this.addAbility(new WhiteManaAbility());
this.addAbility(new BlueManaAbility());
// {4}{W}{U}: Ojutai Monument becomes a 4/4 white and blue Dragon artifact creature with flying until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect
(new OjutaiMonumentToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{4}{W}{U}")));
}
public OjutaiMonument(final OjutaiMonument card) {
super(card);
}
@Override
public OjutaiMonument copy() {
return new OjutaiMonument(this);
}
private class OjutaiMonumentToken extends Token {
OjutaiMonumentToken() {
super("", "a 4/4 white and blue Dragon artifact creature with flying");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
color.setWhite(true);
color.setBlue(true);
this.subtype.add("Dragon");
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
}
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Plains1 extends mage.cards.basiclands.Plains {
public Plains1(UUID ownerId) {
super(ownerId, 250);
this.expansionSetCode = "DTK";
}
public Plains1(final Plains1 card) {
super(card);
}
@Override
public Plains1 copy() {
return new Plains1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Plains2 extends mage.cards.basiclands.Plains {
public Plains2(UUID ownerId) {
super(ownerId, 251);
this.expansionSetCode = "DTK";
}
public Plains2(final Plains2 card) {
super(card);
}
@Override
public Plains2 copy() {
return new Plains2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Plains3 extends mage.cards.basiclands.Plains {
public Plains3(UUID ownerId) {
super(ownerId, 252);
this.expansionSetCode = "DTK";
}
public Plains3(final Plains3 card) {
super(card);
}
@Override
public Plains3 copy() {
return new Plains3(this);
}
}

View file

@ -0,0 +1,63 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author fireshoes
*/
public class ScionOfUgin extends CardImpl {
public ScionOfUgin(UUID ownerId) {
super(ownerId, 1, "Scion of Ugin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}");
this.expansionSetCode = "DTK";
this.subtype.add("Dragon");
this.subtype.add("Spirit");
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
}
public ScionOfUgin(final ScionOfUgin card) {
super(card);
}
@Override
public ScionOfUgin copy() {
return new ScionOfUgin(this);
}
}

View file

@ -107,8 +107,7 @@ class ShorecrasherElementalEffect extends OneShotEffect {
if (shorecrasherElemental.moveToExile(source.getSourceId(), "Shorecrasher Elemental", source.getSourceId(), game)) {
Card card = game.getExile().getCard(source.getSourceId(), game);
if (card != null) {
card.setFaceDown(true);
return card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
return card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), card.getOwnerId(), false, true);
}
}
}

View file

@ -0,0 +1,86 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.permanent.token.Token;
/**
*
* @author fireshoes
*/
public class SilumgarMonument extends CardImpl {
public SilumgarMonument(UUID ownerId) {
super(ownerId, 243, "Silumgar Monument", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "DTK";
// {T}: Add {U} or {B} to your mana pool.
this.addAbility(new BlueManaAbility());
this.addAbility(new BlackManaAbility());
// {4}{U}{B}: Silumgar Monument becomes a 4/4 blue and black Dragon artifact creature with flying until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect
(new OjutaiMonumentToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{4}{U}{B}")));
}
public SilumgarMonument(final SilumgarMonument card) {
super(card);
}
@Override
public SilumgarMonument copy() {
return new SilumgarMonument(this);
}
private class OjutaiMonumentToken extends Token {
OjutaiMonumentToken() {
super("", "a 4/4 blue and black Dragon artifact creature with flying");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
color.setBlue(true);
color.setBlack(true);
this.subtype.add("Dragon");
power = new MageInt(4);
toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance());
}
}
}

View file

@ -0,0 +1,77 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.condition.common.FormidableCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
* @author fireshoes
*/
public class SurrakTheHuntCaller extends CardImpl {
public SurrakTheHuntCaller(UUID ownerId) {
super(ownerId, 210, "Surrak, the Hunt Caller", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.expansionSetCode = "DTK";
this.supertype.add("Legendary");
this.subtype.add("Human");
this.subtype.add("Warrior");
this.power = new MageInt(5);
this.toughness = new MageInt(4);
// <i>Formidable</i> - At the beginning of combat on your turn, if creatures you control have total power 8 or greater, target creature you control gains haste until end of turn.
Ability ability = new ConditionalTriggeredAbility(
new BeginningOfCombatTriggeredAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), TargetController.YOU, false),
FormidableCondition.getInstance(),
"<i>Formidable</i> &mdash; Whenever {this} attacks, if creatures you control have total power 8 or greater, creatures you control gain trample until end of turn.");
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}
public SurrakTheHuntCaller(final SurrakTheHuntCaller card) {
super(card);
}
@Override
public SurrakTheHuntCaller copy() {
return new SurrakTheHuntCaller(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Swamp1 extends mage.cards.basiclands.Swamp {
public Swamp1(UUID ownerId) {
super(ownerId, 256);
this.expansionSetCode = "DTK";
}
public Swamp1(final Swamp1 card) {
super(card);
}
@Override
public Swamp1 copy() {
return new Swamp1(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Swamp2 extends mage.cards.basiclands.Swamp {
public Swamp2(UUID ownerId) {
super(ownerId, 257);
this.expansionSetCode = "DTK";
}
public Swamp2(final Swamp2 card) {
super(card);
}
@Override
public Swamp2 copy() {
return new Swamp2(this);
}
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class Swamp3 extends mage.cards.basiclands.Swamp {
public Swamp3(UUID ownerId) {
super(ownerId, 258);
this.expansionSetCode = "DTK";
}
public Swamp3(final Swamp3 card) {
super(card);
}
@Override
public Swamp3 copy() {
return new Swamp3(this);
}
}

View file

@ -0,0 +1,59 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.dragonsoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author fireshoes
*/
public class WanderingTombshell extends CardImpl {
public WanderingTombshell(UUID ownerId) {
super(ownerId, 127, "Wandering Tombshell", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.expansionSetCode = "DTK";
this.subtype.add("Zombie");
this.subtype.add("Turtle");
this.power = new MageInt(1);
this.toughness = new MageInt(6);
}
public WanderingTombshell(final WanderingTombshell card) {
super(card);
}
@Override
public WanderingTombshell copy() {
return new WanderingTombshell(this);
}
}

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.exodus;
import java.util.UUID;
/**
*
* @author michael.napoleon@gmail.com
*/
public class CursedFlesh extends mage.sets.invasion.CursedFlesh {
public CursedFlesh(UUID ownerId) {
super(ownerId);
this.cardNumber = 56;
this.expansionSetCode = "EXO";
}
public CursedFlesh(final CursedFlesh card) {
super(card);
}
@Override
public CursedFlesh copy() {
return new CursedFlesh(this);
}
}

View file

@ -99,14 +99,12 @@ class GhastlyConscriptionEffect extends OneShotEffect {
for(Card card: targetPlayer.getGraveyard().getCards(new FilterCreatureCard(), game)) {
cardsToManifest.add(card);
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
card.setFaceDown(true);
}
Collections.shuffle(cardsToManifest);
game.informPlayers(controller.getName() + " shuffles the face-down pile");
Ability newSource = source.copy();
newSource.setWorksFaceDown(true);
for (Card card: cardsToManifest) {
card.setFaceDown(true);
ManaCosts manaCosts = null;
if (card.getCardType().contains(CardType.CREATURE)) {
manaCosts = card.getSpellAbility().getManaCosts();
@ -116,7 +114,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
}
MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter() +1, game);
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId())) {
if (controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId(), false, true)) {
game.informPlayers(new StringBuilder(controller.getName())
.append(" puts facedown card from exile onto the battlefield").toString());
}

View file

@ -114,12 +114,10 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
Card sourceCard = game.getCard(source.getSourceId());
if (sourcePermanent != null && sourceCard != null) {
player.moveCardToExileWithInfo(sourcePermanent, sourcePermanent.getId(), sourcePermanent.getName(), source.getSourceId(), game, Zone.BATTLEFIELD);
sourceCard.setFaceDown(true);
cardsToManifest.add(sourceCard);
}
if (sourcePermanent!= null && player.getLibrary().size() > 0) {
Card cardFromLibrary = player.getLibrary().removeFromTop(game);
cardFromLibrary.setFaceDown(true);
player.moveCardToExileWithInfo(cardFromLibrary, sourcePermanent.getId(), sourcePermanent.getName(), source.getSourceId(), game, Zone.LIBRARY);
cardsToManifest.add(cardFromLibrary);
}
@ -128,7 +126,6 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
Ability newSource = source.copy();
newSource.setWorksFaceDown(true);
for (Card card : cardsToManifest) {
card.setFaceDown(true);
ManaCosts manaCosts = null;
if (card.getCardType().contains(CardType.CREATURE)) {
manaCosts = card.getSpellAbility().getManaCosts();
@ -138,7 +135,7 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
}
MageObjectReference objectReference= new MageObjectReference(card.getId(), card.getZoneChangeCounter() +1, game);
game.addEffect(new BecomesFaceDownCreatureEffect(manaCosts, objectReference, Duration.Custom, FaceDownType.MANIFESTED), newSource);
if (card.moveToZone(Zone.BATTLEFIELD, newSource.getSourceId(), game, false)) {
if (player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId(), false, true)) {
game.informPlayers(new StringBuilder(player.getName())
.append(" puts facedown card from exile onto the battlefield").toString());
}

View file

@ -97,8 +97,8 @@ class SummonersEggImprintEffect extends OneShotEffect {
&& controller.choose(Outcome.Benefit, controller.getHand(), target, game)) {
Card card = controller.getHand().get(target.getFirstTarget(), game);
if (card != null) {
card.setFaceDown(true);
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourcePermanent.getLogName() +" (Imprint)", source.getSourceId(), game, Zone.HAND);
card.setFaceDown(true, game);
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.imprint(card.getId(), game);

View file

@ -105,7 +105,7 @@ class PrimalPlasmaReplacementEffect extends ReplacementEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getSourceId())) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent != null && !sourcePermanent.isFaceDown()) {
if (sourcePermanent != null && !sourcePermanent.isFaceDown(game)) {
return true;
}
}

View file

@ -146,8 +146,10 @@ class BaneAlleyBrokerDrawExileEffect extends OneShotEffect {
Card card = game.getCard(target.getFirstTarget());
MageObject sourceObject = game.getObject(source.getSourceId());
if (card != null && sourceObject != null) {
card.setFaceDown(true);
return card.moveToExile(CardUtil.getCardExileZoneId(game, source), new StringBuilder(sourceObject.getLogName()).toString(), source.getSourceId(), game);
if (card.moveToExile(CardUtil.getCardExileZoneId(game, source), new StringBuilder(sourceObject.getLogName()).toString(), source.getSourceId(), game)) {
card.setFaceDown(true, game);
return true;
}
}
}
}

View file

@ -136,8 +136,8 @@ class NecropotenceEffect extends OneShotEffect {
if (controller != null) {
if (controller.getLibrary().size() > 0) {
Card card = controller.getLibrary().removeFromTop(game);
card.setFaceDown(true);
if (controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY)) {
card.setFaceDown(true, game);
Effect returnToHandeffect = new ReturnToHandTargetEffect();
returnToHandeffect.setText("put that face down card into your hand");
returnToHandeffect.setTargetPointer(new FixedTarget(card.getId()));

View file

@ -0,0 +1,81 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.invasion;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author michael.napoleon@gmail.com
*/
public class CursedFlesh extends CardImpl {
public CursedFlesh(UUID ownerId) {
super(ownerId, 98, "Cursed Flesh", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}");
this.expansionSetCode = "INV";
this.subtype.add("Aura");
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature gets -1/-1 and has fear.
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-1, -1, Duration.WhileOnBattlefield));
ability.addEffect(new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield, "and has fear"));
this.addAbility(ability);
}
public CursedFlesh(final CursedFlesh card) {
super(card);
}
@Override
public CursedFlesh copy() {
return new CursedFlesh(this);
}
}

View file

@ -0,0 +1,84 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.invasion;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author michael.napoleon@gmail.com
*/
public class SunscapeMaster extends CardImpl {
public SunscapeMaster(UUID ownerId) {
super(ownerId, 42, "Sunscape Master", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
this.expansionSetCode = "INV";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// {G}{G}, {tap}: Creatures you control get +2/+2 until end of turn.
Effect effect1 = new BoostControlledEffect(2, 2, Duration.EndOfTurn);
effect1.setText("Creatures you control get +2/+2 until end of turn");
Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect1, new ManaCostsImpl("{G}{G}"));
ability1.addCost(new TapSourceCost());
this.addAbility(ability1);
// {U}{U}, {tap}: Return target creature to its owner's hand.
Effect effect2 = new ReturnToHandTargetEffect();
effect2.setText("Return target creature to its owner's hand.");
Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect2, new ManaCostsImpl("{U}{U}"));
ability2.addTarget(new TargetCreaturePermanent());
ability2.addCost(new TapSourceCost());
this.addAbility(ability2);
}
public SunscapeMaster(final SunscapeMaster card) {
super(card);
}
@Override
public SunscapeMaster copy() {
return new SunscapeMaster(this);
}
}

View file

@ -0,0 +1,63 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.invasion;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author michael.napoleon@gmail.com
*/
public class VodalianMerchant extends CardImpl {
public VodalianMerchant(UUID ownerId) {
super(ownerId, 85, "Vodalian Merchant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.expansionSetCode = "INV";
this.subtype.add("Merfolk");
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// When Vodalian Merchant enters the battlefield, draw a card, then discard a card.
this.addAbility(new EntersBattlefieldAbility(new DrawDiscardControllerEffect(1, 1, false)));
}
public VodalianMerchant(final VodalianMerchant card) {
super(card);
}
@Override
public VodalianMerchant copy() {
return new VodalianMerchant(this);
}
}

View file

@ -0,0 +1,81 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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.sets.invasion;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
/**
*
* @author michael.napoleon@gmail.com
*/
public class YavimayaKavu extends CardImpl {
private static final FilterCreaturePermanent filterGreenCreature = new FilterCreaturePermanent("green creatures on the battlefield");
private static final FilterCreaturePermanent filterRedCreature = new FilterCreaturePermanent("red creatures on the battlefield");
static {
filterGreenCreature.add(new ColorPredicate(ObjectColor.GREEN));
filterRedCreature.add(new ColorPredicate(ObjectColor.RED));
}
public YavimayaKavu(UUID ownerId) {
super(ownerId, 291, "Yavimaya Kavu", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{G}");
this.expansionSetCode = "INV";
this.subtype.add("Kavu");
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Yavimaya Kavu's power is equal to the number of red creatures on the battlefield.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filterRedCreature), Duration.EndOfGame)));
// Yavimaya Kavu's toughness is equal to the number of green creatures on the battlefield.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(new PermanentsOnBattlefieldCount(filterGreenCreature), Duration.EndOfGame)));
}
public YavimayaKavu(final YavimayaKavu card) {
super(card);
}
@Override
public YavimayaKavu copy() {
return new YavimayaKavu(this);
}
}

View file

@ -30,12 +30,12 @@ package mage.sets.journeyintonyx;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.Card;
@ -99,7 +99,7 @@ class KeranosGodOfStormsTriggeredAbility extends TriggeredAbilityImpl {
private int lastTriggeredTurn;
KeranosGodOfStormsTriggeredAbility() {
super(Zone.BATTLEFIELD, new EmptyEffect(""), false);
super(Zone.BATTLEFIELD, new InfoEffect(""), false);
}
KeranosGodOfStormsTriggeredAbility(final KeranosGodOfStormsTriggeredAbility ability) {

View file

@ -112,8 +112,7 @@ class AshcloudPhoenixEffect extends OneShotEffect {
if (card != null) {
Player owner = game.getPlayer(card.getOwnerId());
if (owner != null && owner.getGraveyard().contains(card.getId())) {
card.setFaceDown(true);
player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId());
player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId(), false, true);
}
}
return true;

View file

@ -120,7 +120,7 @@ class EfreetWeaponmasterAbility extends TriggeredAbilityImpl {
}
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId()) ) {
Permanent sourcePermanent = game.getPermanent(getSourceId());
if (sourcePermanent != null && !sourcePermanent.isFaceDown()) {
if (sourcePermanent != null && !sourcePermanent.isFaceDown(game)) {
return true;
}
}

View file

@ -29,9 +29,9 @@ package mage.sets.khansoftarkir;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
@ -61,7 +61,7 @@ public class GhostfireBlade extends CardImpl {
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3)));
// Ghostfire Blade's equip ability costs {2} less to activate if it targets a colorless creature.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EmptyEffect("{this}'s equip ability costs {2} less to activate if it targets a colorless creature")));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("{this}'s equip ability costs {2} less to activate if it targets a colorless creature")));
}
@Override
public void adjustCosts(Ability ability, Game game) {

View file

@ -111,7 +111,7 @@ class HoodedHydraEffect1 extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null && !permanent.isFaceDown()) {
if (permanent != null && !permanent.isFaceDown(game)) {
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
if (obj != null && obj instanceof SpellAbility) {
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();

View file

@ -184,7 +184,7 @@ class LensOfClarityLookFaceDownEffect extends OneShotEffect {
Permanent faceDownCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
if (faceDownCreature != null) {
Permanent copyFaceDown = faceDownCreature.copy();
copyFaceDown.setFaceDown(false);
copyFaceDown.setFaceDown(false, game);
Cards cards = new CardsImpl();
cards.add(copyFaceDown);
Player player = game.getPlayer(faceDownCreature.getControllerId());

View file

@ -107,7 +107,7 @@ class PonybackBrigadeAbility extends TriggeredAbilityImpl {
}
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId()) ) {
Permanent sourcePermanent = game.getPermanent(getSourceId());
if (sourcePermanent != null && !sourcePermanent.isFaceDown()) {
if (sourcePermanent != null && !sourcePermanent.isFaceDown(game)) {
return true;
}
}

View file

@ -112,7 +112,7 @@ class SmokeTellerLookFaceDownEffect extends OneShotEffect {
Permanent faceDownCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
if (faceDownCreature != null) {
Permanent copyFaceDown = faceDownCreature.copy();
copyFaceDown.setFaceDown(false);
copyFaceDown.setFaceDown(false, game);
Cards cards = new CardsImpl();
cards.add(copyFaceDown);
player.lookAtCards("face down card - " + mageObject.getLogName(), cards, game);

View file

@ -29,10 +29,9 @@ package mage.sets.lorwyn;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@ -41,7 +40,6 @@ import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
/**
*
@ -64,7 +62,7 @@ public class OonasProwler extends CardImpl {
// Discard a card: Oona's Prowler gets -2/-0 until end of turn. Any player may activate this ability.
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-2,-0, Duration.EndOfTurn) , new DiscardCardCost());
ability.setMayActivate(TargetController.ANY);
ability.addEffect(new EmptyEffect("Any player may activate this ability"));
ability.addEffect(new InfoEffect("Any player may activate this ability"));
this.addAbility(ability);
}

View file

@ -136,7 +136,7 @@ class FaceUpPredicate implements Predicate<Card> {
@Override
public boolean apply(Card input, Game game) {
return !input.isFaceDown();
return !input.isFaceDown(game);
}
@Override

View file

@ -28,12 +28,13 @@
package mage.sets.nemesis;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.ExileTargetForSourceEffect;
import mage.abilities.keyword.FadingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
@ -46,6 +47,7 @@ import mage.game.ExileZone;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import mage.util.CardUtil;
/**
*
@ -63,7 +65,7 @@ public class ParallaxWave extends CardImpl {
this.addAbility(new FadingAbility(5, this));
// Remove a fade counter from Parallax Wave: Exile target creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(this.getId(), this.getName()), new RemoveCountersSourceCost(CounterType.FADE.createInstance()));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetForSourceEffect(), new RemoveCountersSourceCost(CounterType.FADE.createInstance()));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
@ -100,16 +102,22 @@ class ParallaxWaveEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
if (exileZone != null) {
for (Card card: exileZone.getCards(game)) {
Player player = game.getPlayer(card.getOwnerId());
if (player != null) {
player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
MageObject sourceObject = source.getSourceObject(game);
if (sourceObject != null) {
UUID exileZoneId = CardUtil.getObjectExileZoneId(game, sourceObject);
if (exileZoneId != null) {
ExileZone exileZone = game.getExile().getExileZone(exileZoneId);
if (exileZone != null) {
for (Card card: exileZone.getCards(game)) {
Player player = game.getPlayer(card.getOwnerId());
if (player != null) {
player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
}
}
exileZone.clear();
}
return true;
}
exileZone.clear();
return true;
}
return false;
}

View file

@ -105,9 +105,9 @@ class PraetorsGraspEffect extends OneShotEffect {
Card card = opponent.getLibrary().getCard(targetId, game);
UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject);
if (card != null && exileId != null) {
card.setFaceDown(true);
game.informPlayers(controller.getName() + " moves the searched card face down to exile");
card.moveToExile(exileId, sourceObject.getName(), source.getSourceId(), game);
card.setFaceDown(true, game);
game.addEffect(new PraetorsGraspPlayEffect(card.getId()), source);
game.addEffect(new PraetorsGraspRevealEffect(card.getId()), source);
}

View file

@ -30,12 +30,11 @@ package mage.sets.odyssey;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -65,7 +64,7 @@ public class DiligentFarmhand extends CardImpl {
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
// If Diligent Farmhand is in a graveyard, effects from spells named Muscle Burst count it as a card named Muscle Burst.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new EmptyEffect("If Diligent Farmhand is in a graveyard, effects from spells named Muscle Burst count it as a card named Muscle Burst")));
this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("If Diligent Farmhand is in a graveyard, effects from spells named Muscle Burst count it as a card named Muscle Burst")));
}
public DiligentFarmhand(final DiligentFarmhand card) {

View file

@ -106,7 +106,7 @@ class PrimalPlasmaReplacementEffect extends ReplacementEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getSourceId())) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent != null && !sourcePermanent.isFaceDown()) {
if (sourcePermanent != null && !sourcePermanent.isFaceDown(game)) {
return true;
}
}

View file

@ -101,8 +101,8 @@ class BottledCloisterExileEffect extends OneShotEffect {
if (numberOfCards > 0) {
UUID exileId = CardUtil.getCardExileZoneId(game, source);
for (Card card: controller.getHand().getCards(game)) {
card.setFaceDown(true);
card.moveToExile(exileId, sourcePermanent.getName(), source.getSourceId(), game);
card.setFaceDown(true, game);
}
game.informPlayers(sourcePermanent.getName() + ": " + controller.getName() + " exiles his or her hand face down (" + numberOfCards + "card" + (numberOfCards > 1 ?"s":"") +")");
}
@ -140,8 +140,8 @@ class BottledCloisterReturnEffect extends OneShotEffect {
for (Card card: exileZone.getCards(game)) {
if (card.getOwnerId().equals(controller.getId())) {
numberOfCards++;
card.setFaceDown(false);
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
card.setFaceDown(false, game);
}
}
}

View file

@ -29,9 +29,9 @@ package mage.sets.saviorsofkamigawa;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.keyword.SpliceOntoArcaneAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -52,7 +52,7 @@ public class Evermind extends CardImpl {
this.color.setBlue(true);
// <i>(Nonexistent mana costs can't be paid.)</i>
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EmptyEffect("<i>(Nonexistent mana costs can't be paid.)</i>"));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("<i>(Nonexistent mana costs can't be paid.)</i>"));
ability.setRuleAtTheTop(true);
this.addAbility(ability);

View file

@ -29,10 +29,10 @@ package mage.sets.saviorsofkamigawa;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
@ -66,7 +66,7 @@ public class ONaginata extends CardImpl {
this.subtype.add("Equipment");
// O-Naginata can be attached only to a creature with 3 or more power.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EmptyEffect("{this} can be attached only to a creature with 3 or more power")));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("{this} can be attached only to a creature with 3 or more power")));
// Equipped creature gets +3/+0 and has trample.
Effect effect = new BoostEquippedEffect(3, 0);

View file

@ -113,8 +113,8 @@ class CloneShellEffect extends OneShotEffect {
Card card = cards.get(target1.getFirstTarget(), game);
if (card != null) {
cards.remove(card);
card.setFaceDown(true);
card.moveToExile(getId(), "Clone Shell (Imprint)", source.getSourceId(), game);
card.setFaceDown(true, game);
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.imprint(card.getId(), game);
@ -166,7 +166,7 @@ class CloneShellDiesEffect extends OneShotEffect {
List<UUID> imprinted = permanent.getImprinted();
if (imprinted.size() > 0) {
Card imprintedCard = game.getCard(imprinted.get(0));
imprintedCard.setFaceDown(false);
imprintedCard.setFaceDown(false, game);
if (imprintedCard.getCardType().contains(CardType.CREATURE)) {
imprintedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId());
}

View file

@ -29,8 +29,8 @@ package mage.sets.seventhedition;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EmptyEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardsImpl;
@ -73,7 +73,7 @@ class RowenAbility extends TriggeredAbilityImpl {
private int lastTriggeredTurn;
RowenAbility() {
super(Zone.BATTLEFIELD, new EmptyEffect(""), false);
super(Zone.BATTLEFIELD, new InfoEffect(""), false);
}
RowenAbility(final RowenAbility ability) {

View file

@ -28,18 +28,22 @@
package mage.sets.shardsofalara;
import java.util.UUID;
import mage.constants.*;
import static javax.xml.bind.JAXBIntrospector.getValue;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.common.EmptyEffect;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -65,7 +69,7 @@ public class FeralHydra extends CardImpl {
// {3}: Put a +1/+1 counter on Feral Hydra. Any player may activate this ability.
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()) , new ManaCostsImpl("{3}"));
ability.setMayActivate(TargetController.ANY);
ability.addEffect(new EmptyEffect("Any player may activate this ability"));
ability.addEffect(new InfoEffect("Any player may activate this ability"));
this.addAbility(ability);
}

View file

@ -33,7 +33,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EmptyEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.constants.Duration;
@ -77,7 +77,7 @@ public class Manaplasm extends CardImpl {
class ManaplasmAbility extends TriggeredAbilityImpl {
public ManaplasmAbility() {
super(Zone.BATTLEFIELD, new EmptyEffect("{this} gets +X/+X until end of turn, where X is that spell's converted mana cost"), false);
super(Zone.BATTLEFIELD, new InfoEffect("{this} gets +X/+X until end of turn, where X is that spell's converted mana cost"), false);
}

View file

@ -29,15 +29,15 @@
package mage.sets.shardsofalara;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.effects.common.ExileTargetForSourceEffect;
import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.Target;
@ -58,7 +58,6 @@ public class OblivionRing extends CardImpl {
public OblivionRing(UUID ownerId) {
super(ownerId, 20, "Oblivion Ring", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
this.expansionSetCode = "ALA";
this.color.setWhite(true);
// When Oblivion Ring enters the battlefield, exile another target nonland permanent.
Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), false);

View file

@ -115,7 +115,7 @@ class AquamorphEntityReplacementEffect extends ReplacementEffectImpl {
if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD) {
if (event.getTargetId().equals(source.getSourceId())) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent != null && !sourcePermanent.isFaceDown()) {
if (sourcePermanent != null && !sourcePermanent.isFaceDown(game)) {
return true;
}
}

View file

@ -101,8 +101,8 @@ class ScrollRackEffect extends OneShotEffect {
for (UUID targetId : targets) {
Card card = game.getCard(targetId);
if (card != null) {
card.setFaceDown(true);
if (card.moveToExile(source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game)) {
card.setFaceDown(true, game);
amountExiled++;
}
}

View file

@ -122,10 +122,10 @@ class PyxisOfPandemoniumExileEffect extends OneShotEffect {
exileId = UUID.randomUUID();
exileIds.put(exileKey, exileId);
}
card.setFaceDown(true);
player.moveCardToExileWithInfo(card, exileId,
new StringBuilder(sourceObject.getLogName() +" (").append(player.getName()).append(")").toString(),
source.getSourceId(), game, Zone.LIBRARY);
card.setFaceDown(true, game);
}
}
}
@ -173,7 +173,7 @@ class PyxisOfPandemoniumPutOntoBattlefieldEffect extends OneShotEffect {
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
if (exileZone != null) {
for(Card card: exileZone.getCards(game)) {
card.setFaceDown(false);
// card.setFaceDown(false, game);
if (CardUtil.isPermanentCard(card)) {
player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
}

View file

@ -248,7 +248,7 @@ class RescueFromTheUnderworldReturnEffect extends OneShotEffect {
if (source.getTargets().get(1) != null) {
for (UUID targetId: ((Target) source.getTargets().get(1)).getTargets()) {
Card card = game.getCard(targetId);
if (card != null && !card.isFaceDown()) {
if (card != null && !card.isFaceDown(game)) {
Player player = game.getPlayer(card.getOwnerId());
if (player != null) {
Zone currentZone = game.getState().getZone(card.getId());

View file

@ -27,9 +27,7 @@
*/
package mage.sets.urzasdestiny;
import java.util.Iterator;
import java.util.UUID;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
@ -87,7 +85,7 @@ class OpalescenceEffect extends ContinuousEffectImpl {
public OpalescenceEffect() {
super(Duration.WhileOnBattlefield, Outcome.BecomeCreature);
staticText = "Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost.";
staticText = "Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost";
}
public OpalescenceEffect(final OpalescenceEffect effect) {

View file

@ -107,8 +107,8 @@ class MemoryJarEffect extends OneShotEffect {
Card card = hand.get(hand.iterator().next(), game);
if(card != null)
{
card.setFaceDown(true);
card.moveToExile(getId(), "Memory Jar", source.getSourceId(), game);
card.setFaceDown(true, game);
cards.add(card);
}
}

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