From 57fe3895d0cd78d3a178a43efc21930f432de323 Mon Sep 17 00:00:00 2001 From: Misael Roman Date: Mon, 1 Oct 2012 14:00:11 -0500 Subject: [PATCH] htspells completly renewed i have based the spells on PilzAdams throwing mod since it is more effective. Added some wands also. You still cannot craft anything at the moment. You need to get it via creative or /give command. --- harrytest/init.lua | 2 +- harrytest/textures/door_wood.png | Bin 166 -> 0 bytes harrytest/textures/door_wood_a.png | Bin 245 -> 0 bytes harrytest/textures/door_wood_a_r.png | Bin 249 -> 0 bytes harrytest/textures/door_wood_b.png | Bin 216 -> 0 bytes harrytest/textures/door_wood_b_r.png | Bin 216 -> 0 bytes htspells/build_spell.lua | 85 +++++++ htspells/depends.txt | 4 +- htspells/dig_spell.lua | 81 +++++++ htspells/fire_spell.lua | 125 ++++++++++ htspells/init.lua | 223 ++++++++---------- htspells/sounds/throwing_sound.ogg | Bin 0 -> 11011 bytes htspells/spell.lua | 92 ++++++++ htspells/teleport_spell.lua | 88 +++++++ htspells/textures/aqua.png | Bin 1648 -> 0 bytes htspells/textures/boom.png | Bin 330 -> 0 bytes htspells/textures/flame.png | Bin 1461 -> 0 bytes htspells/textures/htspells_empty.png | Bin 0 -> 178 bytes htspells/textures/htspells_spell.png | Bin 0 -> 1218 bytes htspells/textures/htspells_spell_2.png | Bin 0 -> 1210 bytes htspells/textures/htspells_spell_back.png | Bin 0 -> 1081 bytes htspells/textures/htspells_spell_fire.png | Bin 0 -> 1096 bytes htspells/textures/htspells_spell_fire_2.png | Bin 0 -> 1100 bytes .../textures/htspells_spell_fire_back.png | Bin 0 -> 1080 bytes .../textures/htspells_spell_fire_front.png | Bin 0 -> 1080 bytes htspells/textures/htspells_spell_front.png | Bin 0 -> 1081 bytes htspells/textures/lumos.png | Bin 1352 -> 0 bytes htspells/textures/smoke.png | Bin 323 -> 0 bytes htspells/textures/throwing_arrow_build.png | Bin 0 -> 213 bytes htspells/textures/throwing_arrow_build_2.png | Bin 0 -> 220 bytes .../textures/throwing_arrow_build_back.png | Bin 0 -> 227 bytes .../textures/throwing_arrow_build_front.png | Bin 0 -> 191 bytes htspells/textures/throwing_arrow_dig.png | Bin 0 -> 213 bytes htspells/textures/throwing_arrow_dig_2.png | Bin 0 -> 214 bytes htspells/textures/throwing_arrow_dig_back.png | Bin 0 -> 228 bytes .../textures/throwing_arrow_dig_front.png | Bin 0 -> 191 bytes htspells/textures/throwing_arrow_teleport.png | Bin 0 -> 213 bytes .../textures/throwing_arrow_teleport_2.png | Bin 0 -> 213 bytes .../textures/throwing_arrow_teleport_back.png | Bin 0 -> 225 bytes .../throwing_arrow_teleport_front.png | Bin 0 -> 189 bytes htspells/textures/wand.png | Bin 0 -> 1312 bytes htspells/textures/wand2.png | Bin 0 -> 1489 bytes htspells/textures/wand3.png | Bin 0 -> 1289 bytes htspells/textures/wand4.png | Bin 0 -> 1397 bytes unlockcharm/depends.txt | 1 + unlockcharm/init.lua | 25 ++ {htspells => unlockcharm}/readme.txt | 0 {htspells => unlockcharm}/textures/key.png | Bin 48 files changed, 600 insertions(+), 126 deletions(-) delete mode 100644 harrytest/textures/door_wood.png delete mode 100644 harrytest/textures/door_wood_a.png delete mode 100644 harrytest/textures/door_wood_a_r.png delete mode 100644 harrytest/textures/door_wood_b.png delete mode 100644 harrytest/textures/door_wood_b_r.png create mode 100644 htspells/build_spell.lua create mode 100644 htspells/dig_spell.lua create mode 100644 htspells/fire_spell.lua create mode 100644 htspells/sounds/throwing_sound.ogg create mode 100644 htspells/spell.lua create mode 100644 htspells/teleport_spell.lua delete mode 100644 htspells/textures/aqua.png delete mode 100644 htspells/textures/boom.png delete mode 100644 htspells/textures/flame.png create mode 100644 htspells/textures/htspells_empty.png create mode 100644 htspells/textures/htspells_spell.png create mode 100644 htspells/textures/htspells_spell_2.png create mode 100644 htspells/textures/htspells_spell_back.png create mode 100644 htspells/textures/htspells_spell_fire.png create mode 100644 htspells/textures/htspells_spell_fire_2.png create mode 100644 htspells/textures/htspells_spell_fire_back.png create mode 100644 htspells/textures/htspells_spell_fire_front.png create mode 100644 htspells/textures/htspells_spell_front.png delete mode 100644 htspells/textures/lumos.png delete mode 100644 htspells/textures/smoke.png create mode 100644 htspells/textures/throwing_arrow_build.png create mode 100644 htspells/textures/throwing_arrow_build_2.png create mode 100644 htspells/textures/throwing_arrow_build_back.png create mode 100644 htspells/textures/throwing_arrow_build_front.png create mode 100644 htspells/textures/throwing_arrow_dig.png create mode 100644 htspells/textures/throwing_arrow_dig_2.png create mode 100644 htspells/textures/throwing_arrow_dig_back.png create mode 100644 htspells/textures/throwing_arrow_dig_front.png create mode 100644 htspells/textures/throwing_arrow_teleport.png create mode 100644 htspells/textures/throwing_arrow_teleport_2.png create mode 100644 htspells/textures/throwing_arrow_teleport_back.png create mode 100644 htspells/textures/throwing_arrow_teleport_front.png create mode 100644 htspells/textures/wand.png create mode 100644 htspells/textures/wand2.png create mode 100644 htspells/textures/wand3.png create mode 100644 htspells/textures/wand4.png create mode 100644 unlockcharm/depends.txt create mode 100644 unlockcharm/init.lua rename {htspells => unlockcharm}/readme.txt (100%) rename {htspells => unlockcharm}/textures/key.png (100%) diff --git a/harrytest/init.lua b/harrytest/init.lua index bc7ef90..5efb4cc 100644 --- a/harrytest/init.lua +++ b/harrytest/init.lua @@ -152,7 +152,7 @@ end local on_mdoor_punched = function( pos, node, puncher ) local tool = puncher:get_wielded_item():get_name() - if tool and tool == "htspells:alohomora" then + if tool and tool == "unlockcharm:alohomora" then if string.find( node.name, 'harrytest:mdoor_wood' ) == nil then return end local upos = { x = pos.x, y = pos.y - 1, z = pos.z } diff --git a/harrytest/textures/door_wood.png b/harrytest/textures/door_wood.png deleted file mode 100644 index 120fc982f7aeb151b2c014678b205072b2b20907..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|5QL70(Y)*K0-AbW|YuPgfjuc1+R`+j4k&)&>S|H<$BB)9s< z;_m`x!pyA+4|o$Cze}6B{#Yb+wBd00z2wjq-x?FK3_V`5-7w{YP&x2Xl_00vK2KbLh*2~7ZsCsTp| diff --git a/harrytest/textures/door_wood_a_r.png b/harrytest/textures/door_wood_a_r.png deleted file mode 100644 index 9315b75ad9fe9039ca407cbfc40ed4ec33ccd3b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf)~NowNM&_oXE`KAXVwWT~s5UPGhs_Wj06pS_uv{*&MLNpAIz z#oqm_dMHx`u@dw}(Or&=Cxtu6{1-oD!M<&(uQL70(Y)*K0-AbW|YuPgf^OLM`TEF?z;>R92T`0_Q>Tl$W;A>*WVAeJ-+#~800;~x yaJZTB@bT)LDD-S%tIQ1aI3v8YamEyOc7}sBqJ8paLODP?7(8A5T-G@yGywoZbUldx diff --git a/harrytest/textures/door_wood_b_r.png b/harrytest/textures/door_wood_b_r.png deleted file mode 100644 index 9c53aa410599bb156bc5df9b25c42a2a72dc7809..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "htspells:arrow_build_entity" and obj:get_luaentity().name ~= "__builtin:item" then + if self.node ~= "" then + minetest.env:set_node(self.lastpos, {name=self.node}) + end + self.object:remove() + end + else + if self.node ~= "" then + minetest.env:set_node(self.lastpos, {name=self.node}) + end + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + if self.node ~= "" then + minetest.env:set_node(self.lastpos, {name=self.node}) + end + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("htspells:arrow_build_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'htspells:arrow_build', + recipe = { + {'default:stick', 'default:stick', 'default:shovel_steel'}, + } +}) diff --git a/htspells/depends.txt b/htspells/depends.txt index 562cf63..6a36d03 100644 --- a/htspells/depends.txt +++ b/htspells/depends.txt @@ -1 +1,3 @@ -default +default +bucket +fire diff --git a/htspells/dig_spell.lua b/htspells/dig_spell.lua new file mode 100644 index 0000000..06ae096 --- /dev/null +++ b/htspells/dig_spell.lua @@ -0,0 +1,81 @@ +minetest.register_craftitem("htspells:arrow_dig", { + description = "Dig Arrow", + inventory_image = "htspells_arrow_dig.png", +}) + +minetest.register_node("htspells:arrow_dig_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"htspells_arrow_dig.png", "htspells_arrow_dig.png", "htspells_arrow_dig_back.png", "htspells_arrow_dig_front.png", "htspells_arrow_dig_2.png", "htspells_arrow_dig.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local THROWING_ARROW_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"htspells:arrow_dig_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +THROWING_ARROW_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "htspells:arrow_dig_entity" and obj:get_luaentity().name ~= "__builtin:item" then + minetest.env:add_item(pos, 'htspells:arrow_dig') + minetest.env:remove_node(pos) + self.object:remove() + end + else + minetest.env:add_item(pos, 'htspells:arrow_dig') + minetest.env:remove_node(pos) + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + minetest.env:add_item(self.lastpos, 'htspells:arrow_dig') + minetest.env:remove_node(pos) + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("htspells:arrow_dig_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'htspells:arrow_dig', + recipe = { + {'default:stick', 'default:stick', 'default:pick_steel'}, + } +}) diff --git a/htspells/fire_spell.lua b/htspells/fire_spell.lua new file mode 100644 index 0000000..1f08d21 --- /dev/null +++ b/htspells/fire_spell.lua @@ -0,0 +1,125 @@ +minetest.register_craftitem("htspells:spell_fire", { + description = "Incendio", + inventory_image = "htspells_spell_fire.png", +}) + +minetest.register_node("htspells:spell_fire_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"htspells_spell_fire.png", "htspells_spell_fire.png", "htspells_spell_fire_back.png", "htspells_spell_fire_front.png", "htspells_spell_fire_2.png", "htspells_spell_fire.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local HTSPELLS_SPELL_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"htspells:spell_fire_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +HTSPELLS_SPELL_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "htspells:spell_fire_entity" and obj:get_luaentity().name ~= "__builtin:item" then + local damage = 5 + obj:punch(self.object, 1.0, { + full_punch_interval=1.0, + groupcaps={ + fleshy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + snappy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + } + }, nil) + self.object:remove() + end + else + local damage = 5 + obj:punch(self.object, 1.0, { + full_punch_interval=1.0, + groupcaps={ + fleshy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + snappy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + } + }, nil) + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" and node.name ~= "htspells:light" then + minetest.env:set_node(self.lastpos, {name="fire:basic_flame"}) + self.object:remove() + end + if math.floor(self.lastpos.x+0.5) ~= math.floor(pos.x+0.5) or math.floor(self.lastpos.y+0.5) ~= math.floor(pos.y+0.5) or math.floor(self.lastpos.z+0.5) ~= math.floor(pos.z+0.5) then + if minetest.env:get_node(self.lastpos).name == "htspells:light" then + minetest.env:remove_node(self.lastpos) + end + if minetest.env:get_node(pos).name == "air" then + minetest.env:set_node(pos, {name="htspells:light"}) + end + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("htspells:spell_fire_entity", HTSPELLS_SPELL_ENTITY) + +minetest.register_craft({ + output = 'htspells:spell_fire 4', + recipe = { + {'default:stick', 'default:stick', 'bucket:bucket_lava'}, + }, + replacements = { + {"bucket:bucket_lava", "bucket:bucket_empty"} + } +}) + +minetest.register_node("htspells:light", { + drawtype = "glasslike", + tiles = {"htspells_empty.png"}, + light_source = LIGHT_MAX-4, + selection_box = { + type = "fixed", + fixed = { + {0,0,0,0,0,0} + } + }, + groups = {not_in_creative_inventory=1} +}) + +minetest.register_abm({ + nodenames = {"htspells:light"}, + interval = 10, + chance = 1, + action = function(pos, node) + minetest.env:remove_node(pos) + end +}) diff --git a/htspells/init.lua b/htspells/init.lua index 9702cd3..f878243 100644 --- a/htspells/init.lua +++ b/htspells/init.lua @@ -1,124 +1,99 @@ ---[ ---PotterTest Mod Made by LandMine ---This subfolder of the mod contains all spells ---Licence: WTFPL ---] - ----Functions - - --- Spells - - -----1. Aguamenti - Sends out water - -minetest.register_tool("htspells:aguamenti", { - description = "Aguamenti Spell", - inventory_image = "aqua.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2}, - snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1}, - choppy={times={[3]=0.70}, uses=40, maxlevel=0} - } - }, - on_use = function(itemstack, user, pointed_thing) - minetest.env:set_node(pointed_thing.above, {name="default:water_source"}) - end -}) - -----2. Incendio - Sends out fire - -minetest.register_tool("htspells:incendio", { - description = "Inendio Spell", - inventory_image = "flame.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2}, - snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1}, - choppy={times={[3]=0.70}, uses=40, maxlevel=0} - } - }, - on_use = function(itemstack, user, pointed_thing) - minetest.env:set_node(pointed_thing.above, {name="fire:basic_flame"}) - end -}) - -----3. Alohomora - Unlocks doors -minetest.register_tool("htspells:alohomora", { - description = "Alohomora Spell", - inventory_image = "key.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2}, - snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1}, - choppy={times={[3]=0.70}, uses=40, maxlevel=0} - } - } -}) - -----4. Lumos - Illuminates the tip of the caster's wand. -minetest.register_tool("htspells:lumos", { - description = "Lumos Spell", - inventory_image = "lumos.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2}, - snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1}, - choppy={times={[3]=0.70}, uses=40, maxlevel=0} - } - }, - on_use = function(itemstack, user, pointed_thing) - minetest.env:set_node(pointed_thing.above, {name="default:torch"}) - end -}) - - -----5. Bombarda - Provokes a small explosion. - -minetest.register_tool("htspells:bombarda", { - description = "Bombarda Spell", - inventory_image = "flame.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2}, - snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1}, - choppy={times={[3]=0.70}, uses=40, maxlevel=0} - } - }, - on_use = function(itemstack, user, pointed_thing) - boom(pos) - end -}) - -minetest.register_entity("htspells:smoke", { - physical = true, - visual = "sprite", - textures = {"smoke.png"}, - collisionbox = {0,0,0,0,0,0}, - - timer = 0, - time = 5, - - on_activate = function(self, staticdata) - self.object:setacceleration({x=math.random(0,10)/10-0.5, y=5, z=math.random(0,10)/10-0.5}) - self.time = math.random(1, 10)/10 - end, - - on_step = function(self, dtime) - self.timer = self.timer+dtime - if self.timer > self.time then - self.object:remove() - end - end, -}) \ No newline at end of file +spells = { + {"htspells:spell", "htspells:spell_entity"}, + {"htspells:spell_fire", "htspells:spell_fire_entity"}, + {"htspells:spell_teleport", "htspells:spell_teleport_entity"}, + {"htspells:spell_dig", "htspells:spell_dig_entity"}, + {"htspells:spell_build", "htspells:spell_build_entity"} +} + +local htspells_shoot_spell = function(itemstack, player) + for _,stack in ipairs(player:get_inventory():get_list("main")) do + for _,spell in ipairs(spells) do + if stack:get_name() == spell[1] then + player:get_inventory():remove_item("main", spell[1]) + local playerpos = player:getpos() + local obj = minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, spell[2]) + local dir = player:get_look_dir() + obj:setvelocity({x=dir.x*19, y=dir.y*19, z=dir.z*19}) + obj:setacceleration({x=dir.x*-3, y=-10, z=dir.z*-3}) + obj:setyaw(player:get_look_yaw()+math.pi) + minetest.sound_play("throwing_sound", {pos=playerpos}) + if obj:get_luaentity().player == "" then + obj:get_luaentity().player = player + end + obj:get_luaentity().node = player:get_inventory():get_stack("main", 1):get_name() + return true + end + end + end + return false +end + +minetest.register_tool("htspells:wand_basic", { + description = "Basic Wand", + inventory_image = "wand2.png", + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + if htspells_shoot_spell(itemstack, user, pointed_thing) then + itemstack:add_wear(65535/50) + end + return itemstack + end, +}) + +minetest.register_craft({ + output = 'htspells:wand_basic', + recipe = { + {'', '', ''}, + {'', 'default:stick', ''}, + {'default:stick', 'default:stick', 'default:stick'}, + } +}) + +minetest.register_tool("htspells:wand_normal", { + description = "Wand", + inventory_image = "wand3.png", + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + if htspells_shoot_spell(item, user, pointed_thing) then + itemstack:add_wear(65535/100) + end + return itemstack + end, +}) + +minetest.register_craft({ + output = 'htspells:wand_normal', + recipe = { + {'', '', ''}, + {'default:stick', 'default:stick', 'default:stick'}, + {'default:stick', 'default:stick', 'default:stick'}, + } +}) + +minetest.register_tool("htspells:wand_advanced", { + description = "Advanced Wand", + inventory_image = "wand4.png", + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + if htspells_shoot_spell(item, user, pointed_thing) then + itemstack:add_wear(65535/200) + end + return itemstack + end, +}) + +minetest.register_craft({ + output = 'htspells:wand_advanced', + recipe = { + {'', '', ''}, + {'default:stick', 'default:stick', ''}, + {'default:stick', 'default:stick', 'default:stick'}, + } +}) + +dofile(minetest.get_modpath("htspells").."/spell.lua") +dofile(minetest.get_modpath("htspells").."/fire_spell.lua") +dofile(minetest.get_modpath("htspells").."/teleport_spell.lua") +dofile(minetest.get_modpath("htspells").."/dig_spell.lua") +dofile(minetest.get_modpath("htspells").."/build_spell.lua") \ No newline at end of file diff --git a/htspells/sounds/throwing_sound.ogg b/htspells/sounds/throwing_sound.ogg new file mode 100644 index 0000000000000000000000000000000000000000..c8911e5fed64d61e1a0007b98847b27d8044e3cc GIT binary patch literal 11011 zcmb7q1z1$u*Y_D3L_kVVkO8S7l%ZP$6d2N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# zbl58;xlP4N@$GMRWp5pun+X*t?l{KoWtR=7#oSRk?d}<6fe|*=Y(807-I?c3rxG1> z8mG~D0_%Ly>vj_JENC%~{FrVDkUhgFg@TDuUIgU`VZVCAwVIG%f`0!esyRoM4L_W{ zD5b^EIP!V59^AUA(*ANZQOJ3rx;2hnDMRI8THvv!Mud6QZL!Y+3bkq^-EMt5TJBldJ>|LR6!v+VFd+-gqF z>Jy97ujlyIjZ?}m9F$=XISo=+viC=c50Ok=y`IH|r#X?cwx0R1$$o=1*=#gJuTI8D zikk%BL0+szNdk(`F|TAuO|zxdElmhGJWD!EA6V1%d>z;7S`Q#MUBA~WKDl~0Ofsi; zAWsYn@lO<*xT$HxWczHva`&J!XK+`!Tp&t2CeYpTM5#2G8t1dFu%vlA{HxWVUDEWv zuPPYhjQytBr|Y!ZcFV0$stZ3z!Q|TNH{)n-{NPk>m+)admG6$)WDEBuHT^``u%1Qq3XNYLD zypzYo)P9@uoOVmpkvH9o{@9F`&thjg8zm%)g{wlh<1j}EW{$D_4O=DQe5;SK{I11d zqw%3;BL;FTIBo~E8t-rLZQsr|xudHua35M@#*eB&nx&uYZl(vHp7$Kgl5-Vf`EdPD%8!HjSIQ5*&j+mYmdZeY{{nEm98mxO literal 0 HcmV?d00001 diff --git a/htspells/spell.lua b/htspells/spell.lua new file mode 100644 index 0000000..416489d --- /dev/null +++ b/htspells/spell.lua @@ -0,0 +1,92 @@ +minetest.register_craftitem("htspells:spell", { + description = "Spell", + inventory_image = "htspells_spell.png", +}) + +minetest.register_node("htspells:spell_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"htspells_spell.png", "htspells_spell.png", "htspells_spell_back.png", "htspells_spell_front.png", "htspells_spell_2.png", "htspells_spell.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local HTSPELLS_SPELL_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"htspells:spell_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +HTSPELLS_SPELL_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "htspells:spell_entity" and obj:get_luaentity().name ~= "__builtin:item" then + local damage = 3 + obj:punch(self.object, 1.0, { + full_punch_interval=1.0, + groupcaps={ + fleshy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + snappy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + } + }, nil) + self.object:remove() + end + else + local damage = 3 + obj:punch(self.object, 1.0, { + full_punch_interval=1.0, + groupcaps={ + fleshy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + snappy={times={[1]=1/(damage-2), [2]=1/(damage-1), [3]=1/damage}}, + } + }, nil) + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + minetest.env:add_item(self.lastpos, 'htspells:spell') + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("htspells:spell_entity", HTSPELLS_SPELL_ENTITY) + +minetest.register_craft({ + output = 'htspells:spell 16', + recipe = { + {'default:stick', 'default:stick', 'default:steel_ingot'}, + } +}) diff --git a/htspells/teleport_spell.lua b/htspells/teleport_spell.lua new file mode 100644 index 0000000..6c94490 --- /dev/null +++ b/htspells/teleport_spell.lua @@ -0,0 +1,88 @@ +minetest.register_craftitem("htspells:arrow_teleport", { + description = "Teleport Arrow", + inventory_image = "htspells_arrow_teleport.png", +}) + +minetest.register_node("htspells:arrow_teleport_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"htspells_arrow_teleport.png", "htspells_arrow_teleport.png", "htspells_arrow_teleport_back.png", "htspells_arrow_teleport_front.png", "htspells_arrow_teleport_2.png", "htspells_arrow_teleport.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local THROWING_ARROW_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"htspells:arrow_teleport_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, + player = "", +} + +THROWING_ARROW_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "htspells:arrow_teleport_entity" and obj:get_luaentity().name ~= "__builtin:item" then + if self.player ~= "" then + self.player:setpos(pos) + self.player:get_inventory():add_item("main", ItemStack("htspells:arrow_teleport")) + end + self.object:remove() + end + else + if self.player ~= "" then + self.player:setpos(pos) + self.player:get_inventory():add_item("main", ItemStack("htspells:arrow_teleport")) + end + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + if self.player ~= "" then + self.player:setpos(self.lastpos) + self.player:get_inventory():add_item("main", ItemStack("htspells:arrow_teleport")) + end + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("htspells:arrow_teleport_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'htspells:arrow_teleport', + recipe = { + {'default:stick', 'default:stick', 'default:mese'}, + } +}) diff --git a/htspells/textures/aqua.png b/htspells/textures/aqua.png deleted file mode 100644 index 88b15a0512627a746d1a464f3e217114fde99864..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1648 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+m=!WZB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-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+w@EDE`rO#)F~9dpTpb-h8-F@%)>-?d5E#>D~_}UGTd)<*nDOtAGAH zpS-ZdSb9gYNzO;14PIQr!tWa5g1>WZf14QJ{&Js{TY9MEGFm+n}D O>HtqyKbLh*2~7a>e{u8x diff --git a/htspells/textures/boom.png b/htspells/textures/boom.png deleted file mode 100644 index 558872334c03ca811ff2e089240d243209d93692..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 330 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^RlY z;RWuTS*L&^oCO|{#S9GG!XV7ZFl&wkP>{XE)7O>#4u_18s;N@xwi7@h$r9Iy66gHf z+|;}h2Ir#G#FEq$h4Rdj3?KOPw;7$+P_r) SB5R<789ZJ6T-G@yGywo(`g7j^ diff --git a/htspells/textures/flame.png b/htspells/textures/flame.png deleted file mode 100644 index 905a9772809ce616b0c4949ddc38524c13a8ea32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1461 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+m=!WZB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPAEg{v+u2}(t{7puX=A(aKG z`a!A1`K3k4z=%sz23b{LClgZ(S3?&I zBQs~1UYGpj(%jU%5}4i;gkCqCdO-;xw*Y9fOKMSOS!#+~QGTuh*uz$txZUE6(>$o& z6x?oc!Kqgt=oo!av?4__ObD2EKuma|1#;lYJ~a=R){B6N`ej4A76Sv5wx^3@NX4y^ zAm41^M1i_A`!m};FW)We&G25O;E_LZ-jW56d|5OrMEG6*FgJBfZ@RGi-ky*U7JnsM zF&hyr&X5Tby4$vd=(yclrgo$z$Nas;?J%DdV}svyZ*0z=v3W0G{P;i@_k&mZC1&9Z zuGuqQGw9j)*};U5Np)}9UAJ42%-S<{zW$NT*5q@&HHZD)?(GXUKbFd`-M2o{xwu1( zVQGUN6YpQ2%c|8)6{#;dvsQ;|80~P=YmT`peNFsKiBR;?@IBj0#5-@WhvrwVy4YkS zY`gIPR)?T{oF-YpH#E)^tuSlL;aIWLI_50*#ubKzi}@KjEkxMrb#0zpZIxW|#3rdp zNNz*AmP=oAjjciMe7{H~pH z+W!9Jvxa}Jy>4V#6*H$r`KB)8ZKiLgA9S^<-4C@{iCrqv3tZga(VNJ_b>f)fjpM(a zU+ur8S^0a)8d3Yniyl}SY%!a(N$scnjqfvltk|KtuYO6H0Au9M{sm?UmlQW-n-rW0 zkKC5~Q=&6Up|S4awPce=z8~s7WK=IYTgE+Q?+>LNO~uovnO6Ve(~1(_bzAh|`F$bV z9yTRSpFh+5y)Bp6M&(D#iq3z0e9OG$Grzz+S^JEol4}>u(fqXSZ;CXo diff --git a/htspells/textures/htspells_empty.png b/htspells/textures/htspells_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..6bbd5547921ed6687c6d8163a55e6486df0df8d0 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaOClDyqr7``&h zV$fGQl%fk1;VkfoEM{Qf76xHPhFNnYfP(BLp1!W^cQ^$3we>Er?+O75NtU=qlsM<- z=BDPAFgO>bCYGe8D3oWGWGJ|M`UZqI@`(c#@p`&AhHzX@P5=TRmz9Ar?z5H^kj3EX L>gTe~DWM4fuVE-u literal 0 HcmV?d00001 diff --git a/htspells/textures/htspells_spell.png b/htspells/textures/htspells_spell.png new file mode 100644 index 0000000000000000000000000000000000000000..9cf98b2cfaa7df1fee2c8fe6dc9d9642b220b868 GIT binary patch literal 1218 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%nF$y5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8Mv>2~2MaLa!xGy`Y4UTL84#CABECEH%ZgC_h&L>|v`++-@<$X&zK> z3U0TUqWps%@@4n4g&+Dg{O;SNX4x; zLDqiEjy$!WZ=Y>v;gaGz;JJfQchMuBhfIQ99PB3qGXk=X$Yx|HWKIZhX%-MLn>qKc zq_n=Ss)$HstLe9%`SXv5o$0yn^q7Bx;!nWyGc7h#>Nu9JQ~mEb_wN1=|L*DW{pMLLRoJU|jJLuGC8O*mM>Yu6$4{S{e%7?u&yGj) z=vFJOBUy literal 0 HcmV?d00001 diff --git a/htspells/textures/htspells_spell_2.png b/htspells/textures/htspells_spell_2.png new file mode 100644 index 0000000000000000000000000000000000000000..058075dbbb23522f83e11c968d3008a9e230fb9d GIT binary patch literal 1210 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%nF$y5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|885r`;4ET3pgjaU)RdvAKM}R_q@MqxtB^R{?OzQCRMyFE&5;3V$ZTY7a8HG$Sl$p-D?cCi0 zzn5mL|7CW6%i3J7eX(3R`DN*nvke~<8@E0YyB4WwK6%YCjW@qL`j0tl*ZP;|M=udb z6_8x{dihL^Tf0`>UKcO6?GEdGWp5VIODmdKI;Vst0LCVw!2kdN literal 0 HcmV?d00001 diff --git a/htspells/textures/htspells_spell_back.png b/htspells/textures/htspells_spell_back.png new file mode 100644 index 0000000000000000000000000000000000000000..0f8dd5d1dfb209b735bc0e9a79389f121cb3d22e GIT binary patch literal 1081 zcmaJ=OK1~O6dkS9T2ra@mkQc(g5bi;ulbIRq0KZlU`j}X4Jhb*UYeoKym98GNs9<} zQL6}6p@^Ux1?fVqzlGqU73*)I8$m>HAqCy|S-7Z*w7#iHbzvNM^FEw&?z#8fcQVzz zr=fmxJwXr+i7qjX=e5qLtHu9a`ko(nYDS$|)B|&RSNjEW@AljlOQ&Rc?B4yC084>Es{V9sn)Ckq8Dw*!Uk9}z|mZ*FBlB&Bzcx&8J1@_-pd7rR$gFPviwmvnx*E1v=}eP!n+8SN5~Wy zrdTY}#a0?xeGC^4haC-`_hN+C9yE|t@*1|Mq96iWu{0BD&>$T}NrnX!p|I26Dd^^s ztYMeSgbT)$B$MH2)=8-XOeX&i)%7K`jnd$c-+v0*nL!gUX<);GrQnOpd7MzD5VL@U zpp}8}aHWc=JVemWLz9g4_{m<)P+`$tL?@F%!myEKC?Fw5D9oodO%+6cEaVUQLTpDo zz;T^?sI}b}@^=J$@o+HcXT=Ivgi1jN2C8t?KiqItuG0v*i6e`^(guJUx1dfgCM;;x zy#%W2mAPtlFTtu@2Ag4=YyIn*D@V9@oaIu};>}Xq0|WQEg`0Xa_w5#b5R(b9JyUuk z|6Evz*0@-n=f{@0FSsX&3F+xV`)t$4k!#21=Aw-czrXx&clyy;&+@G;ujQ5M^!4*! z*i5fB%E~7@;~S5@$gJBmeCPPcx%Zb++j5~@;@GO^pH9y-FJE2LnEg86a`ElJY{RP^ zxtVc!|K!yC8E;`<|0$WP&DXg+PuAQHxn@VV)Lx?>Tx~pf@8;NL_lb9}uef`S$J@Kd kU8A3ys1M9Hv1E$A>?&_la(W_4Y6a@*RSH5Xiwb54znt$(bafuC zu574e7^XVXF2?A*#U2&q^uJ#_yhx{d5>AkAoF-YxM9d)trx1u}QXh&TNf|o!7_~A? zDNy4Hl8AN)GS*y@jdA5PgR&W>HIOqTxgQabLVc?4XFuP)&jMBPv%Q`uj2a=7QQL=2 z)IHo8mxudhpTY(XfYzKq1vEq?kkbZqOUU`z6@lr!?>JeaJ&oJB^7|t=>MUbwvM()4E@RXpTbsr$Us~SS$NQt>BXfTb|^y#nMfko zjAJ}d=wep}6KrL$0Ycp#(5vbS&RQ$zXjF*k7LjxrMMOVK`7Tve1Roy`d-xU+2HRSA zKI{&9APhH!ydiJ6jds1Iz!kAPs3DycxXK@HxG2{)f@aXjA~MzENNF>%2386d)Z)1W zi|Va$mEyUCigG!c3};{KU)NkXqTaEW>!zifb=xDIdflX^e!uOC{h;ne#6$7io77T1 zA1IwZIWbn5d{NUe|KQHB=ge~c(+_Ry#Jkbu`PT!tZzmT6wP&wRf>gSz;aSb~lGdrI zz2i%Pk?ju`@cCVi5BXoGr>l=F literal 0 HcmV?d00001 diff --git a/htspells/textures/htspells_spell_fire_2.png b/htspells/textures/htspells_spell_fire_2.png new file mode 100644 index 0000000000000000000000000000000000000000..0617b3e8ce521dfde156f37d754e4892f6e58c13 GIT binary patch literal 1100 zcmaJ=TWAwO6kV)}6ovX_5OJ)oMJ-CMm(pZj?2HBT$$yQ$?gyFNIMI!}P%kdX7Nnvo%0iIT!5b zVAnuLMj6N}A(f7-1+7Jq2yDiE9x)6=H9Q=K4=EC>P& z=T*374m9%&@AC(P!6qPZJjZeZ%L`sUDEb7EElW3OOE2gFPnOI~OrgIpZBFh#E z1*YI*kk!ZXp-{-t5Cktlc(IbeuKI@?ugP^9K{rWc30m52sJ2^32bF|Ht+tm? zO}!beTH8ysCYL2*y5{N;=^bY|+q7ge+xE~Py>5}Fek#RZkOwiEl%kp9v+QKK z9H~1!xa(nq$9>-}`^L_FinxY`wz{S!zkA1SOng4^a#`KRkH<@wxlH-jkCdRb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F_ygK-OjiET91-kr}N^w}gzJTG18o+CF9|as`4q{nVso6h9)3A zH0zStYL=|#XwF^b^?EBwp5<7EAwyu8 zbUIC^-83{i7|!SO*&00W!U&huqa!Kf(yfZDLIhZ{sTxRyI%z9PN!X426n46rf@ZAC z>egDBaKV_2WH21f+9_p$vDp8inzoL%P#kRd{im>%=rI5j2Nvu$Wqfh%6?P~?2%A7c z&`dzsm91h^3LF~ zTv}cZ+rlZpYboW%1_o56<;ppD&+(-*lmGsHAGbUD{Dt={Wf1^DU3@^Y)|a(IamM z_RT!gwcl4=-ItEF$Xr3H&{6Sf>v)Z0ZlJtilzx7%nZ@Z)0vhJ+9(2A@}E)>*U&bounoN4Cht`b2$ zm`0EV5`n%Hgb$WcJp?^yWVeTU2||J%La-OhhaRK|?TotGL)*ZabK(2G|NH;*pON;q zmXe~wMFc^VL|Vldp7%PVumJxX^p;VQdZdwuqioa+ft1!d zV1bT-wzx9Tt@u)ijoX_k)Og&H&W2e zEm_0fEE6smlaWk@qgf}VEHE1VKUCMZ&^C&JZNL8%w&VRKU}C_Ay_SM6E?MP-GKG)@ zBm}KEggx0Rwx=M1b_$wgsH2wb)C?7-?R9iCDntw$NrnOa_Vhz)!bhAoLmN*VVrCI>zcDixObf8R@36mR@(yu_qv6fdc0Wn;s-Gu5rgr} zC;9iz>}z-B)FBG@G?kivB@47pUSI64M jT*KeXHOdyIW=I9 literal 0 HcmV?d00001 diff --git a/htspells/textures/lumos.png b/htspells/textures/lumos.png deleted file mode 100644 index 4513fd12d7aeeefa8a6512d0c539ecc45a8283ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1352 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+m=!WZB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPAEg{v+u2}(t{7puX=A(aKG z`a!A1`K3k4z=%sz23b{L zw_7Z5>eUB2MjsTdNYM-v0;U}h6P{>+9C)%%%>$EbFFdqriJVG^tSZmq4-(t6|KE^Bq|n zSz6b{9AU{6VCGb^GkE3aa_s-!s;5;aL~TAiws}^Xc1~u6R*XWyOeJ~S-}9gBPXC{i zyzor4+ z*YdP&Yt`@U?5_D2H`()zjC}IMW2RHqhwfv%;3D>@FlOp$>0cH~eHHcbCPI#FpBlEa zEn{YJ_V{<+`TV(QU!SNPd^{m-^M%vi7el17A|pPrnaPCgm6n)d8+!4q?~CgeC3SLE zhK#m0BD!L(%#12~`OZi+v~J_>*l4)Gm?vd((?i7tTSYZQa(4a|VcIXHAacm7?dPrS z2A)fg`aL|Zt!c41KSe}*=_T*SF@3H*O74}5>jm%nG26NCE|}oaF>ikNy7i}BtF5!`}*iw|w?Z}(dJ=6S-DoC&(`x@>kl{B=J1-yy-9iyu{QT;i#- z+`4(mwU95x7kuqL3Y!-1Q@;LW%c5oeTw8noG=3@k+xka&^*MWkpbCKm2I-5|CF0@V QJV0fer>mdKI;Vst08Xv#8~^|S diff --git a/htspells/textures/smoke.png b/htspells/textures/smoke.png deleted file mode 100644 index 6c07c300b0280113e3eb6e7255f65307a643f5f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 323 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^O!` zprjN3Q=kZEfk$L90|U1(2s1Lwnj--eWH0gbb!ET9AtNMXecDs36euKF;u=xnoS&PU znpeW$T$GwvlA5AWo>`Ki;O^-g5Z=fq4pcPH)5S5w;&f~9X;BtMj>ToW7BG4@x$QAt z{w8@M|MbF;Ndglzj_kd@(QNbmSu^J@3kbdcjge!LUc1YZ)b4bChiPZdtXp-Dab0Su zVCSi-gEO+%O|hw7YxpoG^sj$iTGv-bgHv|TZN7&upJ*awymh@&#_86Wn!>`*&v#Dv zE%X1hWXHR0Y`T+wDRg%%E`1!38e;s}i&f~D;kp|}jQ2PNFS2_dySe)9^(7oYmoj*| L`njxgN@xNAmq2xL diff --git a/htspells/textures/throwing_arrow_build.png b/htspells/textures/throwing_arrow_build.png new file mode 100644 index 0000000000000000000000000000000000000000..02653e139af7bcfecac0fc8e0e3a24ca5d60d09c GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPahoGQ^_I0a9W1vu|r;B5V#p&b( z3D#!eoO^qI+P6K}`;+Itr)dN0>}MspVohv6OV*^{2ogMT00f-6&YoaMV_*h?$w5lY vi-A~qW!sOEHOF;5{bpQHD|2HkWni$FBlqL>tuH{!85lfW{an^LB{Ts5=-WdZ literal 0 HcmV?d00001 diff --git a/htspells/textures/throwing_arrow_build_2.png b/htspells/textures/throwing_arrow_build_2.png new file mode 100644 index 0000000000000000000000000000000000000000..fd576d4068c3ef8001a6566c0400b73e4ed1cd4d GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPahoGQ^p;knNCr~KH)5S5w;&gI? z1nU;Y+2;BG{L7o)olQRwaQe`J0|z!NRhp3a`Pte3+e27{63@u*aP;cr>EYqw5m1Vq z-I_6d%Je@61(KT#YpkwKmf-=(8C(yLQM=MTH_)M$fk9tZv2>}u@e80m44$rjF6*2U FngHeDMMD4p literal 0 HcmV?d00001 diff --git a/htspells/textures/throwing_arrow_build_back.png b/htspells/textures/throwing_arrow_build_back.png new file mode 100644 index 0000000000000000000000000000000000000000..18c2f02c7ebab870ca1aca18966d2f0f4ced701e GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=BeG%-Ex}lN~6?UgGKN%6^AKP|#9t#-x%!pir`>i(`nz>Ewh3 zG6qJ5Jxq%ZJUcu4zw+nh=Q9s#@o`7E)v#sm|JeF@eOFG}hp%6cE}J)zb-LoM{2EEC zYJp2nRrguM`c2h1mc^mN)4}q8rJ&l8qkM`V9hunz*-}&v9G6=9f{B6on)0-r3e7A) P>li#;{an^LB{Ts5`x;84 literal 0 HcmV?d00001 diff --git a/htspells/textures/throwing_arrow_build_front.png b/htspells/textures/throwing_arrow_build_front.png new file mode 100644 index 0000000000000000000000000000000000000000..b6b6967202e1abfcde638c1877cd4d351494f27f GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=BeG%-Ex}lN~6?UgGKN%6^AKP|%Vi$L%0cgu&j^#WBR4kHC+M!Rbo buHp;~91{eKz8!ch4KmBq)z4*}Q$iB}8PqoI literal 0 HcmV?d00001 diff --git a/htspells/textures/throwing_arrow_dig.png b/htspells/textures/throwing_arrow_dig.png new file mode 100644 index 0000000000000000000000000000000000000000..02f6a00027c9fdbf347d68159b4be7dd550db884 GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPahoGRSu3T{)NN1?0i(`nz>Er|n z)@I?HdwYJ`w>@ZNX8$)ii-Fth?8{p^EWDpyMx5WURB1vZ2(*gKp2&EHfei@M*xA|L tKsbo^Cf literal 0 HcmV?d00001 diff --git a/htspells/textures/throwing_arrow_dig_2.png b/htspells/textures/throwing_arrow_dig_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b514b5d217edfa6b7ecc264a2f79bc2638bb489c GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPahoGRS@sk?oE}&4Dr;B5V#p&b( z3Dzx)v(5AW`Ik5I$yhWjoHntsu~9L0_S60T$E(_OMH^XoJLl|TKUY>zkl-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=BeG%-Ex}lN~6?UgGKN%6^AKP*7A+{HW0(piqjZi(`nz>Ewh3 zG6qJ5Jxq%ZJUcu4zw+nh=Q9s#@o`7E)v$g1^y$#g`S$f`AHIG)x@_J=*6E6S_Uz#~ zy*c*5pA##q3wF)X3hcQm5FsJJ`7c=6r=wfe=}|Kq&mx`^9u57bUKd#za`}}xlub=% Q0_|h)boFyt=akR{0Q@XXB>(^b literal 0 HcmV?d00001 diff --git a/htspells/textures/throwing_arrow_dig_front.png b/htspells/textures/throwing_arrow_dig_front.png new file mode 100644 index 0000000000000000000000000000000000000000..6681c998062736218d4ccf79cdec3d475872af3e GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=BeG%-Ex}lN~6?UgGKN%6^AKP*7C(zEH9gP{`iX#WBRBrJ)1!z1PV&zN`G4N02>fm8=KrkXW@ cU3v@*_g@JWnV0kU1C3(vboFyt=akR{04+;5XaE2J literal 0 HcmV?d00001 diff --git a/htspells/textures/throwing_arrow_teleport.png b/htspells/textures/throwing_arrow_teleport.png new file mode 100644 index 0000000000000000000000000000000000000000..f95d3e8b30b048c9a2705ed560b4e92f1f9e20bf GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPahoFES`;Q$)20)=uPZ!4!i_^&o z60FU_IrsMbv~PRx|3A-vPtyk0+0ROH#hTcDmaIv?5hQrx00=mBojt*j#=r~&!ph3b t${@V5?MKO)-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPahoFESUt>zw6rfP3r;B5V#p&b( z3Dzx)v(5AW`Ik5U`=5Rw;Pjyb2M%mlsx%?-^Ru)6w}-F@C7zMr;n>r|(^KG_z&4R9 zq0R6hOO4gF$vGU#%FN1VOhwu`zb2)N1jsWm%-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=BeG%-Ex}lN~6?UgGKN%6^AKP(aUYWttJl{6tR|#}JFt$q5T& z42%qWm=+y)c6RoE<-G2co#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=BeG%-Ex}lN~6?UgGKN%6^AKP(V*<^PXqrKp|UC7sn8b)5!@7 zWDJZ9dzcm-cy@O7|H%sHPIR1J@c+N$zvRHP9-D7Snza2%m(tm2Tya3*R6`HTkBG%0 au|VUO2o~A7iGKzf#Ng@b=d#Wzp$P!)%{(Fi literal 0 HcmV?d00001 diff --git a/htspells/textures/wand.png b/htspells/textures/wand.png new file mode 100644 index 0000000000000000000000000000000000000000..5ad7b4b4fb4dbf846cfdf6bb1e93d440e1926950 GIT binary patch literal 1312 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%nF$y5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8Mv>2~2MaLazx|v`++-@<%X&zK> z3U0R;;nb@Sbc{YIT9Kj|CIn17ASOJ~0y*$xpPC0u>qWpsef5R$Y6b?zX`U{QAr-fd zT(k9NHk4uepzbavzVgCC{d-sCYA;Unigt7nHxE4c{-H)w_ljl(E(WPOf<-Hi^(aK&IQa9hwNx*gK3)ysS$Rk7+`Ic1a?DQNx6%?m zpUSIpId#sx(2H4HPppX2;?{rStE2wOV&~cen{j|buRo9NK&e(qY$YWTuJ*ds?TPp`iE%hXpw?$zV-_k|x9vr8N@zWlhDRiN>_ zjDv_>FvG+jR~TI$2eVFS^p|OP%q~>$<^Ne5YyFLdb_v&yyI!kqbqx8wr)%z1_tZ6a z-gAUJNM`o1E#A-2ToGjSPro6nMuXw_chSdr4D9_{$99|jU)Ox-t}F*vd3nNvu#m3L c-?R@fM2Bj<{@xI|5L9M)y85}Sb4q9e0I##z<^TWy literal 0 HcmV?d00001 diff --git a/htspells/textures/wand2.png b/htspells/textures/wand2.png new file mode 100644 index 0000000000000000000000000000000000000000..da78464ec125f7d3cbfa791b9cb866054888b44e GIT binary patch literal 1489 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%nF$y5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8Mv>2~2MaLa!4}y`Y4UTL84#CABECEH%ZgC_h&L>|v`++-|YJX&zK> z3U0Sp;?%1Tbc{YIT9Kj|CIn17ASOJ~0y*$xpPC0u>qWps?fPXw3j+g_yQhm|NX4xq z*YA2y4wPa4@V-)JN!*boGoqJmw!9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jAi1N4~J*PrBE=s1PAL8f_Q*}v?S}MfSJa!wqE? z#KP$*pT8~~pd4YVlL$8vDiYRIgQ^fF3ec2*gAm=!@K{I<&+B61K5;FF!8}B0Qp5L? za#?IZ&ju(^CPSnIQjUOfRE8=`D=I2VfC51gIiirG3MpEFDHRxkfQ1JZqXkG0W;d7? zVu>d;>=OhIlgop_pe(4Au>r3fRjE`74TVA~BBXp9Bj6z^!xtqL3=~fU{G8xt8IVxK z-E6C%hQ&NH)mNqb(N9%RLG?tqxjV2XRrbWw>TmwtA(i9^kx#R<`VM%Vn z2s9@~Hc$coR*EzQSQ^Y1jQN+&MZ2Wl0+(Dm7u}LvxtNSRG1h;LIe8^|C$U{Lt$0|p zJ;jJ#4~V87?Rw%92uk_IY|uJG-?{&a$2FrhspmGQN3lqLPDcBANU^`=a3$VWyroTY zd~$AMyraPQcFzym=+L8Qr|c;^;@)kSKxR#T=is-F+;i#QoSs?H)?E{ z`)W9kxqafYZfM$ebNijm>sCX0NK$V`I7TfHeqdsfk# z@b28IJ&`rg1?kbZX6rU~g`_u5{-N1n_mLPltDMk+^vN&BCu6xE-_?w-L|zUP z9w~S;dqWgR9FNRRY3536UhVt(V#l*O+!Vg`*;;3;BeMKyI5tojDd^R{vSOG*8>R3| zcl-Cjv+){NR5H9gI&sEGkL|j=;k|=>wXuf>a|)a}PzC}$UpRmt&|e)({0PlPtKmc4 Hi=F=fldkac literal 0 HcmV?d00001 diff --git a/unlockcharm/depends.txt b/unlockcharm/depends.txt new file mode 100644 index 0000000..562cf63 --- /dev/null +++ b/unlockcharm/depends.txt @@ -0,0 +1 @@ +default diff --git a/unlockcharm/init.lua b/unlockcharm/init.lua new file mode 100644 index 0000000..9598b91 --- /dev/null +++ b/unlockcharm/init.lua @@ -0,0 +1,25 @@ +--[ +--PotterTest Mod Made by LandMine +--This subfolder of the mod contains all spells +--Licence: WTFPL +--] + +---Functions + + +-- Spells + +----3. Alohomora - Unlocks doors +minetest.register_tool("unlockcharm:alohomora", { + description = "Alohomora Spell", + inventory_image = "key.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2}, + snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1}, + choppy={times={[3]=0.70}, uses=40, maxlevel=0} + } + } +}) diff --git a/htspells/readme.txt b/unlockcharm/readme.txt similarity index 100% rename from htspells/readme.txt rename to unlockcharm/readme.txt diff --git a/htspells/textures/key.png b/unlockcharm/textures/key.png similarity index 100% rename from htspells/textures/key.png rename to unlockcharm/textures/key.png