Implemented Storm the Citadel

This commit is contained in:
Evan Kranzler 2019-04-16 19:20:03 -04:00
parent dffff3b357
commit 01b3e111f7
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,65 @@
package mage.cards.s;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class StormTheCitadel extends CardImpl {
private static final FilterPermanent filter
= new FilterPermanent("artifact or enchantment defending player controls");
static {
filter.add(Predicates.or(
new CardTypePredicate(CardType.ARTIFACT),
new CardTypePredicate(CardType.ENCHANTMENT)
));
filter.add(DefendingPlayerControlsPredicate.instance);
}
public StormTheCitadel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
// Until end of turn, creatures you control get +2/+2 and gain "Whenever this creature deals combat damage to a creature or planeswalker, destroy target artifact or enchantment defending player controls."
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
new DestroyTargetEffect(), false
).setOrPlaneswalker(true);
ability.addTarget(new TargetPermanent(filter));
this.getSpellAbility().addEffect(new BoostControlledEffect(
2, 2, Duration.EndOfTurn
).setText("Until end of turn, creatures you control get +2/+2"));
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
ability, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE
).setText("and gain \"Whenever this creature deals combat damage to a creature or planeswalker, " +
"destroy target artifact or enchantment defending player controls.\""
));
}
private StormTheCitadel(final StormTheCitadel card) {
super(card);
}
@Override
public StormTheCitadel copy() {
return new StormTheCitadel(this);
}
}

View file

@ -206,6 +206,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Spellkeeper Weird", 69, Rarity.COMMON, mage.cards.s.SpellkeeperWeird.class)); cards.add(new SetCardInfo("Spellkeeper Weird", 69, Rarity.COMMON, mage.cards.s.SpellkeeperWeird.class));
cards.add(new SetCardInfo("Steady Aim", 177, Rarity.COMMON, mage.cards.s.SteadyAim.class)); cards.add(new SetCardInfo("Steady Aim", 177, Rarity.COMMON, mage.cards.s.SteadyAim.class));
cards.add(new SetCardInfo("Stealth Mission", 70, Rarity.COMMON, mage.cards.s.StealthMission.class)); cards.add(new SetCardInfo("Stealth Mission", 70, Rarity.COMMON, mage.cards.s.StealthMission.class));
cards.add(new SetCardInfo("Storm the Citadel", 178, Rarity.UNCOMMON, mage.cards.s.StormTheCitadel.class));
cards.add(new SetCardInfo("Storrev, Devkarin Lich", 219, Rarity.RARE, mage.cards.s.StorrevDevkarinLich.class)); cards.add(new SetCardInfo("Storrev, Devkarin Lich", 219, Rarity.RARE, mage.cards.s.StorrevDevkarinLich.class));
cards.add(new SetCardInfo("Sunblade Angel", 31, Rarity.UNCOMMON, mage.cards.s.SunbladeAngel.class)); cards.add(new SetCardInfo("Sunblade Angel", 31, Rarity.UNCOMMON, mage.cards.s.SunbladeAngel.class));
cards.add(new SetCardInfo("Swamp", 256, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swamp", 256, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));