How to declare a property to a selected group of objects.

For example, consider this situation.
I am able to tell that every person has a value of either being a muggle or a wizard.
Now, how do I say something like every wizard has a value called blood purity?

Note: Being a Muggle or Wizard is a value of every person, it is not a kind

You might as well define the property for every person, and then have something like “The blood purity of a person is usually not-a-wizard”. (Since you’ll be defining purity values for all the wizards anyway.)

Or you could merge the properties, and simply define “non-wizard” as a blood purity value. Then you’d write definitions:

Definition: a person is muggle if the blood purity of him is non-wizard.
Definition: a person is wizard if the blood purity of him is not non-wizard.

OK Thank you

I did this

Magicality is a kind of value.  The magicality are muggle and wizarding.
A person has a magicality.
The magicality of a person is usually wizarding.

Definition: a man is Wizard if its magicality is wizarding.
Definition: a woman is Witch if its magicality is wizarding.


Blood Purity is a kind of value. The Blood Purity are Half-Blood, Muggle Born and Pure-Blooded.
A person who is wizard has a blood purity.
A person who is witch has a blood purity.

Hm. Interesting.

The “who is wizard/witch” clause in there doesn’t do anything. (It’s exactly the same compiled code as saying “A person has a blood purity.”) Probably the compiler ought to issue an error.

You should be able to write your game this way, though. The compiler just won’t rule out muggles having a blood purity property.