Card fixes DeclarationInStone, Odric, WolfOfDevil (SOI)

This commit is contained in:
drmDev 2016-03-28 01:22:56 -04:00
parent a15f206233
commit 582bd1b4bb
3 changed files with 15 additions and 3 deletions

View file

@ -36,6 +36,9 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.ClueArtifactToken;
@ -70,6 +73,11 @@ public class DeclarationInStone extends CardImpl {
}
class DeclarationInStoneEffect extends OneShotEffect {
private static final FilterCreaturePermanent nonTokenFilter = new FilterCreaturePermanent("nontoken creature");
static{
nonTokenFilter.add(Predicates.not(new TokenPredicate()));
}
public DeclarationInStoneEffect() {
super(Outcome.Exile);
@ -99,7 +107,11 @@ class DeclarationInStoneEffect extends OneShotEffect {
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controllerPermanentId)) {
if (permanent != null && permanent.getName().equals(name)) {
you.moveCardToExileWithInfo(permanent, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true);
exiledCount++;
// exiled count only matters for non-tokens
if (nonTokenFilter.match(permanent, game)) {
exiledCount++;
}
}
}
}

View file

@ -72,7 +72,7 @@ public class OdricLunarchMarshal extends CardImpl {
this.toughness = new MageInt(3);
// At the beginning of each combat, creatures you control gain first strike until end of turn if a creature you control has first strike. The same is true for flying, deathtouch, double strike, haste, hexproof, indestructible, lifelink, menace, reach, skulk, trample, and vigilance.
this.addAbility(new BeginningOfCombatTriggeredAbility(new OdricLunarchMarshalEffect(), TargetController.YOU, false));
this.addAbility(new BeginningOfCombatTriggeredAbility(new OdricLunarchMarshalEffect(), TargetController.ANY, false));
}
public OdricLunarchMarshal(final OdricLunarchMarshal card) {

View file

@ -57,7 +57,7 @@ public class WolfOfDevilsBreach extends CardImpl {
// Whenever Wolf of Devil's Breach attacks, you may pay {1}{R} and discard a card. If you do, Wolf of Devil's Breach deals
// damage to target creature or planeswalker equal to the discarded card's converted mana cost.
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new DamageTargetEffect(new DiscardCostCardConvertedMana()), new ManaCostsImpl("{1}{R}")), false,
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(new DamageTargetEffect(new DiscardCostCardConvertedMana()), new ManaCostsImpl("{1}{R}")), true,
"Whenever {this} attacks you may pay {1}{R} and discard a card. If you do, {this} deals damage to target creature or planeswalker "
+ "equal to the discarded card's converted mana cost.");
ability.addCost(new DiscardCardCost());