- Added code support for Optional$ True in DB RemoveCounter. Fixed Shed Weakness not being optional.

This commit is contained in:
Agetian
2017-05-11 04:51:06 +00:00
parent d1f930fca2
commit 1cf3d9c975
2 changed files with 9 additions and 1 deletions

View File

@@ -71,11 +71,19 @@ public class CountersRemoveEffect extends SpellAbilityEffect {
final Game game = card.getGame();
final String type = sa.getParam("CounterType");
final String num = sa.getParam("CounterNum");
int cntToRemove = 0;
if (!num.equals("All") && !num.equals("Remembered")) {
cntToRemove = AbilityUtils.calculateAmount(sa.getHostCard(), num, sa);
}
if (sa.hasParam("Optional")) {
String ctrs = cntToRemove > 1 ? "counters" : num.equals("All") ? "all counters" : "a counter";
if (!sa.getActivatingPlayer().getController().confirmAction(sa, null, "Remove " + ctrs + "?")) {
return;
}
}
CounterType counterType = null;
if (!type.equals("Any") && !type.equals("All")) {