com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction Java Examples
The following examples show how to use
com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction.
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: ShrapnelBloomPower.java From jorbs-spire-mod with MIT License | 6 votes |
@Override public void onUseCard(AbstractCard card, UseCardAction action) { if (!card.purgeOnUse && this.amount > 0 && !card.hasTag(LEGENDARY)) { this.flash(); action.exhaustCard = true; // this is what corruption does SelfExertField.selfExert.set(card, true); AbstractMonster m = (AbstractMonster)action.target; for (int i = 0; i < amount; ++i) { CardMetaUtils.playCardAdditionalTime(card, m); } addToBot(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID)); } }
Example #2
Source File: Convergence.java From FruityMod-StS with MIT License | 6 votes |
@Override public void use(AbstractPlayer p, AbstractMonster m) { int totalPowerCount = 0; for (AbstractMonster mo : AbstractDungeon.getCurrRoom().monsters.monsters) { int powerCount = GetPowerCount(mo, "Artifact"); if (powerCount == 0) continue; totalPowerCount += powerCount; AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(mo, p, "Artifact")); } AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new ArtifactPower(p, ARTIFACT_AMT), ARTIFACT_AMT)); if (totalPowerCount > 0) { AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new ArtifactPower(p, totalPowerCount), totalPowerCount)); } }
Example #3
Source File: Vacuum.java From FruityMod-StS with MIT License | 6 votes |
@Override public void use(AbstractPlayer p, AbstractMonster m) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Weakened")); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Frail")); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Vulnerable")); if (m != null) { AbstractDungeon.actionManager.addToBottom(new VFXAction(new VerticalImpactEffect(m.hb.cX + m.hb.width / 4.0f, m.hb.cY - m.hb.height / 4.0f))); } AbstractDungeon.actionManager.addToBottom( new DamageAction(m, new DamageInfo(p, this.damage, this.damageTypeForTurn), AbstractGameAction.AttackEffect.BLUNT_HEAVY)); this.rawDescription = (this.isEthereal ? "Ethereal. NL " : "") + DESCRIPTION; initializeDescription(); }
Example #4
Source File: FlowPower.java From FruityMod-StS with MIT License | 6 votes |
@Override public void onAfterUseCard(AbstractCard card, UseCardAction action) { super.onAfterUseCard(card, action); if ( (owner.hasPower("Tranquil_AttunedAttackPower") && card.type == AbstractCard.CardType.ATTACK) //|| (owner.hasPower("Tranquil_AttunedSkillPower") && card.type == AbstractCard.CardType.SKILL) ) { this.amount++; AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(owner, owner, new StrengthPower(owner, 1), 1)); AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(owner, owner, new DexterityPower(owner, 1), 1)); } else { AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(owner, owner, new StrengthPower(owner, -1 * amount), -1 * amount)); AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(owner, owner, new DexterityPower(owner, -1 * amount), -1 * amount)); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(owner, owner, this)); } }
Example #5
Source File: PlayNextCardThisTurnAdditionalTimesPower.java From jorbs-spire-mod with MIT License | 5 votes |
public void onUseCard(AbstractCard card, UseCardAction action) { if (!card.purgeOnUse && this.amount > 0) { this.flash(); AbstractMonster m = (AbstractMonster)action.target; for (int i = 0; i < amount; ++i) { CardMetaUtils.playCardAdditionalTime(card, m); } AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID)); } }
Example #6
Source File: ForcedPresence.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void use(AbstractPlayer p, AbstractMonster abstractMonster) { if (p.hasPower(IntangiblePlayerPower.POWER_ID) && p.getPower(IntangiblePlayerPower.POWER_ID).amount > 0) { AbstractPower power = p.getPower(IntangiblePlayerPower.POWER_ID); if (power.amount == 1) { this.addToBot(new RemoveSpecificPowerAction(p, p, power)); } else { this.addToBot(new ReducePowerAction(p, p, power, magicNumber)); } addToBot(new GainEnergyAction(urMagicNumber)); } }
Example #7
Source File: MindGlassPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void onGainClarity(String id) { AbstractDungeon.actionManager.addToBottom( new DamageAllEnemiesAction( null, DamageInfo.createDamageMatrix(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_HEAVY)); AbstractDungeon.actionManager.addToBottom( new RemoveSpecificPowerAction(this.owner, this.owner, MindGlassPower.POWER_ID)); }
Example #8
Source File: DamnationPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void onUseCard(AbstractCard card, UseCardAction action) { if (!card.purgeOnUse && StSLib.getMasterDeckEquivalent(card) != null) { CardMetaUtils.destroyCardPermanently(card); AbstractDungeon.transformCard(card, isAutoUpgrade, AbstractDungeon.miscRng); AbstractDungeon.topLevelEffectsQueue.add(new ShowCardAndObtainEffect(AbstractDungeon.getTransformedCard(), Settings.WIDTH / 2.0F, Settings.HEIGHT / 2.0F, false)); } addToTop(new RemoveSpecificPowerAction(owner, owner, this.ID)); }
Example #9
Source File: DoubleCheckPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atStartOfTurn() { MemoryManager mm = MemoryManager.forPlayer(owner); if (mm != null && mm.isRemembering(DiligenceMemory.STATIC.ID)) { this.flash(); AbstractDungeon.actionManager.addToBottom(new GainClarityOfCurrentMemoryAction(owner)); } AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this)); }
Example #10
Source File: CoilPower.java From jorbs-spire-mod with MIT License | 5 votes |
private void consumeCoilForDamage() { this.flash(); if (!AbstractDungeon.getMonsters().areMonstersBasicallyDead()) { AbstractDungeon.actionManager.addToBottom( new DamageAllEnemiesAction(owner, DamageInfo.createDamageMatrix(calculateDamage(), true), DamageInfo.DamageType.THORNS, AttackEffect.SLASH_HORIZONTAL)); AbstractDungeon.actionManager.addToBottom( new RemoveSpecificPowerAction(owner, owner, CoilPower.POWER_ID)); } }
Example #11
Source File: EntombedGrimDirgePower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atStartOfTurn() { // Note, the turn counter appears off by one because it isn't incremented til after start-of-turn powers are applied. // However, on the first turn, turn is set to 1. amount = turnToExhume - GameActionManager.turn - (isFirstTurn ? 0 : 1); updateDescription(); isFirstTurn = false; if (amount <= 0) { flash(); addToBot(new ExhumeCardsAction(cardToExhume)); addToBot(new RemoveSpecificPowerAction(AbstractDungeon.player, AbstractDungeon.player, this)); } }
Example #12
Source File: ExhaustiveNegationPower.java From StSLib with MIT License | 5 votes |
public void onSpecificTrigger() { flash(); if (amount <= 0) { AbstractDungeon.actionManager.addToTop(new RemoveSpecificPowerAction(owner, owner, ID)); } else { AbstractDungeon.actionManager.addToTop(new ReducePowerAction(owner, owner, ID, 1)); } }
Example #13
Source File: StunMonsterPower.java From StSLib with MIT License | 5 votes |
@Override public void atEndOfRound() { if (amount <= 0) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(owner, owner, this)); } else { AbstractDungeon.actionManager.addToBottom(new ReducePowerAction(owner, owner, this, 1)); } }
Example #14
Source File: AttunedAttackPower.java From FruityMod-StS with MIT License | 5 votes |
@Override public void onAfterUseCard(AbstractCard card, UseCardAction action) { super.onAfterUseCard(card, action); if (card.type != AbstractCard.CardType.ATTACK) { // remove all FlowPower and this power AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this)); } }
Example #15
Source File: Transference.java From FruityMod-StS with MIT License | 5 votes |
@Override public void use(AbstractPlayer p, AbstractMonster m) { int powerCount = GetPowerCount(p, "Weakened"); if (powerCount > 0) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Weakened")); AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new WeakPower(m, powerCount, false), powerCount)); } powerCount = GetPowerCount(p, "Vulnerable"); if (powerCount > 0) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Vulnerable")); AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new VulnerablePower(m, powerCount, false), powerCount)); } AbstractDungeon.actionManager.addToBottom(new DrawCardAction(p, this.magicNumber)); }
Example #16
Source File: Feedback.java From FruityMod-StS with MIT License | 5 votes |
@Override public void use(AbstractPlayer p, AbstractMonster m) { int debuffCount = GetPowerCount(m, "Weakened") + GetPowerCount(m, "Vulnerable"); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, "Weakened")); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(m, p, "Vulnerable")); this.baseDamage = this.magicNumber * debuffCount; AbstractDungeon.actionManager.addToTop(new LoseHPAction(m, m, this.baseDamage)); }
Example #17
Source File: MindOverMatter.java From FruityMod-StS with MIT License | 5 votes |
@Override public void use(AbstractPlayer p, AbstractMonster m) { int frailCount = GetPowerCount(p, "Frail"); int weakCount = GetPowerCount(p, "Weakened"); int vulnCount = GetPowerCount(p, "Vulnerable"); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Frail")); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Weakened")); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(p, p, "Vulnerable")); AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p, p, ((frailCount + weakCount + vulnCount) * this.magicNumber) + BLOCK_AMT)); }
Example #18
Source File: FlowPower.java From FruityMod-StS with MIT License | 5 votes |
@Override public void atStartOfTurn() { if (((AbstractPlayer) this.owner).getRelic("Ice Cream") == null) { AbstractDungeon.actionManager.addToBottom(new GainEnergyAction(energyRetained)); } --this.amount; this.energyRetained = 0; if (this.amount == 0 && ((AbstractPlayer) this.owner).getRelic("Ice Cream") == null) { this.flash(); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, "FlowPower")); } }
Example #19
Source File: RetrogradeUpgradedPower.java From FruityMod-StS with MIT License | 5 votes |
@Override public void atEndOfTurn(boolean isPlayer) { if (isPlayer) this.flash(); AbstractCard toAdd = new Retrograde(); toAdd.upgrade(); AbstractDungeon.actionManager.addToBottom(new MakeTempCardInDrawPileAction(toAdd, this.amount, true, true)); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(AbstractDungeon.player, AbstractDungeon.player, "RetrogradeUpgradedPower")); }
Example #20
Source File: EtherealizePower.java From FruityMod-StS with MIT License | 5 votes |
@Override public void atEndOfTurn(boolean isPlayer) { if (isPlayer) { AbstractDungeon.actionManager.addToTop(new ExhaustAllEtherealAction()); } AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, "EtherealizePower")); }
Example #21
Source File: FlickerPower.java From FruityMod-StS with MIT License | 5 votes |
@Override public void atEndOfRound() { if (this.justApplied) { this.justApplied = false; return; } if (this.amount == 0) { AbstractDungeon.actionManager .addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, "Flicker")); } else { AbstractDungeon.actionManager .addToBottom(new ReducePowerAction(this.owner, this.owner, "Flicker", 1)); } }
Example #22
Source File: RetrogradePower.java From FruityMod-StS with MIT License | 5 votes |
@Override public void atEndOfTurn(boolean isPlayer) { if (isPlayer) this.flash(); AbstractDungeon.actionManager.addToBottom(new MakeTempCardInDrawPileAction(new Retrograde(), this.amount, true, true)); AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(AbstractDungeon.player, AbstractDungeon.player, "RetrogradePower")); }
Example #23
Source File: MustClarifyBeforeRememberingNewMemoriesPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void onGainClarity(String id) { if (id.equals(memoryIDThatMustBeClarified)) { // addToTop is required for cards that gain clarity and then remember something else, like EyeOfTheStorm AbstractDungeon.actionManager.addToTop(new RemoveSpecificPowerAction(owner, owner, POWER_ID)); } }
Example #24
Source File: BurningPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atEndOfRound() { if (this.justApplied) { this.justApplied = false; } else { if (this.amount <= 0) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, POWER_ID)); } } }
Example #25
Source File: SpiritShieldPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atStartOfTurn() { if (this.amount == 1) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID)); } else { AbstractDungeon.actionManager.addToBottom(new ReducePowerAction(this.owner, this.owner, this.ID, 1)); } }
Example #26
Source File: PlayNextAttackThisTurnAdditionalTimesPower.java From jorbs-spire-mod with MIT License | 5 votes |
public void onUseCard(AbstractCard card, UseCardAction action) { if (!card.purgeOnUse && card.type == AbstractCard.CardType.ATTACK && this.amount > 0) { this.flash(); AbstractMonster m = (AbstractMonster)action.target; for (int i = 0; i < amount; ++i) { CardMetaUtils.playCardAdditionalTime(card, m); } AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID)); } }
Example #27
Source File: MirrorPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atStartOfTurn() { if (this.amount == 1) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID)); } else { AbstractDungeon.actionManager.addToBottom(new ReducePowerAction(this.owner, this.owner, this.ID, 1)); } }
Example #28
Source File: BanishedPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atEndOfTurn(boolean isPlayer) { this.flash(); if (this.amount == 0) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID)); } else { AbstractDungeon.actionManager.addToBottom(new ReducePowerAction(this.owner, this.owner, this.ID, 1)); } }
Example #29
Source File: PathosPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void atEndOfTurn(boolean isPlayer) { if (this.amount == 0) { AbstractDungeon.actionManager.addToBottom(new RemoveSpecificPowerAction(this.owner, this.owner, this.ID)); } else { AbstractDungeon.actionManager.addToBottom(new ReducePowerAction(this.owner, this.owner, this.ID, 1)); } }
Example #30
Source File: BlackTentaclesPower.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void onInitialApplication() { // only 1 target can have this power at a time; subsequent uses of the card will overwrite the old effect for(AbstractMonster m : AbstractDungeon.getMonsters().monsters) { for (AbstractPower p : m.powers) { if (p.ID.equals(this.ID) && p != this) { AbstractDungeon.actionManager.addToTop(new RemoveSpecificPowerAction(m, source, p)); } } } }