       # api_cl_list		：クリティカルフラグ 0=ミス, 1=命中, 2=クリティカル　命中(0ダメージ)も存在する？
       list.push new Attack AttackType[checkAttackType[attackType]], enemyShip[damageFrom - 6], sortieShip[target], sortieShip[target].hp[1], sortieShip[target].hp[0], dmg, critical
       sortieShip[target].hp[0] -= totalDamage
-      checkRepairItem sortieShip[i - 1]
+      checkRepairItem sortieShip[target]
     else
       # api_cl_list		：クリティカルフラグ 0=ミス, 1=命中, 2=クリティカル　命中(0ダメージ)も存在する？
       list.push new Attack AttackType[checkAttackType[attackType]], sortieShip[damageFrom], enemyShip[target - 6], enemyShip[target - 6].hp[1], enemyShip[target - 6].hp[0], dmg, critical

      critical.push crt == 2
    list.push new Attack AttackType[checkAttackType[0]], enemyShip[i - 1], sortieShip[target - 1], sortieShip[target - 1].hp[1], sortieShip[target - 1].hp[0], dmg, critical
    sortieShip[target - 1].hp[0] -= damage
    checkRepairItem sortieShip[i - 1]
  # test log
  #console.log list
  list

  list = []
  if kouku.api_edam?
    for damage, i in kouku.api_edam
      continue if (kouku.api_ebak_flag[i] <= 0 && kouku.api_erai_flag[i] <= 0) || i == 0
      damage = Math.floor(damage)
      dmg = []
      dmg.push damage
