diff --git a/Mage.Client/config/config.properties b/Mage.Client/config/config.properties index 9d1335b8d7..6b7d7172d4 100644 --- a/Mage.Client/config/config.properties +++ b/Mage.Client/config/config.properties @@ -10,7 +10,7 @@ resource-path=/home/loki/.wine/drive_c/Program Files/Wizards of the Coast/Magic card-scaling-factor=0.4 # parameters for debugging and testing faster -default-deck-path=C:\\Projects\\Mage\\Mage.Client\\release\\sample-decks\\WhiteTokens.dck +default-deck-path=C:\\Users\\836D~1\\AppData\\Local\\Temp\\tempDeck1577fd51-f098-420e-8794-c22d2c0602d99142449166006085381.dck # 0: Human, 1: Computer - default, 2: Computer - minimax, 3: Computer - minimax hybrid default-other-player-index=3 default-computer-name=computer diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/SalvageScout.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/SalvageScout.java new file mode 100644 index 0000000000..69b07f39a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SalvageScout.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 mage.Constants.CardType; +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.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterArtifactCard; +import mage.target.TargetCard; + +import java.util.UUID; + +/** + * @author nantuko + */ +public class SalvageScout extends CardImpl { + + public SalvageScout(UUID ownerId) { + super(ownerId, 19, "Salvage Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "SOM"; + this.subtype.add("Human"); + this.subtype.add("Scout"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{W}")); + ability.addTarget(new TargetCard(Zone.GRAVEYARD, FilterArtifactCard.getDefault())); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public SalvageScout(final SalvageScout card) { + super(card); + } + + @Override + public SalvageScout copy() { + return new SalvageScout(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/SunblastAngel.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/SunblastAngel.java new file mode 100644 index 0000000000..c5b4c0a5e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SunblastAngel.java @@ -0,0 +1,79 @@ +/* + * 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.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author nantuko + */ +public class SunblastAngel extends CardImpl { + + private static final FilterPermanent tappedFilter = new FilterCreaturePermanent("tapped creatures"); + + static { + tappedFilter.setUseTapped(true); + tappedFilter.setTapped(true); + } + + public SunblastAngel (UUID ownerId) { + super(ownerId, 22, "Sunblast Angel", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "SOM"; + this.subtype.add("Angel"); + this.color.setWhite(true); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + addAbility(FlyingAbility.getInstance()); + addAbility(new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(tappedFilter), false)); + } + + public SunblastAngel (final SunblastAngel card) { + super(card); + } + + @Override + public SunblastAngel copy() { + return new SunblastAngel(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/TrueConviction.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrueConviction.java new file mode 100644 index 0000000000..476a6a25d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/TrueConviction.java @@ -0,0 +1,70 @@ +/* + * 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.common.SimpleStaticAbility; +import mage.abilities.effects.common.BoostControlledEffect; +import mage.abilities.effects.common.GainAbilityControlledEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author nantuko + */ +public class TrueConviction extends CardImpl { + + public TrueConviction (UUID ownerId) { + super(ownerId, 25, "True Conviction", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}{W}"); + this.expansionSetCode = "SOM"; + + this.color.setWhite(true); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault()))); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault()))); + } + + public TrueConviction (final TrueConviction card) { + super(card); + } + + @Override + public TrueConviction copy() { + return new TrueConviction(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java b/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java index 7348bb33a6..76e969b5bd 100644 --- a/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java +++ b/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java @@ -45,7 +45,7 @@ public class DayOfJudgment extends CardImpl { super(ownerId, 9, "Day of Judgment", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); this.expansionSetCode = "ZEN"; this.color.setWhite(true); - this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"))); + this.getSpellAbility().addEffect(new DestroyAllEffect(FilterCreaturePermanent.getDefault())); } public DayOfJudgment(final DayOfJudgment card) { diff --git a/Mage/src/mage/filter/common/FilterArtifactCard.java b/Mage/src/mage/filter/common/FilterArtifactCard.java new file mode 100644 index 0000000000..feae424d80 --- /dev/null +++ b/Mage/src/mage/filter/common/FilterArtifactCard.java @@ -0,0 +1,63 @@ +/* + * 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.filter.common; + +import mage.Constants.CardType; +import mage.filter.FilterCard; + +/** + * + * @author nantuko + */ +public class FilterArtifactCard extends FilterCard { + + private static final FilterArtifactCard defaultFilter = new FilterArtifactCard(); + + public FilterArtifactCard() { + this("artifact"); + } + + public FilterArtifactCard(String name) { + super(name); + this.cardType.add(CardType.ARTIFACT); + } + + public FilterArtifactCard(final FilterArtifactCard filter) { + super(filter); + } + + public static FilterArtifactCard getDefault() { + return defaultFilter; + } + + @Override + public FilterArtifactCard copy() { + return new FilterArtifactCard(this); + } +} diff --git a/Mage/src/mage/filter/common/FilterCreaturePermanent.java b/Mage/src/mage/filter/common/FilterCreaturePermanent.java index 731becf493..39fec82b21 100644 --- a/Mage/src/mage/filter/common/FilterCreaturePermanent.java +++ b/Mage/src/mage/filter/common/FilterCreaturePermanent.java @@ -44,6 +44,8 @@ public class FilterCreaturePermanent> exten protected boolean attacking; protected boolean useBlocking; protected boolean blocking; + protected boolean useTapped; + protected boolean tapped; public FilterCreaturePermanent() { this("creature"); @@ -60,6 +62,8 @@ public class FilterCreaturePermanent> exten this.attacking = filter.attacking; this.useBlocking = filter.useBlocking; this.blocking = filter.blocking; + this.useTapped = filter.useTapped; + this.tapped = filter.tapped; } public static FilterCreaturePermanent getDefault() { @@ -77,6 +81,9 @@ public class FilterCreaturePermanent> exten if (useBlocking && (permanent.getBlocking() > 0) != blocking) return notFilter; + if (useTapped && permanent.isTapped() != tapped) + return notFilter; + return !notFilter; } @@ -96,6 +103,14 @@ public class FilterCreaturePermanent> exten this.blocking = blocking; } + public void setUseTapped ( boolean useTapped ) { + this.useTapped = useTapped; + } + + public void setTapped ( boolean tapped ) { + this.tapped = tapped; + } + @Override public FilterCreaturePermanent copy() { if (this == defaultFilter)