Merge pull request #2692 from PedroTav/develop

Fixes bug in Jaddi Lifestrider
This commit is contained in:
LevelX2 2016-12-16 22:32:21 +01:00 committed by GitHub
commit f18cd051b8

View file

@ -95,19 +95,14 @@ class JaddiLifestriderEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
int tappedAmount = 0;
Player you = game.getPlayer(source.getControllerId());
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
while (true) {
target.clearChosen();
if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Tap, source.getControllerId(), source.getSourceId(), game)) {
UUID creature = target.getFirstTarget();
TargetCreaturePermanent target = new TargetCreaturePermanent(0, Integer.MAX_VALUE, filter, true);
if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Tap, source.getControllerId(), source.getSourceId(), game)) {
for (UUID creature : target.getTargets()) {
if (creature != null) {
game.getPermanent(creature).tap(game);
tappedAmount++;
}
}
else {
break;
}
}
if (tappedAmount > 0) {
you.gainLife(tappedAmount * 2, game);