diff --git a/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java b/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java index c9d6cb2d4b1..cfda52c0af8 100644 --- a/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java +++ b/Mage.Sets/src/mage/sets/conflux/BloodhallOoze.java @@ -1,16 +1,16 @@ /* * 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 @@ -20,7 +20,7 @@ * 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. @@ -85,7 +85,7 @@ class BloodhallOozeTriggeredAbility1 extends TriggeredAbilityImpl { - private static FilterPermanent filter = new FilterPermanent(); + private static FilterPermanent filter = new FilterPermanent("enchantments"); static { filter.getCardType().add(CardType.ENCHANTMENT); diff --git a/Mage.Sets/src/mage/sets/magic2011/BloodTithe.java b/Mage.Sets/src/mage/sets/magic2011/BloodTithe.java index 604c0ac0e11..6a69cbe3daa 100644 --- a/Mage.Sets/src/mage/sets/magic2011/BloodTithe.java +++ b/Mage.Sets/src/mage/sets/magic2011/BloodTithe.java @@ -92,4 +92,9 @@ class BloodTitheEffect extends OneShotEffect { return new BloodTitheEffect(this); } + @Override + public String getText(Ability source) { + return "Each opponent loses 3 life. You gain life equal to the life lost this way"; + } + } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java b/Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java index 8429452f584..d303411924b 100644 --- a/Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java +++ b/Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java @@ -132,8 +132,8 @@ class BloodcrazedGoblinEffect extends ReplacementEffectImpl { } public CallToMind(UUID ownerId) { - super(ownerId, 47, "CallToMind", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + super(ownerId, 47, "Call to Mind", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); this.expansionSetCode = "M11"; this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java b/Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java index 942c7f44f3c..fd80427cc1e 100644 --- a/Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java +++ b/Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java @@ -61,7 +61,7 @@ import mage.target.common.TargetCreaturePermanent; public class CaptivatingVampire extends CardImpl { private static FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Vampire creatures"); - private static FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("five untapped Vampires"); + private static FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("untapped Vampire"); static { filter1.getSubtype().add("Vampire"); diff --git a/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java b/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java index c320ffa40a1..313832b7071 100644 --- a/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java +++ b/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java @@ -29,7 +29,6 @@ package mage.abilities.costs.common; import java.util.UUID; -import mage.abilities.Ability; import mage.abilities.costs.CostImpl; import mage.abilities.costs.VariableCost; import mage.game.Game; @@ -45,7 +44,7 @@ public class PayVariableLoyaltyCost extends CostImpl imp protected int amountPaid = 0; public PayVariableLoyaltyCost() { - this.text = "X loyalty"; + this.text = "-X loyalty"; } public PayVariableLoyaltyCost(final PayVariableLoyaltyCost cost) { diff --git a/Mage/src/mage/abilities/costs/common/TapTargetCost.java b/Mage/src/mage/abilities/costs/common/TapTargetCost.java index 4b27219aa0d..1978c83e17f 100644 --- a/Mage/src/mage/abilities/costs/common/TapTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/TapTargetCost.java @@ -28,6 +28,7 @@ package mage.abilities.costs.common; +import java.util.List; import java.util.UUID; import mage.Constants.Outcome; import mage.abilities.costs.CostImpl; @@ -41,19 +42,22 @@ import mage.target.common.TargetControlledPermanent; */ public class TapTargetCost extends CostImpl { + TargetControlledPermanent target; + public TapTargetCost(TargetControlledPermanent target) { - this.addTarget(target); - this.text = "tap " + target.getTargetName() + " you control"; + this.target = target; + this.text = "tap " + target.getMaxNumberOfTargets() + " " + target.getTargetName() + " you control"; } public TapTargetCost(final TapTargetCost cost) { super(cost); + this.target = cost.target.copy(); } @Override public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { - if (targets.choose(Outcome.Tap, controllerId, game)) { - for (UUID targetId: targets.get(0).getTargets()) { + if (target.choose(Outcome.Tap, controllerId, game)) { + for (UUID targetId: (List)target.getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent == null) return false; @@ -65,7 +69,7 @@ public class TapTargetCost extends CostImpl { @Override public boolean canPay(UUID sourceId, UUID controllerId, Game game) { - return targets.canChoose(controllerId, controllerId, game); + return target.canChoose(controllerId, controllerId, game); } @Override diff --git a/Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java b/Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java index 0bc9deed86a..61361f381ec 100644 --- a/Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java +++ b/Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java @@ -94,7 +94,7 @@ public class CantTargetControlledEffect extends ReplacementEffectImpl> extends CardImpl @Override public boolean addAttachment(UUID permanentId, Game game) { if (!this.attachments.contains(permanentId)) { - if (!game.replaceEvent(new GameEvent(GameEvent.EventType.ATTACH, objectId, permanentId, controllerId, damage))) { + if (!game.replaceEvent(new GameEvent(GameEvent.EventType.ATTACH, objectId, permanentId, controllerId))) { this.attachments.add(permanentId); - game.getPermanent(permanentId).attachTo(objectId); - game.fireEvent(new GameEvent(GameEvent.EventType.ATTACHED, objectId, permanentId, controllerId, damage)); - return true; + Permanent attachment = game.getPermanent(permanentId); + if (attachment != null) { + attachment.attachTo(objectId); + game.fireEvent(new GameEvent(GameEvent.EventType.ATTACHED, objectId, permanentId, controllerId)); + return true; + } } } return false; @@ -371,10 +374,13 @@ public abstract class PermanentImpl> extends CardImpl @Override public boolean removeAttachment(UUID permanentId, Game game) { if (this.attachments.contains(permanentId)) { - if (!game.replaceEvent(new GameEvent(GameEvent.EventType.UNATTACH, objectId, permanentId, controllerId, damage))) { + if (!game.replaceEvent(new GameEvent(GameEvent.EventType.UNATTACH, objectId, permanentId, controllerId))) { this.attachments.remove(permanentId); - game.getPermanent(permanentId).attachTo(null); - game.fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, objectId, permanentId, controllerId, damage)); + Permanent attachment = game.getPermanent(permanentId); + if (attachment != null) { + attachment.attachTo(null); + } + game.fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, objectId, permanentId, controllerId)); return true; } } diff --git a/Mage/src/mage/target/common/TargetControlledCreaturePermanent.java b/Mage/src/mage/target/common/TargetControlledCreaturePermanent.java index 175cf8b33bd..c11396c10d2 100644 --- a/Mage/src/mage/target/common/TargetControlledCreaturePermanent.java +++ b/Mage/src/mage/target/common/TargetControlledCreaturePermanent.java @@ -45,7 +45,7 @@ public class TargetControlledCreaturePermanent extends TargetControlledPermanent } public TargetControlledCreaturePermanent(int minNumTargets, int maxNumTargets, FilterControlledCreaturePermanent filter, boolean notTarget) { - super(1, 1, filter, notTarget); + super(minNumTargets, maxNumTargets, filter, notTarget); this.targetName = filter.getMessage(); } diff --git a/Mage/src/mage/target/common/TargetControlledPermanent.java b/Mage/src/mage/target/common/TargetControlledPermanent.java index 816435d4a8d..1a0e66d0b0e 100644 --- a/Mage/src/mage/target/common/TargetControlledPermanent.java +++ b/Mage/src/mage/target/common/TargetControlledPermanent.java @@ -50,7 +50,7 @@ public class TargetControlledPermanent> e } public TargetControlledPermanent(int minNumTargets, int maxNumTargets, FilterControlledPermanent filter, boolean notTarget) { - super(1, 1, filter, notTarget); + super(minNumTargets, maxNumTargets, filter, notTarget); this.targetName = filter.getMessage(); }