diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiLavarunner.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiLavarunner.java index 8d9e49c561..f8bd424494 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiLavarunner.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiLavarunner.java @@ -31,7 +31,7 @@ import java.util.UUID; public class AkkiLavarunner extends CardImpl { public AkkiLavarunner(UUID ownerId) { - super(ownerId, 153, "Akki Lavarunner", Constants.Rarity.COMMON, new Constants.CardType[]{Constants.CardType.CREATURE}, "{3}{R}"); + super(ownerId, 153, "Akki Lavarunner", Constants.Rarity.RARE, new Constants.CardType[]{Constants.CardType.CREATURE}, "{3}{R}"); this.expansionSetCode = "CHK"; this.subtype.add("Goblin"); this.subtype.add("Warrior"); @@ -57,7 +57,6 @@ class AkkiLavarunnerAbility extends TriggeredAbilityImpl public AkkiLavarunnerAbility() { super(Constants.Zone.BATTLEFIELD, new FlipSourceEffect()); - this.addEffect(new UntapAllLandsControllerEffect()); } public AkkiLavarunnerAbility(final AkkiLavarunnerAbility ability) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Befoul.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Befoul.java new file mode 100644 index 0000000000..66728d5ea0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Befoul.java @@ -0,0 +1,75 @@ +/* + * + * 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.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX + */ +public class Befoul extends CardImpl { + + public static final FilterPermanent filter = new FilterPermanent("land or nonblack creature"); + + static { + filter.getCardType().add(CardType.LAND); + filter.getCardType().add(CardType.CREATURE); + filter.setNotColor(true); + filter.setColor(ObjectColor.BLACK); + } + public Befoul (UUID ownerId) { + super(ownerId, 102, "Befoul", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + this.expansionSetCode = "CHK"; + this.color.setBlack(true); + // Destroy target land or nonblack creature. It can't be regenerated. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public Befoul (final Befoul card) { + super(card); + } + + @Override + public Befoul copy() { + return new Befoul(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java index 6dbf53a9d1..4fa9d1ee89 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java @@ -56,7 +56,6 @@ public class BenBenAkkiHermit extends CardImpl { filter.setTapped(false); filter.setUseTapped(true); filter.getSubtype().add("Mountain"); - filter.setScopeCardType(Filter.ComparisonScope.Any); filter.setScopeSubtype(Filter.ComparisonScope.Any); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BushiTenderfoot.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BushiTenderfoot.java new file mode 100644 index 0000000000..6b3cf65f3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BushiTenderfoot.java @@ -0,0 +1,102 @@ +/* + * + * 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.championsofkamigawa; + +import java.util.UUID; +import mage.Constants; +import mage.MageInt; +import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.FlippedCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.CopyTokenEffect; +import mage.abilities.effects.common.FlipSourceEffect; +import mage.abilities.keyword.BushidoAbility; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.permanent.token.Token; + +/** + * @author LevelX + */ +public class BushiTenderfoot extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); + + static { + filter.setUseDamageDealt(true); + filter.setDamageDealt(true); + } + + public BushiTenderfoot(UUID ownerId) { + super(ownerId, 2, "Bushi Tenderfoot", Constants.Rarity.UNCOMMON, new Constants.CardType[]{Constants.CardType.CREATURE}, "{W}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When that creature is put into a graveyard this turn, flip Initiate of Blood. + this.addAbility(new DiesAndDealtDamageThisTurnTriggeredAbility(new FlipSourceEffect())); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new KenzoTheHardhearted()), FlippedCondition.getInstance(), ""))); + + + } + + public BushiTenderfoot(final BushiTenderfoot card) { + super(card); + } + + @Override + public BushiTenderfoot copy() { + return new BushiTenderfoot(this); + } +} + +class KenzoTheHardhearted extends Token { + + KenzoTheHardhearted() { + super("Kenzo the Hardhearted", ""); + supertype.add("Legendary"); + cardType.add(Constants.CardType.CREATURE); + color.setWhite(true); + subtype.add("Human"); + subtype.add("Samurai"); + power = new MageInt(3); + toughness = new MageInt(4); + + // Double strike; bushido 2 (When this blocks or becomes blocked, it gets +2/+2 until end of turn.) + this.addAbility(DoubleStrikeAbility.getInstance()); + this.addAbility(new BushidoAbility(2)); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/CrushingPain.java b/Mage.Sets/src/mage/sets/championsofkamigawa/CrushingPain.java new file mode 100644 index 0000000000..ac988e3ea7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/CrushingPain.java @@ -0,0 +1,73 @@ +/* + * + * 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.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX + */ +public class CrushingPain extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); + static { + filter.setUseDamageDealt(true); + filter.setDamageDealt(true); + } + public CrushingPain (UUID ownerId) { + super(ownerId, 162, "Crushing Pain", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "CHK"; + this.color.setRed(true); + + // Crushing Pain deals 6 damage to target creature that was dealt damage this turn. + this.getSpellAbility().addEffect(new DamageTargetEffect(6)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public CrushingPain (final CrushingPain card) { + super(card); + } + + @Override + public CrushingPain copy() { + return new CrushingPain(this); + } + +} + + diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/FeastOfWorms.java b/Mage.Sets/src/mage/sets/championsofkamigawa/FeastOfWorms.java new file mode 100644 index 0000000000..aea46d2d08 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/FeastOfWorms.java @@ -0,0 +1,123 @@ +/* + * Copyright 2011 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.championsofkamigawa; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LevelX + */ +public class FeastOfWorms extends CardImpl { + + private final static FilterControlledPermanent filter = new FilterControlledPermanent(); + static { + filter.getCardType().add(CardType.LAND); + } + + + public FeastOfWorms (UUID ownerId) { + super(ownerId, 216, "Feast of Worms", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + this.color.setGreen(true); + + // Destroy target land. If that land was legendary, its controller sacrifices another land. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + this.getSpellAbility().addEffect(new FeastOfWormsEffect()); + } + + public FeastOfWorms (final FeastOfWorms card) { + super(card); + } + + @Override + public FeastOfWorms copy() { + return new FeastOfWorms(this); + } + +} + +class FeastOfWormsEffect extends OneShotEffect { + + FeastOfWormsEffect() { + super(Outcome.Sacrifice); + staticText = "If that land was legendary, its controller sacrifices another land"; + } + + FeastOfWormsEffect(FeastOfWormsEffect effect) { + super(effect); + } + + @Override + public FeastOfWormsEffect copy() { + return new FeastOfWormsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + //Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD); + Player targetPlayer = game.getPlayer(permanent.getControllerId()); + if (targetPlayer != null && permanent != null + && (permanent.getSupertype().get(0).toString().equals("Legendary"))) { + FilterControlledPermanent filter = new FilterControlledPermanent("land to sacrifice"); + filter.getCardType().add(CardType.LAND); + filter.getControllerId().add(targetPlayer.getId()); + filter.setNotController(false); + TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false); + + if (target.canChoose(targetPlayer.getId(), game)) { + targetPlayer.choose(Outcome.Sacrifice, target, source.getSourceId(), game); + + Permanent land = game.getPermanent(target.getFirstTarget()); + if (land != null) { + return land.sacrifice(source.getId(), game); + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/FieldOfReality.java b/Mage.Sets/src/mage/sets/championsofkamigawa/FieldOfReality.java new file mode 100644 index 0000000000..d0a61d2957 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/FieldOfReality.java @@ -0,0 +1,127 @@ +/* + * 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.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.AttachmentType; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.EvasionAbility; +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.CantBlockSourceEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +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; + +/** + * @author LevelX + */ +public class FieldOfReality extends CardImpl { + + public FieldOfReality(UUID ownerId) { + super(ownerId, 60, "Field of Reality", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Aura"); + this.color.setBlue(true); + + // Enchanted creature can't be blocked by Spirits. + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new FieldOfRealityEvasionAbility(), AttachmentType.AURA ))); + // {1}{U}: Return Field of Reality to its owner's hand. + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{U}"))); + } + + public FieldOfReality(final FieldOfReality card) { + super(card); + } + + @Override + public FieldOfReality copy() { + return new FieldOfReality(this); + } + +} + +class FieldOfRealityEvasionAbility extends EvasionAbility { + + public FieldOfRealityEvasionAbility() { + this.addEffect(new FieldOfRealityEvasionEffect()); + } + + public FieldOfRealityEvasionAbility(final FieldOfRealityEvasionAbility ability) { + super(ability); + } + + @Override + public String getRule() { + return "can't be blocked by Spirits"; + } + + @Override + public FieldOfRealityEvasionAbility copy() { + return new FieldOfRealityEvasionAbility(this); + } +} + +class FieldOfRealityEvasionEffect extends CantBlockSourceEffect { + + public FieldOfRealityEvasionEffect() { + super(Duration.WhileOnBattlefield); + } + + public FieldOfRealityEvasionEffect(final FieldOfRealityEvasionEffect effect) { + super(effect); + } + + @Override + public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { + return !blocker.hasSubtype("Spirit") ; + } + + @Override + public FieldOfRealityEvasionEffect copy() { + return new FieldOfRealityEvasionEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/ForbiddenOrchad.java b/Mage.Sets/src/mage/sets/championsofkamigawa/ForbiddenOrchad.java new file mode 100644 index 0000000000..97991f89c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/ForbiddenOrchad.java @@ -0,0 +1,67 @@ +/* + * + * 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.championsofkamigawa; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.game.permanent.token.SpiritToken; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX + */ +public class ForbiddenOrchad extends CardImpl { + + public ForbiddenOrchad (UUID ownerId) { + super(ownerId, 276, "Forbidden Orchad", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "CHK"; + // {T}: Add one mana of any color to your mana pool. + Ability ability = new AnyColorManaAbility(); + // Whenever you tap Forbidden Orchard for mana, put a 1/1 colorless Spirit creature token onto the battlefield under target opponent's control. + ability.addEffect(new CreateTokenTargetEffect(new SpiritToken())); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public ForbiddenOrchad (final ForbiddenOrchad card) { + super(card); + } + + @Override + public ForbiddenOrchad copy() { + return new ForbiddenOrchad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/InitiateOfBlood.java b/Mage.Sets/src/mage/sets/championsofkamigawa/InitiateOfBlood.java new file mode 100644 index 0000000000..6cce6a78a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/InitiateOfBlood.java @@ -0,0 +1,118 @@ +/* + * + * 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.championsofkamigawa; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.FlippedCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.CopyTokenEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.FlipSourceEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.permanent.token.Token; +import mage.target.common.TargetCreaturePermanent; + +/** + * @author LevelX + */ +public class InitiateOfBlood extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); + + static { + filter.setUseDamageDealt(true); + filter.setDamageDealt(true); + } + + public InitiateOfBlood(UUID ownerId) { + super(ownerId, 173, "Initiate of Blood", Constants.Rarity.UNCOMMON, new Constants.CardType[]{Constants.CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Ogre"); + this.subtype.add("Shaman"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Initiate of Blood deals 1 damage to target creature that was dealt damage this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // When that creature is put into a graveyard this turn, flip Initiate of Blood. + this.addAbility(new DiesAndDealtDamageThisTurnTriggeredAbility(new FlipSourceEffect())); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new GokaTheUnjust()), FlippedCondition.getInstance(), ""))); + + + } + + public InitiateOfBlood(final InitiateOfBlood card) { + super(card); + } + + @Override + public InitiateOfBlood copy() { + return new InitiateOfBlood(this); + } +} + +class GokaTheUnjust extends Token { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); + + static { + filter.setUseDamageDealt(true); + filter.setDamageDealt(true); + } + + GokaTheUnjust() { + super("Goka the Unjust", ""); + supertype.add("Legendary"); + cardType.add(Constants.CardType.CREATURE); + color.setRed(true); + subtype.add("Ogre"); + subtype.add("Shaman"); + power = new MageInt(4); + toughness = new MageInt(4); + + // {T}: Goka the Unjust deals 4 damage to target creature that was dealt damage this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/LanternLitGraveyard.java b/Mage.Sets/src/mage/sets/championsofkamigawa/LanternLitGraveyard.java index b8cd374329..cf3a4bdf2b 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/LanternLitGraveyard.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/LanternLitGraveyard.java @@ -32,7 +32,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.common.SkipNextUntapSourceEffect; -import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; @@ -47,9 +47,9 @@ public class LanternLitGraveyard extends CardImpl { super(ownerId, 278, "Lantern-Lit Graveyard", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); this.expansionSetCode = "CHK"; this.addAbility(new ColorlessManaAbility()); - Ability blueManaAbility = new BlueManaAbility(); - blueManaAbility.addEffect(new SkipNextUntapSourceEffect()); - this.addAbility(blueManaAbility); + Ability blackManaAbility = new BlackManaAbility(); + blackManaAbility.addEffect(new SkipNextUntapSourceEffect()); + this.addAbility(blackManaAbility); Ability redManaAbility = new RedManaAbility(); redManaAbility.addEffect(new SkipNextUntapSourceEffect()); this.addAbility(redManaAbility); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/NagaoBoundByHonor.java b/Mage.Sets/src/mage/sets/championsofkamigawa/NagaoBoundByHonor.java index 19748bcfc7..f2f27b4ce7 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/NagaoBoundByHonor.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/NagaoBoundByHonor.java @@ -38,7 +38,6 @@ import mage.abilities.effects.common.continious.BoostControlledEffect; import mage.abilities.keyword.BushidoAbility; import mage.cards.CardImpl; import mage.filter.Filter; -import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; /** diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/TellerOfTales.java b/Mage.Sets/src/mage/sets/championsofkamigawa/TellerOfTales.java new file mode 100644 index 0000000000..8029455307 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/TellerOfTales.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.championsofkamigawa; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.effects.common.MayTapOrUntapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterSpiritOrArcaneCard; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Ludwig + */ + +public class TellerOfTales extends CardImpl { + + // Outcome.Benefit, "tap or untap target creature" + + public TellerOfTales(UUID ownerId) { + super(ownerId, 95, "Teller of Tales", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + this.color.setBlue(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever you cast a Spirit or Arcane spell, you may tap or untap target creature. + Ability ability = new SpellCastTriggeredAbility(new MayTapOrUntapTargetEffect(),new FilterSpiritOrArcaneCard(), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public TellerOfTales(final TellerOfTales card) { + super(card); + } + + @Override + public TellerOfTales copy() { + return new TellerOfTales(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/futuresight/WitchsMist.java b/Mage.Sets/src/mage/sets/futuresight/WitchsMist.java new file mode 100644 index 0000000000..0121f91cf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/WitchsMist.java @@ -0,0 +1,74 @@ +/* + * 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.futuresight; + +import java.util.UUID; +import mage.Constants.CardType; +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.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class WitchsMist extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); + static { + filter.setUseDamageDealt(true); + filter.setDamageDealt(true); + } + + public WitchsMist(UUID ownerId) { + super(ownerId, 92, "Witch's Mist", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "FUT"; + this.color.setBlack(true); + // {2}{B}, {T}: Destroy target creature that was dealt damage this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(),new ManaCostsImpl("{2}{B}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public WitchsMist(final WitchsMist card) { + super(card); + } + + @Override + public WitchsMist copy() { + return new WitchsMist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java index 0d8e43929b..5ecf5a2c67 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/SphereOfTheSuns.java @@ -32,8 +32,8 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; @@ -51,8 +51,8 @@ public class SphereOfTheSuns extends CardImpl { Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(3)), "Sphere of the Suns enters the battlefield tapped and with three charge counters on it."); - ability.addEffect(new TapSourceEffect()); this.addAbility(ability); + this.addAbility(new EntersBattlefieldTappedAbility()); RemoveCountersSourceCost removeCounterCost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()); ability = new AnyColorManaAbility(); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java index 5fd50df7c1..eb7b3d8e8f 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Skinrender.java @@ -31,6 +31,7 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Outcome; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; @@ -55,7 +56,7 @@ public class Skinrender extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - Effect putCountersEffect = new AddCountersTargetEffect(CounterType.M1M1.createInstance(3)); + Effect putCountersEffect = new AddCountersTargetEffect(CounterType.M1M1.createInstance(3), Outcome.UnboostCreature); Ability ability = new EntersBattlefieldTriggeredAbility(putCountersEffect, false); Target target = new TargetCreaturePermanent(); target.setRequired(true); diff --git a/Mage.Sets/src/mage/sets/tempest/Opportunist.java b/Mage.Sets/src/mage/sets/tempest/Opportunist.java new file mode 100644 index 0000000000..0ad89d3585 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/Opportunist.java @@ -0,0 +1,94 @@ +/* + * 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.tempest; + +import java.util.UUID; + +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.DamagedByWatcher; + +/** + * @author LevelX + */ +public class Opportunist extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); + + static { + filter.setUseDamageDealt(true); + filter.setDamageDealt(true); + } + + public Opportunist(UUID ownerId) { + super(ownerId, 194, "Opportunist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Opportunist deals 1 damage to target creature that was dealt damage this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public Opportunist(final Opportunist card) { + super(card); + } + + @Override + public Opportunist copy() { + return new Opportunist(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/ScionOfTheWild.java b/Mage.Sets/src/mage/sets/tenth/ScionOfTheWild.java index 455ef973b7..e453aea818 100644 --- a/Mage.Sets/src/mage/sets/tenth/ScionOfTheWild.java +++ b/Mage.Sets/src/mage/sets/tenth/ScionOfTheWild.java @@ -44,7 +44,7 @@ import mage.filter.common.FilterControlledCreaturePermanent; */ public class ScionOfTheWild extends CardImpl { - private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control"); + private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control"); public ScionOfTheWild(UUID ownerId) { super(ownerId, 295, "Scion of the Wild", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); diff --git a/Mage.Sets/src/mage/sets/worldwake/TideforceElemental.java b/Mage.Sets/src/mage/sets/worldwake/TideforceElemental.java index f36cff0bb8..30b036534c 100644 --- a/Mage.Sets/src/mage/sets/worldwake/TideforceElemental.java +++ b/Mage.Sets/src/mage/sets/worldwake/TideforceElemental.java @@ -38,7 +38,6 @@ import mage.abilities.common.LandfallAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ColoredManaCost; -import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.abilities.effects.common.UntapSourceEffect; import mage.cards.CardImpl; @@ -50,6 +49,8 @@ import mage.target.common.TargetCreaturePermanent; * @author Loki */ public class TideforceElemental extends CardImpl { + + // private final static String text = "You may tap or untap another target creature"; private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); static { @@ -66,7 +67,10 @@ public class TideforceElemental extends CardImpl { this.toughness = new MageInt(1); // {U}, {tap}: You may tap or untap another target creature. - Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new MayTapOrUntapTargetEffect(), new ColoredManaCost(Constants.ColoredManaSymbol.U)); + Ability ability = new SimpleActivatedAbility( + Constants.Zone.BATTLEFIELD, + new MayTapOrUntapTargetEffect(), + new ColoredManaCost(Constants.ColoredManaSymbol.U)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); diff --git a/Mage/src/mage/abilities/TriggeredAbilityImpl.java b/Mage/src/mage/abilities/TriggeredAbilityImpl.java index 20600dc188..9e3f5ef22e 100644 --- a/Mage/src/mage/abilities/TriggeredAbilityImpl.java +++ b/Mage/src/mage/abilities/TriggeredAbilityImpl.java @@ -101,7 +101,7 @@ public abstract class TriggeredAbilityImpl> ex public String getRule() { String superRule = super.getRule(true); StringBuilder sb = new StringBuilder(); - if (optional) { + if (optional && !superRule.toLowerCase().startsWith("you may")) { sb.append("you may "); if (!this.getTargets().isEmpty()) { sb.append("have "); diff --git a/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java b/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java index da1d593e74..555de8a884 100644 --- a/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java @@ -63,6 +63,7 @@ public class CreateTokenTargetEffect extends OneShotEffect { public FlipSourceEffect() { super(Constants.Outcome.BecomeCreature); - staticText = "flip it."; + staticText = "flip it"; } public FlipSourceEffect(final FlipSourceEffect effect) { diff --git a/Mage/src/mage/filter/common/FilterCreaturePermanent.java b/Mage/src/mage/filter/common/FilterCreaturePermanent.java index a864a9765a..f313821651 100644 --- a/Mage/src/mage/filter/common/FilterCreaturePermanent.java +++ b/Mage/src/mage/filter/common/FilterCreaturePermanent.java @@ -42,6 +42,8 @@ public class FilterCreaturePermanent> exten protected boolean attacking; protected boolean useBlocking; protected boolean blocking; + protected boolean useDamageDealt; + protected boolean damageDealt; public FilterCreaturePermanent() { this("creature"); @@ -58,6 +60,8 @@ public class FilterCreaturePermanent> exten this.attacking = filter.attacking; this.useBlocking = filter.useBlocking; this.blocking = filter.blocking; + this.useDamageDealt = filter.useDamageDealt; + this.damageDealt = filter.damageDealt; this.useTapped = filter.useTapped; this.tapped = filter.tapped; } @@ -80,12 +84,17 @@ public class FilterCreaturePermanent> exten return notFilter; } } - return !notFilter; - } + return !notFilter; + } if (useBlocking && (permanent.getBlocking() > 0) != blocking) return notFilter; + if (useDamageDealt) { + // use this instead of getDamage() because damage is reset in case of regeneration + if (permanent.getDealtDamageByThisTurn().isEmpty()) + return notFilter; + } return !notFilter; } @@ -104,6 +113,23 @@ public class FilterCreaturePermanent> exten public void setBlocking ( boolean blocking ) { this.blocking = blocking; } + /** + * Select creatures dependant if they already got damage + * during the current turn. Works also if the creature + * was meanwhile regenerated during the turn. + * + * @param useDamage + */ + public void setUseDamageDealt ( boolean useDamageDealt ) { + this.useDamageDealt = useDamageDealt; + } + /** + * Select creatures that got damage dealt to this turn. + * @param damageDealt + */ + public void setDamageDealt ( boolean damageDealt ) { + this.damageDealt = damageDealt; + } @Override public FilterCreaturePermanent copy() {