2025-09-17 12:19:19 +02:00
|
|
|
extends Item
|
|
|
|
|
@export var heal_amount = 1
|
|
|
|
|
|
2025-09-17 12:57:04 +02:00
|
|
|
func collect() -> bool:
|
2025-09-17 12:19:19 +02:00
|
|
|
if(player.current_hp < player.max_hp):
|
2025-09-17 14:03:37 +02:00
|
|
|
player.current_hp = min(player.max_hp, player.current_hp + heal_amount)
|
2025-09-17 12:57:04 +02:00
|
|
|
return true
|
|
|
|
|
return false
|