Add ice demon.
This commit is contained in:
parent
d8c6550127
commit
ef9e69eb07
4 changed files with 121 additions and 17 deletions
10
abms.lua
10
abms.lua
|
@ -236,6 +236,16 @@ minetest.register_abm({
|
|||
-- creation
|
||||
------------------------------------------------------------
|
||||
|
||||
-- Freezing vapor hardens into ice.
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:freezing_vapor"},
|
||||
interval = fun_caves.time_factor,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
minetest.set_node(pos, {name = 'default:ice'})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "fun_caves:tree", 'fun_caves:ironwood', 'fun_caves:diamondwood' },
|
||||
neighbors = {'air'},
|
||||
|
|
101
demon.lua
Normal file
101
demon.lua
Normal file
|
@ -0,0 +1,101 @@
|
|||
|
||||
-- Ice Demon -- creates and moves ice nodes
|
||||
|
||||
local newnode = fun_caves.clone_node('default:ice')
|
||||
newnode.description = "Freezing vapor"
|
||||
newnode.tiles = {'fun_caves_wisp.png'}
|
||||
newnode.sunlight_propagates = true
|
||||
newnode.use_texture_alpha = true
|
||||
newnode.walkable = false
|
||||
newnode.buildable_to = true
|
||||
newnode.pointable = false
|
||||
minetest.register_node("fun_caves:freezing_vapor", newnode)
|
||||
|
||||
|
||||
mobs:register_mob("fun_caves:ice_demon", {
|
||||
description = "Ice Demon",
|
||||
type = "monster",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
--attack_type = "dogshoot",
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
hp_min = 10,
|
||||
hp_max = 20,
|
||||
armor = 50,
|
||||
collisionbox = {-0.30,-1.0,-0.30, 0.30,0.8,0.30},
|
||||
visual = "mesh",
|
||||
-- basic humanoid?
|
||||
mesh = "character.b3d",
|
||||
drawtype = "front",
|
||||
--------------------------
|
||||
-- replace this
|
||||
--------------------------
|
||||
textures = {
|
||||
{"fun_caves_goblin_ice2.png"},
|
||||
},
|
||||
--------------------------
|
||||
makes_footstep_sound = true,
|
||||
--sounds = {
|
||||
-- random = "goblins_goblin_ambient",
|
||||
-- warcry = "goblins_goblin_attack",
|
||||
-- attack = "goblins_goblin_attack",
|
||||
-- damage = "goblins_goblin_damage",
|
||||
-- death = "goblins_goblin_death",
|
||||
-- distance = 15,
|
||||
--},
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
jump = true,
|
||||
drops = nil,
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
--light_damage = 2,
|
||||
view_range = 15,
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 79,
|
||||
sit_start = 81,
|
||||
sit_end = 160,
|
||||
sleep_start = 162,
|
||||
sleep_end = 166,
|
||||
walk_start = 168,
|
||||
walk_end = 187,
|
||||
mine_start = 189,
|
||||
mine_end = 198,
|
||||
walkmine_start = 200,
|
||||
walkmine_end = 219,
|
||||
},
|
||||
animation_speed = 30,
|
||||
--fly = true,
|
||||
fly_in = 'fun_caves:freezing_vapor',
|
||||
do_custom = function(self)
|
||||
-- This has to happen fast.
|
||||
if self.attack then
|
||||
self.fly = true
|
||||
local pos = self.attack:getpos()
|
||||
pos.y = pos.y - 0
|
||||
fun_caves.search_replace(pos, 1, {'default:ice', 'air'}, 'fun_caves:freezing_vapor')
|
||||
end
|
||||
|
||||
if not fun_caves.custom_ready(self) then
|
||||
return
|
||||
end
|
||||
|
||||
if not self.attack then
|
||||
self.fly = false
|
||||
end
|
||||
|
||||
fun_caves.surface_damage(self, true)
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:spawn_specific("fun_caves:ice_demon", {"default:ice"}, nil, -1, 10, 300, 3000, 2, fun_caves.underzones['Caina'].lower_bound, fun_caves.underzones['Caina'].upper_bound)
|
||||
mobs:spawn_specific("fun_caves:ice_demon", {"default:ice"}, {'default:torch'}, -1, 20, 100, 300, 2, fun_caves.underzones['Caina'].lower_bound, fun_caves.underzones['Caina'].upper_bound)
|
||||
|
||||
-- Blizzard Demon -- storm that slows players
|
||||
|
||||
|
||||
-- Magma Demon -- creates lava under player (!)
|
||||
|
||||
|
2
init.lua
2
init.lua
|
@ -4,8 +4,8 @@ fun_caves.time_factor = 10 -- affects growth abms
|
|||
fun_caves.light_max = 8 -- light intensity for mushroom growth
|
||||
fun_caves.path = minetest.get_modpath(minetest.get_current_modname())
|
||||
fun_caves.world = minetest.get_worldpath()
|
||||
fun_caves.DEBUG = false -- for maintenance only
|
||||
fun_caves.elixir_armor = minetest.setting_getbool('fun_caves_use_armor_elixirs')
|
||||
fun_caves.DEBUG = false -- for maintenance only
|
||||
|
||||
|
||||
|
||||
|
|
25
mobs.lua
25
mobs.lua
|
@ -404,7 +404,7 @@ if minetest.registered_entities["kpgmobs:horse2"] then
|
|||
end
|
||||
|
||||
if minetest.registered_entities["dmobs:dragon"] then
|
||||
mobs:spawn_specific("dmobs:dragon", {"air"}, {"fun_caves:cloud", "fun_caves:storm_cloud"}, 20, 10, 300, 15000, 2, 4000, 31000)
|
||||
mobs:spawn_specific("dmobs:dragon", {"air"}, {"fun_caves:cloud", "fun_caves:storm_cloud"}, -1, 20, 300, 15000, 2, 4000, 31000)
|
||||
end
|
||||
|
||||
if minetest.registered_entities["kpgmobs:medved"] then
|
||||
|
@ -608,20 +608,11 @@ if minetest.registered_entities["mobs_monster:dirt_monster"] then
|
|||
end
|
||||
|
||||
if minetest.registered_entities["mobs_slimes:green_big"] then
|
||||
mobs:spawn_specific("mobs_slimes:green_big",
|
||||
{"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'},
|
||||
{"air"},
|
||||
4, 20, 30, 30000, 1, -31000, 31000
|
||||
mobs:spawn_specific("mobs_slimes:green_big", {"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'}, {"air"}, -1, 20, 30, 30000, 1, -31000, 31000
|
||||
)
|
||||
mobs:spawn_specific("mobs_slimes:green_medium",
|
||||
{"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'},
|
||||
{"air"},
|
||||
4, 20, 30, 30000, 2, -31000, 31000
|
||||
mobs:spawn_specific("mobs_slimes:green_medium", {"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'}, {"air"}, -1, 20, 30, 30000, 2, -31000, 31000
|
||||
)
|
||||
mobs:spawn_specific("mobs_slimes:green_small",
|
||||
{"default:dirt_with_grass", "default:junglegrass", "default:mossycobble", "ethereal:green_dirt_top", 'fun_caves:polluted_dirt'},
|
||||
{"air"},
|
||||
4, 20, 30, 30000, 3, -31000, 31000
|
||||
mobs:spawn_specific("mobs_slimes:green_small", {"default:dirt_with_grass", "default:junglegrass", "default:mossycobble", "ethereal:green_dirt_top", 'fun_caves:polluted_dirt'}, {"air"}, -1, 20, 30, 30000, 3, -31000, 31000
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -634,9 +625,9 @@ if minetest.registered_entities["mobs_creeper:creeper"] then
|
|||
end
|
||||
|
||||
if minetest.registered_entities["mobs_sharks:shark_lg"] then
|
||||
mobs:spawn_specific("mobs_sharks:shark_sm", {"default:water_source"}, nil, 5, 20, 30, 60000, 1, 8769, 8798)
|
||||
mobs:spawn_specific("mobs_sharks:shark_md", {"default:water_source"}, nil, 5, 20, 30, 60000, 1, 8769, 8798)
|
||||
mobs:spawn_specific("mobs_sharks:shark_lg", {"default:water_source"}, nil, 5, 20, 30, 60000, 1, 8769, 8798)
|
||||
mobs:spawn_specific("mobs_sharks:shark_sm", {"default:water_source"}, nil, -1, 20, 30, 60000, 1, 8769, 8798)
|
||||
mobs:spawn_specific("mobs_sharks:shark_md", {"default:water_source"}, nil, -1, 20, 30, 60000, 1, 8769, 8798)
|
||||
mobs:spawn_specific("mobs_sharks:shark_lg", {"default:water_source"}, nil, -1, 20, 30, 60000, 1, 8769, 8798)
|
||||
|
||||
local m = table.copy(minetest.registered_entities["mobs_sharks:shark_lg"])
|
||||
local l_spawn_in = {"default:water_flowing","default:water_source"}
|
||||
|
@ -660,6 +651,7 @@ end
|
|||
|
||||
dofile(fun_caves.path.."/zombie.lua")
|
||||
dofile(fun_caves.path.."/goblin.lua")
|
||||
dofile(fun_caves.path.."/demon.lua")
|
||||
|
||||
fun_caves.fortress_spawns = {}
|
||||
local t_mobs = {
|
||||
|
@ -672,6 +664,7 @@ local t_mobs = {
|
|||
"mobs_slimes:green_big",
|
||||
"mobs_slimes:green_medium",
|
||||
"mobs_slimes:green_small",
|
||||
'fun_caves:fire_fox',
|
||||
"fun_caves:goblin_cobble",
|
||||
"fun_caves:goblin_copper",
|
||||
"fun_caves:goblin_coal",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue