* Fixed Leech Bonder -1/-1 Tokens don't kill off enemy creatures (fixes #1975).

This commit is contained in:
LevelX2 2016-08-06 11:33:24 +02:00
parent d0db2d51ed
commit 9df373e8f3
4 changed files with 73 additions and 30 deletions

View file

@ -123,13 +123,16 @@ class LeechBonderEffect extends OneShotEffect {
possibleChoices.add(counterName);
}
choice.setChoices(possibleChoices);
if (controller.choose(Outcome.AIDontUseIt, choice, game)) {
if (controller.choose(outcome, choice, game)) {
String chosen = choice.getChoice();
if (fromPermanent.getCounters().containsKey(chosen)) {
Counter counter = new Counter(chosen, 1);
fromPermanent.removeCounters(counter, game);
toPermanent.addCounters(counter, game);
return true;
CounterType counterType = CounterType.findByName(chosen);
if (counterType != null) {
Counter counter = counterType.createInstance();
fromPermanent.removeCounters(counter, game);
toPermanent.addCounters(counter, game);
return true;
}
}
}
return false;