diff --git a/Mage.Sets/src/mage/sets/elspethvstezzeret/EverflowingChalice.java b/Mage.Sets/src/mage/sets/elspethvstezzeret/EverflowingChalice.java new file mode 100644 index 0000000000..3b4338c46c --- /dev/null +++ b/Mage.Sets/src/mage/sets/elspethvstezzeret/EverflowingChalice.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 EverflowingChalice extends mage.sets.worldwake.EverflowingChalice { + + public EverflowingChalice (UUID ownerId) { + super(ownerId); + this.cardNumber = 60; + this.expansionSetCode = "DDF"; + } + + public EverflowingChalice (final EverflowingChalice card) { + super(card); + } + + @Override + public EverflowingChalice copy() { + return new EverflowingChalice(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/SacredWolf.java b/Mage.Sets/src/mage/sets/magic2011/SacredWolf.java index 5f92c8e1d3..141fe5beb4 100644 --- a/Mage.Sets/src/mage/sets/magic2011/SacredWolf.java +++ b/Mage.Sets/src/mage/sets/magic2011/SacredWolf.java @@ -59,7 +59,6 @@ public class SacredWolf extends CardImpl { this.color.setGreen(true); this.power = new MageInt(3); this.toughness = new MageInt(1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantTargetSourceEffect(filter, Duration.WhileOnBattlefield))); } diff --git a/Mage.Sets/src/mage/sets/mirrodin/TowerofChampions.java b/Mage.Sets/src/mage/sets/mirrodin/TowerofChampions.java new file mode 100644 index 0000000000..c6299fb250 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/TowerofChampions.java @@ -0,0 +1,68 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class TowerofChampions extends CardImpl { + + public TowerofChampions (UUID ownerId) { + super(ownerId, 265, "Tower of Champions", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "MRD"; + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostTargetEffect(6, 6, Constants.Duration.EndOfTurn), new GenericManaCost(8)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public TowerofChampions (final TowerofChampions card) { + super(card); + } + + @Override + public TowerofChampions copy() { + return new TowerofChampions(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/TowerofEons.java b/Mage.Sets/src/mage/sets/mirrodin/TowerofEons.java new file mode 100644 index 0000000000..ce535b2202 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/TowerofEons.java @@ -0,0 +1,66 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class TowerofEons extends CardImpl { + + public TowerofEons (UUID ownerId) { + super(ownerId, 266, "Tower of Eons", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "MRD"; + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainLifeEffect(10), new GenericManaCost(8)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public TowerofEons (final TowerofEons card) { + super(card); + } + + @Override + public TowerofEons copy() { + return new TowerofEons(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/TowerofFortunes.java b/Mage.Sets/src/mage/sets/mirrodin/TowerofFortunes.java new file mode 100644 index 0000000000..81cb0b9236 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/TowerofFortunes.java @@ -0,0 +1,66 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class TowerofFortunes extends CardImpl { + + public TowerofFortunes (UUID ownerId) { + super(ownerId, 267, "Tower of Fortunes", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "MRD"; + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(4), new GenericManaCost(8)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public TowerofFortunes (final TowerofFortunes card) { + super(card); + } + + @Override + public TowerofFortunes copy() { + return new TowerofFortunes(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/TowerofMurmurs.java b/Mage.Sets/src/mage/sets/mirrodin/TowerofMurmurs.java new file mode 100644 index 0000000000..0a8a5c61f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/TowerofMurmurs.java @@ -0,0 +1,68 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetPlayer; + +/** + * + * @author Loki + */ +public class TowerofMurmurs extends CardImpl { + + public TowerofMurmurs (UUID ownerId) { + super(ownerId, 268, "Tower of Murmurs", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "MRD"; + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(8), new GenericManaCost(8)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public TowerofMurmurs (final TowerofMurmurs card) { + super(card); + } + + @Override + public TowerofMurmurs copy() { + return new TowerofMurmurs(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/TrollAscetic.java b/Mage.Sets/src/mage/sets/mirrodin/TrollAscetic.java new file mode 100644 index 0000000000..225b676db0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/TrollAscetic.java @@ -0,0 +1,77 @@ +/* + * 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.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CantTargetSourceEffect; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.cards.CardImpl; +import mage.filter.FilterStackObject; + +/** + * + * @author Loki + */ +public class TrollAscetic extends CardImpl { + private static FilterStackObject filter = new FilterStackObject("spells or abilities your opponents control"); + + static { + filter.setTargetController(Constants.TargetController.OPPONENT); + } + + public TrollAscetic (UUID ownerId) { + super(ownerId, 135, "Troll Ascetic", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Troll"); + this.subtype.add("Shaman"); + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new CantTargetSourceEffect(filter, Constants.Duration.WhileOnBattlefield))); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{G}"))); + } + + public TrollAscetic (final TrollAscetic card) { + super(card); + } + + @Override + public TrollAscetic copy() { + return new TrollAscetic(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/TrollAscetic.java b/Mage.Sets/src/mage/sets/tenth/TrollAscetic.java new file mode 100644 index 0000000000..9f44aaadd0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/TrollAscetic.java @@ -0,0 +1,53 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class TrollAscetic extends mage.sets.mirrodin.TrollAscetic { + + public TrollAscetic (UUID ownerId) { + super(ownerId); + this.cardNumber = 305; + this.expansionSetCode = "10E"; + } + + public TrollAscetic (final TrollAscetic card) { + super(card); + } + + @Override + public TrollAscetic copy() { + return new TrollAscetic(this); + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/ArtifactsOnBattlefieldCount.java b/Mage/src/mage/abilities/dynamicvalue/common/ArtifactsOnBattlefieldCount.java new file mode 100644 index 0000000000..1eeb2c96c1 --- /dev/null +++ b/Mage/src/mage/abilities/dynamicvalue/common/ArtifactsOnBattlefieldCount.java @@ -0,0 +1,27 @@ +package mage.abilities.dynamicvalue.common; + +import mage.Constants; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.filter.Filter; +import mage.filter.FilterPermanent; +import mage.game.Game; + +class ArtifactsOnBattlefieldCount implements DynamicValue { + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.getCardType().add(Constants.CardType.ARTIFACT); + filter.setScopeCardType(Filter.ComparisonScope.Any); + } + + @Override + public int calculate(Game game, Ability sourceAbility) { + return game.getBattlefield().countAll(filter); + } + + @Override + public DynamicValue clone() { + return new ArtifactsOnBattlefieldCount(); + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java b/Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java index 2ae770b018..bad46a62c3 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java +++ b/Mage/src/mage/abilities/dynamicvalue/common/StaticValue.java @@ -28,6 +28,6 @@ public class StaticValue implements DynamicValue { @Override public String toString() { - return String.format("%1$+d", value); + return Integer.toString(value); } } diff --git a/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java b/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java index ee996153fb..87c5c31bd6 100644 --- a/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java @@ -78,9 +78,9 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect