AbstractCard - Alchyr/BasicMod GitHub Wiki
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
usemethod. 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.
costForTurnis 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.
damageis calculated frombaseDamagein theapplyPowersandcalculateCardDamagemethods.isDamageModifiedis set to true if the damage is modified. IfisDamageModifiedis true,!D!will display the value of thedamagevariable. Otherwise, it will displaybaseDamage. - isMultiDamage/multiDamage -
isMultiDamageshould be set to true for cards thatdeal damage to ALL enemies. Then,multiDamageshould be used forDamageAllEnemiesaction(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
applyPowersToBlockmethod. Displayed using!B!in the card description. - magicNumber/baseMagicNumber/isMagicNumberModified - For any other values besides damage and block.
magicNumberis 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
setRetainmethod in your card's constructor. - isInnate - Makes the card innate. Using the
setInnatemethod is recommended for BasicMod. - isEthereal - Makes the card ethereal. Using the
setEtherealmethod is recommended for BasicMod. - exhaust - Makes the card exhaust on use. Using the
setExhaustmethod 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
upgrademethod of the card. In BasicMod, you should generally not need to modify these yourself. - showEvokeValue/showEvokeOrbCount - If
showEvokeValueis true, the card will show the evoke values of the nextshowEvokeOrbCountorbs 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