From 95a2544a33130cf60de74a3009900ed90bd5dc6c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 2 Sep 2017 09:11:20 -0400 Subject: [PATCH 1/7] Implemented Kumena's Omenspeaker --- .../src/mage/cards/k/KumenasOmenspeaker.java | 81 +++++++++++++++++++ Mage.Sets/src/mage/sets/Ixalan.java | 1 + 2 files changed, 82 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KumenasOmenspeaker.java diff --git a/Mage.Sets/src/mage/cards/k/KumenasOmenspeaker.java b/Mage.Sets/src/mage/cards/k/KumenasOmenspeaker.java new file mode 100644 index 0000000000..0eea31a498 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KumenasOmenspeaker.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostSourceWhileControlsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; + +/** + * + * @author TheElk801 + */ +public class KumenasOmenspeaker extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("another Merfolk or Island"); + + static { + filter.add(Predicates.or( + new SubtypePredicate(SubType.ISLAND), + Predicates.and( + new SubtypePredicate(SubType.MERFOLK), + new AnotherPredicate() + ) + )); + } + + public KumenasOmenspeaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + + this.subtype.add("Merfolk"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Kumena's Omenspeaker gets +1/+1 as long as you control another Merfolk or Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filter, 1, 1))); + } + + public KumenasOmenspeaker(final KumenasOmenspeaker card) { + super(card); + } + + @Override + public KumenasOmenspeaker copy() { + return new KumenasOmenspeaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index b375fd392f..83e1883655 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -49,6 +49,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Glacial Fortress", 255, Rarity.RARE, mage.cards.g.GlacialFortress.class)); cards.add(new SetCardInfo("Herald of Secret Streams", 59, Rarity.RARE, mage.cards.h.HeraldOfSecretStreams.class)); cards.add(new SetCardInfo("Jace, Cunning Castaway", 60, Rarity.MYTHIC, mage.cards.j.JaceCunningCastaway.class)); + cards.add(new SetCardInfo("Kumena's Omenspeaker", 196, Rarity.UNCOMMON, mage.cards.k.KumenasOmenspeaker.class)); cards.add(new SetCardInfo("Old-Growth Dryads", 199, Rarity.RARE, mage.cards.o.OldGrowthDryads.class)); cards.add(new SetCardInfo("Prosperous Pirates", 69, Rarity.COMMON, mage.cards.p.ProsperousPirates.class)); cards.add(new SetCardInfo("Queen's Bay Soldier", 115, Rarity.COMMON, mage.cards.q.QueensBaySoldier.class)); From ec9af6b475de7fb8e683d6ec0c6774e8dafaea41 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 2 Sep 2017 09:49:07 -0400 Subject: [PATCH 2/7] Implemented Jace, Ingenious Mind-Mage --- .../mage/cards/j/JaceIngeniousMindMage.java | 79 +++++++++++++++++++ Mage.Sets/src/mage/sets/Ixalan.java | 1 + Utils/mtg-cards-data.txt | 2 +- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java diff --git a/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java b/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java new file mode 100644 index 0000000000..e68594b18b --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java @@ -0,0 +1,79 @@ +/* + * 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.cards.j; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.UntapAllControllerEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SuperType; +import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class JaceIngeniousMindMage extends CardImpl { + + public JaceIngeniousMindMage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{U}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add("Jace"); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); + + // +1: Draw a card. + this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 1)); + + // +1: Untap all creatures you control. + this.addAbility(new LoyaltyAbility(new UntapAllControllerEffect(FILTER_PERMANENT_CREATURES), 1)); + + // -9: Gain control of up to three target creatures. + Ability ability = new LoyaltyAbility(new GainControlTargetEffect(Duration.Custom), -9); + ability.addTarget(new TargetCreaturePermanent(0, 3)); + this.addAbility(ability); + } + + public JaceIngeniousMindMage(final JaceIngeniousMindMage card) { + super(card); + } + + @Override + public JaceIngeniousMindMage copy() { + return new JaceIngeniousMindMage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index 83e1883655..cec9dc38de 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -49,6 +49,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Glacial Fortress", 255, Rarity.RARE, mage.cards.g.GlacialFortress.class)); cards.add(new SetCardInfo("Herald of Secret Streams", 59, Rarity.RARE, mage.cards.h.HeraldOfSecretStreams.class)); cards.add(new SetCardInfo("Jace, Cunning Castaway", 60, Rarity.MYTHIC, mage.cards.j.JaceCunningCastaway.class)); + cards.add(new SetCardInfo("Jace, Ingenious Mind-Mage", 280, Rarity.MYTHIC, mage.cards.j.JaceIngeniousMindMage.class)); cards.add(new SetCardInfo("Kumena's Omenspeaker", 196, Rarity.UNCOMMON, mage.cards.k.KumenasOmenspeaker.class)); cards.add(new SetCardInfo("Old-Growth Dryads", 199, Rarity.RARE, mage.cards.o.OldGrowthDryads.class)); cards.add(new SetCardInfo("Prosperous Pirates", 69, Rarity.COMMON, mage.cards.p.ProsperousPirates.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 607c2a74b6..43b5c776ea 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -32402,7 +32402,7 @@ Glacial Fortress|Ixalan|255|R||Land|||Glacial Fortress enters the battlefield ta Rootbound Crag|Ixalan|256|R||Land|||Rootbound Crag enters the battlefield tapped unless you control a Mountain or a Forest.${T}: Add {R} or {G} to your mana pool.| Sunpetal Grove|Ixalan|257|R||Land|||Sunpetal Grove enters the battlefield tapped unless you control a Forest or a Plains.${T}: Add {G} or {W} to your mana pool.| Unclaimed Territory|Ixalan|258|U||Land|||As Unclaimed Territory enters the battlefield, choose a creature type.${T}: Add {C} to your mana pool.${T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type.| -Jace, Ingenious Mindmage|Ixalan|280|M|{4}{U}{U}|Legendary Planeswalker - Jace|||[+1]: Draw a card.$[+1]: Untap all creatures you control.$[-9]: Gain control of up to three target creatures.| +Jace, Ingenious Mind-Mage|Ixalan|280|M|{4}{U}{U}|Legendary Planeswalker - Jace|||[+1]: Draw a card.$[+1]: Untap all creatures you control.$[-9]: Gain control of up to three target creatures.| Huatli, Dinosaur Knight|Ixalan|285|M|{4}{R}{W}|Legendary Planeswalker - Huatli|||[+2]: Put two +1/+1 counters on up to one target Dinosaur you control.$[-3]: Target Dinosaur you control deals damage equal to its power to target creature you don't control.$[-7]: Dinosaurs you control get +4/+4 until end of turn.| Sword of Dungeons and Dragons|Unstable|1|M|{3}|Artifact - Equipment|||Equipped creature gets +2/+2 and has protection from Rogues and from Clerics.$Whenever equipped creature deals combat damage to a player, create a 4/4 gold Dragon creature token with flying and roll a d20. If you roll a 20, repeat this process.$Equip {2}| Jhoira of the Ghitu|Duel Decks: Mind vs. Might|1|M|{1}{U}{R}|Legendary Creature - Human Wizard|2|2|{2}, Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend.| From a8abdba0adbd0d2adb587df238f787f0319881a5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 2 Sep 2017 10:19:20 -0400 Subject: [PATCH 3/7] Implemented Huatli, Dinosaur Mage --- .../mage/cards/h/HuatliDinosaurKnight.java | 99 +++++++++++++++++++ Mage.Sets/src/mage/sets/Ixalan.java | 1 + .../src/main/java/mage/constants/SubType.java | 1 + 3 files changed, 101 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java diff --git a/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java b/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java new file mode 100644 index 0000000000..a7f28c381b --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java @@ -0,0 +1,99 @@ +/* + * 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.cards.h; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.common.DamageWithPowerTargetEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public class HuatliDinosaurKnight extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dinosaur you control"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature you don't control"); + private static final FilterCreaturePermanent filter3 = new FilterCreaturePermanent("Dinosaurs you control"); + + static { + filter.add(new SubtypePredicate(SubType.DINOSAUR)); + filter.add(new ControllerPredicate(TargetController.YOU)); + filter2.add(new ControllerPredicate(TargetController.NOT_YOU)); + filter3.add(new SubtypePredicate(SubType.DINOSAUR)); + filter3.add(new ControllerPredicate(TargetController.YOU)); + } + + public HuatliDinosaurKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{R}{W}"); + + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUATLI); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); + + // +2: Put two +1/+1 counters on up to one target Dinosaur you control. + Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)), 2); + ability.addTarget(new TargetCreaturePermanent(0, 1, filter, false)); + this.addAbility(ability); + + // -3: Target Dinosaur you control deals damage equal to its power to target creature you don't control. + ability = new LoyaltyAbility(new DamageWithPowerTargetEffect(), -3); + ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addTarget(new TargetCreaturePermanent(filter2)); + this.addAbility(ability); + + // -7: Dinosaurs you control get +4/+4 until end of turn. + this.addAbility(new LoyaltyAbility(new BoostControlledEffect(4, 4, Duration.EndOfTurn, filter3), -7)); + } + + public HuatliDinosaurKnight(final HuatliDinosaurKnight card) { + super(card); + } + + @Override + public HuatliDinosaurKnight copy() { + return new HuatliDinosaurKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index cec9dc38de..6a99b2516a 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -48,6 +48,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Gishath, Sun's Avatar", 222, Rarity.MYTHIC, mage.cards.g.GishathSunsAvatar.class)); cards.add(new SetCardInfo("Glacial Fortress", 255, Rarity.RARE, mage.cards.g.GlacialFortress.class)); cards.add(new SetCardInfo("Herald of Secret Streams", 59, Rarity.RARE, mage.cards.h.HeraldOfSecretStreams.class)); + cards.add(new SetCardInfo("Huatli, Dinosaur Knight", 285, Rarity.MYTHIC, mage.cards.h.HuatliDinosaurKnight.class)); cards.add(new SetCardInfo("Jace, Cunning Castaway", 60, Rarity.MYTHIC, mage.cards.j.JaceCunningCastaway.class)); cards.add(new SetCardInfo("Jace, Ingenious Mind-Mage", 280, Rarity.MYTHIC, mage.cards.j.JaceIngeniousMindMage.class)); cards.add(new SetCardInfo("Kumena's Omenspeaker", 196, Rarity.UNCOMMON, mage.cards.k.KumenasOmenspeaker.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 514ae86c6f..cd6edde011 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -361,6 +361,7 @@ public enum SubType { FREYALISE("Freyalise", SubTypeSet.PlaneswalkerType, false), GARRUK("Garruk", SubTypeSet.PlaneswalkerType, false), GIDEON("Gideon", SubTypeSet.PlaneswalkerType, false), + HUATLI("Huatli", SubTypeSet.PlaneswalkerType, false), JACE("Jace", SubTypeSet.PlaneswalkerType, false), KARN("Karn", SubTypeSet.PlaneswalkerType, false), KAYA("Kaya", SubTypeSet.PlaneswalkerType, false), From 5b87f665d2b817f98e1a81fcefa2be43c9139212 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 2 Sep 2017 10:47:04 -0400 Subject: [PATCH 4/7] Implemented Marauding Looter --- .../src/mage/cards/m/MaraudingLooter.java | 75 +++++++++++++++++++ Mage.Sets/src/mage/sets/Ixalan.java | 1 + 2 files changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MaraudingLooter.java diff --git a/Mage.Sets/src/mage/cards/m/MaraudingLooter.java b/Mage.Sets/src/mage/cards/m/MaraudingLooter.java new file mode 100644 index 0000000000..7743db82ce --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MaraudingLooter.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.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.watchers.common.PlayerAttackedWatcher; + +/** + * + * @author TheElk801 + */ +public class MaraudingLooter extends CardImpl { + + public MaraudingLooter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}"); + + this.subtype.add("Human"); + this.subtype.add("Pirate"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Raid - At the beginning of your end step, if you attacked with a creature this turn, you may draw a card. If you do, discard a card. + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfEndStepTriggeredAbility(new DrawDiscardControllerEffect(1, 1), TargetController.YOU, false), + RaidCondition.instance, + "Raid - At the beginning of your end step, " + + "if you attacked with a creature this turn, " + + "you may draw a card. If you do, discard a card"); + this.addAbility(ability, new PlayerAttackedWatcher()); + } + + public MaraudingLooter(final MaraudingLooter card) { + super(card); + } + + @Override + public MaraudingLooter copy() { + return new MaraudingLooter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Ixalan.java b/Mage.Sets/src/mage/sets/Ixalan.java index 6a99b2516a..d849235944 100644 --- a/Mage.Sets/src/mage/sets/Ixalan.java +++ b/Mage.Sets/src/mage/sets/Ixalan.java @@ -52,6 +52,7 @@ public class Ixalan extends ExpansionSet { cards.add(new SetCardInfo("Jace, Cunning Castaway", 60, Rarity.MYTHIC, mage.cards.j.JaceCunningCastaway.class)); cards.add(new SetCardInfo("Jace, Ingenious Mind-Mage", 280, Rarity.MYTHIC, mage.cards.j.JaceIngeniousMindMage.class)); cards.add(new SetCardInfo("Kumena's Omenspeaker", 196, Rarity.UNCOMMON, mage.cards.k.KumenasOmenspeaker.class)); + cards.add(new SetCardInfo("Marauding Looter", 225, Rarity.UNCOMMON, mage.cards.m.MaraudingLooter.class)); cards.add(new SetCardInfo("Old-Growth Dryads", 199, Rarity.RARE, mage.cards.o.OldGrowthDryads.class)); cards.add(new SetCardInfo("Prosperous Pirates", 69, Rarity.COMMON, mage.cards.p.ProsperousPirates.class)); cards.add(new SetCardInfo("Queen's Bay Soldier", 115, Rarity.COMMON, mage.cards.q.QueensBaySoldier.class)); From 575c27eb9098b11d1e35eae6b9589f66c19b6b05 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 2 Sep 2017 12:20:05 -0400 Subject: [PATCH 5/7] fixed bug #3921 --- Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java b/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java index 3b37cf5b2f..39869168c7 100644 --- a/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java +++ b/Mage.Sets/src/mage/cards/d/DjeruWithEyesOpen.java @@ -79,7 +79,7 @@ public class DjeruWithEyesOpen extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(effect, true)); // If a source would deal damage to a planeswalker you control, prevent 1 of that damage. - this.addAbility(new SimpleStaticAbility(Zone.COMMAND, new DjeruWithEyesOpenPreventEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DjeruWithEyesOpenPreventEffect())); } public DjeruWithEyesOpen(final DjeruWithEyesOpen card) { From 6a3c6fc534d26fb4c73b3da1bebb43a98275beba Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 2 Sep 2017 12:52:39 -0400 Subject: [PATCH 6/7] fixed bug #3922 --- .../src/mage/cards/g/GenesisChamber.java | 58 ++++++++----------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GenesisChamber.java b/Mage.Sets/src/mage/cards/g/GenesisChamber.java index 9c32f0ff6d..50eb8c1dfa 100644 --- a/Mage.Sets/src/mage/cards/g/GenesisChamber.java +++ b/Mage.Sets/src/mage/cards/g/GenesisChamber.java @@ -29,8 +29,10 @@ package mage.cards.g; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.effects.Effect; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +40,6 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.Zone; -import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TokenPredicate; @@ -53,14 +54,21 @@ import mage.game.permanent.token.MyrToken; public class GenesisChamber extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creature"); - static{ + + static { filter.add(Predicates.not(new TokenPredicate())); } + public GenesisChamber(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // Whenever a nontoken creature enters the battlefield, if Genesis Chamber is untapped, that creature's controller creates a 1/1 colorless Myr artifact creature token. - this.addAbility(new GenesisChamberTriggeredAbility(new GenesisChamberEffect(), filter)); + TriggeredAbility ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GenesisChamberEffect(), filter, false, SetTargetPointer.PERMANENT, ""); + this.addAbility(new ConditionalTriggeredAbility(ability, + SourceUntappedCondition.instance, + "Whenever a nontoken creature enters the battlefield, " + + "if {this} is untapped, " + + "that creature's controller creates a 1/1 colorless Myr artifact creature token")); } public GenesisChamber(final GenesisChamber card) { @@ -73,37 +81,24 @@ public class GenesisChamber extends CardImpl { } } -class GenesisChamberTriggeredAbility extends EntersBattlefieldAllTriggeredAbility -{ - private static final String rule = "Whenever a nontoken creature enters the battlefield, if {this} is untapped, that creature's controller creates a 1/1 colorless Myr artifact creature token"; - public GenesisChamberTriggeredAbility(Effect effect, FilterPermanent filter) - { - super(Zone.BATTLEFIELD, effect, filter, false, SetTargetPointer.PERMANENT, rule); - } - - public GenesisChamberTriggeredAbility(final GenesisChamberTriggeredAbility ability) { - super(ability); - } - @Override - public GenesisChamberTriggeredAbility copy() { - return new GenesisChamberTriggeredAbility(this); - } +enum SourceUntappedCondition implements Condition { + instance; @Override - public boolean checkInterveningIfClause(Game game) { - Permanent permanent = game.getPermanent(this.sourceId); - if(permanent == null){ - permanent = (Permanent)game.getLastKnownInformation(sourceId, Zone.BATTLEFIELD); - } - if(permanent != null){ + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (permanent != null) { return !permanent.isTapped(); } return false; } - -} + @Override + public String toString() { + return "if {this} is untapped"; + } +} class GenesisChamberEffect extends OneShotEffect { @@ -123,14 +118,11 @@ class GenesisChamberEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); - if(permanent == null){ - permanent = (Permanent)game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.BATTLEFIELD); - } + Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); if (permanent != null) { MyrToken token = new MyrToken(); token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId()); } return true; } -} \ No newline at end of file +} From 54761f400d3c53abb5968808520a443284662259 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 2 Sep 2017 13:06:13 -0400 Subject: [PATCH 7/7] fixed bug #3923 --- .../common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java index 48e36b1da9..0817a4ac1b 100644 --- a/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromBattlefieldAllTriggeredAbility.java @@ -82,7 +82,7 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi } if (setTargetPointer) { for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(event.getTargetId())); + effect.setTargetPointer(new FixedTarget(event.getTargetId(), game.getObject(event.getTargetId()).getZoneChangeCounter(game))); } } return true;