Fixed that Yeva, Natures Herald could cast spells from everywhere. Fixed wrong target of Relic of Progenitus. Fiexed rule text of Chromatic star.

This commit is contained in:
LevelX2 2013-02-22 00:48:05 +01:00
parent 44708e6c4b
commit 541e1cd2a9
3 changed files with 14 additions and 7 deletions

View file

@ -27,6 +27,7 @@
*/ */
package mage.sets.magic2013; package mage.sets.magic2013;
import java.util.LinkedHashMap;
import java.util.UUID; import java.util.UUID;
import mage.Constants.AsThoughEffectType; import mage.Constants.AsThoughEffectType;
import mage.Constants.CardType; import mage.Constants.CardType;
@ -36,12 +37,14 @@ import mage.Constants.Rarity;
import mage.Constants.Zone; import mage.Constants.Zone;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.ActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlashAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game; import mage.game.Game;
import mage.players.PlayerImpl;
/** /**
* *
@ -103,7 +106,8 @@ class YevaNaturesHeraldEffect extends AsThoughEffectImpl<YevaNaturesHeraldEffect
if (card != null) { if (card != null) {
if (card.getCardType().contains(CardType.CREATURE) && card.getColor().isGreen() if (card.getCardType().contains(CardType.CREATURE) && card.getColor().isGreen()
&& card.getOwnerId().equals(source.getControllerId())) { && card.getOwnerId().equals(source.getControllerId())) {
return true; // TODO: Maybe this check is not enough
return card.getSpellAbility().isInUseableZone(game, card, false);
} }
} }
return false; return false;

View file

@ -28,7 +28,6 @@
package mage.sets.shardsofalara; package mage.sets.shardsofalara;
import java.util.UUID; import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Outcome; import mage.Constants.Outcome;
import mage.Constants.Rarity; import mage.Constants.Rarity;
@ -41,10 +40,12 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.predicate.other.OwnerIdPredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInGraveyard;
/** /**
* *
@ -97,7 +98,9 @@ class RelicOfProgenitusEffect extends OneShotEffect<RelicOfProgenitusEffect> {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player targetPlayer = game.getPlayer(source.getFirstTarget()); Player targetPlayer = game.getPlayer(source.getFirstTarget());
if (targetPlayer != null) { if (targetPlayer != null) {
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(); FilterCard filter = new FilterCard("card from your graveyard");
filter.add(new OwnerIdPredicate(targetPlayer.getId()));
TargetCardInGraveyard target = new TargetCardInGraveyard(filter);
target.setRequired(true); target.setRequired(true);
if (targetPlayer.chooseTarget(Outcome.Exile, target, source, game)) { if (targetPlayer.chooseTarget(Outcome.Exile, target, source, game)) {
Card card = game.getCard(target.getFirstTarget()); Card card = game.getCard(target.getFirstTarget());
@ -115,7 +118,7 @@ class RelicOfProgenitusEffect extends OneShotEffect<RelicOfProgenitusEffect> {
class RelicOfProgenitusEffect2 extends OneShotEffect<RelicOfProgenitusEffect2> { class RelicOfProgenitusEffect2 extends OneShotEffect<RelicOfProgenitusEffect2> {
public RelicOfProgenitusEffect2() { public RelicOfProgenitusEffect2() {
super(Constants.Outcome.Detriment); super(Outcome.Detriment);
staticText = "Exile all cards from all graveyards"; staticText = "Exile all cards from all graveyards";
} }

View file

@ -31,7 +31,7 @@ import java.util.UUID;
import mage.Constants.CardType; import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
@ -52,7 +52,7 @@ public class ChromaticStar extends CardImpl<ChromaticStar> {
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
this.addAbility(ability); this.addAbility(ability);
this.addAbility(new DiesTriggeredAbility(new DrawCardControllerEffect(1))); this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new DrawCardControllerEffect(1)));
} }
public ChromaticStar(final ChromaticStar card) { public ChromaticStar(final ChromaticStar card) {