From a050bfa34e918d94e5ba0a685c6364d58bc9fea6 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 22 Oct 2013 15:49:02 -0500 Subject: [PATCH] - Added Cauldron Haze, Marshdrinker Giant, Talara's Battalion, Tilling Treefolk. Fixed Azors Elocutors and Ulamog The Infinite Gyre. --- .../src/mage/sets/eventide/CauldronHaze.java | 68 +++++++ .../mage/sets/eventide/MarshdrinkerGiant.java | 85 ++++++++ .../mage/sets/eventide/TalarasBattalion.java | 181 ++++++++++++++++++ .../mage/sets/eventide/TillingTreefolk.java | 75 ++++++++ .../sets/returntoravnica/AzorsElocutors.java | 2 +- .../UlamogTheInfiniteGyre.java | 5 +- 6 files changed, 413 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/eventide/CauldronHaze.java create mode 100644 Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java create mode 100644 Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java create mode 100644 Mage.Sets/src/mage/sets/eventide/TillingTreefolk.java diff --git a/Mage.Sets/src/mage/sets/eventide/CauldronHaze.java b/Mage.Sets/src/mage/sets/eventide/CauldronHaze.java new file mode 100644 index 00000000000..4ba559d14da --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/CauldronHaze.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.eventide; + +import java.util.UUID; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.PersistAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class CauldronHaze extends CardImpl { + + private String rule = "Choose any number of target creatures. Each of those creatures gains persist until end of turn"; + + public CauldronHaze(UUID ownerId) { + super(ownerId, 84, "Cauldron Haze", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W/B}"); + this.expansionSetCode = "EVE"; + + this.color.setBlack(true); + this.color.setWhite(true); + + // Choose any number of target creatures. Each of those creatures gains persist until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new PersistAbility(), Duration.EndOfTurn, rule)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); + + } + + public CauldronHaze(final CauldronHaze card) { + super(card); + } + + @Override + public CauldronHaze copy() { + return new CauldronHaze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java b/Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java new file mode 100644 index 00000000000..f000dd9e289 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/MarshdrinkerGiant.java @@ -0,0 +1,85 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author jeffwadsworth + */ +public class MarshdrinkerGiant extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("Island or Swamp an opponent controls"); + + static { + filter.add(Predicates.or( + new SubtypePredicate("Island"), + new SubtypePredicate("Swamp"))); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public MarshdrinkerGiant(UUID ownerId) { + super(ownerId, 69, "Marshdrinker Giant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Marshdrinker Giant enters the battlefield, destroy target Island or Swamp an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetLandPermanent(filter)); + this.addAbility(ability); + + } + + public MarshdrinkerGiant(final MarshdrinkerGiant card) { + super(card); + } + + @Override + public MarshdrinkerGiant copy() { + return new MarshdrinkerGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java b/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java new file mode 100644 index 00000000000..0653831b861 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/TalarasBattalion.java @@ -0,0 +1,181 @@ +/* + * 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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.stack.Spell; +import mage.watchers.WatcherImpl; + +/** + * + * @author jeffwadsworth + */ +public class TalarasBattalion extends CardImpl { + + public TalarasBattalion(UUID ownerId) { + super(ownerId, 77, "Talara's Battalion", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Cast Talara's Battalion only if you've cast another green spell this turn. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new TalarasBattalionEffect())); + this.addWatcher(new TalarasBattalionWatcher(this.getId())); + + } + + public TalarasBattalion(final TalarasBattalion card) { + super(card); + } + + @Override + public TalarasBattalion copy() { + return new TalarasBattalion(this); + } +} + +class TalarasBattalionEffect extends ReplacementEffectImpl { + + TalarasBattalionEffect() { + super(Duration.EndOfGame, Outcome.Detriment); + staticText = "Cast {this} only if you've cast another green spell this turn"; + } + + TalarasBattalionEffect(final TalarasBattalionEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.CAST_SPELL + && event.getSourceId().equals(source.getSourceId())) { + CastGreenSpellThisTurnCondition condition = new CastGreenSpellThisTurnCondition(); + return (!condition.apply(game, source)); + } + return false; + + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public TalarasBattalionEffect copy() { + return new TalarasBattalionEffect(this); + } +} + +class CastGreenSpellThisTurnCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + TalarasBattalionWatcher watcher = (TalarasBattalionWatcher) game.getState().getWatchers().get("TalarasBattalionWatcher", source.getControllerId()); + if (watcher != null) { + return watcher.conditionMet(); + } + return false; + } +} + +class TalarasBattalionWatcher extends WatcherImpl { + + private static final FilterSpell filter = new FilterSpell(); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + private UUID cardId; + + public TalarasBattalionWatcher(UUID cardId) { + super("TalarasBattalionWatcher", WatcherScope.PLAYER); + this.cardId = cardId; + } + + public TalarasBattalionWatcher(final TalarasBattalionWatcher watcher) { + super(watcher); + this.cardId = watcher.cardId; + } + + @Override + public TalarasBattalionWatcher copy() { + return new TalarasBattalionWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (condition == true) { //no need to check - condition has already occured + return; + } + if (event.getType() == EventType.SPELL_CAST + && controllerId == event.getPlayerId()) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (!spell.getSourceId().equals(cardId) && filter.match(spell, game)) { + condition = true; + } + } + } + + @Override + public void reset() { + super.reset(); + condition = false; + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/TillingTreefolk.java b/Mage.Sets/src/mage/sets/eventide/TillingTreefolk.java new file mode 100644 index 00000000000..fd8fc1de562 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/TillingTreefolk.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eventide; + +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.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author jeffwadsworth + */ +public class TillingTreefolk extends CardImpl { + + public TillingTreefolk(UUID ownerId) { + super(ownerId, 78, "Tilling Treefolk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Treefolk"); + this.subtype.add("Druid"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // When Tilling Treefolk enters the battlefield, you may return up to two target land cards from your graveyard to your hand. + Effect effect = new ReturnFromGraveyardToHandTargetEffect(true); + effect.setText("you may return up to two target land cards from your graveyard to your hand"); + Ability ability = new EntersBattlefieldTriggeredAbility(effect, true); + ability.addTarget(new TargetCardInYourGraveyard(0, 2, new FilterLandCard())); + this.addAbility(ability); + + } + + public TillingTreefolk(final TillingTreefolk card) { + super(card); + } + + @Override + public TillingTreefolk copy() { + return new TillingTreefolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java b/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java index 8a5fe173111..5cc8302e5ee 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/AzorsElocutors.java @@ -115,11 +115,11 @@ class AzorsElocutorsEffect extends OneShotEffect { public AzorsElocutorsEffect() { super(Outcome.Benefit); + staticText = "put a filibuster counter on Azor's Elocutors. Then if Azor's Elocutors has five or more filibuster counters on it, you win the game"; } public AzorsElocutorsEffect(final AzorsElocutorsEffect effect) { super(effect); - staticText = "put a filibuster counter on Azor's Elocutors. Then if Azor's Elocutors has five or more filibuster counters on it, you win the game"; } @Override diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java index 2d40543c159..2cc296114a2 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UlamogTheInfiniteGyre.java @@ -54,7 +54,7 @@ import mage.target.TargetPermanent; */ public class UlamogTheInfiniteGyre extends CardImpl { - private static final String effectText = "When Ulamog is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library"; + private static final String effectText = "When Ulamog is put into a graveyard from anywhere, "; public UlamogTheInfiniteGyre(UUID ownerId) { super(ownerId, 12, "Ulamog, the Infinite Gyre", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{11}"); @@ -83,7 +83,7 @@ public class UlamogTheInfiniteGyre extends CardImpl { class UlamogTheInfiniteGyreDestroyOnCastAbility extends TriggeredAbilityImpl { - private static final String abilityText = "When you cast {this}, destroy target permanent"; + private static final String abilityText = "When you cast {this}, destroy target permanent."; UlamogTheInfiniteGyreDestroyOnCastAbility ( ) { super(Zone.STACK, new DestroyTargetEffect()); @@ -120,6 +120,7 @@ class UlamogTheInfiniteGyreEnterGraveyardEffect extends OneShotEffect