23 Commits

Author SHA1 Message Date
592c4aca50 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-06-20 15:39:41 +02:00
4477466120 tidy on_die function, add sounds 2020-06-19 20:44:52 +01:00
abae5bada4 add obsidian flan 2020-06-19 20:26:21 +01:00
4f135de146 spider has new jump attack 2020-06-19 16:07:55 +01:00
b6591fa9a7 tweak spider climbing feature 2020-05-23 14:56:00 +01:00
55d3d4b547 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-05-09 14:24:36 +02:00
674afa91e5 nil check for player when using lava pick 2020-05-08 20:40:08 +01:00
2fdfd7f84c deinterlaced lava flan image 2020-04-23 20:05:55 +01:00
ded074939a fix lava flan textures to remove annoying interlace handling errors 2020-04-23 08:51:38 +01:00
ffc136296e add sanity check to spiders 2020-04-11 17:56:51 +01:00
33a314934a spiders now spawn on ethereal's cold dirt 2020-04-07 09:22:37 +01:00
5674b6328e Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-02-29 18:08:15 +01:00
2663922651 chinese local added (thanks IFRFSX) 2020-02-14 11:24:22 +00:00
cd5909697b lava flan glow in dark 2020-01-09 09:42:49 +00:00
3ddd27e515 Merge branch 'master' of yunohost.local:mtcontrib/mobs_monster into nalc-1.2-dev 2019-12-22 13:58:23 +01:00
e6d4b185b3 code tidy ' to " 2019-08-05 09:52:25 +01:00
822450e2c7 add pickaxe group to lava pick 2019-06-03 10:02:26 +01:00
133766d0ab Merge branch 'master' into nalc-1.2 2019-05-10 00:58:32 +02:00
947adeeb79 update license.txt 2019-04-18 14:31:46 +01:00
6cf5b95fc9 lava pick heals lava flan when hit, increased water damage 2019-02-23 10:36:37 +00:00
86e5f4ed09 tweaked tool damage for sand, stone and tree monsters 2019-02-11 09:27:22 +00:00
eeb6a8e138 added mobs:force_capture() example to sand monster 2018-12-20 11:14:52 +00:00
d6420071ab add do_custom function so that spiders can climb walls 2018-11-29 12:15:56 +00:00
14 changed files with 402 additions and 31 deletions

View File

@ -31,4 +31,4 @@ dofile(path .. "/minotaur.lua") -- NALC(sys4 fork MFF) Kalabasa
dofile(path .. "/lucky_block.lua")
print ("[MOD] Mobs Redo 'Monsters' loaded")
print ("[MOD] Mobs Redo Monsters loaded")

View File

@ -35,9 +35,12 @@ mobs:register_mob("mobs_monster:lava_flan", {
drops = {
{name = "mobs:lava_orb", chance = 15, min = 1, max = 1},
},
water_damage = 5,
water_damage = 8,
lava_damage = 0,
light_damage = 0,
immune_to = {
{"mobs:pick_lava", -2}, -- lava pick heals 2 health
},
animation = {
speed_normal = 15,
speed_run = 15,
@ -52,28 +55,62 @@ mobs:register_mob("mobs_monster:lava_flan", {
},
on_die = function(self, pos)
if minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name = "fire:basic_flame"})
local cod = self.cause_of_death or {}
local def = cod.node and minetest.registered_nodes[cod.node]
if def and def.groups and def.groups.water then
pos.y = pos.y + 1
minetest.add_particlespawner({
amount = 40,
time = 0.25,
minpos = pos,
maxpos = pos,
minvel = {x = -2, y = 0, z = -2},
maxvel = {x = 2, y = 2, z = 2},
minacc = {x = 0, y = 0, z = 0},
maxacc = {x = 0, y = 10, z = 0},
minexptime = 0.1,
maxexptime = 1,
minsize = 3.0,
maxsize = 5.0,
texture = "tnt_smoke.png",
})
minetest.sound_play("fire_extinguish_flame",
{pos = pos, max_hear_distance = 12, gain = 1.5}, true)
self.object:remove()
if math.random(4) == 1 then
minetest.add_entity(pos, "mobs_monster:obsidian_flan")
end
else
if minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name = "fire:basic_flame"})
end
minetest.add_particlespawner({
amount = 20,
time = 0.25,
minpos = pos,
maxpos = pos,
minvel = {x = -2, y = -2, z = -2},
maxvel = {x = 2, y = 2, z = 2},
minacc = {x = 0, y = -10, z = 0},
maxacc = {x = 0, y = -10, z = 0},
minexptime = 0.1,
maxexptime = 1,
minsize = 1.0,
maxsize = 2.0,
texture = "fire_basic_flame.png",
})
self.object:remove()
end
self.object:remove()
minetest.add_particlespawner({
amount = 20,
time = 0.25,
minpos = pos,
maxpos = pos,
minvel = {x = -2, y = -2, z = -2},
maxvel = {x = 2, y = 2, z = 2},
minacc = {x = 0, y = -10, z = 0},
maxacc = {x = 0, y = -10, z = 0},
minexptime = 0.1,
maxexptime = 1,
minsize = 1.0,
maxsize = 2.0,
texture = "fire_basic_flame.png",
})
end,
glow = 10,
})
@ -112,6 +149,9 @@ local old_handle_node_drops = minetest.handle_node_drops
function minetest.handle_node_drops(pos, drops, digger)
-- does player exist?
if not digger then return end
-- are we holding Lava Pick?
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
return old_handle_node_drops(pos, drops, digger)
@ -159,8 +199,9 @@ minetest.register_tool(":mobs:pick_lava", {
groupcaps={
cracky = {times={[1]=1.80, [2]=0.80, [3]=0.40}, uses=40, maxlevel=3},
},
damage_groups = {fleshy=6,fire=1},
damage_groups = {fleshy = 6, fire = 1},
},
groups = {pickaxe = 1}
})
minetest.register_craft({
@ -180,3 +221,133 @@ minetest.override_item("mobs:pick_lava", {
description = toolranks.create_description("Lava Pickaxe", 0, 1),
after_use = toolranks.new_afteruse})
end
-- obsidian flan
mobs:register_mob("mobs_monster:obsidian_flan", {
type = "monster",
passive = false,
attack_type = "shoot",
shoot_interval = 0.5,
shoot_offset = 1.0,
arrow = "mobs_monster:obsidian_arrow",
reach = 2,
damage = 3,
hp_min = 10,
hp_max = 35,
armor = 30,
visual_size = {x = 0.6, y = 0.6},
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "zmobs_lava_flan.x",
textures = {
{"mobs_obsidian_flan.png"},
},
blood_texture = "default_obsidian.png",
makes_footstep_sound = true,
sounds = {
random = "mobs_lavaflan",
-- war_cry = "mobs_lavaflan",
},
walk_velocity = 0.1,
run_velocity = 0.5,
jump = false,
view_range = 10,
floats = 0,
drops = {
{name = "default:obsidian_shard", chance = 1, min = 1, max = 5},
},
water_damage = 0,
lava_damage = 0,
light_damage = 0,
animation = {
speed_normal = 15,
speed_run = 15,
stand_start = 0,
stand_end = 8,
walk_start = 10,
walk_end = 18,
run_start = 20,
run_end = 28,
punch_start = 20,
punch_end = 28,
}
})
mobs:register_egg("mobs_monster:obsidian_flan", S("Obsidian Flan"),
"default_obsidian.png", 1)
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
-- mese arrow (weapon)
mobs:register_arrow("mobs_monster:obsidian_arrow", {
visual = "sprite",
-- visual = "wielditem",
visual_size = {x = 0.5, y = 0.5},
textures = {"default_obsidian_shard.png"},
velocity = 6,
-- rotate = 180,
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
}, nil)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
}, nil)
end,
hit_node = function(self, pos, node)
if mobs_griefing == false or minetest.is_protected(pos, "") then
return
end
local texture = "default_dirt.png" --fallback texture
local radius = 1
local def = minetest.registered_nodes[node]
if def then
node = { name = node }
end
if def and def.tiles and def.tiles[1] then
texture = def.tiles[1]
end
if def.groups and def.groups.level == 2 then
return
end
minetest.add_particlespawner({
amount = 32,
time = 0.1,
minpos = vector.subtract(pos, radius / 2),
maxpos = vector.add(pos, radius / 2),
minvel = {x = -3, y = 0, z = -3},
maxvel = {x = 3, y = 5, z = 3},
minacc = {x = 0, y = -10, z = 0},
maxacc = {x = 0, y = -10, z = 0},
minexptime = 0.8,
maxexptime = 2.0,
minsize = radius * 0.33,
maxsize = radius,
texture = texture,
-- ^ only as fallback for clients without support for `node` parameter
node = node,
collisiondetection = true,
})
minetest.set_node(pos, {name = "air"})
local snd = def.sounds and def.sounds.dug or "default_dig_crumbly"
minetest.sound_play(snd, {pos = pos, max_hear_distance = 12, gain = 1.0}, true)
end
})

View File

@ -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,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
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

35
locale/zh_CN.txt Normal file
View File

@ -0,0 +1,35 @@
# Template for translations of mobs_monster mod
# last update: 2016/June/10
#dirtmonster.lua
Dirt Monster = 泥土怪
#dungeonmaster.lua
Dungeon Master = 地穴之主
#init.lua
[MOD] Mobs Redo 'Monsters' loaded = [模组] Mobs Redo 'Monsters' 已加载
#lava_flan.lua
Lava Flan = 岩浆饼
Lava orb = 岩浆球
Lava Pickaxe = 岩浆镐
#mese_monster.lua
Mese Monster = 黄石怪
#oerkki.lua
Oerkki = 奥尔基
#sandmonster.lua
Sand Monster = 沙怪
#spider.lua
Spider = 蜘蛛
Cobweb = 蜘蛛网
#stonemonster.lua
Stone Monster = 石头怪
#treemonster.lua
Tree Monster = 树怪

35
locale/zh_TW.txt Normal file
View File

@ -0,0 +1,35 @@
# Template for translations of mobs_monster mod
# last update: 2016/June/10
#dirtmonster.lua
Dirt Monster = 泥土怪
#dungeonmaster.lua
Dungeon Master = 地穴之主
#init.lua
[MOD] Mobs Redo 'Monsters' loaded = [模組] Mobs Redo 'Monsters' 已加載
#lava_flan.lua
Lava Flan = 岩漿餅
Lava orb = 岩漿球
Lava Pickaxe = 岩漿鎬
#mese_monster.lua
Mese Monster = 黃石怪
#oerkki.lua
Oerkki = 奧爾基
#sandmonster.lua
Sand Monster = 沙怪
#spider.lua
Spider = 蜘蛛
Cobweb = 蜘蛛網
#stonemonster.lua
Stone Monster = 石頭怪
#treemonster.lua
Tree Monster = 樹怪

View File

@ -11,7 +11,7 @@ Dungeon Master
Lava Flan
- Cute as they may look lava flan wallow in their namesake (no, not flans) and get curious about players who wander by, forgetting that they can burn you and cause damage. They have a 1 in 5 chance of dropping lava orb when killed.
- Cute as they may look lava flan wallow in their namesake (no, not flans) and get curious about players who wander by, forgetting that they can burn you and cause damage. They have a 1 in 5 chance of dropping lava orb when killed, but if they die in water then pray they dont solidify into an obsidian flan that shoots shards and destroys all around them.
Mese Monster

View File

@ -3,7 +3,8 @@ local S = mobs.intllib
-- custom particle effects
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
local effect = function(
pos, amount, texture, min_size, max_size, radius, gravity, glow)
radius = radius or 2
min_size = min_size or 0.5
@ -79,6 +80,14 @@ mobs:register_mob("mobs_monster:sand_monster", {
punch_start = 74,
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)
local pos = self.object:get_pos()
@ -91,6 +100,21 @@ mobs:register_mob("mobs_monster:sand_monster", {
pos.y = pos.y + 0.25
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
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,
]]
})

View File

@ -1,6 +1,15 @@
local S = mobs.intllib
local get_velocity = function(self)
local v = self.object:get_velocity()
-- sanity check
if not v then return 0 end
return (v.x * v.x + v.z * v.z) ^ 0.5
end
-- Spider by AspireMint (CC-BY-SA 3.0 license)
@ -95,6 +104,78 @@ mobs:register_mob("mobs_monster:spider", {
return true -- run only once, false/nil runs every activation
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.5 then
self.disable_falling = nil
return
end
local pos = self.object:get_pos()
local yaw = self.object:get_yaw()
-- sanity check
if not yaw then return end
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.x = 0 ; v.y = 0
v.y = self.jump_height
mobs:set_animation(self, "jump")
self.object:set_velocity(v)
end,
-- make spiders jump at you on attack
custom_attack = function(self, pos)
local vel = self.object:get_velocity()
self.object:set_velocity({
x = vel.x * self.run_velocity,
y = self.jump_height * 1.5,
z = vel.z * self.run_velocity
})
self.pausetimer = 0.5
return true -- continue rest of attack function
end
})
@ -103,7 +184,7 @@ mobs:spawn({
name = "mobs_monster:spider",
nodes = {
"default:dirt_with_rainforest_litter", "default:snowblock",
"default:snow", "ethereal:crystal_dirt"
"default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
},
min_light = 0,
max_light = 8,

View File

@ -53,6 +53,14 @@ mobs:register_mob("mobs_monster:stone_monster", {
punch_start = 40,
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},
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -43,11 +43,17 @@ mobs:register_mob("mobs_monster:tree_monster", {
lava_damage = 0,
light_damage = 2,
fall_damage = 0,
-- immune_to = {
-- {"default:axe_diamond", 5},
-- {"default:sapling", -5}, -- saplings heal
-- {"all", 0},
-- },
immune_to = {
{"default:axe_wood", 0}, -- wooden axe doesnt hurt wooden monster
{"default:axe_stone", 4}, -- axes deal more damage to tree monster
{"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 = {
speed_normal = 15,
speed_run = 15,