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

The following examples show how to use com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction. 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: MindGlassRelic.java    From jorbs-spire-mod with MIT License 6 votes vote down vote up
@Override
public void onGainClarity(String id) {
    ++this.counter;
    this.flash();
    if (this.counter == 10) {
        this.stopPulse();
    } else if (this.counter == 9) {
        AbstractDungeon.actionManager.addToBottom(new RelicAboveCreatureAction(AbstractDungeon.player, this));
        AbstractDungeon.actionManager.addToBottom(
                new ApplyPowerAction(
                        AbstractDungeon.player,
                        AbstractDungeon.player,
                        new MindGlassPower(AbstractDungeon.player, TEN_CLARITY_DAMAGE),
                        1,
                        true));
    }
    AbstractDungeon.actionManager.addToBottom(
            new DamageAllEnemiesAction(
                    null,
                    DamageInfo.createDamageMatrix(ONE_CLARITY_DAMAGE, true),
                    DamageInfo.DamageType.NORMAL,
                    // TODO: More impactful and relevant FX. See FlashAtkImgEffect.loadImage() and
                    //  FlashAtkImgEffect.playSound() for usage of AttackEffect in base game.
                    AbstractGameAction.AttackEffect.BLUNT_LIGHT));
}
 
Example #2
Source File: MindPalaceRelic.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
@Override
public void atBattleStartPreDraw() {
    if (trackedMemoryID != null) {
        this.flash();
        AbstractDungeon.actionManager.addToBottom(new RelicAboveCreatureAction(AbstractDungeon.player, this));
        // We intentionally do this directly rather than via a GainClarity action because we want it to be
        // present before any onStartOfTurn callbacks get invoked (and for Sloth, before start-of-turn draw/energy
        // effects happen)
        MemoryManager.forPlayer(AbstractDungeon.player).gainClarity(trackedMemoryID);
        trackedMemoryID = null;
    }
}
 
Example #3
Source File: GrimoireRelic.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
@Override
public void onVictory() {
    this.counter = -1;
    this.stopPulse();

    this.flash();
    AbstractDungeon.actionManager.addToTop(new RelicAboveCreatureAction(AbstractDungeon.player, this));
    AbstractPlayer p = AbstractDungeon.player;

    if (p.currentHealth > 0) {
        p.heal(MemoryManager.forPlayer(p).countCurrentClarities() * HEAL_PER_CLARITY);
    }
}
 
Example #4
Source File: RodOfNegation.java    From FruityMod-StS with MIT License 5 votes vote down vote up
@Override
public void atBattleStart() {
    AbstractDungeon.actionManager.addToBottom(
            new RelicAboveCreatureAction(AbstractDungeon.player, this));
    this.flash();
    AbstractPlayer p = AbstractDungeon.player;
    AbstractDungeon.actionManager.addToBottom(new DiscardWithCallbackAction(
            p, p, DISCARD_AMT, false, true, false, false, new IDiscardCallback() {
        @Override
        public void processCard(AbstractCard c) {
            AbstractDungeon.actionManager.addToTop(
                    new ApplyPowerAction(p, p, new ArtifactPower(p, ARTIFACT_PER_DISCARD), ARTIFACT_PER_DISCARD));
        }
    }));
}
 
Example #5
Source File: Telescope.java    From FruityMod-StS with MIT License 5 votes vote down vote up
@Override
public void atBattleStart() {
    AbstractDungeon.actionManager.addToBottom(
            new RelicAboveCreatureAction(AbstractDungeon.player, this));
    this.flash();
    AbstractDungeon.actionManager.addToBottom(new TelescopeAction());
}
 
Example #6
Source File: BottledMemoryRelic.java    From jorbs-spire-mod with MIT License 4 votes vote down vote up
@Override
public void atBattleStart() {
    flash();
    addToTop(new RelicAboveCreatureAction(AbstractDungeon.player, this));
}
 
Example #7
Source File: PlaceholderRelic2.java    From StS-DefaultModBase with MIT License 4 votes vote down vote up
@Override
public void atBattleStart() {
    flash();
    AbstractDungeon.actionManager.addToTop(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new StrengthPower(AbstractDungeon.player, 1), 1));
    AbstractDungeon.actionManager.addToTop(new RelicAboveCreatureAction(AbstractDungeon.player, this));
}