Reimplemented with ConditionalStaticAbility

This commit is contained in:
magenoxx 2011-08-19 06:29:04 +04:00
parent a323cdfadb
commit 161404242f

View file

@ -27,6 +27,8 @@
*/ */
package mage.sets.magic2012; package mage.sets.magic2012;
import static mage.Constants.Zone;
import java.util.UUID; import java.util.UUID;
import mage.Constants; import mage.Constants;
@ -55,6 +57,8 @@ import mage.game.permanent.Permanent;
*/ */
public class PrimordialHydra extends CardImpl<PrimordialHydra> { public class PrimordialHydra extends CardImpl<PrimordialHydra> {
private final static String staticText = "{this} has trample as long as it has ten or more +1/+1 counters on it";
public PrimordialHydra(UUID ownerId) { public PrimordialHydra(UUID ownerId) {
super(ownerId, 189, "Primordial Hydra", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{X}{G}{G}"); super(ownerId, 189, "Primordial Hydra", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{X}{G}{G}");
this.expansionSetCode = "M12"; this.expansionSetCode = "M12";
@ -66,7 +70,9 @@ public class PrimordialHydra extends CardImpl<PrimordialHydra> {
this.addAbility(new EntersBattlefieldAbility(new PrimordialHydraEntersEffect(), "{this} enters the battlefield with X +1/+1 counters on it")); this.addAbility(new EntersBattlefieldAbility(new PrimordialHydraEntersEffect(), "{this} enters the battlefield with X +1/+1 counters on it"));
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new PrimordialHydraDoubleEffect(), Constants.TargetController.YOU, false)); this.addAbility(new BeginningOfUpkeepTriggeredAbility(new PrimordialHydraDoubleEffect(), Constants.TargetController.YOU, false));
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Constants.Duration.WhileOnBattlefield), new HaveCounter(CounterType.P1P1, 10), "{this} has trample as long as it has ten or more +1/+1 counters on it"))); this.addAbility(new ConditionalStaticAbility(Zone.BATTLEFIELD,
new GainAbilitySourceEffect(TrampleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
new HaveCounter(CounterType.P1P1, 10), staticText));
} }
public PrimordialHydra(final PrimordialHydra card) { public PrimordialHydra(final PrimordialHydra card) {