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:
parent
c6dd9a2621
commit
be7dea2d16
1 changed files with 8 additions and 4 deletions
|
@ -22,10 +22,7 @@ import mage.abilities.keyword.*;
|
||||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||||
import mage.abilities.mana.ManaOptions;
|
import mage.abilities.mana.ManaOptions;
|
||||||
import mage.actions.MageDrawAction;
|
import mage.actions.MageDrawAction;
|
||||||
import mage.cards.Card;
|
import mage.cards.*;
|
||||||
import mage.cards.Cards;
|
|
||||||
import mage.cards.CardsImpl;
|
|
||||||
import mage.cards.SplitCard;
|
|
||||||
import mage.cards.decks.Deck;
|
import mage.cards.decks.Deck;
|
||||||
import mage.choices.ChoiceImpl;
|
import mage.choices.ChoiceImpl;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
@ -3414,6 +3411,13 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
for (Ability ability : playableAbilities) {
|
for (Ability ability : playableAbilities) {
|
||||||
if (ability.getSourceId() != null) {
|
if (ability.getSourceId() != null) {
|
||||||
playableObjects.add(ability.getSourceId());
|
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;
|
return playableObjects;
|
||||||
|
|
Loading…
Add table
Reference in a new issue