diff --git a/book.txt b/book.txt
index d578872..98917a8 100644
--- a/book.txt
+++ b/book.txt
@@ -35,12 +35,22 @@ The Transterra is a stone that can be used to create or remove nodes f
+1 Earth | 1 Dark
#2magicalities:tellium
Tellium is a metal that can be used to create magical tools. It is made in the Cauldron.
+5 Fire | 5 Earth
#2magicalities:element_ring
The Elemental Ring can show you what elements a crystal contains and their quantities.
#2magicalities:focus_blank
The Blank Wand Focus is your gateway to the world of Wand Focuses.
+#2magicalities:axe_tellium
+Tellium Axe is a Diamond-tier tool that can be empowered by right-clicking. In empowered mode, the axe is 2x as fast but breaks about 4x faster.
+#2magicalities:pick_tellium
+Tellium Pickaxe is a Diamond-tier tool that can be empowered by right-clicking. In empowered mode, the pickaxe is 2x as fast but breaks about 4x faster.
+#2magicalities:shovel_tellium
+Tellium Shovel is a Diamond-tier tool that can be empowered by right-clicking. In empowered mode, the shovel is 2x as fast but breaks about 4x faster.
+#2magicalities:sword_tellium
+Tellium Sword is a Diamond-tier tool that can be empowered by right-clicking. In empowered mode, the sword deals 2x more damage but breaks about 4x faster.
diff --git a/init.lua b/init.lua
index 62d879a..cb5d727 100644
--- a/init.lua
+++ b/init.lua
@@ -41,6 +41,9 @@ dofile(modpath.."/nodes.lua")
-- Items
dofile(modpath.."/craftitems.lua")
+-- Tools
+dofile(modpath.."/tools.lua")
+
-- Scanner
dofile(modpath.."/scanner.lua")
diff --git a/register.lua b/register.lua
index ec528e5..a58289e 100644
--- a/register.lua
+++ b/register.lua
@@ -191,6 +191,72 @@ local recipes = {
learnable = {
depends = {"magicalities:focus_blank"}
}
+ },
+ {
+ input = {
+ {"magicalities:tellium", "magicalities:tellium", ""},
+ {"magicalities:tellium", "magicalities:transterra", ""},
+ {"", "default:stick", ""}
+ },
+ output = "magicalities:axe_tellium",
+ requirements = {
+ ["air"] = 45,
+ ["light"] = 45,
+ ["earth"] = 15
+ },
+ learnable = {
+ depends = {"magicalities:tellium", "magicalities:transterra", "magicalities:wand_gold"}
+ }
+ },
+ {
+ input = {
+ {"magicalities:tellium", "magicalities:tellium", "magicalities:tellium"},
+ {"", "magicalities:transterra", ""},
+ {"", "default:stick", ""}
+ },
+ output = "magicalities:pick_tellium",
+ requirements = {
+ ["air"] = 45,
+ ["light"] = 15,
+ ["earth"] = 45
+ },
+ learnable = {
+ depends = {"magicalities:tellium", "magicalities:transterra", "magicalities:wand_gold"}
+ }
+ },
+ {
+ input = {
+ {"magicalities:tellium"},
+ {"magicalities:transterra"},
+ {"default:stick"}
+ },
+ output = "magicalities:shovel_tellium",
+ requirements = {
+ ["air"] = 45,
+ ["dark"] = 15,
+ ["earth"] = 45
+ },
+ learnable = {
+ depends = {"magicalities:tellium", "magicalities:transterra", "magicalities:wand_gold"}
+ }
+ },
+ {
+ input = {
+ {"magicalities:tellium"},
+ {"magicalities:transterra"},
+ {"default:stick"}
+ },
+ output = "magicalities:sword_tellium",
+ requirements = {
+ ["air"] = 45,
+ ["dark"] = 45,
+ ["light"] = 45,
+ ["earth"] = 45,
+ ["fire"] = 15
+ },
+ learnable = {
+ depends = {"magicalities:tellium", "magicalities:transterra", "magicalities:wand_gold"}
+ }
}
}
diff --git a/research_table.lua b/research_table.lua
index 14b5e75..306f813 100644
--- a/research_table.lua
+++ b/research_table.lua
@@ -8,6 +8,7 @@ function magicalities.researching.generate_formspec_list(list, x, y, w, h, index
local total = #list
local visualtotal = math.ceil(y + h)
local reallist = {}
+ local pages = math.ceil(total / visualtotal)
for i = index * visualtotal, (index * visualtotal) + visualtotal do
if list[i + 1] then
@@ -40,7 +41,9 @@ function magicalities.researching.generate_formspec_list(list, x, y, w, h, index
if index > 0 then
i = i .. "button["..(x+w)..","..y..";1,1;up;Up]"
- elseif total > visualtotal then
+ end
+
+ if pages > index + 1 then
i = i .. "button["..(x+w)..","..(y+h-0.25)..";1,1;dn;Down]"
end
diff --git a/sounds/magicalities_charge.ogg b/sounds/magicalities_charge.ogg
new file mode 100644
index 0000000..2362946
Binary files /dev/null and b/sounds/magicalities_charge.ogg differ
diff --git a/sounds/magicalities_discharge.ogg b/sounds/magicalities_discharge.ogg
new file mode 100644
index 0000000..18ce2b8
Binary files /dev/null and b/sounds/magicalities_discharge.ogg differ
diff --git a/textures/magicalities_tellium_axe.png b/textures/magicalities_tellium_axe.png
new file mode 100644
index 0000000..7f32d2a
Binary files /dev/null and b/textures/magicalities_tellium_axe.png differ
diff --git a/textures/magicalities_tellium_axe_rage.png b/textures/magicalities_tellium_axe_rage.png
new file mode 100644
index 0000000..a9333ae
Binary files /dev/null and b/textures/magicalities_tellium_axe_rage.png differ
diff --git a/textures/magicalities_tellium_pick.png b/textures/magicalities_tellium_pick.png
new file mode 100644
index 0000000..cb214d6
Binary files /dev/null and b/textures/magicalities_tellium_pick.png differ
diff --git a/textures/magicalities_tellium_pick_rage.png b/textures/magicalities_tellium_pick_rage.png
new file mode 100644
index 0000000..5ce5a48
Binary files /dev/null and b/textures/magicalities_tellium_pick_rage.png differ
diff --git a/textures/magicalities_tellium_shovel.png b/textures/magicalities_tellium_shovel.png
new file mode 100644
index 0000000..7ef6c82
Binary files /dev/null and b/textures/magicalities_tellium_shovel.png differ
diff --git a/textures/magicalities_tellium_shovel_rage.png b/textures/magicalities_tellium_shovel_rage.png
new file mode 100644
index 0000000..763808e
Binary files /dev/null and b/textures/magicalities_tellium_shovel_rage.png differ
diff --git a/textures/magicalities_tellium_sword.png b/textures/magicalities_tellium_sword.png
new file mode 100644
index 0000000..c86bda2
Binary files /dev/null and b/textures/magicalities_tellium_sword.png differ
diff --git a/textures/magicalities_tellium_sword_rage.png b/textures/magicalities_tellium_sword_rage.png
new file mode 100644
index 0000000..7a6d2a9
Binary files /dev/null and b/textures/magicalities_tellium_sword_rage.png differ
diff --git a/tools.lua b/tools.lua
new file mode 100644
index 0000000..add114d
--- /dev/null
+++ b/tools.lua
@@ -0,0 +1,186 @@
+
+-- Pickaxe
+
+minetest.register_tool("magicalities:pick_tellium", {
+ description = "Tellium Pickaxe",
+ inventory_image = "magicalities_tellium_pick.png",
+ tool_capabilities = {
+ full_punch_interval = 0.9,
+ max_drop_level = 3,
+ groupcaps = {
+ cracky = { times = { [1] = 2.0, [2] = 1.0, [3] = 0.50}, uses = 30, maxlevel = 3},
+ },
+ damage_groups = { fleshy = 5 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { pickaxe = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:pick_tellium_rage")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_charge")
+ return itemstack
+ end,
+})
+
+minetest.register_tool("magicalities:pick_tellium_rage", {
+ description = "Empowered Tellium Pickaxe",
+ inventory_image = "magicalities_tellium_pick_rage.png",
+ tool_capabilities = {
+ full_punch_interval = 0.45,
+ max_drop_level = 3,
+ groupcaps = {
+ cracky = { times = { [1] = 1.0, [2] = 0.5, [3] = 0.25}, uses = 5, maxlevel = 3},
+ },
+ damage_groups = { fleshy = 10 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { pickaxe = 1, not_in_creative_inventory = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:pick_tellium")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_discharge")
+ return itemstack
+ end,
+})
+
+-- Shovel
+
+minetest.register_tool("magicalities:shovel_tellium", {
+ description = "Tellium Shovel",
+ inventory_image = "magicalities_tellium_shovel.png",
+ wield_image = "magicalities_tellium_shovel.png^[transformR90",
+ tool_capabilities = {
+ full_punch_interval = 1.0,
+ max_drop_level = 1,
+ groupcaps = {
+ crumbly = { times = { [1] = 1.10, [2] = 0.50, [3] = 0.30}, uses = 30, maxlevel = 3},
+ },
+ damage_groups = { fleshy = 4 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { shovel = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:shovel_tellium_rage")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_charge")
+ return itemstack
+ end,
+})
+
+minetest.register_tool("magicalities:shovel_tellium_rage", {
+ description = "Empowered Tellium Shovel",
+ inventory_image = "magicalities_tellium_shovel_rage.png",
+ wield_image = "magicalities_tellium_shovel_rage.png^[transformR90",
+ tool_capabilities = {
+ full_punch_interval = 0.5,
+ max_drop_level = 1,
+ groupcaps = {
+ crumbly = { times = { [1] = 0.55, [2] = 0.25, [3] = 0.15}, uses = 5, maxlevel = 3},
+ },
+ damage_groups = { fleshy = 4 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { shovel = 1, not_in_creative_inventory = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:shovel_tellium")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_discharge")
+ return itemstack
+ end,
+})
+
+-- Axe
+
+minetest.register_tool("magicalities:axe_tellium", {
+ description = "Tellium Axe",
+ inventory_image = "magicalities_tellium_axe.png",
+ tool_capabilities = {
+ full_punch_interval = 0.9,
+ max_drop_level = 1,
+ groupcaps = {
+ choppy = { times = { [1] = 2.10, [2] = 0.90, [3] = 0.50}, uses = 30, maxlevel = 3},
+ },
+ damage_groups = { fleshy = 7 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { axe = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:axe_tellium_rage")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_charge")
+ return itemstack
+ end,
+})
+
+minetest.register_tool("magicalities:axe_tellium_rage", {
+ description = "Empowered Tellium Axe",
+ inventory_image = "magicalities_tellium_axe_rage.png",
+ tool_capabilities = {
+ full_punch_interval = 0.45,
+ max_drop_level = 1,
+ groupcaps = {
+ choppy = { times = { [1] = 1.05, [2] = 0.45, [3] = 0.25}, uses = 5, maxlevel = 3},
+ },
+ damage_groups = { fleshy = 14 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { axe = 1, not_in_creative_inventory = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:axe_tellium")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_discharge")
+ return itemstack
+ end,
+})
+
+-- Sword
+
+minetest.register_tool("magicalities:sword_tellium", {
+ description = "Tellium Sword",
+ inventory_image = "magicalities_tellium_sword.png",
+ tool_capabilities = {
+ full_punch_interval = 0.7,
+ max_drop_level = 1,
+ groupcaps = {
+ snappy = { times={ [1] = 1.90, [2] = 0.90, [3] = 0.30 }, uses = 40, maxlevel = 3 },
+ },
+ damage_groups = { fleshy = 8 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { sword = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:sword_tellium_rage")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_charge")
+ return itemstack
+ end,
+})
+
+minetest.register_tool("magicalities:sword_tellium_rage", {
+ description = "Empowered Tellium Sword",
+ inventory_image = "magicalities_tellium_sword_rage.png",
+ tool_capabilities = {
+ full_punch_interval = 0.35,
+ max_drop_level = 1,
+ groupcaps = {
+ snappy = { times={ [1] = 0.95, [2] = 0.45, [3] = 0.15 }, uses = 10, maxlevel = 3 },
+ },
+ damage_groups = { fleshy = 16 },
+ },
+ sound = { breaks = "default_tool_breaks" },
+ groups = { sword = 1, not_in_creative_inventory = 1 },
+ on_secondary_use = function(itemstack, user, pointed_thing)
+ local w = itemstack:get_wear()
+ itemstack = ItemStack("magicalities:sword_tellium")
+ itemstack:set_wear(w)
+ minetest.sound_play("magicalities_discharge")
+ return itemstack
+ end,
+})