mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 01:38:13 +00:00
Card.java: add exiledCards CardCollection
This commit is contained in:
@@ -109,7 +109,8 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
private final Table<Long, Long, List<String>> hiddenExtrinsicKeywords = TreeBasedTable.create();
|
private final Table<Long, Long, List<String>> hiddenExtrinsicKeywords = TreeBasedTable.create();
|
||||||
|
|
||||||
// cards attached or otherwise linked to this card
|
// cards attached or otherwise linked to this card
|
||||||
private CardCollection hauntedBy, devouredCards, exploitedCards, delvedCards, convokedCards, imprintedCards, encodedCards;
|
private CardCollection hauntedBy, devouredCards, exploitedCards, delvedCards, convokedCards, imprintedCards,
|
||||||
|
exiledCards, encodedCards;
|
||||||
private CardCollection gainControlTargets, chosenCards;
|
private CardCollection gainControlTargets, chosenCards;
|
||||||
private CardCollection mergedCards;
|
private CardCollection mergedCards;
|
||||||
private Map<Long, CardCollection> mustBlockCards = Maps.newHashMap();
|
private Map<Long, CardCollection> mustBlockCards = Maps.newHashMap();
|
||||||
@@ -1082,6 +1083,31 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
imprintedCards = view.clearCards(imprintedCards, TrackableProperty.ImprintedCards);
|
imprintedCards = view.clearCards(imprintedCards, TrackableProperty.ImprintedCards);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final CardCollectionView getExiledCards() {
|
||||||
|
return CardCollection.getView(exiledCards);
|
||||||
|
}
|
||||||
|
public final boolean hasExiledCard() {
|
||||||
|
return FCollection.hasElements(exiledCards);
|
||||||
|
}
|
||||||
|
public final boolean hasExiledCard(Card c) {
|
||||||
|
return FCollection.hasElement(exiledCards, c);
|
||||||
|
}
|
||||||
|
public final void addExiledCard(final Card c) {
|
||||||
|
exiledCards = view.addCard(exiledCards, c, TrackableProperty.ExiledCards);
|
||||||
|
}
|
||||||
|
public final void addExiledCards(final Iterable<Card> cards) {
|
||||||
|
exiledCards = view.addCards(exiledCards, cards, TrackableProperty.ExiledCards);
|
||||||
|
}
|
||||||
|
public final void removeExiledCard(final Card c) {
|
||||||
|
exiledCards = view.removeCard(exiledCards, c, TrackableProperty.ExiledCards);
|
||||||
|
}
|
||||||
|
public final void removeExiledCards(final Iterable<Card> cards) {
|
||||||
|
exiledCards = view.removeCards(exiledCards, cards, TrackableProperty.ExiledCards);
|
||||||
|
}
|
||||||
|
public final void clearExiledCards() {
|
||||||
|
exiledCards = view.clearCards(exiledCards, TrackableProperty.ExiledCards);
|
||||||
|
}
|
||||||
|
|
||||||
public final CardCollectionView getEncodedCards() {
|
public final CardCollectionView getEncodedCards() {
|
||||||
return CardCollection.getView(encodedCards);
|
return CardCollection.getView(encodedCards);
|
||||||
}
|
}
|
||||||
@@ -1686,6 +1712,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exiledWith.removeExiledCard(this);
|
||||||
exiledWith.removeUntilLeavesBattlefield(this);
|
exiledWith.removeUntilLeavesBattlefield(this);
|
||||||
|
|
||||||
exiledWith = null;
|
exiledWith = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user