@Override public PreventNextDamageFromChosenSourceToYouEffect copy() { return new PreventNextDamageFromChosenSourceToYouEffect(this); }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { preventDamageAction(event, source, game); this.used = true; return false; }
public PreventNextDamageFromChosenSourceToYouEffect(Duration duration, FilterObject filter, boolean onlyCombat) { super(duration, Integer.MAX_VALUE, onlyCombat); this.targetSource = new TargetSource(filter); this.staticText = setText(); }
@Override public void init(Ability source, Game game) { FilterObject filter = targetSource.getFilter(); filter.add(new ColorPredicate((ObjectColor) game.getState().getValue(source.getSourceId() + "_color"))); super.init(source, game); }
@Override public void init(Ability source, Game game) { FilterObject filter = targetSource.getFilter(); filter.add(new ColorPredicate((ObjectColor) game.getState().getValue(source.getSourceId() + "_color"))); super.init(source, game); }
public RighteousAura(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {W}, Pay 2 life: The next time a source of your choice would deal damage to you this turn, prevent that damage. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn), new ManaCostsImpl("{W}")); ability.addCost(new PayLifeCost(2)); this.addAbility(ability); }
public PentagramOfTheAges(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {4}, {tap}: The next time a source of your choice would deal damage to you this turn, prevent that damage. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn), new GenericManaCost(4)); ability.addCost(new TapSourceCost()); this.addAbility(ability); }
public RhysticCircle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); // {1}: Any player may pay {1}. If no one does, the next time a source of your choice would deal damage to you this turn, prevent that damage. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DoUnlessAnyPlayerPaysEffect(new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn),new GenericManaCost(1)), new ManaCostsImpl("{1}"))); }
public CircleOfProtectionWhite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {1}: The next time a white source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); }
public CircleOfProtectionArtifacts(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {2}: The next time an artifact source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("2"))); }
public CircleOfProtectionGreen(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {1}: The next time a green source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); }
public CircleOfProtectionBlack(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {1}: The next time a black source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); }
public CircleOfProtectionBlue(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {1}: The next time a blue source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); }
public CircleOfProtectionRed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {1}: The next time a red source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); }
public Invulnerability(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // Buyback {3} this.addAbility(new BuybackAbility("{3}")); // The next time a source of your choice would deal damage to you this turn, prevent that damage. this.getSpellAbility().addEffect(new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn)); }
public GreaterRealmOfPreservation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {1}{W}: The next time a black or red source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{W}"))); }
public CircleOfProtectionShadow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {1}: The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); effect.setText("The next time a creature of your choice with shadow would deal damage to you this turn, prevent that damage"); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("1"))); }
public SeasonedTactician(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ADVISOR); this.power = new MageInt(1); this.toughness = new MageInt(3); // {3}, Exile the top four cards of your library: The next time a source of your choice would deal damage to you this turn, prevent that damage. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn), new ManaCostsImpl("{3}")); ability.addCost(new ExileFromTopOfLibraryCost(4)); this.addAbility(ability); }
public HaazdaShieldMate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(1); // At the beginning of your upkeep, sacrifice Haazda Shield Mate unless you pay {W}{W}. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{W}{W}")), TargetController.YOU, false)); // {W}: The next time a source of your choice would deal damage to you this turn, prevent that damage. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn), new ManaCostsImpl("{W}"))); }
public RuneOfProtectionRed(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); // {W}: The next time a red source of your choice would deal damage to you this turn, prevent that damage. Effect effect = new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn, filter); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("W"))); // Cycling {2} ({2}, Discard this card: Draw a card.) this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); }