mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Tests: added verify test for wrong mdash usage and fixed related cards (#7457), added tests for (#7460);
This commit is contained in:
parent
bed690cc12
commit
6f2ce47885
4 changed files with 49 additions and 7 deletions
|
@ -40,7 +40,7 @@ public final class StubbornDenial extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||||
new CounterTargetEffect(),
|
new CounterTargetEffect(),
|
||||||
FerociousCondition.instance,
|
FerociousCondition.instance,
|
||||||
"<br><i>Ferocious</i> &mdash If you control a creature with power 4 or greater, counter that spell instead"));
|
"<br><i>Ferocious</i> — If you control a creature with power 4 or greater, counter that spell instead"));
|
||||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
||||||
this.getSpellAbility().addHint(FerociousHint.instance);
|
this.getSpellAbility().addHint(FerociousHint.instance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.mage.test.cards.single.xln;
|
||||||
|
|
||||||
|
import mage.constants.PhaseStep;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author JayDi85
|
||||||
|
*/
|
||||||
|
public class TreasureCoveTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test_CanDrawAfterSacrifice() {
|
||||||
|
removeAllCardsFromHand(playerA);
|
||||||
|
|
||||||
|
// {T}, Sacrifice a Treasure: Draw a card.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Treasure Cove", 1);
|
||||||
|
//
|
||||||
|
// saga: I, II — Create a Treasure token.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Forging the Tyrite Sword", 1);
|
||||||
|
|
||||||
|
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||||
|
checkHandCount("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 0);
|
||||||
|
checkPermanentCount("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Treasure", 2); // from saga
|
||||||
|
|
||||||
|
// sacrifice and draw
|
||||||
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}, Sacrifice");
|
||||||
|
setChoice(playerA, "Treasure");
|
||||||
|
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||||
|
checkHandCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 1);
|
||||||
|
checkPermanentCount("after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Treasure", 2 - 1);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1322,6 +1322,9 @@ public class VerifyCardDataTest {
|
||||||
if (rule.contains("’")) {
|
if (rule.contains("’")) {
|
||||||
fail(card, "rules", "card's rules contains restricted symbol ’");
|
fail(card, "rules", "card's rules contains restricted symbol ’");
|
||||||
}
|
}
|
||||||
|
if (rule.contains("&mdash ")) {
|
||||||
|
fail(card, "rules", "card's rules contains restricted test [&mdash ] instead [—]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package mage.abilities.common;
|
package mage.abilities.common;
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
@ -8,14 +7,15 @@ import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl {
|
public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
private TargetController targetController;
|
private final TargetController targetController;
|
||||||
private Condition interveningIfClauseCondition;
|
private final Condition interveningIfClauseCondition;
|
||||||
|
|
||||||
public BeginningOfEndStepTriggeredAbility(Effect effect, TargetController targetController, boolean isOptional) {
|
public BeginningOfEndStepTriggeredAbility(Effect effect, TargetController targetController, boolean isOptional) {
|
||||||
this(Zone.BATTLEFIELD, effect, targetController, null, isOptional);
|
this(Zone.BATTLEFIELD, effect, targetController, null, isOptional);
|
||||||
|
@ -113,7 +113,7 @@ public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
}
|
}
|
||||||
String abilityWordRule = "";
|
String abilityWordRule = "";
|
||||||
if (abilityWord != null) {
|
if (abilityWord != null) {
|
||||||
abilityWordRule = "<i>" + abilityWord.toString() + "</i> &mdash ";
|
abilityWordRule = "<i>" + abilityWord.toString() + "</i> — ";
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (targetController) {
|
switch (targetController) {
|
||||||
|
@ -139,7 +139,7 @@ public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
//Fixes punctuation on multiple sentence if-then construction
|
//Fixes punctuation on multiple sentence if-then construction
|
||||||
// see -- Colfenor's Urn
|
// see -- Colfenor's Urn
|
||||||
if (interveningIfClauseCondition.toString().endsWith(".")){
|
if (interveningIfClauseCondition.toString().endsWith(".")) {
|
||||||
return interveningIfClauseCondition.toString() + " ";
|
return interveningIfClauseCondition.toString() + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue