-####
-# 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"
-]
+# 特殊砲撃 0=通常, 1=レーザー攻撃, 2=連撃, 3=カットイン(主砲/副砲), 4=カットイン(主砲/電探), 5=カットイン(主砲/徹甲), 6=カットイン(主砲/主砲)
+AttackTypeMap =
+  0: AttackType.Normal
+  1: AttackType.Laser
+  2: AttackType.Double
+  3: AttackType.Primary_Secondary_CI
+  4: AttackType.Primary_Radar_CI
+  5: AttackType.Primary_AP_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
-]
+# 夜戦攻撃種別 0=通常攻撃, 1=連撃, 2=カットイン(主砲/魚雷), 3=カットイン(魚雷/魚雷), 4=カットイン(主砲/副砲), 5=カットイン(主砲/主砲)
+NightAttackTypeMap =
+  0: AttackType.Normal
+  1: AttackType.Double
+  2: AttackType.Primary_Torpedo_CI
+  3: AttackType.Torpedo_Torpedo_CI
+  4: AttackType.Primary_Secondary_CI
+  5: AttackType.Primary_Primary_CI
+
 
 checkRepairItem = (sortieShip) ->
   if sortieShip.nowHP <= 0

        critical.push HitType.Miss
    sortieShip[target - 1].nowHP -= damage
    useItem = checkRepairItem sortieShip[target - 1]
    list.push new Attack AttackType[AttackTypeMap[0]], enemyShip[i - 1], sortieShip[target - 1], sortieShip[target - 1].maxHP, sortieShip[target - 1].nowHP, dmg, critical, useItem
  # test log
  #console.log list
  list

      critical = []
      critical.push if kouku.api_ecl_flag[i] == 1 then HitType.Critical else if damage == 0 then HitType.Miss else HitType.Hit
      enemyShip[i - 1].nowHP -= damage
      list.push new Attack AttackType.Normal, null, enemyShip[i - 1], enemyShip[i - 1].maxHP, enemyShip[i - 1].nowHP, dmg, critical
  if kouku.api_fdam?
    for damage, i in kouku.api_fdam
      continue if (kouku.api_fbak_flag[i] <= 0 && kouku.api_frai_flag[i] <= 0) || i == 0
