diff --git a/Mage.Client/src/main/java/mage/client/cards/BigCard.java b/Mage.Client/src/main/java/mage/client/cards/BigCard.java index 4c1da527b23..b01826114f4 100644 --- a/Mage.Client/src/main/java/mage/client/cards/BigCard.java +++ b/Mage.Client/src/main/java/mage/client/cards/BigCard.java @@ -70,9 +70,9 @@ public class BigCard extends JComponent { protected float hue = 0.005f; protected float dh = 0.005f; - static private final int DEFAULT_DELAY_PERIOD = 50; - static private final float LEFT_BOUNDARY = -0.15f; - static private final float RIGHT_BOUNDARY = 0.15f; + static private final int DEFAULT_DELAY_PERIOD = 30; + static private final float LEFT_BOUNDARY = 0f; + static private final float RIGHT_BOUNDARY = 0.5f; public BigCard() { initComponents(); diff --git a/Mage.Sets/src/mage/sets/magic2010/MindControl.java b/Mage.Sets/src/mage/sets/magic2010/MindControl.java index 856398a8709..dfe11c31a35 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MindControl.java +++ b/Mage.Sets/src/mage/sets/magic2010/MindControl.java @@ -40,6 +40,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ControlEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.game.Game; @@ -64,7 +65,7 @@ public class MindControl extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MindControlEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); } @@ -76,59 +77,5 @@ public class MindControl extends CardImpl { public MindControl copy() { return new MindControl(this); } - - @Override - public String getArt() { - return "121615_typ_reg_sty_010.jpg"; - } } -class MindControlEffect extends ContinuousEffectImpl { - - public MindControlEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); - } - - public MindControlEffect(final MindControlEffect effect) { - super(effect); - } - - @Override - public MindControlEffect copy() { - return new MindControlEffect(this); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature != null) { - switch (layer) { - case ControlChangingEffects_2: - if (sublayer == SubLayer.NA) { - creature.changeControllerId(source.getControllerId(), game); - } - break; - } - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.ControlChangingEffects_2; - } - - @Override - public String getText(Ability source) { - return "You control enchanted creature"; - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/BondsofQuicksilver.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/BondsofQuicksilver.java new file mode 100644 index 00000000000..c28b45c1779 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/BondsofQuicksilver.java @@ -0,0 +1,81 @@ +/* + * 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.scarsofmirrodin; + +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.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.BoostEnchantedEffect; +import mage.abilities.effects.common.SkipEnchantedUntapEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author nantuko + */ +public class BondsofQuicksilver extends CardImpl { + + public BondsofQuicksilver (UUID ownerId) { + super(ownerId, 29, "Bonds of Quicksilver", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); + this.expansionSetCode = "SOM"; + this.subtype.add("Aura"); + this.color.setBlue(true); + + this.addAbility(FlashAbility.getInstance()); + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + ability.addEffect(new SkipEnchantedUntapEffect()); + this.addAbility(ability); + } + + public BondsofQuicksilver (final BondsofQuicksilver card) { + super(card); + } + + @Override + public BondsofQuicksilver copy() { + return new BondsofQuicksilver(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Disperse.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Disperse.java new file mode 100644 index 00000000000..e365793f45c --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Disperse.java @@ -0,0 +1,65 @@ +/* + * 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.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.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetNonlandPermanent; + +/** + * + * @author nantuko + */ +public class Disperse extends CardImpl { + + public Disperse (UUID ownerId) { + super(ownerId, 31, "Disperse", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "SOM"; + this.color.setBlue(true); + + this.getSpellAbility().addTarget(new TargetNonlandPermanent()); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + } + + public Disperse (final Disperse card) { + super(card); + } + + @Override + public Disperse copy() { + return new Disperse(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/HaltOrder.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/HaltOrder.java new file mode 100644 index 00000000000..3f404fd6c94 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/HaltOrder.java @@ -0,0 +1,76 @@ +/* + * 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.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.CounterTargetEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.FilterSpell; +import mage.target.TargetSpell; + +import static mage.filter.Filter.ComparisonScope.*; + +/** + * + * @author Loki + */ +public class HaltOrder extends CardImpl { + + private static FilterSpell filter = new FilterSpell("artifact spell"); + + static { + filter.getCardType().add(CardType.ARTIFACT); + filter.setScopeCardType(Any); + } + + public HaltOrder (UUID ownerId) { + super(ownerId, 34, "Halt Order", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "SOM"; + this.color.setBlue(true); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addEffect(new DrawCardControllerEffect(1)); + } + + public HaltOrder (final HaltOrder card) { + super(card); + } + + @Override + public HaltOrder copy() { + return new HaltOrder(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/VolitionReins.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/VolitionReins.java new file mode 100644 index 00000000000..498033d92a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/VolitionReins.java @@ -0,0 +1,113 @@ +/* + * 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.scarsofmirrodin; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ControlEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author nantuko + */ +public class VolitionReins extends CardImpl { + + public VolitionReins(UUID ownerId) { + super(ownerId, 53, "Volition Reins", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}{U}"); + this.expansionSetCode = "SOM"; + this.subtype.add("Aura"); + this.color.setBlue(true); + + TargetPermanent auraTarget = new TargetPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); + this.addAbility(new EntersBattlefieldTriggeredAbility(new UntapVolitionReinsEffect())); + } + + public VolitionReins(final VolitionReins card) { + super(card); + } + + @Override + public VolitionReins copy() { + return new VolitionReins(this); + } + + public class UntapVolitionReinsEffect extends OneShotEffect { + + public UntapVolitionReinsEffect() { + super(Constants.Outcome.Untap); + } + + public UntapVolitionReinsEffect(final UntapVolitionReinsEffect effect) { + super(effect); + } + + @Override + public UntapVolitionReinsEffect copy() { + return new UntapVolitionReinsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent permanent = game.getPermanent(enchantment.getAttachedTo()); + if (permanent != null && permanent.isTapped()) { + permanent.setTapped(false); + return true; + } + } + return false; + } + + @Override + public String getText(Ability source) { + return "When Volition Reins enters the battlefield, if enchanted permanent is tapped, untap it."; + } + } + +} diff --git a/Mage/src/mage/abilities/effects/common/ControlEnchantedEffect.java b/Mage/src/mage/abilities/effects/common/ControlEnchantedEffect.java new file mode 100644 index 00000000000..589d00432cd --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/ControlEnchantedEffect.java @@ -0,0 +1,60 @@ +package mage.abilities.effects.common; + +import mage.Constants; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * @author nantuko + */ +public class ControlEnchantedEffect extends ContinuousEffectImpl { + + public ControlEnchantedEffect() { + super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Detriment); + } + + public ControlEnchantedEffect(final ControlEnchantedEffect effect) { + super(effect); + } + + @Override + public ControlEnchantedEffect copy() { + return new ControlEnchantedEffect(this); + } + + @Override + public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent permanent = game.getPermanent(enchantment.getAttachedTo()); + if (permanent != null) { + switch (layer) { + case ControlChangingEffects_2: + if (sublayer == Constants.SubLayer.NA) { + permanent.changeControllerId(source.getControllerId(), game); + } + break; + } + return true; + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Constants.Layer layer) { + return layer == Constants.Layer.ControlChangingEffects_2; + } + + @Override + public String getText(Ability source) { + return "You control enchanted creature"; + } +} diff --git a/Mage/src/mage/abilities/effects/common/SkipEnchantedUntapEffect.java b/Mage/src/mage/abilities/effects/common/SkipEnchantedUntapEffect.java new file mode 100644 index 00000000000..9de91931b5a --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/SkipEnchantedUntapEffect.java @@ -0,0 +1,57 @@ +package mage.abilities.effects.common; + +import mage.Constants; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * @author nantuko + */ +public class SkipEnchantedUntapEffect extends ReplacementEffectImpl { + + public SkipEnchantedUntapEffect() { + super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.Detriment); + } + + public SkipEnchantedUntapEffect(final SkipEnchantedUntapEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public SkipEnchantedUntapEffect copy() { + return new SkipEnchantedUntapEffect(this); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (game.getTurn().getStepType() == Constants.PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent permanent = game.getPermanent(enchantment.getAttachedTo()); + if (permanent != null && event.getTargetId().equals(permanent.getId())) { + return true; + } + } + } + return false; + } + + @Override + public String getText(Ability source) { + return "Enchanted creature doesn't untap during its controller's untap step."; + } +}