     result = 'B'
   else if sortieDmg != 0 && (sortieDmg * sortieTot >= 1.0 * enemyDmg * enemyTot)
     result = 'C'
+  console.log result
   result
 
 checkRepair = (shipId) ->

  sortieCnt = enemyCnt = 0
  sortieDmg = enemyDmg = 0.0
  sortieTot = enemyTot = 0.0
  for i in [0..5]
    if sortieHp.now[i] + sortieHp.dmg[i] > 0
      sortieCnt += 1

        sortieDmg += (enemyHp.now[i] - leastHp)
        enemyDrop += 1
        enemyHp.now[i] = 0
  console.log sortieHp, enemyHp, combinedHp
  console.log enemyDmg / sortieTot, sortieDmg / enemyTot
  result = 'D'
  if enemyDrop == enemyCnt
    result = 'S'
