diff --git a/Mage.Sets/src/mage/cards/f/ForbiddenOrchard.java b/Mage.Sets/src/mage/cards/f/ForbiddenOrchard.java index ff8aeaed186..ebf3b785375 100644 --- a/Mage.Sets/src/mage/cards/f/ForbiddenOrchard.java +++ b/Mage.Sets/src/mage/cards/f/ForbiddenOrchard.java @@ -1,5 +1,5 @@ /* - * + * * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -25,7 +25,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. - * + * */ package mage.cards.f; @@ -48,17 +48,17 @@ import mage.target.common.TargetOpponent; */ public final class ForbiddenOrchard extends CardImpl { - public ForbiddenOrchard (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - + public ForbiddenOrchard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); + // {T}: Add one mana of any color. this.addAbility(new AnyColorManaAbility()); - + // Whenever you tap Forbidden Orchard for mana, create a 1/1 colorless Spirit creature token under target opponent's control. this.addAbility(new ForbiddenOrchardTriggeredAbility()); } - public ForbiddenOrchard (final ForbiddenOrchard card) { + public ForbiddenOrchard(final ForbiddenOrchard card) { super(card); } @@ -83,7 +83,7 @@ class ForbiddenOrchardTriggeredAbility extends TriggeredAbilityImpl { public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.TAPPED_FOR_MANA; } - + @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getSourceId().equals(getSourceId()); @@ -91,7 +91,7 @@ class ForbiddenOrchardTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return new StringBuilder("Whenever you tap {this} for mana, ").append(super.getRule()).toString() ; + return "Whenever you tap {this} for mana, " + super.getRule(); } @Override diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java index cab66712e33..604c33cf3e6 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java @@ -210,12 +210,12 @@ public class ConstellationTest extends CardTestPlayerBase { castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Mephidross Vampire"); // give vampire to creatures } else { // Make sure not white mana is used here to cast the vampire - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); + activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); + activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); + activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); + activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); + activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); + activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {B}"); castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Mephidross Vampire"); // give vampire to creatures castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Archetype of Courage"); // make dax to creature } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ForbiddenOrchardTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ForbiddenOrchardTest.java new file mode 100644 index 00000000000..7e2bd1568b4 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ForbiddenOrchardTest.java @@ -0,0 +1,35 @@ +package org.mage.test.cards.mana; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class ForbiddenOrchardTest extends CardTestPlayerBase { + + @Test + public void testSpiritCreation() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + + // {T}: Add one mana of any color. + // Whenever you tap Forbidden Orchard for mana, create a 1/1 colorless Spirit creature token under target opponent's control. + addCard(Zone.BATTLEFIELD, playerA, "Forbidden Orchard", 1); + addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Silvercoat Lion"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Silvercoat Lion", 1); + + assertPermanentCount(playerB, "Spirit", 1); + assertPermanentCount(playerA, "Spirit", 0); + + } + +} diff --git a/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java index 72c2284a204..ae568822690 100644 --- a/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java @@ -47,7 +47,6 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - checkToFirePossibleEvents(getMana(game, source), game, source); controller.getManaPool().addMana(getMana(game, source), game, source); return true; }