@Override public PhyrexianManaCost copy() { return new PhyrexianManaCost(this); } }
/** * 601.2b If a cost that will be paid as the spell is being cast includes * Phyrexian mana symbols, the player announces whether he or she intends to * pay 2 life or the corresponding colored mana cost for each of those * symbols. */ private void handlePhyrexianManaCosts(Game game, UUID sourceId, Player controller) { Iterator<ManaCost> costIterator = manaCostsToPay.iterator(); while (costIterator.hasNext()) { ManaCost cost = costIterator.next(); if (cost instanceof PhyrexianManaCost) { PhyrexianManaCost phyrexianManaCost = (PhyrexianManaCost) cost; PayLifeCost payLifeCost = new PayLifeCost(2); if (payLifeCost.canPay(this, sourceId, controller.getId(), game) && controller.chooseUse(Outcome.LoseLife, "Pay 2 life instead of " + phyrexianManaCost.getBaseText() + '?', this, game)) { costIterator.remove(); costs.add(payLifeCost); } } } }
private void handlePhyrexianManaCosts(UUID payingPlayerId, Ability source, Game game) { Player player = game.getPlayer(payingPlayerId); if (this == null || player == null) { return; // nothing to be done without any mana costs. prevents NRE from occurring here } Iterator<T> manaCostIterator = this.iterator(); Costs<PayLifeCost> tempCosts = new CostsImpl<>(); while (manaCostIterator.hasNext()) { ManaCost manaCost = manaCostIterator.next(); if (manaCost instanceof PhyrexianManaCost) { PhyrexianManaCost phyrexianManaCost = (PhyrexianManaCost) manaCost; PayLifeCost payLifeCost = new PayLifeCost(2); if (payLifeCost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(Outcome.LoseLife, "Pay 2 life instead of " + phyrexianManaCost.getBaseText() + '?', source, game)) { manaCostIterator.remove(); tempCosts.add(payLifeCost); } } } tempCosts.pay(source, game, source.getSourceId(), player.getId(), false, null); }
public ImmolatingSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new PhyrexianManaCost(ColoredManaSymbol.R))); }
public TrespassingSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(2); this.toughness = new MageInt(2); // {U/P}: Trespassing Souleater can't be blocked this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedSourceEffect(Duration.EndOfTurn), new PhyrexianManaCost(ColoredManaSymbol.U))); }
public InsatiableSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(5); this.toughness = new MageInt(1); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new PhyrexianManaCost(ColoredManaSymbol.G))); }
public PestilentSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); this.subtype.add(SubType.INSECT); this.power = new MageInt(3); this.toughness = new MageInt(3); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(InfectAbility.getInstance(), Duration.EndOfTurn), new PhyrexianManaCost(ColoredManaSymbol.B))); }
public MoltensteelDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{R/P}{R/P}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new PhyrexianManaCost(ColoredManaSymbol.R))); }
this.add(new MonoHybridManaCost(ColoredManaSymbol.lookup(symbol.charAt(2)))); } else if (symbol.contains("P")) { this.add(new PhyrexianManaCost(ColoredManaSymbol.lookup(symbol.charAt(0)))); } else { this.add(new HybridManaCost(ColoredManaSymbol.lookup(symbol.charAt(0)), ColoredManaSymbol.lookup(symbol.charAt(2))));
public BlindingSouleater(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); // {W/P},{T}: Tap target creature. ( can be paid with either or 2 life.) SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new PhyrexianManaCost(ColoredManaSymbol.W)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }