mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added the option "AllCounters" to AF RemoveCounterAll.
This commit is contained in:
@@ -6,7 +6,7 @@ T:Mode$ DamageDone | ValidSource$ Creature | ValidTarget$ You | Execute$ TrigPu
|
||||
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ TriggeredSource | CounterType$ GOLD | CounterNum$ 1
|
||||
S:Mode$ Continuous | Affected$ Creature.countersGE1GOLD | AddType$ Wall | AddKeyword$ Defender | Description$ Each creature with a gold counter on it is a Wall in addition to its other creature types and has defender. (Those creatures can't attack.)
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigRemove | TriggerDescription$ When CARDNAME leaves the battlefield, remove all gold counters from all creatures.
|
||||
SVar:TrigRemove:AB$ RemoveCounterAll | Cost$ 0 | ValidCards$ Creature | CounterType$ GOLD | CounterNum$ 9
|
||||
SVar:TrigRemove:AB$ RemoveCounterAll | Cost$ 0 | ValidCards$ Creature | CounterType$ GOLD | AllCounters$ True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/aurification.jpg
|
||||
SetInfo:ONS|Rare|http://magiccards.info/scans/en/on/6.jpg
|
||||
|
||||
@@ -1663,9 +1663,14 @@ public class AbilityFactory_Counters {
|
||||
|
||||
Counters cType = Counters.valueOf(params.get("CounterType"));
|
||||
int amount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);
|
||||
String amountString = Integer.toString(amount);
|
||||
|
||||
if(params.containsKey("AllCounters")) {
|
||||
amountString = "all";
|
||||
}
|
||||
|
||||
sb.append("Remove ").append(amount).append(" ").append(cType.getName()).append(" counter");
|
||||
if (amount != 1) { sb.append("s"); }
|
||||
if (!amountString.equals("1")) { sb.append("s"); }
|
||||
sb.append(" from each valid permanent.");
|
||||
|
||||
Ability_Sub abSub = sa.getSubAbility();
|
||||
@@ -1723,6 +1728,10 @@ public class AbilityFactory_Counters {
|
||||
}
|
||||
|
||||
for (Card tgtCard : cards) {
|
||||
if(params.containsKey("AllCounters")) {
|
||||
counterAmount = tgtCard.getCounters(Counters.valueOf(type));
|
||||
}
|
||||
|
||||
tgtCard.subtractCounter(Counters.valueOf(type), counterAmount);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user