Mastery and item parsing

Herpderp.

This is probably not a good way of checking, though. assert statements are not guaranteed to be executed - if NDEBUG is defined, assert statements will be no-opped.