diff --git a/Mage.Sets/src/mage/cards/s/SentryBot.java b/Mage.Sets/src/mage/cards/s/SentryBot.java new file mode 100644 index 00000000000..2eb00c49f49 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SentryBot.java @@ -0,0 +1,72 @@ +package mage.cards.s; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.PayEnergyCost; +import mage.abilities.dynamicvalue.common.CreaturesAttackingYouCount; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.StaticFilters; + +/** + * @author Cguy7777 + */ +public final class SentryBot extends CardImpl { + + public SentryBot(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.ROBOT); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // This spell costs {1} less to cast for each creature attacking you. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, + new SpellCostReductionSourceEffect(CreaturesAttackingYouCount.instance) + .setText("this spell costs {1} less to cast for each creature attacking you")) + .addHint(CreaturesAttackingYouCount.getHint())); + + // When Sentry Bot enters the battlefield, you get {E} for each creature attacking you. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new GetEnergyCountersControllerEffect(CreaturesAttackingYouCount.instance) + .setText("you get {E} for each creature attacking you")) + .addHint(CreaturesAttackingYouCount.getHint())); + + // At the beginning of combat on your turn, you may pay {E}{E}{E}. If you do, put a +1/+1 counter on each creature you control. + this.addAbility(new BeginningOfCombatTriggeredAbility( + new DoIfCostPaid( + new AddCountersAllEffect( + CounterType.P1P1.createInstance(), + StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED), + new PayEnergyCost(3)), + TargetController.YOU, + false)); + } + + private SentryBot(final SentryBot card) { + super(card); + } + + @Override + public SentryBot copy() { + return new SentryBot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index 8322b1a815e..a1d9e23bef4 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -242,6 +242,10 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Scavenger Grounds", 287, Rarity.RARE, mage.cards.s.ScavengerGrounds.class)); cards.add(new SetCardInfo("Secure the Wastes", 171, Rarity.RARE, mage.cards.s.SecureTheWastes.class)); cards.add(new SetCardInfo("Securitron Squadron", 23, Rarity.RARE, mage.cards.s.SecuritronSquadron.class)); + cards.add(new SetCardInfo("Sentry Bot", 24, Rarity.RARE, mage.cards.s.SentryBot.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sentry Bot", 371, Rarity.RARE, mage.cards.s.SentryBot.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sentry Bot", 552, Rarity.RARE, mage.cards.s.SentryBot.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sentry Bot", 899, Rarity.RARE, mage.cards.s.SentryBot.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Shadowblood Ridge", 288, Rarity.RARE, mage.cards.s.ShadowbloodRidge.class)); cards.add(new SetCardInfo("Sheltered Thicket", 289, Rarity.RARE, mage.cards.s.ShelteredThicket.class)); cards.add(new SetCardInfo("Sierra, Nuka's Biggest Fan", 25, Rarity.RARE, mage.cards.s.SierraNukasBiggestFan.class, NON_FULL_USE_VARIOUS));