Merge branch 'master' into nalc-1.2

This commit is contained in:
2019-05-10 00:58:32 +02:00
6 changed files with 114 additions and 6 deletions

@ -35,9 +35,12 @@ mobs:register_mob("mobs_monster:lava_flan", {
drops = { drops = {
{name = "mobs:lava_orb", chance = 15, min = 1, max = 1}, {name = "mobs:lava_orb", chance = 15, min = 1, max = 1},
}, },
water_damage = 5, water_damage = 8,
lava_damage = 0, lava_damage = 0,
light_damage = 0, light_damage = 0,
immune_to = {
{"mobs:pick_lava", -2}, -- lava pick heals 2 health
},
animation = { animation = {
speed_normal = 15, speed_normal = 15,
speed_run = 15, speed_run = 15,

@ -19,3 +19,14 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
mobs.fireball.png was originally made by Sapier and edited by Benrob:
-- Animals Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allow to pretend you have written it.
--
-- (c) Sapier
-- Contact sapier a t gmx net

@ -79,6 +79,14 @@ mobs:register_mob("mobs_monster:sand_monster", {
punch_start = 74, punch_start = 74,
punch_end = 105, punch_end = 105,
}, },
immune_to = {
{"default:shovel_wood", 3}, -- shovels deal more damage to sand monster
{"default:shovel_stone", 3},
{"default:shovel_bronze", 4},
{"default:shovel_steel", 4},
{"default:shovel_mese", 5},
{"default:shovel_diamond", 7},
},
--[[ --[[
custom_attack = function(self, p) custom_attack = function(self, p)
local pos = self.object:get_pos() local pos = self.object:get_pos()
@ -91,6 +99,21 @@ mobs:register_mob("mobs_monster:sand_monster", {
pos.y = pos.y + 0.25 pos.y = pos.y + 0.25
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5) effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
end, end,
--[[
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
local name = clicker:get_player_name()
if tool:get_name() == "default:sand" then
self.owner = name
self.type = "npc"
mobs:force_capture(self, clicker)
end
end,
]]
}) })

@ -1,6 +1,12 @@
local S = mobs.intllib local S = mobs.intllib
local get_velocity = function(self)
local v = self.object:get_velocity()
return (v.x * v.x + v.z * v.z) ^ 0.5
end
-- Spider by AspireMint (CC-BY-SA 3.0 license) -- Spider by AspireMint (CC-BY-SA 3.0 license)
@ -95,6 +101,57 @@ mobs:register_mob("mobs_monster:spider", {
return true -- run only once, false/nil runs every activation return true -- run only once, false/nil runs every activation
end, end,
-- custom function to make spiders climb vertical facings
do_custom = function(self, dtime)
-- quarter second timer
self.spider_timer = (self.spider_timer or 0) + dtime
if self.spider_timer < 0.25 then
return
end
self.spider_timer = 0
-- need to be stopped to go onwards
if get_velocity(self) > 0.2 then
self.disable_falling = false
return
end
local pos = self.object:get_pos()
local yaw = self.object:get_yaw()
pos.y = pos.y + self.collisionbox[2] - 0.2
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)
local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)
local nod = minetest.get_node_or_nil({
x = pos.x + dir_x,
y = pos.y + 0.5,
z = pos.z + dir_z
})
-- get current velocity
local v = self.object:get_velocity()
-- can only climb solid facings
if not nod or not minetest.registered_nodes[nod.name]
or not minetest.registered_nodes[nod.name].walkable then
self.disable_falling = nil
v.y = 0
self.object:set_velocity(v)
return
end
--print ("----", nod.name, self.disable_falling, dtime)
-- turn off falling if attached to facing
self.disable_falling = true
-- move up facing
v.y = self.jump_height
mobs:set_animation(self, "jump")
self.object:set_velocity(v)
end
}) })

@ -53,6 +53,14 @@ mobs:register_mob("mobs_monster:stone_monster", {
punch_start = 40, punch_start = 40,
punch_end = 63, punch_end = 63,
}, },
immune_to = {
{"default:pick_wood", 0}, -- wooden pick doesnt hurt stone monster
{"default:pick_stone", 4}, -- picks deal more damage to stone monster
{"default:pick_bronze", 5},
{"default:pick_steel", 5},
{"default:pick_mese", 6},
{"default:pick_diamond", 7},
},
}) })

@ -43,11 +43,17 @@ mobs:register_mob("mobs_monster:tree_monster", {
lava_damage = 0, lava_damage = 0,
light_damage = 2, light_damage = 2,
fall_damage = 0, fall_damage = 0,
-- immune_to = { immune_to = {
-- {"default:axe_diamond", 5}, {"default:axe_wood", 0}, -- wooden axe doesnt hurt wooden monster
-- {"default:sapling", -5}, -- saplings heal {"default:axe_stone", 4}, -- axes deal more damage to tree monster
-- {"all", 0}, {"default:axe_bronze", 5},
-- }, {"default:axe_steel", 5},
{"default:axe_mese", 7},
{"default:axe_diamond", 9},
{"default:sapling", -5}, -- default and jungle saplings heal
{"default:junglesapling", -5},
-- {"all", 0}, -- only weapons on list deal damage
},
animation = { animation = {
speed_normal = 15, speed_normal = 15,
speed_run = 15, speed_run = 15,