mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added code support for Optional$ True in DB RemoveCounter. Fixed Shed Weakness not being optional.
This commit is contained in:
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user