set_duration(d) {
    call_out("dispel",d);
}

reset() {
    call_out("heal",2);
}

heal() {
    if(environment()->query_hp()==environment()->query_max_hp())
      {
        destruct(this_object());
        return;
      }
    environment()->reduce_hit_point(-1);
    call_out("heal",5);
}

dispel() {
    remove_call_out("heal");
    destruct(this_object());
}

query_spell_name() { return "regeneration"; }