* Vorinclex, Voice of Hunger - FIxed a bug that id did not work correctly with some conditional land mana sources (e.g. Gemstone Caverns).

This commit is contained in:
LevelX2 2017-01-14 12:26:22 +01:00
parent 2f3ca50c72
commit 1c1e4daaf3
3 changed files with 62 additions and 8 deletions

View file

@ -66,7 +66,7 @@ public class GemstoneCaverns extends CardImpl {
// If Gemstone Caverns is in your opening hand and you're not playing first, you may begin the game with Gemstone Caverns on the battlefield with a luck counter on it. If you do, exile a card from your hand.
this.addAbility(new GemstoneCavernsAbility());
// {tap}: Add {C} to your mana pool. If Gemstone Caverns has a luck counter on it, instead add one mana of any color to your mana pool.
// {T}: Add {C} to your mana pool. If Gemstone Caverns has a luck counter on it, instead add one mana of any color to your mana pool.
Ability ability = new ConditionalManaAbility(Zone.BATTLEFIELD,
new ConditionalManaEffect(
new AddManaOfAnyColorEffect(),

View file

@ -28,18 +28,17 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.AddManaOfAnyColorToManaPoolTargetPlayerEffect;
import mage.abilities.effects.common.ChoosePlayerEffect;
import mage.abilities.effects.common.ManaEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.abilities.effects.common.ChoosePlayerEffect;
import mage.abilities.effects.common.ManaEffect;
/**
*
@ -49,11 +48,10 @@ public class SpectralSearchlight extends CardImpl {
public SpectralSearchlight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// {tap}: Choose a player. That player adds one mana of any color he or she chooses to his or her mana pool.
// {T}: Choose a player. That player adds one mana of any color he or she chooses to his or her mana pool.
ManaEffect effect = new AddManaOfAnyColorToManaPoolTargetPlayerEffect("chosen player");
effect.setText("Choose a player. That player adds one mana of any color he or she chooses to his or her mana pool");
effect.setText("That player adds one mana of any color he or she chooses to his or her mana pool");
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
// choosing player as first effect, before adding mana effect
ability.getEffects().add(0, new ChoosePlayerEffect(Outcome.PutManaInPool));
@ -68,4 +66,4 @@ public class SpectralSearchlight extends CardImpl {
public SpectralSearchlight copy() {
return new SpectralSearchlight(this);
}
}
}

View file

@ -29,6 +29,7 @@ package org.mage.test.cards.mana;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.counters.CounterType;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
@ -62,4 +63,59 @@ public class VorinclexVoiceOfHungerTest extends CardTestPlayerBase {
}
/**
* Vorinclex glitches with Gemstone Cavern
*/
@Test
public void testGemstoneCavern() {
// Trample
// Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced.
// Whenever an opponent taps a land for mana, that land doesn't untap during its controller's next untap step.
addCard(Zone.BATTLEFIELD, playerB, "Vorinclex, Voice of Hunger", 1); // {6}{G}{G}
// If Gemstone Caverns is in your opening hand and you're not playing first, you may begin the game with Gemstone Caverns on the battlefield with a luck counter on it. If you do, exile a card from your hand.
// {T}: Add {C} to your mana pool. If Gemstone Caverns has a luck counter on it, instead add one mana of any color to your mana pool.
addCard(Zone.HAND, playerB, "Gemstone Caverns", 1);
addCard(Zone.HAND, playerB, "Silvercoat Lion", 2);
activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add");
setChoice(playerB, "White");
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Silvercoat Lion");
setStopAt(2, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerB, "Gemstone Caverns", 1);
assertPermanentCount(playerB, "Silvercoat Lion", 1);
assertExileCount("Silvercoat Lion", 1);
assertTapped("Gemstone Caverns", true);
}
@Test
public void testCastWithGemstoneCavern() {
// Trample
// Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced.
// Whenever an opponent taps a land for mana, that land doesn't untap during its controller's next untap step.
addCard(Zone.HAND, playerB, "Vorinclex, Voice of Hunger", 1); // {6}{G}{G}
addCard(Zone.BATTLEFIELD, playerB, "Forest", 7);
// If Gemstone Caverns is in your opening hand and you're not playing first, you may begin the game with Gemstone Caverns on the battlefield with a luck counter on it. If you do, exile a card from your hand.
// {T}: Add {C} to your mana pool. If Gemstone Caverns has a luck counter on it, instead add one mana of any color to your mana pool.
addCard(Zone.HAND, playerB, "Gemstone Caverns", 1);
addCard(Zone.HAND, playerB, "Silvercoat Lion", 2);
activateManaAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Add");
setChoice(playerB, "White");
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Vorinclex, Voice of Hunger");
setStopAt(2, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerB, "Gemstone Caverns", 1);
assertCounterCount("Gemstone Caverns", CounterType.LUCK, 1);
assertPermanentCount(playerB, "Vorinclex, Voice of Hunger", 1);
assertTapped("Gemstone Caverns", true);
}
}