From 5c3a3efb3434c788622fe5ae2cfacde09f85ddc0 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 10:12:57 +0300 Subject: [PATCH 1/9] Implement cards: Corrupt Court Official, Corrupt Eunuchs, Ghostly Visit, and Mystic Denial --- .../masterseditioniii/CorruptEunuchs.java | 68 ++++++++++++++++++ .../sets/masterseditioniii/GhostlyVisit.java | 52 ++++++++++++++ .../src/mage/sets/portal/MysticDenial.java | 69 ++++++++++++++++++ .../sets/portalsecondage/MysticDenial.java | 52 ++++++++++++++ .../CorruptCourtOfficial.java | 68 ++++++++++++++++++ .../portalthreekingdoms/CorruptEunuchs.java | 52 ++++++++++++++ .../portalthreekingdoms/GhostlyVisit.java | 70 +++++++++++++++++++ .../portalthreekingdoms/MysticDenial.java | 52 ++++++++++++++ 8 files changed, 483 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.java create mode 100644 Mage.Sets/src/mage/sets/portal/MysticDenial.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.java b/Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.java new file mode 100644 index 0000000000..266fba9eeb --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class CorruptEunuchs extends CardImpl { + + public CorruptEunuchs(UUID ownerId) { + super(ownerId, 92, "Corrupt Eunuchs", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Corrupt Eunuchs enters the battlefield, it deals 2 damage to target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CorruptEunuchs(final CorruptEunuchs card) { + super(card); + } + + @Override + public CorruptEunuchs copy() { + return new CorruptEunuchs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.java b/Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.java new file mode 100644 index 0000000000..a9f1ec18d0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class GhostlyVisit extends mage.sets.portalthreekingdoms.GhostlyVisit { + + public GhostlyVisit(UUID ownerId) { + super(ownerId); + this.cardNumber = 67; + this.expansionSetCode = "ME3"; + } + + public GhostlyVisit(final GhostlyVisit card) { + super(card); + } + + @Override + public GhostlyVisit copy() { + return new GhostlyVisit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/MysticDenial.java b/Mage.Sets/src/mage/sets/portal/MysticDenial.java new file mode 100644 index 0000000000..94dc18ea42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/MysticDenial.java @@ -0,0 +1,69 @@ +/* + * 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.portal; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author LoneFox + */ +public class MysticDenial extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("creature or sorcery spell"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.SORCERY))); + } + + public MysticDenial(UUID ownerId) { + super(ownerId, 62, "Mystic Denial", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + this.expansionSetCode = "POR"; + + // Counter target creature or sorcery spell. + this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + } + + public MysticDenial(final MysticDenial card) { + super(card); + } + + @Override + public MysticDenial copy() { + return new MysticDenial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.java b/Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.java new file mode 100644 index 0000000000..c814123cb5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.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.portalsecondage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MysticDenial extends mage.sets.portal.MysticDenial { + + public MysticDenial(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "PO2"; + } + + public MysticDenial(final MysticDenial card) { + super(card); + } + + @Override + public MysticDenial copy() { + return new MysticDenial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.java new file mode 100644 index 0000000000..9f2a8abf50 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.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.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class CorruptCourtOfficial extends CardImpl { + + public CorruptCourtOfficial(UUID ownerId) { + super(ownerId, 71, "Corrupt Court Official", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Corrupt Court Official enters the battlefield, target opponent discards a card. + Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public CorruptCourtOfficial(final CorruptCourtOfficial card) { + super(card); + } + + @Override + public CorruptCourtOfficial copy() { + return new CorruptCourtOfficial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.java new file mode 100644 index 0000000000..f3177279c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.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 CorruptEunuchs extends mage.sets.masterseditioniii.CorruptEunuchs { + + public CorruptEunuchs(UUID ownerId) { + super(ownerId); + this.cardNumber = 106; + this.expansionSetCode = "PTK"; + } + + public CorruptEunuchs(final CorruptEunuchs card) { + super(card); + } + + @Override + public CorruptEunuchs copy() { + return new CorruptEunuchs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.java new file mode 100644 index 0000000000..7f481d21d4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.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.portalthreekingdoms; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GhostlyVisit extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public GhostlyVisit(UUID ownerId) { + super(ownerId, 76, "Ghostly Visit", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "PTK"; + + // Destroy target nonblack creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public GhostlyVisit(final GhostlyVisit card) { + super(card); + } + + @Override + public GhostlyVisit copy() { + return new GhostlyVisit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.java new file mode 100644 index 0000000000..242b23636e --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.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 MysticDenial extends mage.sets.portal.MysticDenial { + + public MysticDenial(UUID ownerId) { + super(ownerId); + this.cardNumber = 49; + this.expansionSetCode = "PTK"; + } + + public MysticDenial(final MysticDenial card) { + super(card); + } + + @Override + public MysticDenial copy() { + return new MysticDenial(this); + } +} From 0e8c64c97f04e715b0c048a54c0cb5a678551c29 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 11:23:00 +0300 Subject: [PATCH 2/9] Implement cards: Liu Bei, Lord of Shu; Riding the Dilu Horse; Sun Ce, Young Conquerer; and Trip Wire --- .../masterseditioniii/LiuBeiLordOfShu.java | 52 ++++++++++++ .../masterseditioniii/RidingTheDiluHorse.java | 67 +++++++++++++++ .../SunCeYoungConquerer.java | 72 ++++++++++++++++ .../mage/sets/masterseditioniii/TripWire.java | 68 +++++++++++++++ .../portalthreekingdoms/LiuBeiLordOfShu.java | 85 +++++++++++++++++++ .../RidingTheDiluHorse.java | 54 ++++++++++++ .../SunCeYoungConquerer.java | 54 ++++++++++++ .../sets/portalthreekingdoms/TripWire.java | 54 ++++++++++++ 8 files changed, 506 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/TripWire.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.java b/Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.java new file mode 100644 index 0000000000..e98e81460f --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class LiuBeiLordOfShu extends mage.sets.portalthreekingdoms.LiuBeiLordOfShu { + + public LiuBeiLordOfShu(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "ME3"; + } + + public LiuBeiLordOfShu(final LiuBeiLordOfShu card) { + super(card); + } + + @Override + public LiuBeiLordOfShu copy() { + return new LiuBeiLordOfShu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.java b/Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.java new file mode 100644 index 0000000000..20069b5379 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RidingTheDiluHorse extends CardImpl { + + public RidingTheDiluHorse(UUID ownerId) { + super(ownerId, 131, "Riding the Dilu Horse", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "ME3"; + + // Target creature gets +2/+2 and gains horsemanship. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityTargetEffect(HorsemanshipAbility.getInstance(), Duration.WhileOnBattlefield); + effect.setText("and gains horsemanship"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public RidingTheDiluHorse(final RidingTheDiluHorse card) { + super(card); + } + + @Override + public RidingTheDiluHorse copy() { + return new RidingTheDiluHorse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.java b/Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.java new file mode 100644 index 0000000000..be6957bee4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SunCeYoungConquerer extends CardImpl { + + public SunCeYoungConquerer(UUID ownerId) { + super(ownerId, 52, "Sun Ce, Young Conquerer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "ME3"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // When Sun Ce, Young Conquerer enters the battlefield, you may return target creature to its owner's hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SunCeYoungConquerer(final SunCeYoungConquerer card) { + super(card); + } + + @Override + public SunCeYoungConquerer copy() { + return new SunCeYoungConquerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/TripWire.java b/Mage.Sets/src/mage/sets/masterseditioniii/TripWire.java new file mode 100644 index 0000000000..f95dca4b43 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/TripWire.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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class TripWire extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with horsemanship"); + + static { + filter.add(new AbilityPredicate(HorsemanshipAbility.class)); + } + + public TripWire(UUID ownerId) { + super(ownerId, 137, "Trip Wire", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "ME3"; + + // Destroy target creature with horsemanship. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public TripWire(final TripWire card) { + super(card); + } + + @Override + public TripWire copy() { + return new TripWire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.java new file mode 100644 index 0000000000..104fa35252 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; + +/** + * + * @author LoneFox + */ +public class LiuBeiLordOfShu extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(Predicates.or(new NamePredicate("Guan Yu, Sainted Warrior"), + new NamePredicate("Zhang Fei, Fierce Warrior"))); + } + + public LiuBeiLordOfShu(UUID ownerId) { + super(ownerId, 11, "Liu Bei, Lord of Shu", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // Liu Bei, Lord of Shu gets +2/+2 as long as you control a permanent named Guan Yu, Sainted Warrior or a permanent named Zhang Fei, Fierce Warrior. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), + "{this} gets +2/+2 as long as you control a permanent named Guan Yu, Sainted Warrior or a permanent named Zhang Fei, Fierce Warrior"))); + } + + public LiuBeiLordOfShu(final LiuBeiLordOfShu card) { + super(card); + } + + @Override + public LiuBeiLordOfShu copy() { + return new LiuBeiLordOfShu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java new file mode 100644 index 0000000000..12887868ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class RidingTheDiluHorse extends mage.sets.masterseditioniii.RidingTheDiluHorse { + + public RidingTheDiluHorse(UUID ownerId) { + super(ownerId); + this.cardNumber = 144; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.RARE; + } + + public RidingTheDiluHorse(final RidingTheDiluHorse card) { + super(card); + } + + @Override + public RidingTheDiluHorse copy() { + return new RidingTheDiluHorse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java new file mode 100644 index 0000000000..da5fcfdebc --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SunCeYoungConquerer extends mage.sets.masterseditioniii.SunCeYoungConquerer { + + public SunCeYoungConquerer(UUID ownerId) { + super(ownerId); + this.cardNumber = 55; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.RARE; + } + + public SunCeYoungConquerer(final SunCeYoungConquerer card) { + super(card); + } + + @Override + public SunCeYoungConquerer copy() { + return new SunCeYoungConquerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java new file mode 100644 index 0000000000..ee30216aae --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class TripWire extends mage.sets.masterseditioniii.TripWire { + + public TripWire(UUID ownerId) { + super(ownerId); + this.cardNumber = 156; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.UNCOMMON; + } + + public TripWire(final TripWire card) { + super(card); + } + + @Override + public TripWire copy() { + return new TripWire(this); + } +} From 07f4617713a3c48135ba87eb129d40ad991ce019 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 11:52:40 +0300 Subject: [PATCH 3/9] Implement cards: Burning Fields, Hunting Cheetah, Shu Grain Caravan, and Yellow Scarves Troops --- .../masterseditioniii/HuntingCheetah.java | 54 ++++++++++++++ .../portalthreekingdoms/BurningFields.java | 60 ++++++++++++++++ .../portalthreekingdoms/HuntingCheetah.java | 72 +++++++++++++++++++ .../portalthreekingdoms/ShuGrainCaravan.java | 64 +++++++++++++++++ .../YellowScarvesTroops.java | 63 ++++++++++++++++ 5 files changed, 313 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java b/Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java new file mode 100644 index 0000000000..3ae56e6bfd --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class HuntingCheetah extends mage.sets.portalthreekingdoms.HuntingCheetah { + + public HuntingCheetah(UUID ownerId) { + super(ownerId); + this.cardNumber = 124; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public HuntingCheetah(final HuntingCheetah card) { + super(card); + } + + @Override + public HuntingCheetah copy() { + return new HuntingCheetah(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.java new file mode 100644 index 0000000000..402d09f030 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class BurningFields extends CardImpl { + + public BurningFields(UUID ownerId) { + super(ownerId, 103, "Burning Fields", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}"); + this.expansionSetCode = "PTK"; + + // Burning Fields deals 5 damage to target opponent. + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + } + + public BurningFields(final BurningFields card) { + super(card); + } + + @Override + public BurningFields copy() { + return new BurningFields(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.java new file mode 100644 index 0000000000..b7df3c83fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsDamageToOpponentTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LoneFox + */ +public class HuntingCheetah extends CardImpl { + + private static final FilterCard filter = new FilterCard("Forest card"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public HuntingCheetah(UUID ownerId) { + super(ownerId, 138, "Hunting Cheetah", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Cat"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever Hunting Cheetah deals damage to an opponent, you may search your library for a Forest card, reveal that card, put it into your hand, then shuffle your library. + this.addAbility(new DealsDamageToOpponentTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), true)); + } + + public HuntingCheetah(final HuntingCheetah card) { + super(card); + } + + @Override + public HuntingCheetah copy() { + return new HuntingCheetah(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.java new file mode 100644 index 0000000000..965843b009 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuGrainCaravan extends CardImpl { + + public ShuGrainCaravan(UUID ownerId) { + super(ownerId, 26, "Shu Grain Caravan", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Shu Grain Caravan enters the battlefield, you gain 2 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2))); + } + + public ShuGrainCaravan(final ShuGrainCaravan card) { + super(card); + } + + @Override + public ShuGrainCaravan copy() { + return new ShuGrainCaravan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java new file mode 100644 index 0000000000..123664560a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class YellowScarvesTroops extends CardImpl { + + public YellowScarvesTroops(UUID ownerId) { + super(ownerId, 127, "Yellow Scarves Troops", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Yellow Scarves Troops can't block. + this.addAbility(new CantBlockAbility()); + } + + public YellowScarvesTroops(final YellowScarvesTroops card) { + super(card); + } + + @Override + public YellowScarvesTroops copy() { + return new YellowScarvesTroops(this); + } +} From 11cde1fcb9f7fad458b42cdbdec0714b9621d383 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 13:40:20 +0300 Subject: [PATCH 4/9] Implement cards: Borrowing the East Wind; Cao Ren, Wei Commander; Sima Yi, Wei Field Marshal; and Wu Admiral --- .../BorrowingTheEastWind.java | 67 +++++++++++++++ .../CaoRenWeiCommander.java | 69 +++++++++++++++ .../SimaYiWeiFieldMarshal.java | 75 +++++++++++++++++ .../sets/portalthreekingdoms/WuAdmiral.java | 83 +++++++++++++++++++ 4 files changed, 294 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.java diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.java new file mode 100644 index 0000000000..31ccf10a38 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class BorrowingTheEastWind extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with horsemanship"); + + static { + filter.add(new AbilityPredicate(HorsemanshipAbility.class)); + } + + public BorrowingTheEastWind(UUID ownerId) { + super(ownerId, 133, "Borrowing the East Wind", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{G}{G}"); + this.expansionSetCode = "PTK"; + + // Borrowing the East Wind deals X damage to each creature with horsemanship and each player. + this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter)); } + + public BorrowingTheEastWind(final BorrowingTheEastWind card) { + super(card); + } + + @Override + public BorrowingTheEastWind copy() { + return new BorrowingTheEastWind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.java new file mode 100644 index 0000000000..8bf4749d87 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.java @@ -0,0 +1,69 @@ +/* + * 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.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CaoRenWeiCommander extends CardImpl { + + public CaoRenWeiCommander(UUID ownerId) { + super(ownerId, 69, "Cao Ren, Wei Commander", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // When Cao Ren, Wei Commander enters the battlefield, you lose 3 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(3))); + } + + public CaoRenWeiCommander(final CaoRenWeiCommander card) { + super(card); + } + + @Override + public CaoRenWeiCommander copy() { + return new CaoRenWeiCommander(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.java new file mode 100644 index 0000000000..1080daa820 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class SimaYiWeiFieldMarshal extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamps you control"); + + static{ + filter.add(new SubtypePredicate("Swamp")); + } + + public SimaYiWeiFieldMarshal(UUID ownerId) { + super(ownerId, 82, "Sima Yi, Wei Field Marshal", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Sima Yi, Wei Field Marshal's power is equal to the number of Swamps you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); } + + public SimaYiWeiFieldMarshal(final SimaYiWeiFieldMarshal card) { + super(card); + } + + @Override + public SimaYiWeiFieldMarshal copy() { + return new SimaYiWeiFieldMarshal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.java new file mode 100644 index 0000000000..9d732edec3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +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.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LoneFox + */ +public class WuAdmiral extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new SubtypePredicate("Island")); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public WuAdmiral(UUID ownerId) { + super(ownerId, 57, "Wu Admiral", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Wu Admiral gets +1/+1 as long as an opponent controls an Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 0, false), + "{this} gets +1/+1 as long as an opponent controls an Island"))); + } + + public WuAdmiral(final WuAdmiral card) { + super(card); + } + + @Override + public WuAdmiral copy() { + return new WuAdmiral(this); + } +} From 70e7465a4e2f99b8780060bcdb70e2a2a00e5698 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 14:53:23 +0300 Subject: [PATCH 5/9] Implement cards: Council of Advisors, Return to Battle, Riding Red Hare, and Stolen Grain --- .../sets/masterseditioniii/StolenGrain.java | 62 +++++++++++++++++ .../CouncilOfAdvisors.java | 64 +++++++++++++++++ .../portalthreekingdoms/ReturnToBattle.java | 61 ++++++++++++++++ .../portalthreekingdoms/RidingRedHare.java | 69 +++++++++++++++++++ .../sets/portalthreekingdoms/StolenGrain.java | 52 ++++++++++++++ 5 files changed, 308 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.java b/Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.java new file mode 100644 index 0000000000..b8a7ad8741 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class StolenGrain extends CardImpl { + + public StolenGrain(UUID ownerId) { + super(ownerId, 75, "Stolen Grain", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "ME3"; + + // Stolen Grain deals 5 damage to target opponent. You gain 5 life. + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + this.getSpellAbility().addEffect(new GainLifeEffect(5)); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public StolenGrain(final StolenGrain card) { + super(card); + } + + @Override + public StolenGrain copy() { + return new StolenGrain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.java new file mode 100644 index 0000000000..3d2eeda876 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CouncilOfAdvisors extends CardImpl { + + public CouncilOfAdvisors(UUID ownerId) { + super(ownerId, 40, "Council of Advisors", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Council of Advisors enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1))); + } + + public CouncilOfAdvisors(final CouncilOfAdvisors card) { + super(card); + } + + @Override + public CouncilOfAdvisors copy() { + return new CouncilOfAdvisors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java new file mode 100644 index 0000000000..b383044698 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java @@ -0,0 +1,61 @@ +/* + * 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.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LoneFox + */ +public class ReturnToBattle extends CardImpl { + + public ReturnToBattle(UUID ownerId) { + super(ownerId, 81, "Return to Battle", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "PTK"; + + // Return target creature card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + } + + public ReturnToBattle(final ReturnToBattle card) { + super(card); + } + + @Override + public ReturnToBattle copy() { + return new ReturnToBattle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.java new file mode 100644 index 0000000000..3a946867ab --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.java @@ -0,0 +1,69 @@ +/* + * 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.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RidingRedHare extends CardImpl { + + public RidingRedHare(UUID ownerId) { + super(ownerId, 18, "Riding Red Hare", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "PTK"; + + // Target creature gets +3/+3 and gains horsemanship until end of turn. + Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn); + effect.setText("Target creature gets +3/+3"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(HorsemanshipAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains horsemanship until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public RidingRedHare(final RidingRedHare card) { + super(card); + } + + @Override + public RidingRedHare copy() { + return new RidingRedHare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.java new file mode 100644 index 0000000000..794a7c5893 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.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 StolenGrain extends mage.sets.masterseditioniii.StolenGrain { + + public StolenGrain(UUID ownerId) { + super(ownerId); + this.cardNumber = 83; + this.expansionSetCode = "PTK"; + } + + public StolenGrain(final StolenGrain card) { + super(card); + } + + @Override + public StolenGrain copy() { + return new StolenGrain(this); + } +} From ba7b3d656485d92a313c95e41a8fa5173cfc98cd Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 18:19:38 +0300 Subject: [PATCH 6/9] Implement cards: Poison Arrow, Shu Soldier-Farmers, Spring of Eternal Peace, and Young Wei Recruits --- .../masterseditioniii/ShuSoldierFarmers.java | 54 ++++++++++++++ .../masterseditioniii/YoungWeiRecruits.java | 63 ++++++++++++++++ .../sets/portalthreekingdoms/PoisonArrow.java | 72 +++++++++++++++++++ .../ShuSoldierFarmers.java | 64 +++++++++++++++++ .../SpringOfEternalPeace.java | 58 +++++++++++++++ .../portalthreekingdoms/YoungWeiRecruits.java | 52 ++++++++++++++ 6 files changed, 363 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java b/Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java new file mode 100644 index 0000000000..c045ae172c --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuSoldierFarmers extends mage.sets.portalthreekingdoms.ShuSoldierFarmers { + + public ShuSoldierFarmers(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public ShuSoldierFarmers(final ShuSoldierFarmers card) { + super(card); + } + + @Override + public ShuSoldierFarmers copy() { + return new ShuSoldierFarmers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java b/Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java new file mode 100644 index 0000000000..843d6ddacf --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class YoungWeiRecruits extends CardImpl { + + public YoungWeiRecruits(UUID ownerId) { + super(ownerId, 84, "Young Wei Recruits", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Young Wei Recruits can't block. + this.addAbility(new CantBlockAbility()); + } + + public YoungWeiRecruits(final YoungWeiRecruits card) { + super(card); + } + + @Override + public YoungWeiRecruits copy() { + return new YoungWeiRecruits(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.java new file mode 100644 index 0000000000..a2c2617a16 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.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.portalthreekingdoms; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class PoisonArrow extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public PoisonArrow(UUID ownerId) { + super(ownerId, 80, "Poison Arrow", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "PTK"; + + // Destroy target nonblack creature. You gain 3 life. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new GainLifeEffect(3)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public PoisonArrow(final PoisonArrow card) { + super(card); + } + + @Override + public PoisonArrow copy() { + return new PoisonArrow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.java new file mode 100644 index 0000000000..d039e4d206 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuSoldierFarmers extends CardImpl { + + public ShuSoldierFarmers(UUID ownerId) { + super(ownerId, 27, "Shu Soldier-Farmers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // When Shu Soldier-Farmers enters the battlefield, you gain 4 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4))); + } + + public ShuSoldierFarmers(final ShuSoldierFarmers card) { + super(card); + } + + @Override + public ShuSoldierFarmers copy() { + return new ShuSoldierFarmers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.java new file mode 100644 index 0000000000..c088936511 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.java @@ -0,0 +1,58 @@ +/* + * 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.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SpringOfEternalPeace extends CardImpl { + + public SpringOfEternalPeace(UUID ownerId) { + super(ownerId, 148, "Spring of Eternal Peace", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}"); + this.expansionSetCode = "PTK"; + + // You gain 8 life. + this.getSpellAbility().addEffect(new GainLifeEffect(8)); + } + + public SpringOfEternalPeace(final SpringOfEternalPeace card) { + super(card); + } + + @Override + public SpringOfEternalPeace copy() { + return new SpringOfEternalPeace(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.java new file mode 100644 index 0000000000..83bf0b4946 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.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 YoungWeiRecruits extends mage.sets.masterseditioniii.YoungWeiRecruits { + + public YoungWeiRecruits(UUID ownerId) { + super(ownerId); + this.cardNumber = 94; + this.expansionSetCode = "PTK"; + } + + public YoungWeiRecruits(final YoungWeiRecruits card) { + super(card); + } + + @Override + public YoungWeiRecruits copy() { + return new YoungWeiRecruits(this); + } +} From 352df17951723864d002f862818ac07ac656f618 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 27 Aug 2015 10:40:00 +0300 Subject: [PATCH 7/9] Implement cards: Broken Dam, Extinguish, Guan Yu's 1,000-Li March, and Rockslide Ambush --- .../masterseditioniii/GuanYus1000LiMarch.java | 66 +++++++++++++++++ .../masterseditioniv/RockslideAmbush.java | 54 ++++++++++++++ .../mage/sets/portalsecondage/Extinguish.java | 68 ++++++++++++++++++ .../sets/portalthreekingdoms/BrokenDam.java | 70 +++++++++++++++++++ .../sets/portalthreekingdoms/Extinguish.java | 52 ++++++++++++++ .../GuanYus1000LiMarch.java | 52 ++++++++++++++ .../portalthreekingdoms/RockslideAmbush.java | 68 ++++++++++++++++++ .../src/mage/sets/starter1999/Extinguish.java | 52 ++++++++++++++ 8 files changed, 482 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/Extinguish.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/Extinguish.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.java b/Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.java new file mode 100644 index 0000000000..a391fb5ad5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.TappedPredicate; + +/** + * + * @author LoneFox + */ +public class GuanYus1000LiMarch extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creatures"); + + static { + filter.add(new TappedPredicate()); + } + + public GuanYus1000LiMarch(UUID ownerId) { + super(ownerId, 13, "Guan Yu's 1,000-Li March", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{W}{W}"); + this.expansionSetCode = "ME3"; + + // Destroy all tapped creatures. + this.getSpellAbility().addEffect(new DestroyAllEffect(filter, false)); + } + + public GuanYus1000LiMarch(final GuanYus1000LiMarch card) { + super(card); + } + + @Override + public GuanYus1000LiMarch copy() { + return new GuanYus1000LiMarch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java b/Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java new file mode 100644 index 0000000000..b899b3818f --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java @@ -0,0 +1,54 @@ +/* + * 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.masterseditioniv; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class RockslideAmbush extends mage.sets.portalthreekingdoms.RockslideAmbush { + + public RockslideAmbush(UUID ownerId) { + super(ownerId); + this.cardNumber = 134; + this.expansionSetCode = "ME4"; + this.rarity = Rarity.COMMON; + } + + public RockslideAmbush(final RockslideAmbush card) { + super(card); + } + + @Override + public RockslideAmbush copy() { + return new RockslideAmbush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/Extinguish.java b/Mage.Sets/src/mage/sets/portalsecondage/Extinguish.java new file mode 100644 index 0000000000..4ce9500402 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/Extinguish.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.portalsecondage; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author LoneFox + */ +public class Extinguish extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("sorcery spell"); + + static { + filter.add(new CardTypePredicate(CardType.SORCERY)); + } + + public Extinguish(UUID ownerId) { + super(ownerId, 38, "Extinguish", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "PO2"; + + // Counter target sorcery spell. + this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + } + + public Extinguish(final Extinguish card) { + super(card); + } + + @Override + public Extinguish copy() { + return new Extinguish(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.java new file mode 100644 index 0000000000..698ebcd5b1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BrokenDam extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.not(new AbilityPredicate(HorsemanshipAbility.class))); + } + + public BrokenDam(UUID ownerId) { + super(ownerId, 37, "Broken Dam", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}"); + this.expansionSetCode = "PTK"; + + // Tap one or two target creatures without horsemanship. + this.getSpellAbility().addEffect(new TapTargetEffect("one or two target creatures without horsemanship")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(1, 2, filter, false)); + } + + public BrokenDam(final BrokenDam card) { + super(card); + } + + @Override + public BrokenDam copy() { + return new BrokenDam(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.java new file mode 100644 index 0000000000..796af8ca00 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.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 Extinguish extends mage.sets.portalsecondage.Extinguish { + + public Extinguish(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "PTK"; + } + + public Extinguish(final Extinguish card) { + super(card); + } + + @Override + public Extinguish copy() { + return new Extinguish(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.java new file mode 100644 index 0000000000..8f6b260b42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.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 GuanYus1000LiMarch extends mage.sets.masterseditioniii.GuanYus1000LiMarch { + + public GuanYus1000LiMarch(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "PTK"; + } + + public GuanYus1000LiMarch(final GuanYus1000LiMarch card) { + super(card); + } + + @Override + public GuanYus1000LiMarch copy() { + return new GuanYus1000LiMarch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.java new file mode 100644 index 0000000000..528a5f5016 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.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.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RockslideAmbush extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountain you control"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public RockslideAmbush(UUID ownerId) { + super(ownerId, 121, "Rockslide Ambush", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "PTK"; + + // Rockslide Ambush deals damage to target creature equal to the number of Mountains you control. + this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public RockslideAmbush(final RockslideAmbush card) { + super(card); + } + + @Override + public RockslideAmbush copy() { + return new RockslideAmbush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/Extinguish.java b/Mage.Sets/src/mage/sets/starter1999/Extinguish.java new file mode 100644 index 0000000000..50f758d1e7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/Extinguish.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.starter1999; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Extinguish extends mage.sets.portalsecondage.Extinguish { + + public Extinguish(UUID ownerId) { + super(ownerId); + this.cardNumber = 37; + this.expansionSetCode = "S99"; + } + + public Extinguish(final Extinguish card) { + super(card); + } + + @Override + public Extinguish copy() { + return new Extinguish(this); + } +} From 828705dc9c53f87cd9fbc4365112449be9531b08 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 27 Aug 2015 10:51:20 +0300 Subject: [PATCH 8/9] Implement cards: Desert Sandstorm, Desperate Charge, Virtuous Charge, and Wielding the Green Dragon --- .../masterseditioniii/DesperateCharge.java | 54 ++++++++++++++++ .../portalthreekingdoms/DesertSandstorm.java | 59 ++++++++++++++++++ .../portalthreekingdoms/DesperateCharge.java | 59 ++++++++++++++++++ .../portalthreekingdoms/VirtuousCharge.java | 59 ++++++++++++++++++ .../WieldingTheGreenDragon.java | 61 +++++++++++++++++++ 5 files changed, 292 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java b/Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java new file mode 100644 index 0000000000..d33a2052ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java @@ -0,0 +1,54 @@ +/* + * 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.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DesperateCharge extends mage.sets.portalthreekingdoms.DesperateCharge { + + public DesperateCharge(UUID ownerId) { + super(ownerId); + this.cardNumber = 63; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public DesperateCharge(final DesperateCharge card) { + super(card); + } + + @Override + public DesperateCharge copy() { + return new DesperateCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java new file mode 100644 index 0000000000..88e0093051 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java @@ -0,0 +1,59 @@ +/* + * 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.DamageAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DesertSandstorm extends CardImpl { + + public DesertSandstorm(UUID ownerId) { + super(ownerId, 107, "Desert Sandstorm", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); + this.expansionSetCode = "PTK"; + + // Desert Sandstorm deals 1 damage to each creature. + this.getSpellAbility().addEffect(new DamageAllEffect(1, new FilterCreaturePermanent())); + } + + public DesertSandstorm(final DesertSandstorm card) { + super(card); + } + + @Override + public DesertSandstorm copy() { + return new DesertSandstorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java new file mode 100644 index 0000000000..d5fcab16d6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java @@ -0,0 +1,59 @@ +/* + * 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.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DesperateCharge extends CardImpl { + + public DesperateCharge(UUID ownerId) { + super(ownerId, 74, "Desperate Charge", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "PTK"; + + // Creatures you control get +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn)); + } + + public DesperateCharge(final DesperateCharge card) { + super(card); + } + + @Override + public DesperateCharge copy() { + return new DesperateCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java new file mode 100644 index 0000000000..ba2a99e8a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java @@ -0,0 +1,59 @@ +/* + * 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.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class VirtuousCharge extends CardImpl { + + public VirtuousCharge(UUID ownerId) { + super(ownerId, 29, "Virtuous Charge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "PTK"; + + // Creatures you control get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); + } + + public VirtuousCharge(final VirtuousCharge card) { + super(card); + } + + @Override + public VirtuousCharge copy() { + return new VirtuousCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java new file mode 100644 index 0000000000..9e6f56d4b9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java @@ -0,0 +1,61 @@ +/* + * 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.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class WieldingTheGreenDragon extends CardImpl { + + public WieldingTheGreenDragon(UUID ownerId) { + super(ownerId, 157, "Wielding the Green Dragon", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}"); + this.expansionSetCode = "PTK"; + + // Target creature gets +4/+4 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public WieldingTheGreenDragon(final WieldingTheGreenDragon card) { + super(card); + } + + @Override + public WieldingTheGreenDragon copy() { + return new WieldingTheGreenDragon(this); + } +} From b63cc121ef8b046a397a30879bf067103cc370a2 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 27 Aug 2015 14:51:21 +0200 Subject: [PATCH 9/9] Some minor changes. --- .../src/main/java/mage/client/MageFrame.java | 5 +++-- .../mage/client/dialog/PreferencesDialog.java | 2 +- Mage.Common/src/mage/view/UserDataView.java | 6 +++++- Mage.Sets/src/mage/sets/fifthdawn/RainOfRust.java | 7 ++----- .../src/mage/sets/modernmasters/ToothAndNail.java | 12 ++++++------ .../mage/abilities/keyword/EntwineAbility.java | 1 + Mage/src/mage/players/PlayerImpl.java | 15 ++++++++++++++- 7 files changed, 32 insertions(+), 16 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index 73b71ead8b..a6aef41290 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -358,6 +358,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { } else { connectDialog.showDialog(); } + setWindowTitle(); } }); @@ -369,7 +370,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { } } - public void setWindowTitle() { + private void setWindowTitle() { setTitle(TITLE_NAME + " Client: " + version == null ? "" : version.toString() + " Server: " + ((session != null && session.isConnected()) ? session.getVersionInfo() : "")); @@ -959,12 +960,12 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { if (JOptionPane.showConfirmDialog(this, "Are you sure you want to disconnect?", "Confirm disconnect", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { session.disconnect(false); tablesPane.clearChat(); - setWindowTitle(); showMessage("You have disconnected"); } } else { connectDialog.showDialog(); } + setWindowTitle(); }//GEN-LAST:event_btnConnectActionPerformed public void btnAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAboutActionPerformed diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java index ec880ce8f4..c7cbbb722c 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -2449,7 +2449,7 @@ public class PreferencesDialog extends javax.swing.JDialog { public static UserData getUserData() { return new UserData(UserGroup.PLAYER, PreferencesDialog.selectedAvatarId, - PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_TOOLTIPS_ANY_ZONE, "true").equals("true"), + PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true"), PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true").equals("true"), PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true").equals("true"), getUserSkipPrioritySteps(), diff --git a/Mage.Common/src/mage/view/UserDataView.java b/Mage.Common/src/mage/view/UserDataView.java index 242fa32ec2..c60bbe88c5 100644 --- a/Mage.Common/src/mage/view/UserDataView.java +++ b/Mage.Common/src/mage/view/UserDataView.java @@ -20,10 +20,14 @@ public class UserDataView implements Serializable { String flagName; protected boolean askMoveToGraveOrder; - static UserData getDefaultUserDataView() { + static UserData getDefaultUserData() { return UserData.getDefaultUserDataView(); } + public static UserDataView getDefaultUserDataView() { + return new UserDataView(getDefaultUserData()); + } + public UserDataView(int avatarId, boolean showAbilityPickerForced, boolean allowRequestShowHandCards, boolean confirmEmptyManaPool, UserSkipPrioritySteps userSkipPrioritySteps, String flagName, boolean askMoveToGraveOrder) { this.avatarId = avatarId; diff --git a/Mage.Sets/src/mage/sets/fifthdawn/RainOfRust.java b/Mage.Sets/src/mage/sets/fifthdawn/RainOfRust.java index ad28ada69e..83f34843cb 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/RainOfRust.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/RainOfRust.java @@ -47,11 +47,8 @@ public class RainOfRust extends CardImpl { super(ownerId, 76, "Rain of Rust", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{R}{R}"); this.expansionSetCode = "5DN"; - - // Choose one - - this.getSpellAbility().getModes().setMinModes(1); - this.getSpellAbility().getModes().setMaxModes(1); - //Destroy target artifact; + // Choose one - + //Destroy target artifact; this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetArtifactPermanent()); //or destroy target land. diff --git a/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java b/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java index 3902ef10ad..86f2e6936b 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java +++ b/Mage.Sets/src/mage/sets/modernmasters/ToothAndNail.java @@ -55,7 +55,7 @@ public class ToothAndNail extends CardImpl { super(ownerId, 170, "Tooth and Nail", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{G}{G}"); this.expansionSetCode = "MMA"; - // Choose one - + // Choose one - // Search your library for up to two creature cards, reveal them, put them into your hand, then shuffle your library; this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, new FilterCreatureCard()), true)); // or put up to two creature cards from your hand onto the battlefield. @@ -95,17 +95,17 @@ class ToothAndNailPutCreatureOnBattlefieldEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player == null) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { return false; } TargetCardInHand target = new TargetCardInHand(0, 2, new FilterCreatureCard("creature cards")); - if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { - for (UUID targetId: target.getTargets()) { + if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { + for (UUID targetId : target.getTargets()) { Card card = game.getCard(targetId); if (card != null) { - card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), source.getControllerId()); + controller.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId(), false); } } return true; diff --git a/Mage/src/mage/abilities/keyword/EntwineAbility.java b/Mage/src/mage/abilities/keyword/EntwineAbility.java index 141fd25162..8448463486 100644 --- a/Mage/src/mage/abilities/keyword/EntwineAbility.java +++ b/Mage/src/mage/abilities/keyword/EntwineAbility.java @@ -90,6 +90,7 @@ public class EntwineAbility extends StaticAbility implements OptionalAdditionalM } } + @Override public boolean isActivated() { if (additionalCost != null) { return additionalCost.isActivated(); diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 4ee90b73ca..631b5614a3 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -1033,8 +1033,10 @@ public abstract class PlayerImpl implements Player, Serializable { int bookmark = game.bookmarkState(); if (ability.activate(game, false)) { if (ability.resolve(game)) { - if (ability.isUndoPossible() && storedBookmark == -1 || storedBookmark > bookmark) { // e.g. usefull for undo Nykthos, Shrine to Nyx + if (ability.isUndoPossible() && (storedBookmark == -1 || storedBookmark > bookmark)) { // e.g. usefull for undo Nykthos, Shrine to Nyx setStoredBookmark(bookmark); + } else { + resetStoredBookmark(game); } return true; } @@ -1366,6 +1368,17 @@ public abstract class PlayerImpl implements Player, Serializable { //20091005 - 502.1 List phasedOut = game.getBattlefield().getPhasedOut(playerId); for (Permanent permanent : game.getBattlefield().getPhasedIn(playerId)) { + // 502.15i When a permanent phases out, any local enchantments or Equipment + // attached to that permanent phase out at the same time. This alternate way of + // phasing out is known as phasing out "indirectly." An enchantment or Equipment + // that phased out indirectly won't phase in by itself, but instead phases in + // along with the card it's attached to. + for (UUID attachmentId : permanent.getAttachments()) { + Permanent attachment = game.getPermanent(attachmentId); + if (attachment != null) { + attachment.phaseOut(game); + } + } permanent.phaseOut(game); } for (Permanent permanent : phasedOut) {