Improved level-up upgrade code and added fire effects for damaged buildings