- HOU: Added Oasis Ritualist

This commit is contained in:
swordshine
2017-06-17 08:19:41 +00:00
parent 39d22d1912
commit 4881224b06
7 changed files with 219 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
Name:Oasis Ritualist
ManaCost:3 G
Types:Creature Naga Druid
PT:2/4
A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool.
A:AB$ Mana | Cost$ T Exert<1/CARDNAME> | Produced$ Any | Amount$ 2 | SpellDescription$ Add two mana of any one color to your manna pool. (An exerted creature won't untap during your next untap step.)
SVar:Picture:http://www.wizards.com/global/images/magic/general/oasis_ritualist.jpg
Oracle:{T}: Add one mana of any color to your mana pool.\n{T}, Exert Oasis Ritualist: Add two mana of any one color to your manna pool. (An exerted creature won't untap during your next untap step.)

View File

@@ -441,6 +441,49 @@ public class HumanCostDecision extends CostDecisionMakerBase {
return PaymentDecision.card(choice);
}
@Override
public PaymentDecision visit(final CostExert cost) {
final String amount = cost.getAmount();
final String type = cost.getType();
CardCollectionView list = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), type.split(";"), player, source, ability);
if (cost.payCostFromSource()) {
if (source.getController() == ability.getActivatingPlayer() && source.isInPlay()) {
return player.getController().confirmPayment(cost, "Exert " + source.getName() + "?",ability) ? PaymentDecision.card(source) : null;
}
else {
return null;
}
}
Integer c = cost.convertAmount();
if (c == null) {
// Generalize this
if (ability.getSVar(amount).equals("XChoice")) {
c = chooseXValue(list.size());
} else {
c = AbilityUtils.calculateAmount(source, amount, ability);
}
}
if (0 == c.intValue()) {
return PaymentDecision.number(0);
}
if (list.size() < c) {
return null;
}
final InputSelectCardsFromList inp = new InputSelectCardsFromList(controller, c, c, list, ability);
inp.setMessage("Select a " + cost.getDescriptiveType() + " to exert (%d left)");
inp.setCancelAllowed(true);
inp.showAndWait();
if (inp.hasCancelled()) {
return null;
}
return PaymentDecision.card(inp.getSelected());
}
@Override
public PaymentDecision visit(final CostFlipCoin cost) {
final String amount = cost.getAmount();