diff --git a/Mage.Sets/src/mage/cards/c/ChamberSentry.java b/Mage.Sets/src/mage/cards/c/ChamberSentry.java new file mode 100644 index 00000000000..aa5ac14be9b --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChamberSentry.java @@ -0,0 +1,57 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.abilities.keyword.SunburstAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * + * @author jmharmon + */ + +public final class ChamberSentry extends CardImpl { + + public ChamberSentry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT,CardType.CREATURE}, "{X}"); + + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Chamber Sentry enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. + this.addAbility(new SunburstAbility(this)); + + // {X}, {T}, Remove X +1/+1 counters from Chamber Sentry: It deals X damage to any target. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetAnyTarget()); + this.addAbility(ability); + + // {W}{U}{B}{R}{G}: Return Chamber Sentry from your graveyard to your hand. + this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{W}{U}{B}{R}{G}"))); + } + + public ChamberSentry(final ChamberSentry card) { + super(card); + } + + @Override + public ChamberSentry copy() { + return new ChamberSentry(this); + } +}