From cab62e607a3709f9751b26657b0dc7a89c02eb8b Mon Sep 17 00:00:00 2001 From: ciaccona007 Date: Fri, 28 Jul 2017 01:41:54 -0400 Subject: [PATCH 1/4] Implement Rimescale Dragon --- .../src/mage/cards/r/RimescaleDragon.java | 95 +++++++++++++++++++ Mage.Sets/src/mage/sets/Coldsnap.java | 1 + 2 files changed, 96 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RimescaleDragon.java diff --git a/Mage.Sets/src/mage/cards/r/RimescaleDragon.java b/Mage.Sets/src/mage/cards/r/RimescaleDragon.java new file mode 100644 index 00000000000..c39011b840a --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RimescaleDragon.java @@ -0,0 +1,95 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author ciaccona007 + */ +public class RimescaleDragon extends CardImpl { + private static final FilterPermanent FILTER = new FilterCreaturePermanent(); + + static { + FILTER.add(new CounterPredicate(CounterType.ICE)); + FILTER.setMessage("Creatures with ice counters on them"); + } + + public RimescaleDragon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + + addSuperType(SuperType.SNOW); + this.subtype.add(SubType.DRAGON); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {2}{snow}: Tap target creature and put an ice counter on it. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{2}{S}")); + Effect countersEffect = new AddCountersTargetEffect(CounterType.ICE.createInstance(1)); + countersEffect.setText(" and put an ice counter on it"); + ability.addEffect(countersEffect); + ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent())); + this.addAbility(ability); + + // Creatures with ice counters on them don't untap during their controllers' untap steps. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, FILTER))); + } + + public RimescaleDragon(final RimescaleDragon card) { + super(card); + } + + @Override + public RimescaleDragon copy() { + return new RimescaleDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index a778326a04b..cca56890ca4 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -136,6 +136,7 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Resize", 117, Rarity.UNCOMMON, mage.cards.r.Resize.class)); cards.add(new SetCardInfo("Rimebound Dead", 69, Rarity.COMMON, mage.cards.r.RimeboundDead.class)); cards.add(new SetCardInfo("Rime Transfusion", 68, Rarity.UNCOMMON, mage.cards.r.RimeTransfusion.class)); + cards.add(new SetCardInfo("Rimescale Dragon", 95, Rarity.RARE, mage.cards.r.RimescaleDragon.class)); cards.add(new SetCardInfo("Rimewind Cryomancer", 43, Rarity.UNCOMMON, mage.cards.r.RimewindCryomancer.class)); cards.add(new SetCardInfo("Rimewind Taskmage", 44, Rarity.COMMON, mage.cards.r.RimewindTaskmage.class)); cards.add(new SetCardInfo("Rite of Flame", 96, Rarity.COMMON, mage.cards.r.RiteOfFlame.class)); From 361c705dc15f5f3dca06a047e370979f15cd1fea Mon Sep 17 00:00:00 2001 From: ciaccona007 Date: Fri, 28 Jul 2017 01:42:21 -0400 Subject: [PATCH 2/4] Remove import from Rimescale Dragon --- Mage.Sets/src/mage/cards/r/RimescaleDragon.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/r/RimescaleDragon.java b/Mage.Sets/src/mage/cards/r/RimescaleDragon.java index c39011b840a..c901fe55ea0 100644 --- a/Mage.Sets/src/mage/cards/r/RimescaleDragon.java +++ b/Mage.Sets/src/mage/cards/r/RimescaleDragon.java @@ -42,7 +42,6 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.counters.CounterType; import mage.filter.FilterPermanent; -import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.CounterPredicate; import mage.target.common.TargetCreaturePermanent; From 71107a36d54b6d24e0aed5f9606f95b3e4ed9399 Mon Sep 17 00:00:00 2001 From: ciaccona007 Date: Fri, 28 Jul 2017 02:30:24 -0400 Subject: [PATCH 3/4] Implement Brand of Ill Omen --- .../src/mage/cards/b/BrandOfIllOmen.java | 131 ++++++++++++++++++ Mage.Sets/src/mage/sets/IceAge.java | 1 + 2 files changed, 132 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BrandOfIllOmen.java diff --git a/Mage.Sets/src/mage/cards/b/BrandOfIllOmen.java b/Mage.Sets/src/mage/cards/b/BrandOfIllOmen.java new file mode 100644 index 00000000000..ff50756639b --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BrandOfIllOmen.java @@ -0,0 +1,131 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.b; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * + * @author ciaccona007 + */ +public class BrandOfIllOmen extends CardImpl { + + public BrandOfIllOmen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); + + this.subtype.add(SubType.AURA); + + // 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); + + // Cumulative upkeep {R} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{R}"))); + + // Enchanted creature's controller can't cast creature spells. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BrandOfIllOmenEffect())); + + } + + public BrandOfIllOmen(final BrandOfIllOmen card) { + super(card); + } + + @Override + public BrandOfIllOmen copy() { + return new BrandOfIllOmen(this); + } +} + +class BrandOfIllOmenEffect extends ContinuousRuleModifyingEffectImpl { + + public BrandOfIllOmenEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "Enchanted creature's controller can't cast creature spells"; + } + + public BrandOfIllOmenEffect(final BrandOfIllOmenEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public BrandOfIllOmenEffect copy() { + return new BrandOfIllOmenEffect(this); + } + + @Override + public String getInfoMessage(Ability source, GameEvent event, Game game) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + return "You can't cast creature spells (" + mageObject.getLogName() + " on the battlefield)."; + } + return null; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.CAST_SPELL; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent brand = game.getPermanent(source.getSourceId()); + if (brand != null && brand.getAttachedTo() != null) { + UUID enchantedController = game.getPermanent(brand.getAttachedTo()).getControllerId(); + if(enchantedController == event.getPlayerId() && game.getObject(event.getSourceId()).isCreature()) { + return true; + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index 8ac03f6308e..ae7536483e1 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -73,6 +73,7 @@ public class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Blinking Spirit", 232, Rarity.RARE, mage.cards.b.BlinkingSpirit.class)); cards.add(new SetCardInfo("Blue Scarab", 233, Rarity.UNCOMMON, mage.cards.b.BlueScarab.class)); cards.add(new SetCardInfo("Brainstorm", 61, Rarity.COMMON, mage.cards.b.Brainstorm.class)); + cards.add(new SetCardInfo("Brand of Ill Omen", 177, Rarity.RARE, mage.cards.b.BrandOfIllOmen.class)); cards.add(new SetCardInfo("Brushland", 327, Rarity.RARE, mage.cards.b.Brushland.class)); cards.add(new SetCardInfo("Burnt Offering", 4, Rarity.COMMON, mage.cards.b.BurntOffering.class)); cards.add(new SetCardInfo("Caribou Range", 235, Rarity.RARE, mage.cards.c.CaribouRange.class)); From 112c1f7fd42c9e9c52279617c8de6af014fcabef Mon Sep 17 00:00:00 2001 From: ciaccona007 Date: Fri, 28 Jul 2017 11:24:11 -0400 Subject: [PATCH 4/4] Remove Rimescale Dragon --- .../src/mage/cards/r/RimescaleDragon.java | 94 ------------------- Mage.Sets/src/mage/sets/Coldsnap.java | 1 - 2 files changed, 95 deletions(-) delete mode 100644 Mage.Sets/src/mage/cards/r/RimescaleDragon.java diff --git a/Mage.Sets/src/mage/cards/r/RimescaleDragon.java b/Mage.Sets/src/mage/cards/r/RimescaleDragon.java deleted file mode 100644 index c901fe55ea0..00000000000 --- a/Mage.Sets/src/mage/cards/r/RimescaleDragon.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.cards.r; - -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; -import mage.abilities.effects.common.TapTargetEffect; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.*; -import mage.counters.CounterType; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.CounterPredicate; -import mage.target.common.TargetCreaturePermanent; - -import java.util.UUID; - -/** - * - * @author ciaccona007 - */ -public class RimescaleDragon extends CardImpl { - private static final FilterPermanent FILTER = new FilterCreaturePermanent(); - - static { - FILTER.add(new CounterPredicate(CounterType.ICE)); - FILTER.setMessage("Creatures with ice counters on them"); - } - - public RimescaleDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); - - addSuperType(SuperType.SNOW); - this.subtype.add(SubType.DRAGON); - this.power = new MageInt(5); - this.toughness = new MageInt(5); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // {2}{snow}: Tap target creature and put an ice counter on it. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl("{2}{S}")); - Effect countersEffect = new AddCountersTargetEffect(CounterType.ICE.createInstance(1)); - countersEffect.setText(" and put an ice counter on it"); - ability.addEffect(countersEffect); - ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent())); - this.addAbility(ability); - - // Creatures with ice counters on them don't untap during their controllers' untap steps. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, FILTER))); - } - - public RimescaleDragon(final RimescaleDragon card) { - super(card); - } - - @Override - public RimescaleDragon copy() { - return new RimescaleDragon(this); - } -} diff --git a/Mage.Sets/src/mage/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index cca56890ca4..a778326a04b 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -136,7 +136,6 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Resize", 117, Rarity.UNCOMMON, mage.cards.r.Resize.class)); cards.add(new SetCardInfo("Rimebound Dead", 69, Rarity.COMMON, mage.cards.r.RimeboundDead.class)); cards.add(new SetCardInfo("Rime Transfusion", 68, Rarity.UNCOMMON, mage.cards.r.RimeTransfusion.class)); - cards.add(new SetCardInfo("Rimescale Dragon", 95, Rarity.RARE, mage.cards.r.RimescaleDragon.class)); cards.add(new SetCardInfo("Rimewind Cryomancer", 43, Rarity.UNCOMMON, mage.cards.r.RimewindCryomancer.class)); cards.add(new SetCardInfo("Rimewind Taskmage", 44, Rarity.COMMON, mage.cards.r.RimewindTaskmage.class)); cards.add(new SetCardInfo("Rite of Flame", 96, Rarity.COMMON, mage.cards.r.RiteOfFlame.class));