Built‐in Variables - seastan/dragncards GitHub Wiki
$ACTIVE_CARD
Returns the card object corresponding to $ACTIVE_CARD_ID
.
$ACTIVE_CARD_ID
Returns the id of the card currently being hovered over by the user.
If $ACTIVE_CARD_ID
is redefined during an action list by VAR
or DEFINE
, all variables that inherit from it will be updated automatically:
$ACTIVE_CARD_ID
└ $ACTIVE_CARD
└─ $ACTIVE_FACE
└─ $ACTIVE_TOKENS
└ $ACTIVE_GROUP_ID
└─ $ACTIVE_GROUP
$ACTIVE_FACE
Returns the face object corresponding to the faceup side of $ACTIVE_CARD
.
$ACTIVE_GROUP
Returns the group object corresponding to $ACTIVE_GROUP_ID
.
$ACTIVE_GROUP_ID
Returns the id of the active group for the player triggering the backend process. The active group is set when a player clicks on a group's dropdown menu. If the user has not clicked on a group's dropown menu, then the the active group is the one containing the card currently being hovered over.
If $ACTIVE_GROUP_ID
is redefined during an action list by VAR
or DEFINE
, all variables that inherit from it will be updated automatically:
$ACTIVE_GROUP_ID
└ $ACTIVE_GROUP
$ACTIVE_TOKENS
Returns the tokens object corresponding to $ACTIVE_CARD
.
$ALIAS_N
Returns the alias of the player corresponding to $PLAYER_N
.
$CARD_BY_ID
Shortcut for $GAME.cardById
.
$CARD_DB
Returns the card database object.
Examples:
"$CARD_DB.51223bd0.A.hitPoints" # Returns the hitPoints value of side A for the card from the database with databaseId 51223bd0.
$GAME
Returns the game state.
$GAME_DEF
Returns the game definition object that was used to create the game. Can be used for reference purposes, but note that the game definition cannot be updated during the game.
Examples:
"$GAME_DEF.gameProperties.hitPoints.default" # Returns the default value for the hitPoints game property from the game definition.
$GROUP_BY_ID
Shortcut for $GAME.groupById
.
$PLAYER_DATA
Shorthand for $GAME.playerData
$PLAYER_N
Returns the id of the player who triggered the backend process, such as player1
or player2
.
If $PLAYER_N
is redefined by VAR
or DEFINE
, all variables that inherit from it will be updated automatically:
$PLAYER_N
└ $ALIAS_N
$PLAYER_ORDER
Returns a list of player ids in turn order. So if there are 4 players and player2
is first, the list will be ["player2", "player3", "player4", "player1"]
.
$STACK_BY_ID
Shortcut for $GAME.stackById
.