Fixed compiler errors
Added last battle phases