Skip to content

DBListCardObject

Divided by Zer0 edited this page Mar 9, 2022 · 6 revisions

DBListCardObject

Extends: CVListCardObject < HBoxContainer

Description

An object displaying a card summary in the Deckbuilder available cards area and providing controls to add it to the deck.

Property Descriptions

deck_card_object

var deck_card_object: DBDeckCardObject

A potential link to the card summary in the deck itself. If it is null, it will be created as soon as the card is added to the deck

max_allowed

var max_allowed: int

A potential link to the card summary in the deck itself. If it is null, it will be created as soon as the card is added to the deck The max quantity allowed for this particular card

quantity

var quantity: int
  • Setter: set_quantity

The amount of this card selected to be added to the deck.

quantity_property

export var quantity_property: String = "_max_allowed"

The amount of this card selected to be added to the deck. We will look for this card property to determine how many possible copies of the card are allowed in the deck. A value of 0 (or undefined) Will allow as many copies as the max_quantity

Method Descriptions

set_quantity

func set_quantity(value) -> void

Setter for quantity

Will also set the correct button as pressed when the quantity is changed elsewhere.

setup_max_quantity

func setup_max_quantity(force: int = 0) -> void

Sets the max amount of this card allowe in a deck This can be adjusted from the card properties, or from the deckbuilder exported variables.

If less than 6 cards are allowed in the deck, then we provide the users dedicated buttons, to quickly adjust their values

If 6 or more cards of the same name are allowed in the deck, then we provide the users with +/- buttons and a freeform integer line editor.

Clone this wiki locally