@Override public DynamicValue copy() { return new HighestConvertedManaCostValue(this); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int highCMC = new HighestConvertedManaCostValue().calculate(game, source, this); if (highCMC > 0) { controller.scry(highCMC, source, game); } controller.drawCards(3, game); return true; } return false; } }
public OneWithTheMachine(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}"); // Draw cards equal to the highest converted mana cost among artifacts you control. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect( new HighestConvertedManaCostValue(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT) ).setText("Draw cards equal to the highest converted mana cost among artifacts you control")); }
public RushOfKnowledge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}"); // Draw cards equal to the highest converted mana cost among permanents you control. DrawCardSourceControllerEffect effect = new DrawCardSourceControllerEffect(new HighestConvertedManaCostValue()); effect.setText("Draw cards equal to the highest converted mana cost among permanents you control"); this.getSpellAbility().addEffect(effect); }
public CabalConditioning(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}"); // Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control. this.getSpellAbility().addEffect(new DiscardTargetEffect(new HighestConvertedManaCostValue()) .setText("Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control.") ); this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); }
public RewardTheFaithful(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Any number of target players each gain life equal to the highest converted mana cost among permanents you control. this.getSpellAbility().addEffect(new GainLifeTargetEffect(new HighestConvertedManaCostValue()) .setText("Any number of target players each gain life equal to the highest converted mana cost among permanents you control.")); this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); }
public TorrentOfFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Torrent of Fire deals damage equal to the highest converted mana cost among permanents you control to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new HighestConvertedManaCostValue()) .setText("{this} deals damage to any target equal to the highest converted mana cost among permanents you control.") ); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public AcceleratedMutation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}{G}"); // Target creature gets +X/+X until end of turn, where X is the highest converted mana cost among permanents you control. DynamicValue amount = new HighestConvertedManaCostValue(); this.getSpellAbility().addEffect(new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
@Override public boolean apply(Game game, Ability source) { DynamicValue amount = new HighestConvertedManaCostValue(); Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); if (spell != null && spell.getConvertedManaCost() <= amount.calculate(game, source, this)) { return game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); } return false; } }