* Fixed traget definition of Blood Feud and Dissension in the Ranks.

This commit is contained in:
LevelX2 2016-07-31 10:24:28 +02:00
parent 7d9a4db8b6
commit e9c994d8e5
4 changed files with 31 additions and 21 deletions

View file

@ -28,14 +28,12 @@
package mage.sets.darkascension;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
/**
@ -50,7 +48,15 @@ public class BloodFeud extends CardImpl {
// Target creature fights another target creature.
this.getSpellAbility().addEffect(new FightTargetsEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2));
TargetCreaturePermanent target = new TargetCreaturePermanent();
target.setTargetTag(1);
this.getSpellAbility().addTarget(target);
FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature");
filter.add(new AnotherTargetPredicate(2));
TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter);
target2.setTargetTag(2);
this.getSpellAbility().addTarget(target2);
}
public BloodFeud(final BloodFeud card) {

View file

@ -30,12 +30,10 @@ package mage.sets.gatecrash;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
import mage.game.Game;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
@ -49,13 +47,12 @@ public class PitFight extends CardImpl {
super(ownerId, 223, "Pit Fight", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R/G}");
this.expansionSetCode = "GTC";
// Target creature you control fights another target creature.
this.getSpellAbility().addEffect(new FightTargetsEffect());
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent();
target.setTargetTag(1);
this.getSpellAbility().addTarget(target);
FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature to fight");
filter.add(new AnotherTargetPredicate(2));
TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter);

View file

@ -28,14 +28,13 @@
package mage.sets.shadowsoverinnistrad;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
import mage.filter.predicate.permanent.BlockingPredicate;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
/**
@ -56,8 +55,16 @@ public class DissensionInTheRanks extends CardImpl {
// Target blocking creature fights another target blocking creature.
this.getSpellAbility().addEffect(new FightTargetsEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2, 2, filter, false));
TargetCreaturePermanent target = new TargetCreaturePermanent(1, 1, filter, false);
target.setTargetTag(1);
this.getSpellAbility().addTarget(target);
FilterCreaturePermanent filter2 = new FilterCreaturePermanent("another target blocking creature");
filter2.add(new AnotherTargetPredicate(2));
filter2.add(new BlockingPredicate());
TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter2);
target2.setTargetTag(2);
this.getSpellAbility().addTarget(target2);
}
public DissensionInTheRanks(final DissensionInTheRanks card) {

View file

@ -1,16 +1,16 @@
/*
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
@ -20,19 +20,19 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.effects.common;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -65,8 +65,9 @@ public class FightTargetsEffect extends OneShotEffect {
}
}
}
if (!game.isSimulation())
if (!game.isSimulation()) {
game.informPlayers(card.getName() + " has been fizzled.");
}
}
return false;
}
@ -85,4 +86,3 @@ public class FightTargetsEffect extends OneShotEffect {
}
}