@Override public PreventDamageToControllerEffect copy() { return new PreventDamageToControllerEffect(this); }
public SpiritOfResistance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); // As long as you control a permanent of each color, prevent all damage that would be dealt to you. Effect effect = new ConditionalReplacementEffect( new PreventDamageToControllerEffect(Duration.WhileOnBattlefield), SpiritOfResistanceCondition.instance); effect.setText("As long as you control a permanent of each color, prevent all damage that would be dealt to you."); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public ShieldOfTheAges(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // {2}: Prevent the next 1 damage that would be dealt to you this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, 1), new GenericManaCost(2))); }
public Conservator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {3}, {tap}: Prevent the next 2 damage that would be dealt to you this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, 2), new GenericManaCost(3)); ability.addTarget(new TargetPlayer()); ability.addCost(new TapSourceCost()); this.addAbility(ability); }
public DecoratedGriffin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); this.subtype.add(SubType.GRIFFIN); this.power = new MageInt(2); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // {1}{W}: Prevent the next 1 combat damage that would be dealt to you this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, true, true, 1), new ManaCostsImpl("{1}{W}"))); }
public ReinforcedBulwark(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); // Defender this.addAbility(DefenderAbility.getInstance()); // {tap}: Prevent the next 1 damage that would be dealt to you this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, 1), new TapSourceCost())); }
public PalliationAccord(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{U}"); // Whenever a creature an opponent controls becomes tapped, put a shield counter on Palliation Accord. this.addAbility(new BecomesTappedTriggeredAbility(new AddCountersSourceEffect(CounterType.SHIELD.createInstance()), false, filter)); // Remove a shield counter from Palliation Accord: Prevent the next 1 damage that would be dealt to you this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, 1), new RemoveCountersSourceCost(CounterType.SHIELD.createInstance()))); }
public FestivalOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}"); // Prevent the next X damage that would be dealt to you this turn. this.getSpellAbility().addEffect(new PreventDamageToControllerEffect(Duration.EndOfTurn, false, true, ManacostVariableValue.instance)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); }
public SelflessSquire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); // Flash this.addAbility(FlashAbility.getInstance()); // When Selfless Squire enters the battlefield, prevent all damage that would be dealt to you this turn. this.addAbility(new EntersBattlefieldTriggeredAbility(new PreventDamageToControllerEffect(Duration.EndOfTurn), false)); // Whenever damage that would be dealt to you is prevented, put that many +1/+1 counters on Selfless Squire. this.addAbility(new SelflessSquireTriggeredAbility()); }
public ThoughtLash(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); // Cumulative upkeep - Exile the top card of your library. this.addAbility(new CumulativeUpkeepAbility(new ExileFromTopOfLibraryCost(1))); // When a player doesn't pay Thought Lash's cumulative upkeep, that player exiles all cards from their library. this.addAbility(new ThoughtLashTriggeredAbility()); // Exile the top card of your library: Prevent the next 1 damage that would be dealt to you this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, 1), new ExileFromTopOfLibraryCost(1))); }
public DruidsDeliverance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); // Prevent all combat damage that would be dealt to you this turn. Populate. // (Create a token that's a copy of a creature token you control.) this.getSpellAbility().addEffect(new PreventDamageToControllerEffect(Duration.EndOfTurn, true, false, Integer.MAX_VALUE)); this.getSpellAbility().addEffect(new PopulateEffect()); }
public RiotControl(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); // Gain 1 life for each creature your opponents control. Prevent all damage that would be dealt to you this turn. this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addEffect(new PreventDamageToControllerEffect(Duration.EndOfTurn)); }
public GlacialChasm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},""); // Cumulative upkeep-Pay 2 life. this.addAbility(new CumulativeUpkeepAbility(new PayLifeCost(2))); // When Glacial Chasm enters the battlefield, sacrifice a land. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_LAND, 1, ""))); // Creatures you control can't attack. FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); filter.add(new ControllerPredicate(TargetController.YOU)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackAnyPlayerAllEffect(Duration.WhileOnBattlefield, filter))); // Prevent all damage that would be dealt to you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.WhileOnBattlefield))); }
public SolitaryConfinement(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); // At the beginning of your upkeep, sacrifice Solitary Confinement unless you discard a card. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand())), TargetController.YOU, false)); // Skip your draw step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); // You have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(ShroudAbility.getInstance()))); // Prevent all damage that would be dealt to you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.WhileOnBattlefield))); }
public EsperBattlemage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(2); // {W}, {tap}: Prevent the next 2 damage that would be dealt to you this turn. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, 2), new ColoredManaCost(ColoredManaSymbol.W)); ability.addCost(new TapSourceCost()); this.addAbility(ability); // {B}, {tap}: Target creature gets -1/-1 until end of turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.B)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public SecurityBlockade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); this.subtype.add(SubType.AURA); this.color.setWhite(true); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Security Blockade enters the battlefield, create a 2/2 white Knight creature token with vigilance. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken()))); // Enchanted land has "{T}: Prevent the next 1 damage that would be dealt to you this turn." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.EndOfTurn, 1), new TapSourceCost()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA, Duration.WhileOnBattlefield, rule))); }