mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fix March of the Machines
Add a DependencyType for ArtifactAddingRemoving and use it to make March of the Machines come after artifact type adding effects.
This commit is contained in:
parent
9ff3e2c670
commit
3198558dd6
4 changed files with 22 additions and 1 deletions
|
@ -76,6 +76,7 @@ class MarchOfTheMachinesEffect extends ContinuousEffectImpl {
|
|||
public MarchOfTheMachinesEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.BecomeCreature);
|
||||
staticText = "Each noncreature artifact is an artifact creature with power and toughness each equal to its converted mana cost";
|
||||
dependendToType = DependencyType.ArtifactAddingRemoving;
|
||||
}
|
||||
|
||||
public MarchOfTheMachinesEffect(final MarchOfTheMachinesEffect effect) {
|
||||
|
|
|
@ -127,5 +127,22 @@ public class MarchOfTheMachinesTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Accorder's Shield", 0);
|
||||
assertGraveyardCount(playerA, "Accorder's Shield", 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testLiquimetalCoatingLandIsDestroyed() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Liquimetal Coating");
|
||||
addCard(Zone.HAND, playerA, "March of the Machines");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "March of the Machines");
|
||||
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Target permanent", "Forest");
|
||||
|
||||
setStopAt(2, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Forest", 0);
|
||||
assertGraveyardCount(playerA, "Forest", 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@ public class AddCardTypeTargetEffect extends ContinuousEffectImpl {
|
|||
this.addedCardType = addedCardType;
|
||||
if (addedCardType.equals(CardType.ENCHANTMENT)) {
|
||||
dependencyTypes.add(DependencyType.EnchantmentAddingRemoving);
|
||||
} else if (addedCardType.equals(CardType.ARTIFACT)) {
|
||||
dependencyTypes.add(DependencyType.ArtifactAddingRemoving);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ package mage.constants;
|
|||
public enum DependencyType {
|
||||
|
||||
AuraAddingRemoving,
|
||||
ArtifactAddingRemoving,
|
||||
BecomeForest,
|
||||
BecomeIsland,
|
||||
BecomeMountain,
|
||||
|
|
Loading…
Reference in a new issue