commit cde3fe94a05a8403ad6339fe8248bbb835f6c88f Author: DonBatman Date: Sat Mar 5 09:47:07 2016 -0800 First upload diff --git a/modpack.txt b/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/mymagic/blocks.lua b/mymagic/blocks.lua new file mode 100644 index 0000000..94481ef --- /dev/null +++ b/mymagic/blocks.lua @@ -0,0 +1,145 @@ +local blocks = { + {"Orange", "orange", "sword", {magic_sword = 4}}, + {"Green", "green", "sword", {magic_sword = 3}}, + {"Blue", "blue", "sword", {magic_sword = 2}}, + {"Red", "red", "sword", {magic_sword = 1}}, + {"Orange", "orange", "axe", {magic_axe = 4}}, + {"Green", "green", "axe", {magic_axe = 3}}, + {"Blue", "blue", "axe", {magic_axe = 2}}, + {"Red", "red", "axe", {magic_axe = 1}}, + } +for i in ipairs (blocks) do + local des = blocks[i][1] + local col = blocks[i][2] + local tool = blocks[i][3] + local mag = blocks[i][4] + +minetest.register_node("mymagic:block_"..col..tool,{ + description = des.." Magic block - "..tool, + tiles = {"mymagic_block_"..tool.."_"..col..".png"}, + paramtype = "light", + drop = "", + groups = mag, + on_punch = function(pos, node, puncher, pointed_thing) + minetest.chat_send_player(puncher:get_player_name(), "You need an enchanted "..col.." "..tool.." to break this block") + end, +}) +end + +local function parti(pos) + minetest.add_particlespawner(40, 1, + pos, pos, + {x=-5, y=-5, z=-5}, {x=5, y=5, z=5}, + {x=-2, y=-2, z=-2}, {x=2, y=2, z=2}, + 0.2, 2, + 0.2, 3, + false, "mymagic_magic_parti.png") +end + +local items = { + {"default:sword_diamond","sword","Sword Block"}, + {"default:pick_diamond","pick","Pick Block"}, + {"default:axe_diamond","axe","Axe Block"}, + } +for i in ipairs (items) do + local itm = items[i][1] + local nam = items[i][2] + local des = items[i][3] + +minetest.register_node("mymagic:"..nam.."_block",{ + description = des, + tiles = {"mymagic_block_"..nam..".png"}, + drawtype = "nodebox", + paramtype = "light", + drop = "", + light_source = 12, + groups = {magic_sword = 1,cracky=3}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.3125, -0.3125, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.3125}, + {0.3125, -0.5, -0.5, 0.5, 0.5, -0.3125}, + {0.3125, -0.5, 0.3125, 0.5, 0.5, 0.5}, + {0.3125, -0.5, -0.3125, 0.5, -0.3125, 0.3125}, + {-0.5, -0.5, -0.3125, -0.3125, -0.3125, 0.3125}, + {-0.5, 0.3125, -0.3125, -0.3125, 0.5, 0.3125}, + {0.3125, 0.3125, -0.3125, 0.5, 0.5, 0.3125}, + {-0.3125, 0.3125, 0.3125, 0.3125, 0.5, 0.5}, + {-0.3125, 0.3125, -0.5, 0.3125, 0.5, -0.3125}, + {-0.3125, -0.5, -0.5, 0.3125, -0.3125, -0.3125}, + {-0.3125, -0.5, 0.3125, 0.3125, -0.3125, 0.5}, + {-0.3125, -0.3125, -0.3125, 0.3125, 0.3125, 0.3125}, + } + }, + on_destruct = function(pos) + minetest.spawn_item(pos, itm) + parti(pos) + end, +}) +end +local colors = { + {"red",{ r=255, g=0, b=0, a=200 }}, + {"green",{ r=0, g=255, b=0, a=200 }}, + {"blue",{ r=0, g=150, b=180, a=200 }}, + {"orange",{ r=200, g=150, b=0, a=200 }} + } +for i in ipairs(colors) do +local col = colors[i][1] +local rgb = colors[i][2] +local scol = 0 +if col == "red" then scol = 1 +elseif col == "blue" then scol = 2 +elseif col == "green" then scol = 3 +elseif col == "orange" then scol = 4 +end + +minetest.register_node("mymagic:colored_energy_"..col,{ + description = "Energy Block", + tiles = {{name="mymagic_teleport_ani_"..col..".png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.5}}}, + paramtype = "light", + drawtype = "liquid", + post_effect_color = rgb, + drop = "", + light_source = 14, + walkable = false, + groups = {cracky=1,magic_shovel = scol}, + +}) +minetest.register_craft({ + output = "mymagic:colored_energy_"..col, + recipe = { + {"mymagic:orb_"..col,"mymagic:orb_"..col,""}, + {"mymagic:orb_"..col,"mymagic:orb_"..col,""}, + {"","",""} + }, +}) +end +minetest.register_node("mymagic:hole1",{ + description = "FakeTeleport Block", + tiles = { + "mymagic_hole_in_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + }, + paramtype = "light", + drop = "", + groups = {magic_shovel = 1}, +}) +minetest.register_node("mymagic:hole2",{ + description = "FakeTeleport Block", + tiles = { + "mymagic_hole_in_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + "mymagic_floor.png", + }, + paramtype = "light", + drop = "", + groups = {magic_shovel = 1}, +}) diff --git a/mymagic/blocks_default.lua b/mymagic/blocks_default.lua new file mode 100644 index 0000000..5cfa3e1 --- /dev/null +++ b/mymagic/blocks_default.lua @@ -0,0 +1,21 @@ +local blocks = { + {"pick","cobble","Cobble",{cracky=1}}, + {"pick","desert_cobble","Desert Cobble",{cracky=1}}, + {"pick","stone_brick","Stone Brick",{cracky=1}}, + {"pick","desert_stone_brick","Desert Stone Brick",{cracky=1}}, + + } +for i in ipairs(blocks) do + local tl = blocks[i][1] + local itm = blocks[i][2] + local des = blocks[i][3] + local gro = blocks[i][4] + +minetest.register_node("mymagic:dark"..itm,{ + description = "Dark "..des, + tiles = {"mymagic_dark_"..itm..".png"}, + drawtype = "normal", + paramtype = "light", + groups = {magic_pick = 1}, +}) +end diff --git a/mymagic/craftitems.lua b/mymagic/craftitems.lua new file mode 100644 index 0000000..da0e530 --- /dev/null +++ b/mymagic/craftitems.lua @@ -0,0 +1,12 @@ +--Blood Drop +minetest.register_craftitem("mymagic:blood_drop",{ + inventory_image = "mymagic_blood_drop.png", + description = "Blood Drop", + }) + + --Gold Coin +minetest.register_craftitem("mymagic:gold_coin",{ + inventory_image = "mymagic_gold_coin.png", + description = "Gold Coin", + stack_max = 10000, + }) diff --git a/mymagic/depends.txt b/mymagic/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/mymagic/depends.txt @@ -0,0 +1 @@ +default diff --git a/mymagic/doors.lua b/mymagic/doors.lua new file mode 100644 index 0000000..2090798 --- /dev/null +++ b/mymagic/doors.lua @@ -0,0 +1,149 @@ +local door_bottom_box_closed = {type = "fixed",fixed = { + {-0.5, -0.5, -0.5, -0.25, 0.5, 0.5}, + {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875},}} + +local door_bottom_box_open = {type = "fixed",fixed = { + {-0.5, -0.5, -0.5, -0.25, 0.5, 0.5}, + {-0.5, -0.5, -0.1875, 0, 0.5, 0.1875},}} + +local door_top_box_closed = {type = "fixed",fixed = { + {-0.5, -0.5, -0.5, -0.25, 0.5, 0.5}, + {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, + {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, 0.375, -0.5, 0.1875, 0.5, 0.5}, + {-0.5, 0.3125, -0.5, 0.0625, 0.5, 0.5}, + {-0.5, 0, -0.5, -0.1875, 0.5, 0.5}, + {-0.5, 0.125, -0.5, -0.125, 0.5, 0.5}, + {-0.5, 0.1875, -0.5, -0.0625, 0.5, 0.5}, + {-0.5, 0.25, -0.5, 0, 0.5, 0.5},}} + +local door_top_box_open = {type = "fixed",fixed = { + {-0.5, -0.5, -0.5, -0.25, 0.5, 0.5}, + {-0.5, -0.5, -0.1875, 0, 0.5, 0.1875}, + {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, 0.375, -0.5, 0.1875, 0.5, 0.5}, + {-0.5, 0.3125, -0.5, 0.0625, 0.5, 0.5}, + {-0.5, 0, -0.5, -0.1875, 0.5, 0.5}, + {-0.5, 0.125, -0.5, -0.125, 0.5, 0.5}, + {-0.5, 0.1875, -0.5, -0.0625, 0.5, 0.5}, + {-0.5, 0.25, -0.5, 0, 0.5, 0.5},}} + +local door_box = {type = "fixed",fixed = { + {-0.5, -0.5, -0.1875, 1.5, 1.5, 0.1875},}} + +local nobox = {type = "fixed",fixed = { + {0, 0, 0, 0, 0, 0},}} + +local door_nodes = { + {"dungeon", "Magic Door", 0,{"default_stone_brick.png"}, door_bottom_box_closed, door_box}, + {"bottom_closed", "a", 1,{"default_stone_brick.png"}, door_bottom_box_closed, nobox}, + {"bottom_open", "a", 1,{"default_stone_brick.png"}, door_bottom_box_open, nobox}, + {"bottom_open2", "a", 1,{"default_stone_brick.png"}, door_bottom_box_open, door_box}, + {"top_closed", "a", 1,{"default_stone_brick.png"}, door_top_box_closed, nobox}, + {"top_open", "a", 1,{"default_stone_brick.png"}, door_top_box_open, nobox}, + } +for i in ipairs(door_nodes) do + local itm = door_nodes[i][1] + local des = door_nodes[i][2] + local nic = door_nodes[i][3] + local til = door_nodes[i][4] + local nbox = door_nodes[i][5] + local sbox = door_nodes[i][6] + +minetest.register_node("mymagic:door_"..itm,{ + description = des, + tiles = til, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, not_in_creative_inventory = nic}, + node_box = nbox, + selection_box = sbox, +}) +end +minetest.override_item("mymagic:door_dungeon",{ + on_place = function(itemstack, placer, pointed_thing) + local dir = minetest.dir_to_facedir(placer:get_look_dir()) + local pos = pointed_thing.above + local pt = pos + if dir == 0 then + pt = {x=pos.x+1,y=pos.y,z=pos.z} + elseif dir == 1 then + pt = {x=pos.x,y=pos.y,z=pos.z-1} + elseif dir == 2 then + pt = {x=pos.x-1,y=pos.y,z=pos.z} + elseif dir == 3 then + pt = {x=pos.x,y=pos.y,z=pos.z+1} + end + local par = dir + local par2 = dir + 2 + if par2 == 4 then + par2 = 0 + elseif par2 == 5 then + par2 = 1 + end + minetest.set_node(pos,{name = "mymagic:door_dungeon", param2 = dir}) + minetest.set_node(pt,{name = "mymagic:door_bottom_closed", param2 = par2}) + minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name = "mymagic:door_top_closed", param2 = dir}) + minetest.set_node({x=pt.x,y=pt.y+1,z=pt.z},{name = "mymagic:door_top_closed", param2 = par2}) + end, + after_destruct = function(pos, oldnode) + local door = minetest.find_nodes_in_area({x=pos.x-1,y=pos.y,z=pos.z-1},{x=pos.x+1,y=pos.y+1,z=pos.z+1}, {"mymagic:door_dungeon","mymagic:door_bottom_closed","mymagic:door_top_closed"}) + for k, p in pairs(door) do + minetest.set_node(p,{name="air"}) + end + end, + on_punch = function(pos, node, puncher, pointed_thing) + local timer = minetest.get_node_timer(pos) + local wi = puncher:get_wielded_item() + if wi:get_name() == "mymagic:orb_orange" or + wi:get_name() == "mymagic:orb_green" or + wi:get_name() == "mymagic:orb_blue" or + wi:get_name() == "mymagic:orb_red" then + local door = minetest.find_nodes_in_area({x=pos.x-1,y=pos.y,z=pos.z-1},{x=pos.x+1,y=pos.y+1,z=pos.z+1}, {"mymagic:door_dungeon","mymagic:door_bottom_closed","mymagic:door_top_closed"}) + for k, p in pairs(door) do + local pnode = minetest.get_node(p) + if pnode.name == "mymagic:door_dungeon" then + minetest.swap_node(p,{name="mymagic:door_bottom_open2", param2=pnode.param2}) + elseif pnode.name == "mymagic:door_bottom_closed" then + minetest.swap_node(p,{name="mymagic:door_bottom_open", param2=pnode.param2}) + elseif pnode.name == "mymagic:door_top_closed" then + minetest.swap_node(p,{name="mymagic:door_top_open", param2=pnode.param2}) + end + end + timer:start(3) + else minetest.chat_send_player(puncher:get_player_name(), "You need to hold an orb to open!") + end + end, + +}) +minetest.override_item("mymagic:door_bottom_open2",{ + on_timer = function(pos, elapsed) + local door = minetest.find_nodes_in_area({x=pos.x-1,y=pos.y,z=pos.z-1},{x=pos.x+1,y=pos.y+1,z=pos.z+1}, {"mymagic:door_bottom_open2","mymagic:door_bottom_open","mymagic:door_top_open"}) + for k, p in pairs(door) do + local pnode = minetest.get_node(p) + if pnode.name == "mymagic:door_bottom_open2" then + minetest.swap_node(p,{name="mymagic:door_dungeon", param2=pnode.param2}) + elseif pnode.name == "mymagic:door_bottom_open" then + minetest.swap_node(p,{name="mymagic:door_bottom_closed", param2=pnode.param2}) + elseif pnode.name == "mymagic:door_top_open" then + minetest.swap_node(p,{name="mymagic:door_top_closed", param2=pnode.param2}) + end + end + end, + after_destruct = function(pos, oldnode) + local door = minetest.find_nodes_in_area({x=pos.x-1,y=pos.y,z=pos.z-1},{x=pos.x+1,y=pos.y+1,z=pos.z+1}, {"mymagic:door_open2","mymagic:door_bottom_open","mymagic:door_top_open"}) + for k, p in pairs(door) do + minetest.set_node(p,{name="air"}) + end + end, +}) + + + + + + + + + diff --git a/mymagic/enchanter.lua b/mymagic/enchanter.lua new file mode 100644 index 0000000..aae50ac --- /dev/null +++ b/mymagic/enchanter.lua @@ -0,0 +1,213 @@ +local enchanted_tool = {} +local enchant = false + + + + +minetest.register_node("mymagic:enchantment_table",{ + description = "Enchantment Table", + tiles = { + {name="mymagic_enchantment_table_top_ani.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + "mymagic_enchantment_table_bottom.png", + {name="mymagic_enchantment_table_side_ani.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + {name="mymagic_enchantment_table_side_ani.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + {name="mymagic_enchantment_table_side_ani.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + {name="mymagic_enchantment_table_side_ani.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = 7, + groups = {choppy = 2}, + node_box = { + type = "fixed", + fixed = { + {-0.4375, -0.5, 0.25, -0.25, 0.125, 0.4375}, + {0.25, -0.5, 0.25, 0.4375, 0.125, 0.4375}, + {-0.4375, -0.5, -0.4375, -0.25, 0.125, -0.25}, + {0.25, -0.5, -0.4375, 0.4375, 0.125, -0.25}, + {-0.5, 0.125, -0.5, 0.5, 0.25, 0.5}, + {-0.375, -0.0625, -0.375, 0.375, 0.125, 0.375}, + {-0.4375, 0.25, 0.125, -0.375, 0.5, 0.1875}, + {0.375, 0.25, 0.125, 0.4375, 0.5, 0.1875}, + {-0.0625, 0.25, 0.375, 0, 0.5, 0.4375}, + {-0.25, 0.25, -0.375, -0.1875, 0.5, -0.3125}, + {0.1875, 0.25, -0.375, 0.25, 0.5, -0.3125}, + } + }, + +after_place_node = function(pos, placer) + local meta = minetest.env:get_meta(pos); + meta:set_string("infotext", "Enchantment Table"); +end, +can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("tool") then + return false + elseif not inv:is_empty("orb1") then + return false + elseif not inv:is_empty("orb2") then + return false + elseif not inv:is_empty("orb3") then + return false + elseif not inv:is_empty("orb4") then + return false + elseif not inv:is_empty("output") then + return false + end + return true +end, +on_construct = function(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", "size[10,8;]".. + "background[-2,-2;13,12;mymagic_enchantment_table_bg.png]".. + "listcolors[#00000000;#00000000;#000000]".. + --top row + "label[1,0.5;Tool]".. + "label[3,0.5;Orbs]".. + "list[current_name;tool;1,1;1,1;]".. + "list[current_name;orb1;3,1;1,1;]".. + "list[current_name;orb2;4,1;1,1;]".. + --bottom row + "list[current_name;orb3;3,2;1,1;]".. + "list[current_name;orb4;4,2;1,1;]".. + --Output + "button[5.5,1;2,1;button;Enchant]".. + --"label[6,1.5;Enchanted Tool]".. + "list[current_name;output;6,2;1,1;]".. + --Show Inventory + "list[current_player;main;0.5,4;8,4;]") + meta:set_string("infotext", "Tool Upgrade") + local inv = meta:get_inventory() + inv:set_size("tool", 1) + inv:set_size("orb1", 1) + inv:set_size("orb2", 1) + inv:set_size("orb3", 1) + inv:set_size("orb4", 1) + inv:set_size("output", 1) +end, + +on_receive_fields = function(pos, formname, fields, sender) +local meta = minetest.get_meta(pos) +local inv = meta:get_inventory() + +if fields["button"] +then + enchant = false + + if inv:is_empty("tool") or + inv:is_empty("orb1") or + inv:is_empty("orb2") or + inv:is_empty("orb3") or + inv:is_empty("orb4") then + return + end + + local tool = inv:get_stack("tool", 1) + local orba = inv:get_stack("orb1", 1) + local orbb = inv:get_stack("orb2", 1) + local orbc = inv:get_stack("orb3", 1) + local orbd = inv:get_stack("orb4", 1) + local t = {"pick","axe","shovel","sword"} + local c = {"orange","green","blue","red"} + local m = {"wood","stone","steel","bronze","mese","diamond"} + for i, tls in pairs(t) do + --for i, clr in pairs(c) do + for i, mtr in pairs(m) do + local tool_list = { + {"default:"..tls.."_"..mtr, "orange", "mymagic_tools:"..tls.."_enchanted_"..mtr.."_orange"}, + {"mymagic_tools:"..tls.."_enchanted_"..mtr.."_orange", "green", "mymagic_tools:"..tls.."_enchanted_"..mtr.."_green"}, + {"mymagic_tools:"..tls.."_enchanted_"..mtr.."_green", "blue", "mymagic_tools:"..tls.."_enchanted_"..mtr.."_blue"}, + {"mymagic_tools:"..tls.."_enchanted_"..mtr.."_blue", "red", "mymagic_tools:"..tls.."_enchanted_"..mtr.."_red"}, + + {"mymagic_tools:knife_"..mtr, "orange", "mymagic_tools:knife_enchanted_"..mtr.."_orange"}, + {"mymagic_tools:knife_enchanted_"..mtr.."_orange", "green", "mymagic_tools:knife_enchanted_"..mtr.."_green"}, + {"mymagic_tools:knife_enchanted_"..mtr.."_green", "blue", "mymagic_tools:knife_enchanted_"..mtr.."_blue"}, + {"mymagic_tools:knife_enchanted_"..mtr.."_blue", "red", "mymagic_tools:knife_enchanted_"..mtr.."_red"}, + + {"3d_armor:helmet_diamond", "orange", "dungeon_armor:diamond_helmet_orange"}, + {"3d_armor:chestplate_diamond", "orange", "dungeon_armor:diamond_chestplate_orange"}, + {"3d_armor:leggings_diamond", "orange", "dungeon_armor:diamond_leggings_orange"}, + {"3d_armor:boots_diamond", "orange", "dungeon_armor:diamond_boots_orange"}, + + {"dungeon_armor:diamond_helmet_orange", "green", "dungeon_armor:diamond_helmet_green"}, + {"dungeon_armor:diamond_chestplate_orange", "green", "dungeon_armor:diamond_chestplate_green"}, + {"dungeon_armor:diamond_leggings_orange", "green", "dungeon_armor:diamond_leggings_green"}, + {"dungeon_armor:diamond_boots_orange", "green", "dungeon_armor:diamond_boots_green"}, + + {"dungeon_armor:diamond_helmet_green", "blue", "dungeon_armor:diamond_helmet_blue"}, + {"dungeon_armor:diamond_chestplate_green", "blue", "dungeon_armor:diamond_chestplate_blue"}, + {"dungeon_armor:diamond_leggings_green", "blue", "dungeon_armor:diamond_leggings_blue"}, + {"dungeon_armor:diamond_boots_green", "blue", "dungeon_armor:diamond_boots_blue"}, + + {"dungeon_armor:diamond_helmet_blue", "red", "dungeon_armor:diamond_helmet_red"}, + {"dungeon_armor:diamond_chestplate_blue", "red", "dungeon_armor:diamond_chestplate_red"}, + {"dungeon_armor:diamond_leggings_blue", "red", "dungeon_armor:diamond_leggings_red"}, + {"dungeon_armor:diamond_boots_blue", "red", "dungeon_armor:diamond_boots_red"}, + } + + for i in ipairs (tool_list) do + local tin = tool_list[i][1] + local col = tool_list[i][2] + local tout = tool_list[i][3] + + if tool:get_name() == tin and + orba:get_name() == "mymagic:orb_"..col and + orbb:get_name() == "mymagic:orb_"..col and + orbc:get_name() == "mymagic:orb_"..col and + orbd:get_name() == "mymagic:orb_"..col then + enchanted_tool = tout + enchant = true + end + end + end + end + + local tool_wear = tool:get_wear() + if enchant == true then + + inv:add_item("output",enchanted_tool) + local out = inv:get_stack("output", 1) + out:set_wear(tool_wear) + inv:set_stack("output",1,out) + + orba:take_item() + inv:set_stack("orb1",1,orba) + + orbb:take_item() + inv:set_stack("orb2",1,orbb) + + orbc:take_item() + inv:set_stack("orb3",1,orbc) + + orbd:take_item() + inv:set_stack("orb4",1,orbd) + + tool:take_item() + inv:set_stack("tool",1,tool) + end +end +end, +}) + +minetest.register_craft({ + output = "mymagic:enchantment_table", + recipe = {{"default:torch","mymagic:orb_red","default:torch"}, + {"default:wood","default:wood","default:wood"}, + {"default:stick","","default:stick"}} +}) + + + + + + + + + + + + + + diff --git a/mymagic/gem_blocks.lua b/mymagic/gem_blocks.lua new file mode 100644 index 0000000..93fc45c --- /dev/null +++ b/mymagic/gem_blocks.lua @@ -0,0 +1,210 @@ +local function parti(pos) + minetest.add_particlespawner(40, 1, + pos, pos, + {x=-5, y=-5, z=-5}, {x=5, y=5, z=5}, + {x=-2, y=-2, z=-2}, {x=2, y=2, z=2}, + 0.2, 2, + 0.2, 3, + false, "mymagic_magic_parti.png") +end + +minetest.register_node("mymagic:gem_block_orange",{ + description = "Orange Gem Block", + tiles = {"mymagic_gem_block_orange.png"}, + light_source = 11, + paramtype2 = "facedir", + groups = {creative_breakable = 1}, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "size[4,5.5;]".. + "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_orange.png]".. + "background[0.5,0.5;3,3;mymagic_gem_block_orange.png]".. + "listcolors[#cf7f00;#fb9c06;#000000]".. + "label[1,0;Insert Orange Crystal]".. + "list[current_name;orange_gem;1.5,1.5;1,1;]".. + "button_exit[1,3.5;2,1;orange;Activate]".. + "list[current_player;main;0,4.5;4,1;]") + local inv = meta:get_inventory() + inv:set_size("orange_gem", 1) + end, + on_receive_fields = function(pos, formname, fields, sender) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + if fields["orange"] then + if inv:is_empty("orange_gem") then + return + end + local gem = inv:get_stack("orange_gem", 1) + + if gem:get_name() == "mymagic:crystal_orange" then + local node = minetest.get_node(pos) + gem:take_item() + minetest.spawn_item({x=pos.x,y=pos.y+1,z=pos.z}, gem) + minetest.set_node(pos,{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y-2,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y-3,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y-4,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y-5,z=pos.z},{name="default:ladder",param2=node.param2}) + parti(pos) + + end + end + end, +}) + +minetest.register_node("mymagic:gem_block_green",{ + description = "Green Gem Block", + tiles = {"mymagic_gem_block_green.png"}, + light_source = 11, + paramtype2 = "facedir", + groups = {creative_breakable = 1}, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "size[4,5.5;]".. + "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_green.png]".. + "background[0.5,0.5;3,3;mymagic_gem_block_green.png]".. + "listcolors[#0d6601;#13a400;#000000]".. + "label[1,0;Insert Green Crystal]".. + "list[current_name;green_gem;1.5,1.5;1,1;]".. + "button_exit[1,3.5;2,1;green;Activate]".. + "list[current_player;main;0,4.5;4,1;]") + local inv = meta:get_inventory() + inv:set_size("green_gem", 1) + end, + on_receive_fields = function(pos, formname, fields, sender) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + if fields["green"] then + if inv:is_empty("green_gem") then + return + end + local gem = inv:get_stack("green_gem", 1) + + if gem:get_name() == "mymagic:crystal_green" then + local node = minetest.get_node(pos) + gem:take_item() + minetest.spawn_item({x=pos.x,y=pos.y+1,z=pos.z}, gem) + minetest.set_node(pos,{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y+2,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y+3,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y+4,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y+5,z=pos.z},{name="default:ladder",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y+6,z=pos.z},{name="default:ladder",param2=node.param2}) + parti(pos) + + end + end + end, +}) + + +minetest.register_node("mymagic:gem_block_blue",{ + description = "Blue Gem Block", + tiles = {"mymagic_gem_block_blue.png"}, + light_source = 11, + paramtype2 = "facedir", + groups = {creative_breakable = 1}, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "size[4,5.5;]".. + "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_blue.png]".. + "background[0.5,0.5;3,3;mymagic_gem_block_blue.png]".. + "listcolors[#030f4a;#030f7b;#000000]".. + "label[1,0;Insert Blue Crystal]".. + "list[current_name;blue_gem;1.5,1.5;1,1;]".. + "button_exit[1,3.5;2,1;blue;Activate]".. + "list[current_player;main;0,4.5;4,1;]") + local inv = meta:get_inventory() + inv:set_size("blue_gem", 1) + end, + on_receive_fields = function(pos, formname, fields, sender) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + if fields["blue"] then + if inv:is_empty("blue_gem") then + return + end + local gem = inv:get_stack("blue_gem", 1) + + if gem:get_name() == "mymagic:crystal_blue" then + local node = minetest.get_node(pos) + gem:take_item() + minetest.spawn_item({x=pos.x,y=pos.y+1,z=pos.z}, gem) + minetest.set_node(pos,{name="air",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mymagic:hole1",param2=node.param2}) + parti(pos) + + end + end + end, +}) + +minetest.register_node("mymagic:gem_block_red",{ + description = "Red Gem Block", + tiles = {"mymagic_gem_block_red.png"}, + light_source = 11, + paramtype2 = "facedir", + groups = {creative_breakable = 1}, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "size[4,5.5;]".. + "background[-0.5,-0.5;5,6.5;mymagic_gem_block_bg_red.png]".. + "background[0.5,0.5;3,3;mymagic_gem_block_red.png]".. + "listcolors[#910000;#d50000;#000000]".. + "label[1,0;Insert Red Crystal]".. + "list[current_name;red_gem;1.5,1.5;1,1;]".. + "button_exit[1,3.5;2,1;red;Activate]".. + "list[current_player;main;0,4.5;4,1;]") + local inv = meta:get_inventory() + inv:set_size("red_gem", 1) + end, + on_receive_fields = function(pos, formname, fields, sender) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + if fields["red"] then + if inv:is_empty("red_gem") then + return + end + local gem = inv:get_stack("red_gem", 1) + + if gem:get_name() == "mymagic:crystal_red" then + local node = minetest.get_node(pos) + gem:take_item() + minetest.spawn_item({x=pos.x,y=pos.y+1,z=pos.z}, gem) + minetest.set_node(pos,{name="air",param2=node.param2}) + minetest.set_node({x=pos.x,y=pos.y-1,z=pos.z},{name="mymagic:hole2",param2=node.param2}) + parti(pos) + + end + end + end, +}) + +minetest.register_abm({ + nodenames = {"mymagic:hole1","mymagic:hole2"}, + interval = 0.5, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local objs = minetest.get_objects_inside_radius(pos, 1) + for k, player in pairs(objs) do + if player:get_player_name() then + if node.name == "mymagic:hole1" then + player:setpos({x=pos.x,y=pos.y+7,z=pos.z}) + elseif node.name == "mymagic:hole2" then + player:setpos({x=pos.x,y=pos.y-3,z=pos.z}) + end + end + end + end +}) diff --git a/mymagic/init.lua b/mymagic/init.lua new file mode 100644 index 0000000..7f59399 --- /dev/null +++ b/mymagic/init.lua @@ -0,0 +1,10 @@ +dofile(minetest.get_modpath("mymagic").."/enchanter.lua") +dofile(minetest.get_modpath("mymagic").."/blocks.lua") +dofile(minetest.get_modpath("mymagic").."/craftitems.lua") +dofile(minetest.get_modpath("mymagic").."/gem_blocks.lua") +dofile(minetest.get_modpath("mymagic").."/tool_recharge.lua") +dofile(minetest.get_modpath("mymagic").."/doors.lua") +dofile(minetest.get_modpath("mymagic").."/orbs_crystals.lua") +dofile(minetest.get_modpath("mymagic").."/blocks_default.lua") + + diff --git a/mymagic/orbs_crystals.lua b/mymagic/orbs_crystals.lua new file mode 100644 index 0000000..256b26d --- /dev/null +++ b/mymagic/orbs_crystals.lua @@ -0,0 +1,56 @@ +local items = { + {"Orange Crystal","crystal_orange",10}, + {"Green Crystal","crystal_green",20}, + {"Blue Crystal","crystal_blue",30}, + {"Red Crystal","crystal_red",40}, + } +for i in ipairs(items) do +local des = items[i][1] +local itm = items[i][2] +local man = items[i][3] + +minetest.register_craftitem("mymagic:"..itm,{ + description = des, + inventory_image = "mymagic_"..itm..".png", + }) +end +local items = { + {"Orange Energy Orb","orb_orange",20}, + {"Green Energy Orb","orb_green",40}, + {"Blue Energy Orb","orb_blue",60}, + {"Red Energy Orb","orb_red",80}, + } +for i in ipairs(items) do +local des = items[i][1] +local itm = items[i][2] +local man = items[i][3] + +minetest.register_craftitem("mymagic:"..itm,{ + description = des, + inventory_image = "mymagic_"..itm..".png", + }) +end +minetest.override_item("default:stone",{ + drop = { + max_items = 2, + items = { + {items = {"default:cobble"},rarity = 1}, + {items = {"mymagic:orb_orange"},rarity = 150}, + {items = {"mymagic:orb_green"},rarity = 300}, + {items = {"mymagic:orb_blue"},rarity = 450}, + {items = {"mymagic:orb_red"},rarity = 600}, + {items = {"mymagic:crystal_orange"},rarity = 150}, + {items = {"mymagic:crystal_green"},rarity = 300}, + {items = {"mymagic:crystal_blue"},rarity = 450}, + {items = {"mymagic:crystal_red"},rarity = 600}, + }}, +}) + + + + + + + + + diff --git a/mymagic/textures/crystals_and_energy.xcf b/mymagic/textures/crystals_and_energy.xcf new file mode 100644 index 0000000..1a487fb Binary files /dev/null and b/mymagic/textures/crystals_and_energy.xcf differ diff --git a/mymagic/textures/mymagic_block_axe.png b/mymagic/textures/mymagic_block_axe.png new file mode 100644 index 0000000..7fb0d91 Binary files /dev/null and b/mymagic/textures/mymagic_block_axe.png differ diff --git a/mymagic/textures/mymagic_block_axe_blue.png b/mymagic/textures/mymagic_block_axe_blue.png new file mode 100644 index 0000000..07cd996 Binary files /dev/null and b/mymagic/textures/mymagic_block_axe_blue.png differ diff --git a/mymagic/textures/mymagic_block_axe_green.png b/mymagic/textures/mymagic_block_axe_green.png new file mode 100644 index 0000000..c677477 Binary files /dev/null and b/mymagic/textures/mymagic_block_axe_green.png differ diff --git a/mymagic/textures/mymagic_block_axe_orange.png b/mymagic/textures/mymagic_block_axe_orange.png new file mode 100644 index 0000000..e0366dc Binary files /dev/null and b/mymagic/textures/mymagic_block_axe_orange.png differ diff --git a/mymagic/textures/mymagic_block_axe_red.png b/mymagic/textures/mymagic_block_axe_red.png new file mode 100644 index 0000000..9940ab7 Binary files /dev/null and b/mymagic/textures/mymagic_block_axe_red.png differ diff --git a/mymagic/textures/mymagic_block_blue.png b/mymagic/textures/mymagic_block_blue.png new file mode 100644 index 0000000..68e7b46 Binary files /dev/null and b/mymagic/textures/mymagic_block_blue.png differ diff --git a/mymagic/textures/mymagic_block_green.png b/mymagic/textures/mymagic_block_green.png new file mode 100644 index 0000000..d91fb2a Binary files /dev/null and b/mymagic/textures/mymagic_block_green.png differ diff --git a/mymagic/textures/mymagic_block_orange.png b/mymagic/textures/mymagic_block_orange.png new file mode 100644 index 0000000..0576a7f Binary files /dev/null and b/mymagic/textures/mymagic_block_orange.png differ diff --git a/mymagic/textures/mymagic_block_pick.png b/mymagic/textures/mymagic_block_pick.png new file mode 100644 index 0000000..11db6f7 Binary files /dev/null and b/mymagic/textures/mymagic_block_pick.png differ diff --git a/mymagic/textures/mymagic_block_red.png b/mymagic/textures/mymagic_block_red.png new file mode 100644 index 0000000..2966446 Binary files /dev/null and b/mymagic/textures/mymagic_block_red.png differ diff --git a/mymagic/textures/mymagic_block_sword.png b/mymagic/textures/mymagic_block_sword.png new file mode 100644 index 0000000..57fb152 Binary files /dev/null and b/mymagic/textures/mymagic_block_sword.png differ diff --git a/mymagic/textures/mymagic_block_sword_blue.png b/mymagic/textures/mymagic_block_sword_blue.png new file mode 100644 index 0000000..cd295ff Binary files /dev/null and b/mymagic/textures/mymagic_block_sword_blue.png differ diff --git a/mymagic/textures/mymagic_block_sword_green.png b/mymagic/textures/mymagic_block_sword_green.png new file mode 100644 index 0000000..990d637 Binary files /dev/null and b/mymagic/textures/mymagic_block_sword_green.png differ diff --git a/mymagic/textures/mymagic_block_sword_orange.png b/mymagic/textures/mymagic_block_sword_orange.png new file mode 100644 index 0000000..d18d26a Binary files /dev/null and b/mymagic/textures/mymagic_block_sword_orange.png differ diff --git a/mymagic/textures/mymagic_block_sword_red.png b/mymagic/textures/mymagic_block_sword_red.png new file mode 100644 index 0000000..f8382b2 Binary files /dev/null and b/mymagic/textures/mymagic_block_sword_red.png differ diff --git a/mymagic/textures/mymagic_blood_drop.png b/mymagic/textures/mymagic_blood_drop.png new file mode 100644 index 0000000..933755e Binary files /dev/null and b/mymagic/textures/mymagic_blood_drop.png differ diff --git a/mymagic/textures/mymagic_crystal_blue.png b/mymagic/textures/mymagic_crystal_blue.png new file mode 100644 index 0000000..4cdf6b9 Binary files /dev/null and b/mymagic/textures/mymagic_crystal_blue.png differ diff --git a/mymagic/textures/mymagic_crystal_green.png b/mymagic/textures/mymagic_crystal_green.png new file mode 100644 index 0000000..632b030 Binary files /dev/null and b/mymagic/textures/mymagic_crystal_green.png differ diff --git a/mymagic/textures/mymagic_crystal_orange.png b/mymagic/textures/mymagic_crystal_orange.png new file mode 100644 index 0000000..2a35e7e Binary files /dev/null and b/mymagic/textures/mymagic_crystal_orange.png differ diff --git a/mymagic/textures/mymagic_crystal_red.png b/mymagic/textures/mymagic_crystal_red.png new file mode 100644 index 0000000..5935b7f Binary files /dev/null and b/mymagic/textures/mymagic_crystal_red.png differ diff --git a/mymagic/textures/mymagic_dark_cobble.png b/mymagic/textures/mymagic_dark_cobble.png new file mode 100644 index 0000000..10002af Binary files /dev/null and b/mymagic/textures/mymagic_dark_cobble.png differ diff --git a/mymagic/textures/mymagic_dark_desert_cobble.png b/mymagic/textures/mymagic_dark_desert_cobble.png new file mode 100644 index 0000000..5225126 Binary files /dev/null and b/mymagic/textures/mymagic_dark_desert_cobble.png differ diff --git a/mymagic/textures/mymagic_dark_desert_stone_brick.png b/mymagic/textures/mymagic_dark_desert_stone_brick.png new file mode 100644 index 0000000..a0f1771 Binary files /dev/null and b/mymagic/textures/mymagic_dark_desert_stone_brick.png differ diff --git a/mymagic/textures/mymagic_dark_stone_brick.png b/mymagic/textures/mymagic_dark_stone_brick.png new file mode 100644 index 0000000..ecac87d Binary files /dev/null and b/mymagic/textures/mymagic_dark_stone_brick.png differ diff --git a/mymagic/textures/mymagic_enchantment_table_bg.png b/mymagic/textures/mymagic_enchantment_table_bg.png new file mode 100644 index 0000000..6330da1 Binary files /dev/null and b/mymagic/textures/mymagic_enchantment_table_bg.png differ diff --git a/mymagic/textures/mymagic_enchantment_table_bottom.png b/mymagic/textures/mymagic_enchantment_table_bottom.png new file mode 100644 index 0000000..ddf08fe Binary files /dev/null and b/mymagic/textures/mymagic_enchantment_table_bottom.png differ diff --git a/mymagic/textures/mymagic_enchantment_table_side.png b/mymagic/textures/mymagic_enchantment_table_side.png new file mode 100644 index 0000000..a892b22 Binary files /dev/null and b/mymagic/textures/mymagic_enchantment_table_side.png differ diff --git a/mymagic/textures/mymagic_enchantment_table_side_ani.png b/mymagic/textures/mymagic_enchantment_table_side_ani.png new file mode 100644 index 0000000..5326738 Binary files /dev/null and b/mymagic/textures/mymagic_enchantment_table_side_ani.png differ diff --git a/mymagic/textures/mymagic_enchantment_table_top.png b/mymagic/textures/mymagic_enchantment_table_top.png new file mode 100644 index 0000000..4673425 Binary files /dev/null and b/mymagic/textures/mymagic_enchantment_table_top.png differ diff --git a/mymagic/textures/mymagic_enchantment_table_top_ani.png b/mymagic/textures/mymagic_enchantment_table_top_ani.png new file mode 100644 index 0000000..cb3275c Binary files /dev/null and b/mymagic/textures/mymagic_enchantment_table_top_ani.png differ diff --git a/mymagic/textures/mymagic_floor.png b/mymagic/textures/mymagic_floor.png new file mode 100644 index 0000000..de2accb Binary files /dev/null and b/mymagic/textures/mymagic_floor.png differ diff --git a/mymagic/textures/mymagic_gem_block_bg.png b/mymagic/textures/mymagic_gem_block_bg.png new file mode 100644 index 0000000..d4f6d55 Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_bg.png differ diff --git a/mymagic/textures/mymagic_gem_block_bg_blue.png b/mymagic/textures/mymagic_gem_block_bg_blue.png new file mode 100644 index 0000000..a073720 Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_bg_blue.png differ diff --git a/mymagic/textures/mymagic_gem_block_bg_green.png b/mymagic/textures/mymagic_gem_block_bg_green.png new file mode 100644 index 0000000..e601a06 Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_bg_green.png differ diff --git a/mymagic/textures/mymagic_gem_block_bg_orange.png b/mymagic/textures/mymagic_gem_block_bg_orange.png new file mode 100644 index 0000000..5999aae Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_bg_orange.png differ diff --git a/mymagic/textures/mymagic_gem_block_bg_red.png b/mymagic/textures/mymagic_gem_block_bg_red.png new file mode 100644 index 0000000..97edc34 Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_bg_red.png differ diff --git a/mymagic/textures/mymagic_gem_block_blue.png b/mymagic/textures/mymagic_gem_block_blue.png new file mode 100644 index 0000000..a41dcb4 Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_blue.png differ diff --git a/mymagic/textures/mymagic_gem_block_green.png b/mymagic/textures/mymagic_gem_block_green.png new file mode 100644 index 0000000..53f885e Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_green.png differ diff --git a/mymagic/textures/mymagic_gem_block_orange.png b/mymagic/textures/mymagic_gem_block_orange.png new file mode 100644 index 0000000..bc4321c Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_orange.png differ diff --git a/mymagic/textures/mymagic_gem_block_red.png b/mymagic/textures/mymagic_gem_block_red.png new file mode 100644 index 0000000..767be36 Binary files /dev/null and b/mymagic/textures/mymagic_gem_block_red.png differ diff --git a/mymagic/textures/mymagic_gold_coin.png b/mymagic/textures/mymagic_gold_coin.png new file mode 100644 index 0000000..7568812 Binary files /dev/null and b/mymagic/textures/mymagic_gold_coin.png differ diff --git a/mymagic/textures/mymagic_hole_in_floor.png b/mymagic/textures/mymagic_hole_in_floor.png new file mode 100644 index 0000000..8fc159a Binary files /dev/null and b/mymagic/textures/mymagic_hole_in_floor.png differ diff --git a/mymagic/textures/mymagic_magic_parti.png b/mymagic/textures/mymagic_magic_parti.png new file mode 100644 index 0000000..a83a764 Binary files /dev/null and b/mymagic/textures/mymagic_magic_parti.png differ diff --git a/mymagic/textures/mymagic_orb_blue.png b/mymagic/textures/mymagic_orb_blue.png new file mode 100644 index 0000000..31f2f57 Binary files /dev/null and b/mymagic/textures/mymagic_orb_blue.png differ diff --git a/mymagic/textures/mymagic_orb_green.png b/mymagic/textures/mymagic_orb_green.png new file mode 100644 index 0000000..6574938 Binary files /dev/null and b/mymagic/textures/mymagic_orb_green.png differ diff --git a/mymagic/textures/mymagic_orb_orange.png b/mymagic/textures/mymagic_orb_orange.png new file mode 100644 index 0000000..9faf907 Binary files /dev/null and b/mymagic/textures/mymagic_orb_orange.png differ diff --git a/mymagic/textures/mymagic_orb_red.png b/mymagic/textures/mymagic_orb_red.png new file mode 100644 index 0000000..2757f42 Binary files /dev/null and b/mymagic/textures/mymagic_orb_red.png differ diff --git a/mymagic/textures/mymagic_rooms_wall.png b/mymagic/textures/mymagic_rooms_wall.png new file mode 100644 index 0000000..f905053 Binary files /dev/null and b/mymagic/textures/mymagic_rooms_wall.png differ diff --git a/mymagic/textures/mymagic_teleport_ani_blue.png b/mymagic/textures/mymagic_teleport_ani_blue.png new file mode 100644 index 0000000..88968d0 Binary files /dev/null and b/mymagic/textures/mymagic_teleport_ani_blue.png differ diff --git a/mymagic/textures/mymagic_teleport_ani_green.png b/mymagic/textures/mymagic_teleport_ani_green.png new file mode 100644 index 0000000..4b1e61f Binary files /dev/null and b/mymagic/textures/mymagic_teleport_ani_green.png differ diff --git a/mymagic/textures/mymagic_teleport_ani_orange.png b/mymagic/textures/mymagic_teleport_ani_orange.png new file mode 100644 index 0000000..22b9fbd Binary files /dev/null and b/mymagic/textures/mymagic_teleport_ani_orange.png differ diff --git a/mymagic/textures/mymagic_teleport_ani_red.png b/mymagic/textures/mymagic_teleport_ani_red.png new file mode 100644 index 0000000..63f233c Binary files /dev/null and b/mymagic/textures/mymagic_teleport_ani_red.png differ diff --git a/mymagic/textures/mymagic_teleport_particle_arrival.png b/mymagic/textures/mymagic_teleport_particle_arrival.png new file mode 100644 index 0000000..d93a9f8 Binary files /dev/null and b/mymagic/textures/mymagic_teleport_particle_arrival.png differ diff --git a/mymagic/textures/mymagic_teleport_particle_departure.png b/mymagic/textures/mymagic_teleport_particle_departure.png new file mode 100644 index 0000000..f9a9d7c Binary files /dev/null and b/mymagic/textures/mymagic_teleport_particle_departure.png differ diff --git a/mymagic/textures/mymagic_tool_recharge.png b/mymagic/textures/mymagic_tool_recharge.png new file mode 100644 index 0000000..46aea73 Binary files /dev/null and b/mymagic/textures/mymagic_tool_recharge.png differ diff --git a/mymagic/textures/mymagic_tool_recharge_top.png b/mymagic/textures/mymagic_tool_recharge_top.png new file mode 100644 index 0000000..f552e68 Binary files /dev/null and b/mymagic/textures/mymagic_tool_recharge_top.png differ diff --git a/mymagic/tool_recharge.lua b/mymagic/tool_recharge.lua new file mode 100644 index 0000000..b821712 --- /dev/null +++ b/mymagic/tool_recharge.lua @@ -0,0 +1,157 @@ +local charged_tool = {} +local recharge = false +local repair_time = 0 + + + +minetest.register_node("mymagic:tool_recharge",{ + description = "Tool Recharging Station", + tiles = { + "mymagic_tool_recharge_top.png", + "mymagic_tool_recharge_top.png", + "mymagic_tool_recharge.png", + "mymagic_tool_recharge.png", + "mymagic_tool_recharge.png", + "mymagic_tool_recharge.png", + }, + drawtype = "normal", + paramtype = "light", + paramtype2 = "facedir", + light_source = 7, + groups = {cracky=1}, + +after_place_node = function(pos, placer) + local meta = minetest.env:get_meta(pos); + meta:set_string("infotext", "Tool Recharging Station"); +end, +can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("tool") then + return false + elseif not inv:is_empty("orb") then + return false + elseif not inv:is_empty("output") then + return false + end + return true +end, +on_construct = function(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", "size[4,3;]".. + "background[-0.5,-0.5;5,4;mymagic_gem_block_bg.png]".. + "listcolors[#5e4300;#936800;#000000]".. + + "label[0,0;Tool]".. + "label[1,0;Orb]".. + "list[current_name;tool;0,0.5;1,1;]".. + "list[current_name;orb;1,0.5;1,1;]".. + "button[2,0.5;1,1;button;Charge]".. + "list[current_name;output;3,0.5;1,1;]".. + + --Show Inventory + "list[current_player;main;0,2;4,1;]") + meta:set_string("infotext", "Tool Recharging Station") + local inv = meta:get_inventory() + inv:set_size("tool", 1) + inv:set_size("orb", 1) + inv:set_size("output", 1) +end, + +on_receive_fields = function(pos, formname, fields, sender) +local meta = minetest.get_meta(pos) +local inv = meta:get_inventory() + +if fields["button"] then + recharge = false + + if inv:is_empty("tool") or + inv:is_empty("orb") then + return + end + if inv:is_empty("output") == false then + return + end + + local tools = inv:get_stack("tool", 1) + local orbs = inv:get_stack("orb", 1) + local t = {"axe","pick","shovel","sword","knife"} + for i, tl in pairs(t) do + local tool_list = { + + {"mymagic_tools:"..tl.."_enchanted_wood_orange", "orange"}, + {"mymagic_tools:"..tl.."_enchanted_stone_orange", "orange"}, + {"mymagic_tools:"..tl.."_enchanted_steel_orange", "orange"}, + {"mymagic_tools:"..tl.."_enchanted_bronze_orange","orange"}, + {"mymagic_tools:"..tl.."_enchanted_mese_orange", "orange"}, + {"mymagic_tools:"..tl.."_enchanted_diamond_orange","orange"}, + + {"mymagic_tools:"..tl.."_enchanted_wood_green", "green"}, + {"mymagic_tools:"..tl.."_enchanted_stone_green", "green"}, + {"mymagic_tools:"..tl.."_enchanted_steel_green", "green"}, + {"mymagic_tools:"..tl.."_enchanted_bronze_green", "green"}, + {"mymagic_tools:"..tl.."_enchanted_mese_green", "green"}, + {"mymagic_tools:"..tl.."_enchanted_diamond_green","green"}, + + {"mymagic_tools:"..tl.."_enchanted_wood_blue", "blue"}, + {"mymagic_tools:"..tl.."_enchanted_stone_blue", "blue"}, + {"mymagic_tools:"..tl.."_enchanted_steel_blue", "blue"}, + {"mymagic_tools:"..tl.."_enchanted_bronze_blue", "blue"}, + {"mymagic_tools:"..tl.."_enchanted_mese_blue", "blue"}, + {"mymagic_tools:"..tl.."_enchanted_diamond_blue", "blue"}, + + {"mymagic_tools:"..tl.."_enchanted_wood_red", "red"}, + {"mymagic_tools:"..tl.."_enchanted_stone_red", "red"}, + {"mymagic_tools:"..tl.."_enchanted_steel_red", "red"}, + {"mymagic_tools:"..tl.."_enchanted_bronze_red", "red"}, + {"mymagic_tools:"..tl.."_enchanted_mese_red", "red"}, + {"mymagic_tools:"..tl.."_enchanted_diamond_red", "red"}, + + {"mymagic_tools:diamond_helmet_orange", "orange"}, + {"mymagic_tools:diamond_chestplate_orange", "orange"}, + {"mymagic_tools:diamond_leggings_orange", "orange"}, + {"mymagic_tools:diamond_boots_orange", "orange"}, + + {"mymagic_tools:diamond_helmet_green", "green"}, + {"mymagic_tools:diamond_chestplate_green", "green"}, + {"mymagic_tools:diamond_leggings_green", "green"}, + {"mymagic_tools:diamond_boots_green", "green"}, + + {"mymagic_tools:diamond_helmet_blue", "red"}, + {"mymagic_tools:diamond_chestplate_blue", "red"}, + {"mymagic_tools:diamond_leggings_blue", "red"}, + {"mymagic_tools:diamond_boots_blue", "red"}, + } + for i in ipairs (tool_list) do + local tin = tool_list[i][1] + local col = tool_list[i][2] + + if tools:get_name() == tin and + orbs:get_name() == "mymagic:orb_"..col then + charged_tool = tin + recharge = true + if col == "orange" then + repair_time = 5 + elseif col == "green" then + repair_time = 10 + elseif col == "blue" then + repair_time = 15 + elseif col == "red" then + repair_time = 20 + end + end + end + end + if recharge == true then + minetest.after(repair_time,function() + tools:add_wear(-10000) + inv:set_stack("output", 1, tools) + orbs:take_item() + inv:set_stack("orb",1,orbs) + tools:take_item() + inv:set_stack("tool",1,tools) + end) + end +end +end, +}) diff --git a/mymagic_tools/craftitems.lua b/mymagic_tools/craftitems.lua new file mode 100644 index 0000000..517666a --- /dev/null +++ b/mymagic_tools/craftitems.lua @@ -0,0 +1,45 @@ + +local parts = { + {"Wood Axe Head","axe_blade_wood"}, + {"Stone Axe Head","axe_blade_stone"}, + {"Steel Axe Head","axe_blade_steel"}, + {"Bronze Axe Head","axe_blade_bronze"}, + {"Mese Axe Head","axe_blade_mese"}, + {"Diamond Axe Head","axe_blade_diamond"}, + {"Axe Handle","axe_handle"}, + } +for i in ipairs (parts) do + local des = parts[i][1] + local mat = parts[i][2] + +minetest.register_craftitem("mymagic_tools:"..mat,{ + description = des, + inventory_image = "mymagic_"..mat..".png", + groups = {not_in_creative_inventory = 1} +}) +end +local items = { + {"Wood Blade","blade_wood","sword_wood"}, + {"Stone Blade","blade_stone","sword_stone"}, + {"Steel Blade","blade_steel","sword_steel"}, + {"Bronze Blade","blade_bronze","sword_bronze"}, + {"Mese Blade","blade_mese","sword_mese"}, + {"Diamond Blade","blade_diamond","sword_diamond"}, + } +for i in ipairs(items) do +local des = items[i][1] +local itm = items[i][2] +local cra = items[i][3] + +minetest.register_craftitem("mymagic_tools:"..itm,{ + description = des, + inventory_image = "mymagic_sword_"..itm..".png", + groups = {not_in_creative_inventory = 1} + }) + +end +minetest.register_craftitem("mymagic_tools:handle_wood",{ + description = "Wood Sword Handle", + inventory_image = "mymagic_sword_handle_wood.png", + groups = {not_in_creative_inventory = 1} + }) diff --git a/mymagic_tools/default_axe.lua b/mymagic_tools/default_axe.lua new file mode 100644 index 0000000..5fe7091 --- /dev/null +++ b/mymagic_tools/default_axe.lua @@ -0,0 +1,78 @@ +minetest.register_tool(":default:axe_wood",{ + description = "Wood Axe", + inventory_image = "mymagic_axe_wood.png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + choppy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + } +}) +minetest.register_tool(":default:axe_stone",{ + description = "Stone Axe", + inventory_image = "mymagic_axe_stone.png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + choppy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=4}, + } +}) +minetest.register_tool(":default:axe_steel",{ + description = "Steel Axe", + inventory_image = "mymagic_axe_steel.png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.5, [2]=1.2, [3]=0.35}, uses=30, maxlevel=1}, + }, + damage_groups = {fleshy=6}, + } +}) +minetest.register_tool(":default:axe_bronze",{ + description = "Bronze Axe", + inventory_image = "mymagic_axe_bronze.png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.5, [2]=1.2, [3]=0.35}, uses=40, maxlevel=1}, + }, + damage_groups = {fleshy=6}, + } +}) +minetest.register_tool(":default:axe_mese",{ + description = "Mese Axe", + inventory_image = "mymagic_axe_mese.png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2, [2]=1, [3]=0.35}, uses=30, maxlevel=1}, + }, + damage_groups = {fleshy=7}, + } +}) +minetest.register_tool(":default:axe_diamond",{ + description = "Diamond Axe", + inventory_image = "mymagic_axe_diamond.png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=1.9, [2]=0.9, [3]=0.30}, uses=40, maxlevel=1}, + }, + damage_groups = {fleshy=8}, + } +}) diff --git a/mymagic_tools/default_knife.lua b/mymagic_tools/default_knife.lua new file mode 100644 index 0000000..5d4c2ab --- /dev/null +++ b/mymagic_tools/default_knife.lua @@ -0,0 +1,131 @@ +minetest.register_tool("mymagic_tools:knife_wood",{ + description = "Wood Knife", + inventory_image = "mymagic_knife_wood.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + } +}) +minetest.register_tool("mymagic_tools:knife_stone",{ + description = "Stone Knife", + inventory_image = "mymagic_knife_stone.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + } +}) +minetest.register_tool("mymagic_tools:knife_steel",{ + description = "Steel Knife", + inventory_image = "mymagic_knife_steel.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.5, [2]=1.2, [3]=0.35}, uses=30, maxlevel=1}, + }, + damage_groups = {fleshy=3}, + } +}) +minetest.register_tool("mymagic_tools:knife_bronze",{ + description = "Bronze Knife", + inventory_image = "mymagic_knife_bronze.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.5, [2]=1.2, [3]=0.35}, uses=40, maxlevel=1}, + }, + damage_groups = {fleshy=3}, + } +}) +minetest.register_tool("mymagic_tools:knife_mese",{ + description = "Mese Knife", + inventory_image = "mymagic_knife_mese.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2, [2]=1, [3]=0.35}, uses=30, maxlevel=1}, + }, + damage_groups = {fleshy=4}, + } +}) +minetest.register_tool("mymagic_tools:knife_diamond",{ + description = "Diamond Knife", + inventory_image = "mymagic_knife_diamond.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=1.9, [2]=0.9, [3]=0.30}, uses=40, maxlevel=1}, + }, + damage_groups = {fleshy=4}, + } +}) +minetest.register_craft({ + output = 'mymagic_tools:knife_wood', + recipe = { + {'group:wood'}, + {'group:wood'}, + {'group:stick'}, + } +}) + +minetest.register_craft({ + output = 'mymagic_tools:knife_stone', + recipe = { + {'group:stone'}, + {'group:stone'}, + {'group:stick'}, + } +}) + +minetest.register_craft({ + output = 'mymagic_tools:knife_steel', + recipe = { + {'default:steel_ingot'}, + {'default:steel_ingot'}, + {'group:stick'}, + } +}) + +minetest.register_craft({ + output = 'mymagic_tools:knife_bronze', + recipe = { + {'mymagic_tools:knife_ingot'}, + {'default:bronze_ingot'}, + {'group:stick'}, + } +}) + +minetest.register_craft({ + output = 'mymagic_tools:knife_mese', + recipe = { + {'default:mese_crystal'}, + {'default:mese_crystal'}, + {'group:stick'}, + } +}) + +minetest.register_craft({ + output = 'mymagic_tools:knife_diamond', + recipe = { + {'default:diamond'}, + {'default:diamond'}, + {'group:stick'}, + } +}) diff --git a/mymagic_tools/default_pick.lua b/mymagic_tools/default_pick.lua new file mode 100644 index 0000000..9336681 --- /dev/null +++ b/mymagic_tools/default_pick.lua @@ -0,0 +1,72 @@ +minetest.register_tool(":default:pick_wood", { + description = "Wooden Pickaxe", + inventory_image = "mymagic_pick_wood.png", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + cracky = {times={[3]=1.60}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, +}) +minetest.register_tool(":default:pick_stone", { + description = "Stone Pickaxe", + inventory_image = "mymagic_pick_stone.png", + tool_capabilities = { + full_punch_interval = 1.3, + max_drop_level=0, + groupcaps={ + cracky = {times={[2]=2.0, [3]=1.00}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=3}, + }, +}) +minetest.register_tool(":default:pick_steel", { + description = "Steel Pickaxe", + inventory_image = "mymagic_pick_steel.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, +}) +minetest.register_tool(":default:pick_bronze", { + description = "Bronze Pickaxe", + inventory_image = "mymagic_pick_bronze.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, +}) +minetest.register_tool(":default:pick_mese", { + description = "Mese Pickaxe", + inventory_image = "mymagic_pick_mese.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=3, + groupcaps={ + cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=5}, + }, +}) +minetest.register_tool(":default:pick_diamond", { + description = "Diamond Pickaxe", + inventory_image = "mymagic_pick_diamond.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}, + }, +}) diff --git a/mymagic_tools/default_shovel.lua b/mymagic_tools/default_shovel.lua new file mode 100644 index 0000000..edb83ad --- /dev/null +++ b/mymagic_tools/default_shovel.lua @@ -0,0 +1,78 @@ +minetest.register_tool(":default:shovel_wood", { + description = "Wooden Shovel", + inventory_image = "mymagic_shovel_wood.png", + wield_image = "mymagic_shovel_wood.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, +}) +minetest.register_tool(":default:shovel_stone", { + description = "Stone Shovel", + inventory_image = "mymagic_shovel_stone.png", + wield_image = "mymagic_shovel_stone.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.4, + max_drop_level=0, + groupcaps={ + crumbly = {times={[1]=1.80, [2]=1.20, [3]=0.50}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, +}) +minetest.register_tool(":default:shovel_steel", { + description = "Steel Shovel", + inventory_image = "mymagic_shovel_steel.png", + wield_image = "mymagic_shovel_steel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=3}, + }, +}) +minetest.register_tool(":default:shovel_bronze", { + description = "Bronze Shovel", + inventory_image = "mymagic_shovel_bronze.png", + wield_image = "mymagic_shovel_bronze.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=40, maxlevel=2}, + }, + damage_groups = {fleshy=3}, + }, +}) +minetest.register_tool(":default:shovel_mese", { + description = "Mese Shovel", + inventory_image = "mymagic_shovel_mese.png", + wield_image = "mymagic_shovel_mese.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=3, + groupcaps={ + crumbly = {times={[1]=1.20, [2]=0.60, [3]=0.30}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, +}) +minetest.register_tool(":default:shovel_diamond", { + description = "Diamond Shovel", + inventory_image = "mymagic_shovel_diamond.png", + wield_image = "mymagic_shovel_diamond.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}, + }, +}) diff --git a/mymagic_tools/default_sword.lua b/mymagic_tools/default_sword.lua new file mode 100644 index 0000000..7c4fa73 --- /dev/null +++ b/mymagic_tools/default_sword.lua @@ -0,0 +1,78 @@ +minetest.register_tool(":default:sword_wood",{ + description = "Wood Sword", + inventory_image = "mymagic_sword_blade_wood.png^mymagic_sword_handle_wood.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + } +}) +minetest.register_tool(":default:sword_stone",{ + description = "Stone Sword", + inventory_image = "mymagic_sword_blade_stone.png^mymagic_sword_handle_wood.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=4}, + } +}) +minetest.register_tool(":default:sword_steel",{ + description = "Steel Sword", + inventory_image = "mymagic_sword_blade_steel.png^mymagic_sword_handle_wood.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.5, [2]=1.2, [3]=0.35}, uses=30, maxlevel=1}, + }, + damage_groups = {fleshy=6}, + } +}) +minetest.register_tool(":default:sword_bronze",{ + description = "Bronze Sword", + inventory_image = "mymagic_sword_blade_bronze.png^mymagic_sword_handle_wood.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.5, [2]=1.2, [3]=0.35}, uses=40, maxlevel=1}, + }, + damage_groups = {fleshy=6}, + } +}) +minetest.register_tool(":default:sword_mese",{ + description = "Mese Sword", + inventory_image = "mymagic_sword_blade_mese.png^mymagic_sword_handle_wood.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2, [2]=1, [3]=0.35}, uses=30, maxlevel=1}, + }, + damage_groups = {fleshy=7}, + } +}) +minetest.register_tool(":default:sword_diamond",{ + description = "Diamond Sword", + inventory_image = "mymagic_sword_blade_diamond.png^mymagic_sword_handle_wood.png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=1.9, [2]=0.9, [3]=0.30}, uses=40, maxlevel=1}, + }, + damage_groups = {fleshy=8}, + } +}) diff --git a/mymagic_tools/depends.txt b/mymagic_tools/depends.txt new file mode 100644 index 0000000..4f5fdc8 --- /dev/null +++ b/mymagic_tools/depends.txt @@ -0,0 +1,3 @@ +default +mymagic +3darmor? diff --git a/mymagic_tools/enchanted_armor.lua b/mymagic_tools/enchanted_armor.lua new file mode 100644 index 0000000..582b317 --- /dev/null +++ b/mymagic_tools/enchanted_armor.lua @@ -0,0 +1,41 @@ +local colors = { + {"diamond","Diamond","Orange","orange",16,14,55,0}, + {"diamond","Diamond","Green","green",17,15,60,0}, + {"diamond","Diamond","Blue","blue",18,16,65,0}, + {"diamond","Diamond","Red","red",19,17,70,1}, + } +for i in ipairs (colors) do + local mat = colors[i][1] + local mdes = colors[i][2] + local des = colors[i][3] + local col = colors[i][4] + local ar1 = colors[i][5] + local ar2 = colors[i][6] + local ar3 = colors[i][7] + local ar4 = colors[i][8] + +minetest.register_tool("mymagic_tools:"..mat.."_helmet_"..col, { + description = mdes.." Helmet Enchanted "..des, + inventory_image = "mymagic_armor_inv_helmet_"..mat.."_"..col..".png", + groups = {armor_head=ar1, armor_heal=ar2, armor_use=ar3, armor_fire=ar4}, + wear = 0, +}) +minetest.register_tool("mymagic_tools:"..mat.."_chestplate_"..col, { + description = mdes.." Chestplate Enchanted "..des, + inventory_image = "mymagic_armor_inv_chestplate_"..mat.."_"..col..".png", + groups = {armor_torso=20, armor_heal=12, armor_use=50, armor_fire=ar4}, + wear = 0, +}) +minetest.register_tool("mymagic_tools:"..mat.."_leggings_"..col, { + description = mdes.." Leggings Enchanted "..des, + inventory_image = "mymagic_armor_inv_leggings_"..mat.."_"..col..".png", + groups = {armor_legs=20, armor_heal=12, armor_use=50, armor_fire=ar4}, + wear = 0, + }) +minetest.register_tool("mymagic_tools:"..mat.."_boots_"..col, { + description = mdes.." Boots Enchanted "..des, + inventory_image = "mymagic_armor_inv_boots_"..mat.."_"..col..".png", + groups = {armor_feet=15, armor_heal=12, armor_use=50, physics_speed=0.8, physics_jump=0.5, armor_fire=ar4}, + wear = 0, +}) +end diff --git a/mymagic_tools/enchanted_axes.lua b/mymagic_tools/enchanted_axes.lua new file mode 100644 index 0000000..dcd8332 --- /dev/null +++ b/mymagic_tools/enchanted_axes.lua @@ -0,0 +1,83 @@ +local axe = { + {"wood", "Wood", "orange", "Orange", {fleshy=3}, {[1]=2.3, [2]=1.7, [3]=1.5, [4]=1.5}, 15, 4, 0.9}, + {"wood", "Wood", "green", "Green", {fleshy=4}, {[1]=2.2, [2]=1.6, [3]=1.2, [4]=1.2}, 20, 3, 0.9}, + {"wood", "Wood", "blue", "Blue", {fleshy=5}, {[1]=2.1, [2]=1.5, [3]=0.9, [4]=0.9}, 25, 2, 0.9}, + {"wood", "Wood", "red", "Red", {fleshy=6}, {[1]=2.0, [2]=1.4, [3]=0.6, [4]=0.6}, 30, 1, 0.9}, + + {"stone", "Stone", "orange", "Orange", {fleshy=5}, {[1]=2.0, [2]=1.5, [3]=1.3, [4]=1.3}, 25, 4, 0.8}, + {"stone", "Stone", "green", "Green", {fleshy=6}, {[1]=1.9, [2]=1.4, [3]=1.1, [4]=1.1}, 30, 3, 0.8}, + {"stone", "Stone", "blue", "Blue", {fleshy=7}, {[1]=1.8, [2]=1.3, [3]=0.8, [4]=0.8}, 35, 2, 0.8}, + {"stone", "Stone", "red", "Red", {fleshy=8}, {[1]=1.7, [2]=1.2, [3]=0.6, [4]=0.6}, 40, 1, 0.8}, + + {"steel", "Steel", "orange", "Orange", {fleshy=7}, {[1]=1.7, [2]=1.3, [3]=1.1, [4]=1.1}, 35, 4, 0.7}, + {"steel", "Steel", "green", "Green", {fleshy=8}, {[1]=1.6, [2]=1.2, [3]=0.8, [4]=0.8}, 40, 3, 0.7}, + {"steel", "Steel", "blue", "Blue", {fleshy=9}, {[1]=1.5, [2]=1.1, [3]=0.6, [4]=0.6}, 45, 2, 0.7}, + {"steel", "Steel", "red", "Red", {fleshy=10},{[1]=1.4, [2]=1.0, [3]=0.4, [4]=0.4}, 50, 1, 0.7}, + + {"bronze", "Bronze", "orange", "Orange", {fleshy=9}, {[1]=1.4, [2]=1.1, [3]=0.9, [4]=0.9}, 45, 4, 0.6}, + {"bronze", "Bronze", "green", "Green", {fleshy=10},{[1]=1.3, [2]=1.0, [3]=0.8, [4]=0.8}, 50, 3, 0.6}, + {"bronze", "Bronze", "blue", "Blue", {fleshy=11},{[1]=1.2, [2]=0.9, [3]=0.6, [4]=0.6}, 55, 2, 0.6}, + {"bronze", "Bronze", "red", "Red", {fleshy=12},{[1]=1.1, [2]=0.8, [3]=0.4, [4]=0.4}, 60, 1, 0.6}, + + {"mese", "Mese", "orange", "Orange", {fleshy=11},{[1]=1.4, [2]=0.9, [3]=0.7, [4]=0.7}, 35, 4, 0.5}, + {"mese", "Mese", "green", "Green", {fleshy=12},{[1]=1.2, [2]=0.8, [3]=0.6, [4]=0.6}, 40, 3, 0.5}, + {"mese", "Mese", "blue", "Blue", {fleshy=13},{[1]=1.0, [2]=0.7, [3]=0.4, [4]=0.4}, 45, 2, 0.5}, + {"mese", "Mese", "red", "Red", {fleshy=14},{[1]=0.8, [2]=0.6, [3]=0.2, [4]=0.2}, 50, 1, 0.5}, + + {"diamond", "Diamond", "orange", "Orange", {fleshy=13},{[1]=0.8, [2]=0.7, [3]=0.5, [4]=0.5}, 50, 4, 0.4}, + {"diamond", "Diamond", "green", "Green", {fleshy=14},{[1]=0.6, [2]=0.6, [3]=0.4, [4]=0.4}, 60, 3, 0.4}, + {"diamond", "Diamond", "blue", "Blue", {fleshy=15},{[1]=0.4, [2]=0.4, [3]=0.3, [4]=0.3}, 70, 2, 0.3}, + {"diamond", "Diamond", "red", "Red", {fleshy=16},{[1]=0.2, [2]=0.2, [3]=0.2, [4]=0.2}, 80, 1, 0.3}, + } +for i in ipairs (axe) do + local mat = axe[i][1] + local mdes = axe[i][2] + local col = axe[i][3] + local cdes = axe[i][4] + local fles = axe[i][5] + local gro = axe[i][6] + local us = axe[i][7] + local ml = axe[i][8] + local fp = axe[i][9] + +minetest.register_tool("mymagic_tools:axe_enchanted_"..mat.."_"..col,{ + description = "Enchanted "..mdes.." Axe - "..cdes, + inventory_image = "mymagic_axe_"..col..".png^mymagic_axe_handle_"..mat..".png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = fp, + max_drop_level=1, + groupcaps={ + choppy = {times = gro, uses = us, maxlevel=ml}, + magic_axe = {times = gro, uses = us, maxlevel=ml}, + }, + damage_groups = fles, + }, + groups = {not_in_creative_inventory = 1} +}) +end + +--[[ +function = op(itemstack, placer, pointed_thing) + local node = pointed_thing.above + if pointed_thing.type ~= "node" then + return + end +--]] + + + + + + + + + + + + + + + + + diff --git a/mymagic_tools/enchanted_knives.lua b/mymagic_tools/enchanted_knives.lua new file mode 100644 index 0000000..2165325 --- /dev/null +++ b/mymagic_tools/enchanted_knives.lua @@ -0,0 +1,55 @@ +local knife = { + {"wood", "Wood", "orange", "Orange", {fleshy=3}, {times={ [4]=1.5}, uses=15, maxlevel=4},4}, + {"wood", "Wood", "green", "Green", {fleshy=4}, {times={ [3]=1.2, [4]=1.2}, uses=20, maxlevel=3},3}, + {"wood", "Wood", "blue", "Blue", {fleshy=5}, {times={ [2]=1.5, [3]=1.2, [4]=0.9}, uses=25, maxlevel=2},2}, + {"wood", "Wood", "red", "Red", {fleshy=6}, {times={[1]=2.0, [2]=1.4, [3]=1.2, [4]=0.6}, uses=30, maxlevel=1},1}, + + {"stone", "Stone", "orange", "Orange", {fleshy=5}, {times={ [4]=1.3}, uses=25, maxlevel=4},4}, + {"stone", "Stone", "green", "Green", {fleshy=6}, {times={ [3]=1.0, [4]=1.1}, uses=30, maxlevel=3},3}, + {"stone", "Stone", "blue", "Blue", {fleshy=7}, {times={ [2]=1.3, [3]=1.0, [4]=0.8}, uses=35, maxlevel=2},2}, + {"stone", "Stone", "red", "Red", {fleshy=8}, {times={[1]=1.7, [2]=1.2, [3]=1.0, [4]=0.6}, uses=40, maxlevel=1},1}, + + {"steel", "Steel", "orange", "Orange", {fleshy=7}, {times={ [4]=1.1}, uses=35, maxlevel=4},4}, + {"steel", "Steel", "green", "Green", {fleshy=8}, {times={ [3]=0.8, [4]=0.8}, uses=40, maxlevel=3},3}, + {"steel", "Steel", "blue", "Blue", {fleshy=9}, {times={ [2]=1.1, [3]=0.8, [4]=0.6}, uses=45, maxlevel=2},2}, + {"steel", "Steel", "red", "Red", {fleshy=10},{times={[1]=1.4, [2]=1.0, [3]=0.8, [4]=0.4}, uses=50, maxlevel=1},1}, + + {"bronze", "Bronze", "orange", "Orange", {fleshy=7}, {times={ [4]=0.9}, uses=45, maxlevel=4},4}, + {"bronze", "Bronze", "green", "Green", {fleshy=8}, {times={ [3]=0.6, [4]=0.8}, uses=50, maxlevel=3},3}, + {"bronze", "Bronze", "blue", "Blue", {fleshy=9}, {times={ [2]=0.9, [3]=0.6, [4]=0.6}, uses=55, maxlevel=2},2}, + {"bronze", "Bronze", "red", "Red", {fleshy=10},{times={[1]=1.1, [2]=0.8, [3]=0.6, [4]=0.4}, uses=60, maxlevel=1},1}, + + {"mese", "Mese", "orange", "Orange", {fleshy=8}, {times={ [4]=0.7}, uses=35, maxlevel=4},4}, + {"mese", "Mese", "green", "Green", {fleshy=9}, {times={ [3]=0.4, [4]=0.6}, uses=40, maxlevel=3},3}, + {"mese", "Mese", "blue", "Blue", {fleshy=10},{times={ [2]=0.7, [3]=0.4, [4]=0.4}, uses=45, maxlevel=2},2}, + {"mese", "Mese", "red", "Red", {fleshy=11},{times={[1]=0.8, [2]=0.6, [3]=0.4, [4]=0.2}, uses=50, maxlevel=1},1}, + + {"diamond", "Diamond", "orange", "Orange", {fleshy=10},{times={ [4]=0.5}, uses=50, maxlevel=4},4}, + {"diamond", "Diamond", "green", "Green", {fleshy=12},{times={ [3]=0.3, [4]=0.4}, uses=60, maxlevel=3},3}, + {"diamond", "Diamond", "blue", "Blue", {fleshy=15},{times={ [2]=0.5, [3]=0.3, [4]=0.3}, uses=70, maxlevel=2},2}, + {"diamond", "Diamond", "red", "Red", {fleshy=20},{times={[1]=0.5, [2]=0.4, [3]=0.3, [4]=0.2}, uses=80, maxlevel=1},1}, + } +for i in ipairs (knife) do + local mat = knife[i][1] + local mdes = knife[i][2] + local col = knife[i][3] + local cdes = knife[i][4] + local fles = knife[i][5] + local gro = knife[i][6] + local mag = knife[i][7] + +minetest.register_tool("mymagic_tools:knife_enchanted_"..mat.."_"..col,{ + description = "Enchanted "..mdes.." Knife - "..cdes, + inventory_image = "mymagic_knife_"..col..".png", + wield_scale = {x=1,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy=gro, + }, + damage_groups = fles, + }, + groups = {not_in_creative_inventory = 1,magic_knife = mag} +}) +end diff --git a/mymagic_tools/enchanted_picks.lua b/mymagic_tools/enchanted_picks.lua new file mode 100644 index 0000000..1a5ce13 --- /dev/null +++ b/mymagic_tools/enchanted_picks.lua @@ -0,0 +1,69 @@ +local picks = { + {"wood", "Wood", "orange", "Orange", {fleshy=3}, {[1]=2.3, [2]=1.7, [3]=1.5, [4]=1.5}, 15, 4, 0.9}, + {"wood", "Wood", "green", "Green", {fleshy=4}, {[1]=2.2, [2]=1.6, [3]=1.2, [4]=1.2}, 20, 3, 0.9}, + {"wood", "Wood", "blue", "Blue", {fleshy=5}, {[1]=2.1, [2]=1.5, [3]=0.9, [4]=0.9}, 25, 2, 0.9}, + {"wood", "Wood", "red", "Red", {fleshy=6}, {[1]=2.0, [2]=1.4, [3]=0.6, [4]=0.6}, 30, 1, 0.9}, + + {"stone", "Stone", "orange", "Orange", {fleshy=5}, {[1]=2.0, [2]=1.5, [3]=1.3, [4]=1.3}, 25, 4, 0.8}, + {"stone", "Stone", "green", "Green", {fleshy=6}, {[1]=1.9, [2]=1.4, [3]=1.1, [4]=1.1}, 30, 3, 0.8}, + {"stone", "Stone", "blue", "Blue", {fleshy=7}, {[1]=1.8, [2]=1.3, [3]=0.8, [4]=0.8}, 35, 2, 0.8}, + {"stone", "Stone", "red", "Red", {fleshy=8}, {[1]=1.7, [2]=1.2, [3]=0.6, [4]=0.6}, 40, 1, 0.8}, + + {"steel", "Steel", "orange", "Orange", {fleshy=7}, {[1]=1.7, [2]=1.3, [3]=1.1, [4]=1.1}, 35, 4, 0.7}, + {"steel", "Steel", "green", "Green", {fleshy=8}, {[1]=1.6, [2]=1.2, [3]=0.8, [4]=0.8}, 40, 3, 0.7}, + {"steel", "Steel", "blue", "Blue", {fleshy=9}, {[1]=1.5, [2]=1.1, [3]=0.6, [4]=0.6}, 45, 2, 0.7}, + {"steel", "Steel", "red", "Red", {fleshy=10},{[1]=1.4, [2]=1.0, [3]=0.4, [4]=0.4}, 50, 1, 0.7}, + + {"bronze", "Bronze", "orange", "Orange", {fleshy=9}, {[1]=1.4, [2]=1.1, [3]=0.9, [4]=0.9}, 45, 4, 0.6}, + {"bronze", "Bronze", "green", "Green", {fleshy=10},{[1]=1.3, [2]=1.0, [3]=0.8, [4]=0.8}, 50, 3, 0.6}, + {"bronze", "Bronze", "blue", "Blue", {fleshy=11},{[1]=1.2, [2]=0.9, [3]=0.6, [4]=0.6}, 55, 2, 0.6}, + {"bronze", "Bronze", "red", "Red", {fleshy=12},{[1]=1.1, [2]=0.8, [3]=0.4, [4]=0.4}, 60, 1, 0.6}, + + {"mese", "Mese", "orange", "Orange", {fleshy=11},{[1]=1.4, [2]=0.9, [3]=0.7, [4]=0.7}, 35, 4, 0.5}, + {"mese", "Mese", "green", "Green", {fleshy=12},{[1]=1.2, [2]=0.8, [3]=0.6, [4]=0.6}, 40, 3, 0.5}, + {"mese", "Mese", "blue", "Blue", {fleshy=13},{[1]=1.0, [2]=0.7, [3]=0.4, [4]=0.4}, 45, 2, 0.5}, + {"mese", "Mese", "red", "Red", {fleshy=14},{[1]=0.8, [2]=0.6, [3]=0.2, [4]=0.2}, 50, 1, 0.5}, + + {"diamond", "Diamond", "orange", "Orange", {fleshy=13},{[1]=0.8, [2]=0.7, [3]=0.5, [4]=0.5}, 50, 4, 0.4}, + {"diamond", "Diamond", "green", "Green", {fleshy=14},{[1]=0.6, [2]=0.6, [3]=0.4, [4]=0.4}, 60, 3, 0.4}, + {"diamond", "Diamond", "blue", "Blue", {fleshy=15},{[1]=0.4, [2]=0.4, [3]=0.3, [4]=0.3}, 70, 2, 0.3}, + {"diamond", "Diamond", "red", "Red", {fleshy=16},{[1]=0.2, [2]=0.2, [3]=0.2, [4]=0.2}, 80, 1, 0.3}, + } +for i in ipairs (picks) do + local mat = picks[i][1] + local mdes = picks[i][2] + local col = picks[i][3] + local cdes = picks[i][4] + local fles = picks[i][5] + local gro = picks[i][6] + local us = picks[i][7] + local ml = picks[i][8] + local fp = picks[i][9] + +minetest.register_tool("mymagic_tools:pick_enchanted_"..mat.."_"..col,{ + description = "Enchanted "..mdes.." Pick - "..cdes, + inventory_image = "mymagic_pick_"..col..".png^mymagic_axe_handle_"..mat..".png^mymagic_leather_grip.png", + wield_scale = {x=1,y=1.5,z=1.5}, + tool_capabilities = { + full_punch_interval = fp, + max_drop_level=1, + groupcaps={ + cracky = {times = gro, uses = us, maxlevel=ml}, + magic_pick = {times = gro, uses = us, maxlevel=ml}, + }, + damage_groups = fles, + }, + groups = {not_in_creative_inventory = 1}, + on_place = function(itemstack, placer, pointed_thing) + minetest.set_node(pointed_thing.above,{name = "default:cobble"}) + end +}) +end + + + + + + + + diff --git a/mymagic_tools/enchanted_shovels.lua b/mymagic_tools/enchanted_shovels.lua new file mode 100644 index 0000000..9c86245 --- /dev/null +++ b/mymagic_tools/enchanted_shovels.lua @@ -0,0 +1,62 @@ +local shov = { + {"wood", "Wood", "orange", "Orange", {fleshy=3}, {[1]=2.3, [2]=1.7, [3]=1.5, [4]=1.5}, 15, 4, 0.9}, + {"wood", "Wood", "green", "Green", {fleshy=4}, {[1]=2.2, [2]=1.6, [3]=1.2, [4]=1.2}, 20, 3, 0.9}, + {"wood", "Wood", "blue", "Blue", {fleshy=5}, {[1]=2.1, [2]=1.5, [3]=0.9, [4]=0.9}, 25, 2, 0.9}, + {"wood", "Wood", "red", "Red", {fleshy=6}, {[1]=2.0, [2]=1.4, [3]=0.6, [4]=0.6}, 30, 1, 0.9}, + + {"stone", "Stone", "orange", "Orange", {fleshy=5}, {[1]=2.0, [2]=1.5, [3]=1.3, [4]=1.3}, 25, 4, 0.8}, + {"stone", "Stone", "green", "Green", {fleshy=6}, {[1]=1.9, [2]=1.4, [3]=1.1, [4]=1.1}, 30, 3, 0.8}, + {"stone", "Stone", "blue", "Blue", {fleshy=7}, {[1]=1.8, [2]=1.3, [3]=0.8, [4]=0.8}, 35, 2, 0.8}, + {"stone", "Stone", "red", "Red", {fleshy=8}, {[1]=1.7, [2]=1.2, [3]=0.6, [4]=0.6}, 40, 1, 0.8}, + + {"steel", "Steel", "orange", "Orange", {fleshy=7}, {[1]=1.7, [2]=1.3, [3]=1.1, [4]=1.1}, 35, 4, 0.7}, + {"steel", "Steel", "green", "Green", {fleshy=8}, {[1]=1.6, [2]=1.2, [3]=0.8, [4]=0.8}, 40, 3, 0.7}, + {"steel", "Steel", "blue", "Blue", {fleshy=9}, {[1]=1.5, [2]=1.1, [3]=0.6, [4]=0.6}, 45, 2, 0.7}, + {"steel", "Steel", "red", "Red", {fleshy=10},{[1]=1.4, [2]=1.0, [3]=0.4, [4]=0.4}, 50, 1, 0.7}, + + {"bronze", "Bronze", "orange", "Orange", {fleshy=9}, {[1]=1.4, [2]=1.1, [3]=0.9, [4]=0.9}, 45, 4, 0.6}, + {"bronze", "Bronze", "green", "Green", {fleshy=10},{[1]=1.3, [2]=1.0, [3]=0.8, [4]=0.8}, 50, 3, 0.6}, + {"bronze", "Bronze", "blue", "Blue", {fleshy=11},{[1]=1.2, [2]=0.9, [3]=0.6, [4]=0.6}, 55, 2, 0.6}, + {"bronze", "Bronze", "red", "Red", {fleshy=12},{[1]=1.1, [2]=0.8, [3]=0.4, [4]=0.4}, 60, 1, 0.6}, + + {"mese", "Mese", "orange", "Orange", {fleshy=11},{[1]=1.4, [2]=0.9, [3]=0.7, [4]=0.7}, 35, 4, 0.5}, + {"mese", "Mese", "green", "Green", {fleshy=12},{[1]=1.2, [2]=0.8, [3]=0.6, [4]=0.6}, 40, 3, 0.5}, + {"mese", "Mese", "blue", "Blue", {fleshy=13},{[1]=1.0, [2]=0.7, [3]=0.4, [4]=0.4}, 45, 2, 0.5}, + {"mese", "Mese", "red", "Red", {fleshy=14},{[1]=0.8, [2]=0.6, [3]=0.2, [4]=0.2}, 50, 1, 0.5}, + + {"diamond", "Diamond", "orange", "Orange", {fleshy=13},{[1]=0.8, [2]=0.7, [3]=0.5, [4]=0.5}, 50, 4, 0.4}, + {"diamond", "Diamond", "green", "Green", {fleshy=14},{[1]=0.6, [2]=0.6, [3]=0.4, [4]=0.4}, 60, 3, 0.4}, + {"diamond", "Diamond", "blue", "Blue", {fleshy=15},{[1]=0.4, [2]=0.4, [3]=0.3, [4]=0.3}, 70, 2, 0.3}, + {"diamond", "Diamond", "red", "Red", {fleshy=16},{[1]=0.2, [2]=0.2, [3]=0.2, [4]=0.2}, 80, 1, 0.3}, + } +for i in ipairs (shov) do + local mat = shov[i][1] + local mdes = shov[i][2] + local col = shov[i][3] + local cdes = shov[i][4] + local fles = shov[i][5] + local gro = shov[i][6] + local us = shov[i][7] + local ml = shov[i][8] + local fp = shov[i][9] + +minetest.register_tool("mymagic_tools:shovel_enchanted_"..mat.."_"..col,{ + description = "Enchanted "..mdes.." Shovel - "..cdes, + inventory_image = "mymagic_shovel_"..col..".png^mymagic_axe_handle_"..mat..".png^mymagic_leather_grip.png", + wield_image = "mymagic_shovel_"..col..".png^mymagic_axe_handle_"..mat..".png^mymagic_leather_grip.png^[transformR90", + wield_scale = {x=1,y=1.5,z=1}, + tool_capabilities = { + full_punch_interval = fp, + max_drop_level=1, + groupcaps={ + crumbly = {times = gro, uses = us, maxlevel=ml}, + magic_shovel = {times = gro, uses = us, maxlevel=ml}, + }, + damage_groups = fles, + }, + groups = {not_in_creative_inventory = 1}, + on_place = function(itemstack, placer, pointed_thing) + minetest.set_node(pointed_thing.above,{name = "default:dirt"}) + end +}) +end diff --git a/mymagic_tools/enchanted_swords.lua b/mymagic_tools/enchanted_swords.lua new file mode 100644 index 0000000..c61407a --- /dev/null +++ b/mymagic_tools/enchanted_swords.lua @@ -0,0 +1,61 @@ +local swrds = { + {"wood", "Wood", "orange", "Orange", {fleshy=3}, {[1]=2.3, [2]=1.7, [3]=1.5, [4]=1.5}, 15, 4, 0.9}, + {"wood", "Wood", "green", "Green", {fleshy=4}, {[1]=2.2, [2]=1.6, [3]=1.2, [4]=1.2}, 20, 3, 0.9}, + {"wood", "Wood", "blue", "Blue", {fleshy=5}, {[1]=2.1, [2]=1.5, [3]=0.9, [4]=0.9}, 25, 2, 0.9}, + {"wood", "Wood", "red", "Red", {fleshy=6}, {[1]=2.0, [2]=1.4, [3]=0.6, [4]=0.6}, 30, 1, 0.9}, + + {"stone", "Stone", "orange", "Orange", {fleshy=5}, {[1]=2.0, [2]=1.5, [3]=1.3, [4]=1.3}, 25, 4, 0.8}, + {"stone", "Stone", "green", "Green", {fleshy=6}, {[1]=1.9, [2]=1.4, [3]=1.1, [4]=1.1}, 30, 3, 0.8}, + {"stone", "Stone", "blue", "Blue", {fleshy=7}, {[1]=1.8, [2]=1.3, [3]=0.8, [4]=0.8}, 35, 2, 0.8}, + {"stone", "Stone", "red", "Red", {fleshy=8}, {[1]=1.7, [2]=1.2, [3]=0.6, [4]=0.6}, 40, 1, 0.8}, + + {"steel", "Steel", "orange", "Orange", {fleshy=7}, {[1]=1.7, [2]=1.3, [3]=1.1, [4]=1.1}, 35, 4, 0.7}, + {"steel", "Steel", "green", "Green", {fleshy=8}, {[1]=1.6, [2]=1.2, [3]=0.8, [4]=0.8}, 40, 3, 0.7}, + {"steel", "Steel", "blue", "Blue", {fleshy=9}, {[1]=1.5, [2]=1.1, [3]=0.6, [4]=0.6}, 45, 2, 0.7}, + {"steel", "Steel", "red", "Red", {fleshy=10},{[1]=1.4, [2]=1.0, [3]=0.4, [4]=0.4}, 50, 1, 0.7}, + + {"bronze", "Bronze", "orange", "Orange", {fleshy=9}, {[1]=1.4, [2]=1.1, [3]=0.9, [4]=0.9}, 45, 4, 0.6}, + {"bronze", "Bronze", "green", "Green", {fleshy=10},{[1]=1.3, [2]=1.0, [3]=0.8, [4]=0.8}, 50, 3, 0.6}, + {"bronze", "Bronze", "blue", "Blue", {fleshy=11},{[1]=1.2, [2]=0.9, [3]=0.6, [4]=0.6}, 55, 2, 0.6}, + {"bronze", "Bronze", "red", "Red", {fleshy=12},{[1]=1.1, [2]=0.8, [3]=0.4, [4]=0.4}, 60, 1, 0.6}, + + {"mese", "Mese", "orange", "Orange", {fleshy=11},{[1]=1.4, [2]=0.9, [3]=0.7, [4]=0.7}, 35, 4, 0.5}, + {"mese", "Mese", "green", "Green", {fleshy=12},{[1]=1.2, [2]=0.8, [3]=0.6, [4]=0.6}, 40, 3, 0.5}, + {"mese", "Mese", "blue", "Blue", {fleshy=13},{[1]=1.0, [2]=0.7, [3]=0.4, [4]=0.4}, 45, 2, 0.5}, + {"mese", "Mese", "red", "Red", {fleshy=14},{[1]=0.8, [2]=0.6, [3]=0.2, [4]=0.2}, 50, 1, 0.5}, + + {"diamond", "Diamond", "orange", "Orange", {fleshy=13},{[1]=0.8, [2]=0.7, [3]=0.5, [4]=0.5}, 50, 4, 0.4}, + {"diamond", "Diamond", "green", "Green", {fleshy=14},{[1]=0.6, [2]=0.6, [3]=0.4, [4]=0.4}, 60, 3, 0.4}, + {"diamond", "Diamond", "blue", "Blue", {fleshy=15},{[1]=0.4, [2]=0.4, [3]=0.3, [4]=0.3}, 70, 2, 0.3}, + {"diamond", "Diamond", "red", "Red", {fleshy=16},{[1]=0.2, [2]=0.2, [3]=0.2, [4]=0.2}, 80, 1, 0.3}, + } +for i in ipairs (swrds) do + local mat = swrds[i][1] + local mdes = swrds[i][2] + local col = swrds[i][3] + local cdes = swrds[i][4] + local fles = swrds[i][5] + local gro = swrds[i][6] + local us = swrds[i][7] + local ml = swrds[i][8] + local fp = swrds[i][9] + +minetest.register_tool("mymagic_tools:sword_enchanted_"..mat.."_"..col,{ + description = "Enchanted "..mdes.." Sword - "..cdes, + inventory_image = "mymagic_sword_handle_"..mat.."_enchanted.png^mymagic_sword_blade_"..col..".png", + wield_scale = {x=1.5,y=1.5,z=0.5}, + tool_capabilities = { + full_punch_interval = fp, + max_drop_level=1, + groupcaps={ + snappy = {times = gro, uses = us, maxlevel=ml}, + magic_sword = {times = gro, uses = us, maxlevel=ml}, + }, + damage_groups = fles, + }, + groups = {not_in_creative_inventory = 1,magic_sword = mag}, + on_place = function(itemstack, placer, pointed_thing) + minetest.set_node(pointed_thing.above,{name = "default:dirt"}) + end +}) +end diff --git a/mymagic_tools/forge_armor.lua b/mymagic_tools/forge_armor.lua new file mode 100644 index 0000000..1d3df9b --- /dev/null +++ b/mymagic_tools/forge_armor.lua @@ -0,0 +1,246 @@ +local helmet = {} +local make_helmet = false +local chest = {} +local make_chest = false +local pants = {} +local make_pants = false +local boots = {} +local make_boots = false + + + + +minetest.register_node("mymagic_tools:forge_armor",{ + description = "Armor Forge", + tiles = { + {name="mymagic_forge_top.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + "mymagic_forge_back.png", + "mymagic_forge_side.png^[transformFX", + "mymagic_forge_side.png", + "mymagic_forge_back.png", + {name="mymagic_forge_front_armor.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = 14, + groups = {cracky=1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, -0.375, 0.5, 0.375}, + {-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, + {0.375, -0.5, -0.375, 0.5, 0.5, 0.375}, + {-0.5, -0.5, -0.5, 0.5, 0.25, -0.375}, + {-0.375, -0.5, -0.375, 0.375, 0.3125, 0.375}, + {-0.375, -0.5, -0.3125, 0.375, 0.375, 0.375}, + } + }, + +after_place_node = function(pos, placer) + local meta = minetest.get_meta(pos); + meta:set_string("infotext", "Armor Forge"); +end, +can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("input") then + return false + elseif not inv:is_empty("output") then + return false + end + return true +end, +on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "size[11,4;]".. + "background[-0.5,-0.5;12,5;mymagic_forge_bg.png]".. + "listcolors[#191515;#464545;#000000]".. + "label[0,0;Input]".. + "list[current_name;input;0,0.5;1,1;]".. + "image_button[1.5,0;1,1;3d_armor_inv_helmet_diamond.png;helmet;x5]".. + "image_button[1.5,1;1,1;3d_armor_inv_chestplate_diamond.png;chest;x6]".. + "image_button[1.5,2;1,1;3d_armor_inv_leggings_diamond.png;pants;x5]".. + "image_button[1.5,3;1,1;3d_armor_inv_boots_diamond.png;boots;x4]".. + --output + "label[0,2.5;Output]".. + "list[current_name;output;0,3;1,1;]".. + --Show Inventory + "list[current_player;main;3,0;8,4;]") + meta:set_string("infotext", "Armor Forge") + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("output", 1) +end, + +on_receive_fields = function(pos, formname, fields, sender) +local meta = minetest.get_meta(pos) +local inv = meta:get_inventory() +local istack = inv:get_stack("input",1) + +if fields["helmet"]then + make_helmet = false + local siz = istack:get_count("input") + if siz <= 4 then + minetest.chat_send_player(sender:get_player_name(), "You need 5 items to make a Helmet!") + return + end + if inv:is_empty("output") == false then + return + end + + local helmets = { + {"default:wood", "3d_armor:helmet_wood"}, + {"default:cactus", "3d_armor:helmet_cactus"}, + {"default:steel_ingot", "3d_armor:helmet_steel"}, + {"default:bronze_ingot", "3d_armor:helmet_bronze"}, + {"default:gold_ingot", "3d_armor:helmet_diamond"}, + {"default:diamond", "3d_armor:helmet_gold"}, + } + for i in ipairs (helmets) do + local mat = helmets[i][1] + local arm = helmets[i][2] + + if istack:get_name() == mat then + helmet = arm + make_helmet = true + end + end + if make_helmet == true then + inv:add_item("output",helmet) + + istack:take_item(5) + inv:set_stack("input",1,istack) + end + +elseif fields["chest"]then + make_chest = false + local siz = istack:get_count("input") + if siz <= 5 then + minetest.chat_send_player(sender:get_player_name(), "You need 6 items to make a Chestplate!") + return + end + if inv:is_empty("output") == false then + return + end + + local chests = { + {"default:wood", "3d_armor:chestplate_wood"}, + {"default:cactus", "3d_armor:chestplate_cactus"}, + {"default:steel_ingot", "3d_armor:chestplate_steel"}, + {"default:bronze_ingot", "3d_armor:chestplate_bronze"}, + {"default:gold_ingot", "3d_armor:chestplate_diamond"}, + {"default:diamond", "3d_armor:chestplate_gold"}, + } + for i in ipairs (chests) do + local mat = chests[i][1] + local arm = chests[i][2] + + if istack:get_name() == mat then + chest = arm + make_chest = true + end + end + if make_chest == true then + inv:add_item("output",chest) + + istack:take_item(6) + inv:set_stack("input",1,istack) + end + +elseif fields["pants"]then + make_pants = false + + local siz = istack:get_count("input") + if siz <= 4 then + minetest.chat_send_player(sender:get_player_name(), "You need 5 items to make Leggings!") + return + end + if inv:is_empty("output") == false then + return + end + + local pant = { + {"default:wood", "3d_armor:leggings_wood"}, + {"default:cactus", "3d_armor:leggings_cactus"}, + {"default:steel_ingot", "3d_armor:leggings_steel"}, + {"default:bronze_ingot", "3d_armor:leggings_bronze"}, + {"default:gold_ingot", "3d_armor:leggings_diamond"}, + {"default:diamond", "3d_armor:leggings_gold"}, + } + for i in ipairs (pant) do + local mat = pant[i][1] + local arm = pant[i][2] + + if istack:get_name() == mat then + pants = arm + make_pants = true + end + end + if make_pants == true then + inv:add_item("output",pants) + + istack:take_item(5) + inv:set_stack("input",1,istack) + end + +elseif fields["boots"]then + make_boots = false + local siz = istack:get_count("input") + if siz <= 3 then + minetest.chat_send_player(sender:get_player_name(), "You need 4 items to make Boots!") + return + end + if inv:is_empty("output") == false then + return + end + + local boot = { + {"default:wood", "3d_armor:boots_wood"}, + {"default:cactus", "3d_armor:boots_cactus"}, + {"default:steel_ingot", "3d_armor:boots_steel"}, + {"default:bronze_ingot", "3d_armor:boots_bronze"}, + {"default:gold_ingot", "3d_armor:boots_diamond"}, + {"default:diamond", "3d_armor:boots_gold"}, + } + for i in ipairs (boot) do + local mat = boot[i][1] + local arm = boot[i][2] + + if istack:get_name() == mat then + boots = arm + make_boots = true + end + end + if make_boots == true then + inv:add_item("output",boots) + + istack:take_item(4) + inv:set_stack("input",1,istack) + end +end +end, +}) +minetest.register_craft({ + output = "mymagic_tools:forge_armor", + recipe = { + {"default:steel_ingot","default:coalblock","default:steel_ingot"}, + {"default:steel_ingot","default:clay","default:steel_ingot"}, + {"default:steel_ingot","default:steel_ingot","default:steel_ingot"} + }, +}) + + + + + + + + + + + + + + + diff --git a/mymagic_tools/forge_axe.lua b/mymagic_tools/forge_axe.lua new file mode 100644 index 0000000..6a525e7 --- /dev/null +++ b/mymagic_tools/forge_axe.lua @@ -0,0 +1,211 @@ +local blade = {} +local make_blade = false +local handle = {} +local make_handle = false +local axe = {} +local make_axe = false + + + + +minetest.register_node("mymagic_tools:axe_forge",{ + description = "Axe Forge", + tiles = { + {name="mymagic_forge_top.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + "mymagic_forge_back.png", + "mymagic_forge_side.png^[transformFX", + "mymagic_forge_side.png", + "mymagic_forge_back.png", + {name="mymagic_forge_front_axe.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = 14, + groups = {creative_breakable=1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, -0.375, 0.5, 0.375}, + {-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, + {0.375, -0.5, -0.375, 0.5, 0.5, 0.375}, + {-0.5, -0.5, -0.5, 0.5, 0.25, -0.375}, + {-0.375, -0.5, -0.375, 0.375, 0.3125, 0.375}, + {-0.375, -0.5, -0.3125, 0.375, 0.375, 0.375}, + } + }, + +after_place_node = function(pos, placer) + local meta = minetest.get_meta(pos); + meta:set_string("infotext", "Axe Forge"); +end, + +on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "size[9,10;]".. + "background[-0.15,-0.25;9.40,10.75;mymagic_forge_bg.png]".. + "listcolors[#191515;#464545;#000000]".. + --Blade + "label[1,1.5;Blade]".. + "list[current_name;blade1;3,1.5;1,1;]".. + "list[current_name;blade2;2,1;1,1;]".. + "list[current_name;blade3;2,2;1,1;]".. + "button[2,3.5;1,1;bbutton;Make]".. + "list[current_name;blade;2,4.5;1,1;]".. + --Handle + "label[4.5,1.5;Handle]".. + "list[current_name;handle1;6,0.5;1,1;]".. + "list[current_name;handle2;6,1.5;1,1;]".. + "list[current_name;handle3;6,2.5;1,1;]".. + "button[6,3.5;1,1;hbutton;Make]".. + "list[current_name;handle;3,4.5;1,1;]".. + --Axe + "button[4,4.5;2,1;abutton;Make]".. + "list[current_name;axe;6,4.5;1,1;]".. + --Show Inventory + "list[current_player;main;0.5,6;8,4;]") + meta:set_string("infotext", "Axe Forge") + local inv = meta:get_inventory() + inv:set_size("blade", 1) + inv:set_size("blade1", 1) + inv:set_size("blade2", 1) + inv:set_size("blade3", 1) + inv:set_size("handle", 1) + inv:set_size("handle1", 1) + inv:set_size("handle2", 1) + inv:set_size("handle3", 1) + inv:set_size("axe", 1) +end, + +on_receive_fields = function(pos, formname, fields, sender) +local meta = minetest.get_meta(pos) +local inv = meta:get_inventory() + +if fields["bbutton"]then + make_blade = false + + if inv:is_empty("blade1") or + inv:is_empty("blade2") or + inv:is_empty("blade3") then + return + end + + local b1 = inv:get_stack("blade1", 1) + local b2 = inv:get_stack("blade2", 1) + local b3 = inv:get_stack("blade3", 1) + + + local blade_list = { + {"default:wood", "mymagic_tools:axe_blade_wood"}, + {"default:stone", "mymagic_tools:axe_blade_stone"}, + {"default:steel_ingot", "mymagic_tools:axe_blade_steel"}, + {"default:bronze_ingot", "mymagic_tools:axe_blade_bronze"}, + {"default:mese_crystal", "mymagic_tools:axe_blade_mese"}, + {"default:diamond", "mymagic_tools:axe_blade_diamond"}, + } + for i in ipairs (blade_list) do + local mat = blade_list[i][1] + local bld = blade_list[i][2] + + if b1:get_name() == mat and + b2:get_name() == mat and + b3:get_name() == mat then + blade = bld + make_blade = true + end + end + if make_blade == true then + inv:add_item("blade",blade) + + b1:take_item() + inv:set_stack("blade1",1,b1) + + b2:take_item() + inv:set_stack("blade2",1,b2) + + b3:take_item() + inv:set_stack("blade3",1,b3) + end + +elseif fields["hbutton"]then + make_handle = false + + if inv:is_empty("handle1") or + inv:is_empty("handle2") or + inv:is_empty("handle3") then + return + end + + local h1 = inv:get_stack("handle1", 1) + local h2 = inv:get_stack("handle2", 1) + local h3 = inv:get_stack("handle3", 1) + + if h1:get_name() == "default:stick" and + h2:get_name() == "default:stick" and + h3:get_name() == "default:stick" then + handle = "mymagic_tools:axe_handle" + make_handle = true + end + if make_handle == true then + inv:add_item("handle",handle) + + h1:take_item() + inv:set_stack("handle1",1,h1) + + h2:take_item() + inv:set_stack("handle2",1,h2) + + h3:take_item() + inv:set_stack("handle3",1,h3) + end + +elseif fields["abutton"]then + make_sword = false + + if inv:is_empty("blade") or + inv:is_empty("handle") then + return + end + + local s1 = inv:get_stack("blade", 1) + local s2 = inv:get_stack("handle", 1) + + local maters = {"wood","stone","steel","bronze","mese","diamond"} + + for i=1,#maters do + local mater = maters[i] + + if s1:get_name() == "mymagic_tools:axe_blade_"..mater and + s2:get_name() == "mymagic_tools:axe_handle" then + axe = "default:axe_"..mater + make_axe = true + end + end + if make_axe == true then + inv:add_item("axe",axe) + + s1:take_item() + inv:set_stack("blade",1,s1) + + s2:take_item() + inv:set_stack("handle",1,s2) + end +end +end, +}) + + + + + + + + + + + + + + + + diff --git a/mymagic_tools/forge_sword.lua b/mymagic_tools/forge_sword.lua new file mode 100644 index 0000000..f228a40 --- /dev/null +++ b/mymagic_tools/forge_sword.lua @@ -0,0 +1,251 @@ +local blade = {} +local make_blade = false +local handle = {} +local make_handle = false +local sword = {} +local make_sword = false + + + + +minetest.register_node("mymagic_tools:forge_sword",{ + description = "Sword Forge", + tiles = { + {name="mymagic_forge_top.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + "mymagic_forge_back.png", + "mymagic_forge_side.png^[transformFX", + "mymagic_forge_side.png", + "mymagic_forge_back.png", + {name="mymagic_forge_front_sword.png", animation={type="vertical_frames",aspect_w=16, aspect_h=16, length=0.3}}, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = 14, + groups = {cracky=1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.375, -0.375, 0.5, 0.375}, + {-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, + {0.375, -0.5, -0.375, 0.5, 0.5, 0.375}, + {-0.5, -0.5, -0.5, 0.5, 0.25, -0.375}, + {-0.375, -0.5, -0.375, 0.375, 0.3125, 0.375}, + {-0.375, -0.5, -0.3125, 0.375, 0.375, 0.375}, + } + }, + +after_place_node = function(pos, placer) + local meta = minetest.get_meta(pos); + meta:set_string("infotext", "Sword Forge"); +end, +can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("blade") then + return false + elseif not inv:is_empty("blade1") then + return false + elseif not inv:is_empty("blade2") then + return false + elseif not inv:is_empty("blade3") then + return false + elseif not inv:is_empty("handle") then + return false + elseif not inv:is_empty("handle1") then + return false + elseif not inv:is_empty("handle2") then + return false + elseif not inv:is_empty("handle3") then + return false + elseif not inv:is_empty("sword") then + return false + end + return true +end, +on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "size[9,10;]".. + "background[-0.15,-0.25;9.40,10.75;mymagic_forge_bg.png]".. + "listcolors[#191515;#464545;#000000]".. + --Blade + "label[1,1.5;Blade]".. + "list[current_name;blade1;2,0.5;1,1;]".. + "list[current_name;blade2;2,1.5;1,1;]".. + "list[current_name;blade3;2,2.5;1,1;]".. + "button[2,3.5;1,1;bbutton;Make]".. + "list[current_name;blade;2,4.5;1,1;]".. + --Handle + "label[4.5,1.5;Handle]".. + "list[current_name;handle1;6,0.5;1,1;]".. + "list[current_name;handle2;6,1.5;1,1;]".. + "list[current_name;handle3;6,2.5;1,1;]".. + "button[6,3.5;1,1;hbutton;Make]".. + "list[current_name;handle;3,4.5;1,1;]".. + --Sword + "button[4,4.5;2,1;sbutton;Make]".. + "list[current_name;sword;6,4.5;1,1;]".. + --Show Inventory + "list[current_player;main;0.5,6;8,4;]") + meta:set_string("infotext", "Sword Forge") + local inv = meta:get_inventory() + inv:set_size("blade", 1) + inv:set_size("blade1", 1) + inv:set_size("blade2", 1) + inv:set_size("blade3", 1) + inv:set_size("handle", 1) + inv:set_size("handle1", 1) + inv:set_size("handle2", 1) + inv:set_size("handle3", 1) + inv:set_size("sword", 1) +end, + +on_receive_fields = function(pos, formname, fields, sender) +local meta = minetest.get_meta(pos) +local inv = meta:get_inventory() + +if fields["bbutton"]then + make_blade = false + + if inv:is_empty("blade1") or + inv:is_empty("blade2") or + inv:is_empty("blade3") then + return + end + + local b1 = inv:get_stack("blade1", 1) + local b2 = inv:get_stack("blade2", 1) + local b3 = inv:get_stack("blade3", 1) + + + local blade_list = { + {"default:wood", "mymagic_tools:blade_wood"}, + {"default:stone", "mymagic_tools:blade_stone"}, + {"default:steel_ingot", "mymagic_tools:blade_steel"}, + {"default:bronze_ingot", "mymagic_tools:blade_bronze"}, + {"default:mese_crystal", "mymagic_tools:blade_mese"}, + {"default:diamond", "mymagic_tools:blade_diamond"}, + } + for i in ipairs (blade_list) do + local mat = blade_list[i][1] + local bld = blade_list[i][2] + + if b1:get_name() == mat and + b2:get_name() == mat and + b3:get_name() == mat then + blade = bld + make_blade = true + end + end + if make_blade == true then + inv:add_item("blade",blade) + + b1:take_item() + inv:set_stack("blade1",1,b1) + + b2:take_item() + inv:set_stack("blade2",1,b2) + + b3:take_item() + inv:set_stack("blade3",1,b3) + end + +elseif fields["hbutton"]then + make_handle = false + + if inv:is_empty("handle1") or + inv:is_empty("handle2") or + inv:is_empty("handle3") then + return + end + + local h1 = inv:get_stack("handle1", 1) + local h2 = inv:get_stack("handle2", 1) + local h3 = inv:get_stack("handle3", 1) + + + local handle_list = { + {"default:stick", "mymagic_tools:handle_wood"}, + {"default:steel_ingot", "mymagic_tools:handle_steel"}, + } + for i in ipairs (handle_list) do + local mat = handle_list[i][1] + local bld = handle_list[i][2] + + if h1:get_name() == mat and + h2:get_name() == mat and + h3:get_name() == mat then + handle = bld + make_handle = true + end + end + if make_handle == true then + inv:add_item("handle",handle) + + h1:take_item() + inv:set_stack("handle1",1,h1) + + h2:take_item() + inv:set_stack("handle2",1,h2) + + h3:take_item() + inv:set_stack("handle3",1,h3) + end + +elseif fields["sbutton"]then + make_sword = false + + if inv:is_empty("blade") or + inv:is_empty("handle") then + return + end + + local s1 = inv:get_stack("blade", 1) + local s2 = inv:get_stack("handle", 1) + + local maters = {"wood","stone","steel","bronze","mese","diamond"} + + for i=1,#maters do + local mater = maters[i] + + if s1:get_name() == "mymagic_tools:blade_"..mater and + s2:get_name() == "mymagic_tools:handle_wood" then + sword = "default:sword_"..mater + make_sword = true + end + end + if make_sword == true then + inv:add_item("sword",sword) + + s1:take_item() + inv:set_stack("blade",1,s1) + + s2:take_item() + inv:set_stack("handle",1,s2) + end +end +end, +}) +minetest.register_craft({ + output = "mymagic_tools:forge_sword", + recipe = { + {"default:steel_ingot","default:coalblock","default:steel_ingot"}, + {"default:steel_ingot","default:brick","default:steel_ingot"}, + {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, + }, +}) + + + + + + + + + + + + + + + diff --git a/mymagic_tools/init.lua b/mymagic_tools/init.lua new file mode 100644 index 0000000..090c3d3 --- /dev/null +++ b/mymagic_tools/init.lua @@ -0,0 +1,30 @@ +dofile(minetest.get_modpath("mymagic_tools").."/craftitems.lua") + +--default tools +dofile(minetest.get_modpath("mymagic_tools").."/default_knife.lua") +dofile(minetest.get_modpath("mymagic_tools").."/default_shovel.lua") +dofile(minetest.get_modpath("mymagic_tools").."/default_axe.lua") +dofile(minetest.get_modpath("mymagic_tools").."/default_sword.lua") +dofile(minetest.get_modpath("mymagic_tools").."/default_pick.lua") + +--enchanted tools +dofile(minetest.get_modpath("mymagic_tools").."/enchanted_swords.lua") +dofile(minetest.get_modpath("mymagic_tools").."/enchanted_axes.lua") +dofile(minetest.get_modpath("mymagic_tools").."/enchanted_knives.lua") +dofile(minetest.get_modpath("mymagic_tools").."/enchanted_picks.lua") +dofile(minetest.get_modpath("mymagic_tools").."/enchanted_shovels.lua") + +--forges +--dofile(minetest.get_modpath("mymagic_tools").."/forge_axe.lua") +dofile(minetest.get_modpath("mymagic_tools").."/forge_sword.lua") + +local mod_3darmor = minetest.get_modpath("3d_armor") +if mod_3darmor then + dofile(minetest.get_modpath("mymagic_tools").."/forge_armor.lua") + dofile(minetest.get_modpath("mymagic_tools").."/enchanted_armor.lua") +end + + + + + diff --git a/mymagic_tools/textures/axes.xcf b/mymagic_tools/textures/axes.xcf new file mode 100644 index 0000000..cfd9dab Binary files /dev/null and b/mymagic_tools/textures/axes.xcf differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_blue.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_blue.png new file mode 100644 index 0000000..0639b19 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_blue_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_blue_preview.png new file mode 100644 index 0000000..0ae412d Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_blue_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_green.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_green.png new file mode 100644 index 0000000..74078fd Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_green_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_green_preview.png new file mode 100644 index 0000000..f4a9b43 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_green_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_orange.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_orange.png new file mode 100644 index 0000000..92c3561 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_orange_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_orange_preview.png new file mode 100644 index 0000000..d72de35 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_orange_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_red.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_red.png new file mode 100644 index 0000000..4c15857 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_red.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_boots_red_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_boots_red_preview.png new file mode 100644 index 0000000..5d7c390 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_boots_red_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_blue.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_blue.png new file mode 100644 index 0000000..813ac2f Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_blue_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_blue_preview.png new file mode 100644 index 0000000..77cc4ee Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_blue_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_green.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_green.png new file mode 100644 index 0000000..bc2447a Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_green_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_green_preview.png new file mode 100644 index 0000000..0100bff Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_green_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_orange.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_orange.png new file mode 100644 index 0000000..241ddda Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_orange_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_orange_preview.png new file mode 100644 index 0000000..ac9142a Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_orange_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_red.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_red.png new file mode 100644 index 0000000..5face47 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_red.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_chestplate_red_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_red_preview.png new file mode 100644 index 0000000..9d596f3 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_chestplate_red_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_blue.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_blue.png new file mode 100644 index 0000000..9e4ac08 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_blue_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_blue_preview.png new file mode 100644 index 0000000..5ba1b24 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_blue_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_green.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_green.png new file mode 100644 index 0000000..3f0a28e Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_green_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_green_preview.png new file mode 100644 index 0000000..cdcb4b2 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_green_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_orange.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_orange.png new file mode 100644 index 0000000..3386932 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_orange_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_orange_preview.png new file mode 100644 index 0000000..4e8232b Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_orange_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_red.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_red.png new file mode 100644 index 0000000..71f9689 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_red.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_helmet_red_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_helmet_red_preview.png new file mode 100644 index 0000000..21602f4 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_helmet_red_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_blue.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_blue.png new file mode 100644 index 0000000..d63e04a Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_blue_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_blue_preview.png new file mode 100644 index 0000000..41fb3f1 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_blue_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_green.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_green.png new file mode 100644 index 0000000..14daa3d Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_green_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_green_preview.png new file mode 100644 index 0000000..6f5c668 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_green_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_orange.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_orange.png new file mode 100644 index 0000000..3f4f6d0 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_orange_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_orange_preview.png new file mode 100644 index 0000000..c5730d8 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_orange_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_red.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_red.png new file mode 100644 index 0000000..707b5b0 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_red.png differ diff --git a/mymagic_tools/textures/mymagic_armor_diamond_leggings_red_preview.png b/mymagic_tools/textures/mymagic_armor_diamond_leggings_red_preview.png new file mode 100644 index 0000000..f5e8abb Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_diamond_leggings_red_preview.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_blue.png b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_blue.png new file mode 100644 index 0000000..da75d65 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_green.png b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_green.png new file mode 100644 index 0000000..f370ed1 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_orange.png b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_orange.png new file mode 100644 index 0000000..9636453 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_red.png b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_red.png new file mode 100644 index 0000000..7c7cfaa Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_boots_diamond_red.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_blue.png b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_blue.png new file mode 100644 index 0000000..8f8b3fd Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_green.png b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_green.png new file mode 100644 index 0000000..8d5e07c Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_orange.png b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_orange.png new file mode 100644 index 0000000..872055f Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_red.png b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_red.png new file mode 100644 index 0000000..b1f68e2 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_chestplate_diamond_red.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_blue.png b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_blue.png new file mode 100644 index 0000000..9207f68 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_green.png b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_green.png new file mode 100644 index 0000000..0bf8420 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_orange.png b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_orange.png new file mode 100644 index 0000000..daba036 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_red.png b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_red.png new file mode 100644 index 0000000..ec70663 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_helmet_diamond_red.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_blue.png b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_blue.png new file mode 100644 index 0000000..077d1fc Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_blue.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_green.png b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_green.png new file mode 100644 index 0000000..83d9c84 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_green.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_orange.png b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_orange.png new file mode 100644 index 0000000..d924826 Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_orange.png differ diff --git a/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_red.png b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_red.png new file mode 100644 index 0000000..6ef8b2d Binary files /dev/null and b/mymagic_tools/textures/mymagic_armor_inv_leggings_diamond_red.png differ diff --git a/mymagic_tools/textures/mymagic_axe_blade_bronze.png b/mymagic_tools/textures/mymagic_axe_blade_bronze.png new file mode 100644 index 0000000..f5ce612 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_blade_bronze.png differ diff --git a/mymagic_tools/textures/mymagic_axe_blade_diamond.png b/mymagic_tools/textures/mymagic_axe_blade_diamond.png new file mode 100644 index 0000000..05a7e60 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_blade_diamond.png differ diff --git a/mymagic_tools/textures/mymagic_axe_blade_mese.png b/mymagic_tools/textures/mymagic_axe_blade_mese.png new file mode 100644 index 0000000..14dc24d Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_blade_mese.png differ diff --git a/mymagic_tools/textures/mymagic_axe_blade_steel.png b/mymagic_tools/textures/mymagic_axe_blade_steel.png new file mode 100644 index 0000000..700dacd Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_blade_steel.png differ diff --git a/mymagic_tools/textures/mymagic_axe_blade_stone.png b/mymagic_tools/textures/mymagic_axe_blade_stone.png new file mode 100644 index 0000000..1466de9 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_blade_stone.png differ diff --git a/mymagic_tools/textures/mymagic_axe_blade_wood.png b/mymagic_tools/textures/mymagic_axe_blade_wood.png new file mode 100644 index 0000000..245584e Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_blade_wood.png differ diff --git a/mymagic_tools/textures/mymagic_axe_blue.png b/mymagic_tools/textures/mymagic_axe_blue.png new file mode 100644 index 0000000..101b486 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_blue.png differ diff --git a/mymagic_tools/textures/mymagic_axe_bronze.png b/mymagic_tools/textures/mymagic_axe_bronze.png new file mode 100644 index 0000000..e651b85 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_bronze.png differ diff --git a/mymagic_tools/textures/mymagic_axe_diamond.png b/mymagic_tools/textures/mymagic_axe_diamond.png new file mode 100644 index 0000000..c18c34d Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_diamond.png differ diff --git a/mymagic_tools/textures/mymagic_axe_green.png b/mymagic_tools/textures/mymagic_axe_green.png new file mode 100644 index 0000000..ac166e4 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_green.png differ diff --git a/mymagic_tools/textures/mymagic_axe_handle.png b/mymagic_tools/textures/mymagic_axe_handle.png new file mode 100644 index 0000000..c472382 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_handle.png differ diff --git a/mymagic_tools/textures/mymagic_axe_handle_bronze.png b/mymagic_tools/textures/mymagic_axe_handle_bronze.png new file mode 100644 index 0000000..d0b0f03 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_handle_bronze.png differ diff --git a/mymagic_tools/textures/mymagic_axe_handle_diamond.png b/mymagic_tools/textures/mymagic_axe_handle_diamond.png new file mode 100644 index 0000000..8ab538e Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_handle_diamond.png differ diff --git a/mymagic_tools/textures/mymagic_axe_handle_mese.png b/mymagic_tools/textures/mymagic_axe_handle_mese.png new file mode 100644 index 0000000..ad624f2 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_handle_mese.png differ diff --git a/mymagic_tools/textures/mymagic_axe_handle_steel.png b/mymagic_tools/textures/mymagic_axe_handle_steel.png new file mode 100644 index 0000000..af52318 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_handle_steel.png differ diff --git a/mymagic_tools/textures/mymagic_axe_handle_stone.png b/mymagic_tools/textures/mymagic_axe_handle_stone.png new file mode 100644 index 0000000..a25b51b Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_handle_stone.png differ diff --git a/mymagic_tools/textures/mymagic_axe_handle_wood.png b/mymagic_tools/textures/mymagic_axe_handle_wood.png new file mode 100644 index 0000000..f14f58e Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_handle_wood.png differ diff --git a/mymagic_tools/textures/mymagic_axe_mese.png b/mymagic_tools/textures/mymagic_axe_mese.png new file mode 100644 index 0000000..9b5ebc8 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_mese.png differ diff --git a/mymagic_tools/textures/mymagic_axe_orange.png b/mymagic_tools/textures/mymagic_axe_orange.png new file mode 100644 index 0000000..54b1a26 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_orange.png differ diff --git a/mymagic_tools/textures/mymagic_axe_red.png b/mymagic_tools/textures/mymagic_axe_red.png new file mode 100644 index 0000000..ea4839b Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_red.png differ diff --git a/mymagic_tools/textures/mymagic_axe_steel.png b/mymagic_tools/textures/mymagic_axe_steel.png new file mode 100644 index 0000000..f1965aa Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_steel.png differ diff --git a/mymagic_tools/textures/mymagic_axe_stone.png b/mymagic_tools/textures/mymagic_axe_stone.png new file mode 100644 index 0000000..59a9840 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_stone.png differ diff --git a/mymagic_tools/textures/mymagic_axe_wood.png b/mymagic_tools/textures/mymagic_axe_wood.png new file mode 100644 index 0000000..715e136 Binary files /dev/null and b/mymagic_tools/textures/mymagic_axe_wood.png differ diff --git a/mymagic_tools/textures/mymagic_forge_back.png b/mymagic_tools/textures/mymagic_forge_back.png new file mode 100644 index 0000000..dd4a5bb Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_back.png differ diff --git a/mymagic_tools/textures/mymagic_forge_bg.png b/mymagic_tools/textures/mymagic_forge_bg.png new file mode 100644 index 0000000..45d4971 Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_bg.png differ diff --git a/mymagic_tools/textures/mymagic_forge_front.png b/mymagic_tools/textures/mymagic_forge_front.png new file mode 100644 index 0000000..f767d6b Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_front.png differ diff --git a/mymagic_tools/textures/mymagic_forge_front_armor.png b/mymagic_tools/textures/mymagic_forge_front_armor.png new file mode 100644 index 0000000..a9cff60 Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_front_armor.png differ diff --git a/mymagic_tools/textures/mymagic_forge_front_axe.png b/mymagic_tools/textures/mymagic_forge_front_axe.png new file mode 100644 index 0000000..7a47c10 Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_front_axe.png differ diff --git a/mymagic_tools/textures/mymagic_forge_front_rod.png b/mymagic_tools/textures/mymagic_forge_front_rod.png new file mode 100644 index 0000000..5c86199 Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_front_rod.png differ diff --git a/mymagic_tools/textures/mymagic_forge_front_sword.png b/mymagic_tools/textures/mymagic_forge_front_sword.png new file mode 100644 index 0000000..980123e Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_front_sword.png differ diff --git a/mymagic_tools/textures/mymagic_forge_side.png b/mymagic_tools/textures/mymagic_forge_side.png new file mode 100644 index 0000000..9339339 Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_side.png differ diff --git a/mymagic_tools/textures/mymagic_forge_top.png b/mymagic_tools/textures/mymagic_forge_top.png new file mode 100644 index 0000000..cd42477 Binary files /dev/null and b/mymagic_tools/textures/mymagic_forge_top.png differ diff --git a/mymagic_tools/textures/mymagic_knife_blue.png b/mymagic_tools/textures/mymagic_knife_blue.png new file mode 100644 index 0000000..30390d2 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_blue.png differ diff --git a/mymagic_tools/textures/mymagic_knife_bronze.png b/mymagic_tools/textures/mymagic_knife_bronze.png new file mode 100644 index 0000000..cac56f6 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_bronze.png differ diff --git a/mymagic_tools/textures/mymagic_knife_diamond.png b/mymagic_tools/textures/mymagic_knife_diamond.png new file mode 100644 index 0000000..89d7a97 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_diamond.png differ diff --git a/mymagic_tools/textures/mymagic_knife_green.png b/mymagic_tools/textures/mymagic_knife_green.png new file mode 100644 index 0000000..9ca1480 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_green.png differ diff --git a/mymagic_tools/textures/mymagic_knife_mese.png b/mymagic_tools/textures/mymagic_knife_mese.png new file mode 100644 index 0000000..7312983 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_mese.png differ diff --git a/mymagic_tools/textures/mymagic_knife_orange.png b/mymagic_tools/textures/mymagic_knife_orange.png new file mode 100644 index 0000000..1f4152f Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_orange.png differ diff --git a/mymagic_tools/textures/mymagic_knife_red.png b/mymagic_tools/textures/mymagic_knife_red.png new file mode 100644 index 0000000..8886010 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_red.png differ diff --git a/mymagic_tools/textures/mymagic_knife_steel.png b/mymagic_tools/textures/mymagic_knife_steel.png new file mode 100644 index 0000000..e341d03 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_steel.png differ diff --git a/mymagic_tools/textures/mymagic_knife_stone.png b/mymagic_tools/textures/mymagic_knife_stone.png new file mode 100644 index 0000000..11ed04c Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_stone.png differ diff --git a/mymagic_tools/textures/mymagic_knife_wood.png b/mymagic_tools/textures/mymagic_knife_wood.png new file mode 100644 index 0000000..e1dece9 Binary files /dev/null and b/mymagic_tools/textures/mymagic_knife_wood.png differ diff --git a/mymagic_tools/textures/mymagic_leather_grip.png b/mymagic_tools/textures/mymagic_leather_grip.png new file mode 100644 index 0000000..1c9fd79 Binary files /dev/null and b/mymagic_tools/textures/mymagic_leather_grip.png differ diff --git a/mymagic_tools/textures/mymagic_pick_blue.png b/mymagic_tools/textures/mymagic_pick_blue.png new file mode 100644 index 0000000..9a69374 Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_blue.png differ diff --git a/mymagic_tools/textures/mymagic_pick_bronze.png b/mymagic_tools/textures/mymagic_pick_bronze.png new file mode 100644 index 0000000..30213df Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_bronze.png differ diff --git a/mymagic_tools/textures/mymagic_pick_diamond.png b/mymagic_tools/textures/mymagic_pick_diamond.png new file mode 100644 index 0000000..617cf65 Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_diamond.png differ diff --git a/mymagic_tools/textures/mymagic_pick_green.png b/mymagic_tools/textures/mymagic_pick_green.png new file mode 100644 index 0000000..98df4f7 Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_green.png differ diff --git a/mymagic_tools/textures/mymagic_pick_mese.png b/mymagic_tools/textures/mymagic_pick_mese.png new file mode 100644 index 0000000..07ecc1c Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_mese.png differ diff --git a/mymagic_tools/textures/mymagic_pick_orange.png b/mymagic_tools/textures/mymagic_pick_orange.png new file mode 100644 index 0000000..dabd62f Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_orange.png differ diff --git a/mymagic_tools/textures/mymagic_pick_red.png b/mymagic_tools/textures/mymagic_pick_red.png new file mode 100644 index 0000000..f2ac577 Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_red.png differ diff --git a/mymagic_tools/textures/mymagic_pick_steel.png b/mymagic_tools/textures/mymagic_pick_steel.png new file mode 100644 index 0000000..c0c7b11 Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_steel.png differ diff --git a/mymagic_tools/textures/mymagic_pick_stone.png b/mymagic_tools/textures/mymagic_pick_stone.png new file mode 100644 index 0000000..2932014 Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_stone.png differ diff --git a/mymagic_tools/textures/mymagic_pick_wood.png b/mymagic_tools/textures/mymagic_pick_wood.png new file mode 100644 index 0000000..25cb803 Binary files /dev/null and b/mymagic_tools/textures/mymagic_pick_wood.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_blue.png b/mymagic_tools/textures/mymagic_shovel_blue.png new file mode 100644 index 0000000..bf9061f Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_blue.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_bronze.png b/mymagic_tools/textures/mymagic_shovel_bronze.png new file mode 100644 index 0000000..23d8e3e Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_bronze.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_diamond.png b/mymagic_tools/textures/mymagic_shovel_diamond.png new file mode 100644 index 0000000..3d3ed89 Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_diamond.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_green.png b/mymagic_tools/textures/mymagic_shovel_green.png new file mode 100644 index 0000000..899d2ef Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_green.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_mese.png b/mymagic_tools/textures/mymagic_shovel_mese.png new file mode 100644 index 0000000..a522879 Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_mese.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_orange.png b/mymagic_tools/textures/mymagic_shovel_orange.png new file mode 100644 index 0000000..0800af8 Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_orange.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_red.png b/mymagic_tools/textures/mymagic_shovel_red.png new file mode 100644 index 0000000..75c8044 Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_red.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_steel.png b/mymagic_tools/textures/mymagic_shovel_steel.png new file mode 100644 index 0000000..ef8fa0e Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_steel.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_stone.png b/mymagic_tools/textures/mymagic_shovel_stone.png new file mode 100644 index 0000000..033641d Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_stone.png differ diff --git a/mymagic_tools/textures/mymagic_shovel_wood.png b/mymagic_tools/textures/mymagic_shovel_wood.png new file mode 100644 index 0000000..cf384b9 Binary files /dev/null and b/mymagic_tools/textures/mymagic_shovel_wood.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_blue.png b/mymagic_tools/textures/mymagic_sword_blade_blue.png new file mode 100644 index 0000000..34452c8 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_blue.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_bronze.png b/mymagic_tools/textures/mymagic_sword_blade_bronze.png new file mode 100644 index 0000000..d9eba7e Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_bronze.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_diamond.png b/mymagic_tools/textures/mymagic_sword_blade_diamond.png new file mode 100644 index 0000000..9699b61 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_diamond.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_gem_blue.png b/mymagic_tools/textures/mymagic_sword_blade_gem_blue.png new file mode 100644 index 0000000..720f60e Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_gem_blue.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_gem_green.png b/mymagic_tools/textures/mymagic_sword_blade_gem_green.png new file mode 100644 index 0000000..b30e917 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_gem_green.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_gem_orange.png b/mymagic_tools/textures/mymagic_sword_blade_gem_orange.png new file mode 100644 index 0000000..7f40d55 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_gem_orange.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_gem_red.png b/mymagic_tools/textures/mymagic_sword_blade_gem_red.png new file mode 100644 index 0000000..90b47a3 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_gem_red.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_green.png b/mymagic_tools/textures/mymagic_sword_blade_green.png new file mode 100644 index 0000000..49037c4 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_green.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_mese.png b/mymagic_tools/textures/mymagic_sword_blade_mese.png new file mode 100644 index 0000000..69f7384 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_mese.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_orange.png b/mymagic_tools/textures/mymagic_sword_blade_orange.png new file mode 100644 index 0000000..7ecd91b Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_orange.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_red.png b/mymagic_tools/textures/mymagic_sword_blade_red.png new file mode 100644 index 0000000..66d9664 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_red.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_steel.png b/mymagic_tools/textures/mymagic_sword_blade_steel.png new file mode 100644 index 0000000..a91d883 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_steel.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_stone.png b/mymagic_tools/textures/mymagic_sword_blade_stone.png new file mode 100644 index 0000000..1fc966b Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_stone.png differ diff --git a/mymagic_tools/textures/mymagic_sword_blade_wood.png b/mymagic_tools/textures/mymagic_sword_blade_wood.png new file mode 100644 index 0000000..c0c2bea Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_blade_wood.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_bronze_enchanted.png b/mymagic_tools/textures/mymagic_sword_handle_bronze_enchanted.png new file mode 100644 index 0000000..2b27289 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_bronze_enchanted.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_diamond_enchanted.png b/mymagic_tools/textures/mymagic_sword_handle_diamond_enchanted.png new file mode 100644 index 0000000..04b5551 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_diamond_enchanted.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_gem_blue.png b/mymagic_tools/textures/mymagic_sword_handle_gem_blue.png new file mode 100644 index 0000000..a4c1884 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_gem_blue.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_gem_green.png b/mymagic_tools/textures/mymagic_sword_handle_gem_green.png new file mode 100644 index 0000000..c328378 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_gem_green.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_gem_orange.png b/mymagic_tools/textures/mymagic_sword_handle_gem_orange.png new file mode 100644 index 0000000..a9ed7f0 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_gem_orange.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_gem_red.png b/mymagic_tools/textures/mymagic_sword_handle_gem_red.png new file mode 100644 index 0000000..83f8c49 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_gem_red.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_mese_enchanted.png b/mymagic_tools/textures/mymagic_sword_handle_mese_enchanted.png new file mode 100644 index 0000000..c203914 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_mese_enchanted.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_steel_enchanted.png b/mymagic_tools/textures/mymagic_sword_handle_steel_enchanted.png new file mode 100644 index 0000000..dba4db7 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_steel_enchanted.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_stone_enchanted.png b/mymagic_tools/textures/mymagic_sword_handle_stone_enchanted.png new file mode 100644 index 0000000..9f4b92e Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_stone_enchanted.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_wood.png b/mymagic_tools/textures/mymagic_sword_handle_wood.png new file mode 100644 index 0000000..8a693b1 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_wood.png differ diff --git a/mymagic_tools/textures/mymagic_sword_handle_wood_enchanted.png b/mymagic_tools/textures/mymagic_sword_handle_wood_enchanted.png new file mode 100644 index 0000000..c04d708 Binary files /dev/null and b/mymagic_tools/textures/mymagic_sword_handle_wood_enchanted.png differ diff --git a/mymagic_tools/textures/swords.xcf b/mymagic_tools/textures/swords.xcf new file mode 100644 index 0000000..dbb1b68 Binary files /dev/null and b/mymagic_tools/textures/swords.xcf differ