mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
* Fixed Leech Bonder -1/-1 Tokens don't kill off enemy creatures (fixes #1975).
This commit is contained in:
parent
d0db2d51ed
commit
9df373e8f3
4 changed files with 73 additions and 30 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue