Java Code Examples for com.megacrit.cardcrawl.cards.AbstractCard#superFlash()

The following examples show how to use com.megacrit.cardcrawl.cards.AbstractCard#superFlash() . 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: PrideMemory.java    From jorbs-spire-mod with MIT License 6 votes vote down vote up
@Override
public void onVictory() {
    if (isPassiveEffectActive()) {
        CardGroup masterDeckCandidates = new CardGroup(CardGroup.CardGroupType.UNSPECIFIED);
        for (AbstractCard c : AbstractDungeon.player.masterDeck.group) {
            if (c.canUpgrade()) {
                masterDeckCandidates.addToBottom(c);
            }
        }

        if (!masterDeckCandidates.isEmpty()) {
            AbstractCard masterDeckCard = masterDeckCandidates.getRandomCard(AbstractDungeon.cardRandomRng);
            masterDeckCard.upgrade();
            masterDeckCard.superFlash();
            EffectUtils.addPermanentCardUpgradeEffect(masterDeckCard);
        }
    }
}
 
Example 2
Source File: CoronaAction.java    From FruityMod-StS with MIT License 6 votes vote down vote up
private void findAndModifyCard(boolean better) {
    AbstractCard c = this.p.hand.getRandomCard(false);
    if (better) {
        if (c.costForTurn > 0 && c.isEthereal) {
            c.costForTurn = 0;
            c.isCostModified = true;
            c.superFlash(Color.GOLD.cpy());
        } else {
            this.findAndModifyCard(better);
        }
    } else if (c.cost > 0 && c.isEthereal) {
        c.costForTurn = 0;
        c.isCostModified = true;
        c.superFlash(Color.GOLD.cpy());
    } else {
        this.findAndModifyCard(better);
    }
}
 
Example 3
Source File: WrathMemory.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
public static void permanentlyIncreaseCardDamage(AbstractCard card) {
    AbstractPlayer p = AbstractDungeon.player;
    String logPrefix = "Wrath: permanentlyIncreaseCardDamage: " + card.cardID + " (" + card.uuid + "): ";

    if (!isUpgradeCandidate(card)) {
        JorbsMod.logger.error(logPrefix + "attempting to upgrade non-upgrade-candidate?");
        return;
    }

    JorbsMod.logger.info(logPrefix + "Increasing baseDamage by " + DAMAGE_INCREASE_PER_KILL + " from " + card.baseDamage);

    AbstractCard cardToShowForVfx = card;
    AbstractCard masterCard = StSLib.getMasterDeckEquivalent(card);
    if (masterCard != null) {
        masterCard.baseDamage += DAMAGE_INCREASE_PER_KILL;
        if (usesMiscToTrackPermanentBaseDamage(masterCard)) {
            masterCard.misc += DAMAGE_INCREASE_PER_KILL;
        }
        WrathField.wrathEffectCount.set(masterCard, WrathField.wrathEffectCount.get(masterCard) + 1);
        masterCard.superFlash();
        cardToShowForVfx = masterCard;
    }

    for (AbstractCard instance : GetAllInBattleInstances.get(card.uuid)) {
        instance.baseDamage += DAMAGE_INCREASE_PER_KILL;
        if (usesMiscToTrackPermanentBaseDamage(instance)) {
            instance.misc += DAMAGE_INCREASE_PER_KILL;
        }
        WrathField.wrathEffectCount.set(instance, WrathField.wrathEffectCount.get(instance) + 1);
        instance.applyPowers();
    }

    EffectUtils.addWrathCardUpgradeEffect(cardToShowForVfx);
}
 
Example 4
Source File: SeekerMod.java    From FruityMod-StS with MIT License 5 votes vote down vote up
@Override
public void receivePostDraw(AbstractCard c) {
    if (c instanceof Convergence) {
        c.superFlash();
        if (c.upgraded) {
            AbstractDungeon.actionManager.addToTop(new DrawCardAction(AbstractDungeon.player, 1));
        }
        AbstractDungeon.actionManager.addToBottom(new WaitAction(Settings.ACTION_DUR_FAST));
        AbstractDungeon.actionManager.addToBottom(new ConvergenceAction(c.upgraded));
    }
}