[SWS] Fixed a bug of Hungry Dragonsnake.

This commit is contained in:
LevelX2 2016-09-29 18:00:00 +02:00
parent daf34c6bf0
commit 81b74c1519
3 changed files with 16 additions and 23 deletions

View file

@ -35,9 +35,11 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
/**
*
@ -45,7 +47,11 @@ import mage.filter.common.FilterCreaturePermanent;
*/
public class HungryDragonsnake extends CardImpl {
String rule = "Whenever a creature enters the battlefield under an opponents's control, put a +1/+1 counter on {this}.";
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("under an opponents's control");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));
}
public HungryDragonsnake(UUID ownerId) {
super(ownerId, 139, "Hungry Dragonsnake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
@ -59,7 +65,9 @@ public class HungryDragonsnake extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// Whenever a creature enters the battlefield under an opponents's control, put a +1/+1 counter on Hungry Dragonsnake.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new FilterCreaturePermanent(), false, rule, false));
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD,
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter, false,
"Whenever a creature enters the battlefield under an opponents's control, put a +1/+1 counter on {this}.", false));
}
public HungryDragonsnake(final HungryDragonsnake card) {

View file

@ -30,22 +30,17 @@ package mage.sets.starwars;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.TrooperToken;
import mage.target.common.TargetCreatureOrPlayer;
/**
@ -54,12 +49,6 @@ import mage.target.common.TargetCreatureOrPlayer;
*/
public class RocketTrooper extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures");
static {
filter.add(new SubtypePredicate("Trooper"));
}
public RocketTrooper(UUID ownerId) {
super(ownerId, 119, "Rocket Trooper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.expansionSetCode = "SWS";
@ -73,7 +62,9 @@ public class RocketTrooper extends CardImpl {
effect.setText("Whenever this creature enters the battlefield, it deals 1 damage to target creature or player");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false, true);
ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ability, Duration.Custom, filter, false)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield,
new FilterCreaturePermanent("Trooper", "Trooper creatures"), false)));
}

View file

@ -38,7 +38,6 @@ import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
/**
*
@ -46,12 +45,6 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
*/
public class SnowTrooper extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures");
static {
filter.add(new SubtypePredicate("Trooper"));
}
public SnowTrooper(UUID ownerId) {
super(ownerId, 30, "Snow Trooper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.expansionSetCode = "SWS";
@ -61,8 +54,9 @@ public class SnowTrooper extends CardImpl {
this.toughness = new MageInt(2);
// Trooper creatures you control have firststrike.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter, false)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield,
new FilterCreaturePermanent("Trooper", "Trooper creatures"), false)));
}
public SnowTrooper(final SnowTrooper card) {