@Override public FlipCoinEffect copy() { return new FlipCoinEffect(this); } }
public FlipCoinEffect(Effect effectWon, Effect effectLost, Outcome outcome) { super(outcome); addEffectWon(effectWon); addEffectLost(effectLost); }
public SorcerersStrongbox(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {2}, {T} : Flip a coin. If you win the flip, sacrifice Sorcerer's Strongbox and draw three cards. FlipCoinEffect flipCoinEffect = new FlipCoinEffect(new SacrificeSourceEffect()); Effect effect = new DrawCardSourceControllerEffect(3); effect.setText("and draw three cards"); flipCoinEffect.addEffectWon(effect); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, flipCoinEffect, new TapSourceCost()); ability.addManaCost(new GenericManaCost(2)); this.addAbility(ability); }
public Boompile(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // {T}: Flip a coin. If you win the flip, destroy all nonland permanents. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new FlipCoinEffect(new DestroyAllEffect(new FilterNonlandPermanent("nonland permanents"))), new TapSourceCost())); }
public WireflyHive(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {3}, {tap}: Flip a coin. If you win the flip, create a 2/2 colorless Insect artifact creature token with flying named Wirefly. // If you lose the flip, destroy all permanents named Wirefly. FilterPermanent filter = new FilterPermanent("permanents named Wirefly"); filter.add(new NamePredicate("Wirefly")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new FlipCoinEffect(new CreateTokenEffect(new WireflyToken()), new DestroyAllEffect(filter)), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); this.addAbility(ability); }