mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Implemented the "Remove X counters from among creatures you control" logic when testing the availability of counters on cards to do the CostRemoveCounter payment. Fixes Novijen Sages and similar cards (Ooze Flux, Retribution of the Ancients).
This commit is contained in:
@@ -139,10 +139,23 @@ public class CostRemoveCounter extends CostPartWithList {
|
|||||||
typeList = CardLists.getValidCards(activator.getCardsIn(this.zone), type.split(";"), activator, source);
|
typeList = CardLists.getValidCards(activator.getCardsIn(this.zone), type.split(";"), activator, source);
|
||||||
}
|
}
|
||||||
if (amount != null) {
|
if (amount != null) {
|
||||||
for (Card c : typeList) {
|
if (this.getTypeDescription().equals("among creatures you control")) {
|
||||||
if (c.getCounters(cntrs) - amount >= 0) {
|
// remove X counters from among creatures you control
|
||||||
|
int totalCounters = 0;
|
||||||
|
for (Card c : typeList) {
|
||||||
|
totalCounters += c.getCounters(cntrs);
|
||||||
|
}
|
||||||
|
if (totalCounters >= amount) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// (default logic) remove X counters from a single permanent
|
||||||
|
for (Card c : typeList) {
|
||||||
|
if (c.getCounters(cntrs) - amount >= 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user