Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions Mage.Sets/src/mage/cards/a/ArcumsWeathervane.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
package mage.cards.a;

import java.util.UUID;

import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.SuperType;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;

/**
*
* @author balazskristof
*/
public final class ArcumsWeathervane extends CardImpl {

private static final FilterLandPermanent filter = new FilterLandPermanent("snow land");
private static final FilterLandPermanent filter2 = new FilterLandPermanent("nonsnow basic land");

static {
filter.add(SuperType.SNOW.getPredicate());
filter2.add(SuperType.BASIC.getPredicate());
filter2.add(Predicates.not(SuperType.SNOW.getPredicate()));
}

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


// {2}, {tap}: Target snow land is no longer snow.
Ability ability = new SimpleActivatedAbility(new ArcumsWeatherwaneNoLongerSnowEffect(), new GenericManaCost(2));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to use the filters you defined

this.addAbility(ability);
// {2}, {tap}: Target nonsnow basic land becomes snow.
ability = new SimpleActivatedAbility(new ArcumsWeatherwaneBecomeSnowEffect(), new GenericManaCost(2));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent());
this.addAbility(ability);
}

private ArcumsWeathervane(final ArcumsWeathervane card) {
super(card);
}

@Override
public ArcumsWeathervane copy() {
return new ArcumsWeathervane(this);
}
}

class ArcumsWeatherwaneNoLongerSnowEffect extends ContinuousEffectImpl {

ArcumsWeatherwaneNoLongerSnowEffect() {
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duration.Custom for both effects, as lasts indefinitely

staticText = "Target snow land is no longer snow.";
}

private ArcumsWeatherwaneNoLongerSnowEffect(final ArcumsWeatherwaneNoLongerSnowEffect effect) {
super(effect);
}

@Override
public ArcumsWeatherwaneNoLongerSnowEffect copy() {
return new ArcumsWeatherwaneNoLongerSnowEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
Permanent land = game.getPermanent(getTargetPointer().getFirst(game, source));
if (land != null) {
land.removeSuperType(SuperType.SNOW);
return true;
}
return false;
}
}

class ArcumsWeatherwaneBecomeSnowEffect extends ContinuousEffectImpl {

ArcumsWeatherwaneBecomeSnowEffect() {
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
staticText = "Target nonsnow basic land becomes snow.";
}

private ArcumsWeatherwaneBecomeSnowEffect(final ArcumsWeatherwaneBecomeSnowEffect effect) {
super(effect);
}

@Override
public ArcumsWeatherwaneBecomeSnowEffect copy() {
return new ArcumsWeatherwaneBecomeSnowEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
Permanent land = game.getPermanent(getTargetPointer().getFirst(game, source));
if (land != null) {
land.addSuperType(SuperType.SNOW);
return true;
}
return false;
}
}
2 changes: 1 addition & 1 deletion Mage.Sets/src/mage/sets/ColdsnapThemeDecks.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private ColdsnapThemeDecks() {
this.hasBoosters = false;
this.hasBasicLands = true;

//cards.add(new SetCardInfo("Arcum's Weathervane", 310, Rarity.UNCOMMON, mage.cards.a.ArcumsWeathervane.class));
cards.add(new SetCardInfo("Arcum's Weathervane", 310, Rarity.UNCOMMON, mage.cards.a.ArcumsWeathervane.class));
cards.add(new SetCardInfo("Ashen Ghoul", 114, Rarity.UNCOMMON, mage.cards.a.AshenGhoul.class));
cards.add(new SetCardInfo("Aurochs", 225, Rarity.COMMON, mage.cards.a.Aurochs.class));
cards.add(new SetCardInfo("Balduvian Dead", 43, Rarity.UNCOMMON, mage.cards.b.BalduvianDead.class));
Expand Down
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/IceAge.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ private IceAge() {
cards.add(new SetCardInfo("Anarchy", 170, Rarity.UNCOMMON, mage.cards.a.Anarchy.class, RETRO_ART));
cards.add(new SetCardInfo("Arctic Foxes", 2, Rarity.COMMON, mage.cards.a.ArcticFoxes.class, RETRO_ART));
cards.add(new SetCardInfo("Arcum's Sleigh", 309, Rarity.UNCOMMON, mage.cards.a.ArcumsSleigh.class, RETRO_ART));
cards.add(new SetCardInfo("Arcum's Weathervane", 285, Rarity.UNCOMMON, mage.cards.a.ArcumsWeathervane.class));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cards.add(new SetCardInfo("Arenson's Aura", 3, Rarity.COMMON, mage.cards.a.ArensonsAura.class, RETRO_ART));
cards.add(new SetCardInfo("Armor of Faith", 4, Rarity.COMMON, mage.cards.a.ArmorOfFaith.class, RETRO_ART));
cards.add(new SetCardInfo("Arnjlot's Ascent", 57, Rarity.COMMON, mage.cards.a.ArnjlotsAscent.class, RETRO_ART));
Expand Down
Loading