Skip to content

AbstractCard

Alchyr edited this page Mar 9, 2024 · 3 revisions

Some documentation of the AbstractCard class.

Fields

  • type - The card's type, including ATTACK, SKILL, POWER, STATUS, and CURSE. Generally should be read from but not changed outside of a card's constructor.
  • rarity - The card's rarity, including BASIC, SPECIAL, COMMON, UNCOMMON, RARE, and CURSE. BASIC, SPECIAL, and CURSE will not appear normally in card rewards. Effects that give random curses will get cards with the CURSE rarity. SPECIAL rarity curses are those like Curse of the Bell and Necronomicurse. BASIC is intended for cards in the starting deck, and SPECIAL is intended for all other cards that can't be obtained in card rewards.
  • color - The card's color, which determines its appearance.
  • target - How the card is targeted when played. They can be divided into two categories: SELF_AND_ENEMY and ENEMY targeting, and all the rest. SELF_AND_ENEMY and ENEMY targeting will give the card a targeting arrow for an enemy, which will be passed to the use method. All other targeting types only change which creatures have reticles rendered on them when dragging the card. Custom Targeting
  • cost/costForTurn - The card's cost. costForTurn is reset at the end of the turn or when played. Generally shouldn't be directly manipulated, use methods instead. A cost of -2 displays nothing, a cost of -1 is X cost.
  • isCostModified/isCostModifiedForTurn - If true, affects how cost is displayed on the card (changes color)
  • damage/baseDamage/isDamageModified - The card's attack damage. damage is calculated from baseDamage in the applyPowers and calculateCardDamage methods. isDamageModified is set to true if the damage is modified. If isDamageModified is true, !D! will display the value of the damage variable. Otherwise, it will display baseDamage.
  • isMultiDamage/multiDamage - isMultiDamage should be set to true for cards that deal damage to ALL enemies. Then, multiDamage should be used for DamageAllEnemies action(s). This affects how damage is calculated, calculating it individually for each enemy.
  • block/baseBlock/isBlockModified - The card's block. Works effectively the same as damage/baseDamage/isDamageModified, though it is calculated in the applyPowersToBlock method. Displayed using !B! in the card description.
  • magicNumber/baseMagicNumber/isMagicNumberModified - For any other values besides damage and block. magicNumber is never modified by outside effects in any way in the base game. Any dynamic calculation will have to be handled by you.
  • retain - Retains the card once at the end of the turn. Used by effects such as Well-Laid Plans.
  • selfRetain - The card always retains. This is for cards with the Retain keyword. For BasicMod, you can use the setRetain method in your card's constructor.
  • isInnate - Makes the card innate. Using the setInnate method is recommended for BasicMod.
  • isEthereal - Makes the card ethereal. Using the setEthereal method is recommended for BasicMod.
  • exhaust - Makes the card exhaust on use. Using the setExhaust method is recommended for BasicMod.
  • upgraded/timesUpgraded - Whether or not the card is upgraded, and how many times it has been. You can check these, but are not recommended to manipulate them, other than in the upgrade method of the card. In BasicMod, you should generally not need to modify these yourself.
  • showEvokeValue/showEvokeOrbCount - If showEvokeValue is true, the card will show the evoke values of the next showEvokeOrbCount orbs while being dragged.
  • dontTriggerOnUseCard - Used by a few specific cards which are "played" at the end of the turn to trigger their effects but don't count as playing a card. These are Burn, Regret, etc.

Fields that shouldn't be used

  • keywords - The card's keywords. This is generated in the initializeDescription method and shouldn't be manually modified.
  • isLocked - If card is locked.
  • price - Shop price. Not intended for use in the card class. Set and used by the ShopScreen class.
  • chargeCost - unused (no effect)
  • baseHeal/heal/baseDraw/draw/baseDiscard/discard - unused, cannot be displayed in card text by default
  • isUsed - unused
Clone this wiki locally