From 76e14fbc24bc92bdbdcd355142e4d3f476f6b0bb Mon Sep 17 00:00:00 2001 From: D00Med Date: Thu, 1 Sep 2016 18:04:48 +1000 Subject: [PATCH] pentagram changes and effect information --- depends.txt | 3 +- init.lua | 106 ++++++++++++++++++++++++++--- textures/witchcraft_candle.png | Bin 0 -> 303 bytes textures/witchcraft_candle_top.png | Bin 0 -> 683 bytes textures/witchcraft_penta.png | Bin 0 -> 414 bytes textures/witchcraft_pentablock.png | Bin 0 -> 438 bytes textures/witchcraft_portal.png | Bin 0 -> 5038 bytes 7 files changed, 97 insertions(+), 12 deletions(-) create mode 100644 textures/witchcraft_candle.png create mode 100644 textures/witchcraft_candle_top.png create mode 100644 textures/witchcraft_penta.png create mode 100644 textures/witchcraft_pentablock.png create mode 100644 textures/witchcraft_portal.png diff --git a/depends.txt b/depends.txt index 412c068..e7dc9be 100644 --- a/depends.txt +++ b/depends.txt @@ -7,4 +7,5 @@ lightning? pmobs? hud_hunger? moreplants? -playereffects? \ No newline at end of file +playereffects? +horror? \ No newline at end of file diff --git a/init.lua b/init.lua index 0b36551..757d9b4 100644 --- a/init.lua +++ b/init.lua @@ -1407,7 +1407,7 @@ playereffects.register_effect_type("potion_speed_lv1", "High speed", nil, {"spee function(effect, player) player:set_physics_override(1,nil,nil) end, - true + false ) playereffects.register_effect_type("potion_speed_lv2", "High speed", nil, {"speed"}, @@ -1418,7 +1418,7 @@ playereffects.register_effect_type("potion_speed_lv2", "High speed", nil, {"spee function(effect, player) player:set_physics_override(1,nil,nil) end, - true + false ) playereffects.register_effect_type("potion_jump_lvx", "High Jump", nil, {"jump"}, @@ -1429,7 +1429,7 @@ playereffects.register_effect_type("potion_jump_lvx", "High Jump", nil, {"jump"} function(effect, player) player:set_physics_override(nil,1,1) end, - true + false ) playereffects.register_effect_type("potion_antigrav_lvx", "Light weight", nil, {"gravity"}, @@ -1440,7 +1440,7 @@ playereffects.register_effect_type("potion_antigrav_lvx", "Light weight", nil, { function(effect, player) player:set_physics_override(nil,nil,1) end, - true + false ) playereffects.register_effect_type("potion_slow_lv1", "Low speed", nil, {"speed"}, @@ -1451,7 +1451,7 @@ playereffects.register_effect_type("potion_slow_lv1", "Low speed", nil, {"speed" function(effect, player) player:set_physics_override(1,nil,nil) end, - true + false ) playereffects.register_effect_type("potion_slow_lv2", "Low speed", nil, {"speed"}, @@ -1462,7 +1462,7 @@ playereffects.register_effect_type("potion_slow_lv2", "Low speed", nil, {"speed" function(effect, player) player:set_physics_override(1,nil,nil) end, - true + false ) playereffects.register_effect_type("potion_swim_lv1", "Fast Swim", nil, {"swim"}, @@ -1473,7 +1473,7 @@ playereffects.register_effect_type("potion_swim_lv1", "Fast Swim", nil, {"swim"} function(effect, player) player:set_physics_override(1,nil,nil) end, - true + false ) playereffects.register_effect_type("potion_swim_lv2", "Dive", nil, {"swim"}, @@ -1484,7 +1484,7 @@ playereffects.register_effect_type("potion_swim_lv2", "Dive", nil, {"swim"}, function(effect, player) player:set_physics_override(1,nil,1) end, - true + false ) @@ -3477,6 +3477,14 @@ minetest.register_node("witchcraft:mortar", { groups = {cracky=1, oddly_breakable_by_hand=1} }) +minetest.register_node("witchcraft:pentablock", { + description = "Pentagram block", + tiles = { + "witchcraft_pentablock.png", + }, + groups = {cracky=1, oddly_breakable_by_hand=1} +}) + minetest.register_node("witchcraft:pentagram", { description = "pentagram", drawtype = "signlike", @@ -3486,7 +3494,7 @@ minetest.register_node("witchcraft:pentagram", { use_texture_alpha = true, paramtype = "light", paramtype2 = "wallmounted", - sunlight_propagates = true, + sunlight_propagates = false, light_source = 50, walkable = false, is_ground_content = true, @@ -3495,13 +3503,89 @@ minetest.register_node("witchcraft:pentagram", { fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5} }, on_rightclick = function(pos, node, _) - if minetest.get_modpath("horror") and minetest.get_modpath("mobs") then - minetest.env:add_entity(pos, "horror:werewolf") + if minetest.get_modpath("mobs") then + minetest.after(0.5, function() + minetest.set_node(pos, {name="witchcraft:portal", param2=node.param2}) + minetest.add_particlespawner( + 25, --amount + 1, --time + {x=pos.x-1, y=pos.y, z=pos.z-1}, --minpos + {x=pos.x+1, y=pos.y, z=pos.z+1}, --maxpos + {x=-0, y=-0, z=-0}, --minvel + {x=0, y=0, z=0}, --maxvel + {x=-0.5,y=1,z=-0.5}, --minacc + {x=0.5,y=1,z=0.5}, --maxacc + 1, --minexptime + 1.5, --maxexptime + 1, --minsize + 2, --maxsize + false, --collisiondetection + "witchcraft_effect.png^[colorize:green:400" --texture + ) + end) end end, groups = {cracky=3,dig_immediate=3}, }) +minetest.register_node("witchcraft:portal", { + description = "portal", + drawtype = "signlike", + visual_scale = 3.0, + tiles = {"witchcraft_portal.png"}, + inventory_image = "witchcraft_portal.png", + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = false, + light_source = 50, + walkable = false, + is_ground_content = true, + selection_box = { + type = "wallmounted", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5} + }, + on_construct = function(pos, node, _) + minetest.after(1, function() + if minetest.get_modpath("horror") then + minetest.env:add_entity(pos, "horror:werewolf") + elseif minetest.get_modpath("dmobs") then + minetest.env:add_entity(pos, "dmobs:owl") + elseif minetest.get_modpath("mobs_animal") then + minetest.env:add_entity(pos, "mobs_animal:kitten") + elseif minetest.get_modpath("mobs_monster") then + minetest.env:add_entity(pos, "mobs_monster:oerkki") + elseif minetest.get_modpath("pmobs") then + minetest.env:add_entity(pos, "pmobs:wolf") + end + minetest.remove_node(pos) + end) + end, + groups = {cracky=3,dig_immediate=3, not_in_creative_inventory=1}, +}) + +minetest.register_node("witchcraft:candle", { + description = "red candle", + tiles = { + "witchcraft_candle_top.png", + "witchcraft_candle_top.png", + "witchcraft_candle.png", + "witchcraft_candle.png", + "witchcraft_candle.png", + "witchcraft_candle.png" + }, + drawtype = "nodebox", + paramtype = "light", + node_box = { + type = "fixed", + fixed = { + {-0.1875, -0.5, -0.1875, 0.1875, -0.0625, 0.1875}, -- NodeBox1 + {-0.03125, -0.5, -0.03125, 0.03125, 0.0625, 0.03125}, -- NodeBox2 + } + }, + groups = {fleshy=1, oddly_breakable_by_hand=1, dig_immediate=3}, +}) + --other stuff dofile(minetest.get_modpath("witchcraft").."/scrolls.lua") diff --git a/textures/witchcraft_candle.png b/textures/witchcraft_candle.png new file mode 100644 index 0000000000000000000000000000000000000000..616bfa545aae254fb697782a7aafe9dcb6151524 GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkQ1GFr zi(`nz>9>d4uy?nr{h#vPi9_+&+lS9hJT-9>oQfG1BpbX+H4)A);GD-TCp>rV`TOhdWl89C zG)}v^z`n89ZJ6T-G@yGywn+UUWPF literal 0 HcmV?d00001 diff --git a/textures/witchcraft_candle_top.png b/textures/witchcraft_candle_top.png new file mode 100644 index 0000000000000000000000000000000000000000..0a836431898f0e5bd0595d16ef4dccc6f20ef38b GIT binary patch literal 683 zcmV;c0#yBpP)<1AM<#i(>qG6u!UP{1#@G)RQ zCL*Hrc`3_JWBKlfzn6X8@D+K$){l%Y&LEKM4rGWsoyvPjCSH-X>$J$zdF_OOdgglq zBAg|Faq!TF!*?LtiUueS7I_l$1G0*pza09d7Y1~w2C!ou*dXEwpY^-bNhO=_tb)7x+MUjKNKlbwn^zOG`Jk zfUrTH%NdCxMs=&+kGOof0^w|sRZU>NtjRK@>W}=W$UZmTe*UJnAHV*S0XSZ|0$GTr zp4YPmQa8?bp3m%VRkLP~17nNzlVLg`h8fMtk|5_#C`EuEe_vanYA;4in(_^|`d|RBFA%&XkK$c0{E$cm_n~tdN_|T5Wo)x*#-U0O{r2T|C zA?}QX9~d1=zLqGG`YYH@VaQQE;)5J7A~3!)W2 zpgO6DlPGQ$w|)qPBF2AB@?MkII4DKb;H+o6hjY(8Tn_ws7(bD_t!ffTjrSY@P?)sH zJ0|-_*WdJ+pO%*wiv(fB`Sm>jjd}?`7y#AetBLqLv|H6=aefN#DMYFm#}+uYzz+sU z6|*omPP3p` z+Zg)!2k_F!kDl6Wr>>q{yjr82mrH0kWQjYH)u7^8f$<07*qo IM6N<$f)?kjG5`Po literal 0 HcmV?d00001 diff --git a/textures/witchcraft_pentablock.png b/textures/witchcraft_pentablock.png new file mode 100644 index 0000000000000000000000000000000000000000..68c18266eb836cd57eab21b2b66c5fd075111711 GIT binary patch literal 438 zcmV;n0ZIOeP))j z0ek}25dsN|UkSEAHh8mWi+$DjXP)QHJSRm_JopDvfcbom5Q5=w7!JQqF zA-2{&34{=AHk*ifwORpiI-MAg$Fyx5ozG^oR|W4cuh(k;s;Y_-q?7;{W1{^pfWcr8 zlB=qs>pJp050~;hM+kv2CJcLNpMkBH;3+pV)qNxB}uh*9ZzwmmSrs-|svgPfty! z)9^CDe!q`A;GDx+%XYhcR^XhYZCjEgL2Dhfmt{#=mH^asjn*3HTr|q`(-i8uMky8I zo`uu2Ptdk4i^YP&;eatFvh61$r9b`cEi0uAe?UsvOYBMT-uCcwJ|2$%OePc3G!3qe g2&}aqo%R>L0h6n$e?)$no&W#<07*qoM6N<$f?OZH9smFU literal 0 HcmV?d00001 diff --git a/textures/witchcraft_portal.png b/textures/witchcraft_portal.png new file mode 100644 index 0000000000000000000000000000000000000000..9da602604278828115005190284d8a2cfc85bfa5 GIT binary patch literal 5038 zcmV;f6H)AmP)pYU`a$lR9M5MnOlq`*L~i9=Tg;OUDem=p4;y1jZ5xw!>eXZ8k8;B z0qi^oroaOalI_KnJDUfnvIZ{5LP*pDjtpEy|d`L@AHViAX2_}r|w-(%AhnZ@eqCqXDZ}3YZr4mO-qnC zY$}OEN9qGrL#!3C%7}H&sJ%z_$!!dPb9jThRCjzj-;;E%X&SqlAdxInN1Q08u@}t{ z>r0$jf}bHw0XSTJi693IqU$tnTjB7buRtkK5~nmI9{455YM=sKR)MSjur3CCPNg@n-A!uJ$oV($1elFQ6Lr^n}La@rRGy)NU zHWpEKaWKzg28ui`cb2$d0URNQ;I@rMpm14j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