diff --git a/Mage.Client/plugins/mage-card-plugin.jar b/Mage.Client/plugins/mage-card-plugin.jar index b595fc1386..219c2acf30 100644 Binary files a/Mage.Client/plugins/mage-card-plugin.jar and b/Mage.Client/plugins/mage-card-plugin.jar differ diff --git a/Mage.Sets/src/mage/sets/alarareborn/JenaraAsuraofWar.java b/Mage.Sets/src/mage/sets/alarareborn/JenaraAsuraofWar.java index bb8ab7d145..7f4225aa16 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/JenaraAsuraofWar.java +++ b/Mage.Sets/src/mage/sets/alarareborn/JenaraAsuraofWar.java @@ -35,9 +35,10 @@ import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.counters.CounterType; /** * @@ -56,7 +57,7 @@ public class JenaraAsuraofWar extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(FlyingAbility.getInstance()); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddPlusOneCountersSourceEffect(1), new ManaCostsImpl("{1}{W}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}{W}"))); } public JenaraAsuraofWar (final JenaraAsuraofWar card) { diff --git a/Mage.Sets/src/mage/sets/alarareborn/LorescaleCoatl.java b/Mage.Sets/src/mage/sets/alarareborn/LorescaleCoatl.java index 59cd036ae0..b5fa78ac75 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/LorescaleCoatl.java +++ b/Mage.Sets/src/mage/sets/alarareborn/LorescaleCoatl.java @@ -30,13 +30,13 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.game.Game; import mage.game.events.GameEvent; @@ -69,7 +69,7 @@ public class LorescaleCoatl extends CardImpl { class LorescaleCoatlAbility extends TriggeredAbilityImpl { public LorescaleCoatlAbility() { - super(Zone.BATTLEFIELD, new AddPlusOneCountersSourceEffect(1), true); + super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true); } public LorescaleCoatlAbility(final LorescaleCoatlAbility ability) { diff --git a/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java b/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java index ae73bbb24d..dbc02c67c6 100644 --- a/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java +++ b/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java @@ -34,8 +34,9 @@ import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; import mage.game.Game; @@ -85,7 +86,7 @@ class BloodhallOozeTriggeredAbility1 extends TriggeredAbilityImpl { + private final static FilterControlledPermanent filter = new FilterControlledPermanent("artifact"); + + static { + filter.getCardType().add(CardType.ARTIFACT); + filter.setScopeCardType(Filter.ComparisonScope.Any); + } + + public Esperzoa (UUID ownerId) { + super(ownerId, 25, "Esperzoa", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "CON"; + this.subtype.add("Jellyfish"); + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + this.addAbility(FlyingAbility.getInstance()); + Ability ability = new BeginningOfControllerUpkeepTriggeredAbility(new ReturnToHandTargetEffect(), false); + TargetControlledPermanent t = new TargetControlledPermanent(filter); + t.setRequired(true); + ability.addTarget(t); + this.addAbility(ability); + } + + public Esperzoa (final Esperzoa card) { + super(card); + } + + @Override + public Esperzoa copy() { + return new Esperzoa(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/conflux/ScarlandThrinax.java b/Mage.Sets/src/mage/sets/conflux/ScarlandThrinax.java index aac5239561..2f58124a5b 100644 --- a/Mage.Sets/src/mage/sets/conflux/ScarlandThrinax.java +++ b/Mage.Sets/src/mage/sets/conflux/ScarlandThrinax.java @@ -37,8 +37,9 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -56,7 +57,7 @@ public class ScarlandThrinax extends CardImpl { this.subtype.add("Lizard"); this.power = new MageInt(2); this.toughness = new MageInt(2); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddPlusOneCountersSourceEffect(1), new ManaCostsImpl()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/elspethvstezzeret/ClockworkCondor.java b/Mage.Sets/src/mage/sets/elspethvstezzeret/ClockworkCondor.java new file mode 100644 index 0000000000..3cb9828210 --- /dev/null +++ b/Mage.Sets/src/mage/sets/elspethvstezzeret/ClockworkCondor.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.elspethvstezzeret; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class ClockworkCondor extends mage.sets.mirrodin.ClockworkCondor { + + public ClockworkCondor (UUID ownerId) { + super(ownerId); + this.cardNumber = 50; + this.expansionSetCode = "DDF"; + } + + public ClockworkCondor (final ClockworkCondor card) { + super(card); + } + + @Override + public ClockworkCondor copy() { + return new ClockworkCondor(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/elspethvstezzeret/Esperzoa.java b/Mage.Sets/src/mage/sets/elspethvstezzeret/Esperzoa.java new file mode 100644 index 0000000000..1417eb9e8c --- /dev/null +++ b/Mage.Sets/src/mage/sets/elspethvstezzeret/Esperzoa.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.elspethvstezzeret; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class Esperzoa extends mage.sets.conflux.Esperzoa { + + public Esperzoa (UUID ownerId) { + super(ownerId); + this.cardNumber = 47; + this.expansionSetCode = "DDF"; + } + + public Esperzoa (final Esperzoa card) { + super(card); + } + + @Override + public Esperzoa copy() { + return new Esperzoa(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java b/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java index 9deaca0f73..2409a4610e 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java +++ b/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java @@ -42,7 +42,7 @@ import mage.abilities.LoyaltyAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.Effects; -import mage.abilities.effects.common.AddPlusOneCountersControlledEffect; +import mage.abilities.effects.common.counter.AddPlusOneCountersControlledEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.GainAbilityControlledEffect; import mage.abilities.effects.common.GainLifeEffect; diff --git a/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java b/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java index 3363f91a65..3577003801 100644 --- a/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java +++ b/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java @@ -42,9 +42,10 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.PreventionEffectImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.counters.common.PlusOneCounter; import mage.game.Game; import mage.game.events.GameEvent; @@ -203,7 +204,7 @@ public class ProteanHydra extends CardImpl { class ProteanHydraDelayedTriggeredAbility extends DelayedTriggeredAbility { public ProteanHydraDelayedTriggeredAbility() { - super(new AddPlusOneCountersSourceEffect(2)); + super(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2))); } public ProteanHydraDelayedTriggeredAbility(final ProteanHydraDelayedTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java b/Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java index 3e3250ef54..315ad1111c 100644 --- a/Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java +++ b/Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java @@ -34,8 +34,9 @@ import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -77,7 +78,7 @@ public class AjanisPridemate extends CardImpl { class AjanisPridemateAbility extends TriggeredAbilityImpl { public AjanisPridemateAbility() { - super(Zone.BATTLEFIELD, new AddPlusOneCountersSourceEffect(1), true); + super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true); } public AjanisPridemateAbility(final AjanisPridemateAbility ability) { diff --git a/Mage.Sets/src/mage/sets/magic2011/PrimalCocoon.java b/Mage.Sets/src/mage/sets/magic2011/PrimalCocoon.java index 1c89d0ab88..d474bbbd66 100644 --- a/Mage.Sets/src/mage/sets/magic2011/PrimalCocoon.java +++ b/Mage.Sets/src/mage/sets/magic2011/PrimalCocoon.java @@ -35,7 +35,7 @@ import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.AddPlusOneCountersAttachedEffect; +import mage.abilities.effects.common.counter.AddPlusOneCountersAttachedEffect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.DestroySourceEffect; import mage.abilities.keyword.EnchantAbility; diff --git a/Mage.Sets/src/mage/sets/magic2011/SteelOverseer.java b/Mage.Sets/src/mage/sets/magic2011/SteelOverseer.java index b650b8e72b..e0ab53d7f1 100644 --- a/Mage.Sets/src/mage/sets/magic2011/SteelOverseer.java +++ b/Mage.Sets/src/mage/sets/magic2011/SteelOverseer.java @@ -35,7 +35,7 @@ import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddPlusOneCountersControlledEffect; +import mage.abilities.effects.common.counter.AddPlusOneCountersControlledEffect; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.FilterPermanent; diff --git a/Mage.Sets/src/mage/sets/magic2011/Triskelion.java b/Mage.Sets/src/mage/sets/magic2011/Triskelion.java index 78eabf542b..4d573c97f7 100644 --- a/Mage.Sets/src/mage/sets/magic2011/Triskelion.java +++ b/Mage.Sets/src/mage/sets/magic2011/Triskelion.java @@ -37,9 +37,10 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -55,7 +56,7 @@ public class Triskelion extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new EntersBattlefieldAbility(new AddPlusOneCountersSourceEffect(3), "with three +1/+1 counters on it")); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost("+1/+1", 1)); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/mirrodin/ClockworkCondor.java b/Mage.Sets/src/mage/sets/mirrodin/ClockworkCondor.java new file mode 100644 index 0000000000..f71b970fe9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/ClockworkCondor.java @@ -0,0 +1,131 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.sets.mirrodin; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author Loki + */ +public class ClockworkCondor extends CardImpl { + + public ClockworkCondor (UUID ownerId) { + super(ownerId, 154, "Clockwork Condor", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Bird"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "Clockwork Condor enters the battlefield with three +1/+1 counters on it")); + this.addAbility(new AttacksOrBlocksTriggeredAbility(new ClockworkCondorEffect(), false)); + } + + public ClockworkCondor (final ClockworkCondor card) { + super(card); + } + + @Override + public ClockworkCondor copy() { + return new ClockworkCondor(this); + } +} + +class ClockworkCondorEffect extends OneShotEffect { + ClockworkCondorEffect() { + super(Constants.Outcome.UnboostCreature); + } + + ClockworkCondorEffect(final ClockworkCondorEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent p = game.getPermanent(source.getSourceId()); + if (p != null) { + ClockworkDragonDelayedTriggeredAbility delayedAbility = new ClockworkDragonDelayedTriggeredAbility(); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + game.addDelayedTriggeredAbility(delayedAbility); + } + return false; + } + + @Override + public ClockworkCondorEffect copy() { + return new ClockworkCondorEffect(this); + } + + @Override + public String getText(Ability source) { + return "remove a +1/+1 counter from Clockwork Condor at end of combat"; + } +} + +class ClockworkCondorDelayedTriggeredAbility extends DelayedTriggeredAbility { + ClockworkCondorDelayedTriggeredAbility() { + super(new RemoveCounterSourceEffect(CounterType.P1P1.createInstance())); + } + + ClockworkCondorDelayedTriggeredAbility(final ClockworkCondorDelayedTriggeredAbility ability) { + super(ability); + } + + @Override + public ClockworkCondorDelayedTriggeredAbility copy() { + return new ClockworkCondorDelayedTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.COMBAT_PHASE_POST) { + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/mirrodin/ClockworkDragon.java b/Mage.Sets/src/mage/sets/mirrodin/ClockworkDragon.java index 6bc143f7d3..4586d88abc 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/ClockworkDragon.java +++ b/Mage.Sets/src/mage/sets/mirrodin/ClockworkDragon.java @@ -37,13 +37,13 @@ import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.AttacksOrBlocksTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AddCountersSourceEffect; -import mage.abilities.effects.common.RemoveCounterSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -65,7 +65,7 @@ public class ClockworkDragon extends CardImpl { this.toughness = new MageInt(0); this.addAbility(FlyingAbility.getInstance()); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(6)), "Clockwork Dragon enters the battlefield with six +1/+1 counters on it")); - this.addAbility(new ClockworkDragonTriggeredAbility()); + this.addAbility(new AttacksOrBlocksTriggeredAbility(new ClockworkDragonEffect(), false)); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(3))); } @@ -79,36 +79,6 @@ public class ClockworkDragon extends CardImpl { } } -class ClockworkDragonTriggeredAbility extends TriggeredAbilityImpl { - ClockworkDragonTriggeredAbility() { - super(Zone.BATTLEFIELD, new ClockworkDragonEffect()); - } - - ClockworkDragonTriggeredAbility(final ClockworkDragonTriggeredAbility ability) { - super(ability); - } - - @Override - public ClockworkDragonTriggeredAbility copy() { - return new ClockworkDragonTriggeredAbility(this); - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED || event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { - if (event.getSourceId().equals(this.getSourceId())) { - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever Clockwork Dragon attacks or blocks, remove a +1/+1 counter from it at end of combat"; - } -} - class ClockworkDragonEffect extends OneShotEffect { ClockworkDragonEffect() { super(Constants.Outcome.UnboostCreature); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/CarnifexDemon.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/CarnifexDemon.java index dec9ba3c15..13925fe3c8 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CarnifexDemon.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CarnifexDemon.java @@ -32,7 +32,6 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; @@ -42,7 +41,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/FumeSpitter.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/FumeSpitter.java index f6aa94a32d..15229b0f37 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/FumeSpitter.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/FumeSpitter.java @@ -30,14 +30,13 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.effects.common.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.target.common.TargetCreaturePermanent; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java index 5974f1d424..7c34f33414 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GoldenUrn.java @@ -32,17 +32,15 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; -import mage.abilities.Abilities; import mage.abilities.Ability; import mage.abilities.common.BeginningOfControllerUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.game.Game; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GolemFoundry.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GolemFoundry.java index bbbc78928b..8094747a16 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GolemFoundry.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GolemFoundry.java @@ -30,16 +30,14 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.game.Game; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Grindclock.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Grindclock.java index 043ac18ec8..7b4ed55eb9 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Grindclock.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Grindclock.java @@ -32,14 +32,13 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/InstillInfection.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/InstillInfection.java index b1da4d9b2c..d57b3a34e3 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/InstillInfection.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/InstillInfection.java @@ -31,7 +31,7 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.abilities.effects.common.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.DrawCardControllerEffect; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java index dba7f75735..798d0fa78d 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/LuxCannon.java @@ -35,7 +35,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/NecrogenCenser.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/NecrogenCenser.java index 19d828e0be..230bb392fd 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/NecrogenCenser.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/NecrogenCenser.java @@ -30,7 +30,6 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; @@ -38,10 +37,9 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; -import mage.counters.Counter; import mage.counters.CounterType; import mage.target.TargetPlayer; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Necropede.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Necropede.java index 3936d0c242..9836d693e1 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Necropede.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Necropede.java @@ -34,7 +34,7 @@ import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; -import mage.abilities.effects.common.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/RatchetBomb.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/RatchetBomb.java index 0fd8c96f0c..347a0ea043 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/RatchetBomb.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/RatchetBomb.java @@ -32,17 +32,14 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; -import mage.abilities.Abilities; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AddCountersSourceEffect; -import mage.cards.Card; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.game.Game; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java index 5cdfce0dac..5fd50df7c1 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java @@ -31,20 +31,15 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.common.AddCountersTargetEffect; -import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.counters.CounterType; -import mage.counters.common.MinusOneCounter; import mage.target.Target; -import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; /** diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/SteadyProgress.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/SteadyProgress.java index 4c852eee27..4d51fe2233 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/SteadyProgress.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SteadyProgress.java @@ -30,11 +30,9 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.abilities.effects.common.DrawCardControllerEffect; -import mage.abilities.effects.common.ProliferateEffect; +import mage.abilities.effects.common.counter.ProliferateEffect; import mage.cards.CardImpl; /** diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ThroneofGeth.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ThroneofGeth.java index f800826f2f..572997b0fa 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ThroneofGeth.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ThroneofGeth.java @@ -36,7 +36,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.ProliferateEffect; +import mage.abilities.effects.common.counter.ProliferateEffect; import mage.cards.CardImpl; import mage.filter.Filter; import mage.filter.common.FilterControlledPermanent; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java index 63e23d523a..c893380d14 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofCorruption.java @@ -30,7 +30,6 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; @@ -42,9 +41,8 @@ import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; -import mage.abilities.effects.common.AddCountersSourceEffect; -import mage.abilities.effects.common.AddCountersTargetEffect; -import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.counters.CounterType; import mage.target.Target; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java index 018aa5e24d..9960c14b86 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofInfestation.java @@ -38,7 +38,7 @@ import mage.abilities.costs.CostsImpl; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java index e2cab80fbe..25864082de 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofMending.java @@ -31,7 +31,6 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -41,8 +40,7 @@ import mage.abilities.costs.CostsImpl; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AddCountersSourceEffect; -import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java index 79ecb33151..34dc302ece 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofRage.java @@ -43,8 +43,7 @@ import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; -import mage.abilities.effects.common.AddCountersSourceEffect; -import mage.abilities.effects.common.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.BoostTargetEffect; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java index f836d76cbd..940845e8a8 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrigonofThought.java @@ -31,7 +31,6 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -41,9 +40,8 @@ import mage.abilities.costs.CostsImpl; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.DrawCardControllerEffect; -import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TumbleMagnet.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TumbleMagnet.java index 104d31ffc8..7221aa469d 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/TumbleMagnet.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TumbleMagnet.java @@ -37,7 +37,7 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; import mage.counters.CounterType; diff --git a/Mage.Sets/src/mage/sets/worldwake/AvengerofZendikar.java b/Mage.Sets/src/mage/sets/worldwake/AvengerofZendikar.java index 62049d587b..e0f29e2457 100644 --- a/Mage.Sets/src/mage/sets/worldwake/AvengerofZendikar.java +++ b/Mage.Sets/src/mage/sets/worldwake/AvengerofZendikar.java @@ -32,15 +32,13 @@ import java.util.UUID; import mage.Constants; import mage.Constants.CardType; -import mage.Constants.Duration; import mage.Constants.Rarity; -import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.LandfallAbility; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AddPlusOneCountersControlledEffect; +import mage.abilities.effects.common.counter.AddPlusOneCountersControlledEffect; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.FilterPermanent; diff --git a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java index 5b40e38ad5..cfe797828c 100644 --- a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java +++ b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java @@ -38,7 +38,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.GainAbilitySourceEffect; import mage.abilities.effects.common.ManaEffect; import mage.abilities.keyword.MultikickerAbility; diff --git a/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java b/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java index 061e8e1e9b..3c79e2897b 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java +++ b/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java @@ -37,11 +37,12 @@ import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.BecomesCreatureSourceEOTEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.game.permanent.token.Token; /** @@ -85,6 +86,6 @@ class RagingRavineToken extends Token { color.setGreen(true); power = new MageInt(3); toughness = new MageInt(3); - addAbility(new AttacksTriggeredAbility(new AddPlusOneCountersSourceEffect(1), false)); + addAbility(new AttacksTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); } } diff --git a/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java b/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java index 9374fc6afb..ce40710073 100644 --- a/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java +++ b/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java @@ -36,11 +36,12 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.GainAbilitySourceEffect; import mage.abilities.keyword.KickerAbility; import mage.abilities.keyword.UnblockableAbility; import mage.cards.CardImpl; +import mage.counters.CounterType; /** * @@ -57,7 +58,7 @@ public class AetherFigment extends CardImpl { this.toughness = new MageInt(1); this.addAbility(UnblockableAbility.getInstance()); - Ability ability1 = new EntersBattlefieldTriggeredAbility(new AddPlusOneCountersSourceEffect(2)); + Ability ability1 = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2))); KickerAbility ability2 = new KickerAbility(new GainAbilitySourceEffect(ability1, Duration.WhileOnBattlefield), false); ability2.addManaCost(new GenericManaCost(3)); this.addAbility(ability2); diff --git a/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java b/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java index b5170cb299..bf339f71ad 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java +++ b/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java @@ -36,7 +36,7 @@ import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.BoostControlledEffect; import mage.cards.CardImpl; import mage.game.Game; diff --git a/Mage.Sets/src/mage/sets/zendikar/MarkofMutiny.java b/Mage.Sets/src/mage/sets/zendikar/MarkofMutiny.java index bd02cb1854..eb51481cfe 100644 --- a/Mage.Sets/src/mage/sets/zendikar/MarkofMutiny.java +++ b/Mage.Sets/src/mage/sets/zendikar/MarkofMutiny.java @@ -32,7 +32,7 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Rarity; -import mage.abilities.effects.common.AddCountersTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.GainAbilityTargetEffect; import mage.abilities.effects.common.GainControlTargetEffect; import mage.abilities.effects.common.UntapTargetEffect; diff --git a/Mage.Sets/src/mage/sets/zendikar/ObNixilistheFallen.java b/Mage.Sets/src/mage/sets/zendikar/ObNixilistheFallen.java index f5f6c6b815..d62e0bc943 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ObNixilistheFallen.java +++ b/Mage.Sets/src/mage/sets/zendikar/ObNixilistheFallen.java @@ -35,9 +35,10 @@ import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LandfallAbility; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.target.TargetPlayer; /** @@ -56,7 +57,7 @@ public class ObNixilistheFallen extends CardImpl { this.toughness = new MageInt(3); Ability ability = new LandfallAbility(new LoseLifeTargetEffect(3), true); - ability.addEffect(new AddPlusOneCountersSourceEffect(3)); + ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java b/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java index 1c90e0a53b..66be2c6761 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java +++ b/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java @@ -34,8 +34,9 @@ import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; +import mage.counters.CounterType; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.events.GameEvent; @@ -78,7 +79,7 @@ class ScuteMobAbility extends TriggeredAbilityImpl { private FilterLandPermanent filter = new FilterLandPermanent(); public ScuteMobAbility() { - super(Zone.BATTLEFIELD, new AddPlusOneCountersSourceEffect(4)); + super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(4))); } public ScuteMobAbility(final ScuteMobAbility ability) { diff --git a/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java b/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java index 67188a46e8..6ef5969050 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java +++ b/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java @@ -39,7 +39,7 @@ import mage.abilities.costs.Costs; import mage.abilities.costs.CostsImpl; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; diff --git a/Mage/src/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java b/Mage/src/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java new file mode 100644 index 0000000000..7e70de2a4f --- /dev/null +++ b/Mage/src/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java @@ -0,0 +1,37 @@ +package mage.abilities.common; + +import mage.Constants; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.game.events.GameEvent; + +public class AttacksOrBlocksTriggeredAbility extends TriggeredAbilityImpl { + public AttacksOrBlocksTriggeredAbility(Effect effect, boolean optional) { + super(Constants.Zone.BATTLEFIELD, effect, optional); + } + + public AttacksOrBlocksTriggeredAbility(final AttacksOrBlocksTriggeredAbility ability) { + super(ability); + } + + @Override + public AttacksOrBlocksTriggeredAbility copy() { + return new AttacksOrBlocksTriggeredAbility(this); + } + + @Override + public String getRule() { + return "When {this} attacks or blocks, " + super.getRule(); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED || event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { + if (event.getSourceId().equals(this.getSourceId())) { + return true; + } + } + return false; + } +} diff --git a/Mage/src/mage/abilities/effects/common/AddDelayedTrigeredAbilityEffect.java b/Mage/src/mage/abilities/effects/common/AddDelayedTrigeredAbilityEffect.java new file mode 100644 index 0000000000..b879a1c58d --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/AddDelayedTrigeredAbilityEffect.java @@ -0,0 +1,35 @@ +package mage.abilities.effects.common; + +import mage.Constants; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.game.Game; +import mage.game.permanent.Permanent; + +public class AddDelayedTrigeredAbilityEffect extends OneShotEffect { + private DelayedTriggeredAbility ability; + + public AddDelayedTrigeredAbilityEffect(DelayedTriggeredAbility ability) { + super(Constants.Outcome.AddAbility); + this.ability = ability; + } + + public AddDelayedTrigeredAbilityEffect(final AddDelayedTrigeredAbilityEffect effect) { + super(effect); + this.ability = effect.ability.copy(); + } + + @Override + public boolean apply(Game game, Ability source) { + ability.setSourceId(source.getSourceId()); + ability.setControllerId(source.getControllerId()); + game.addDelayedTriggeredAbility(ability); + return true; + } + + @Override + public AddDelayedTrigeredAbilityEffect copy() { + return new AddDelayedTrigeredAbilityEffect(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersSourceEffect.java b/Mage/src/mage/abilities/effects/common/AddPlusOneCountersSourceEffect.java deleted file mode 100644 index 2a8c8586f4..0000000000 --- a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersSourceEffect.java +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and documentation are those of the -* authors and should not be interpreted as representing official policies, either expressed -* or implied, of BetaSteward_at_googlemail.com. -*/ - -package mage.abilities.effects.common; - -import mage.Constants.Outcome; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.counters.common.PlusOneCounter; -import mage.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class AddPlusOneCountersSourceEffect extends OneShotEffect { - - private int amount; - - public AddPlusOneCountersSourceEffect(int amount) { - super(Outcome.BoostCreature); - this.amount = amount; - } - - public AddPlusOneCountersSourceEffect(final AddPlusOneCountersSourceEffect effect) { - super(effect); - this.amount = effect.amount; - } - - @Override - public AddPlusOneCountersSourceEffect copy() { - return new AddPlusOneCountersSourceEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - permanent.addCounters(new PlusOneCounter(amount)); - } - return true; - } - - @Override - public String getText(Ability source) { - if (amount > 1) - return "put " + Integer.toString(amount) + " +1/+1 counters on {this}"; - else - return "put a +1/+1 counter on {this}"; - } - -} diff --git a/Mage/src/mage/abilities/effects/common/AddCountersSourceEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java similarity index 98% rename from Mage/src/mage/abilities/effects/common/AddCountersSourceEffect.java rename to Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java index f5d3a79838..ad48b69a12 100644 --- a/Mage/src/mage/abilities/effects/common/AddCountersSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddCountersSourceEffect.java @@ -26,7 +26,7 @@ * or implied, of BetaSteward_at_googlemail.com. */ -package mage.abilities.effects.common; +package mage.abilities.effects.common.counter; import mage.Constants.Outcome; import mage.abilities.Ability; diff --git a/Mage/src/mage/abilities/effects/common/AddCountersTargetEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java similarity index 98% rename from Mage/src/mage/abilities/effects/common/AddCountersTargetEffect.java rename to Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java index 9ea27b27a8..4bcf51e536 100644 --- a/Mage/src/mage/abilities/effects/common/AddCountersTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java @@ -26,7 +26,7 @@ * or implied, of BetaSteward_at_googlemail.com. */ -package mage.abilities.effects.common; +package mage.abilities.effects.common.counter; import mage.Constants.Outcome; import mage.abilities.Ability; diff --git a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersAttachedEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersAttachedEffect.java similarity index 98% rename from Mage/src/mage/abilities/effects/common/AddPlusOneCountersAttachedEffect.java rename to Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersAttachedEffect.java index 2b17b1b4c0..44f1ae24a8 100644 --- a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersAttachedEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersAttachedEffect.java @@ -26,7 +26,7 @@ * or implied, of BetaSteward_at_googlemail.com. */ -package mage.abilities.effects.common; +package mage.abilities.effects.common.counter; import mage.Constants.Outcome; import mage.abilities.Ability; diff --git a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersControlledEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersControlledEffect.java similarity index 98% rename from Mage/src/mage/abilities/effects/common/AddPlusOneCountersControlledEffect.java rename to Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersControlledEffect.java index b427b6cad1..97d622b57e 100644 --- a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersControlledEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddPlusOneCountersControlledEffect.java @@ -26,7 +26,7 @@ * or implied, of BetaSteward_at_googlemail.com. */ -package mage.abilities.effects.common; +package mage.abilities.effects.common.counter; import mage.Constants.Outcome; import mage.abilities.Ability; diff --git a/Mage/src/mage/abilities/effects/common/ProliferateEffect.java b/Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java similarity index 99% rename from Mage/src/mage/abilities/effects/common/ProliferateEffect.java rename to Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java index dcbc583422..ab2edeaed1 100644 --- a/Mage/src/mage/abilities/effects/common/ProliferateEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/ProliferateEffect.java @@ -25,7 +25,7 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ -package mage.abilities.effects.common; +package mage.abilities.effects.common.counter; import mage.Constants.Outcome; import mage.abilities.Ability; diff --git a/Mage/src/mage/abilities/effects/common/RemoveCounterSourceEffect.java b/Mage/src/mage/abilities/effects/common/counter/RemoveCounterSourceEffect.java similarity index 92% rename from Mage/src/mage/abilities/effects/common/RemoveCounterSourceEffect.java rename to Mage/src/mage/abilities/effects/common/counter/RemoveCounterSourceEffect.java index 65f7ba3199..0e859746e8 100644 --- a/Mage/src/mage/abilities/effects/common/RemoveCounterSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/RemoveCounterSourceEffect.java @@ -1,4 +1,4 @@ -package mage.abilities.effects.common; +package mage.abilities.effects.common.counter; import mage.Constants; import mage.abilities.Ability; diff --git a/Mage/src/mage/abilities/keyword/LevelUpAbility.java b/Mage/src/mage/abilities/keyword/LevelUpAbility.java index 5770a13429..9aade4ebcf 100644 --- a/Mage/src/mage/abilities/keyword/LevelUpAbility.java +++ b/Mage/src/mage/abilities/keyword/LevelUpAbility.java @@ -32,7 +32,7 @@ import mage.Constants.TimingRule; import mage.Constants.Zone; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.mana.ManaCosts; -import mage.abilities.effects.common.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; /** *