Skip to content

CardFilter

Divided by Zer0 edited this page Mar 9, 2022 · 1 revision

CardFilter

Extends: Reference

Description

Class to compare card properties against a specified filter

Property Descriptions

property

var property: String

The property key for which to look in the provided card properties dict

filter

var filter

The property key for which to look in the provided card properties dict The value against which to compare the value of the property

comparison

var comparison: String

The property key for which to look in the provided card properties dict The value against which to compare the value of the property The kind of comparison to perform

compare_int_as_str

var compare_int_as_str: bool

The property key for which to look in the provided card properties dict The value against which to compare the value of the property The kind of comparison to perform If true, will compare integers as strings.

Method Descriptions

_init

func _init(_property: String, _value, _comparison: String = "eq", _compare_int_as_str: bool = false) -> void

check_card

func check_card(card_properties: Dictionary) -> bool

Takes the properties dictionary

Clone this wiki locally