Empowerable tools

This commit is contained in:
Evert Prants 2019-11-09 00:47:02 +02:00
parent d8350bd491
commit 7649065f41
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
15 changed files with 269 additions and 1 deletions

View File

@ -35,12 +35,22 @@ The <b>Transterra</b> is a stone that can be used to <b>create or remove nodes f
<center><item name="default:stone" width=64 height=64><img name=magicalities_book_plus.png width=64 height=64><item name="default:dirt" width=64 height=64><img name=magicalities_book_plus.png width=64 height=64><item name="magicalities:crystal_fire" width=64 height=64></center>
<center><img name=gui_furnace_arrow_bg.png^\[transformFY width=64 height=64></center>
<center><item name="magicalities:cauldron_with_water" width=64 height=64><img name=magicalities_book_plus.png width=64 height=64><item name="magicalities:wand_steel" width=64 height=64></center>
<center><big>1 Earth | 1 Dark</big></center>
#2magicalities:tellium
<b>Tellium</b> is a metal that can be used to <b>create magical tools</b>. It is made in the Cauldron.
<center><item name="default:steel_ingot" width=64 height=64><img name=magicalities_book_plus.png width=64 height=64><item name="default:obsidian" width=64 height=64></center>
<center><img name=gui_furnace_arrow_bg.png^\[transformFY width=64 height=64></center>
<center><item name="magicalities:cauldron_with_water" width=64 height=64><img name=magicalities_book_plus.png width=64 height=64><item name="magicalities:wand_steel" width=64 height=64></center>
<center><big>5 Fire | 5 Earth</big></center>
#2magicalities:element_ring
The <b>Elemental Ring</b> can show you what elements a crystal contains and their quantities.
#2magicalities:focus_blank
The <b>Blank Wand Focus</b> is your gateway to the world of <b>Wand Focuses</b>.
#2magicalities:axe_tellium
<b>Tellium Axe</b> 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
<b>Tellium Pickaxe</b> 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
<b>Tellium Shovel</b> 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
<b>Tellium Sword</b> 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.

View File

@ -41,6 +41,9 @@ dofile(modpath.."/nodes.lua")
-- Items
dofile(modpath.."/craftitems.lua")
-- Tools
dofile(modpath.."/tools.lua")
-- Scanner
dofile(modpath.."/scanner.lua")

View File

@ -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"}
}
}
}

View File

@ -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

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

186
tools.lua Normal file
View File

@ -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,
})