Thermal Detonator fixed filter handling.

This commit is contained in:
LevelX2 2018-08-15 10:09:36 +02:00
parent 35c77a1e5f
commit fb800c66bc

View file

@ -1,7 +1,6 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
@ -13,6 +12,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreatureOrPlayer; import mage.filter.common.FilterCreatureOrPlayer;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.target.common.TargetCreatureOrPlayer; import mage.target.common.TargetCreatureOrPlayer;
@ -24,14 +24,15 @@ import mage.target.common.TargetCreatureOrPlayer;
public final class ThermalDetonator extends CardImpl { public final class ThermalDetonator extends CardImpl {
private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("creature without spaceflight or target player"); private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("creature without spaceflight or target player");
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent();
static { static {
filter.add(Predicates.not(new AbilityPredicate(SpaceflightAbility.class))); filterCreature.add(Predicates.not(new AbilityPredicate(SpaceflightAbility.class)));
filter.setCreatureFilter(filterCreature);
} }
public ThermalDetonator(UUID ownerId, CardSetInfo setInfo) { public ThermalDetonator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
// {2}, Sacrifice Thermal Detonator: Thermal Detonator deals 2 damage to target creature without spaceflight or target player. // {2}, Sacrifice Thermal Detonator: Thermal Detonator deals 2 damage to target creature without spaceflight or target player.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}"));