com.megacrit.cardcrawl.actions.common.ExhaustSpecificCardAction Java Examples

The following examples show how to use com.megacrit.cardcrawl.actions.common.ExhaustSpecificCardAction. 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: SchoolsOfMagicAction.java    From jorbs-spire-mod with MIT License 6 votes vote down vote up
public void update() {
    Map<String, Integer> countsByUpgradeInclusiveCardID = new HashMap<>();
    boolean noDuplicates = true;
    for (AbstractCard card : owner.hand.group) {
        String id = UniqueCardUtils.getUpgradeInclusiveCardID(card);
        int count = countsByUpgradeInclusiveCardID.getOrDefault(id, 0);
        if (count == 1) {
            noDuplicates = false;
            AbstractDungeon.actionManager.addToBottom(new ExhaustSpecificCardAction(card, owner.hand, true));
        }
        countsByUpgradeInclusiveCardID.put(id, count + 1);
    }

    if (noDuplicates) {
        AbstractDungeon.actionManager.addToBottom(new GainClarityOfCurrentMemoryAction(owner));
    }

    this.isDone = true;
}
 
Example #2
Source File: ThoughtRaze.java    From FruityMod-StS with MIT License 6 votes vote down vote up
@Override
public void use(AbstractPlayer p, AbstractMonster m) {
    int count = 0;
    for (AbstractCard c : p.drawPile.group) {
        if (c.isEthereal) {
            AbstractDungeon.actionManager.addToBottom(new ExhaustSpecificCardAction(c, p.drawPile));
            count++;
        }
    }

    for (int i = 0; i < count; i++) {
        AbstractDungeon.actionManager.addToBottom(
                new DamageAction((AbstractCreature) m,
                        new DamageInfo(p, this.damage, DamageInfo.DamageType.NORMAL), AbstractGameAction.AttackEffect.SLASH_VERTICAL));
    }
}
 
Example #3
Source File: Tragedy.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
private void exhaustCursesInGroup(CardGroup group) {
    for (AbstractCard c : group.group) {
        if (c.type.equals(CardType.CURSE)) {
            AbstractDungeon.actionManager.addToBottom(new ExhaustSpecificCardAction(c, group));
        }
    }
}
 
Example #4
Source File: ProdigalMemory.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
@Override
public void use(AbstractPlayer p, AbstractMonster abstractMonster) {
    if (this.dontTriggerOnUseCard) {
        SelfExertField.selfExert.set(this, true);
        addToBot(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
    }
    else {
        addToBot(new DrawCardAction(DRAW));
        addToBot(new DecreaseMaxHpAction(p, p, magicNumber, AbstractGameAction.AttackEffect.POISON));
    }
}
 
Example #5
Source File: CustomJorbsModCard.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
@Override
public final void onMoveToDiscard() {
    if (EphemeralField.ephemeral.get(this)) {
        AbstractDungeon.actionManager.addToBottom(new ExhaustSpecificCardAction(this, AbstractDungeon.player.discardPile, true));
    }

    this.onMoveToDiscardImpl();

    energyOnUse = -1;
    setRawDynamicDescriptionSuffix("");
}
 
Example #6
Source File: PurgeMind.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
private void exhaustRememberCardsInGroup(CardGroup group) {
    for (AbstractCard card : group.group) {
        if (card.hasTag(REMEMBER_MEMORY)) {
            AbstractDungeon.actionManager.addToBottom(new ExhaustSpecificCardAction(card, group));
        }
    }
}
 
Example #7
Source File: ModifyExhaustiveAction.java    From StSLib with MIT License 5 votes vote down vote up
public void update()
{
    ExhaustiveField.ExhaustiveFields.exhaustive.set(card, ExhaustiveField.ExhaustiveFields.exhaustive.get(card) + amount);
    if (ExhaustiveField.ExhaustiveFields.exhaustive.get(card) <= 0) {
        AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(card, AbstractDungeon.player.hand));
        AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(card, AbstractDungeon.player.drawPile));
        AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(card, AbstractDungeon.player.discardPile));
    }
    if (this.bound && ExhaustiveField.ExhaustiveFields.exhaustive.get(card) > ExhaustiveField.ExhaustiveFields.baseExhaustive.get(card)) {
        ExhaustiveField.ExhaustiveFields.exhaustive.set(card, ExhaustiveField.ExhaustiveFields.baseExhaustive.get(card));
    }
    card.applyPowers();
    card.initializeDescription();
    isDone = true;
}
 
Example #8
Source File: Singularity.java    From FruityMod-StS with MIT License 4 votes vote down vote up
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #9
Source File: Flux.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #10
Source File: Dazed_P.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #11
Source File: Genesis.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #12
Source File: Entropy.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #13
Source File: PrismaticSphere.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #14
Source File: EtherBlast.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #15
Source File: AstralHaze.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #16
Source File: Convergence.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #17
Source File: MagicMissile.java    From FruityMod-StS with MIT License 4 votes vote down vote up
@Override
public void triggerOnEndOfPlayerTurn() {
    AbstractDungeon.actionManager.addToTop(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}
 
Example #18
Source File: Blasphemer.java    From jorbs-spire-mod with MIT License 4 votes vote down vote up
@Override
public void triggerWhenDrawn() {
    this.addToBot(new MakeTempCardInHandAction(new Smite(), this.magicNumber));
    this.addToBot(new ExhaustSpecificCardAction(this, AbstractDungeon.player.hand));
}