mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Some minor changes.
This commit is contained in:
parent
329165555b
commit
957fa7d647
3 changed files with 40 additions and 5 deletions
|
@ -36,6 +36,7 @@ import mage.Mana;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ContinuousRuleModifiyingEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
|
@ -79,7 +80,7 @@ public class CavernOfSouls extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a creature spell of the chosen type, and that spell can't be countered.
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(1, new CavernOfSoulsManaBuilder()));
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new CavernOfSoulsManaBuilder(), true));
|
||||
this.addWatcher(new CavernOfSoulsWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new CavernOfSoulsCantCounterEffect()));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ package mage.sets.magic2015;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.abilities.keyword.ConvokeAbility;
|
||||
|
@ -58,8 +57,6 @@ public class ReturnToTheRanks extends CardImpl {
|
|||
super(ownerId, 29, "Return to the Ranks", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{W}{W}");
|
||||
this.expansionSetCode = "M15";
|
||||
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Convoke
|
||||
this.addAbility(new ConvokeAbility());
|
||||
// Return X target creature cards with converted mana cost 2 or less from your graveyard to the battlefield.
|
||||
|
|
|
@ -185,5 +185,42 @@ public class CavernOfSoulsTest extends CardTestPlayerBase {
|
|||
// Check Horror on the Battlefield
|
||||
// assertPermanentCount(playerA, "Fume Spitter", 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return to the Ranks cannot be countered if mana produced by Cavern of Souls
|
||||
* was used to pay X. Can be bug also for all other spells with X in their cost, not sure.
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testCastWithColorlessManaCanBeCountered() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
|
||||
addCard(Zone.HAND, playerA, "Cavern of Souls");
|
||||
// Sorcery {X}{W}{W}
|
||||
// Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for or one mana of that creature's color.)
|
||||
// Return X target creature cards with converted mana cost 2 or less from your graveyard to the battlefield.
|
||||
addCard(Zone.HAND, playerA, "Return to the Ranks");
|
||||
addCard(Zone.GRAVEYARD, playerA, "Silvercoat Lion");
|
||||
|
||||
// {1}{U} Remove Soul - Counter target creature spell.
|
||||
addCard(Zone.HAND, playerB, "Counterspell");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
|
||||
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cavern of Souls");
|
||||
setChoice(playerA, "Drake");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Return to the Ranks", "Silvercoat Lion");
|
||||
setChoice(playerA, "X=1");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Counterspell", "Return to the Ranks");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
// check it was countered
|
||||
assertGraveyardCount(playerA, "Return to the Ranks", 1);
|
||||
assertGraveyardCount(playerB, "Counterspell", 1);
|
||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||
assertPermanentCount(playerA, "Silvercoat Lion", 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue