From bff02c4f9f1d060b3f27653f38b526d09326d7ce Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 2 Aug 2013 15:28:31 +0200 Subject: [PATCH] [CHK] 8 cards. --- .../EightAndAHalfTails.java | 96 +++++++++++ .../championsofkamigawa/HideousLaughter.java | 65 +++++++ .../KamiOfThePaintedRoad.java | 122 +++++++++++++ .../championsofkamigawa/KodamasMight.java | 67 +++++++ .../sets/championsofkamigawa/NaturesWill.java | 163 ++++++++++++++++++ .../championsofkamigawa/SoullessRevival.java | 67 +++++++ .../championsofkamigawa/StrangeInversion.java | 67 +++++++ .../sets/championsofkamigawa/WearAway.java | 77 +++++++++ .../common/continious/BoostAllEffect.java | 6 +- 9 files changed, 727 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/EightAndAHalfTails.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/HideousLaughter.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/KamiOfThePaintedRoad.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/KodamasMight.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/NaturesWill.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/SoullessRevival.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/StrangeInversion.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/WearAway.java diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/EightAndAHalfTails.java b/Mage.Sets/src/mage/sets/championsofkamigawa/EightAndAHalfTails.java new file mode 100644 index 0000000000..64919bd485 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/EightAndAHalfTails.java @@ -0,0 +1,96 @@ +/* + * 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.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.continious.SetCardColorTargetEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.Target; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetSpellOrPermanent; + +/** + * + * @author LevelX2 + */ +public class EightAndAHalfTails extends CardImpl { + + private static final Filter filter = new FilterCard("white"); + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public EightAndAHalfTails(UUID ownerId) { + super(ownerId, 8, "Eight-and-a-Half-Tails", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{W}"); + this.expansionSetCode = "CHK"; + this.supertype.add("Legendary"); + this.subtype.add("Fox"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}{W}: Target permanent you control gains protection from white until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new ProtectionAbility(filter), Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")); + Target target = new TargetControlledPermanent(); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + // {1}: Target spell or permanent becomes white until end of turn. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SetCardColorTargetEffect(ObjectColor.WHITE, Duration.EndOfTurn, "Target spell or permanent becomes white until end of turn"), new ManaCostsImpl("{1}")); + target = new TargetSpellOrPermanent(); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + } + + public EightAndAHalfTails(final EightAndAHalfTails card) { + super(card); + } + + @Override + public EightAndAHalfTails copy() { + return new EightAndAHalfTails(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/HideousLaughter.java b/Mage.Sets/src/mage/sets/championsofkamigawa/HideousLaughter.java new file mode 100644 index 0000000000..67abd84a71 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/HideousLaughter.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +import java.util.UUID; +import mage.abilities.effects.common.continious.BoostAllEffect; +import mage.abilities.keyword.SpliceOntoArcaneAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class HideousLaughter extends CardImpl { + + public HideousLaughter(UUID ownerId) { + super(ownerId, 115, "Hideous Laughter", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}{B}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + + this.color.setBlack(true); + + // All creatures get -2/-2 until end of turn. + this.getSpellAbility().addEffect(new BoostAllEffect(-2,-2, Duration.EndOfTurn)); + // Splice onto Arcane {3}{B}{B} + this.addAbility(new SpliceOntoArcaneAbility("{3}{B}{B}")); + } + + public HideousLaughter(final HideousLaughter card) { + super(card); + } + + @Override + public HideousLaughter copy() { + return new HideousLaughter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KamiOfThePaintedRoad.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KamiOfThePaintedRoad.java new file mode 100644 index 0000000000..d2f4f021dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KamiOfThePaintedRoad.java @@ -0,0 +1,122 @@ +/* + * 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.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.choices.Choice; +import mage.choices.ChoiceColor; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.common.FilterSpiritOrArcaneCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class KamiOfThePaintedRoad extends CardImpl { + + private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard(); + + public KamiOfThePaintedRoad(UUID ownerId) { + super(ownerId, 23, "Kami of the Painted Road", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + + this.color.setWhite(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever you cast a Spirit or Arcane spell, Kami of the Painted Road gains protection from the color of your choice until end of turn. + Ability ability = new SpellCastTriggeredAbility(new GainProtectionFromColorSourceEffect(Duration.EndOfTurn), filter, true); + Choice colorChoice = new ChoiceColor(); + colorChoice.setMessage("Choose color (Kami of the Painted Road)"); + ability.addChoice(new ChoiceColor()); + this.addAbility(ability); + + } + + public KamiOfThePaintedRoad(final KamiOfThePaintedRoad card) { + super(card); + } + + @Override + public KamiOfThePaintedRoad copy() { + return new KamiOfThePaintedRoad(this); + } +} + +class GainProtectionFromColorSourceEffect extends GainAbilitySourceEffect { + + FilterCard protectionFilter; + + public GainProtectionFromColorSourceEffect(Duration duration) { + super(new ProtectionAbility(new FilterCard()), duration); + protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter(); + } + + public GainProtectionFromColorSourceEffect(final GainProtectionFromColorSourceEffect effect) { + super(effect); + this.protectionFilter = effect.protectionFilter.copy(); + } + + @Override + public GainProtectionFromColorSourceEffect copy() { + return new GainProtectionFromColorSourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getSourceId()); + if (creature != null) { + ChoiceColor choice = (ChoiceColor) source.getChoices().get(0); + protectionFilter.add(new ColorPredicate(choice.getColor())); + protectionFilter.setMessage(choice.getChoice()); + ((ProtectionAbility)ability).setFilter(protectionFilter); + creature.addAbility(ability, game); + return true; + } + return false; + } + + @Override + public String getText(Mode mode) { + return "{this} gains protection from the color of your choice " + duration.toString(); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KodamasMight.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KodamasMight.java new file mode 100644 index 0000000000..54d377b518 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KodamasMight.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.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.keyword.SpliceOntoArcaneAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class KodamasMight extends CardImpl { + + public KodamasMight(UUID ownerId) { + super(ownerId, 224, "Kodama's Might", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + + this.color.setGreen(true); + + // Target creature gets +2/+2 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2,2, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + // Splice onto Arcane {G} + this.addAbility(new SpliceOntoArcaneAbility("{G}")); + } + + public KodamasMight(final KodamasMight card) { + super(card); + } + + @Override + public KodamasMight copy() { + return new KodamasMight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/NaturesWill.java b/Mage.Sets/src/mage/sets/championsofkamigawa/NaturesWill.java new file mode 100644 index 0000000000..e25736afa5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/NaturesWill.java @@ -0,0 +1,163 @@ +/* + * 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.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author LevelX2 + */ +public class NaturesWill extends CardImpl { + + public NaturesWill(UUID ownerId) { + super(ownerId, 230, "Nature's Will", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}"); + this.expansionSetCode = "CHK"; + + this.color.setGreen(true); + + // Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control. + this.addAbility(new NaturesWillTriggeredAbility()); + } + + public NaturesWill(final NaturesWill card) { + super(card); + } + + @Override + public NaturesWill copy() { + return new NaturesWill(this); + } +} + +class NaturesWillTriggeredAbility extends TriggeredAbilityImpl { + + private boolean madeDamge = false; + private Set damagedPlayers = new HashSet(); + + public NaturesWillTriggeredAbility() { + super(Zone.BATTLEFIELD, new NaturesWillEffect(), false); + } + + public NaturesWillTriggeredAbility(final NaturesWillTriggeredAbility ability) { + super(ability); + this.madeDamge = ability.madeDamge; + this.damagedPlayers = new HashSet(); + this.damagedPlayers.addAll(ability.damagedPlayers); + } + + @Override + public NaturesWillTriggeredAbility copy() { + return new NaturesWillTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event instanceof DamagedPlayerEvent) { + DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event; + Permanent p = game.getPermanent(event.getSourceId()); + if (damageEvent.isCombatDamage() && p != null && p.getControllerId().equals(this.getControllerId())) { + madeDamge = true; + damagedPlayers.add(event.getPlayerId()); + } + } + if (event.getType().equals(GameEvent.EventType.COMBAT_DAMAGE_STEP_POST)) { + if (madeDamge) { + Set damagedPlayersCopy = new HashSet(); + damagedPlayersCopy.addAll(damagedPlayers); + for(Effect effect: this.getEffects()) { + effect.setValue("damagedPlayers", damagedPlayersCopy); + } + damagedPlayers.clear(); + madeDamge = false; + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever one or more creatures you control deal combat damage to a player, " + super.getRule(); + } +} + +class NaturesWillEffect extends OneShotEffect { + + public NaturesWillEffect() { + super(Outcome.Benefit); + this.staticText = "tap all lands that player controls and untap all lands you control"; + } + + public NaturesWillEffect(final NaturesWillEffect effect) { + super(effect); + } + + @Override + public NaturesWillEffect copy() { + return new NaturesWillEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Set damagedPlayers = (HashSet) this.getValue("damagedPlayers"); + if (damagedPlayers == null) { + return false; + } + + FilterLandPermanent filter = new FilterLandPermanent(); + List lands = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); + for (Permanent land : lands) { + if (damagedPlayers.contains(land.getControllerId())) { + land.tap(game); + } else if (land.getControllerId().equals(source.getControllerId())) { + land.untap(game); + } + } + + + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SoullessRevival.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SoullessRevival.java new file mode 100644 index 0000000000..b210e1d8a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SoullessRevival.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.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.keyword.SpliceOntoArcaneAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class SoullessRevival extends CardImpl { + + public SoullessRevival(UUID ownerId) { + super(ownerId, 144, "Soulless Revival", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + + this.color.setBlack(true); + + // Return target creature card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + // Splice onto Arcane {1}{B} + this.addAbility(new SpliceOntoArcaneAbility("{1}{B}")); + } + + public SoullessRevival(final SoullessRevival card) { + super(card); + } + + @Override + public SoullessRevival copy() { + return new SoullessRevival(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/StrangeInversion.java b/Mage.Sets/src/mage/sets/championsofkamigawa/StrangeInversion.java new file mode 100644 index 0000000000..ece825414d --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/StrangeInversion.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.abilities.effects.common.continious.SwitchPowerToughnessTargetEffect; +import mage.abilities.keyword.SpliceOntoArcaneAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class StrangeInversion extends CardImpl { + + public StrangeInversion(UUID ownerId) { + super(ownerId, 192, "Strange Inversion", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + + this.color.setRed(true); + + // Switch target creature's power and toughness until end of turn. + this.getSpellAbility().addEffect(new SwitchPowerToughnessTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + // Splice onto Arcane {1}{R} + this.addAbility(new SpliceOntoArcaneAbility("{1}{R}")); + } + + public StrangeInversion(final StrangeInversion card) { + super(card); + } + + @Override + public StrangeInversion copy() { + return new StrangeInversion(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/WearAway.java b/Mage.Sets/src/mage/sets/championsofkamigawa/WearAway.java new file mode 100644 index 0000000000..77b016e58c --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/WearAway.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.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.SpliceOntoArcaneAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.Target; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class WearAway extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment"); + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); + } + + public WearAway(UUID ownerId) { + super(ownerId, 250, "Wear Away", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}{G}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + + this.color.setGreen(true); + + // Destroy target artifact or enchantment. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + Target target = new TargetPermanent(filter); + target.setRequired(true); + this.getSpellAbility().addTarget(target); + // Splice onto Arcane {3}{G} + this.addAbility(new SpliceOntoArcaneAbility("{3}{G}")); + } + + public WearAway(final WearAway card) { + super(card); + } + + @Override + public WearAway copy() { + return new WearAway(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java b/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java index 4614af190b..2016b234d4 100644 --- a/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java @@ -53,15 +53,15 @@ public class BoostAllEffect extends ContinuousEffectImpl { protected boolean lockedInPT; public BoostAllEffect(int power, int toughness, Duration duration) { - this(power, toughness, duration, new FilterCreaturePermanent(), false); + this(power, toughness, duration, false); } public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration) { - this(power, toughness, duration, new FilterCreaturePermanent(), false); + this(power, toughness, duration, new FilterCreaturePermanent("All creatures"), false); } public BoostAllEffect(int power, int toughness, Duration duration, boolean excludeSource) { - this(power, toughness, duration, new FilterCreaturePermanent(), excludeSource); + this(power, toughness, duration, new FilterCreaturePermanent("All creatures"), excludeSource); } public BoostAllEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) {