Added decent remix system
This commit is contained in:
@@ -3,12 +3,30 @@ extends Resource
|
||||
|
||||
@export var target_type: Array[Data.TargetType]
|
||||
@export var energy_type: Data.EnergyType
|
||||
@export var attributes: Array[StatAttribute]
|
||||
@export var attributes: Dictionary[String, float]
|
||||
@export var features: Array[Feature]
|
||||
@export_multiline var text: String
|
||||
|
||||
|
||||
func get_attribute(attribute: String) -> float:
|
||||
for stat: StatAttribute in attributes:
|
||||
if stat.key == attribute:
|
||||
return stat.value
|
||||
if attributes.has(attribute):
|
||||
return attributes[attribute]
|
||||
return 0.0
|
||||
|
||||
|
||||
func set_attribute(attribute: String, value: float) -> void:
|
||||
attributes[attribute] = value
|
||||
|
||||
|
||||
func tower_features_applied() -> CardText:
|
||||
var card_text: CardText = self.duplicate()
|
||||
for feature: Feature in features:
|
||||
feature.attach_to_tower(card_text)
|
||||
return card_text
|
||||
|
||||
|
||||
func weapon_features_applied() -> CardText:
|
||||
var card_text: CardText = self.duplicate()
|
||||
for feature: Feature in features:
|
||||
feature.attach_to_weapon(card_text)
|
||||
return card_text
|
||||
|
||||
15
Scripts/Resources/feature.gd
Normal file
15
Scripts/Resources/feature.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
class_name Feature
|
||||
extends Resource
|
||||
|
||||
@export var display_name: String
|
||||
@export var description: String
|
||||
@export var icon: Texture2D
|
||||
@export var strength: float
|
||||
|
||||
|
||||
func attach_to_tower(tower_stats: CardText) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func attach_to_weapon(weapon_stats: CardText) -> void:
|
||||
pass
|
||||
1
Scripts/Resources/feature.gd.uid
Normal file
1
Scripts/Resources/feature.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bsuinotkvh7eu
|
||||
Reference in New Issue
Block a user