Proliferate now doesn't choose a type of counter
@@ -26,7 +26,7 @@ public class ProliferateEffect extends OneShotEffect {
public ProliferateEffect() {
super(Outcome.Benefit);
- staticText = "Proliferate. <i>(You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.)</i>";
+ staticText = "Proliferate. <i>(You choose any number of permanents and/or players with counters on them, then give each another counter of each kind already there.)</i>";
}
public ProliferateEffect(ProliferateEffect effect) {
@@ -48,61 +48,19 @@ public class ProliferateEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(chosen);
if (permanent != null) {
if (!permanent.getCounters(game).isEmpty()) {
- if (permanent.getCounters(game).size() == 1) {
for (Counter counter : permanent.getCounters(game).values()) {
Counter newCounter = new Counter(counter.getName());
permanent.addCounters(newCounter, source, game);
}
- } else {
- Choice choice = new ChoiceImpl(true);
- Set<String> choices = new HashSet<>();
- for (Counter counter : permanent.getCounters(game).values()) {
- choices.add(counter.getName());
- }
- choice.setChoices(choices);
- choice.setMessage("Choose a counter to proliferate (" + permanent.getIdName() + ')');
- if (controller.choose(Outcome.Benefit, choice, game)) {
- for (Counter counter : permanent.getCounters(game).values()) {
- if (counter.getName().equals(choice.getChoice())) {
- Counter newCounter = new Counter(counter.getName());
- permanent.addCounters(newCounter, source, game);
- break;
- }
- }
- } else {
- return false;
- }
- }
}
} else {
Player player = game.getPlayer(chosen);
if (player != null) {
if (!player.getCounters().isEmpty()) {
- if (player.getCounters().size() == 1) {
for (Counter counter : player.getCounters().values()) {
Counter newCounter = new Counter(counter.getName());
player.addCounters(newCounter, game);
}
- } else {
- Choice choice = new ChoiceImpl(true);
- Set<String> choices = new HashSet<>();
- for (Counter counter : player.getCounters().values()) {
- choices.add(counter.getName());
- }
- choice.setChoices(choices);
- choice.setMessage("Choose a counter to proliferate (" + player.getLogName() + ')');
- if (controller.choose(Outcome.Benefit, choice, game)) {
- for (Counter counter : player.getCounters().values()) {
- if (counter.getName().equals(choice.getChoice())) {
- Counter newCounter = new Counter(counter.getName());
- player.addCounters(newCounter, game);
- break;
- }
- }
- } else {
- return false;
- }
- }
}
}
}
