Stat change logic

Wrote some of the logic for stat changes. Don't know how well it works.
I'd like someone to look over it.