1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-02 03:18:09 -09:00

Implemented Arctic Foxes

This commit is contained in:
Evan Kranzler 2019-10-03 12:51:00 -04:00
parent ef69aa7326
commit 6c27ccd8a6
2 changed files with 75 additions and 0 deletions
Mage.Sets/src/mage

View file

@ -0,0 +1,74 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.game.Game;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ArcticFoxes extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 1));
}
public ArcticFoxes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.FOX);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Creatures with power 2 or greater can't block Arctic Foxes as long as defending player controls a snow land.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield),
ArcticFoxesCondition.instance, "creatures with power 2 or greater can't block {this}" +
" as long as defending player controls a snow land"
)));
}
private ArcticFoxes(final ArcticFoxes card) {
super(card);
}
@Override
public ArcticFoxes copy() {
return new ArcticFoxes(this);
}
}
enum ArcticFoxesCondition implements Condition {
instance;
private static final FilterPermanent filter = new FilterLandPermanent();
static {
filter.add(new SupertypePredicate(SuperType.SNOW));
}
@Override
public boolean apply(Game game, Ability source) {
UUID defenderId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game);
if (defenderId == null) {
return false;
}
return game.getBattlefield().contains(filter, defenderId, 1, game);
}
}

View file

@ -32,6 +32,7 @@ public final class IceAge extends ExpansionSet {
cards.add(new SetCardInfo("Aggression", 169, Rarity.UNCOMMON, mage.cards.a.Aggression.class));
cards.add(new SetCardInfo("Altar of Bone", 281, Rarity.RARE, mage.cards.a.AltarOfBone.class));
cards.add(new SetCardInfo("Anarchy", 170, Rarity.UNCOMMON, mage.cards.a.Anarchy.class));
cards.add(new SetCardInfo("Arctic Foxes", 226, Rarity.COMMON, mage.cards.a.ArcticFoxes.class));
cards.add(new SetCardInfo("Arenson's Aura", 3, Rarity.COMMON, mage.cards.a.ArensonsAura.class));
cards.add(new SetCardInfo("Armor of Faith", 4, Rarity.COMMON, mage.cards.a.ArmorOfFaith.class));
cards.add(new SetCardInfo("Arnjlot's Ascent", 57, Rarity.COMMON, mage.cards.a.ArnjlotsAscent.class));