• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Module:EquipmentData

From Kancolle Wiki
Revision as of 22:46, 12 February 2015 by com>Ckwng (Refactor out formatting)
Jump to navigation Jump to search

Documentation for this module may be created at Module:EquipmentData/doc

local BaseData = require("Module:BaseData")
local EquipmentData = BaseData()

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: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_fuel()
	return self._scrap_fuel
end

function EquipmentData:scrap_ammo()
	return self._scrap_ammo
end

function EquipmentData:scrap_steel()
	return self._scrap_steel
end

function EquipmentData:scrap_bauxite()
	return self._scrap_bauxite
end

function EquipmentData:upgradable()
	return not not self._upgradable
end

function EquipmentData:create(equip)
	equip = equip or {}
	setmetatable(equip, equip)
	equip.__index = self
	return equip
end

EquipmentData.__call = EquipmentData.create

return EquipmentData