From 9d99a04fd6da6bcac58f2ac449de79cc03f2a889 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 20 Dec 2018 18:56:43 -0500 Subject: [PATCH] Implemented Gruul Spellbreaker --- .../src/mage/cards/g/GruulSpellbreaker.java | 68 +++++++++++++++++++ .../src/mage/sets/RavnicaAllegiance.java | 1 + 2 files changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java diff --git a/Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java b/Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java new file mode 100644 index 0000000000..399e17078b --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GruulSpellbreaker.java @@ -0,0 +1,68 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilityControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.RiotAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GruulSpellbreaker extends CardImpl { + + public GruulSpellbreaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + + this.subtype.add(SubType.OGRE); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Riot + this.addAbility(new RiotAbility()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // As long as it's your turn, you and Gruul Spellbreaker have hexproof. + Ability ability = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilityControllerEffect( + HexproofAbility.getInstance(), + Duration.WhileOnBattlefield + ), MyTurnCondition.instance, "As long as it's your turn, you and" + ) + ); + ability.addEffect(new ConditionalContinuousEffect( + new GainAbilitySourceEffect( + HexproofAbility.getInstance(), + Duration.WhileOnBattlefield + ), MyTurnCondition.instance, "{this} have hexproof." + )); + this.addAbility(ability); + } + + public GruulSpellbreaker(final GruulSpellbreaker card) { + super(card); + } + + @Override + public GruulSpellbreaker copy() { + return new GruulSpellbreaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 8b65d36b12..c0ab892ac5 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -37,6 +37,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Frenzied Arynx", 173, Rarity.COMMON, mage.cards.f.FrenziedArynx.class)); cards.add(new SetCardInfo("Gate Colossus", 232, Rarity.UNCOMMON, mage.cards.g.GateColossus.class)); cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class)); + cards.add(new SetCardInfo("Gruul Spellbreaker", 179, Rarity.RARE, mage.cards.g.GruulSpellbreaker.class)); cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class)); cards.add(new SetCardInfo("Light Up the Stage", 107, Rarity.UNCOMMON, mage.cards.l.LightUpTheStage.class)); cards.add(new SetCardInfo("Mortify", 192, Rarity.UNCOMMON, mage.cards.m.Mortify.class));