Fixed Ulaire Nartea (and all other cards using Duplicate or Optional effect) to not be able to play cards from discard on Great River
This commit is contained in:
@@ -42,6 +42,11 @@ public class Duplicate implements EffectAppenderProducer {
|
||||
public boolean isPlayableInFull(ActionContext actionContext) {
|
||||
return effectAppender.isPlayableInFull(actionContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayabilityCheckedForEffect() {
|
||||
return effectAppender.isPlayabilityCheckedForEffect();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,15 @@ public class Optional implements EffectAppenderProducer {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayabilityCheckedForEffect() {
|
||||
for (EffectAppender effectAppender : effectAppenders) {
|
||||
if (effectAppender.isPlayabilityCheckedForEffect())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,13 @@ import com.gempukku.lotro.at.AbstractAtTest;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||
import com.gempukku.lotro.logic.decisions.AwaitingDecisionType;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
public class PlayCardFromDiscardAtTest extends AbstractAtTest {
|
||||
@@ -114,4 +116,37 @@ public class PlayCardFromDiscardAtTest extends AbstractAtTest {
|
||||
playerDecided(P2, getCardActionId(P2, "Use The Balrog"));
|
||||
assertEquals(Zone.SHADOW_CHARACTERS, goblinSneakInDiscard.getZone());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ulaireNerteaCantPlayMinionsOnGreatRiver() throws Exception {
|
||||
initializeSimplestGame();
|
||||
|
||||
for (int i=0; i<4; i++) {
|
||||
final PhysicalCardImpl greatRiver = createCard(P1, "1_306");
|
||||
_game.getGameState().addCardToZone(_game, greatRiver, Zone.FREE_CHARACTERS);
|
||||
}
|
||||
|
||||
skipMulligans();
|
||||
|
||||
final PhysicalCardImpl greatRiver = createCard(P2, "3_118");
|
||||
greatRiver.setSiteNumber(2);
|
||||
_game.getGameState().addCardToZone(_game, greatRiver, Zone.ADVENTURE_PATH);
|
||||
|
||||
final PhysicalCardImpl ulaireNertea = createCard(P2, "1_234");
|
||||
_game.getGameState().addCardToZone(_game, ulaireNertea, Zone.HAND);
|
||||
|
||||
final PhysicalCardImpl goblinRunner = createCard(P2, "1_178");
|
||||
_game.getGameState().addCardToZone(_game, goblinRunner, Zone.DISCARD);
|
||||
|
||||
_game.getGameState().setTwilight(20);
|
||||
|
||||
// Fellowship phase
|
||||
playerDecided(P1, "");
|
||||
|
||||
assertEquals(greatRiver, _game.getGameState().getCurrentSite());
|
||||
|
||||
playerDecided(P2, getCardActionId(P2, "Play Úlairë Nertëa"));
|
||||
|
||||
assertFalse(_userFeedback.getAwaitingDecision(P2).getDecisionType() == AwaitingDecisionType.MULTIPLE_CHOICE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user