User Tools

Site Tools


plugin-icv

This plugin gives cards a new array of variables called Var, which can be accessed through code (for damage formulas and the like) and can also be used in place of numbers in other Card Actions.

Var can contain as many variables within it that you need. To access them in card actions, use Var(index) where index is any number. By default all variables inside Var are set to 0.

Note This plugin is compatible with Card Game Combat 1.5.7, but some features will not work - namely, the Card Sprite will not visually change to reflect description or cost changes as a result of Var values changing. Card Game Combat 1.6.0 or higher will be required for these features.

Parameters

Reset Var after battle? If set to ON, changes to a card's Var variables will be reset at the end of each battle.
Prevent Negative Cost? If set to ON, subtracting a Var from a skill's cost will never result in a value below 0.

Card Passives

Var(X) init Y
This will set the initial value of Var(X) to the number specified in Y.
All values initialize at 0 by default, and this overrides that behavior for this Var index of all cards belonging to this skill.

When Var values are reset they return to their initial values.

Card Actions

Var(X) set Y
This sets the specified Var of this card to the value supplied in Y.
Replace X with the Var index
Replace Y with the value you wish the Var index to contain
Var(X) mod [+/-]Y
Modifies the specified Var of this card by the value of Y. Adds or subtracts Y to/from Var.
Replace X with the Var index
Replace [+/-]Y with a positive or negative number
All Skill [skillID] Var(X) set Y
All Skill [skillID] Var(X) mod [+/-]Y
These Card Actions modify the Var of all cards belonging to that actor of the specified Skill ID.
All Skill [skillID] Var(X) set Y in [zoneName]
All Skill [skillID] Var(X) mod [+/-]Y in [zoneName]
These Card Actions modify the Var of all cards belonging to that actor's specific zone.
Replace [zoneName] with “Deck”, “Discard” or “Hand”.
Selected Var(X) set Y
Selected Var(X) mod [+/-]Y
Requires Card Action Pack 1 plugin to use.

These Card Actions act on all Selected cards instead of the card containing the Card Actions.

Getting the Value of a Var

In Card Actions you can use: Var(index) where index is the number of the index you want.

In Damage Formulas you can use: a.cardVar(index) where index is the number of the index you want.

In Skill Descriptions you can use: \Var[n] where n is the number of the index you want.

By default, these will all return 0 if no value was found at that index of Var.

Note: Because If and Eval statements are technically Card Actions, you can still use Var(index) in place of code in their expressions.
e.g.If Var(0) < 4 will work as expected.

Modifying Card Cost

Advanced / Functions

Version History

v1.0.4 
- Fixed issue where Var(x) would be replaced incorrectly in If and Eval Card Actions, breaking their functionality.
- Fixed issue where Card Descriptions would return only the last-input Var index for every index.
 
v1.0.3 
- Fixed All Skill Card Action adding numbers like strings instead of numbers. 1 + 1 now equals 2 instead of 11.
- Init Var(x) can now supply a negative number.
 
v1.0.2 
- Init Var(x) now a Card Passive for consistency with CGC.
- Cleaned up help file for improved readability.
 
v1.0.1 
- Changed syntax for Card Actions that modify Var to be a bit more intuitive.
- Fixed Set Card Action not working properly
- Added <init> notetag and fixed reset function to use initial values.
 
v1.0.0 
- Finished plugin
plugin-icv.txt · Last modified: 2024/03/22 14:41 by banerjeesw