Inventory sums stats and gives them to player

also did some minor bug fixes and refactored projectile fireball