from random import randint

from components import Attributes


def heal(scene, user, usee):
    health = scene.cm.get_one(Attributes, entity=user)
    if health:
        heal_amount = min(health.max_hp, health.hp + randint(1, 10) + randint(1, 10)) - health.hp
        health.hp += heal_amount
        scene.message("Your wounds close before your eyes.")
