com.megacrit.cardcrawl.relics.ChemicalX Java Examples

The following examples show how to use com.megacrit.cardcrawl.relics.ChemicalX. 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: Cyclone.java    From jorbs-spire-mod with MIT License 6 votes vote down vote up
@Override
public void use(AbstractPlayer p, AbstractMonster m) {
    Runnable onKillEffect = () -> addToBot(new GainEnergyAction(this.magicNumber));

    int effect = EnergyPanel.totalCount;
    if (this.energyOnUse != -1) {
        effect = this.energyOnUse;
    }

    if (AbstractDungeon.player.hasRelic(ChemicalX.ID)) {
        effect += 2;
        AbstractDungeon.player.getRelic(ChemicalX.ID).flash();
    }

    for (int i = 0; i < effect; i++) {
        this.addToBot(new DamageAllEnemiesWithOnKillEffectAction(p, this.multiDamage, this.damageType, AbstractGameAction.AttackEffect.SLASH_HORIZONTAL, onKillEffect, true));
    }

    if (!this.freeToPlayOnce) {
        p.energy.use(EnergyPanel.totalCount);
    }

}
 
Example #2
Source File: DrainLife.java    From jorbs-spire-mod with MIT License 6 votes vote down vote up
@Override
public int calculateBonusBaseDamage() {
    int effect = EnergyPanel.totalCount;
    if (this.energyOnUse != -1) {
        effect = this.energyOnUse;
    }

    if (AbstractDungeon.player.hasRelic(ChemicalX.ID)) {
        effect += 2;
    }

    if (this.upgraded) {
        effect += 1;
    }

    return effect;
}
 
Example #3
Source File: PerformXAction.java    From FruityMod-StS with MIT License 6 votes vote down vote up
@Override
public void update() {
    int effect = EnergyPanel.totalCount;
    if (this.baseValue != -1) {
        effect = this.baseValue;
    }

    if (this.p.hasRelic(ChemicalX.ID)) {
        effect += 2;
        this.p.getRelic(ChemicalX.ID).flash();
    }

    XAction.initialize(effect);
    if (XAction.amount > 0) {
        AbstractDungeon.actionManager.addToTop(XAction);
    }

    if (!this.freeToPlayOnce) {
        this.p.energy.use(EnergyPanel.totalCount);
    }
    isDone = true;
}
 
Example #4
Source File: UncommonPowerAction.java    From StS-DefaultModBase with MIT License 6 votes vote down vote up
@Override
public void update() {
    int effect = EnergyPanel.totalCount;
    if (energyOnUse != -1) {
        effect = energyOnUse;
    }
    if (p.hasRelic(ChemicalX.ID)) {
        effect += 2;
        p.getRelic(ChemicalX.ID).flash();
    }
    if (upgraded) {
        ++effect;
    }
    if (effect > 0) {
        for (int i = 0; i < effect; ++i) {
            
            AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p,
                    new CommonPower(p, p, magicNumber), magicNumber,
                    AttackEffect.BLUNT_LIGHT));
        }
        if (!freeToPlayOnce) {
            p.energy.use(EnergyPanel.totalCount);
        }
    }
    isDone = true;
}
 
Example #5
Source File: DrainLife.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
@Override
public void use(AbstractPlayer p, AbstractMonster abstractMonster) {
    if (AbstractDungeon.player.hasRelic(ChemicalX.ID)) {
        AbstractDungeon.player.getRelic(ChemicalX.ID).flash();
    }

    this.addToBot(new DrainLifeAction(abstractMonster, new DamageInfo(p, this.damage, this.damageTypeForTurn)));

    if (!this.freeToPlayOnce) {
        p.energy.use(EnergyPanel.totalCount);
    }
}