Drench spell added

master
francisco athens 2020-07-31 23:19:33 -07:00
parent 3cf86cf515
commit dff940843a
4 changed files with 46 additions and 3 deletions

View File

@ -76,7 +76,18 @@ Witches inhabit the land! They are currently in development but, can already:
(https://github.com/Sokomine/basic_houses) mod under MIT license
with permission from author.
* Sound files - see file metadata for artist information!
* Sound files:
witches_magic01.ogg MATRIXXX_ December 28th, 2018 CC-BY 3.0
https://freesound.org/people/MATRIXXX_/sounds/455205/
witches_magic02.ogg RICHERlandTV January 28th, 2014 CC-BY 3.0
https://freesound.org/people/RICHERlandTV/sounds/216089/
witches_sheep.ogg - zachrau March 6th, 2017 CC0
https://freesound.org/people/zachrau/sounds/383144/
witches_water.ogg - InspectorJ March 10th, 2018 CC BY 3.0
https://freesound.org/people/InspectorJ/sounds/421184/
Thanks to TenPlus1 for keeping the Mobs_Redo going!
Thanks to rubenwardy for awesome help and the Minetest ContentDB

View File

@ -267,16 +267,20 @@ local witch_template = { --your average witch,
witches.magic.teleport(self,objs[n],math.random(3,8),math.random(2,4))
else
if math.random() < 0.3 then
if math.random() < 0.2 then
witches.magic.teleport(self,objs[n],math.random(3,5),math.random(2,4))
witches.magic.polymorph(self,objs[n])
elseif math.random() <.5 then
witches.magic.teleport(self,objs[n],math.random(3,5),math.random(1,2))
witches.magic.splash(self,objs[n],{x=2,y=2,z=2},math.random(0,1))
-- witches.magic.splash(self,target,volume,height,node)
else
witches.magic.teleport(self,objs[n],math.random(3,8),math.random(2,4))
end
end
-- witches.magic.teleport(self,objs[n],math.random(3,8),math.random(2,4))
end
end

View File

@ -171,4 +171,32 @@ function witches.magic.polymorph(self, target, mob, duration)
--local new_ent = new_obj:get_luaentity()
--new_ent.old_mob_name = ent.name
end
--volume is a vector!
function witches.magic.splash(self,target,volume,height,node)
volume = volume or {x=3,y=3,z=3}
height = height or 0
node = node or "default:water_flowing"
local caster_pos = self.object:get_pos()
local ent = target:get_luaentity()
local ent_pos = ent.object:get_pos()
local ent_pos_yoff = vector.add(ent_pos,{x=0,y=height,z=0})
local vol = pos_to_vol(ent_pos_yoff,volume)
local air_nodes = minetest.find_nodes_in_area(vol[1],vol[2], {"air"})
if air_nodes then
for i=1, #air_nodes do
minetest.add_node(air_nodes[i], {name=node})
witches.magic.effect_area01(vol[1],vol[2],100)
--print(node.." "..minetest.pos_to_string(air_nodes[i]))
--minetest.spawn_falling_node(i)
end
end
end

BIN
sounds/witches_water.ogg Normal file

Binary file not shown.