This commit is contained in:
igoudt 2017-06-29 12:21:40 +02:00
parent 89b7d4e0e6
commit a72fe69018
2 changed files with 33 additions and 4 deletions

View file

@ -27,7 +27,6 @@
*/
package mage.cards.m;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Abilities;
import mage.abilities.Ability;
@ -47,8 +46,9 @@ import mage.filter.predicate.Predicate;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author BursegSardaukar
*/
public class MagewrightsStone extends CardImpl {
@ -60,7 +60,7 @@ public class MagewrightsStone extends CardImpl {
}
public MagewrightsStone(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// {1}, {T}: Untap target creature that has an activated ability with {T} in its cost.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{1}"));
@ -91,7 +91,7 @@ class HasAbilityWithTapSymbolPredicate implements Predicate<MageObject> {
}
for (Ability ability : abilities) {
if (ability.getAbilityType() == AbilityType.ACTIVATED && !ability.getCosts().isEmpty()) {
if ((ability.getAbilityType() == AbilityType.ACTIVATED || ability.getAbilityType() == AbilityType.MANA) && !ability.getCosts().isEmpty()) {
for (Cost cost : ability.getCosts()) {
if (cost instanceof TapSourceCost) {
return true;

View file

@ -0,0 +1,29 @@
package org.mage.test.cards.single;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class MagewrightStoneTest extends CardTestPlayerBase {
private static final String magewrightStone = "Magewright's Stone";
@Test
public void untapRosheenMeanderer() {
String meanderer = "Rosheen Meanderer";
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
addCard(Zone.BATTLEFIELD, playerA, meanderer, 1, true);
addCard(Zone.BATTLEFIELD, playerA, magewrightStone);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},{T}: Untap target creature", meanderer);
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertTapped(magewrightStone, true);
assertTapped(meanderer, false);
}
}