diff options
Diffstat (limited to 'Effects/SlowEffect.gd')
-rw-r--r-- | Effects/SlowEffect.gd | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Effects/SlowEffect.gd b/Effects/SlowEffect.gd index a3070ca..a995b7e 100644 --- a/Effects/SlowEffect.gd +++ b/Effects/SlowEffect.gd @@ -3,17 +3,21 @@ extends Effect @onready var unit: Unit = get_parent() +var level := 1 + var base_speed: float -var magnitude: float = 0.5 : +var magnitude: float: set(value): magnitude = clamp(value, 0.0, 1.0) func _ready(): + magnitude = 0.1 * level + add() - set_duration(5.0) + set_duration(5.0 + ((level - 1) * 0.1)) duration_finished.connect(func(): remove() ) |