diff --git a/Mage.Sets/src/mage/sets/planarchaos/Calciderm.java b/Mage.Sets/src/mage/sets/planarchaos/Calciderm.java index 07c3883f14..d6654b588a 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/Calciderm.java +++ b/Mage.Sets/src/mage/sets/planarchaos/Calciderm.java @@ -34,8 +34,8 @@ import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.ShroudAbility; -import mage.abilities.keyword.VanishingAbility; -import mage.abilities.keyword.VanishingTriggeredAbility; +import mage.abilities.keyword.VanishingSacrificeAbility; +import mage.abilities.keyword.VanishingUpkeepAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -58,8 +58,8 @@ public class Calciderm extends CardImpl { this.addAbility(ShroudAbility.getInstance()); // Vanishing 4 this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(4)))); - this.addAbility(new VanishingAbility()); - this.addAbility(new VanishingTriggeredAbility()); + this.addAbility(new VanishingUpkeepAbility()); + this.addAbility(new VanishingSacrificeAbility()); } public Calciderm(final Calciderm card) { diff --git a/Mage/src/mage/abilities/keyword/ModularStaticAbility.java b/Mage/src/mage/abilities/keyword/ModularStaticAbility.java new file mode 100644 index 0000000000..632f22f37f --- /dev/null +++ b/Mage/src/mage/abilities/keyword/ModularStaticAbility.java @@ -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 { + 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); + } +} diff --git a/Mage/src/mage/abilities/keyword/VanishingTriggeredAbility.java b/Mage/src/mage/abilities/keyword/VanishingSacrificeAbility.java similarity index 76% rename from Mage/src/mage/abilities/keyword/VanishingTriggeredAbility.java rename to Mage/src/mage/abilities/keyword/VanishingSacrificeAbility.java index bf41009548..89ee4c9038 100644 --- a/Mage/src/mage/abilities/keyword/VanishingTriggeredAbility.java +++ b/Mage/src/mage/abilities/keyword/VanishingSacrificeAbility.java @@ -8,12 +8,12 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -public class VanishingTriggeredAbility extends TriggeredAbilityImpl { - public VanishingTriggeredAbility() { +public class VanishingSacrificeAbility extends TriggeredAbilityImpl { + public VanishingSacrificeAbility() { super(Constants.Zone.BATTLEFIELD, new SacrificeSourceEffect()); } - public VanishingTriggeredAbility(final VanishingTriggeredAbility ability) { + public VanishingSacrificeAbility(final VanishingSacrificeAbility ability) { super(ability); } @@ -29,8 +29,8 @@ public class VanishingTriggeredAbility extends TriggeredAbilityImpl