* GUI: fixed that look at and reveals dialogs doesn't show card's playable status;

This commit is contained in:
Oleg Agafonov 2021-07-21 03:34:43 +04:00
parent 96ca260109
commit f48da4c923
4 changed files with 73 additions and 24 deletions

View file

@ -3646,15 +3646,17 @@ public abstract class PlayerImpl implements Player, Serializable {
}
}
// check to play companion cards
// outside cards
if (fromAll || fromZone == Zone.OUTSIDE) {
// companion cards
for (Cards companionCards : game.getState().getCompanion().values()) {
for (Card card : companionCards.getCards(game)) {
getPlayableFromObjectAll(game, Zone.OUTSIDE, card, availableMana, playable);
}
}
// Check sideboard. Ex: Wish lets player play cards directly from sideboard.
for (UUID sideboardCardId : getSideboard()) {
// sideboard cards (example: Wish)
for (UUID sideboardCardId : this.getSideboard()) {
Card sideboardCard = game.getCard(sideboardCardId);
if (sideboardCard != null) {
getPlayableFromObjectAll(game, Zone.OUTSIDE, sideboardCard, availableMana, playable);