Compare commits
23 Commits
nalc-1.0
...
nalc-1.2.0
Author | SHA1 | Date | |
---|---|---|---|
592c4aca50 | |||
4477466120 | |||
abae5bada4 | |||
4f135de146 | |||
b6591fa9a7 | |||
55d3d4b547 | |||
674afa91e5 | |||
2fdfd7f84c | |||
ded074939a | |||
ffc136296e | |||
33a314934a | |||
5674b6328e | |||
2663922651 | |||
cd5909697b | |||
3ddd27e515 | |||
e6d4b185b3 | |||
822450e2c7 | |||
133766d0ab | |||
947adeeb79 | |||
6cf5b95fc9 | |||
86e5f4ed09 | |||
eeb6a8e138 | |||
d6420071ab |
2
init.lua
@ -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")
|
||||
|
215
lava_flan.lua
@ -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
|
||||
})
|
||||
|
11
license.txt
@ -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
@ -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
@ -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 = 樹怪
|
@ -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
|
||||
|
||||
|
@ -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,
|
||||
]]
|
||||
})
|
||||
|
||||
|
||||
|
83
spider.lua
@ -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,
|
||||
|
@ -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},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
BIN
textures/mobs_obsidian_flan.png
Normal file
After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@ -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,
|
||||
|