Part of magic system rewrite and some fixes to trades.
Ignore this commit - character conversion problem.