mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Augur of Bolas - Fixed a problem with AI that can't choose the card from libraray.
This commit is contained in:
parent
6c93ce9c27
commit
1d2132648b
2 changed files with 41 additions and 3 deletions
|
@ -44,7 +44,6 @@ import mage.filter.predicate.Predicates;
|
|||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
|
@ -113,8 +112,8 @@ class AugurOfBolasEffect extends OneShotEffect {
|
|||
if (number == 1) {
|
||||
card = topCards.getCards(new FilterInstantOrSorceryCard(), source.getSourceId(), source.getControllerId(), game).iterator().next();
|
||||
} else {
|
||||
Target target = new TargetCard(Zone.LIBRARY, new FilterInstantOrSorceryCard());
|
||||
controller.chooseTarget(outcome, target, source, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterInstantOrSorceryCard());
|
||||
controller.chooseTarget(outcome, topCards, target, source, game);
|
||||
card = topCards.get(target.getFirstTarget(), game);
|
||||
}
|
||||
if (card != null) {
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
package org.mage.test.cards.abilities.enters;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AugurOfBolasTest extends CardTestPlayerBase {
|
||||
|
||||
/*
|
||||
Aether Figment {1}{U}
|
||||
Creature - Illusion
|
||||
1/1
|
||||
Kicker {3} (You may pay an additional as you cast this spell.)
|
||||
Aether Figment can't be blocked.
|
||||
If Aether Figment was kicked, it enters the battlefield with two +1/+1 counters on it.
|
||||
*/
|
||||
@Test
|
||||
public void testEnteringWithCounters() {
|
||||
addCard(Zone.LIBRARY, playerA, "Lightning Bolt", 3);
|
||||
skipInitShuffling();
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
// When Augur of Bolas enters the battlefield, look at the top three cards of your library.
|
||||
// You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
addCard(Zone.HAND, playerA, "Augur of Bolas"); // Creature {1}{U}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Augur of Bolas");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Augur of Bolas", 1);
|
||||
assertHandCount(playerA, "Lightning Bolt", 1);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue