This commit is contained in:
Loki 2012-08-01 22:52:28 +12:00
parent 8d5f4f6214
commit a2a560264a
4 changed files with 43 additions and 13 deletions

View file

@ -34,8 +34,8 @@ import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.ShroudAbility; import mage.abilities.keyword.ShroudAbility;
import mage.abilities.keyword.VanishingAbility; import mage.abilities.keyword.VanishingSacrificeAbility;
import mage.abilities.keyword.VanishingTriggeredAbility; import mage.abilities.keyword.VanishingUpkeepAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.counters.CounterType; import mage.counters.CounterType;
@ -58,8 +58,8 @@ public class Calciderm extends CardImpl<Calciderm> {
this.addAbility(ShroudAbility.getInstance()); this.addAbility(ShroudAbility.getInstance());
// Vanishing 4 // Vanishing 4
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(4)))); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(4))));
this.addAbility(new VanishingAbility()); this.addAbility(new VanishingUpkeepAbility());
this.addAbility(new VanishingTriggeredAbility()); this.addAbility(new VanishingSacrificeAbility());
} }
public Calciderm(final Calciderm card) { public Calciderm(final Calciderm card) {

View file

@ -0,0 +1,30 @@
package mage.abilities.keyword;
import mage.Constants;
import mage.abilities.StaticAbility;
import mage.abilities.effects.EntersBattlefieldEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.counters.CounterType;
/**
* Modular keyword static part
* @author Loki
*/
public class ModularStaticAbility extends StaticAbility<ModularStaticAbility> {
private int amount;
public ModularStaticAbility(int amount) {
super(Constants.Zone.BATTLEFIELD, new EntersBattlefieldEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(amount))));
this.amount = amount;
}
public ModularStaticAbility(final ModularStaticAbility ability) {
super(ability);
this.amount = ability.amount;
}
@Override
public ModularStaticAbility copy() {
return new ModularStaticAbility(this);
}
}

View file

@ -8,12 +8,12 @@ import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
public class VanishingTriggeredAbility extends TriggeredAbilityImpl<VanishingTriggeredAbility> { public class VanishingSacrificeAbility extends TriggeredAbilityImpl<VanishingSacrificeAbility> {
public VanishingTriggeredAbility() { public VanishingSacrificeAbility() {
super(Constants.Zone.BATTLEFIELD, new SacrificeSourceEffect()); super(Constants.Zone.BATTLEFIELD, new SacrificeSourceEffect());
} }
public VanishingTriggeredAbility(final VanishingTriggeredAbility ability) { public VanishingSacrificeAbility(final VanishingSacrificeAbility ability) {
super(ability); super(ability);
} }
@ -29,8 +29,8 @@ public class VanishingTriggeredAbility extends TriggeredAbilityImpl<VanishingTri
} }
@Override @Override
public VanishingTriggeredAbility copy() { public VanishingSacrificeAbility copy() {
return new VanishingTriggeredAbility(this); return new VanishingSacrificeAbility(this);
} }
@Override @Override

View file

@ -8,18 +8,18 @@ import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
public class VanishingAbility extends BeginningOfUpkeepTriggeredAbility { public class VanishingUpkeepAbility extends BeginningOfUpkeepTriggeredAbility {
public VanishingAbility() { public VanishingUpkeepAbility() {
super(new VanishingEffect(), Constants.TargetController.YOU, false); super(new VanishingEffect(), Constants.TargetController.YOU, false);
} }
public VanishingAbility(final VanishingAbility ability) { public VanishingUpkeepAbility(final VanishingUpkeepAbility ability) {
super(ability); super(ability);
} }
@Override @Override
public BeginningOfUpkeepTriggeredAbility copy() { public BeginningOfUpkeepTriggeredAbility copy() {
return new VanishingAbility(this); return new VanishingUpkeepAbility(this);
} }
@Override @Override