Some minor changes. Added a test.

This commit is contained in:
LevelX2 2015-05-07 21:04:04 +02:00
parent 4d62d62768
commit 4bea123bf3
6 changed files with 42 additions and 12 deletions

View file

@ -52,7 +52,6 @@ public class CourserOfKruphix extends CardImpl {
this.expansionSetCode = "BNG";
this.subtype.add("Centaur");
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(4);

View file

@ -51,7 +51,7 @@ public class LifeFromTheLoam extends CardImpl {
// Return up to three target land cards from your graveyard to your hand.
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, 3, new FilterLandCard("land cards from your graveyard")));
// Dredge 3
// Dredge 3 (If you would draw a card, instead you may put exactly three cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.)
this.addAbility(new DredgeAbility(3));
}

View file

@ -51,9 +51,6 @@ public class SharuumTheHegemon extends CardImpl {
this.supertype.add("Legendary");
this.subtype.add("Sphinx");
this.color.setBlue(true);
this.color.setBlack(true);
this.color.setWhite(true);
this.power = new MageInt(5);
this.toughness = new MageInt(5);

View file

@ -324,5 +324,42 @@ public class ManifestTest extends CardTestPlayerBase {
assertPowerToughness(playerB, "Sandstorm Charger", 4, 5); // 3/4 and the +1/+1 counter from Megamorph
}
/**
* When a Forest came manifested into play my Courser of Kruphix gained me a life.
*
*/
@Test
public void testManifestForest() {
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
// Play with the top card of your library revealed.
// You may play the top card of your library if it's a land card.
// Whenever a land enters the battlefield under your control, you gain 1 life.
addCard(Zone.BATTLEFIELD, playerB, "Courser of Kruphix", 1);
// {1}{B}, {T}, Sacrifice another creature: Manifest the top card of your library.
addCard(Zone.BATTLEFIELD, playerB, "Qarsi High Priest", 1);
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);
addCard(Zone.LIBRARY, playerB, "Forest", 1);
skipInitShuffling();
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature");
addTarget(playerB, "Silvercoat Lion");
setStopAt(2, PhaseStep.END_TURN);
execute();
// no life gain
assertLife(playerA, 20);
assertLife(playerB, 20);
assertGraveyardCount(playerB, "Silvercoat Lion", 1);
assertPermanentCount(playerB, "face down creature", 1);
}
}

View file

@ -39,7 +39,7 @@ import mage.game.Game;
*/
public class AddContinuousEffectToGame extends OneShotEffect {
private ContinuousEffect effect;
private final ContinuousEffect effect;
public AddContinuousEffectToGame(ContinuousEffect effect) {
super(Outcome.Benefit);

View file

@ -61,10 +61,7 @@ public class AttacksIfAbleSourceEffect extends RequirementEffect {
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
if (permanent.getId().equals(source.getSourceId())) {
return true;
}
return false;
return permanent.getId().equals(source.getSourceId());
}
@Override
@ -77,4 +74,4 @@ public class AttacksIfAbleSourceEffect extends RequirementEffect {
return false;
}
}
}