2015-09-02 17:53:42 +02:00
|
|
|
--
|
|
|
|
-- Jeweled tool defs
|
|
|
|
--
|
|
|
|
|
2019-08-28 17:31:41 +02:00
|
|
|
local S = minetest.get_translator("jewels")
|
|
|
|
|
2017-05-18 19:38:17 +02:00
|
|
|
-- Automatic jeweling on specific tools
|
|
|
|
|
2020-01-31 05:25:28 +01:00
|
|
|
-- Adjectives:
|
|
|
|
-- * Swift: lower dig speed
|
|
|
|
-- * Harming: more damage
|
|
|
|
-- * Durable: more uses
|
|
|
|
-- * Ranged: higher range
|
|
|
|
|
2017-05-18 19:38:17 +02:00
|
|
|
local tool_types = {
|
|
|
|
pick = {
|
|
|
|
steel = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Steel Pickaxe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.1,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Steel Pickaxe"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_pick_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 1,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Steel Pickaxe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 3,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
carbon_steel = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Carbon Steel Pickaxe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.13,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Carbon Steel Pickaxe"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_pick_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 2,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Carbon Steel Pickaxe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 5,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
bronze = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Bronze Pickaxe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.14,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Bronze Pickaxe"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_pick_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 3,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Bronze Pickaxe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 6,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
shovel = {
|
|
|
|
steel = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Steel Shovel"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.1,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Steel Shovel"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shovel_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 1,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Steel Shovel"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 3,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
carbon_steel = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Carbon Steel Shovel"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.13,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Carbon Steel Shovel"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shovel_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 2,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Carbon Steel Shovel"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 5,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
bronze = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Bronze Shovel"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.14,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Bronze Shovel"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shovel_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 3,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Bronze Shovel"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 6,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
axe = {
|
|
|
|
steel = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Steel Axe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.1,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Steel Axe"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_axe_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 2,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Steel Axe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 3,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
carbon_steel = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Carbon Steel Axe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.13,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Carbon Steel Axe"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_axe_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 3,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Carbon Steel Axe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 5,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
bronze = {
|
|
|
|
digspeed = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Bronze Axe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
digspeed = -0.14,
|
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Bronze Axe"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_axe_damage.png",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 4,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Bronze Axe"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 6,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
spear = {
|
|
|
|
steel = {
|
|
|
|
reach = {
|
2020-01-31 06:39:56 +01:00
|
|
|
overlay = "jewels_jeweled_spear_reach.png",
|
|
|
|
overlay_wield = "jewels_jeweled_spear_reach.png^[transformR90",
|
|
|
|
description = S("Extended Jewel Steel Spear"),
|
2019-09-21 23:39:31 +02:00
|
|
|
range = 1,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_spear_damage.png",
|
|
|
|
overlay_wield = "jewels_jeweled_spear_damage.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Steel Spear"),
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 3,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_handle_uses.png",
|
|
|
|
overlay_wield = "jewels_jeweled_handle_uses.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Steel Spear"),
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 3,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
carbon_steel = {
|
|
|
|
reach = {
|
2020-01-31 06:39:56 +01:00
|
|
|
description = S("Extended Jewel Carbon Steel Spear"),
|
|
|
|
overlay = "jewels_jeweled_spear_reach.png",
|
|
|
|
overlay_wield = "jewels_jeweled_spear_reach.png^[transformR90",
|
2019-09-21 23:39:31 +02:00
|
|
|
range = 2,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Carbon Steel Spear"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_spear_damage.png",
|
|
|
|
overlay_wield = "jewels_jeweled_spear_damage.png^[transformR90",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 4,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Carbon Steel Spear"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_handle_uses.png",
|
|
|
|
overlay_wield = "jewels_jeweled_handle_uses.png^[transformR90",
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 5,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
bronze = {
|
|
|
|
reach = {
|
2020-01-31 06:39:56 +01:00
|
|
|
description = S("Extended Jewel Bronze Spear"),
|
|
|
|
overlay = "jewels_jeweled_spear_reach.png",
|
|
|
|
overlay_wield = "jewels_jeweled_spear_reach.png^[transformR90",
|
2019-09-21 23:39:31 +02:00
|
|
|
range = 2,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
damage = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Harming Jewel Bronze Spear"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_spear_damage.png",
|
|
|
|
overlay_wield = "jewels_jeweled_spear_damage.png^[transformR90",
|
2017-05-18 19:40:40 +02:00
|
|
|
fleshy = 5,
|
2017-05-18 19:38:17 +02:00
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Bronze Spear"),
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_handle_uses.png",
|
|
|
|
overlay_wield = "jewels_jeweled_handle_uses.png^[transformR90",
|
2017-05-18 19:38:17 +02:00
|
|
|
uses = 6,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2019-09-24 04:06:17 +02:00
|
|
|
shears = {
|
|
|
|
steel = {
|
|
|
|
digspeed = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shears_digspeed.png",
|
|
|
|
overlay_wield = "jewels_jeweled_shears_digspeed.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Steel Shears"),
|
2019-09-24 04:06:17 +02:00
|
|
|
digspeed = -0.1,
|
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shears_uses.png",
|
|
|
|
overlay_wield = "jewels_jeweled_shears_uses.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Steel Shears"),
|
2019-09-24 04:06:17 +02:00
|
|
|
uses = 3,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
carbon_steel = {
|
|
|
|
digspeed = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shears_digspeed.png",
|
|
|
|
overlay_wield = "jewels_jeweled_shears_digspeed.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Carbon Steel Shears"),
|
2019-09-24 04:06:17 +02:00
|
|
|
digspeed = -0.13,
|
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shears_uses.png",
|
|
|
|
overlay_wield = "jewels_jeweled_shears_uses.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Carbon Steel Shears"),
|
2019-09-24 04:06:17 +02:00
|
|
|
uses = 5,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
bronze = {
|
|
|
|
digspeed = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shears_digspeed.png",
|
|
|
|
overlay_wield = "jewels_jeweled_shears_digspeed.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Swift Jewel Bronze Shears"),
|
2019-09-24 04:06:17 +02:00
|
|
|
digspeed = -0.14,
|
|
|
|
},
|
|
|
|
uses = {
|
2020-01-31 07:33:08 +01:00
|
|
|
overlay = "jewels_jeweled_shears_uses.png",
|
|
|
|
overlay_wield = "jewels_jeweled_shears_uses.png^[transformR90",
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Durable Jewel Bronze Shears"),
|
2019-09-24 04:06:17 +02:00
|
|
|
uses = 6,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2017-05-18 19:38:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2020-01-31 06:39:56 +01:00
|
|
|
local description = jewel_def.description
|
|
|
|
local overlay = jewel_def.overlay
|
|
|
|
local overlay_wield = jewel_def.overlay_wield
|
|
|
|
jewel_def.description = nil
|
|
|
|
jewel_def.overlay = nil
|
|
|
|
jewel_def.overlay_wield = nil
|
2020-01-31 07:33:08 +01:00
|
|
|
if not overlay then
|
|
|
|
if jewel_name == "damage" then
|
|
|
|
overlay = "jewels_jeweled_handle_damage.png"
|
|
|
|
elseif jewel_name == "uses" then
|
|
|
|
overlay = "jewels_jeweled_handle_uses.png"
|
|
|
|
end
|
|
|
|
end
|
2020-01-31 06:39:56 +01:00
|
|
|
jewels.register_jewel(
|
|
|
|
"default:" .. tool_name .. "_" .. material_name,
|
|
|
|
"jewels:" .. tool_name .. "_" .. material_name .. "_" .. jewel_name,
|
|
|
|
{
|
|
|
|
stats = jewel_def,
|
|
|
|
description = description,
|
|
|
|
overlay = overlay,
|
|
|
|
overlay_wield = overlay_wield,
|
|
|
|
}
|
|
|
|
)
|
2017-05-18 19:38:17 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-09-02 17:53:42 +02:00
|
|
|
|
2015-10-19 20:46:45 +02:00
|
|
|
-- Broadswords
|
|
|
|
|
|
|
|
jewels.register_jewel(
|
|
|
|
"default:broadsword",
|
|
|
|
"jewels:broadsword_jeweled_pommel",
|
|
|
|
{
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Pommel Jewel Broadsword"),
|
2015-10-19 20:46:45 +02:00
|
|
|
overlay = "jewels_jeweled_pommel.png",
|
|
|
|
stats = {
|
|
|
|
fleshy = 2,
|
|
|
|
}
|
2017-05-18 19:38:17 +02:00
|
|
|
})
|
2015-10-19 20:46:45 +02:00
|
|
|
|
|
|
|
jewels.register_jewel(
|
|
|
|
"jewels:broadsword_jeweled_pommel",
|
|
|
|
"jewels:broadsword_jeweled_pommel_and_guard",
|
|
|
|
{
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Pommel&Guard Jewel Broadsword"),
|
2015-10-19 20:46:45 +02:00
|
|
|
overlay = "jewels_jeweled_guard.png",
|
|
|
|
stats = {
|
|
|
|
range = 1,
|
|
|
|
}
|
2017-05-18 19:38:17 +02:00
|
|
|
})
|
2015-10-19 20:46:45 +02:00
|
|
|
|
|
|
|
jewels.register_jewel(
|
|
|
|
"jewels:broadsword_jeweled_pommel_and_guard",
|
|
|
|
"jewels:serrated_broadsword",
|
|
|
|
{
|
2020-01-31 05:25:28 +01:00
|
|
|
description = S("Serrated Jewel Broadsword"),
|
2015-10-19 20:46:45 +02:00
|
|
|
overlay = "jewels_jeweled_blade.png",
|
|
|
|
stats = {
|
|
|
|
fleshy = 2,
|
|
|
|
range = 1,
|
|
|
|
}
|
2017-05-18 19:38:17 +02:00
|
|
|
})
|
2015-10-19 20:46:45 +02:00
|
|
|
|
2017-05-16 19:47:12 +02:00
|
|
|
default.log("jewels", "loaded")
|