2024-02-22 06:22:22 +11:00
|
|
|
class_name CardText extends Resource
|
2023-11-15 15:19:40 +11:00
|
|
|
|
2024-02-22 06:22:22 +11:00
|
|
|
@export var target_type: Data.TargetType
|
|
|
|
@export var attributes: Array[StatAttribute]
|
|
|
|
@export_multiline var text: String
|
2023-11-15 15:19:40 +11:00
|
|
|
|
|
|
|
|
2024-02-22 06:22:22 +11:00
|
|
|
func get_attribute(attribute: String) -> float:
|
|
|
|
for stat: StatAttribute in attributes:
|
2023-11-15 15:19:40 +11:00
|
|
|
if stat.key == attribute:
|
|
|
|
return stat.value
|
|
|
|
return 0.0
|