While the law prohibits outright exclusion, it does provide some legal options for adjusting the distribution of one’s assets. There are three levers to be mindful of.
Play with the allotted allotment.

This is some of the leeway allowed by the legislation. This is the bit that you can leave to anybody you want: another child, a close friend, an organization, or simply a compassionate neighbor. This allows you to form specific ties without infringing the restrictions.
