Camas/mods/jewels/jewels.lua

202 lines
3.7 KiB
Lua
Raw Normal View History

--
-- Jeweled tool defs
--
2019-08-28 17:31:41 +02:00
local S = minetest.get_translator("jewels")
-- Automatic jeweling on specific tools
local tool_types = {
pick = {
steel = {
digspeed = {
digspeed = -0.1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 1,
},
uses = {
uses = 3,
},
},
carbon_steel = {
digspeed = {
digspeed = -0.13,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 2,
},
uses = {
uses = 5,
},
},
bronze = {
digspeed = {
digspeed = -0.14,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 6,
},
},
},
shovel = {
steel = {
digspeed = {
digspeed = -0.1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 1,
},
uses = {
uses = 3,
},
},
carbon_steel = {
digspeed = {
digspeed = -0.13,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 2,
},
uses = {
uses = 5,
},
},
bronze = {
digspeed = {
digspeed = -0.14,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 6,
},
},
},
axe = {
steel = {
digspeed = {
digspeed = -0.1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 2,
},
uses = {
uses = 3,
},
},
carbon_steel = {
digspeed = {
digspeed = -0.13,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 5,
},
},
bronze = {
digspeed = {
digspeed = -0.14,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 4,
},
uses = {
uses = 6,
},
},
},
spear = {
steel = {
reach = {
reach = 1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 3,
},
},
carbon_steel = {
reach = {
reach = 2,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 4,
},
uses = {
uses = 5,
},
},
bronze = {
reach = {
reach = 2,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 5,
},
uses = {
uses = 6,
},
},
},
}
for tool_name, tool_def in pairs(tool_types) do
for material_name, material_def in pairs(tool_def) do
for jewel_name, jewel_def in pairs(material_def) do
jewels.register_jewel(
"default:" .. tool_name .. "_" .. material_name,
"jewels:" .. tool_name .. "_" .. material_name .. "_" .. jewel_name,
{
stats = jewel_def,
})
end
end
end
2015-10-19 20:46:45 +02:00
-- Broadswords
jewels.register_jewel(
"default:broadsword",
"jewels:broadsword_jeweled_pommel",
{
2019-08-28 17:31:41 +02:00
description = S("Jeweled Pommel Broadsword"),
2015-10-19 20:46:45 +02:00
overlay = "jewels_jeweled_pommel.png",
stats = {
fleshy = 2,
}
})
2015-10-19 20:46:45 +02:00
jewels.register_jewel(
"jewels:broadsword_jeweled_pommel",
"jewels:broadsword_jeweled_pommel_and_guard",
{
2019-08-28 17:31:41 +02:00
description = S("Jeweled Pommel&Guard Broadsword"),
2015-10-19 20:46:45 +02:00
overlay = "jewels_jeweled_guard.png",
stats = {
range = 1,
}
})
2015-10-19 20:46:45 +02:00
jewels.register_jewel(
"jewels:broadsword_jeweled_pommel_and_guard",
"jewels:serrated_broadsword",
{
2019-08-28 17:31:41 +02:00
description = S("Serrated Broadsword"),
2015-10-19 20:46:45 +02:00
overlay = "jewels_jeweled_blade.png",
stats = {
fleshy = 2,
range = 1,
}
})
2015-10-19 20:46:45 +02:00
default.log("jewels", "loaded")