mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Refactored method in GilderBairn to not always return the same value.
This commit is contained in:
parent
5096410aec
commit
a490f9e468
1 changed files with 5 additions and 6 deletions
|
@ -95,12 +95,11 @@ class GilderBairnEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||||
if (target == null) {
|
if (target != null) {
|
||||||
return false;
|
for (Counter counter : target.getCounters(game).values()) {
|
||||||
}
|
Counter newCounter = new Counter(counter.getName(), counter.getCount());
|
||||||
for (Counter counter : target.getCounters(game).values()) {
|
target.addCounters(newCounter, source, game);
|
||||||
Counter newCounter = new Counter(counter.getName(), counter.getCount());
|
}
|
||||||
target.addCounters(newCounter, source, game);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue