From ea52da66c674c6ecbcaee094f5473f1b2a63ba35 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 18 Apr 2014 14:17:05 +0200 Subject: [PATCH] [JOU] Added 13 white cards. --- .../sets/journeyintonyx/AkroanMastiff.java | 71 +++++++ .../sets/journeyintonyx/ArmamentOfNyx.java | 96 ++++++++++ .../journeyintonyx/HarvestguardAlseids.java | 70 +++++++ .../LagonnaBandTrailblazer.java | 67 +++++++ .../sets/journeyintonyx/LeoninIconoclast.java | 82 ++++++++ .../sets/journeyintonyx/MortalObstinacy.java | 132 +++++++++++++ .../sets/journeyintonyx/OppressiveRays.java | 176 ++++++++++++++++++ .../sets/journeyintonyx/PhalanxFormation.java | 70 +++++++ .../sets/journeyintonyx/QuarryColossus.java | 130 +++++++++++++ .../src/mage/sets/journeyintonyx/Skybind.java | 114 ++++++++++++ .../journeyintonyx/StonewiseFortifier.java | 122 ++++++++++++ .../sets/journeyintonyx/SupplyLineCranes.java | 73 ++++++++ .../journeyintonyx/TethmosHighPriest.java | 83 +++++++++ 13 files changed, 1286 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/AkroanMastiff.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/ArmamentOfNyx.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/HarvestguardAlseids.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/LagonnaBandTrailblazer.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/LeoninIconoclast.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/MortalObstinacy.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/OppressiveRays.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/PhalanxFormation.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/Skybind.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/StonewiseFortifier.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/SupplyLineCranes.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/TethmosHighPriest.java diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/AkroanMastiff.java b/Mage.Sets/src/mage/sets/journeyintonyx/AkroanMastiff.java new file mode 100644 index 0000000000..95c1ad582d --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/AkroanMastiff.java @@ -0,0 +1,71 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AkroanMastiff extends CardImpl { + + public AkroanMastiff(UUID ownerId) { + super(ownerId, 3, "Akroan Mastiff", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Hound"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {W},{T}: Tap target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{W}")); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + } + + public AkroanMastiff(final AkroanMastiff card) { + super(card); + } + + @Override + public AkroanMastiff copy() { + return new AkroanMastiff(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/ArmamentOfNyx.java b/Mage.Sets/src/mage/sets/journeyintonyx/ArmamentOfNyx.java new file mode 100644 index 0000000000..4d20ed6f53 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/ArmamentOfNyx.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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.EquippedMatchesFilterCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.PreventAllDamageByAttachedEffect; +import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ArmamentOfNyx extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("enchantment"); + + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + } + + public ArmamentOfNyx(UUID ownerId) { + super(ownerId, 4, "Armament of Nyx", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Aura"); + + this.color.setWhite(true); + + // 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); + + // Enchanted creature has double strike as long as it's an enchantment. Otherwise, prevent all damage that would be dealt by enchanted creature + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( + new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield), + new PreventAllDamageByAttachedEffect(Duration.WhileOnBattlefield, "enchanted creature", false), + new EquippedMatchesFilterCondition(filter), + "Enchanted creature has double strike as long as it's an enchantment. Otherwise, prevent all damage that would be dealt by enchanted creature")); + this.addAbility(ability); + + } + + public ArmamentOfNyx(final ArmamentOfNyx card) { + super(card); + } + + @Override + public ArmamentOfNyx copy() { + return new ArmamentOfNyx(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/HarvestguardAlseids.java b/Mage.Sets/src/mage/sets/journeyintonyx/HarvestguardAlseids.java new file mode 100644 index 0000000000..a1a7832674 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/HarvestguardAlseids.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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.effects.common.PreventDamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class HarvestguardAlseids extends CardImpl { + + public HarvestguardAlseids(UUID ownerId) { + super(ownerId, 13, "Harvestguard Alseids", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Nymph"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Constellation — Whenever Harvestguard Alseids or another enchantment enters the battlefield under your control, prevent all damage that would be dealt to target creature this turn. + Ability ability = new ConstellationAbility(new PreventDamageTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE), false); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + } + + public HarvestguardAlseids(final HarvestguardAlseids card) { + super(card); + } + + @Override + public HarvestguardAlseids copy() { + return new HarvestguardAlseids(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/LagonnaBandTrailblazer.java b/Mage.Sets/src/mage/sets/journeyintonyx/LagonnaBandTrailblazer.java new file mode 100644 index 0000000000..092e6f934f --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/LagonnaBandTrailblazer.java @@ -0,0 +1,67 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LevelX2 + */ +public class LagonnaBandTrailblazer extends CardImpl { + + public LagonnaBandTrailblazer(UUID ownerId) { + super(ownerId, 14, "Lagonna-Band Trailblazer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Centaur"); + this.subtype.add("Scout"); + + this.color.setWhite(true); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Heroic — Whenever you cast a spell that targets Lagonna-Band Trailblazer, put a +1/+1 counter on Lagonna-Band Trailblzer. + this.addAbility(new HeroicAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()))); + } + + public LagonnaBandTrailblazer(final LagonnaBandTrailblazer card) { + super(card); + } + + @Override + public LagonnaBandTrailblazer copy() { + return new LagonnaBandTrailblazer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/LeoninIconoclast.java b/Mage.Sets/src/mage/sets/journeyintonyx/LeoninIconoclast.java new file mode 100644 index 0000000000..b55857e8f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/LeoninIconoclast.java @@ -0,0 +1,82 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class LeoninIconoclast extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("enchantment creature an opponent controls"); + + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public LeoninIconoclast(UUID ownerId) { + super(ownerId, 16, "Leonin Iconoclast", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Cat"); + this.subtype.add("Monk"); + + this.color.setWhite(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Heroic — Whenever you cast a spell that targets Leonin Iconoclast, destroy target enchantment creature an opponent controls. + Ability ability = new HeroicAbility(new DestroyTargetEffect()); + ability.addTarget(new TargetPermanent(filter, true)); + this.addAbility(ability); + } + + public LeoninIconoclast(final LeoninIconoclast card) { + super(card); + } + + @Override + public LeoninIconoclast copy() { + return new LeoninIconoclast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/MortalObstinacy.java b/Mage.Sets/src/mage/sets/journeyintonyx/MortalObstinacy.java new file mode 100644 index 0000000000..3c9b1c436f --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/MortalObstinacy.java @@ -0,0 +1,132 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetEnchantmentPermanent; + +/** + * + * @author LevelX2 + */ +public class MortalObstinacy extends CardImpl { + + public MortalObstinacy(UUID ownerId) { + super(ownerId, 17, "Mortal Obstinacy", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Aura"); + + this.color.setWhite(true); + + // Enchant creature you control + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1,1, Duration.WhileOnBattlefield))); + // Whenever enchanted creature deals combat damage to a player, you may sacrifice Mortal Obstinacy. If you do, destroy target enchantment. + this.addAbility(new MortalObstinacyAbility()); + + } + + public MortalObstinacy(final MortalObstinacy card) { + super(card); + } + + @Override + public MortalObstinacy copy() { + return new MortalObstinacy(this); + } +} + +class MortalObstinacyAbility extends TriggeredAbilityImpl { + + public MortalObstinacyAbility() { + super(Zone.BATTLEFIELD, new DestroyTargetEffect()); + } + + public MortalObstinacyAbility(final MortalObstinacyAbility ability) { + super(ability); + } + + @Override + public MortalObstinacyAbility copy() { + return new MortalObstinacyAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event instanceof DamagedPlayerEvent) { + DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event; + Permanent damageMakingCreature = game.getPermanent(event.getSourceId()); + if (damageEvent.isCombatDamage() && damageMakingCreature != null && damageMakingCreature.getAttachments().contains(this.getSourceId())) { + Player controller = game.getPlayer(this.getControllerId()); + Permanent sourceEnchantment = game.getPermanent(this.getSourceId()); + if (controller != null && sourceEnchantment != null) { + StringBuilder sb = new StringBuilder(); + sb.append("Do you wish to sacrifice ").append(sourceEnchantment.getName()); + sb.append(" to destroy target enchantment?"); + if (controller.chooseUse(Outcome.DestroyPermanent, sb.toString(), game)) { + this.getTargets().clear(); + this.addTarget(new TargetEnchantmentPermanent(true)); + return true; + } + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever enchanted creature deals combat damage to a player, you may sacrifice {this}. If you do, destroy target enchantment."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/OppressiveRays.java b/Mage.Sets/src/mage/sets/journeyintonyx/OppressiveRays.java new file mode 100644 index 0000000000..3eadfd4090 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/OppressiveRays.java @@ -0,0 +1,176 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.ActivatedAbility; +import mage.abilities.SpellAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.CostModificationEffectImpl; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +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.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.util.CardUtil; + +/** + * + * @author LevelX2 + */ +public class OppressiveRays extends CardImpl { + + public OppressiveRays(UUID ownerId) { + super(ownerId, 19, "Oppressive Rays", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Aura"); + + this.color.setWhite(true); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature can't attack or block unless its controller pays 3. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OppressiveRaysEffect())); + // Activated abilities of enchanted creature cost {3} more to activate. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OppressiveRaysCostReductionEffect() )); + } + + public OppressiveRays(final OppressiveRays card) { + super(card); + } + + @Override + public OppressiveRays copy() { + return new OppressiveRays(this); + } +} + + +class OppressiveRaysEffect extends ReplacementEffectImpl { + + private static final String effectText = "Enchanted creature can't attack or block unless its controller pays {3}"; + + OppressiveRaysEffect ( ) { + super(Duration.WhileOnBattlefield, Outcome.Neutral); + staticText = effectText; + } + + OppressiveRaysEffect ( OppressiveRaysEffect effect ) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + throw new UnsupportedOperationException("Not supported."); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player player = game.getPlayer(event.getPlayerId()); + if (player != null) { + ManaCostsImpl attackTax = new ManaCostsImpl("{3}"); + if (attackTax.canPay(source.getSourceId(), event.getPlayerId(), game) + && player.chooseUse(Outcome.Neutral, "Pay {3} to attack?", game)) { + if (attackTax.payOrRollback(source, game, source.getSourceId(), event.getPlayerId())) { + return false; + } + } + return true; + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if ( event.getType() == GameEvent.EventType.DECLARE_ATTACKER) { + Permanent attacker = game.getPermanent(event.getTargetId()); + return attacker != null && attacker.getAttachments().contains(source.getSourceId()); + } + return false; + } + + @Override + public OppressiveRaysEffect copy() { + return new OppressiveRaysEffect(this); + } + +} + +class OppressiveRaysCostReductionEffect extends CostModificationEffectImpl { + + OppressiveRaysCostReductionEffect ( ) { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); + staticText = "Activated abilities of enchanted creature cost {3} more to activate"; + } + + OppressiveRaysCostReductionEffect(OppressiveRaysCostReductionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + CardUtil.increaseCost(abilityToModify, 2); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + Permanent creature = game.getPermanent(abilityToModify.getSourceId()); + if (creature != null && creature.getAttachments().contains(source.getSourceId())) { + if (abilityToModify instanceof ActivatedAbility + && !(abilityToModify instanceof SpellAbility)) { + return true; + } + } + return false; + } + + @Override + public OppressiveRaysCostReductionEffect copy() { + return new OppressiveRaysCostReductionEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/PhalanxFormation.java b/Mage.Sets/src/mage/sets/journeyintonyx/PhalanxFormation.java new file mode 100644 index 0000000000..740cd9f5fd --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/PhalanxFormation.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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.abilityword.StriveAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class PhalanxFormation extends CardImpl { + + public PhalanxFormation(UUID ownerId) { + super(ownerId, 21, "Phalanx Formation", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}"); + this.expansionSetCode = "JOU"; + + this.color.setWhite(true); + + // Strive — Phalanx Formation costs {1}{W} more to cast for each target beyond the first. + this.addAbility(new StriveAbility("{1}{W}")); + // Any number of target creatures each gain double strike until end of turn. + Effect effect = new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn); + effect.setText("Any number of target creatures each gain double strike until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0,Integer.MAX_VALUE)); + } + + public PhalanxFormation(final PhalanxFormation card) { + super(card); + } + + @Override + public PhalanxFormation copy() { + return new PhalanxFormation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java b/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java new file mode 100644 index 0000000000..75cc01f424 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/QuarryColossus.java @@ -0,0 +1,130 @@ +/* + * 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.journeyintonyx; + +import java.util.ArrayList; +import java.util.List; +import java.util.ListIterator; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class QuarryColossus extends CardImpl { + + public QuarryColossus(UUID ownerId) { + super(ownerId, 22, "Quarry Colossus", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Giant"); + + this.color.setWhite(true); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // When Quarry Colossus enters the battlefield, put target creature into its owner's library just beneath the top X cards of that library, where X is the number of Plains you control. + Ability ability = new EntersBattlefieldTriggeredAbility(new QuarryColossusReturnLibraryEffect(), false); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + } + + public QuarryColossus(final QuarryColossus card) { + super(card); + } + + @Override + public QuarryColossus copy() { + return new QuarryColossus(this); + } +} + +class QuarryColossusReturnLibraryEffect extends OneShotEffect { + + public QuarryColossusReturnLibraryEffect() { + super(Outcome.Benefit); + this.staticText = "put target creature into its owner's library just beneath the top X cards of that library, where X is the number of Plains you control"; + } + + public QuarryColossusReturnLibraryEffect(final QuarryColossusReturnLibraryEffect effect) { + super(effect); + } + + @Override + public QuarryColossusReturnLibraryEffect copy() { + return new QuarryColossusReturnLibraryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (permanent != null && controller != null) { + Player owner = game.getPlayer(permanent.getOwnerId()); + if (owner != null) { + int plains = game.getBattlefield().countAll(new FilterPermanent("Plains", "Plains you control"), source.getControllerId(), game); + int xValue = Math.min(plains, owner.getLibrary().size()); + Cards cards = new CardsImpl(); + List cardIds = new ArrayList<>(); + for (int i = 0; i < xValue; i++) { + Card card = owner.getLibrary().getFromTop(game); + cards.add(card); + cardIds.add(card.getId()); + } + // return cards back to library + controller.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD, true); + ListIterator libraryCards = cardIds.listIterator(); + while(libraryCards.hasPrevious()) { + UUID cardId = libraryCards.previous(); + Card card = cards.get(cardId, game); + if (card != null) { + card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + } + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/Skybind.java b/Mage.Sets/src/mage/sets/journeyintonyx/Skybind.java new file mode 100644 index 0000000000..98a712bd48 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/Skybind.java @@ -0,0 +1,114 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +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.permanent.Permanent; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class Skybind extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("nonenchantment permanent"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.ENCHANTMENT))); + } + + public Skybind(UUID ownerId) { + super(ownerId, 25, "Skybind", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{W}{W}"); + this.expansionSetCode = "JOU"; + + this.color.setWhite(true); + + // Constellation — When Skybind or another enchantment enters the battlefield under your control, exile target nonenchantment permanent. Return that card to the battlefield under its owner's control at the beginning of the next end step. + Ability ability = new ConstellationAbility(new SkybindEffect(), false); + ability.addTarget(new TargetPermanent(filter, true)); + this.addAbility(ability); + } + + public Skybind(final Skybind card) { + super(card); + } + + @Override + public Skybind copy() { + return new Skybind(this); + } +} + +class SkybindEffect extends OneShotEffect { + + public SkybindEffect() { + super(Outcome.Detriment); + staticText = "exile target nonenchantment permanent. Return that card to the battlefield under its owner's control at the beginning of the next end step"; + } + + public SkybindEffect(final SkybindEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (permanent != null && sourcePermanent != null) { + if (permanent.moveToExile(source.getSourceId(), sourcePermanent.getName(), source.getId(), game)) { + //create delayed triggered ability + AtEndOfTurnDelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD)); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } + } + return false; + } + + @Override + public SkybindEffect copy() { + return new SkybindEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/StonewiseFortifier.java b/Mage.Sets/src/mage/sets/journeyintonyx/StonewiseFortifier.java new file mode 100644 index 0000000000..eeff2043f5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/StonewiseFortifier.java @@ -0,0 +1,122 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import static mage.filter.predicate.permanent.ControllerControlsIslandPredicate.filter; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class StonewiseFortifier extends CardImpl { + + public StonewiseFortifier(UUID ownerId) { + super(ownerId, 27, "Stonewise Fortifier", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {4}{W}: Prevent all damage that would be dealt to Stonewise Fortifier by target creature this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new StonewiseFortifierPreventAllDamageToEffect(), new ManaCostsImpl("{4}{W}")); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + } + + public StonewiseFortifier(final StonewiseFortifier card) { + super(card); + } + + @Override + public StonewiseFortifier copy() { + return new StonewiseFortifier(this); + } +} + +class StonewiseFortifierPreventAllDamageToEffect extends PreventionEffectImpl { + + public StonewiseFortifierPreventAllDamageToEffect() { + super(Duration.EndOfTurn); + staticText = "Prevent all damage that would be dealt to {this} by target creature this turn"; + } + + public StonewiseFortifierPreventAllDamageToEffect(final StonewiseFortifierPreventAllDamageToEffect effect) { + super(effect); + } + + @Override + public StonewiseFortifierPreventAllDamageToEffect copy() { + return new StonewiseFortifierPreventAllDamageToEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), event.getAmount(), false); + if (!game.replaceEvent(preventEvent)) { + int damage = event.getAmount(); + event.setAmount(0); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getSourceId(), source.getControllerId(), damage)); + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game) && event.getTargetId().equals(source.getSourceId())) { + if (event.getSourceId().equals(targetPointer.getFirst(game, source))) { + return true; + } + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/SupplyLineCranes.java b/Mage.Sets/src/mage/sets/journeyintonyx/SupplyLineCranes.java new file mode 100644 index 0000000000..9f4253fec7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/SupplyLineCranes.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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SupplyLineCranes extends CardImpl { + + public SupplyLineCranes(UUID ownerId) { + super(ownerId, 28, "Supply-Line Cranes", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Bird"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Supply-Line Cranes enters the battlefield, put a +1/+1 counter on target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + } + + public SupplyLineCranes(final SupplyLineCranes card) { + super(card); + } + + @Override + public SupplyLineCranes copy() { + return new SupplyLineCranes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/TethmosHighPriest.java b/Mage.Sets/src/mage/sets/journeyintonyx/TethmosHighPriest.java new file mode 100644 index 0000000000..470550422b --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/TethmosHighPriest.java @@ -0,0 +1,83 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.Target; +import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class TethmosHighPriest extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard"); + + static { + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 3)); + } + + public TethmosHighPriest(UUID ownerId) { + super(ownerId, 29, "Tethmos High Priest", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Cat"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Heroic — Whenever you cast a spell that targets Tethmos High Priest, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. + Ability ability = new HeroicAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false); + Target target = new TargetCardInYourGraveyard(filter); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + } + + public TethmosHighPriest(final TethmosHighPriest card) { + super(card); + } + + @Override + public TethmosHighPriest copy() { + return new TethmosHighPriest(this); + } +}