Module:ItemData: Difference between revisions

Shatangmi (talk | contribs)
mNo edit summary
Shatangmi (talk | contribs)
No edit summary
Line 9: Line 9:
end
end
end
end
return nil
end
end


Line 15: Line 16:
local item_name = frame.args[1]
local item_name = frame.args[1]
local item = get_json_item(item_name)
local item = get_json_item(item_name)
if(item == nil) then return "Item Not Found" end
     return item["Cost"]
     return item["Cost"]
Line 23: Line 25:
local item_name = frame.args[1]
local item_name = frame.args[1]
local item = get_json_item(item_name)
local item = get_json_item(item_name)
if(item == nil) then return "Item Not Found" end
if (item["Slot"] == "Weapon") then
if (item["Slot"] == "Weapon") then
Line 39: Line 42:
local item_name = frame.args[1]
local item_name = frame.args[1]
local item = get_json_item(item_name)
local item = get_json_item(item_name)
if(item == nil) then return "Item Not Found" end
if (item["Activation"] == "Passive") then
if (item["Activation"] == "Passive") then
Line 53: Line 57:
local property = frame.args[2]
local property = frame.args[2]
local item = get_json_item(item_name)
local item = get_json_item(item_name)
if(item == nil) then return "Item Not Found" end
return item[property]
return item[property]