From 6d188d76d7d5356f5eb8cdc8ac186fd85e0098a9 Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 7 Feb 2011 22:09:47 +0200 Subject: [PATCH] some cards, start effects moving --- Mage.Client/plugins/mage-card-plugin.jar | Bin 308571 -> 308546 bytes .../sets/alarareborn/JenaraAsuraofWar.java | 5 +- .../mage/sets/alarareborn/LorescaleCoatl.java | 6 +- .../src/mage/sets/conflux/BloodhallOoze.java | 7 +- Mage.Sets/src/mage/sets/conflux/Esperzoa.java | 83 +++++++++++ .../mage/sets/conflux/ScarlandThrinax.java | 5 +- .../elspethvstezzeret/ClockworkCondor.java | 54 ++++++++ .../mage/sets/elspethvstezzeret/Esperzoa.java | 54 ++++++++ .../mage/sets/magic2010/AjaniGoldmane.java | 2 +- .../src/mage/sets/magic2010/ProteanHydra.java | 5 +- .../mage/sets/magic2011/AjanisPridemate.java | 5 +- .../src/mage/sets/magic2011/PrimalCocoon.java | 2 +- .../mage/sets/magic2011/SteelOverseer.java | 2 +- .../src/mage/sets/magic2011/Triskelion.java | 5 +- .../mage/sets/mirrodin/ClockworkCondor.java | 131 ++++++++++++++++++ .../mage/sets/mirrodin/ClockworkDragon.java | 38 +---- .../sets/scarsofmirrodin/CarnifexDemon.java | 3 +- .../sets/scarsofmirrodin/FumeSpitter.java | 3 +- .../mage/sets/scarsofmirrodin/GoldenUrn.java | 4 +- .../sets/scarsofmirrodin/GolemFoundry.java | 4 +- .../mage/sets/scarsofmirrodin/Grindclock.java | 3 +- .../scarsofmirrodin/InstillInfection.java | 2 +- .../mage/sets/scarsofmirrodin/LuxCannon.java | 2 +- .../sets/scarsofmirrodin/NecrogenCenser.java | 4 +- .../mage/sets/scarsofmirrodin/Necropede.java | 2 +- .../sets/scarsofmirrodin/RatchetBomb.java | 5 +- .../mage/sets/scarsofmirrodin/Skinrender.java | 7 +- .../sets/scarsofmirrodin/SteadyProgress.java | 4 +- .../sets/scarsofmirrodin/ThroneofGeth.java | 2 +- .../scarsofmirrodin/TrigonofCorruption.java | 6 +- .../scarsofmirrodin/TrigonofInfestation.java | 2 +- .../sets/scarsofmirrodin/TrigonofMending.java | 4 +- .../sets/scarsofmirrodin/TrigonofRage.java | 3 +- .../sets/scarsofmirrodin/TrigonofThought.java | 4 +- .../sets/scarsofmirrodin/TumbleMagnet.java | 2 +- .../sets/worldwake/AvengerofZendikar.java | 4 +- .../sets/worldwake/EverflowingChalice.java | 2 +- .../src/mage/sets/worldwake/RagingRavine.java | 5 +- .../src/mage/sets/zendikar/AetherFigment.java | 5 +- .../sets/zendikar/BeastmasterAscension.java | 2 +- .../src/mage/sets/zendikar/MarkofMutiny.java | 2 +- .../sets/zendikar/ObNixilistheFallen.java | 5 +- .../src/mage/sets/zendikar/ScuteMob.java | 5 +- .../sets/zendikar/SunspringExpedition.java | 2 +- .../AttacksOrBlocksTriggeredAbility.java | 37 +++++ .../AddDelayedTrigeredAbilityEffect.java | 35 +++++ .../AddPlusOneCountersSourceEffect.java | 78 ----------- .../AddCountersSourceEffect.java | 2 +- .../AddCountersTargetEffect.java | 2 +- .../AddPlusOneCountersAttachedEffect.java | 2 +- .../AddPlusOneCountersControlledEffect.java | 2 +- .../{ => counter}/ProliferateEffect.java | 2 +- .../RemoveCounterSourceEffect.java | 2 +- .../abilities/keyword/LevelUpAbility.java | 2 +- 54 files changed, 467 insertions(+), 199 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/conflux/Esperzoa.java create mode 100644 Mage.Sets/src/mage/sets/elspethvstezzeret/ClockworkCondor.java create mode 100644 Mage.Sets/src/mage/sets/elspethvstezzeret/Esperzoa.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/ClockworkCondor.java create mode 100644 Mage/src/mage/abilities/common/AttacksOrBlocksTriggeredAbility.java create mode 100644 Mage/src/mage/abilities/effects/common/AddDelayedTrigeredAbilityEffect.java delete mode 100644 Mage/src/mage/abilities/effects/common/AddPlusOneCountersSourceEffect.java rename Mage/src/mage/abilities/effects/common/{ => counter}/AddCountersSourceEffect.java (98%) rename Mage/src/mage/abilities/effects/common/{ => counter}/AddCountersTargetEffect.java (98%) rename Mage/src/mage/abilities/effects/common/{ => counter}/AddPlusOneCountersAttachedEffect.java (98%) rename Mage/src/mage/abilities/effects/common/{ => counter}/AddPlusOneCountersControlledEffect.java (98%) rename Mage/src/mage/abilities/effects/common/{ => counter}/ProliferateEffect.java (99%) rename Mage/src/mage/abilities/effects/common/{ => counter}/RemoveCounterSourceEffect.java (92%) diff --git a/Mage.Client/plugins/mage-card-plugin.jar b/Mage.Client/plugins/mage-card-plugin.jar index b595fc1386e36bd09e2adb48412775306d2af5cd..219c2acf301d45dd655cb61dc76b17a7e544e3e1 100644 GIT binary patch delta 7039 zcmZ`;30RfY*8cW)HuH>3GKh!>B9ka)nFtzAD1t-x`a3+%nu(&6B&32Us5sFPmWU__ zD#$GA$uX~3qLE2?A9MQksXr~vD`|DFdX>BOa1MTU|MNWb?bf^2yVqKK?a>?eozLEP zwo8oHQEP?${N5dsZ`aeV`@2J;U;I3O+FTT6je3b$=N>pe3c>;Ovk5 zXHO5C9;Rq4qdA5A55@12W%I)|8hUfmQ-^)%LrHJ`olGM5cM}QW-xH)S|2`sv_%~GT z&%bljxA?bA9nQb^)j0mm)V-}=taFgcYldxL*Z&_I1Sb>;05bf6RVtMSlF@ARN6 zl=`Y>`Z{VYP2QFife;g>nrkzoM@BAoelIy?kts4u1=H1(YIa@Ku|}fhEy75eBCLN? zc_Yy7rDy~>UKWk#&c9L)J#t?q8Y$ja1vJ_>M`zDmCD(=|ztky8tA#!`ETBo}?;tc? z1HDzQ(D&FqtJ9d~OO{+=PVcXU!ho=mf+{OwfM^_#oUh~E^&Bw8irZc}(VTPu$-gv5 zTd$_dA!mg`@~|U4xx(>pmHRg>73GGLo)mh)rd(>@GKP=wMK~YkCm^IwW zrA|#NmIm-)Xe!He6I{o$zZBiC&uI}EnXvw$kPORf;0bT~qo74d{0 zE;FuO(cD*L=)3d2g8JFTzj||M(!FYt^@SIT(vA^D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1$kPtcn(GJ8y5l8ke3*hft$nrOWRM4KZ>f6?qUND!Y7gG7;!EmG8{7L1SD+Va5Pa zfY~wp?95Cf84Ykxp { 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; /** *