Java Code Examples for com.megacrit.cardcrawl.cards.CardGroup#getGroupWithoutBottledCards()

The following examples show how to use com.megacrit.cardcrawl.cards.CardGroup#getGroupWithoutBottledCards() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConsumeRandomCardAction.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
public void update() {
    CardGroup candidateCards = CardGroup.getGroupWithoutBottledCards(pileToConsumeFrom.getPurgeableCards());
    if (!candidateCards.isEmpty()) {
        AbstractCard randomlyChosenCard = candidateCards.getRandomCard(AbstractDungeon.cardRandomRng);
        addToTop(new ConsumeCardAction(randomlyChosenCard));
    }
    isDone = true;
}
 
Example 2
Source File: BottledPlaceholderRelic.java    From StS-DefaultModBase with MIT License 5 votes vote down vote up
@Override
public void onEquip() { // 1. When we acquire the relic
    cardSelected = false; // 2. Tell the relic that we haven't bottled the card yet
    if (AbstractDungeon.isScreenUp) { // 3. If the map is open - hide it.
        AbstractDungeon.dynamicBanner.hide();
        AbstractDungeon.overlayMenu.cancelButton.hide();
        AbstractDungeon.previousScreen = AbstractDungeon.screen;
    }
    AbstractDungeon.getCurrRoom().phase = AbstractRoom.RoomPhase.INCOMPLETE;
    // 4. Set the room to INCOMPLETE - don't allow us to use the map, etc.
    CardGroup group = CardGroup.getGroupWithoutBottledCards(AbstractDungeon.player.masterDeck); // 5. Get a card group of all currently unbottled cards
    AbstractDungeon.gridSelectScreen.open(group, 1, DESCRIPTIONS[3] + name + DESCRIPTIONS[2], false, false, false, false);
    // 6. Open the grid selection screen with the cards from the CardGroup we specified above. The description reads "Select a card to bottle for" + (relic name) + "."
}