Added another Infect test.

This commit is contained in:
LevelX2 2015-05-01 00:39:13 +02:00
parent 9209e43310
commit 4206ea97ec
3 changed files with 39 additions and 2 deletions

View file

@ -36,6 +36,7 @@ import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.InfectAbility;
@ -52,8 +53,14 @@ public class InkmothNexus extends CardImpl {
public InkmothNexus (UUID ownerId) {
super(ownerId, 145, "Inkmoth Nexus", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "MBS";
// {T}: Add {1} to your mana pool.
this.addAbility(new ColorlessManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new InkmothNexusToken(), "land", Duration.EndOfTurn), new GenericManaCost(1)));
// {1}: Inkmoth Nexus becomes a 1/1 Blinkmoth artifact creature with flying and infect until end of turn. It's still a land. (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
Effect effect = new BecomesCreatureSourceEffect(new InkmothNexusToken(), "land", Duration.EndOfTurn);
effect.setText("{this} becomes a 1/1 Blinkmoth artifact creature with flying and infect until end of turn. It's still a land. <i>(It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)</i>");
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1)));
}
public InkmothNexus (final InkmothNexus card) {

View file

@ -63,7 +63,7 @@ public class MeliraSylvokOutcast extends CardImpl {
this.subtype.add("Human");
this.subtype.add("Scout");
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

View file

@ -87,4 +87,34 @@ public class InfectTest extends CardTestPlayerBase {
assertLife(playerB, 20);
}
/**
* Inkmoth Nexus has no effect it he attacks becaus it has infect but there are no counters added
* http://www.mtgsalvation.com/forums/magic-fundamentals/magic-rulings/magic-rulings-archives/296553-melira-sylvok-outcast-vs-inkmoth-nexus
*/
@Test
public void testInkmothNexusLoseInfect() {
// Creatures your opponents control lose infect.
addCard(Zone.BATTLEFIELD, playerA, "Melira, Sylvok Outcast");
addCard(Zone.BATTLEFIELD, playerB, "Plains", 1);
addCard(Zone.BATTLEFIELD, playerB, "Inkmoth Nexus");
// {1}: Inkmoth Nexus becomes a 1/1 Blinkmoth artifact creature with flying and infect until end of turn. It's still a land.
// (It deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.)
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}: {this} becomes");
attack(2, playerB, "Inkmoth Nexus");
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertTapped("Plains", true);
assertTapped("Inkmoth Nexus", true);
assertCounterCount(playerA, CounterType.POISON, 0);
assertLife(playerA, 20);
assertLife(playerB, 20);
}
}