com.megacrit.cardcrawl.helpers.PowerTip Java Examples
The following examples show how to use
com.megacrit.cardcrawl.helpers.PowerTip.
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: PlaceholderPotion.java From StS-DefaultModBase with MIT License | 6 votes |
public PlaceholderPotion() { // The bottle shape and inside is determined by potion size and color. The actual colors are the main DefaultMod.java super(NAME, POTION_ID, PotionRarity.COMMON, PotionSize.M, PotionColor.SMOKE); // Potency is the damage/magic number equivalent of potions. potency = getPotency(); // Initialize the Description description = DESCRIPTIONS[0] + potency + DESCRIPTIONS[2] + DESCRIPTIONS[1] + potency + DESCRIPTIONS[2]; // Do you throw this potion at an enemy or do you just consume it. isThrown = false; // Initialize the on-hover name + description tips.add(new PowerTip(name, description)); }
Example #2
Source File: CommonKeywordIconsPatches.java From StSLib with MIT License | 6 votes |
@SpireInsertPatch( locator = Locator.class, localvars = {"t"} ) public static void patch(SingleCardViewPopup __instance, SpriteBatch sb, ArrayList<PowerTip> t) throws IllegalAccessException { if(cardField == null) { try { cardField = SingleCardViewPopup.class.getDeclaredField("card"); cardField.setAccessible(true); } catch (Exception ignored) {} } AbstractCard c = (AbstractCard) cardField.get(__instance); if(CommonKeywordIconsField.useIcons.get(c)) { workaroundSwitch = true; } }
Example #3
Source File: BottledMemoryRelic.java From jorbs-spire-mod with MIT License | 6 votes |
@Override public void update() { super.update(); if (!this.cardSelected && !AbstractDungeon.gridSelectScreen.selectedCards.isEmpty()) { this.cardSelected = true; this.card = AbstractDungeon.gridSelectScreen.selectedCards.get(0); inBottleMemory.set(card, true); AbstractDungeon.getCurrRoom().phase = AbstractRoom.RoomPhase.COMPLETE; AbstractDungeon.gridSelectScreen.selectedCards.clear(); this.description = this.DESCRIPTIONS[2] + FontHelper.colorString(this.card.name, "y") + this.DESCRIPTIONS[3]; this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); this.initializeTips(); } }
Example #4
Source File: ManifestTopPanelItem.java From jorbs-spire-mod with MIT License | 5 votes |
private ManifestTopPanelItem() { super(IMG, ID); this.setClickable(false); PowerTip manifestTip = new PowerTip(BaseMod.getKeywordTitle("stsjorbsmod:manifest"), BaseMod.getKeywordDescription("stsjorbsmod:manifest")); nonCullTips.add(manifestTip); cullTips.add(manifestTip); cullTips.add(new PowerTip(TEXT[0], TEXT[1])); cullTips.add(new PowerTip(TEXT[2], TEXT[3])); cullTips.add(new PowerTip(TEXT[4], TEXT[5], WrathMemory.STATIC.CLARITY_IMG_48)); }
Example #5
Source File: PatienceMemory.java From jorbs-spire-mod with MIT License | 5 votes |
@Override protected void addExtraPowerTips(ArrayList<PowerTip> tips) { tips.add(new PowerTip( BaseMod.getKeywordTitle("stsjorbsmod:coil"), BaseMod.getKeywordDescription("stsjorbsmod:coil"), CoilPower.STATIC.IMG_32)); }
Example #6
Source File: AbstractMemory.java From jorbs-spire-mod with MIT License | 5 votes |
private void renderTip() { ArrayList<PowerTip> tips = getTips(); // Based on the AbstractCreature.renderPowerTips impl float tipX = centerX + hb.width / 2.0F < TIP_X_THRESHOLD ? centerX + hb.width / 2.0F + TIP_OFFSET_R_X : centerX - hb.width / 2.0F + TIP_OFFSET_L_X; // The calculatedAdditionalOffset ensures everything is shifted to avoid going offscreen float tipY = centerY + TipHelper.calculateAdditionalOffset(tips, centerY); TipHelper.queuePowerTips(tipX, tipY, tips); }
Example #7
Source File: AbstractMemory.java From jorbs-spire-mod with MIT License | 5 votes |
private ArrayList<PowerTip> getTips() { ArrayList<PowerTip> tips = new ArrayList<>(); tips.add(new PowerTip(name, description, staticInfo.CLARITY_IMG_48)); addExtraPowerTips(tips); return tips; }
Example #8
Source File: BurningPotion.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void initializeData() { this.potency = this.getPotency(); this.description = String.format(DESCRIPTIONS[0], this.potency); this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); this.tips.add(new PowerTip(BaseMod.getKeywordTitle("stsjorbsmod:burning"), BaseMod.getKeywordDescription("stsjorbsmod:burning"))); }
Example #9
Source File: LiquidVirtue.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void initializeData() { this.potency = getPotency(); this.description = String.format(DESCRIPTIONS[0], this.potency); this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); this.tips.add(new PowerTip(BaseMod.getKeywordTitle("stsjorbsmod:clarity"), BaseMod.getKeywordDescription("stsjorbsmod:clarity"))); this.tips.add(new PowerTip(BaseMod.getKeywordTitle("stsjorbsmod:virtue"), BaseMod.getKeywordDescription("stsjorbsmod:virtue"))); }
Example #10
Source File: DimensionDoorPotion.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void initializeData() { this.name = NAME; this.potency = this.getPotency(); this.description = DESCRIPTIONS[0]; this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); }
Example #11
Source File: GhostPoisonPotion.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void initializeData() { this.potency = this.getPotency(); this.description = String.format(DESCRIPTIONS[0], MANIFEST_PER_ENEMY); this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); this.tips.add(new PowerTip(BaseMod.getKeywordTitle("stsjorbsmod:manifest"), BaseMod.getKeywordDescription("stsjorbsmod:manifest"))); }
Example #12
Source File: LiquidClarity.java From jorbs-spire-mod with MIT License | 5 votes |
@Override public void initializeData() { this.potency = this.getPotency(); this.description = DESCRIPTIONS[0]; this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); this.tips.add(new PowerTip(BaseMod.getKeywordTitle("stsjorbsmod:clarity"), BaseMod.getKeywordDescription("stsjorbsmod:clarity"))); }
Example #13
Source File: ManifestTopPanelItem.java From jorbs-spire-mod with MIT License | 5 votes |
private void renderTips() { ArrayList<PowerTip> tips = AbstractDungeon.player != null && AbstractDungeon.player instanceof Cull ? cullTips : nonCullTips; if (this.isHovered) { TipHelper.queuePowerTips(Math.min(this.x, TOP_RIGHT_TIP_X), TIP_Y, tips); } SlayTheRelicsIntegration.renderTipHitbox(this.hitbox, tips); }
Example #14
Source File: TemperanceMemory.java From jorbs-spire-mod with MIT License | 4 votes |
@Override protected void addExtraPowerTips(ArrayList<PowerTip> tips) { tips.add(new PowerTip( BaseMod.getKeywordTitle("stsjorbsmod:clarity"), BaseMod.getKeywordDescription("stsjorbsmod:clarity"))); }
Example #15
Source File: BottledMemoryRelic.java From jorbs-spire-mod with MIT License | 4 votes |
public void setDescriptionAfterLoading() { this.description = this.DESCRIPTIONS[2] + FontHelper.colorString(this.card.name, "y") + this.DESCRIPTIONS[3]; this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); this.initializeTips(); }
Example #16
Source File: CommonKeywordIconsPatches.java From StSLib with MIT License | 4 votes |
@SpireInsertPatch( locator = Locator.class, localvars = {"tip"} ) public static void patch(float x, float y, SpriteBatch sb, ArrayList<PowerTip> powerTips, PowerTip tip) { if(!workaroundSwitch) { return; } Texture badge = null; if (tip.header.equalsIgnoreCase(GameDictionary.INNATE.NAMES[0])) { badge = StSLib.BADGE_INNATE; } else if (tip.header.equalsIgnoreCase(GameDictionary.ETHEREAL.NAMES[0])) { badge = StSLib.BADGE_ETHEREAL; } else if (tip.header.equalsIgnoreCase(GameDictionary.RETAIN.NAMES[0])) { badge = StSLib.BADGE_RETAIN; } else if (tip.header.equalsIgnoreCase(purgeName)) { badge = StSLib.BADGE_PURGE; } else if (tip.header.equalsIgnoreCase(GameDictionary.EXHAUST.NAMES[0])) { badge = StSLib.BADGE_EXHAUST; } if(badge != null) { float badge_w = badge.getWidth(); float badge_h = badge.getHeight(); sb.draw(badge, x + ((320.0F - badge_w/2 - 8f) * Settings.scale), y + (-16.0F * Settings.scale), 0, 0, badge_w, badge_h, 0.5f * Settings.scale, 0.5f * Settings.scale, 0, 0, 0, (int)badge_w, (int)badge_h, false, false); } if(powerTips.get(powerTips.size() - 1).equals(tip)) { workaroundSwitch = false; } }
Example #17
Source File: SlayTheRelicsIntegration.java From jorbs-spire-mod with MIT License | 4 votes |
public static void renderTipHitbox(Hitbox hb, ArrayList<PowerTip> tips) { slayTheRelicsHitboxes.add(hb); slayTheRelicsPowerTips.add(tips); }
Example #18
Source File: PlaceholderPotion.java From StS-DefaultModBase with MIT License | 4 votes |
public void upgradePotion() { potency += 1; tips.clear(); tips.add(new PowerTip(name, description)); }
Example #19
Source File: DefaultClickableRelic.java From StS-DefaultModBase with MIT License | 4 votes |
public DefaultClickableRelic() { super(ID, IMG, OUTLINE, RelicTier.COMMON, LandingSound.CLINK); tips.clear(); tips.add(new PowerTip(name, description)); }
Example #20
Source File: BottledPlaceholderRelic.java From StS-DefaultModBase with MIT License | 4 votes |
public BottledPlaceholderRelic() { super(ID, IMG, OUTLINE, RelicTier.COMMON, LandingSound.CLINK); tips.clear(); tips.add(new PowerTip(name, description)); }
Example #21
Source File: BottledPlaceholderRelic.java From StS-DefaultModBase with MIT License | 4 votes |
public void setDescriptionAfterLoading() { this.description = DESCRIPTIONS[1] + FontHelper.colorString(card.name, "y") + DESCRIPTIONS[2]; this.tips.clear(); this.tips.add(new PowerTip(this.name, this.description)); this.initializeTips(); }
Example #22
Source File: AbstractMemory.java From jorbs-spire-mod with MIT License | votes |
protected void addExtraPowerTips(ArrayList<PowerTip> tips) { }