Fixed that Noxious Gearhulk could target itself

This commit is contained in:
Styxo 2016-10-04 15:08:25 +02:00
parent 16027d5fef
commit 9bee036fe8

View file

@ -37,6 +37,8 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -48,6 +50,12 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class NoxiousGearhulk extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature");
static {
filter.add(new AnotherPredicate());
}
public NoxiousGearhulk(UUID ownerId) {
super(ownerId, 96, "Noxious Gearhulk", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{B}{B}");
this.expansionSetCode = "KLD";
@ -60,7 +68,7 @@ public class NoxiousGearhulk extends CardImpl {
// When Noxious Gearhulk enters the battlefield, you may destroy another target creature. If a creature is destroyed this way, you gain life equal to its toughness.
Ability ability = new EntersBattlefieldTriggeredAbility(new NoxiousGearhulkEffect());
ability.addTarget(new TargetCreaturePermanent());
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
}