mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Merge pull request #2692 from PedroTav/develop
Fixes bug in Jaddi Lifestrider
This commit is contained in:
commit
f18cd051b8
1 changed files with 3 additions and 8 deletions
|
@ -95,19 +95,14 @@ class JaddiLifestriderEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
int tappedAmount = 0;
|
int tappedAmount = 0;
|
||||||
Player you = game.getPlayer(source.getControllerId());
|
Player you = game.getPlayer(source.getControllerId());
|
||||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
TargetCreaturePermanent target = new TargetCreaturePermanent(0, Integer.MAX_VALUE, filter, true);
|
||||||
while (true) {
|
|
||||||
target.clearChosen();
|
|
||||||
if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Tap, source.getControllerId(), source.getSourceId(), game)) {
|
if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Tap, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
UUID creature = target.getFirstTarget();
|
for (UUID creature : target.getTargets()) {
|
||||||
if (creature != null) {
|
if (creature != null) {
|
||||||
game.getPermanent(creature).tap(game);
|
game.getPermanent(creature).tap(game);
|
||||||
tappedAmount++;
|
tappedAmount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (tappedAmount > 0) {
|
if (tappedAmount > 0) {
|
||||||
you.gainLife(tappedAmount * 2, game);
|
you.gainLife(tappedAmount * 2, game);
|
||||||
|
|
Loading…
Reference in a new issue