mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Added Sheltering Ancient
This commit is contained in:
@@ -216,7 +216,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
}
|
||||
} else {
|
||||
// 3 Cards have Put a -1/-1 Counter on a Creature you control.
|
||||
final List<Card> typeList = CardLists.getValidCards(activator.getCardsIn(ZoneType.Battlefield), this.getType().split(";"), activator, source);
|
||||
final List<Card> typeList = CardLists.getValidCards(activator.getGame().getCardsIn(ZoneType.Battlefield), this.getType().split(";"), activator, source);
|
||||
|
||||
if (typeList.size() == 0) {
|
||||
return false;
|
||||
@@ -240,7 +240,9 @@ public class CostPutCounter extends CostPartWithList {
|
||||
executePayment(ability, source, c);
|
||||
} else {
|
||||
// Put counter on chosen card
|
||||
executePayment(ability, decision.cards);
|
||||
for (int i = 0; i < c; i++) {
|
||||
executePayment(ability, decision.cards);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -264,7 +266,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
} else {
|
||||
// Cards to use this branch: Scarscale Ritual, Wandering Mage - each adds only one counter
|
||||
final Player actor = ability.getActivatingPlayer();
|
||||
List<Card> typeList = CardLists.getValidCards(actor.getCardsIn(ZoneType.Battlefield), getType().split(";"), actor, ability.getSourceCard());
|
||||
List<Card> typeList = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), getType().split(";"), actor, ability.getSourceCard());
|
||||
|
||||
InputSelectCardToPutCounter inp = new InputSelectCardToPutCounter(c, typeList);
|
||||
inp.setMessage("Put %d " + getCounter().getName() + " counter on " + getDescriptiveType());
|
||||
@@ -332,7 +334,7 @@ public class CostPutCounter extends CostPartWithList {
|
||||
|
||||
}
|
||||
|
||||
final List<Card> typeList = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), this.getType().split(";"), ai, source);
|
||||
final List<Card> typeList = CardLists.getValidCards(ai.getGame().getCardsIn(ZoneType.Battlefield), this.getType().split(";"), ai, source);
|
||||
|
||||
Card card = null;
|
||||
if (this.getType().equals("Creature.YouCtrl")) {
|
||||
|
||||
@@ -415,8 +415,20 @@ public class HumanPlay {
|
||||
} else {
|
||||
List<Card> list = p.getGame().getCardsIn(ZoneType.Battlefield);
|
||||
list = CardLists.getValidCards(list, part.getType().split(";"), p, source);
|
||||
boolean hasPaid = payCostPart(sourceAbility, (CostPartWithList)part, amount, list, "add a counter." + orString);
|
||||
if (!hasPaid) return false;
|
||||
if (list.isEmpty()) return false;
|
||||
if (!GuiDialog.confirm(source, "Do you want to put " + Lang.nounWithAmount(amount, counterType.getName() + " counter") + " on " + part.getTypeDescription() + "?"))
|
||||
return false;
|
||||
while (amount > 0) {
|
||||
InputSelectCards inp = new InputSelectCardsFromList(1, 1, list);
|
||||
inp.setMessage("Select a card to add a counter");
|
||||
inp.setCancelAllowed(true);
|
||||
Singletons.getControl().getInputQueue().setInputAndWait(inp);
|
||||
if (inp.hasCancelled())
|
||||
continue;
|
||||
Card selected = inp.getSelected().get(0);
|
||||
selected.addCounter(counterType, 1, false);
|
||||
amount--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (part instanceof CostRemoveCounter) {
|
||||
|
||||
Reference in New Issue
Block a user