- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Difference between revisions of "Module:EquipmentData"
Jump to navigation
Jump to search
com>Ckwng (add evasion, buildable) |
com>Ckwng (s_type 39) |
||
Line 41: | Line 41: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[2] = { | [2] = { | ||
Line 81: | Line 82: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[3] = { | [3] = { | ||
Line 121: | Line 123: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[4] = { | [4] = { | ||
Line 161: | Line 164: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[5] = { | [5] = { | ||
Line 201: | Line 205: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[6] = { | [6] = { | ||
Line 241: | Line 246: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[7] = { | [7] = { | ||
Line 281: | Line 287: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[8] = { | [8] = { | ||
Line 321: | Line 328: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[9] = { | [9] = { | ||
Line 361: | Line 369: | ||
[37] = 0, | [37] = 0, | ||
[38] = {value = 2, note = "Yamato-class or remodelled Nagato-class only"}, | [38] = {value = 2, note = "Yamato-class or remodelled Nagato-class only"}, | ||
+ | [39] = 1, | ||
}, | }, | ||
[10] = { | [10] = { | ||
Line 401: | Line 410: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[11] = { | [11] = { | ||
Line 441: | Line 451: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[12] = { | [12] = { | ||
Line 481: | Line 492: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[13] = { | [13] = { | ||
Line 521: | Line 533: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[14] = { | [14] = { | ||
Line 561: | Line 574: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[15] = { | [15] = { | ||
Line 601: | Line 615: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[16] = { | [16] = { | ||
Line 641: | Line 656: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[17] = { | [17] = { | ||
Line 681: | Line 697: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[18] = { | [18] = { | ||
Line 721: | Line 738: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[19] = { | [19] = { | ||
Line 761: | Line 779: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 0, | ||
}, | }, | ||
[20] = { | [20] = { | ||
Line 801: | Line 820: | ||
[37] = 1, | [37] = 1, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
[21] = { | [21] = { | ||
Line 841: | Line 861: | ||
[37] = 0, | [37] = 0, | ||
[38] = 0, | [38] = 0, | ||
+ | [39] = 1, | ||
}, | }, | ||
} | } |
Revision as of 06:19, 20 February 2015
Documentation for this module may be created at Module:EquipmentData/doc
local BaseData = require("Module:BaseData")
local EquipmentData = BaseData({
_equipment_compatibility = {
[1] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 0,
[13] = 0,
[14] = 0,
[15] = 0,
[16] = 0,
[17] = 0,
[18] = 0,
[19] = 0,
[20] = 0,
[21] = 0,
[22] = 0,
[23] = 0,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 0,
[35] = 0,
[36] = 0,
[37] = 0,
[38] = 0,
[39] = 0,
},
[2] = {
[1] = 1,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 1,
[13] = 0,
[14] = 1,
[15] = 1,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 1,
[30] = 1,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 0,
[35] = 0,
[36] = 1,
[37] = 1,
[38] = 0,
[39] = 1,
},
[3] = {
[1] = 1,
[2] = 1,
[3] = 0,
[4] = 1,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 1,
[15] = 1,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 1,
[30] = 1,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 1,
[38] = 0,
[39] = 1,
},
[4] = {
[1] = 1,
[2] = 1,
[3] = 0,
[4] = 1,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 1,
[15] = 1,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 1,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 1,
},
[5] = {
[1] = 0,
[2] = 1,
[3] = 0,
[4] = 1,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 1,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 1,
[28] = 0,
[29] = 1,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 1,
},
[6] = {
[1] = 0,
[2] = 1,
[3] = 0,
[4] = 1,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 1,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 1,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 1,
[26] = 0,
[27] = 1,
[28] = 0,
[29] = 1,
[30] = 1,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 1,
[36] = 1,
[37] = 1,
[38] = 0,
[39] = 1,
},
[7] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 1,
[5] = 0,
[6] = 1,
[7] = 1,
[8] = 1,
[9] = 1,
[10] = 0,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 1,
[26] = 1,
[27] = 1,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 1,
[35] = 1,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 0,
},
[8] = {
[1] = 0,
[2] = 0,
[3] = 1,
[4] = 1,
[5] = {value = 2, note = "Bismarck drei only"},
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 1,
[19] = 1,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 1,
[29] = 1,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 1,
},
[9] = {
[1] = 0,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 1,
[19] = 1,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 1,
[29] = 1,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 0,
[38] = {value = 2, note = "Yamato-class or remodelled Nagato-class only"},
[39] = 1,
},
[10] = {
[1] = 0,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 1,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 1,
[19] = 1,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 1,
[26] = 0,
[27] = 0,
[28] = 1,
[29] = 1,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 1,
[36] = 1,
[37] = 1,
[38] = 0,
[39] = 1,
},
[11] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 1,
[5] = 0,
[6] = 1,
[7] = 1,
[8] = 1,
[9] = 1,
[10] = 0,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 1,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 1,
[35] = 1,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 0,
},
[12] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 0,
[13] = 0,
[14] = 0,
[15] = 0,
[16] = 0,
[17] = 0,
[18] = 0,
[19] = 0,
[20] = 0,
[21] = 0,
[22] = 0,
[23] = 0,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 0,
[35] = 0,
[36] = 0,
[37] = 0,
[38] = 0,
[39] = 0,
},
[13] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 0,
[13] = 0,
[14] = 1,
[15] = 0,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 0,
[21] = 0,
[22] = 1,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 1,
[33] = 0,
[34] = 0,
[35] = 0,
[36] = 0,
[37] = 1,
[38] = 0,
[39] = 0,
},
[14] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 1,
[12] = 0,
[13] = 0,
[14] = 1,
[15] = 0,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 0,
[21] = 0,
[22] = 1,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 1,
[33] = 0,
[34] = 0,
[35] = 0,
[36] = 0,
[37] = 1,
[38] = 0,
[39] = 0,
},
[15] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 0,
[13] = 0,
[14] = 0,
[15] = 0,
[16] = 0,
[17] = 0,
[18] = 0,
[19] = 0,
[20] = 0,
[21] = 0,
[22] = 0,
[23] = 0,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 0,
[35] = 0,
[36] = 0,
[37] = 0,
[38] = 0,
[39] = 0,
},
[16] = {
[1] = 1,
[2] = 0,
[3] = 0,
[4] = 1,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 1,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 1,
[16] = 1,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 1,
[23] = 1,
[24] = 1,
[25] = 0,
[26] = 0,
[27] = 1,
[28] = 0,
[29] = 1,
[30] = 1,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 1,
[38] = 0,
[39] = 1,
},
[17] = {
[1] = 1,
[2] = 0,
[3] = 0,
[4] = 1,
[5] = 0,
[6] = 1,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 1,
[13] = 0,
[14] = 0,
[15] = 0,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 1,
[25] = 1,
[26] = 1,
[27] = 0,
[28] = 0,
[29] = 0,
[30] = 1,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 1,
[38] = 0,
[39] = 0,
},
[18] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 1,
[5] = 0,
[6] = 1,
[7] = 1,
[8] = 1,
[9] = 1,
[10] = 0,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 0,
[15] = 0,
[16] = 1,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 0,
[28] = 1,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 1,
[35] = 1,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 0,
},
[19] = {
[1] = 1,
[2] = 0,
[3] = 0,
[4] = 1,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 1,
[13] = 0,
[14] = 0,
[15] = 0,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 1,
[26] = 0,
[27] = 1,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 1,
[32] = 0,
[33] = 1,
[34] = 0,
[35] = 0,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 0,
},
[20] = {
[1] = 1,
[2] = 0,
[3] = 0,
[4] = 1,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 0,
[12] = 1,
[13] = 0,
[14] = 0,
[15] = 0,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 1,
[26] = 0,
[27] = 1,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 1,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 1,
[38] = 0,
[39] = 1,
},
[21] = {
[1] = 1,
[2] = 1,
[3] = 0,
[4] = 1,
[5] = 1,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 1,
[11] = 0,
[12] = 1,
[13] = 1,
[14] = 1,
[15] = 1,
[16] = 0,
[17] = 1,
[18] = 0,
[19] = 0,
[20] = 1,
[21] = 1,
[22] = 0,
[23] = 1,
[24] = 0,
[25] = 0,
[26] = 0,
[27] = 1,
[28] = 0,
[29] = 0,
[30] = 0,
[31] = 0,
[32] = 0,
[33] = 0,
[34] = 1,
[35] = 0,
[36] = 1,
[37] = 0,
[38] = 0,
[39] = 1,
},
}
})
function EquipmentData:name()
return self._name
end
function EquipmentData:link()
if self._page then
return self._page, self:name()
else
return self:name()
end
end
function EquipmentData:id()
return self._id
end
function EquipmentData:japanese_name()
return self._japanese_name
end
function EquipmentData:type()
return self._type
end
function EquipmentData:rarity()
return self._rarity
end
function EquipmentData:stars()
return self._stars or self:rarity()
end
function EquipmentData:back()
return self._back or self:stars()
end
function EquipmentData:card()
return self._card
end
function EquipmentData:icon()
return self._icon
end
function EquipmentData:firepower()
return self._firepower
end
function EquipmentData:bombing()
return self._bombing
end
function EquipmentData:torpedo()
return self._torpedo
end
function EquipmentData:aa()
return self._aa
end
function EquipmentData:armor()
return self._armor
end
function EquipmentData:asw()
return self._asw
end
function EquipmentData:shelling_accuracy()
return self._shelling_accuracy
end
function EquipmentData:torpedo_accuracy()
return self._torpedo_accuracy
end
function EquipmentData:evasion()
return self._evasion
end
function EquipmentData:los()
return self._los
end
function EquipmentData:speed()
return self._speed
end
function EquipmentData:luck()
return self._luck
end
function EquipmentData:range()
return self._range
end
function EquipmentData:scrap()
return {fuel = self._scrap_fuel, ammo = self._scrap_ammo, steel = self._scrap_steel, bauxite = self._scrap_bauxite}
end
function EquipmentData:buildable()
return self._buildable
end
function EquipmentData:upgradable()
return not not self._upgradable
end
function EquipmentData:special()
return self._special
end
function EquipmentData:equippable(ship_type)
local compatibility_table = self._equipment_compatibility[ship_type]
if compatibility_table then
local compatibility = compatibility_table[self:type()]
if type(compatibility) ~= "table" then
return compatibility
else
return compatibility.value, compatibility.note
end
end
end
function EquipmentData:create(equip)
equip = equip or {}
setmetatable(equip, equip)
equip.__index = self
return equip
end
EquipmentData.__call = EquipmentData.create
return EquipmentData