fix energy and magic regeneration bug, remove debugging info