       else
         critical.push HitType.Miss
       enemyShip[i - 1].nowHP -= damage
-      list.push new Attack AttackType[AttackTypeMap[0]], null, enemyShip[i - 1], enemyShip[i - 1].maxHP, enemyShip[i - 1].nowHP, dmg, critical
+      list.push new Attack AttackType.Normal, null, enemyShip[i - 1], enemyShip[i - 1].maxHP, enemyShip[i - 1].nowHP, dmg, critical
   else if support.api_support_hourai?
     for damage, i in support.api_support_hourai.api_damage
       continue unless 1 <= i <= 6

####
# Usage: Pass response body as argument with extra key-value below.
# poi_is_combined = Boolean # 連合艦隊？
# poi_is_water = Boolean    # 水上打撃部隊=true, 空母機動部隊=false
# poi_is_night = Boolean    # 夜戦？
# poi_sortie_fleet = [int, ...] # api_ship_id
# poi_sortie_equipment = [[int, ...], ...]  # api_slotitem_id
# poi_combined_fleet = [int, ...]
# poi_combined_equipment = [[int, ...], ...]
####

{Ship, ShipOwner, Attack, AttackType, HitType, Stage, StageType} = require './common'


# Map from api id of attack type to AttackType
# 特殊砲撃　0=通常, 1=レーザー攻撃, 2=連撃, 3=カットイン(主砲/副砲), 4=カットイン(主砲/電探), 5=カットイン(主砲/徹甲), 6=カットイン(主砲/主砲)
AttackTypeMap = [
  "Normal",
  "Laser",
  "Double",
  "Primary_Secondary_CI",
  "Primary_Radar_CI",
  "Primary_AP_CI",
  "Primary_Primary_CI",
  "Primary_Torpedo_CI",
  "Torpedo_Torpedo_CI"
]
# Map from api id of night attack type to day attack type id
# NightID DayID Type
# 0       0     通常攻撃
# 1       2     連撃
# 2       7     カットイン(主砲/魚雷)
# 3       8     カットイン(魚雷/魚雷)
# 4       3     カットイン(主砲/副砲)
# 5       6     カットイン(主砲/主砲)
NightAttackTypeMap = [
  0,
  2,
  7,
  8,
  3,
  6
]

checkRepairItem = (sortieShip) ->
  if sortieShip.nowHP <= 0

      critical.push if kouku.api_fcl_flag[i] == 1 then HitType.Critical else if damage == 0 then HitType.Miss else HitType.Hit
      sortieShip[i - 1].nowHP -= damage
      useItem = checkRepairItem sortieShip[i - 1]
      list.push new Attack AttackType.Normal, null, sortieShip[i - 1], sortieShip[i - 1].maxHP, sortieShip[i - 1].nowHP, dmg, critical, useItem
  # test log
  #console.log list
  list
