mirror of
https://github.com/correl/mage.git
synced 2025-04-10 17:00:08 -09:00
Fixed Bolas's Citadel combo with adventure cards
This commit is contained in:
parent
d271feb0cb
commit
c9ea0f1877
2 changed files with 7 additions and 11 deletions
Mage.Sets/src/mage/cards/b
Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate
|
@ -96,15 +96,14 @@ class BolassCitadelPlayTheTopCardEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
|
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
|
||||||
Card cardOnTop = game.getCard(objectId);
|
Card cardToCheck = game.getCard(objectId);
|
||||||
if (cardOnTop == null) {
|
objectId = game.getCard(objectId).getMainCard().getId(); // for split cards
|
||||||
return false;
|
|
||||||
}
|
if (playerId.equals(source.getControllerId()) && cardToCheck.isOwnedBy(source.getControllerId())) {
|
||||||
if (playerId.equals(source.getControllerId())
|
Player controller = game.getPlayer(cardToCheck.getOwnerId());
|
||||||
&& cardOnTop.isOwnedBy(source.getControllerId())) {
|
|
||||||
Player controller = game.getPlayer(cardOnTop.getOwnerId());
|
|
||||||
if (controller != null
|
if (controller != null
|
||||||
&& cardOnTop.equals(controller.getLibrary().getFromTop(game))) {
|
&& controller.getLibrary().getFromTop(game) != null
|
||||||
|
&& objectId.equals(controller.getLibrary().getFromTop(game).getId())) {
|
||||||
if (affectedAbility instanceof ActivatedAbility) {
|
if (affectedAbility instanceof ActivatedAbility) {
|
||||||
ActivatedAbility activatedAbility = (ActivatedAbility) affectedAbility;
|
ActivatedAbility activatedAbility = (ActivatedAbility) affectedAbility;
|
||||||
// add the life cost first
|
// add the life cost first
|
||||||
|
|
|
@ -32,7 +32,6 @@ public class BolassCitadelTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore("This is broken for now.")
|
|
||||||
public void testCastAdventure() {
|
public void testCastAdventure() {
|
||||||
/*
|
/*
|
||||||
* Curious Pair {1}{G}
|
* Curious Pair {1}{G}
|
||||||
|
@ -44,7 +43,6 @@ public class BolassCitadelTest extends CardTestPlayerBase {
|
||||||
* Create a Food token.
|
* Create a Food token.
|
||||||
*/
|
*/
|
||||||
setStrictChooseMode(true);
|
setStrictChooseMode(true);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Forest");
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Bolas's Citadel");
|
addCard(Zone.BATTLEFIELD, playerA, "Bolas's Citadel");
|
||||||
removeAllCardsFromLibrary(playerA);
|
removeAllCardsFromLibrary(playerA);
|
||||||
addCard(Zone.LIBRARY, playerA, "Curious Pair");
|
addCard(Zone.LIBRARY, playerA, "Curious Pair");
|
||||||
|
@ -54,7 +52,6 @@ public class BolassCitadelTest extends CardTestPlayerBase {
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertAllCommandsUsed();
|
assertAllCommandsUsed();
|
||||||
assertTapped("Forest", false);
|
|
||||||
assertHandCount(playerA, 0);
|
assertHandCount(playerA, 0);
|
||||||
assertPermanentCount(playerA, "Food", 1);
|
assertPermanentCount(playerA, "Food", 1);
|
||||||
assertExileCount(playerA, "Curious Pair", 1);
|
assertExileCount(playerA, "Curious Pair", 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue