public SplitCard(SplitCard card) { super(card); this.leftHalfCard = card.getLeftHalfCard().copy(); ((SplitCardHalf) leftHalfCard).setParentCard(this); this.rightHalfCard = card.rightHalfCard.copy(); ((SplitCardHalf) rightHalfCard).setParentCard(this); }
public boolean hasTopHalf(Game game) { boolean value = topLastZoneChangeCounter == topHalfCard.getZoneChangeCounter(game) && halves.contains(topHalfCard.getId()); if (!value) { halves.remove(topHalfCard); } return value; }
public void setTopHalfCard(Card topHalfCard, Game game) { this.topHalfCard = topHalfCard; this.topLastZoneChangeCounter = topHalfCard.getZoneChangeCounter(game); halves.add(topHalfCard.getId()); }
@Override public void setZone(Zone zone, Game game) { super.setZone(zone, game); game.setZone(getLeftHalfCard().getId(), zone); game.setZone(getRightHalfCard().getId(), zone); }
public Card getCard() { return CardImpl.createCard(className, new CardSetInfo(name, setCode, cardNumber, rarity, new CardGraphicInfo(FrameStyle.valueOf(frameStyle), variousArt))); }
@Override public int getConvertedManaCost() { if (this.isCopy()) { return 0; } else { return (this.topHalfCard != null ? this.topHalfCard.getConvertedManaCost() : 0) + (this.bottomHalfCard != null ? this.bottomHalfCard.getConvertedManaCost() : 0); } }
@Override public void setCopySourceCard(Card copySourceCard) { if (copySourceCard != null) { this.copySourceCard = copySourceCard.copy(); } }
@Override public void assignNewId() { super.assignNewId(); topHalfCard.assignNewId(); bottomHalfCard.assignNewId(); }
/** * Generates card pool of cardsCount cards that have manacost of allowed * colors. * * @param cardsCount * @param allowedColors * @return */ public static List<Card> generateRandomCardPool(int cardsCount, List<ColoredManaSymbol> allowedColors) { return generateRandomCardPool(cardsCount, allowedColors, false); }
public boolean hasBottomHalf(Game game) { boolean value = bottomLastZoneChangeCounter == bottomHalfCard.getZoneChangeCounter(game) && halves.contains(bottomHalfCard.getId()); if (!value) { halves.remove(bottomHalfCard); } return value; }
public void setBottomHalfCard(Card bottomHalfCard, Game game) { this.bottomHalfCard = bottomHalfCard; this.bottomLastZoneChangeCounter = bottomHalfCard.getZoneChangeCounter(game); halves.add(bottomHalfCard.getId()); }
@Override public void assignNewId() { super.assignNewId(); leftHalfCard.assignNewId(); rightHalfCard.assignNewId(); }