From a6aa484ea0fa19bd87bb3d2245b7ab716324c0b6 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 12 Sep 2015 11:31:57 +0300 Subject: [PATCH 1/6] Add description parameter to BecomesTappedAttachedTriggeredAbility. Use it and DestroyAttachedEffect for some existing cards. Fix several issues with Brink of Disaster. Implement card: Uncontrolled Infestation --- .../src/mage/sets/fifthedition/Blight.java | 55 +------------ Mage.Sets/src/mage/sets/iceage/Seizures.java | 2 +- .../src/mage/sets/planeshift/Insolence.java | 2 +- .../sets/riseoftheeldrazi/LustForWar.java | 2 +- .../sets/scourge/UncontrolledInfestation.java | 81 +++++++++++++++++++ .../mage/sets/urzassaga/SpreadingAlgae.java | 69 +++------------- Mage.Sets/src/mage/sets/visions/Betrayal.java | 2 +- .../mage/sets/worldwake/BrinkOfDisaster.java | 59 +++----------- ...BecomesTappedAttachedTriggeredAbility.java | 14 ++-- 9 files changed, 118 insertions(+), 168 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/scourge/UncontrolledInfestation.java diff --git a/Mage.Sets/src/mage/sets/fifthedition/Blight.java b/Mage.Sets/src/mage/sets/fifthedition/Blight.java index dc7821b2b6..d3058c85eb 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/Blight.java +++ b/Mage.Sets/src/mage/sets/fifthedition/Blight.java @@ -29,23 +29,16 @@ package mage.sets.fifthedition; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DestroyAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetLandPermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -65,9 +58,9 @@ public class Blight extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // When enchanted land becomes tapped, destroy it. - this.addAbility(new BlightTriggeredAbility()); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DestroyAttachedEffect("it"), "enchanted land")); } public Blight(final Blight card) { @@ -79,43 +72,3 @@ public class Blight extends CardImpl { return new Blight(this); } } - -class BlightTriggeredAbility extends TriggeredAbilityImpl { - BlightTriggeredAbility() { - super(Zone.BATTLEFIELD, new DestroyTargetEffect()); - } - - BlightTriggeredAbility(final BlightTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent enchantment = game.getPermanent(this.sourceId); - if (enchantment != null && enchantment.getAttachedTo().equals(event.getTargetId())) { - Permanent attached = game.getPermanent(enchantment.getAttachedTo()); - if (attached != null) { - for (Effect e : getEffects()) { - e.setTargetPointer(new FixedTarget(attached.getId())); - } - return true; - } - } - return false; - } - - @Override - public BlightTriggeredAbility copy() { - return new BlightTriggeredAbility(this); - } - - @Override - public String getRule() { - return "When enchanted land becomes tapped, destroy it."; - } -} diff --git a/Mage.Sets/src/mage/sets/iceage/Seizures.java b/Mage.Sets/src/mage/sets/iceage/Seizures.java index 5fdc2881cc..df24823b79 100644 --- a/Mage.Sets/src/mage/sets/iceage/Seizures.java +++ b/Mage.Sets/src/mage/sets/iceage/Seizures.java @@ -63,7 +63,7 @@ public class Seizures extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Whenever enchanted creature becomes tapped, Seizures deals 3 damage to that creature's controller unless that player pays {3}. - this.addAbility(new BecomesTappedAttachedTriggeredAbility(new SeizuresEffect(), false)); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new SeizuresEffect(), "enchanted creature")); } public Seizures(final Seizures card) { diff --git a/Mage.Sets/src/mage/sets/planeshift/Insolence.java b/Mage.Sets/src/mage/sets/planeshift/Insolence.java index 4fdcbf1b6c..9d8de7ca71 100644 --- a/Mage.Sets/src/mage/sets/planeshift/Insolence.java +++ b/Mage.Sets/src/mage/sets/planeshift/Insolence.java @@ -60,7 +60,7 @@ public class Insolence extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Whenever enchanted creature becomes tapped, Insolence deals 2 damage to that creature's controller. - this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DamageAttachedControllerEffect(2), false)); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DamageAttachedControllerEffect(2), "enchanted creature")); } public Insolence(final Insolence card) { diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java index 0f72528f30..9526e52668 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java @@ -64,7 +64,7 @@ public class LustForWar extends CardImpl { this.addAbility(ability); // Whenever enchanted creature becomes tapped, Lust for War deals 3 damage to that creature's controller. - this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DamageAttachedControllerEffect(3), false)); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DamageAttachedControllerEffect(3), "enchanted creature")); // Enchanted creature attacks each turn if able. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, diff --git a/Mage.Sets/src/mage/sets/scourge/UncontrolledInfestation.java b/Mage.Sets/src/mage/sets/scourge/UncontrolledInfestation.java new file mode 100644 index 0000000000..6f51b0716a --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/UncontrolledInfestation.java @@ -0,0 +1,81 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.scourge; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DestroyAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class UncontrolledInfestation extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("nonbasic land"); + + static{ + filter.add(Predicates.not(new SupertypePredicate("Basic"))); + } + + public UncontrolledInfestation(UUID ownerId) { + super(ownerId, 108, "Uncontrolled Infestation", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Aura"); + + // Enchant nonbasic land + TargetPermanent auraTarget = new TargetLandPermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // When enchanted land becomes tapped, destroy it. + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DestroyAttachedEffect("it"), "enchanted land")); + } + + public UncontrolledInfestation(final UncontrolledInfestation card) { + super(card); + } + + @Override + public UncontrolledInfestation copy() { + return new UncontrolledInfestation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/SpreadingAlgae.java b/Mage.Sets/src/mage/sets/urzassaga/SpreadingAlgae.java index 3f944b98a2..117c5bca44 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/SpreadingAlgae.java +++ b/Mage.Sets/src/mage/sets/urzassaga/SpreadingAlgae.java @@ -29,11 +29,10 @@ package mage.sets.urzassaga; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DestroyAttachedEffect; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; @@ -41,15 +40,9 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.common.FilterLandPermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; -import mage.target.common.TargetLandPermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -57,29 +50,29 @@ import mage.target.targetpointer.FixedTarget; */ public class SpreadingAlgae extends CardImpl { - private static final FilterLandPermanent filter = new FilterLandPermanent("Swamp"); + private static final FilterPermanent filter = new FilterPermanent("Swamp"); + static{ filter.add(new SubtypePredicate("Swamp")); } + public SpreadingAlgae(UUID ownerId) { super(ownerId, 274, "Spreading Algae", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.expansionSetCode = "USG"; this.subtype.add("Aura"); - // Enchant Swamp - - TargetPermanent auraTarget = new TargetLandPermanent(); + TargetPermanent auraTarget = new TargetPermanent(filter); this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When enchanted land becomes tapped, destroy it. - this.addAbility(new SpreadingAlgaeTriggeredAbility(new DestroyTargetEffect())); - + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DestroyAttachedEffect("it"), "enchanted land")); + // When Spreading Algae is put into a graveyard from the battlefield, return Spreading Algae to its owner's hand. this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); - + } public SpreadingAlgae(final SpreadingAlgae card) { @@ -91,43 +84,3 @@ public class SpreadingAlgae extends CardImpl { return new SpreadingAlgae(this); } } - - -class SpreadingAlgaeTriggeredAbility extends TriggeredAbilityImpl { - - public SpreadingAlgaeTriggeredAbility(Effect effect) { - super(Zone.BATTLEFIELD, effect); - } - - public SpreadingAlgaeTriggeredAbility(final SpreadingAlgaeTriggeredAbility ability) { - super(ability); - } - - @Override - public SpreadingAlgaeTriggeredAbility copy() { - return new SpreadingAlgaeTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent enchant = game.getPermanent(sourceId); - if (enchant != null && enchant.getAttachedTo() != null) { - if (event.getTargetId().equals(enchant.getAttachedTo())) { - getEffects().get(0).setTargetPointer(new FixedTarget(enchant.getAttachedTo())); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "When enchanted permanent becomes tapped, destroy it."; - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/visions/Betrayal.java b/Mage.Sets/src/mage/sets/visions/Betrayal.java index db86ed389f..94658d9582 100644 --- a/Mage.Sets/src/mage/sets/visions/Betrayal.java +++ b/Mage.Sets/src/mage/sets/visions/Betrayal.java @@ -67,7 +67,7 @@ public class Betrayal extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Whenever enchanted creature becomes tapped, you draw a card. - this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "enchanted creature")); } public Betrayal(final Betrayal card) { diff --git a/Mage.Sets/src/mage/sets/worldwake/BrinkOfDisaster.java b/Mage.Sets/src/mage/sets/worldwake/BrinkOfDisaster.java index bb646a302a..c0222a2637 100644 --- a/Mage.Sets/src/mage/sets/worldwake/BrinkOfDisaster.java +++ b/Mage.Sets/src/mage/sets/worldwake/BrinkOfDisaster.java @@ -28,24 +28,19 @@ package mage.sets.worldwake; import java.util.UUID; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; +import mage.abilities.Ability; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DestroyAttachedEffect; +import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -53,7 +48,7 @@ import mage.target.targetpointer.FixedTarget; */ public class BrinkOfDisaster extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent(); + private static final FilterPermanent filter = new FilterPermanent("creature or land"); static { filter.add(Predicates.or( @@ -68,12 +63,14 @@ public class BrinkOfDisaster extends CardImpl { // Enchant creature or land - TargetPermanent auraTarget = new TargetPermanent(); + TargetPermanent auraTarget = new TargetPermanent(filter); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); // When enchanted permanent becomes tapped, destroy it. - this.addAbility(new EnchantedBecomesTappedTriggeredAbility(new DestroyTargetEffect())); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DestroyAttachedEffect("it"), "enchanted permanent")); } public BrinkOfDisaster(final BrinkOfDisaster card) { @@ -85,41 +82,3 @@ public class BrinkOfDisaster extends CardImpl { return new BrinkOfDisaster(this); } } - -class EnchantedBecomesTappedTriggeredAbility extends TriggeredAbilityImpl { - - public EnchantedBecomesTappedTriggeredAbility(Effect effect) { - super(Zone.BATTLEFIELD, effect); - } - - public EnchantedBecomesTappedTriggeredAbility(final EnchantedBecomesTappedTriggeredAbility ability) { - super(ability); - } - - @Override - public EnchantedBecomesTappedTriggeredAbility copy() { - return new EnchantedBecomesTappedTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent enchant = game.getPermanent(sourceId); - if (enchant != null && enchant.getAttachedTo() != null) { - if (event.getTargetId().equals(enchant.getAttachedTo())) { - getEffects().get(0).setTargetPointer(new FixedTarget(enchant.getAttachedTo())); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "When enchanted permanent becomes tapped, destroy it."; - } -} diff --git a/Mage/src/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java b/Mage/src/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java index 3c09bae181..2b8ef1b342 100644 --- a/Mage/src/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/BecomesTappedAttachedTriggeredAbility.java @@ -41,16 +41,20 @@ import mage.game.permanent.Permanent; */ public class BecomesTappedAttachedTriggeredAbility extends TriggeredAbilityImpl { - public BecomesTappedAttachedTriggeredAbility(Effect effect, boolean isOptional) { - super(Zone.BATTLEFIELD, effect, isOptional); + private final String description; + + public BecomesTappedAttachedTriggeredAbility(Effect effect, String description) { + this(effect, description, false); } - public BecomesTappedAttachedTriggeredAbility(Effect effect) { - super(Zone.BATTLEFIELD, effect); + public BecomesTappedAttachedTriggeredAbility(Effect effect, String description, boolean isOptional) { + super(Zone.BATTLEFIELD, effect, isOptional); + this.description = description; } public BecomesTappedAttachedTriggeredAbility(final BecomesTappedAttachedTriggeredAbility ability) { super(ability); + this.description = ability.description; } @Override @@ -75,6 +79,6 @@ public class BecomesTappedAttachedTriggeredAbility extends TriggeredAbilityImpl @Override public String getRule() { - return "Whenever enchanted creature becomes tapped, " + super.getRule(); + return "Whenever " + description + " becomes tapped, " + super.getRule(); } } From 41ca5f198f6b0a06befa5ebf1330b63df8fe9439 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 12 Sep 2015 12:31:08 +0300 Subject: [PATCH 2/6] Add LoseLifeControllerAttachedEffect. Kill some custom abilities and effects. Implement card: Pooling Venom --- .../src/mage/sets/conflux/CorruptedRoots.java | 63 ++---------- .../sets/dragonsmaze/SinisterPossession.java | 64 +----------- .../mage/sets/futuresight/PoolingVenom.java | 78 +++++++++++++++ .../mage/sets/limitedalpha/PsychicVenom.java | 53 +--------- .../sets/ninthedition/ContaminatedBond.java | 54 +--------- .../riseoftheeldrazi/ContaminatedGround.java | 55 +---------- .../LoseLifeControllerAttachedEffect.java | 98 +++++++++++++++++++ 7 files changed, 193 insertions(+), 272 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/futuresight/PoolingVenom.java create mode 100644 Mage/src/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java diff --git a/Mage.Sets/src/mage/sets/conflux/CorruptedRoots.java b/Mage.Sets/src/mage/sets/conflux/CorruptedRoots.java index 71acd4c156..cec2b4e7de 100644 --- a/Mage.Sets/src/mage/sets/conflux/CorruptedRoots.java +++ b/Mage.Sets/src/mage/sets/conflux/CorruptedRoots.java @@ -29,26 +29,18 @@ package mage.sets.conflux; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.Effect; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.common.LoseLifeControllerAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterLandPermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; -import mage.target.common.TargetLandPermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -56,7 +48,7 @@ import mage.target.targetpointer.FixedTarget; */ public class CorruptedRoots extends CardImpl { - private static final FilterLandPermanent filter = new FilterLandPermanent("Forest or Plains"); + private static final FilterPermanent filter = new FilterPermanent("Forest or Plains"); static { filter.add(Predicates.or( @@ -69,17 +61,15 @@ public class CorruptedRoots extends CardImpl { this.expansionSetCode = "CON"; this.subtype.add("Aura"); - // Enchant Forest or Plains - TargetPermanent auraTarget = new TargetLandPermanent(filter); + TargetPermanent auraTarget = new TargetPermanent(filter); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Whenever enchanted land becomes tapped, its controller loses 2 life. - this.addAbility(new CorruptedRootsTriggeredAbility()); - + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new LoseLifeControllerAttachedEffect(2), "enchanted land")); } public CorruptedRoots(final CorruptedRoots card) { @@ -91,44 +81,3 @@ public class CorruptedRoots extends CardImpl { return new CorruptedRoots(this); } } - -class CorruptedRootsTriggeredAbility extends TriggeredAbilityImpl { - - CorruptedRootsTriggeredAbility() { - super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2)); - } - - CorruptedRootsTriggeredAbility(final CorruptedRootsTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent enchantment = game.getPermanent(this.sourceId); - if (enchantment != null && enchantment.getAttachedTo().equals(event.getTargetId())) { - Permanent attached = game.getPermanent(enchantment.getAttachedTo()); - if (attached != null) { - for (Effect effect : getEffects()) { - effect.setTargetPointer(new FixedTarget(attached.getControllerId())); - } - return true; - } - } - return false; - } - - @Override - public CorruptedRootsTriggeredAbility copy() { - return new CorruptedRootsTriggeredAbility(this); - } - - @Override - public String getRule() { - return "Whenever enchanted land becomes tapped, its controller loses 2 life."; - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/SinisterPossession.java b/Mage.Sets/src/mage/sets/dragonsmaze/SinisterPossession.java index a06d7f1042..961d95af88 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/SinisterPossession.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/SinisterPossession.java @@ -29,19 +29,15 @@ package mage.sets.dragonsmaze; import mage.abilities.Ability; import mage.abilities.common.AttacksOrBlocksEnchantedTriggeredAbility; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.LoseLifeControllerAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -81,61 +77,3 @@ public class SinisterPossession extends CardImpl { return new SinisterPossession(this); } } - -class LoseLifeControllerAttachedEffect extends OneShotEffect { - - protected DynamicValue amount; - - public LoseLifeControllerAttachedEffect(int amount) { - this(new StaticValue(amount)); - } - - public LoseLifeControllerAttachedEffect(DynamicValue amount) { - super(Outcome.Damage); - this.amount = amount; - setText(); - } - - public LoseLifeControllerAttachedEffect(final LoseLifeControllerAttachedEffect effect) { - super(effect); - this.amount = effect.amount.copy(); - } - - @Override - public LoseLifeControllerAttachedEffect copy() { - return new LoseLifeControllerAttachedEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment == null) { - enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature == null) { - creature = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - if (creature != null) { - Player player = game.getPlayer(creature.getControllerId()); - if (player != null) { - player.loseLife(amount.calculate(game, source, this), game); - return true; - } - } - } - return false; - } - - private void setText() { - StringBuilder sb = new StringBuilder(); - sb.append("it's controller loses ").append(amount.toString()).append(" life"); - String message = amount.getMessage(); - if (message.length() > 0) { - sb.append(" for each "); - sb.append(message); - } - staticText = sb.toString(); - } -} diff --git a/Mage.Sets/src/mage/sets/futuresight/PoolingVenom.java b/Mage.Sets/src/mage/sets/futuresight/PoolingVenom.java new file mode 100644 index 0000000000..d383a8aefe --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/PoolingVenom.java @@ -0,0 +1,78 @@ +/* + * 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.futuresight; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DestroyAttachedEffect; +import mage.abilities.effects.common.LoseLifeControllerAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class PoolingVenom extends CardImpl { + + public PoolingVenom(UUID ownerId) { + super(ownerId, 74, "Pooling Venom", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Aura"); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // Whenever enchanted land becomes tapped, its controller loses 2 life. + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new LoseLifeControllerAttachedEffect(2), "enchanted land")); + // {3}{B}: Destroy enchanted land. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyAttachedEffect("enchanted land"), new ManaCostsImpl("{3}{B}"))); + } + + public PoolingVenom(final PoolingVenom card) { + super(card); + } + + @Override + public PoolingVenom copy() { + return new PoolingVenom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/PsychicVenom.java b/Mage.Sets/src/mage/sets/limitedalpha/PsychicVenom.java index 20f2a5d9b9..d0322dc1c7 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/PsychicVenom.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/PsychicVenom.java @@ -30,22 +30,17 @@ package mage.sets.limitedalpha; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DamageAttachedControllerEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetLandPermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -67,7 +62,9 @@ public class PsychicVenom extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Whenever enchanted land becomes tapped, Psychic Venom deals 2 damage to that land's controller. - this.addAbility(new PsychicVenomAbility()); + Effect effect = new DamageAttachedControllerEffect(2); + effect.setText("{this} deals 2 damage to that land's controller"); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(effect, "enchanted land")); } public PsychicVenom(final PsychicVenom card) { @@ -79,43 +76,3 @@ public class PsychicVenom extends CardImpl { return new PsychicVenom(this); } } - -class PsychicVenomAbility extends TriggeredAbilityImpl { - PsychicVenomAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(2, true, "that land's controller")); - } - - PsychicVenomAbility(final PsychicVenomAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent source = game.getPermanent(this.sourceId); - if (source != null && source.getAttachedTo().equals(event.getTargetId())) { - Permanent attached = game.getPermanent(source.getAttachedTo()); - if (attached != null) { - for (Effect e : getEffects()) { - e.setTargetPointer(new FixedTarget(attached.getControllerId())); - } - return true; - } - } - return false; - } - - @Override - public PsychicVenomAbility copy() { - return new PsychicVenomAbility(this); - } - - @Override - public String getRule() { - return "Whenever enchanted land becomes tapped, " + super.getRule(); - } -} diff --git a/Mage.Sets/src/mage/sets/ninthedition/ContaminatedBond.java b/Mage.Sets/src/mage/sets/ninthedition/ContaminatedBond.java index c2ec93bd38..7f03c8fb9e 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/ContaminatedBond.java +++ b/Mage.Sets/src/mage/sets/ninthedition/ContaminatedBond.java @@ -30,19 +30,14 @@ package mage.sets.ninthedition; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.AttacksOrBlocksEnchantedTriggeredAbility; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.LoseLifeControllerAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -77,50 +72,3 @@ public class ContaminatedBond extends CardImpl { return new ContaminatedBond(this); } } - -class LoseLifeControllerAttachedEffect extends OneShotEffect { - - protected DynamicValue amount; - - public LoseLifeControllerAttachedEffect(int amount) { - this(new StaticValue(amount)); - } - - public LoseLifeControllerAttachedEffect(DynamicValue amount) { - super(Outcome.Damage); - this.amount = amount; - staticText = "its controller loses " + amount.toString() +" life"; - } - - public LoseLifeControllerAttachedEffect(final LoseLifeControllerAttachedEffect effect) { - super(effect); - this.amount = effect.amount.copy(); - } - - @Override - public LoseLifeControllerAttachedEffect copy() { - return new LoseLifeControllerAttachedEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment == null) { - enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature == null) { - creature = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } - if (creature != null) { - Player player = game.getPlayer(creature.getControllerId()); - if (player != null) { - player.loseLife(amount.calculate(game, source, this), game); - return true; - } - } - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ContaminatedGround.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ContaminatedGround.java index 98dbcb72f8..d7b41894cb 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ContaminatedGround.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ContaminatedGround.java @@ -29,11 +29,10 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.common.LoseLifeControllerAttachedEffect; import mage.abilities.effects.common.continuous.BecomesBasicLandEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; @@ -41,13 +40,8 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetLandPermanent; -import mage.target.targetpointer.FixedTarget; /** * @author Loki @@ -69,9 +63,9 @@ public class ContaminatedGround extends CardImpl { // Enchanted land is a Swamp. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesBasicLandEnchantedEffect("Swamp"))); - + // Whenever enchanted land becomes tapped, its controller loses 2 life. - this.addAbility(new ContaminatedGroundAbility()); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new LoseLifeControllerAttachedEffect(2), "enchanted land")); } public ContaminatedGround(final ContaminatedGround card) { @@ -83,44 +77,3 @@ public class ContaminatedGround extends CardImpl { return new ContaminatedGround(this); } } - -class ContaminatedGroundAbility extends TriggeredAbilityImpl { - ContaminatedGroundAbility() { - super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2)); - } - - ContaminatedGroundAbility(final ContaminatedGroundAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.TAPPED; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Permanent source = game.getPermanent(this.sourceId); - if (source != null && source.getAttachedTo().equals(event.getTargetId())) { - Permanent attached = game.getPermanent(source.getAttachedTo()); - if (attached != null) { - - for (Effect e : getEffects()) { - e.setTargetPointer(new FixedTarget(attached.getControllerId())); - } - return true; - } - } - return false; - } - - @Override - public ContaminatedGroundAbility copy() { - return new ContaminatedGroundAbility(this); - } - - @Override - public String getRule() { - return "Whenever enchanted land becomes tapped, its controller loses 2 life."; - } -} diff --git a/Mage/src/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java b/Mage/src/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java new file mode 100644 index 0000000000..fb0f482d2e --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java @@ -0,0 +1,98 @@ +/* + * 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.abilities.effects.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + + +public class LoseLifeControllerAttachedEffect extends OneShotEffect { + + protected DynamicValue amount; + + public LoseLifeControllerAttachedEffect(int amount) { + this(new StaticValue(amount)); + } + + public LoseLifeControllerAttachedEffect(DynamicValue amount) { + super(Outcome.LoseLife); + this.amount = amount; + setText(); + } + + public LoseLifeControllerAttachedEffect(final LoseLifeControllerAttachedEffect effect) { + super(effect); + this.amount = effect.amount.copy(); + } + + @Override + public LoseLifeControllerAttachedEffect copy() { + return new LoseLifeControllerAttachedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment == null) { + enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + } + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent creature = game.getPermanent(enchantment.getAttachedTo()); + if (creature == null) { + creature = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + } + if (creature != null) { + Player player = game.getPlayer(creature.getControllerId()); + if (player != null) { + player.loseLife(amount.calculate(game, source, this), game); + return true; + } + } + } + return false; + } + + private void setText() { + StringBuilder sb = new StringBuilder(); + sb.append("it's controller loses ").append(amount.toString()).append(" life"); + String message = amount.getMessage(); + if (message.length() > 0) { + sb.append(" for each "); + sb.append(message); + } + staticText = sb.toString(); + } +} From dcabc4692488b8cb638ea5aa58d55c5cb5bf129f Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 12 Sep 2015 14:24:49 +0300 Subject: [PATCH 3/6] Implement cards: Aven Farseer, Fatal Mutation, Root Elemental, and Woodcloaker --- .../src/mage/sets/scourge/AvenFarseer.java | 69 +++++++++++ .../src/mage/sets/scourge/FatalMutation.java | 115 ++++++++++++++++++ .../src/mage/sets/scourge/RootElemental.java | 68 +++++++++++ .../src/mage/sets/scourge/Woodcloaker.java | 73 +++++++++++ 4 files changed, 325 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/scourge/AvenFarseer.java create mode 100644 Mage.Sets/src/mage/sets/scourge/FatalMutation.java create mode 100644 Mage.Sets/src/mage/sets/scourge/RootElemental.java create mode 100644 Mage.Sets/src/mage/sets/scourge/Woodcloaker.java diff --git a/Mage.Sets/src/mage/sets/scourge/AvenFarseer.java b/Mage.Sets/src/mage/sets/scourge/AvenFarseer.java new file mode 100644 index 0000000000..b4c8030468 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/AvenFarseer.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.TurnedFaceUpAllTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; + +/** + * + * @author LoneFox + */ +public class AvenFarseer extends CardImpl { + + public AvenFarseer(UUID ownerId) { + super(ownerId, 3, "Aven Farseer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever a permanent is turned face up, put a +1/+1 counter on Aven Farseer. + this.addAbility(new TurnedFaceUpAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new FilterPermanent("a permanent"))); + } + + public AvenFarseer(final AvenFarseer card) { + super(card); + } + + @Override + public AvenFarseer copy() { + return new AvenFarseer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/FatalMutation.java b/Mage.Sets/src/mage/sets/scourge/FatalMutation.java new file mode 100644 index 0000000000..6520501189 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/FatalMutation.java @@ -0,0 +1,115 @@ +/* + * 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.scourge; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DestroyAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class FatalMutation extends CardImpl { + + public FatalMutation(UUID ownerId) { + super(ownerId, 66, "Fatal Mutation", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // When enchanted creature is turned face up, destroy it. It can't be regenerated. + this.addAbility(new FatalMutationAbility(new DestroyAttachedEffect("it", true))); + } + + public FatalMutation(final FatalMutation card) { + super(card); + } + + @Override + public FatalMutation copy() { + return new FatalMutation(this); + } +} + +class FatalMutationAbility extends TriggeredAbilityImpl { + + public FatalMutationAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect, false); + } + + public FatalMutationAbility(final FatalMutationAbility ability) { + super(ability); + } + + @Override + public FatalMutationAbility copy() { + return new FatalMutationAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.TURNEDFACEUP; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent attachment = game.getPermanent(this.getSourceId()); + if(attachment != null && event.getTargetId().equals(attachment.getAttachedTo())) { + return true; + } + return false; + + } + + @Override + public String getRule() { + return "Whenever enchanted creature is turned face up, " + super.getRule(); + } + +} + diff --git a/Mage.Sets/src/mage/sets/scourge/RootElemental.java b/Mage.Sets/src/mage/sets/scourge/RootElemental.java new file mode 100644 index 0000000000..46d93c2732 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/RootElemental.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PutPermanentOnBattlefieldEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; + +/** + * + * @author LoneFox + */ +public class RootElemental extends CardImpl { + + public RootElemental(UUID ownerId) { + super(ownerId, 127, "Root Elemental", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Elemental"); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Morph {5}{G}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{G}{G}"))); + // When Root Elemental is turned face up, you may put a creature card from your hand onto the battlefield. + this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new PutPermanentOnBattlefieldEffect(new FilterCreatureCard("a creature card")))); + } + + public RootElemental(final RootElemental card) { + super(card); + } + + @Override + public RootElemental copy() { + return new RootElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/Woodcloaker.java b/Mage.Sets/src/mage/sets/scourge/Woodcloaker.java new file mode 100644 index 0000000000..0fc2a523f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/Woodcloaker.java @@ -0,0 +1,73 @@ +/* + * 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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; + +/** + * + * @author LoneFox + */ +public class Woodcloaker extends CardImpl { + + public Woodcloaker(UUID ownerId) { + super(ownerId, 134, "Woodcloaker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{G}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Elf"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Morph {2}{G}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{G}{G}"))); + // When Woodcloaker is turned face up, target creature gains trample until end of turn. + Ability ability = new TurnedFaceUpSourceTriggeredAbility(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Woodcloaker(final Woodcloaker card) { + super(card); + } + + @Override + public Woodcloaker copy() { + return new Woodcloaker(this); + } +} From d2a97b0b645f70330e6447d893398bdf20bc7aee Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 12 Sep 2015 15:47:50 +0300 Subject: [PATCH 4/6] Implement cards: Cloudseeder, Llanowar Mentor, Skirk Ridge Exhumer, and Sparkspitter --- .../mage/sets/futuresight/Cloudseeder.java | 94 ++++++++++++++++++ .../mage/sets/futuresight/LlanowarMentor.java | 90 +++++++++++++++++ .../sets/futuresight/SkirkRidgeExhumer.java | 96 +++++++++++++++++++ .../mage/sets/futuresight/Sparkspitter.java | 95 ++++++++++++++++++ 4 files changed, 375 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/futuresight/Cloudseeder.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/LlanowarMentor.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/SkirkRidgeExhumer.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/Sparkspitter.java diff --git a/Mage.Sets/src/mage/sets/futuresight/Cloudseeder.java b/Mage.Sets/src/mage/sets/futuresight/Cloudseeder.java new file mode 100644 index 0000000000..7a6bbad56b --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/Cloudseeder.java @@ -0,0 +1,94 @@ +/* + * 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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class Cloudseeder extends CardImpl { + + public Cloudseeder(UUID ownerId) { + super(ownerId, 33, "Cloudseeder", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Faerie"); + this.subtype.add("Spellshaper"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {U}, {tap}, Discard a card: Put a 1/1 blue Faerie creature token named Cloud Sprite onto the battlefield. It has flying and "Cloud Sprite can block only creatures with flying." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new CloudSpriteToken()), new ManaCostsImpl("{U}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public Cloudseeder(final Cloudseeder card) { + super(card); + } + + @Override + public Cloudseeder copy() { + return new Cloudseeder(this); + } +} + +class CloudSpriteToken extends Token { + + public CloudSpriteToken() { + super("Cloud Sprite", "1/1 blue faerie creature token named Cloud Sprite with flying and \"Cloud Sprite can block only creatures with flying.\""); + this.setOriginalExpansionSetCode("FUT"); + cardType.add(CardType.CREATURE); + color.setBlue(true); + subtype.add("Faerie"); + power = new MageInt(1); + toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new CanBlockOnlyFlyingAbility()); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/LlanowarMentor.java b/Mage.Sets/src/mage/sets/futuresight/LlanowarMentor.java new file mode 100644 index 0000000000..c4a4c9e04b --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/LlanowarMentor.java @@ -0,0 +1,90 @@ +/* + * 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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class LlanowarMentor extends CardImpl { + + public LlanowarMentor(UUID ownerId) { + super(ownerId, 131, "Llanowar Mentor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Elf"); + this.subtype.add("Spellshaper"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {G}, {tap}, Discard a card: Put a 1/1 green Elf Druid creature token named Llanowar Elves onto the battlefield. It has "{tap}: Add {G} to your mana pool." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new LlanowarElvesToken()), new ManaCostsImpl("{G}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public LlanowarMentor(final LlanowarMentor card) { + super(card); + } + + @Override + public LlanowarMentor copy() { + return new LlanowarMentor(this); + } +} + +class LlanowarElvesToken extends Token { + + public LlanowarElvesToken() { + super("Llanowar Elves", "1/1 green Elf Druid creature token named Llanowar Elves with \"{T}: Add {G} to your mana pool.\""); + this.setOriginalExpansionSetCode("FUT"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Elf"); + subtype.add("Druid"); + power = new MageInt(1); + toughness = new MageInt(1); + + this.addAbility(new GreenManaAbility()); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/SkirkRidgeExhumer.java b/Mage.Sets/src/mage/sets/futuresight/SkirkRidgeExhumer.java new file mode 100644 index 0000000000..7338981ff7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/SkirkRidgeExhumer.java @@ -0,0 +1,96 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +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.constants.Zone; +import mage.game.permanent.token.Token; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SkirkRidgeExhumer extends CardImpl { + + public SkirkRidgeExhumer(UUID ownerId) { + super(ownerId, 77, "Skirk Ridge Exhumer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Zombie"); + this.subtype.add("Spellshaper"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {B}, {tap}, Discard a card: Put a 1/1 black Zombie Goblin creature token named Festering Goblin onto the battlefield. It has "When Festering Goblin dies, target creature gets -1/-1 until end of turn." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new FesteringGoblinToken()), new ManaCostsImpl("{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public SkirkRidgeExhumer(final SkirkRidgeExhumer card) { + super(card); + } + + @Override + public SkirkRidgeExhumer copy() { + return new SkirkRidgeExhumer(this); + } +} + +class FesteringGoblinToken extends Token { + + public FesteringGoblinToken() { + super("Festering Goblin", "1/1 black Zombie Goblin creature token named Festering Goblin with \"When Festering Goblin dies, target creature gets -1/-1 until end of turn.\""); + this.setOriginalExpansionSetCode("FUT"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Zombie"); + subtype.add("Goblin"); + power = new MageInt(1); + toughness = new MageInt(1); + + Ability ability = new DiesTriggeredAbility(new BoostTargetEffect(-1, -1, Duration.EndOfTurn), false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/Sparkspitter.java b/Mage.Sets/src/mage/sets/futuresight/Sparkspitter.java new file mode 100644 index 0000000000..83228c4f17 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/Sparkspitter.java @@ -0,0 +1,95 @@ +/* + * 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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class Sparkspitter extends CardImpl { + + public Sparkspitter(UUID ownerId) { + super(ownerId, 109, "Sparkspitter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Elemental"); + this.subtype.add("Spellshaper"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {R}, {tap}, Discard a card: Put a 3/1 red Elemental creature token named Spark Elemental onto the battlefield. It has trample, haste, and "At the beginning of the end step, sacrifice Spark Elemental." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SparkElementalToken()), new ManaCostsImpl("{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + public Sparkspitter(final Sparkspitter card) { + super(card); + } + + @Override + public Sparkspitter copy() { + return new Sparkspitter(this); + } +} + +class SparkElementalToken extends Token { + + public SparkElementalToken() { + super("Spark Elemental", "3/1 red Elemental creature token named Spark Elemental with trample, haste, and \"At the beginning of the end step, sacrifice Spark Elemental.\""); + this.setOriginalExpansionSetCode("FUT"); + cardType.add(CardType.CREATURE); + color.setRed(true); + subtype.add("Elemental"); + power = new MageInt(3); + toughness = new MageInt(1); + + this.addAbility(TrampleAbility.getInstance()); + this.addAbility(HasteAbility.getInstance()); + this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false)); + } +} From 43bf34613da1a8f9967aeecbe504c7e4d016f09f Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 12 Sep 2015 19:27:42 +0300 Subject: [PATCH 5/6] Combine Final Fortune's effect into AddExtraTurnControllerEffect. Implement cards: Last Chance and Warrior's Oath --- .../sets/masterseditioniv/LastChance.java | 58 +++++++++ .../src/mage/sets/portal/LastChance.java | 52 ++++++++ .../portalthreekingdoms/WarriorsOath.java | 58 +++++++++ .../sets/seventhedition/FinalFortune.java | 114 +----------------- .../src/mage/sets/starter1999/LastChance.java | 52 ++++++++ .../turn/AddExtraTurnControllerEffect.java | 69 ++++++++++- 6 files changed, 288 insertions(+), 115 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/LastChance.java create mode 100644 Mage.Sets/src/mage/sets/portal/LastChance.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/WarriorsOath.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/LastChance.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/LastChance.java b/Mage.Sets/src/mage/sets/masterseditioniv/LastChance.java new file mode 100644 index 0000000000..1dc88330db --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/LastChance.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.masterseditioniv; + +import java.util.UUID; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class LastChance extends CardImpl { + + public LastChance(UUID ownerId) { + super(ownerId, 125, "Last Chance", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{R}{R}"); + this.expansionSetCode = "ME4"; + + // Take an extra turn after this one. At the beginning of that turn's end step, you lose the game. + this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect(true)); + } + + public LastChance(final LastChance card) { + super(card); + } + + @Override + public LastChance copy() { + return new LastChance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/LastChance.java b/Mage.Sets/src/mage/sets/portal/LastChance.java new file mode 100644 index 0000000000..629b96cd8e --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/LastChance.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.portal; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class LastChance extends mage.sets.masterseditioniv.LastChance { + + public LastChance(UUID ownerId) { + super(ownerId); + this.cardNumber = 141; + this.expansionSetCode = "POR"; + } + + public LastChance(final LastChance card) { + super(card); + } + + @Override + public LastChance copy() { + return new LastChance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WarriorsOath.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WarriorsOath.java new file mode 100644 index 0000000000..99f7170b29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WarriorsOath.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.turn.AddExtraTurnControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WarriorsOath extends CardImpl { + + public WarriorsOath(UUID ownerId) { + super(ownerId, 124, "Warrior's Oath", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{R}{R}"); + this.expansionSetCode = "PTK"; + + // Take an extra turn after this one. At the beginning of that turn's end step, you lose the game. + this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect(true)); + } + + public WarriorsOath(final WarriorsOath card) { + super(card); + } + + @Override + public WarriorsOath copy() { + return new WarriorsOath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/FinalFortune.java b/Mage.Sets/src/mage/sets/seventhedition/FinalFortune.java index 14f568597d..128b12bccd 100644 --- a/Mage.Sets/src/mage/sets/seventhedition/FinalFortune.java +++ b/Mage.Sets/src/mage/sets/seventhedition/FinalFortune.java @@ -28,19 +28,10 @@ package mage.sets.seventhedition; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.Rarity; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.turn.TurnMod; -import mage.players.Player; /** * @@ -52,9 +43,8 @@ public class FinalFortune extends CardImpl { super(ownerId, 182, "Final Fortune", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{R}{R}"); this.expansionSetCode = "7ED"; - // Take an extra turn after this one. At the beginning of that turn's end step, you lose the game. - this.getSpellAbility().addEffect(new FinalFortuneEffect()); + this.getSpellAbility().addEffect(new AddExtraTurnControllerEffect(true)); } public FinalFortune(final FinalFortune card) { @@ -66,103 +56,3 @@ public class FinalFortune extends CardImpl { return new FinalFortune(this); } } - -class FinalFortuneEffect extends OneShotEffect { - - public FinalFortuneEffect() { - super(Outcome.AIDontUseIt); - this.staticText = "Take an extra turn after this one. At the beginning of that turn's end step, you lose the game."; - } - - public FinalFortuneEffect(final FinalFortuneEffect effect) { - super(effect); - } - - @Override - public FinalFortuneEffect copy() { - return new FinalFortuneEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - // Take an extra turn after this one - TurnMod extraTurn = new TurnMod(source.getControllerId(), false); - game.getState().getTurnMods().add(extraTurn); - - FinalFortuneLoseDelayedTriggeredAbility delayedTriggeredAbility = new FinalFortuneLoseDelayedTriggeredAbility(); - delayedTriggeredAbility.setSourceId(source.getSourceId()); - delayedTriggeredAbility.setControllerId(source.getControllerId()); - delayedTriggeredAbility.setConnectedTurnMod(extraTurn.getId()); - game.addDelayedTriggeredAbility(delayedTriggeredAbility); - - return true; - } - -} - -class FinalFortuneLoseDelayedTriggeredAbility extends DelayedTriggeredAbility { - - private UUID connectedTurnMod; - - public FinalFortuneLoseDelayedTriggeredAbility() { - super(new FinalFortuneLoseEffect(), Duration.EndOfGame); - } - - public FinalFortuneLoseDelayedTriggeredAbility(final FinalFortuneLoseDelayedTriggeredAbility ability) { - super(ability); - this.connectedTurnMod = ability.connectedTurnMod; - } - - @Override - public FinalFortuneLoseDelayedTriggeredAbility copy() { - return new FinalFortuneLoseDelayedTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.END_TURN_STEP_PRE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return connectedTurnMod != null && connectedTurnMod.equals(game.getState().getTurnId()); - } - - public void setConnectedTurnMod(UUID connectedTurnMod) { - this.connectedTurnMod = connectedTurnMod; - } - - @Override - public String getRule() { - return "At the beginning of that turn's end step, you lose the game"; - } - -} - -class FinalFortuneLoseEffect extends OneShotEffect { - - public FinalFortuneLoseEffect() { - super(Outcome.Detriment); - this.staticText = "You lose the game"; - } - - public FinalFortuneLoseEffect(final FinalFortuneLoseEffect effect) { - super(effect); - } - - @Override - public FinalFortuneLoseEffect copy() { - return new FinalFortuneLoseEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.lost(game); - return true; - } - return false; - } - -} diff --git a/Mage.Sets/src/mage/sets/starter1999/LastChance.java b/Mage.Sets/src/mage/sets/starter1999/LastChance.java new file mode 100644 index 0000000000..57860b5a28 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/LastChance.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 LastChance extends mage.sets.masterseditioniv.LastChance { + + public LastChance(UUID ownerId) { + super(ownerId); + this.cardNumber = 110; + this.expansionSetCode = "S99"; + } + + public LastChance(final LastChance card) { + super(card); + } + + @Override + public LastChance copy() { + return new LastChance(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java b/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java index a1fcdcf0bf..9b08d1d361 100644 --- a/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/turn/AddExtraTurnControllerEffect.java @@ -27,10 +27,16 @@ */ package mage.abilities.effects.common.turn; +import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.LoseGameSourceControllerEffect; +import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; import mage.game.turn.TurnMod; import mage.players.Player; @@ -39,13 +45,24 @@ import mage.players.Player; */ public class AddExtraTurnControllerEffect extends OneShotEffect { + private final boolean loseGameAtEnd; + public AddExtraTurnControllerEffect() { - super(Outcome.ExtraTurn); + this(false); + } + + public AddExtraTurnControllerEffect(boolean loseGameAtEnd) { + super(loseGameAtEnd ? Outcome.AIDontUseIt : Outcome.ExtraTurn); + this.loseGameAtEnd = loseGameAtEnd; staticText = "Take an extra turn after this one"; + if(loseGameAtEnd) { + staticText += ". At the beginning of that turn's end step, you lose the game"; + } } public AddExtraTurnControllerEffect(final AddExtraTurnControllerEffect effect) { super(effect); + this.loseGameAtEnd = effect.loseGameAtEnd; } @Override @@ -57,9 +74,55 @@ public class AddExtraTurnControllerEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - game.getState().getTurnMods().add(new TurnMod(player.getId(), false)); + TurnMod extraTurn = new TurnMod(player.getId(), false); + game.getState().getTurnMods().add(extraTurn); + if(loseGameAtEnd) { + LoseGameDelayedTriggeredAbility delayedTriggeredAbility = new LoseGameDelayedTriggeredAbility(); + delayedTriggeredAbility.setSourceId(source.getSourceId()); + delayedTriggeredAbility.setControllerId(source.getControllerId()); + delayedTriggeredAbility.setConnectedTurnMod(extraTurn.getId()); + game.addDelayedTriggeredAbility(delayedTriggeredAbility); + } } return true; } -} \ No newline at end of file +} + +class LoseGameDelayedTriggeredAbility extends DelayedTriggeredAbility { + + private UUID connectedTurnMod; + + public LoseGameDelayedTriggeredAbility() { + super(new LoseGameSourceControllerEffect(), Duration.EndOfGame); + } + + public LoseGameDelayedTriggeredAbility(final LoseGameDelayedTriggeredAbility ability) { + super(ability); + this.connectedTurnMod = ability.connectedTurnMod; + } + + @Override + public LoseGameDelayedTriggeredAbility copy() { + return new LoseGameDelayedTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.END_TURN_STEP_PRE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return connectedTurnMod != null && connectedTurnMod.equals(game.getState().getTurnId()); + } + + public void setConnectedTurnMod(UUID connectedTurnMod) { + this.connectedTurnMod = connectedTurnMod; + } + + @Override + public String getRule() { + return "At the beginning of that turn's end step, you lose the game"; + } +} From 1c0041f132ec253dab8c063d564effb6ba671b47 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 12 Sep 2015 20:56:44 +0300 Subject: [PATCH 6/6] Implement cards: Bogardan Lancer, Char-Rumbler, Cryptic Annelid, and Knight of Sursi --- .../mage/sets/futuresight/BogardanLancer.java | 66 +++++++++++++++++ .../mage/sets/futuresight/CharRumbler.java | 69 ++++++++++++++++++ .../mage/sets/futuresight/CrypticAnnelid.java | 73 +++++++++++++++++++ .../mage/sets/futuresight/KnightOfSursi.java | 70 ++++++++++++++++++ .../sets/venservskoth/CrypticAnnelid.java | 52 +++++++++++++ 5 files changed, 330 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/futuresight/BogardanLancer.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/CharRumbler.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/CrypticAnnelid.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/KnightOfSursi.java create mode 100644 Mage.Sets/src/mage/sets/venservskoth/CrypticAnnelid.java diff --git a/Mage.Sets/src/mage/sets/futuresight/BogardanLancer.java b/Mage.Sets/src/mage/sets/futuresight/BogardanLancer.java new file mode 100644 index 0000000000..472d2de41f --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/BogardanLancer.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.BloodthirstAbility; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BogardanLancer extends CardImpl { + + public BogardanLancer(UUID ownerId) { + super(ownerId, 95, "Bogardan Lancer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Bloodthirst 1 + this.addAbility(new BloodthirstAbility(1)); + // Flanking + this.addAbility(new FlankingAbility()); + } + + public BogardanLancer(final BogardanLancer card) { + super(card); + } + + @Override + public BogardanLancer copy() { + return new BogardanLancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/CharRumbler.java b/Mage.Sets/src/mage/sets/futuresight/CharRumbler.java new file mode 100644 index 0000000000..3fa00c13b8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/CharRumbler.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class CharRumbler extends CardImpl { + + public CharRumbler(UUID ownerId) { + super(ownerId, 96, "Char-Rumbler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Elemental"); + this.power = new MageInt(-1); + this.toughness = new MageInt(3); + + // Double strike + this.addAbility(DoubleStrikeAbility.getInstance()); + // {R}: Char-Rumbler gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public CharRumbler(final CharRumbler card) { + super(card); + } + + @Override + public CharRumbler copy() { + return new CharRumbler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/CrypticAnnelid.java b/Mage.Sets/src/mage/sets/futuresight/CrypticAnnelid.java new file mode 100644 index 0000000000..3fceca5542 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/CrypticAnnelid.java @@ -0,0 +1,73 @@ +/* + * 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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CrypticAnnelid extends CardImpl { + + public CrypticAnnelid(UUID ownerId) { + super(ownerId, 34, "Cryptic Annelid", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Worm"); + this.subtype.add("Beast"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // When Cryptic Annelid enters the battlefield, scry 1, then scry 2, then scry 3. + Ability ability = new EntersBattlefieldTriggeredAbility(new ScryEffect(1)); + Effect effect = new ScryEffect(2); + effect.setText(", then scry 2"); + ability.addEffect(effect); + effect = new ScryEffect(3); + effect.setText(", then scry 3"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public CrypticAnnelid(final CrypticAnnelid card) { + super(card); + } + + @Override + public CrypticAnnelid copy() { + return new CrypticAnnelid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/KnightOfSursi.java b/Mage.Sets/src/mage/sets/futuresight/KnightOfSursi.java new file mode 100644 index 0000000000..8bb3b138f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/KnightOfSursi.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.FlankingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.SuspendAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class KnightOfSursi extends CardImpl { + + public KnightOfSursi(UUID ownerId) { + super(ownerId, 10, "Knight of Sursi", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // flanking + this.addAbility(new FlankingAbility()); + // Suspend 3-{W} + this.addAbility(new SuspendAbility(3, new ManaCostsImpl("{W}"), this)); + } + + public KnightOfSursi(final KnightOfSursi card) { + super(card); + } + + @Override + public KnightOfSursi copy() { + return new KnightOfSursi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/venservskoth/CrypticAnnelid.java b/Mage.Sets/src/mage/sets/venservskoth/CrypticAnnelid.java new file mode 100644 index 0000000000..66d55fade0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/venservskoth/CrypticAnnelid.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.venservskoth; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class CrypticAnnelid extends mage.sets.futuresight.CrypticAnnelid { + + public CrypticAnnelid(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "DDI"; + } + + public CrypticAnnelid(final CrypticAnnelid card) { + super(card); + } + + @Override + public CrypticAnnelid copy() { + return new CrypticAnnelid(this); + } +}