mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
fix test failure
This commit is contained in:
parent
d8e3233cde
commit
fb11a59099
2 changed files with 18 additions and 20 deletions
|
@ -22,10 +22,10 @@ public class ConditionalManaTest extends CardTestPlayerBase {
|
|||
@Test
|
||||
public void testNormalUse() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
|
||||
// {T}: Add one mana of any color. Spend this mana only to cast a multicolored spell.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Pillar of the Paruns", 2);
|
||||
|
||||
|
||||
// Target player gains 7 life.
|
||||
addCard(Zone.HAND, playerA, "Heroes' Reunion", 1); // Instant {G}{W}
|
||||
|
||||
|
@ -356,11 +356,11 @@ public class ConditionalManaTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerB, 20 - 3);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testTwoConditionalMana(){
|
||||
public void testTwoConditionalMana() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
|
||||
// At the beginning of your upkeep, look at the top card of your library. You may put that card into your graveyard.
|
||||
// Exile a card from your graveyard: Add {C}. Spend this mana only to cast a colored spell without {X} in its mana cost.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Titans' Nest"); // Enchantment {1}{B}{G}{U}
|
||||
|
@ -368,23 +368,20 @@ public class ConditionalManaTest extends CardTestPlayerBase {
|
|||
// {T}: Add {C}{C}{C}{C}. Spend this mana only on costs that contain {X}.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Rosheen Meanderer", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
||||
|
||||
addCard(Zone.GRAVEYARD, playerA, "Grizzly Bears", 2);
|
||||
|
||||
|
||||
setChoice(playerA, false); // Put [Top Card of Library] into your graveyard?
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Titans' Nest", 1);
|
||||
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
|
||||
assertManaOptions("{R}", manaOptions);
|
||||
assertManaOptions("{C}{C}{R}[{TitansNestManaCondition}]", manaOptions);
|
||||
assertManaOptions("{C}{C}{C}{C}{R}[{RosheenMeandererManaCondition}]", manaOptions);
|
||||
assertManaOptions("{C}{C}{C}{C}{C}{C}{R}[{RosheenMeandererManaCondition}{TitansNestManaCondition}]", manaOptions);
|
||||
assertManaOptions("{R}", manaOptions);
|
||||
assertManaOptions("{C}{C}{C}{R}[{TitansNestManaCondition}]", manaOptions);
|
||||
assertManaOptions("{C}{C}{C}{C}{R}[{RosheenMeandererManaCondition}]", manaOptions);
|
||||
assertManaOptions("{C}{C}{C}{C}{C}{C}{C}{R}[{RosheenMeandererManaCondition}{TitansNestManaCondition}]", manaOptions);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -3503,7 +3503,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
* @param ability The ability to pay for.
|
||||
* @param availableMana The available mana.
|
||||
* @param game The game to calculate this for.
|
||||
* @return Boolean. True if the minimum can be paid, false otherwise.
|
||||
* @return Boolean. True if the minimum can be paid, false otherwise.
|
||||
*/
|
||||
protected boolean canPayMinimumManaCost(ActivatedAbility ability, ManaOptions availableMana, Game game) {
|
||||
ManaOptions abilityOptions = ability.getMinimumCostToActivate(playerId, game); // All possible combinations of mana costs
|
||||
|
@ -3604,7 +3604,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
* @param availableMana The mana available for payments.
|
||||
* @param ability The ability to play it by.
|
||||
* @param game The game to check for.
|
||||
* @return Boolean, true if the card can be played by *any* of the available alternative costs, false otherwise.
|
||||
* @return Boolean, true if the card can be played by *any* of the available alternative costs, false otherwise.
|
||||
*/
|
||||
protected boolean canPlayCardByAlternateCost(Card sourceObject, ManaOptions availableMana, Ability ability, Game game) {
|
||||
// TODO: Why is the "sourceObject instanceof Permanent" in there?
|
||||
|
@ -5015,7 +5015,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
+ " to PUT on the BOTTOM of your library (Scry)"));
|
||||
chooseTarget(Outcome.Benefit, cards, target, source, game);
|
||||
putCardsOnBottomOfLibrary(new CardsImpl(target.getTargets()), game, source, true);
|
||||
cards.removeAll(target.getTargets());
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.SCRIED, getId(), source, getId(), event.getAmount(), true));
|
||||
|
@ -5033,10 +5033,11 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
cards.addAll(getLibrary().getTopCards(game, event.getAmount()));
|
||||
if (!cards.isEmpty()) {
|
||||
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY,
|
||||
new FilterCard("cards to PUT into your GRAVEYARD (Surveil)"));
|
||||
new FilterCard("card " + (cards.size() == 1 ? "" : "s")
|
||||
+ " to PUT into your GRAVEYARD (Surveil)"));
|
||||
chooseTarget(Outcome.Benefit, cards, target, source, game);
|
||||
moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
|
||||
cards.removeAll(target.getTargets());
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.SURVEILED, getId(), source, getId(), event.getAmount(), true));
|
||||
|
|
Loading…
Reference in a new issue