Merge origin/master

This commit is contained in:
LevelX2 2016-08-15 11:13:36 +02:00
commit b50c436790
2 changed files with 26 additions and 1 deletions

View file

@ -105,7 +105,6 @@ class TreeOfPerditionEffect extends OneShotEffect {
return false;
}
opponent.setLife(amount, game);
perm.getPower().modifyBaseValue(life);
perm.getToughness().modifyBaseValue(life);
// game.addEffect(new SetPowerToughnessSourceEffect(Integer.MIN_VALUE, life, Duration.Custom, SubLayer.SetPT_7b), source);
return true;

View file

@ -49,4 +49,30 @@ public class TreeOfPerditionTest extends CardTestPlayerBase {
assertLife(playerB, 13);
assertPowerToughness(playerA, "Tree of Perdition", 0, 13);
}
/*
Reported bug: Tree of Perdition is gaining both power and toughness equal to opponent's life total
instead of just toughness equal to it.
*/
@Test
public void testTreeOfPerditionOnlyGainsToughnessEqualToLife() {
/*
Tree of Perdition - {3}{B} - Creature Plant - 0/13
Defender
Tap: Exchange target opponent's life total with Tree of Perdition's toughness.
*/
addCard(Zone.BATTLEFIELD, playerA, "Tree of Perdition");
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:");
addTarget(playerA, playerB);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 13);
assertPowerToughness(playerA, "Tree of Perdition", 0, 20);
}
}