Java Code Examples for com.megacrit.cardcrawl.characters.AbstractPlayer#getPower()
The following examples show how to use
com.megacrit.cardcrawl.characters.AbstractPlayer#getPower() .
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: WitheringPatch.java From jorbs-spire-mod with MIT License | 5 votes |
@SpireInsertPatch(locator = Locator.class, localvars = {"damageAmount"}) public static void patch(AbstractPlayer __instance, DamageInfo info, @ByRef int[] damageAmount) { AbstractPower maybeWithering = __instance.getPower(WitheringPower.POWER_ID); if(__instance.hasPower(IntangiblePlayerPower.POWER_ID) && maybeWithering != null) { damageAmount[0] = Math.min(maybeWithering.amount + 1, info.output); } }
Example 2
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 3
Source File: SeekerMod.java From FruityMod-StS with MIT License | 5 votes |
private boolean moreThanXStacks(AbstractPlayer player, String powerID, int stacksWanted) { if (player != null && player.hasPower(powerID) && player.getPower(powerID).amount >= stacksWanted) { return true; } else { return false; } }
Example 4
Source File: Dazed_P.java From FruityMod-StS with MIT License | 5 votes |
private void updateEnigmaValue() { AbstractPlayer p = AbstractDungeon.player; if (p != null) { int enigmaAmount = p.getPower("EnigmaPower").amount; if (this.baseBlock != enigmaAmount || this.baseDamage != enigmaAmount) { this.baseBlock = enigmaAmount; this.baseDamage = enigmaAmount; this.initializeDescription(); } } }
Example 5
Source File: ForcedPresence.java From jorbs-spire-mod with MIT License | 4 votes |
@Override public boolean shouldGlowGold() { AbstractPlayer p = AbstractDungeon.player; return (p.hasPower(IntangiblePlayerPower.POWER_ID) && p.getPower(IntangiblePlayerPower.POWER_ID).amount > 0); }
Example 6
Source File: Vacuum.java From FruityMod-StS with MIT License | 4 votes |
private int GetDebuffCount(AbstractPlayer p, String powerId) { int debuffCount = 0; AbstractPower power = p.getPower(powerId); if (power != null) debuffCount = power.amount; return debuffCount; }