From 1eb2420c04e04067b20578ce065ebc4310b1f736 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 27 Aug 2015 17:07:55 +0300 Subject: [PATCH] Implement cards: Forced Retreat, Sage's Knowledge, Taoist Mystic, and Wolf Pack --- .../mage/sets/masterseditionii/WolfPack.java | 62 ++++++++++++++++ .../sets/masterseditioniii/ForcedRetreat.java | 60 +++++++++++++++ .../portalthreekingdoms/ForcedRetreat.java | 52 +++++++++++++ .../portalthreekingdoms/SagesKnowledge.java | 68 +++++++++++++++++ .../portalthreekingdoms/TaoistMystic.java | 74 +++++++++++++++++++ .../sets/portalthreekingdoms/WolfPack.java | 52 +++++++++++++ 6 files changed, 368 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/WolfPack.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/ForcedRetreat.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ForcedRetreat.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/SagesKnowledge.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/TaoistMystic.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/WolfPack.java diff --git a/Mage.Sets/src/mage/sets/masterseditionii/WolfPack.java b/Mage.Sets/src/mage/sets/masterseditionii/WolfPack.java new file mode 100644 index 00000000000..6bf9aeb6bfa --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/WolfPack.java @@ -0,0 +1,62 @@ +/* + * 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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DamageAsThoughNotBlockedAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WolfPack extends CardImpl { + + public WolfPack(UUID ownerId) { + super(ownerId, 187, "Wolf Pack", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); + this.expansionSetCode = "ME2"; + this.subtype.add("Wolf"); + this.power = new MageInt(7); + this.toughness = new MageInt(6); + + // You may have Wolf Pack assign its combat damage as though it weren't blocked. + this.addAbility(DamageAsThoughNotBlockedAbility.getInstance()); + } + + public WolfPack(final WolfPack card) { + super(card); + } + + @Override + public WolfPack copy() { + return new WolfPack(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ForcedRetreat.java b/Mage.Sets/src/mage/sets/masterseditioniii/ForcedRetreat.java new file mode 100644 index 00000000000..4ab6fb188bf --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ForcedRetreat.java @@ -0,0 +1,60 @@ +/* + * 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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ForcedRetreat extends CardImpl { + + public ForcedRetreat(UUID ownerId) { + super(ownerId, 37, "Forced Retreat", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "ME3"; + + // Put target creature on top of its owner's library. + this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ForcedRetreat(final ForcedRetreat card) { + super(card); + } + + @Override + public ForcedRetreat copy() { + return new ForcedRetreat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ForcedRetreat.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ForcedRetreat.java new file mode 100644 index 00000000000..21f5c31634e --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ForcedRetreat.java @@ -0,0 +1,52 @@ +/* + * 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ForcedRetreat extends mage.sets.masterseditioniii.ForcedRetreat { + + public ForcedRetreat(UUID ownerId) { + super(ownerId); + this.cardNumber = 44; + this.expansionSetCode = "PTK"; + } + + public ForcedRetreat(final ForcedRetreat card) { + super(card); + } + + @Override + public ForcedRetreat copy() { + return new ForcedRetreat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/SagesKnowledge.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/SagesKnowledge.java new file mode 100644 index 00000000000..2ede43fdb7d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/SagesKnowledge.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LoneFox + */ +public class SagesKnowledge extends CardImpl { + + public static final FilterCard filter = new FilterCard("sorcery card from your graveyard"); + + static { + filter.add(new CardTypePredicate(CardType.SORCERY)); + } + + public SagesKnowledge(UUID ownerId) { + super(ownerId, 52, "Sage's Knowledge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "PTK"; + + // Return target sorcery card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + } + + public SagesKnowledge(final SagesKnowledge card) { + super(card); + } + + @Override + public SagesKnowledge copy() { + return new SagesKnowledge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/TaoistMystic.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/TaoistMystic.java new file mode 100644 index 00000000000..655f5825eb1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/TaoistMystic.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class TaoistMystic extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with horsemanship"); + + static { + filter.add(new AbilityPredicate(HorsemanshipAbility.class)); + } + + public TaoistMystic(UUID ownerId) { + super(ownerId, 151, "Taoist Mystic", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Mystic"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Taoist Mystic can't be blocked by creatures with horsemanship. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public TaoistMystic(final TaoistMystic card) { + super(card); + } + + @Override + public TaoistMystic copy() { + return new TaoistMystic(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WolfPack.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WolfPack.java new file mode 100644 index 00000000000..89dd5e32a52 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WolfPack.java @@ -0,0 +1,52 @@ +/* + * 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class WolfPack extends mage.sets.masterseditionii.WolfPack { + + public WolfPack(UUID ownerId) { + super(ownerId); + this.cardNumber = 158; + this.expansionSetCode = "PTK"; + } + + public WolfPack(final WolfPack card) { + super(card); + } + + @Override + public WolfPack copy() { + return new WolfPack(this); + } +}