extends Effect @onready var unit: Unit = get_parent() var level := 1 var power := 0.0 var base_modulate: Color func _ready(): power = 5.0 + (level - 1) set_duration(5.0 + ((level - 1) * 0.1)) set_tick(1.0) tick_finished.connect(func(): base_modulate = unit.sprite.self_modulate unit.set_hp(unit.hp - power) unit.sprite.self_modulate = Color(1, 0, 0) await get_tree().create_timer(0.1).timeout unit.sprite.self_modulate = base_modulate )