diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AncientOfTheEquinox.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AncientOfTheEquinox.java index f89497400b..f7630ea0de 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AncientOfTheEquinox.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AncientOfTheEquinox.java @@ -48,8 +48,8 @@ public class AncientOfTheEquinox extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); this.color.setGreen(true); + this.nightCard = true; - this.canTransform = true; // Trample this.addAbility(TrampleAbility.getInstance()); diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/BywayCourier.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/BywayCourier.java new file mode 100644 index 0000000000..e5de8f3c5c --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/BywayCourier.java @@ -0,0 +1,64 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class BywayCourier extends CardImpl { + + public BywayCourier(UUID ownerId) { + super(ownerId, 196, "Byway Courier", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Human"); + this.subtype.add("Scout"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Byway Courier dies, investigate. + this.addAbility(new DiesTriggeredAbility(new InvestigateEffect(), false)); + } + + public BywayCourier(final BywayCourier card) { + super(card); + } + + @Override + public BywayCourier copy() { + return new BywayCourier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/ConfrontTheUnknown.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/ConfrontTheUnknown.java new file mode 100644 index 0000000000..f19c1d0be8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/ConfrontTheUnknown.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +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 ConfrontTheUnknown extends CardImpl { + + public ConfrontTheUnknown(UUID ownerId) { + super(ownerId, 198, "Confront the Unknown", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "SOI"; + + // Investigate, then target creature gets +1/+1 until end of turn. + Effect effect = new InvestigateEffect(); + effect.setText("Investigate"); + getSpellAbility().addEffect(effect); + effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn); + effect.setText(", then target creature gets +1/+1 until end of turn (<i>(To investigate, put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>"); + getSpellAbility().addEffect(effect); + getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ConfrontTheUnknown(final ConfrontTheUnknown card) { + super(card); + } + + @Override + public ConfrontTheUnknown copy() { + return new ConfrontTheUnknown(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CrawlingSensation.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CrawlingSensation.java new file mode 100644 index 0000000000..37dbc25f9b --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CrawlingSensation.java @@ -0,0 +1,113 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeGroupEvent; +import mage.game.permanent.token.InsectToken; + +/** + * + * @author LevelX2 + */ +public class CrawlingSensation extends CardImpl { + + public CrawlingSensation(UUID ownerId) { + super(ownerId, 199, "Crawling Sensation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "SOI"; + + // At the beginning of your upkeep, you may put the top two cards of your library into your graveyard. + this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new PutTopCardOfLibraryIntoGraveControllerEffect(2), true)); + + // Whenever one or more land cards are put into your graveyard from anywhere for the first time each turn, put a 1/1 green Insect creature token onto the battlefield. + this.addAbility(new CrawlingSensationTriggeredAbility()); + } + + public CrawlingSensation(final CrawlingSensation card) { + super(card); + } + + @Override + public CrawlingSensation copy() { + return new CrawlingSensation(this); + } +} + +class CrawlingSensationTriggeredAbility extends TriggeredAbilityImpl { + + public CrawlingSensationTriggeredAbility() { + super(Zone.BATTLEFIELD, new CreateTokenEffect(new InsectToken()), false); + } + + public CrawlingSensationTriggeredAbility(final CrawlingSensationTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE_GROUP; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event; + if (Zone.GRAVEYARD == zEvent.getToZone()) { + Integer usedOnTurn = (Integer) game.getState().getValue("usedOnTurn" + getOriginalId()); + if (usedOnTurn == null || usedOnTurn < game.getTurnNum()) { + for (Card card : zEvent.getCards()) { + if (card.getOwnerId().equals(getControllerId()) && card.getCardType().contains(CardType.LAND)) { + game.getState().setValue("usedOnTurn" + getOriginalId(), game.getTurnNum()); + return true; + } + } + } + } + return false; + } + + @Override + public CrawlingSensationTriggeredAbility copy() { + return new CrawlingSensationTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever one or more land cards are put into your graveyard from anywhere for the first time each turn, put a 1/1 green Insect creature token onto the battlefield."; + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CryptolithRite.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CryptolithRite.java new file mode 100644 index 0000000000..3ad4429fc4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CryptolithRite.java @@ -0,0 +1,64 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class CryptolithRite extends CardImpl { + + public CryptolithRite(UUID ownerId) { + super(ownerId, 200, "Cryptolith Rite", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "SOI"; + + // Creature you control have "{T}: Add one mana of any color to your mana pool." + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect( + new AnyColorManaAbility(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("creature"), false))); + } + + public CryptolithRite(final CryptolithRite card) { + super(card); + } + + @Override + public CryptolithRite copy() { + return new CryptolithRite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CultOfTheWaxingMoon.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CultOfTheWaxingMoon.java new file mode 100644 index 0000000000..ab5d3d5ae7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CultOfTheWaxingMoon.java @@ -0,0 +1,110 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.WolfToken; + +/** + * + * @author LevelX2 + */ +public class CultOfTheWaxingMoon extends CardImpl { + + public CultOfTheWaxingMoon(UUID ownerId) { + super(ownerId, 201, "Cult of the Waxing Moon", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Whenever a permanent you control transforms into a non-Human creature, put a 2/2 green Wolf creature token onto the battlefield. + this.addAbility(new CultOfTheWaxingMoonAbility()); + } + + public CultOfTheWaxingMoon(final CultOfTheWaxingMoon card) { + super(card); + } + + @Override + public CultOfTheWaxingMoon copy() { + return new CultOfTheWaxingMoon(this); + } +} + +class CultOfTheWaxingMoonAbility extends TriggeredAbilityImpl { + + private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); + + static { + filter.add(Predicates.not(new SubtypePredicate("Human"))); + } + + public CultOfTheWaxingMoonAbility() { + super(Zone.BATTLEFIELD, new CreateTokenEffect(new WolfToken()), false); + } + + public CultOfTheWaxingMoonAbility(final CultOfTheWaxingMoonAbility ability) { + super(ability); + } + + @Override + public CultOfTheWaxingMoonAbility copy() { + return new CultOfTheWaxingMoonAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.TRANSFORMED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent permanent = game.getPermanent(event.getTargetId()); + return permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game); + } + + @Override + public String getRule() { + return "Whenever a permanent you control transforms into a non-Human creature, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/EquestrianSkill.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/EquestrianSkill.java new file mode 100644 index 0000000000..fc49a42b6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/EquestrianSkill.java @@ -0,0 +1,85 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.EnchantedCreatureSubtypeCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class EquestrianSkill extends CardImpl { + + public EquestrianSkill(UUID ownerId) { + super(ownerId, 204, "Equestrian Skill", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Enchanted creature gets +3/+3. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield))); + // As long as enchanted creature is a Human, it has trample. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield), + new EnchantedCreatureSubtypeCondition("Human"), + "As long as enchanted creature is a Human, it has trample" + ))); + } + + public EquestrianSkill(final EquestrianSkill card) { + super(card); + } + + @Override + public EquestrianSkill copy() { + return new EquestrianSkill(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/ForkInTheRoad.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/ForkInTheRoad.java new file mode 100644 index 0000000000..5874475e06 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/ForkInTheRoad.java @@ -0,0 +1,135 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterBasicLandCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class ForkInTheRoad extends CardImpl { + + public ForkInTheRoad(UUID ownerId) { + super(ownerId, 205, "Fork in the Road", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}"); + this.expansionSetCode = "SOI"; + + // Search your library for up to two basic land cards and reveal them. Put one into your hand and the other into your graveyard. Then shuffle your library. + this.getSpellAbility().addEffect(new ForkInTheRoadEffect()); + } + + public ForkInTheRoad(final ForkInTheRoad card) { + super(card); + } + + @Override + public ForkInTheRoad copy() { + return new ForkInTheRoad(this); + } +} + +class ForkInTheRoadEffect extends OneShotEffect { + + protected static final FilterCard filter = new FilterCard("card to put into your hand"); + + public ForkInTheRoadEffect() { + super(Outcome.PutLandInPlay); + staticText = "Search your library for up to two basic land cards and reveal them. Put one into your hand and the other into your graveyard. Then shuffle your library"; + } + + public ForkInTheRoadEffect(final ForkInTheRoadEffect effect) { + super(effect); + } + + @Override + public ForkInTheRoadEffect copy() { + return new ForkInTheRoadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { + return false; + } + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + if (controller.searchLibrary(target, game)) { + if (target.getTargets().size() > 0) { + Cards revealed = new CardsImpl(); + for (UUID cardId : target.getTargets()) { + Card card = controller.getLibrary().getCard(cardId, game); + revealed.add(card); + } + controller.revealCards(sourceObject.getIdName(), revealed, game); + if (target.getTargets().size() > 0) { + TargetCard target2 = new TargetCard(Zone.LIBRARY, filter); + controller.choose(Outcome.Benefit, revealed, target2, game); + Card card = revealed.get(target2.getFirstTarget(), game); + if (card != null) { + controller.moveCards(card, Zone.HAND, source, game); + revealed.remove(card); + } + card = revealed.getCards(game).iterator().next(); + if (card != null) { + controller.moveCards(card, Zone.GRAVEYARD, source, game); + } + } else if (target.getTargets().size() == 1) { + Card card = revealed.getCards(game).iterator().next(); + if (card != null) { + controller.moveCards(card, Zone.HAND, source, game); + } + } + + } + controller.shuffleLibrary(source, game); + return true; + } + controller.shuffleLibrary(source, game); + return false; + + } + +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/GrafMole.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/GrafMole.java new file mode 100644 index 0000000000..1e853e4834 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/GrafMole.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SacrificeAllTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class GrafMole extends CardImpl { + + public GrafMole(UUID ownerId) { + super(ownerId, 207, "Graf Mole", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Mole"); + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Whenever you sacrifice a Clue, you gain 3 life. + this.addAbility(new SacrificeAllTriggeredAbility(new GainLifeEffect(3), new FilterCreaturePermanent("Clue", "a Clue"), TargetController.YOU, false)); + } + + public GrafMole(final GrafMole card) { + super(card); + } + + @Override + public GrafMole copy() { + return new GrafMole(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/HermitOfTheNatterknolls.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/HermitOfTheNatterknolls.java new file mode 100644 index 0000000000..233a5ee884 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/HermitOfTheNatterknolls.java @@ -0,0 +1,85 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterSpell; + +/** + * + * @author LevelX2 + */ +public class HermitOfTheNatterknolls extends CardImpl { + + public HermitOfTheNatterknolls(UUID ownerId) { + super(ownerId, 209, "Hermit of the Natterknolls", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Human"); + this.subtype.add("Werewolf"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + this.canTransform = true; + this.secondSideCard = new LoneWolfOfTheNatterknolls(ownerId); + + // Whenever an opponent casts a spell during your turn, draw a card. + this.addAbility(new ConditionalTriggeredAbility( + new SpellCastOpponentTriggeredAbility(new DrawCardSourceControllerEffect(1), new FilterSpell("a spell"), true), + new MyTurnCondition(), + "Whenever an opponent casts a spell during your turn, draw a card." + )); + + // At the beginning of each upkeep, if no spells were cast last turn, transform Hermit of the Natterknolls. + this.addAbility(new TransformAbility()); + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); + this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + } + + public HermitOfTheNatterknolls(final HermitOfTheNatterknolls card) { + super(card); + } + + @Override + public HermitOfTheNatterknolls copy() { + return new HermitOfTheNatterknolls(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/IntrepidProvisioner.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/IntrepidProvisioner.java new file mode 100644 index 0000000000..57f2e04fee --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/IntrepidProvisioner.java @@ -0,0 +1,81 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class IntrepidProvisioner extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Human", "another target Human you control"); + + static { + filter.add(new AnotherPredicate()); + } + + public IntrepidProvisioner(UUID ownerId) { + super(ownerId, 213, "Intrepid Provisioner", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Human"); + this.subtype.add("Scout"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // When Intrepid Provisioner enters the battlefield, another target Human you control gets +2/+2 until end of turn. + Ability ability = new EntersBattlefieldAbility(new BoostTargetEffect(2, 2, Duration.EndOfTurn), false); + ability.addTarget(new TargetControlledCreaturePermanent(filter)); + this.addAbility(ability); + + } + + public IntrepidProvisioner(final IntrepidProvisioner card) { + super(card); + } + + @Override + public IntrepidProvisioner copy() { + return new IntrepidProvisioner(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/KessigDireSwine.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/KessigDireSwine.java new file mode 100644 index 0000000000..22c8bf72f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/KessigDireSwine.java @@ -0,0 +1,71 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.DeliriumCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class KessigDireSwine extends CardImpl { + + public KessigDireSwine(UUID ownerId) { + super(ownerId, 214, "Kessig Dire Swine", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Boar"); + this.subtype.add("Horror"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // <i>Delirium</i> — Kessig Dire Swine has trample as long as there are four or more card types among cards in your graveyard. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), + new DeliriumCondition(), "<i>Delirium</i> — {this} has trample as long as there are four or more card types among cards in your graveyard"))); + } + + public KessigDireSwine(final KessigDireSwine card) { + super(card); + } + + @Override + public KessigDireSwine copy() { + return new KessigDireSwine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LoamDryad.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LoamDryad.java new file mode 100644 index 0000000000..cd44ab6a3f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LoamDryad.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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class LoamDryad extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + } + + public LoamDryad(UUID ownerId) { + super(ownerId, 216, "Loam Dryad", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Dryad"); + this.subtype.add("Horror"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {T}, Tap an untapped creature you control: Add one mana of any color to your mana pool. + Ability ability = new AnyColorManaAbility(); + ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))); + this.addAbility(ability); + } + + public LoamDryad(final LoamDryad card) { + super(card); + } + + @Override + public LoamDryad copy() { + return new LoamDryad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LoneWolfOfTheNatterknolls.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LoneWolfOfTheNatterknolls.java new file mode 100644 index 0000000000..18f57bc13c --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LoneWolfOfTheNatterknolls.java @@ -0,0 +1,83 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterSpell; + +/** + * + * @author LevelX2 + */ +public class LoneWolfOfTheNatterknolls extends CardImpl { + + public LoneWolfOfTheNatterknolls(UUID ownerId) { + super(ownerId, 209, "Lone Wolf of the Natterknolls", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, ""); + this.expansionSetCode = "SOI"; + this.subtype.add("Werewolf"); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + this.nightCard = true; + this.canTransform = true; + + // Whenever an opponent cast a spell during your turn, draw two cards. + this.addAbility(new ConditionalTriggeredAbility( + new SpellCastOpponentTriggeredAbility(new DrawCardSourceControllerEffect(2), new FilterSpell("a spell"), true), + new MyTurnCondition(), + "Whenever an opponent casts a spell during your turn, draw two card." + )); + + // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lone Wolf of the Natterknolls. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); + this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + } + + public LoneWolfOfTheNatterknolls(final LoneWolfOfTheNatterknolls card) { + super(card); + } + + @Override + public LoneWolfOfTheNatterknolls copy() { + return new LoneWolfOfTheNatterknolls(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MightBeyondReason.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MightBeyondReason.java new file mode 100644 index 0000000000..989ad755dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MightBeyondReason.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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.condition.common.DeliriumCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class MightBeyondReason extends CardImpl { + + public MightBeyondReason(UUID ownerId) { + super(ownerId, 217, "Might Beyond Reason", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); + this.expansionSetCode = "SOI"; + + // Put two +1/+1 counter on target creature. + // <i>Delirium</i> — Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard. + getSpellAbility().addEffect(new ConditionalOneShotEffect( + new AddCountersTargetEffect(CounterType.P1P1.createInstance(3)), + new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)), + DeliriumCondition.getInstance(), + "Put two +1/+1 counter on target creature.<br>" + + "<i>Delirium</i> — Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard" + )); + getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public MightBeyondReason(final MightBeyondReason card) { + super(card); + } + + @Override + public MightBeyondReason copy() { + return new MightBeyondReason(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MoldgrafScavenger.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MoldgrafScavenger.java new file mode 100644 index 0000000000..861c2c1973 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MoldgrafScavenger.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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.DeliriumCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class MoldgrafScavenger extends CardImpl { + + public MoldgrafScavenger(UUID ownerId) { + super(ownerId, 218, "Moldgraf Scavenger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Fungus"); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // <i>Delirium</i> — Moldgraf Scavenger gets +3/+0 as long as there are four or more card types among cards in your graveyard. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), + DeliriumCondition.getInstance(), + "<i>Delirium</i> — {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard"))); + } + + public MoldgrafScavenger(final MoldgrafScavenger card) { + super(card); + } + + @Override + public MoldgrafScavenger copy() { + return new MoldgrafScavenger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MoonlightHunt.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MoonlightHunt.java new file mode 100644 index 0000000000..09d4c6a7c2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/MoonlightHunt.java @@ -0,0 +1,112 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class MoonlightHunt extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public MoonlightHunt(UUID ownerId) { + super(ownerId, 219, "Moonlight Hunt", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "SOI"; + + // Choose target creature you don't control. Each creature you control that's a Wolf or Werewolf deals damage equal to its power to that creature. + this.getSpellAbility().addEffect(new MoonlightHuntEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public MoonlightHunt(final MoonlightHunt card) { + super(card); + } + + @Override + public MoonlightHunt copy() { + return new MoonlightHunt(this); + } +} + +class MoonlightHuntEffect extends OneShotEffect { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.or(new SubtypePredicate("Wolf"), new SubtypePredicate("Werewolf"))); + } + + public MoonlightHuntEffect() { + super(Outcome.Damage); + this.staticText = "Choose target creature you don't control. Each creature you control that's a Wolf or Werewolf deals damage equal to its power to that creature"; + } + + public MoonlightHuntEffect(final MoonlightHuntEffect effect) { + super(effect); + } + + @Override + public MoonlightHuntEffect copy() { + return new MoonlightHuntEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (controller != null && targetCreature != null) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { + targetCreature.damage(permanent.getPower().getValue(), permanent.getId(), game, false, true); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/OneOfThePack.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/OneOfThePack.java new file mode 100644 index 0000000000..2b7cae32a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/OneOfThePack.java @@ -0,0 +1,72 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LevelX2 + */ +public class OneOfThePack extends CardImpl { + + public OneOfThePack(UUID ownerId) { + super(ownerId, 229, "One of the Pack", Rarity.COMMON, new CardType[]{CardType.CREATURE}, ""); + this.expansionSetCode = "SOI"; + this.subtype.add("Werewolf"); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + this.nightCard = true; + this.canTransform = true; + + // At the beginning of each upkeep, if a player cast two or more spells last turn, transform One of the Pack. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); + this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + } + + public OneOfThePack(final OneOfThePack card) { + super(card); + } + + @Override + public OneOfThePack copy() { + return new OneOfThePack(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/RootOut.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/RootOut.java new file mode 100644 index 0000000000..51ad14a657 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/RootOut.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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class RootOut extends CardImpl { + + public RootOut(UUID ownerId) { + super(ownerId, 224, "Root Out", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "SOI"; + + // Destroy target artifact or enchantment. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + // Investigate. + Effect effect = new InvestigateEffect(); + effect.setText("<br>Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>"); + this.getSpellAbility().addEffect(effect); + } + + public RootOut(final RootOut card) { + super(card); + } + + @Override + public RootOut copy() { + return new RootOut(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SeasonsPast.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SeasonsPast.java new file mode 100644 index 0000000000..86117c855c --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SeasonsPast.java @@ -0,0 +1,152 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToLibrarySpellEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class SeasonsPast extends CardImpl { + + public SeasonsPast(UUID ownerId) { + super(ownerId, 226, "Seasons Past", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{4}{G}{G}"); + this.expansionSetCode = "SOI"; + + // Return any number of cards with different converted mana costs from your graveyard to your hand. Put Seasons Past on the bottom of its owner's library. + this.getSpellAbility().addEffect(new SeasonsPastEffect()); + this.getSpellAbility().addEffect(new ReturnToLibrarySpellEffect(false)); + } + + public SeasonsPast(final SeasonsPast card) { + super(card); + } + + @Override + public SeasonsPast copy() { + return new SeasonsPast(this); + } +} + +class SeasonsPastEffect extends OneShotEffect { + + public SeasonsPastEffect() { + super(Outcome.ReturnToHand); + this.staticText = "Return any number of cards with different converted mana costs from your graveyard to your hand"; + } + + public SeasonsPastEffect(final SeasonsPastEffect effect) { + super(effect); + } + + @Override + public SeasonsPastEffect copy() { + return new SeasonsPastEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + SeasonsPastTarget target = new SeasonsPastTarget(); + controller.choose(outcome, target, source.getSourceId(), game); + controller.moveCards(new CardsImpl(target.getTargets()), Zone.HAND, source, game); + } + return false; + } +} + +class SeasonsPastTarget extends TargetCardInYourGraveyard { + + public SeasonsPastTarget() { + super(0, Integer.MAX_VALUE, new FilterCard("cards with different converted mana costs from your graveyard")); + } + + public SeasonsPastTarget(SeasonsPastTarget target) { + super(target); + } + + @Override + public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { + Set<Integer> usedCMC = new HashSet<>(); + for (UUID targetId : this.getTargets()) { + Card card = game.getCard(targetId); + if (card != null) { + usedCMC.add(card.getManaCost().convertedManaCost()); + } + } + Set<UUID> possibleTargets = super.possibleTargets(sourceId, sourceControllerId, game); + Set<UUID> leftPossibleTargets = new HashSet<>(); + for (UUID targetId : possibleTargets) { + Card card = game.getCard(targetId); + if (card != null && !usedCMC.contains(card.getManaCost().convertedManaCost())) { + leftPossibleTargets.add(targetId); + } + } + return leftPossibleTargets; + } + + @Override + public boolean canTarget(UUID playerId, UUID objectId, Ability source, Game game) { + if (super.canTarget(playerId, objectId, source, game)) { + Set<Integer> usedCMC = new HashSet<>(); + for (UUID targetId : this.getTargets()) { + Card card = game.getCard(targetId); + if (card != null) { + usedCMC.add(card.getManaCost().convertedManaCost()); + } + } + Card card = game.getCard(objectId); + return card != null && !usedCMC.contains(card.getManaCost().convertedManaCost()); + } + return false; + } + + @Override + public SeasonsPastTarget copy() { + return new SeasonsPastTarget(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SkinShedder.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SkinShedder.java index 5a022db5ad..55f66d51d6 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SkinShedder.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SkinShedder.java @@ -45,6 +45,7 @@ public class SkinShedder extends CardImpl { this.subtype.add("Insect"); this.subtype.add("Horror"); this.color.setRed(true); + this.nightCard = true; this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SolitaryHunter.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SolitaryHunter.java new file mode 100644 index 0000000000..6460ff4d82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SolitaryHunter.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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LevelX2 + */ +public class SolitaryHunter extends CardImpl { + + public SolitaryHunter(UUID ownerId) { + super(ownerId, 229, "Solitary Hunter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.subtype.add("Werewolf"); + + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + this.canTransform = true; + this.secondSideCard = new OneOfThePack(ownerId); + + // At the beginning of each upkeep, if no spells were cast last turn, transform Solitary Hunter. + this.addAbility(new TransformAbility()); + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); + this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.getInstance(), TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + } + + public SolitaryHunter(final SolitaryHunter card) { + super(card); + } + + @Override + public SolitaryHunter copy() { + return new SolitaryHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/TirelessTracker.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/TirelessTracker.java index 25abafc431..b52561c491 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/TirelessTracker.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/TirelessTracker.java @@ -29,19 +29,18 @@ package mage.sets.shadowsoverinnistrad; import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.SacrificeAllTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterLandPermanent; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; /** * @@ -61,7 +60,7 @@ public class TirelessTracker extends CardImpl { this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new InvestigateEffect(), new FilterLandPermanent("a land"), false, null, true)); // Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. - this.addAbility(new TirelessTrackerTriggeredAbility()); + this.addAbility(new SacrificeAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new FilterCreaturePermanent("Clue", "a Clue"), TargetController.YOU, false)); } public TirelessTracker(final TirelessTracker card) { @@ -73,35 +72,3 @@ public class TirelessTracker extends CardImpl { return new TirelessTracker(this); } } - -class TirelessTrackerTriggeredAbility extends TriggeredAbilityImpl { - - public TirelessTrackerTriggeredAbility() { - super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance())); - } - - public TirelessTrackerTriggeredAbility(final TirelessTrackerTriggeredAbility ability) { - super(ability); - } - - @Override - public TirelessTrackerTriggeredAbility copy() { - return new TirelessTrackerTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SACRIFICED_PERMANENT; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getSubtype().contains("Clue"); - } - - @Override - public String getRule() { - return "When you sacrifice a Clue, " + super.getRule(); - } -} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java index b7f9573a02..defaee5083 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java @@ -51,7 +51,7 @@ public class Triskaidekaphobia extends CardImpl { super(ownerId, 141, "Triskaidekaphobia", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); this.expansionSetCode = "SOI"; - // At the beginning of your upkeep, choose one &mdash Each player with exactly 13 life loses the game, then each player gains 1 life. + // At the beginning of your upkeep, choose one - Each player with exactly 13 life loses the game, then each player gains 1 life. // Each player with exactly 13 life loses the game, then each player loses 1 life. Ability ability = new BeginningOfUpkeepTriggeredAbility(new TriskaidekaphobiaGainLifeEffect(), TargetController.YOU, false); Mode mode = new Mode(); diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/UlvenwaldMysteries.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/UlvenwaldMysteries.java index 4fa7ce87b0..3ec39bc024 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/UlvenwaldMysteries.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/UlvenwaldMysteries.java @@ -28,22 +28,18 @@ package mage.sets.shadowsoverinnistrad; import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.SacrificeAllTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.TargetController; -import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.TokenPredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; /** * @@ -66,7 +62,7 @@ public class UlvenwaldMysteries extends CardImpl { this.addAbility(new DiesCreatureTriggeredAbility(new InvestigateEffect(), false, filter)); // Whenever you sacrifice a Clue, put a 1/1 white Human Soldier creature token onto the battlefield. - this.addAbility(new UlvenwaldMysteriesTriggeredAbility()); + this.addAbility(new SacrificeAllTriggeredAbility(new CreateTokenEffect(new HumanSoldierToken()), new FilterCreaturePermanent("Clue", "a Clue"), TargetController.YOU, false)); } public UlvenwaldMysteries(final UlvenwaldMysteries card) { @@ -78,35 +74,3 @@ public class UlvenwaldMysteries extends CardImpl { return new UlvenwaldMysteries(this); } } - -class UlvenwaldMysteriesTriggeredAbility extends TriggeredAbilityImpl { - - public UlvenwaldMysteriesTriggeredAbility() { - super(Zone.BATTLEFIELD, new CreateTokenEffect(new HumanSoldierToken())); - } - - public UlvenwaldMysteriesTriggeredAbility(final UlvenwaldMysteriesTriggeredAbility ability) { - super(ability); - } - - @Override - public UlvenwaldMysteriesTriggeredAbility copy() { - return new UlvenwaldMysteriesTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SACRIFICED_PERMANENT; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return event.getPlayerId().equals(this.getControllerId()) - && game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD).getSubtype().contains("Clue"); - } - - @Override - public String getRule() { - return "When you sacrifice a Clue, " + super.getRule(); - } -} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/VeteranCathar.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/VeteranCathar.java new file mode 100644 index 0000000000..379d6cfc4a --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/VeteranCathar.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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class VeteranCathar extends CardImpl { + + public VeteranCathar(UUID ownerId) { + super(ownerId, 238, "Veteran Cathar", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {3}{W}: Target Human gains double strike until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{3}{W}")); + ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("Human", "Human"))); + this.addAbility(ability); + + } + + public VeteranCathar(final VeteranCathar card) { + super(card); + } + + @Override + public VeteranCathar copy() { + return new VeteranCathar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/WeirdingWood.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/WeirdingWood.java new file mode 100644 index 0000000000..0466580e5d --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/WeirdingWood.java @@ -0,0 +1,86 @@ +/* + * 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.shadowsoverinnistrad; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LevelX2 + */ +public class WeirdingWood extends CardImpl { + + public WeirdingWood(UUID ownerId) { + super(ownerId, 240, "Weirding Wood", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "SOI"; + this.subtype.add("Aura"); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // When Weirding Wood enters the battlefield, investigate. + this.addAbility(new AsEntersBattlefieldAbility(new InvestigateEffect())); + + // Enchanted land has "{T}: Add two mana of any one color to your mana pool." + Ability gainedAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost()); + Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA); + effect.setText("Enchanted land has \"{T}: Add two mana of any color to your mana pool.\""); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + } + + public WeirdingWood(final WeirdingWood card) { + super(card); + } + + @Override + public WeirdingWood copy() { + return new WeirdingWood(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/common/SacrificeAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SacrificeAllTriggeredAbility.java new file mode 100644 index 0000000000..5930218632 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/SacrificeAllTriggeredAbility.java @@ -0,0 +1,81 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.common; + +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class SacrificeAllTriggeredAbility extends TriggeredAbilityImpl { + + private final FilterPermanent filter; + private final TargetController sacrificingPlayer; + + public SacrificeAllTriggeredAbility(Effect effect, FilterPermanent filter, TargetController sacrificingPlayer, boolean optional) { + super(Zone.ALL, effect, optional); + this.filter = filter; + this.sacrificingPlayer = sacrificingPlayer; + } + + public SacrificeAllTriggeredAbility(final SacrificeAllTriggeredAbility ability) { + super(ability); + this.filter = ability.filter; + this.sacrificingPlayer = ability.sacrificingPlayer; + } + + @Override + public SacrificeAllTriggeredAbility copy() { + return new SacrificeAllTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.SACRIFICED_PERMANENT; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + switch (sacrificingPlayer) { + case YOU: + if (event.getPlayerId().equals(getControllerId())) { + return false; + } + break; + case OPPONENT: + Player controller = game.getPlayer(getControllerId()); + if (controller == null || !controller.hasOpponent(event.getPlayerId(), game)) { + return false; + } + break; + } + Permanent sacrificedPermanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + return sacrificedPermanent != null && filter.match(sacrificedPermanent, getSourceId(), getControllerId(), game); + } + + @Override + public String getRule() { + String targetControllerText = "a player sacrifices "; + switch (sacrificingPlayer) { + case YOU: + targetControllerText = "you sacrifice "; + break; + case OPPONENT: + targetControllerText = "an opponent sacrifices "; + break; + } + return "Whenever " + targetControllerText + filter.getMessage() + ", " + super.getRule(); + } +} diff --git a/Mage/src/main/java/mage/abilities/common/ZoneChangeTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/ZoneChangeTriggeredAbility.java index dca81b6990..f18ff9e6c5 100644 --- a/Mage/src/main/java/mage/abilities/common/ZoneChangeTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/ZoneChangeTriggeredAbility.java @@ -94,7 +94,7 @@ public class ZoneChangeTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return new StringBuilder(rule).append(super.getRule()).toString(); + return rule + super.getRule(); } @Override diff --git a/Mage/src/main/java/mage/target/TargetImpl.java b/Mage/src/main/java/mage/target/TargetImpl.java index df09789ca1..b442ec9aa9 100644 --- a/Mage/src/main/java/mage/target/TargetImpl.java +++ b/Mage/src/main/java/mage/target/TargetImpl.java @@ -152,11 +152,7 @@ public abstract class TargetImpl implements Target { @Override public String getTargetName() { - StringBuilder sb = new StringBuilder(targetName); - if (isRandom()) { - sb.append(" chosen at random"); - } - return sb.toString(); + return targetName + (isRandom() ? " chosen at random" : ""); } @Override @@ -334,10 +330,8 @@ public abstract class TargetImpl implements Target { } else { return chosen; } - } else { - if (!getTargetController(game, playerId).chooseTarget(outcome, this, source, game)) { - return chosen; - } + } else if (!getTargetController(game, playerId).chooseTarget(outcome, this, source, game)) { + return chosen; } chosen = targets.size() >= getNumberOfTargets(); }