From 4f96768df2fc3979bb6cbe8e611d21be7eb20ba6 Mon Sep 17 00:00:00 2001 From: Temba Date: Sat, 14 Mar 2015 12:56:00 +0200 Subject: [PATCH 01/17] Created 6 cards. (High probability for minor errors.) --- .../src/mage/sets/judgment/PhantomTiger.java | 147 ++++++++++++++++++ .../src/mage/sets/judgment/WormfangDrake.java | 97 ++++++++++++ .../src/mage/sets/legions/LowlandTracker.java | 67 ++++++++ .../mage/sets/onslaught/SymbioticBeast.java | 66 ++++++++ .../sets/timeshifted/FacelessButcher.java | 96 ++++++++++++ .../mage/sets/torment/FacelessButcher.java | 54 +++++++ .../src/mage/sets/torment/ShadesForm.java | 88 +++++++++++ 7 files changed, 615 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/judgment/PhantomTiger.java create mode 100644 Mage.Sets/src/mage/sets/judgment/WormfangDrake.java create mode 100644 Mage.Sets/src/mage/sets/legions/LowlandTracker.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java create mode 100644 Mage.Sets/src/mage/sets/torment/FacelessButcher.java create mode 100644 Mage.Sets/src/mage/sets/torment/ShadesForm.java diff --git a/Mage.Sets/src/mage/sets/judgment/PhantomTiger.java b/Mage.Sets/src/mage/sets/judgment/PhantomTiger.java new file mode 100644 index 0000000000..2cbb433bab --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/PhantomTiger.java @@ -0,0 +1,147 @@ +/* + * 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.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.turn.Step; + +/** + * + * @author Temba + */ +public class PhantomTiger extends CardImpl { + + public PhantomTiger(UUID ownerId) { + super(ownerId, 129, "Phantom Tiger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Cat"); + this.subtype.add("Spirit"); + this.power = new MageInt(1); + this.toughness = new MageInt(0); + this.color.setGreen(true); + + + // Phantom Tiger enters the battlefield with two +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); + + // If damage would be dealt to Phantom Tiger, prevent that damage. Remove a +1/+1 counter from Phantom Tiger. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PhantomTigerPreventionEffect())); + } + + public PhantomTiger(final PhantomTiger card) { + super(card); + } + + @Override + public PhantomTiger copy() { + return new PhantomTiger(this); + } +} +class PhantomTigerPreventionEffect extends PreventionEffectImpl { + + // remember turn and phase step to check if counter in this step was already removed + private int turn = 0; + private Step combatPhaseStep = null; + + public PhantomTigerPreventionEffect() { + super(Duration.WhileOnBattlefield); + staticText = "If damage would be dealt to {this}, prevent that damage. Remove a +1/+1 counter from {this}"; + } + + public PhantomTigerPreventionEffect(final PhantomTigerPreventionEffect effect) { + super(effect); + this.turn = effect.turn; + this.combatPhaseStep = effect.combatPhaseStep; + } + + @Override + public PhantomTigerPreventionEffect copy() { + return new PhantomTigerPreventionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + preventDamageAction(event, source, game); + + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + boolean removeCounter = true; + // check if in the same combat damage step already a counter was removed + if (game.getTurn().getPhase().getStep().getType().equals(PhaseStep.COMBAT_DAMAGE)) { + if (game.getTurnNum() == turn + && game.getTurn().getStep().equals(combatPhaseStep)) { + removeCounter = false; + } else { + turn = game.getTurnNum(); + combatPhaseStep = game.getTurn().getStep(); + } + } + + if(removeCounter && permanent.getCounters().containsKey(CounterType.P1P1)) { + StringBuilder sb = new StringBuilder(permanent.getName()).append(": "); + permanent.removeCounters(CounterType.P1P1.createInstance(), game); + sb.append("Removed a +1/+1 counter "); + game.informPlayers(sb.toString()); + } + } + + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (super.applies(event, source, game)) { + if (event.getTargetId().equals(source.getSourceId())) { + return true; + } + } + return false; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java new file mode 100644 index 0000000000..4af3029152 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -0,0 +1,97 @@ +/* + * 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.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.costs.common.ExileTargetCost; +import mage.abilities.effects.common.ReturnFromExileForSourceEffect; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Temba + */ +public class WormfangDrake extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); + + static { + + filter.add(new AnotherPredicate()); + } + public WormfangDrake(UUID ownerId) { + super(ownerId, 57, "Wormfang Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Nightmare"); + this.subtype.add("Drake"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + this.color.setBlue(true); + // Flying + this.addAbility(FlyingAbility.getInstance()); + + + // + + + Ability ability1; + ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ExileTargetCost( new TargetControlledPermanent(filter))), true); + Target target = new TargetPermanent(filter); + ability1.addTarget(target); + this.addAbility(ability1); + + // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. + Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); + this.addAbility(ability2); + + + } + + public WormfangDrake(final WormfangDrake card) { + super(card); + } + + @Override + public WormfangDrake copy() { + return new WormfangDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/LowlandTracker.java b/Mage.Sets/src/mage/sets/legions/LowlandTracker.java new file mode 100644 index 0000000000..753a5549fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/LowlandTracker.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.ProvokeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author Temba + */ +public class LowlandTracker extends CardImpl { + + public LowlandTracker(UUID ownerId) { + super(ownerId, 17, "Lowland Tracker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + this.color.setWhite(true); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // Provoke + this.addAbility(new ProvokeAbility()); + } + + public LowlandTracker(final LowlandTracker card) { + super(card); + } + + @Override + public LowlandTracker copy() { + return new LowlandTracker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java b/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java new file mode 100644 index 0000000000..ca48b9ef13 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.InsectToken; + +/** + * + * @author Temba + */ +public class SymbioticBeast extends CardImpl { + + public SymbioticBeast(UUID ownerId) { + super(ownerId, 287, "Symbiotic Beast", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Insect"); + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + this.color.setGreen(true); + + // When Symbiotic Beast dies, put four 1/1 green Insect creature tokens onto the battlefield. + this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new InsectToken(), 4))); + } + + public SymbioticBeast(final SymbioticBeast card) { + super(card); + } + + @Override + public SymbioticBeast copy() { + return new SymbioticBeast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java new file mode 100644 index 0000000000..9f8f1f6233 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.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.timeshifted; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnFromExileForSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.Target; +import mage.target.TargetPermanent; + + +/** + * + * @author Temba + */ +public class FacelessButcher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + + static { + filter.add(new AnotherPredicate()); + } + + + public FacelessButcher(UUID ownerId) { + super(ownerId, 43, "Faceless Butcher", Rarity.SPECIAL, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "TSB"; + this.subtype.add("Nightmare"); + this.subtype.add("Horror"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + this.color.setBlack(true); + + + + + + // When Faceless Butcher enters the battlefield, exile target creature other than Faceless Butcher. + Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), false); + Target target = new TargetPermanent(filter); + ability1.addTarget(target); + this.addAbility(ability1); + + + + // When Faceless Butcher leaves the battlefield, return the exiled card to the battlefield under its owner's control. + Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); + this.addAbility(ability2); + + } + + public FacelessButcher(final FacelessButcher card) { + super(card); + } + + @Override + public FacelessButcher copy() { + return new FacelessButcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/torment/FacelessButcher.java b/Mage.Sets/src/mage/sets/torment/FacelessButcher.java new file mode 100644 index 0000000000..f973e30265 --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/FacelessButcher.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.torment; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author anonymous + */ +public class FacelessButcher extends mage.sets.timeshifted.FacelessButcher { + + public FacelessButcher(UUID ownerId) { + super(ownerId); + this.cardNumber = 60; + this.expansionSetCode = "TOR"; + this.rarity = Rarity.COMMON; + } + + public FacelessButcher(final FacelessButcher card) { + super(card); + } + + @Override + public FacelessButcher copy() { + return new FacelessButcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/torment/ShadesForm.java b/Mage.Sets/src/mage/sets/torment/ShadesForm.java new file mode 100644 index 0000000000..9b4658a5ab --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/ShadesForm.java @@ -0,0 +1,88 @@ +/* + * 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.torment; + +import java.util.UUID; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.DiesAttachedTriggeredAbility; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Temba + */ +public class ShadesForm extends CardImpl { + + public ShadesForm(UUID ownerId) { + super(ownerId, 81, "Shade's Form", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); + this.expansionSetCode = "TOR"; + this.subtype.add("Aura"); + this.color.setBlack(true); + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + // Enchanted creature has "{B}: This creature gets +1/+1 until end of turn." + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostEnchantedEffect(1, 1, Duration.EndOfTurn), + new ColoredManaCost(ColoredManaSymbol.B))); + + + // When enchanted creature dies, return that card to the battlefield under your control. + this.addAbility(new DiesAttachedTriggeredAbility(new ReturnToBattlefieldUnderYourControlAttachedEffect(), "enchanted creature")); + + + } + + public ShadesForm(final ShadesForm card) { + super(card); + } + + @Override + public ShadesForm copy() { + return new ShadesForm(this); + } +} From 0311a654f2d5708fbe4adda5765a4f8a2d76886a Mon Sep 17 00:00:00 2001 From: Temba Date: Sun, 15 Mar 2015 21:58:55 +0200 Subject: [PATCH 02/17] Created 6 cards. (High probability for minor errors.) --- .../src/mage/sets/judgment/WormfangDrake.java | 9 +++------ .../src/mage/sets/onslaught/SymbioticBeast.java | 3 +-- .../mage/sets/timeshifted/FacelessButcher.java | 8 +------- Mage.Sets/src/mage/sets/torment/ShadesForm.java | 17 +++++++---------- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 4af3029152..874213c831 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -65,16 +65,14 @@ public class WormfangDrake extends CardImpl { this.subtype.add("Drake"); this.power = new MageInt(3); this.toughness = new MageInt(4); - this.color.setBlue(true); + // Flying this.addAbility(FlyingAbility.getInstance()); - // - - + //When Wormfang Drake enters the battlefield, sacriice it unless you exile a creature you control other than Wormfang Drake. Ability ability1; - ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ExileTargetCost( new TargetControlledPermanent(filter))), true); + ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ExileTargetCost(new TargetControlledPermanent(filter))), true); Target target = new TargetPermanent(filter); ability1.addTarget(target); this.addAbility(ability1); @@ -83,7 +81,6 @@ public class WormfangDrake extends CardImpl { Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); this.addAbility(ability2); - } public WormfangDrake(final WormfangDrake card) { diff --git a/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java b/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java index ca48b9ef13..58e034f7d9 100644 --- a/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java +++ b/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java @@ -49,8 +49,7 @@ public class SymbioticBeast extends CardImpl { this.subtype.add("Beast"); this.power = new MageInt(4); this.toughness = new MageInt(4); - this.color.setGreen(true); - + // When Symbiotic Beast dies, put four 1/1 green Insect creature tokens onto the battlefield. this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new InsectToken(), 4))); } diff --git a/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java index 9f8f1f6233..19d5ef00b6 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java +++ b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java @@ -65,11 +65,7 @@ public class FacelessButcher extends CardImpl { this.subtype.add("Horror"); this.power = new MageInt(2); this.toughness = new MageInt(3); - this.color.setBlack(true); - - - - + // When Faceless Butcher enters the battlefield, exile target creature other than Faceless Butcher. Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), false); @@ -77,8 +73,6 @@ public class FacelessButcher extends CardImpl { ability1.addTarget(target); this.addAbility(ability1); - - // When Faceless Butcher leaves the battlefield, return the exiled card to the battlefield under its owner's control. Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); this.addAbility(ability2); diff --git a/Mage.Sets/src/mage/sets/torment/ShadesForm.java b/Mage.Sets/src/mage/sets/torment/ShadesForm.java index 9b4658a5ab..3e1fc3ca13 100644 --- a/Mage.Sets/src/mage/sets/torment/ShadesForm.java +++ b/Mage.Sets/src/mage/sets/torment/ShadesForm.java @@ -56,27 +56,24 @@ public class ShadesForm extends CardImpl { super(ownerId, 81, "Shade's Form", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); this.expansionSetCode = "TOR"; this.subtype.add("Aura"); - this.color.setBlack(true); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - - this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); - // Enchanted creature has "{B}: This creature gets +1/+1 until end of turn." + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); //mikä on oikea outcome + tutki koodia Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BoostEnchantedEffect(1, 1, Duration.EndOfTurn), - new ColoredManaCost(ColoredManaSymbol.B))); + + // {B}: Enchanted creature gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.B))); - // When enchanted creature dies, return that card to the battlefield under your control. + // When enchanted creature dies, return that card to the battlefield under your control. this.addAbility(new DiesAttachedTriggeredAbility(new ReturnToBattlefieldUnderYourControlAttachedEffect(), "enchanted creature")); } + public ShadesForm(final ShadesForm card) { super(card); } From 480d8f788a5e0814b51e2b765abc990882595d47 Mon Sep 17 00:00:00 2001 From: Temba Date: Sun, 15 Mar 2015 23:10:46 +0200 Subject: [PATCH 03/17] Created 6 cards. (High probability for minor errors.) --- Mage.Sets/src/mage/sets/judgment/WormfangDrake.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 874213c831..5276f7eecd 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -41,7 +41,8 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; import mage.target.Target; import mage.target.TargetPermanent; import mage.target.common.TargetControlledPermanent; @@ -53,10 +54,10 @@ import mage.target.common.TargetControlledPermanent; public class WormfangDrake extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); - + static { - filter.add(new AnotherPredicate()); + filter.add(Predicates.not(new NamePredicate("Wormfang Drake"))); } public WormfangDrake(UUID ownerId) { super(ownerId, 57, "Wormfang Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); @@ -70,7 +71,7 @@ public class WormfangDrake extends CardImpl { this.addAbility(FlyingAbility.getInstance()); - //When Wormfang Drake enters the battlefield, sacriice it unless you exile a creature you control other than Wormfang Drake. + //When Wormfang Drake enters the battlefield, sacrifice it unless you exile a creature you control other than Wormfang Drake. Ability ability1; ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ExileTargetCost(new TargetControlledPermanent(filter))), true); Target target = new TargetPermanent(filter); From 970979ff0b97e1e0541b55099848c929cf2ed00e Mon Sep 17 00:00:00 2001 From: Temba Date: Tue, 17 Mar 2015 06:49:44 +0200 Subject: [PATCH 04/17] Created 6 cards. (High probability for minor errors.) --- Mage.Sets/src/mage/sets/judgment/WormfangDrake.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 5276f7eecd..9a4242b155 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -44,7 +44,6 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.Target; -import mage.target.TargetPermanent; import mage.target.common.TargetControlledPermanent; /** @@ -70,11 +69,10 @@ public class WormfangDrake extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - + //When Wormfang Drake enters the battlefield, sacrifice it unless you exile a creature you control other than Wormfang Drake. - Ability ability1; - ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ExileTargetCost(new TargetControlledPermanent(filter))), true); - Target target = new TargetPermanent(filter); + Ability ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect((new ExileTargetCost(new TargetControlledPermanent(filter)))), false); + Target target = new TargetControlledPermanent(1,1,filter,true); ability1.addTarget(target); this.addAbility(ability1); From 38d1ea649d2292ae014eb7fb176128ebbbe9059b Mon Sep 17 00:00:00 2001 From: Temba Date: Tue, 17 Mar 2015 19:09:51 +0200 Subject: [PATCH 05/17] Created 6 cards. (High probability for minor errors.) --- .../src/mage/sets/judgment/WormfangDrake.java | 127 ++++++++++++++++-- 1 file changed, 118 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 9a4242b155..2336776cfb 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -27,24 +27,36 @@ */ package mage.sets.judgment; +import java.util.ArrayList; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.StaticAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.costs.common.ExileTargetCost; +import mage.abilities.costs.CostImpl; import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicate; import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.NamePredicate; -import mage.target.Target; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.common.TargetControlledPermanent; +import mage.util.CardUtil; /** * @@ -71,14 +83,19 @@ public class WormfangDrake extends CardImpl { //When Wormfang Drake enters the battlefield, sacrifice it unless you exile a creature you control other than Wormfang Drake. - Ability ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect((new ExileTargetCost(new TargetControlledPermanent(filter)))), false); - Target target = new TargetControlledPermanent(1,1,filter,true); - ability1.addTarget(target); - this.addAbility(ability1); + - // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. - Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); - this.addAbility(ability2); + + //Ability ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect((new ExileTargetCost(new TargetControlledPermanent(filter)))), false); + //Target target = new TargetControlledPermanent(1,1,filter,true); + //ability1.addTarget(target); + //this.addAbility(ability1); + + // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. + + + //Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); + //this.addAbility(ability2); } @@ -90,4 +107,96 @@ public class WormfangDrake extends CardImpl { public WormfangDrake copy() { return new WormfangDrake(this); } +} + class WormfangDrakeAbility extends StaticAbility { + + protected CardType cardType; + protected String objectDescription; + + + + public WormfangDrakeAbility(Card card, CardType cardtypes) { + super(Zone.BATTLEFIELD, null); + + this.cardType = cardtypes; + + StringBuilder sb = new StringBuilder("another "); + ArrayList> cardtypesPredicates = new ArrayList<>(); + + cardtypesPredicates.add(new CardTypePredicate(cardType)); + + sb.append(cardType); + + + this.objectDescription = sb.toString(); + FilterControlledPermanent filter = new FilterControlledPermanent(objectDescription); + filter.add(Predicates.or(cardtypesPredicates)); + filter.add(new AnotherPredicate()); + + // When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control. + Ability ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new WormfangDrakeExileCost(filter, new StringBuilder(card.getName()).append(" WormfangDrakeed permanents").toString())),false); + ability1.setRuleVisible(false); + card.addAbility(ability1); + + // When this permanent leaves the battlefield, return the exiled card to the battlefield under its owner's control. + Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); + ability2.setRuleVisible(false); + card.addAbility(ability2); + } + + public WormfangDrakeAbility(final WormfangDrakeAbility ability) { + super(ability); + this.cardType = ability.cardType; + this.objectDescription = ability.objectDescription; + } + + @Override + public WormfangDrakeAbility copy() { + return new WormfangDrakeAbility(this); + } +} + +class WormfangDrakeExileCost extends CostImpl { + + private String exileZone = null; + + public WormfangDrakeExileCost(FilterControlledPermanent filter, String exileZone) { + this.addTarget(new TargetControlledPermanent(1,1,filter, true)); + this.text = "exile " + filter.getMessage() + " you control"; + this.exileZone = exileZone; + } + + public WormfangDrakeExileCost(WormfangDrakeExileCost cost) { + super(cost); + this.exileZone = cost.exileZone; + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player controller = game.getPlayer(controllerId); + MageObject sourceObject = ability.getSourceObject(game); + if (controller != null && sourceObject != null) { + if (targets.choose(Outcome.Exile, controllerId, sourceId, game)) { + UUID exileId = CardUtil.getObjectExileZoneId(game, sourceObject); + for (UUID targetId: targets.get(0).getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent == null) { + return false; + } + paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName() + " WormfangDrakeed permanents", sourceId, game, Zone.BATTLEFIELD); + } + } + } + return paid; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + return targets.canChoose(controllerId, game); + } + + @Override + public WormfangDrakeExileCost copy() { + return new WormfangDrakeExileCost(this); + } } From 18ba65e19de2910a63a80115fd0dea0a367ac108 Mon Sep 17 00:00:00 2001 From: Temba Date: Tue, 17 Mar 2015 19:28:11 +0200 Subject: [PATCH 06/17] Created 6 cards. (High probability for minor errors.) --- Mage.Sets/src/mage/sets/judgment/WormfangDrake.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 2336776cfb..63a8216ebd 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -84,7 +84,7 @@ public class WormfangDrake extends CardImpl { //When Wormfang Drake enters the battlefield, sacrifice it unless you exile a creature you control other than Wormfang Drake. - + this.addAbility(new WormfangDrakeAbility(this, CardType.CREATURE)); //Ability ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect((new ExileTargetCost(new TargetControlledPermanent(filter)))), false); //Target target = new TargetControlledPermanent(1,1,filter,true); @@ -133,7 +133,7 @@ public class WormfangDrake extends CardImpl { filter.add(Predicates.or(cardtypesPredicates)); filter.add(new AnotherPredicate()); - // When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control. + // When Wormfang Drake enters the battlefield, sacrifice it unless you exile another creature you control. Ability ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new WormfangDrakeExileCost(filter, new StringBuilder(card.getName()).append(" WormfangDrakeed permanents").toString())),false); ability1.setRuleVisible(false); card.addAbility(ability1); From 78c9a71b8722581924f6036801517c63efa4ac48 Mon Sep 17 00:00:00 2001 From: Temba Date: Tue, 17 Mar 2015 19:42:11 +0200 Subject: [PATCH 07/17] Created 6 cards. (High probability for minor errors.) --- Mage.Sets/src/mage/sets/judgment/WormfangDrake.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 63a8216ebd..211fde554a 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -183,7 +183,7 @@ class WormfangDrakeExileCost extends CostImpl { if (permanent == null) { return false; } - paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName() + " WormfangDrakeed permanents", sourceId, game, Zone.BATTLEFIELD); + paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName() + "exiled permanents", sourceId, game, Zone.BATTLEFIELD); } } } From cc4abc13308d83ae296a3b10b36d35102de029e9 Mon Sep 17 00:00:00 2001 From: Temba Date: Tue, 17 Mar 2015 19:50:02 +0200 Subject: [PATCH 08/17] Created 6 cards. (High probability for minor errors.) --- .../src/mage/sets/judgment/WormfangDrake.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 211fde554a..6bd4e73741 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -83,20 +83,10 @@ public class WormfangDrake extends CardImpl { //When Wormfang Drake enters the battlefield, sacrifice it unless you exile a creature you control other than Wormfang Drake. + // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. this.addAbility(new WormfangDrakeAbility(this, CardType.CREATURE)); - - //Ability ability1 = new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect((new ExileTargetCost(new TargetControlledPermanent(filter)))), false); - //Target target = new TargetControlledPermanent(1,1,filter,true); - //ability1.addTarget(target); - //this.addAbility(ability1); - - // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. - - - //Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); - //this.addAbility(ability2); - + } public WormfangDrake(final WormfangDrake card) { From d02a21a56ab2f7e773b1bbba6400ff0fd39a91cc Mon Sep 17 00:00:00 2001 From: Temba21 Date: Tue, 17 Mar 2015 20:14:50 +0200 Subject: [PATCH 09/17] Update PhantomTiger.java --- Mage.Sets/src/mage/sets/judgment/PhantomTiger.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/PhantomTiger.java b/Mage.Sets/src/mage/sets/judgment/PhantomTiger.java index 2cbb433bab..c69ca0936c 100644 --- a/Mage.Sets/src/mage/sets/judgment/PhantomTiger.java +++ b/Mage.Sets/src/mage/sets/judgment/PhantomTiger.java @@ -59,7 +59,6 @@ public class PhantomTiger extends CardImpl { this.subtype.add("Spirit"); this.power = new MageInt(1); this.toughness = new MageInt(0); - this.color.setGreen(true); // Phantom Tiger enters the battlefield with two +1/+1 counters on it. @@ -144,4 +143,4 @@ class PhantomTigerPreventionEffect extends PreventionEffectImpl { return false; } -} \ No newline at end of file +} From 44d22cfadc3354221af147ed23a7694958b62447 Mon Sep 17 00:00:00 2001 From: Temba21 Date: Tue, 17 Mar 2015 20:15:19 +0200 Subject: [PATCH 10/17] Update LowlandTracker.java --- Mage.Sets/src/mage/sets/legions/LowlandTracker.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/legions/LowlandTracker.java b/Mage.Sets/src/mage/sets/legions/LowlandTracker.java index 753a5549fb..86b5750c23 100644 --- a/Mage.Sets/src/mage/sets/legions/LowlandTracker.java +++ b/Mage.Sets/src/mage/sets/legions/LowlandTracker.java @@ -48,7 +48,6 @@ public class LowlandTracker extends CardImpl { this.subtype.add("Soldier"); this.power = new MageInt(2); this.toughness = new MageInt(2); - this.color.setWhite(true); // First strike this.addAbility(FirstStrikeAbility.getInstance()); From 3c61a0363b3f133465048350de2998082a11c844 Mon Sep 17 00:00:00 2001 From: Temba21 Date: Thu, 19 Mar 2015 07:47:28 +0200 Subject: [PATCH 11/17] Implemented more cards. (Legacy) --- .../mage/sets/archenemy/SkirkMarauder.java | 52 +++++++++ Mage.Sets/src/mage/sets/exodus/Slaughter.java | 75 +++++++++++++ .../src/mage/sets/judgment/WormfangDrake.java | 26 ++--- .../src/mage/sets/legions/SkirkMarauder.java | 71 ++++++++++++ .../sets/onslaught/BroodhatchNantuko.java | 104 ++++++++++++++++++ .../src/mage/sets/onslaught/DeathPulse.java | 72 ++++++++++++ .../mage/sets/onslaught/HauntedCadaver.java | 71 ++++++++++++ 7 files changed, 454 insertions(+), 17 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java create mode 100644 Mage.Sets/src/mage/sets/exodus/Slaughter.java create mode 100644 Mage.Sets/src/mage/sets/legions/SkirkMarauder.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/BroodhatchNantuko.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/DeathPulse.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/HauntedCadaver.java diff --git a/Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java b/Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java new file mode 100644 index 0000000000..cc4d5fe5c9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.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.archenemy; + +import java.util.UUID; + +/** + * + * @author anonymous + */ +public class SkirkMarauder extends mage.sets.legions.SkirkMarauder { + + public SkirkMarauder(UUID ownerId) { + super(ownerId); + this.cardNumber = 48; + this.expansionSetCode = "ARC"; + } + + public SkirkMarauder(final SkirkMarauder card) { + super(card); + } + + @Override + public SkirkMarauder copy() { + return new SkirkMarauder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/exodus/Slaughter.java b/Mage.Sets/src/mage/sets/exodus/Slaughter.java new file mode 100644 index 0000000000..cf13e2e2cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/Slaughter.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.exodus; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Temba21 + */ +public class Slaughter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public Slaughter(UUID ownerId) { + super(ownerId, 74, "Slaughter", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}{B}"); + this.expansionSetCode = "EXO"; + + // Buyback-Pay 4 life. + BuybackAbility buybackAbility = new BuybackAbility(new PayLifeCost(4)); + this.addAbility(buybackAbility); + // Destroy target nonblack creature. It can't be regenerated. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public Slaughter(final Slaughter card) { + super(card); + } + + @Override + public Slaughter copy() { + return new Slaughter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java index 6bd4e73741..e638961751 100644 --- a/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java +++ b/Mage.Sets/src/mage/sets/judgment/WormfangDrake.java @@ -60,16 +60,16 @@ import mage.util.CardUtil; /** * - * @author Temba + * @author Temba21 */ public class WormfangDrake extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); static { - filter.add(Predicates.not(new NamePredicate("Wormfang Drake"))); } + public WormfangDrake(UUID ownerId) { super(ownerId, 57, "Wormfang Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.expansionSetCode = "JUD"; @@ -80,13 +80,9 @@ public class WormfangDrake extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - - - //When Wormfang Drake enters the battlefield, sacrifice it unless you exile a creature you control other than Wormfang Drake. - // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. - + // When Wormfang Drake enters the battlefield, sacrifice it unless you exile a creature you control other than Wormfang Drake. + // When Wormfang Drake leaves the battlefield, return the exiled card to the battlefield under its owner's control. this.addAbility(new WormfangDrakeAbility(this, CardType.CREATURE)); - } public WormfangDrake(final WormfangDrake card) { @@ -98,13 +94,12 @@ public class WormfangDrake extends CardImpl { return new WormfangDrake(this); } } - class WormfangDrakeAbility extends StaticAbility { + +class WormfangDrakeAbility extends StaticAbility { protected CardType cardType; protected String objectDescription; - - public WormfangDrakeAbility(Card card, CardType cardtypes) { super(Zone.BATTLEFIELD, null); @@ -112,12 +107,9 @@ public class WormfangDrake extends CardImpl { StringBuilder sb = new StringBuilder("another "); ArrayList> cardtypesPredicates = new ArrayList<>(); - - cardtypesPredicates.add(new CardTypePredicate(cardType)); + cardtypesPredicates.add(new CardTypePredicate(cardType)); + sb.append(cardType); - sb.append(cardType); - - this.objectDescription = sb.toString(); FilterControlledPermanent filter = new FilterControlledPermanent(objectDescription); filter.add(Predicates.or(cardtypesPredicates)); @@ -173,7 +165,7 @@ class WormfangDrakeExileCost extends CostImpl { if (permanent == null) { return false; } - paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName() + "exiled permanents", sourceId, game, Zone.BATTLEFIELD); + paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getLogName() + " exiled permanents", sourceId, game, Zone.BATTLEFIELD); } } } diff --git a/Mage.Sets/src/mage/sets/legions/SkirkMarauder.java b/Mage.Sets/src/mage/sets/legions/SkirkMarauder.java new file mode 100644 index 0000000000..a3908fe018 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/SkirkMarauder.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author Temba21 + */ +public class SkirkMarauder extends CardImpl { + + public SkirkMarauder(UUID ownerId) { + super(ownerId, 113, "Skirk Marauder", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goblin"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Morph {2}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{R}"))); + // When Skirk Marauder is turned face up, it deals 2 damage to target creature or player. + Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DamageTargetEffect(2)); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public SkirkMarauder(final SkirkMarauder card) { + super(card); + } + + @Override + public SkirkMarauder copy() { + return new SkirkMarauder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/BroodhatchNantuko.java b/Mage.Sets/src/mage/sets/onslaught/BroodhatchNantuko.java new file mode 100644 index 0000000000..2c49ec6033 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/BroodhatchNantuko.java @@ -0,0 +1,104 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealtDamageToSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.MorphAbility; +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.token.InsectToken; +import mage.players.Player; + +/** + * + * @author Temba21 + */ +public class BroodhatchNantuko extends CardImpl { + + public BroodhatchNantuko(UUID ownerId) { + super(ownerId, 250, "Broodhatch Nantuko", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Insect"); + this.subtype.add("Druid"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Broodhatch Nantuko is dealt damage, you may put that many 1/1 green Insect creature tokens onto the battlefield. + this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BroodhatchNantukoDealDamageEffect(), true)); + // Morph {2}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{G}"))); + } + + public BroodhatchNantuko(final BroodhatchNantuko card) { + super(card); + } + + @Override + public BroodhatchNantuko copy() { + return new BroodhatchNantuko(this); + } +} + +class BroodhatchNantukoDealDamageEffect extends OneShotEffect { + + public BroodhatchNantukoDealDamageEffect() { + super(Outcome.Damage); + this.staticText = "put that many 1/1 green Insect creature tokens onto the battlefield"; + } + + public BroodhatchNantukoDealDamageEffect(final BroodhatchNantukoDealDamageEffect effect) { + super(effect); + } + + @Override + public BroodhatchNantukoDealDamageEffect copy() { + return new BroodhatchNantukoDealDamageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + int amount = (Integer) getValue("damage"); + if (amount > 0) { + return new CreateTokenEffect(new InsectToken(), amount).apply(game, source); + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/onslaught/DeathPulse.java b/Mage.Sets/src/mage/sets/onslaught/DeathPulse.java new file mode 100644 index 0000000000..be0c44a8f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/DeathPulse.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.onslaught; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CycleTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Temba21 + */ +public class DeathPulse extends CardImpl { + + public DeathPulse(UUID ownerId) { + super(ownerId, 137, "Death Pulse", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{B}{B}"); + this.expansionSetCode = "ONS"; + + // Target creature gets -4/-4 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(-4, -4, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Cycling {1}{B}{B} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{B}{B}"))); + // When you cycle Death Pulse, you may have target creature get -1/-1 until end of turn. + Ability ability = new CycleTriggeredAbility(new BoostTargetEffect(-1, -1, Duration.EndOfTurn)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public DeathPulse(final DeathPulse card) { + super(card); + } + + @Override + public DeathPulse copy() { + return new DeathPulse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/HauntedCadaver.java b/Mage.Sets/src/mage/sets/onslaught/HauntedCadaver.java new file mode 100644 index 0000000000..f6345f08c0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/HauntedCadaver.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author Temba21 + */ +public class HauntedCadaver extends CardImpl { + + public HauntedCadaver(UUID ownerId) { + super(ownerId, 154, "Haunted Cadaver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Haunted Cadaver deals combat damage to a player, you may sacrifice it. If you do, that player discards three cards. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeSourceEffect(), true, true); + ability.addEffect( new DiscardTargetEffect(3)); + this.addAbility(ability); + // Morph {1}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{B}"))); + } + + public HauntedCadaver(final HauntedCadaver card) { + super(card); + } + + @Override + public HauntedCadaver copy() { + return new HauntedCadaver(this); + } +} From d02b323dcadd54e9fec3aeae62866e5b08aa6643 Mon Sep 17 00:00:00 2001 From: Temba21 Date: Thu, 19 Mar 2015 18:45:56 +0200 Subject: [PATCH 12/17] Update SkirkMarauder.java --- Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java b/Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java index cc4d5fe5c9..4d5ea69423 100644 --- a/Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java +++ b/Mage.Sets/src/mage/sets/archenemy/SkirkMarauder.java @@ -31,7 +31,7 @@ import java.util.UUID; /** * - * @author anonymous + * @author Temba21 */ public class SkirkMarauder extends mage.sets.legions.SkirkMarauder { From 2c59e1eb92d5dc0c229e085e5b43c7b070d34d9a Mon Sep 17 00:00:00 2001 From: Temba21 Date: Thu, 19 Mar 2015 18:47:56 +0200 Subject: [PATCH 13/17] Update LowlandTracker.java --- Mage.Sets/src/mage/sets/legions/LowlandTracker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/legions/LowlandTracker.java b/Mage.Sets/src/mage/sets/legions/LowlandTracker.java index 86b5750c23..c7ff0cbfc7 100644 --- a/Mage.Sets/src/mage/sets/legions/LowlandTracker.java +++ b/Mage.Sets/src/mage/sets/legions/LowlandTracker.java @@ -37,7 +37,7 @@ import mage.constants.Rarity; /** * - * @author Temba + * @author Temba21 */ public class LowlandTracker extends CardImpl { From f041fb07e5f14e531b1f70e5795c824917dcf993 Mon Sep 17 00:00:00 2001 From: Temba21 Date: Thu, 19 Mar 2015 18:49:24 +0200 Subject: [PATCH 14/17] Update SymbioticBeast.java --- Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java b/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java index 58e034f7d9..262549f1c3 100644 --- a/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java +++ b/Mage.Sets/src/mage/sets/onslaught/SymbioticBeast.java @@ -38,7 +38,7 @@ import mage.game.permanent.token.InsectToken; /** * - * @author Temba + * @author Temba21 */ public class SymbioticBeast extends CardImpl { From 3b7193aa06bcf5612bcdba3c9b0a86851d26846e Mon Sep 17 00:00:00 2001 From: Temba21 Date: Thu, 19 Mar 2015 18:54:10 +0200 Subject: [PATCH 15/17] Update ShadesForm.java --- Mage.Sets/src/mage/sets/torment/ShadesForm.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/torment/ShadesForm.java b/Mage.Sets/src/mage/sets/torment/ShadesForm.java index 3e1fc3ca13..51125d732e 100644 --- a/Mage.Sets/src/mage/sets/torment/ShadesForm.java +++ b/Mage.Sets/src/mage/sets/torment/ShadesForm.java @@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; /** * - * @author Temba + * @author Temba21 */ public class ShadesForm extends CardImpl { @@ -58,8 +58,8 @@ public class ShadesForm extends CardImpl { this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); //mikä on oikea outcome + tutki koodia + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); From 9fac75e66b8e624408b70784ddfead463d1a6e0c Mon Sep 17 00:00:00 2001 From: Temba21 Date: Thu, 19 Mar 2015 18:54:37 +0200 Subject: [PATCH 16/17] Update FacelessButcher.java --- Mage.Sets/src/mage/sets/torment/FacelessButcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/torment/FacelessButcher.java b/Mage.Sets/src/mage/sets/torment/FacelessButcher.java index f973e30265..9b3d6c49fc 100644 --- a/Mage.Sets/src/mage/sets/torment/FacelessButcher.java +++ b/Mage.Sets/src/mage/sets/torment/FacelessButcher.java @@ -32,7 +32,7 @@ import mage.constants.Rarity; /** * - * @author anonymous + * @author Temba21 */ public class FacelessButcher extends mage.sets.timeshifted.FacelessButcher { From 8e070e24259ef6d2ca986cc2450a94604efde4eb Mon Sep 17 00:00:00 2001 From: Temba21 Date: Thu, 19 Mar 2015 18:55:03 +0200 Subject: [PATCH 17/17] Update FacelessButcher.java --- Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java index 19d5ef00b6..3fc17bbe5a 100644 --- a/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java +++ b/Mage.Sets/src/mage/sets/timeshifted/FacelessButcher.java @@ -46,7 +46,7 @@ import mage.target.TargetPermanent; /** * - * @author Temba + * @author Temba21 */ public class FacelessButcher extends CardImpl { @@ -70,7 +70,7 @@ public class FacelessButcher extends CardImpl { // When Faceless Butcher enters the battlefield, exile target creature other than Faceless Butcher. Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), false); Target target = new TargetPermanent(filter); - ability1.addTarget(target); + ability1.addTarget(target); this.addAbility(ability1); // When Faceless Butcher leaves the battlefield, return the exiled card to the battlefield under its owner's control.