-
-
Notifications
You must be signed in to change notification settings - Fork 106
ScriptObject
Extends: Reference
This is a parent class containing the methods for lookup of subjects and script properties.
It is typically never instanced directly.
var owner
The object which owns this Task
var subjects: Array
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
var script_name: String
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
The name of the method to call in the ScriptingEngine
to implement this task
var script_definition: Dictionary
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
The name of the method to call in the ScriptingEngine
to implement this task
Storage for all details of the task definition
var is_primed: bool
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
The name of the method to call in the ScriptingEngine
to implement this task
Storage for all details of the task definition
Used by the ScriptingEngine to know if the task
has finished processing targetting and optional confirmations
var is_valid: bool
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
The name of the method to call in the ScriptingEngine
to implement this task
Storage for all details of the task definition
Used by the ScriptingEngine to know if the task
has finished processing targetting and optional confirmations
If true if this task is valid to run.
A task is invalid to run if some filter does not match.
var requested_subjects: int
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
The name of the method to call in the ScriptingEngine
to implement this task
Storage for all details of the task definition
Used by the ScriptingEngine to know if the task
has finished processing targetting and optional confirmations
If true if this task is valid to run.
A task is invalid to run if some filter does not match.
The amount of subjects card the script requested to modify
We use this to compare against costs during dry_runs
This is typically set during the _find_subjects() call
var trigger_object: Node
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
The name of the method to call in the ScriptingEngine
to implement this task
Storage for all details of the task definition
Used by the ScriptingEngine to know if the task
has finished processing targetting and optional confirmations
If true if this task is valid to run.
A task is invalid to run if some filter does not match.
The amount of subjects card the script requested to modify
We use this to compare against costs during dry_runs
This is typically set during the _find_subjects() call The card which triggered this script.
var prev_subjects: Array
The object which owns this Task
The subjects is typically a Card
object
in the future might be other things
The name of the method to call in the ScriptingEngine
to implement this task
Storage for all details of the task definition
Used by the ScriptingEngine to know if the task
has finished processing targetting and optional confirmations
If true if this task is valid to run.
A task is invalid to run if some filter does not match.
The amount of subjects card the script requested to modify
We use this to compare against costs during dry_runs
This is typically set during the _find_subjects() call The card which triggered this script. Stores the subjects discovered by the task previous to this one
func _init(_owner, script: Dictionary, _trigger_object = null) -> void
prepares the properties needed by the script to function.
func get_property(property: String, default = null)
Returns the specified property of the string. Also sets appropriate defaults when then property has not beend defined. A default value can also be passed directly, which is useful when ScriptingEngine has been extended by custom tasks.
func sort_subjects(subject_list: Array) -> Array
Sorts the subjects list according to the directives in the following three keys
func parse_replacements() -> void
Goes through the provided scripts and replaces certain keyword values with variables retireved from specified location.
This allows us for example to filter cards sought based on the properties of the card running the script.
func count_per(per_seek: String, script_owner: Card, per_definitions: Dictionary, _trigger_object = null) -> int
Handles looking for intensifiers of a current effect via the board state
Returns the amount of things the script is trying to count.
- signal primed(): Sent when the _init() method has completed warning-ignore:unused_signal