Arcane Savant and friends

This commit is contained in:
Adam Pantel
2020-01-08 16:38:51 -05:00
parent 1f01e2ae16
commit f401c3900c
19 changed files with 210 additions and 22 deletions

View File

@@ -811,7 +811,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
InputSelectCardsFromList inp = null;
if (cost.getType().equals("SameColor")) {
final Integer num = cost.convertAmount();
CardCollectionView hand = player.getCardsIn(ZoneType.Hand);
CardCollectionView hand = player.getCardsIn(cost.getRevealFrom());
final CardCollectionView hand2 = hand;
hand = CardLists.filter(hand, new Predicate<Card>() {
@Override
@@ -844,7 +844,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
else {
Integer num = cost.convertAmount();
CardCollectionView hand = player.getCardsIn(ZoneType.Hand);
CardCollectionView hand = player.getCardsIn(cost.getRevealFrom());
hand = CardLists.getValidCards(hand, cost.getType().split(";"), player, source, ability);
if (num == null) {
@@ -861,6 +861,9 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (num == 0) {
return PaymentDecision.number(0);
}
if (hand.size() == num) {
return PaymentDecision.card(hand);
}
inp = new InputSelectCardsFromList(controller, num, num, hand, ability);
inp.setMessage("Select %d more " + cost.getDescriptiveType() + " card(s) to reveal.");

View File

@@ -606,7 +606,8 @@ public class HumanPlay {
}
}
else if (part instanceof CostReveal) {
CardCollectionView list = CardLists.getValidCards(p.getCardsIn(ZoneType.Hand), part.getType(), p, source);
CostReveal costReveal = (CostReveal) part;
CardCollectionView list = CardLists.getValidCards(p.getCardsIn(costReveal.getRevealFrom()), part.getType(), p, source);
int amount = getAmountFromPartX(part, source, sourceAbility);
boolean hasPaid = payCostPart(controller, sourceAbility, (CostPartWithList)part, amount, list, Localizer.getInstance().getMessage("lblReveal") + orString);
if (!hasPaid) { return false; }