Fixed that Daretti, Ingenious Iconoclast's -1 ability targeted an artifact creature instead of artifact or creature. Fixed that Order of Succession's choosing of creatures was targeted.

This commit is contained in:
fireshoes 2016-10-09 23:39:11 -05:00
parent 5dd06d22d8
commit 5009c2c149
2 changed files with 147 additions and 137 deletions

View file

@ -43,9 +43,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.StaticFilters;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterArtifactCard;
import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.permanent.token.Token;
import mage.target.TargetPermanent;
@ -58,6 +60,14 @@ import mage.target.common.TargetControlledPermanent;
*/
public class DarettiIngeniousIconoclast extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
static {
filter.add(Predicates.or(
new CardTypePredicate(CardType.ARTIFACT),
new CardTypePredicate(CardType.CREATURE)));
}
public DarettiIngeniousIconoclast(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{1}{B}{R}");
this.subtype.add("Daretti");
@ -72,7 +82,7 @@ public class DarettiIngeniousIconoclast extends CardImpl {
ability = new LoyaltyAbility(
new DoIfCostPaid(new DestroyTargetEffect(""), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))),
-1);
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ARTIFACT_CREATURE_PERMANENT));
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// -6: Choose target artifact card in a graveyard or artifact on the battlefield. Put three tokens that are copies of it onto the battlefield.

View file

@ -125,7 +125,7 @@ class OrderOfSuccessionEffect extends OneShotEffect {
FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(nextPlayer.getLogName()).toString());
filter.add(new ControllerIdPredicate(nextPlayer.getId()));
Target target = new TargetCreaturePermanent(filter);
target.setNotTarget(false);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), currentPlayer.getId(), game)) {
if (currentPlayer.chooseTarget(outcome, target, source, game)) {
playerCreature.put(currentPlayer.getId(), target.getFirstTarget());