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

The following examples show how to use com.megacrit.cardcrawl.cards.AbstractCard#setCostForTurn() . 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: PathosPower.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
@Override
public void onInitialApplication() {

    for (AbstractCard c : AbstractDungeon.player.hand.group) {
        c.setCostForTurn(-9);
    }
}
 
Example 2
Source File: StrokeOfGenius.java    From FruityMod-StS with MIT License 5 votes vote down vote up
@Override
public void optionSelected(AbstractPlayer p, AbstractMonster m, int i) {
    CardType type;
    switch (i) {
        case 0:
            type = CardType.ATTACK;
            break;
        case 1:
            type = CardType.SKILL;
            break;
        case 2:
            type = CardType.POWER;
            break;
        default:
            return;
    }

    AbstractCard c;
    if (type == CardType.ATTACK) {
        c = AbstractDungeon.returnTrulyRandomCardInCombat(CardType.ATTACK).makeCopy();
    } else if (type == CardType.SKILL) {
        c = AbstractDungeon.returnTrulyRandomCardInCombat(CardType.SKILL).makeCopy();
    } else {
        c = AbstractDungeon.returnTrulyRandomCardInCombat(CardType.POWER).makeCopy();
    }
    AbstractDungeon.actionManager.addToBottom(new MakeTempCardInHandAction(c, true));
    c.setCostForTurn(0);
}
 
Example 3
Source File: VigorPower.java    From FruityMod-StS with MIT License 5 votes vote down vote up
private void updateCardCost(AbstractCard c, boolean forceUpdate) {
    if (c.isEthereal && (AbstractDungeon.player.hasPower("VigorPower") || forceUpdate)) {
        if (c.isCostModifiedForTurn) {
            c.setCostForTurn(c.costForTurn - this.amount);
        } else {
            c.setCostForTurn(c.cost - this.amount);
        }
    }
}
 
Example 4
Source File: PathosPatch.java    From jorbs-spire-mod with MIT License 4 votes vote down vote up
@SpirePostfixPatch
public static void Postfix(CardGroup __this, AbstractCard c) {
    if (AbstractDungeon.player.hasPower(PathosPower.POWER_ID)) {
        c.setCostForTurn(-9);
    }
}
 
Example 5
Source File: PathosPower.java    From jorbs-spire-mod with MIT License 4 votes vote down vote up
@Override
public void onCardDraw(AbstractCard card) {
    card.setCostForTurn(-9);
}