mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added Koskun Falls
This commit is contained in:
@@ -51,6 +51,7 @@ import forge.card.cost.CostPutCounter;
|
||||
import forge.card.cost.CostRemoveCounter;
|
||||
import forge.card.cost.CostReturn;
|
||||
import forge.card.cost.CostSacrifice;
|
||||
import forge.card.cost.CostTapType;
|
||||
import forge.card.cost.CostUtil;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.spellability.Ability;
|
||||
@@ -563,6 +564,31 @@ public final class GameActionUtil {
|
||||
cpl.reportPaidCardsTo(sourceAbility);
|
||||
}
|
||||
|
||||
else if (part instanceof CostTapType) {
|
||||
List<Card> choiceList = CardLists.getValidCards(p.getCardsIn(ZoneType.Battlefield), part.getType().split(";"), p, source);
|
||||
choiceList = CardLists.filter(choiceList, Presets.UNTAPPED);
|
||||
int amount = getAmountFromPartX(part, source, sourceAbility);
|
||||
|
||||
if (choiceList.size() < amount) {
|
||||
// unable to pay (not enough cards)
|
||||
return false;
|
||||
}
|
||||
|
||||
InputSelectCards inp = new InputSelectCardsFromList(amount, amount, choiceList);
|
||||
inp.setMessage("Select %d card(s) to tap");
|
||||
inp.setCancelAllowed(true);
|
||||
|
||||
FThreads.setInputAndWait(inp);
|
||||
if (inp.hasCancelled() || inp.getSelected().size() != amount)
|
||||
return false;
|
||||
|
||||
CostPartWithList cpl = (CostPartWithList)part;
|
||||
for (Card c : inp.getSelected()) {
|
||||
cpl.executePayment(sourceAbility, c);
|
||||
}
|
||||
cpl.reportPaidCardsTo(sourceAbility);
|
||||
}
|
||||
|
||||
else if (part instanceof CostPartMana ) {
|
||||
if (!((CostPartMana) part).getManaToPay().equals("0")) // non-zero costs require input
|
||||
mayRemovePart = false;
|
||||
|
||||
Reference in New Issue
Block a user