add battlefield analyzing function