diff --git a/Mage.Sets/src/mage/cards/s/ShellShield.java b/Mage.Sets/src/mage/cards/s/ShellShield.java new file mode 100644 index 0000000000..2c83fcd9d9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShellShield.java @@ -0,0 +1,72 @@ +package mage.cards.s; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * @author TheElk801 + */ +public final class ShellShield extends CardImpl { + + public ShellShield(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Kicker {1} + this.addAbility(new KickerAbility(new ManaCostsImpl<>("{1}"))); + + // Target creature you control gets +0/+3 until end of turn. If this spell was kicked, that creature also gains hexproof until end of turn. + this.getSpellAbility().addEffect(new ShellShieldEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + } + + private ShellShield(final ShellShield card) { + super(card); + } + + @Override + public ShellShield copy() { + return new ShellShield(this); + } +} + +class ShellShieldEffect extends OneShotEffect { + + ShellShieldEffect() { + super(Outcome.Benefit); + staticText = "Target creature you control gets +0/+3 until end of turn. " + + "If this spell was kicked, that creature also gains hexproof until end of turn."; + } + + private ShellShieldEffect(final ShellShieldEffect effect) { + super(effect); + } + + @Override + public ShellShieldEffect copy() { + return new ShellShieldEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + game.addEffect(new BoostTargetEffect(0, 3, Duration.EndOfTurn), source); + if (KickedCondition.instance.apply(game, source)) { + game.addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn), source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index ee3f43ae0f..7b059a8562 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -33,5 +33,6 @@ public final class ZendikarRising extends ExpansionSet { cards.add(new SetCardInfo("Murasa Rootgrazer", 229, Rarity.UNCOMMON, mage.cards.m.MurasaRootgrazer.class)); cards.add(new SetCardInfo("Nahiri, Heir of the Ancients", 230, Rarity.MYTHIC, mage.cards.n.NahiriHeirOfTheAncients.class)); cards.add(new SetCardInfo("Ruin Crab", 75, Rarity.UNCOMMON, mage.cards.r.RuinCrab.class)); + cards.add(new SetCardInfo("Shell Shield", 79, Rarity.COMMON, mage.cards.s.ShellShield.class)); } }