1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-10 01:01:05 -09:00

* UI: fixed that split cards doesn't marks as playable;

This commit is contained in:
Oleg Agafonov 2019-12-11 04:44:25 +04:00
parent c6dd9a2621
commit be7dea2d16

View file

@ -22,10 +22,7 @@ import mage.abilities.keyword.*;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.abilities.mana.ManaOptions;
import mage.actions.MageDrawAction;
import mage.cards.Card;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.SplitCard;
import mage.cards.*;
import mage.cards.decks.Deck;
import mage.choices.ChoiceImpl;
import mage.constants.*;
@ -3414,6 +3411,13 @@ public abstract class PlayerImpl implements Player, Serializable {
for (Ability ability : playableAbilities) {
if (ability.getSourceId() != null) {
playableObjects.add(ability.getSourceId());
// main card must be marked playable in GUI
MageObject object = game.getObject(ability.getSourceId());
if (object instanceof SplitCardHalf) {
UUID splitCardId = ((Card) object).getMainCard().getId();
playableObjects.add(splitCardId);
}
}
}
return playableObjects;