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

The following examples show how to use com.megacrit.cardcrawl.cards.AbstractCard#initializeDescription() . 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: FixModifyBlockActionCardDescriptionPatch.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
@SpirePostfixPatch
public static void Postfix(ModifyBlockAction __this) {
    UUID uuid = ReflectionUtils.getPrivateField(__this, ModifyBlockAction.class, "uuid");
    for (AbstractCard instance : GetAllInBattleInstances.get(uuid)) {
        instance.applyPowers();
        instance.initializeDescription();
    }
}
 
Example 2
Source File: ExhaustiveVariable.java    From StSLib with MIT License 5 votes vote down vote up
public static void increment(AbstractCard card)
{
    if (AbstractDungeon.player.hasPower(ExhaustiveNegationPower.POWER_ID)) {
        AbstractDungeon.player.getPower(ExhaustiveNegationPower.POWER_ID).onSpecificTrigger();
        return;
    }
    ExhaustiveField.ExhaustiveFields.exhaustive.set(card, ExhaustiveField.ExhaustiveFields.exhaustive.get(card) - 1);
    if (ExhaustiveField.ExhaustiveFields.exhaustive.get(card) <= 0) {
        card.exhaust = true;
    }
    card.initializeDescription();
}
 
Example 3
Source File: OpenEtherealFix.java    From FruityMod-StS with MIT License 5 votes vote down vote up
@SpireInsertPatch(rloc = 17, localvars = {"c", "toAdd"})
public static void Insert(Object __obj_instance, AbstractCard c, AbstractCard toAdd) {
    if (!toAdd.isEthereal && c.isEthereal) {
        toAdd.isEthereal = true;
        toAdd.rawDescription = "Ethereal. " + toAdd.rawDescription;
        toAdd.initializeDescription();
    }
}
 
Example 4
Source File: Brainstorm.java    From FruityMod-StS with MIT License 5 votes vote down vote up
@Override
public void use(AbstractPlayer p, AbstractMonster m) {
    AbstractCard c = AbstractDungeon.returnTrulyRandomCardInCombat();
    if (!c.isEthereal) {
        c.isEthereal = true;
        c.rawDescription = "Ethereal. NL " + c.rawDescription;
        c.initializeDescription();
    }
    c.freeToPlayOnce = true;
    AbstractDungeon.actionManager.addToBottom(new MakeTempCardInDrawPileAction(c, 1, false, true));
}
 
Example 5
Source File: ExhaustiveVariable.java    From StSLib with MIT License 4 votes vote down vote up
public static void setBaseValue(AbstractCard card, int amount)
{
    ExhaustiveField.ExhaustiveFields.baseExhaustive.set(card, amount);
    ExhaustiveField.ExhaustiveFields.exhaustive.set(card, amount);
    card.initializeDescription();
}
 
Example 6
Source File: RefundVariable.java    From StSLib with MIT License 4 votes vote down vote up
public static void setBaseValue(AbstractCard card, int amount)
{
    RefundFields.baseRefund.set(card, amount);
    RefundFields.refund.set(card, amount);
    card.initializeDescription();
}