Various fixed. +3 tests passed.

This commit is contained in:
magenoxx 2012-05-24 00:24:01 +04:00
parent c761c62a3e
commit a47b8c25df
17 changed files with 156 additions and 96 deletions

View file

@ -350,6 +350,7 @@ public class SoulbondKeywordTest extends CardTestPlayerBase {
assertAbilities(playerA, "Elite Vanguard", abilities);
}
@Test
public void testExileAndReturnBack() {
//TODO: Soulbond + Soulshift
Assert.assertTrue(false);

View file

@ -26,7 +26,7 @@ public class ArchangelsLightTest extends CardTestPlayerBase {
assertLife(playerB, 20);
assertGraveyardCount(playerA, 1);
assertGraveyardCount(playerA, "Archangel's Light", 1);
Assert.assertEquals(currentGame.getPlayer(playerA.getId()).getLibrary().size(), 66);
Assert.assertEquals(currentGame.getPlayer(playerA.getId()).getLibrary().size(), 77);
}

View file

@ -61,10 +61,10 @@ public class SorinLordOfInnistradTest extends CardTestPlayerBase {
assertLife(playerA, 23);
assertLife(playerB, 20);
assertPermanentCount(playerA, "Sorin, Lord of Innistrad", 0);
assertPermanentCount(playerA, "Craw Wurm", 1);
assertPermanentCount(playerB, "Craw Wurm", 0);
assertPermanentCount(playerA, "Angel of Mercy", 1);
assertPermanentCount(playerB, "Angel of Mercy", 0);
assertPermanentCount(playerA, "Craw Wurm", 1);
assertPermanentCount(playerA, "Angel of Mercy", 1);
}
}

View file

@ -42,8 +42,9 @@ public class CondemnTest extends CardTestPlayerBase {
assertPermanentCount(playerA, "Sejiri Merfolk", 0);
assertLife(playerB, 20);
assertLife(playerA, 21);
// check was put on top
Assert.assertEquals(currentGame.getPlayer(playerA.getId()).getLibrary().size(), 61);
Assert.assertEquals(72, currentGame.getPlayer(playerA.getId()).getLibrary().size());
}
}

View file

@ -13,7 +13,7 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
public class BloodArtistTest extends CardTestPlayerBase {
/**
* Tests that whenever Blood Artist goes to graveyard, it would trigget its ability.
* Tests that whenever Blood Artist goes to graveyard, it would trigger its ability.
* Tests that after Blood Artist went to graveyard, his ability doesn't work anymore.
*/
@Test
@ -26,9 +26,9 @@ public class BloodArtistTest extends CardTestPlayerBase {
addCard(Constants.Zone.BATTLEFIELD, playerB, "Bloodflow Connoisseur", 1);
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Blood Artist");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Bloodflow Connoisseur");
castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Bloodflow Connoisseur");
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
setStopAt(1, Constants.PhaseStep.END_TURN);
execute();
assertLife(playerA, 23);

View file

@ -230,7 +230,9 @@ public class TestPlayer extends ComputerPlayer<TestPlayer> {
for (UUID id: ability.getTargets().get(0).possibleTargets(ability.getSourceId(), ability.getControllerId(), game)) {
MageObject object = game.getObject(id);
if (object != null && object.getName().equals(t)) {
ability.getTargets().get(0).clearChosen();
if (ability.getTargets().get(0).getNumberOfTargets() == 1) {
ability.getTargets().get(0).clearChosen();
}
ability.getTargets().get(0).addTarget(id, ability, game);
break;
}