ghost taming and skeletons
>added skeleton >added ghost ring, which can make a ghost friendly
This commit is contained in:
parent
00fea9634f
commit
05eb3ff20b
62
init.lua
62
init.lua
@ -473,9 +473,12 @@ minetest.register_abm({
|
||||
nodenames = {"horror:clock"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(...)
|
||||
action = function(pos, node)
|
||||
minetest.sound_play("clock",
|
||||
{gain = 3, max_hear_distance = 1, loop = false})
|
||||
local meta = minetest.get_meta(pos)
|
||||
local time1 = minetest.get_timeofday()*24000
|
||||
meta:set_string("infotext", "time:"..time1)
|
||||
end
|
||||
})
|
||||
|
||||
@ -513,8 +516,47 @@ minetest.register_abm({
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"horror:cactus"},
|
||||
interval = 10,
|
||||
chance = 150,
|
||||
action = function(pos, node)
|
||||
local num = math.random(1,4)
|
||||
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" or minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "horror:cactus" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="horror:cactus"})
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
if num == 1 then
|
||||
if minetest.get_node({x=pos.x-2, y=pos.y, z=pos.z}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x-2, y=pos.y, z=pos.z}, {name="horror:cactus"})
|
||||
end
|
||||
elseif num == 2 then
|
||||
if minetest.get_node({x=pos.x+2, y=pos.y, z=pos.z}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x+2, y=pos.y, z=pos.z}, {name="horror:cactus"})
|
||||
end
|
||||
elseif num == 3 then
|
||||
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-2}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z-2}, {name="horror:cactus"})
|
||||
end
|
||||
elseif num == 4 then
|
||||
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+2}).name == "air" then
|
||||
minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z+2}, {name="horror:cactus"})
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
--nodes
|
||||
|
||||
minetest.register_node("horror:bookshelf", {
|
||||
description = "Bookshelf (fake)",
|
||||
tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
drop = "default:bookshelf",
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("horror:gargoyle2", {
|
||||
description = "Small gargoyle",
|
||||
@ -1173,7 +1215,7 @@ minetest.register_node("horror:clock", {
|
||||
{-0.3125, 0.25, -0.1875, 0.3125, 0.5, 0.1875}, -- NodeBox2
|
||||
{-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125}, -- NodeBox3
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("horror:knife", {
|
||||
@ -1334,7 +1376,7 @@ minetest.register_node("horror:cactus", {
|
||||
inventory_image = "horror_cactus.png",
|
||||
visual_scale = 2,
|
||||
wield_scale = {x=0.5, y=0.5, z=0.5},
|
||||
groups = {choppy=1, oddly_breakable_by_hand=1, flammable=1, attatched_node=1},
|
||||
groups = {choppy=1, oddly_breakable_by_hand=1, flammable=1, falling_node=1},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 1, 0.5}
|
||||
@ -1784,6 +1826,13 @@ minetest.register_tool("horror:pitchfork", {
|
||||
},
|
||||
})
|
||||
|
||||
--craftitems
|
||||
|
||||
minetest.register_craftitem("horror:ring", {
|
||||
description = "Ghosts Ring",
|
||||
inventory_image = "horror_ring.png"
|
||||
})
|
||||
|
||||
--crafting
|
||||
minetest.register_craft({
|
||||
output = 'horror:lantern',
|
||||
@ -1819,6 +1868,13 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'horror:bookshelf',
|
||||
recipe = {
|
||||
{'default:bookshelf'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'horror:cleaver',
|
||||
recipe = {
|
||||
|
120
mobs.lua
120
mobs.lua
@ -392,7 +392,7 @@ mobs:register_mob("horror:ghost", {
|
||||
hp_min = 32,
|
||||
hp_max = 42,
|
||||
armor = 130,
|
||||
collisionbox = {-0.4, 0, -0.5, 0.5, 1.5, 0.5},
|
||||
collisionbox = {-0.4, 0, -0.5, 0.5, 2.5, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "ghost.b3d",
|
||||
textures = {
|
||||
@ -400,7 +400,7 @@ mobs:register_mob("horror:ghost", {
|
||||
},
|
||||
blood_amount = 60,
|
||||
blood_texture = "horror_blood_effect.png",
|
||||
visual_size = {x=4, y=4.6},
|
||||
visual_size = {x=3, y=3.6},
|
||||
makes_footstep_sound = false,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2.1,
|
||||
@ -412,6 +412,23 @@ mobs:register_mob("horror:ghost", {
|
||||
drops = {
|
||||
{name = "farming:cotton", chance = 10, min = 1, max = 1},
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
local item = clicker:get_wielded_item():get_name()
|
||||
if item == "horror:ring" then
|
||||
pos = self.object:getpos()
|
||||
local obj = minetest.env:add_entity(pos, "horror:ghost_friendly")
|
||||
local ghost = obj:get_luaentity()
|
||||
ghost.tamed = true
|
||||
ghost.owner = clicker
|
||||
self.object:remove()
|
||||
end
|
||||
end,
|
||||
do_custom = function(self)
|
||||
if math.random(1, 5000) == 1 then
|
||||
local pos = self.object:getpos()
|
||||
minetest.add_item(pos, "horror:ring")
|
||||
end
|
||||
end,
|
||||
water_damage = 2,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
@ -431,10 +448,105 @@ mobs:register_mob("horror:ghost", {
|
||||
},
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:ghost", {"default:snowblock","default:sand"}, 20, 0, 15000, 2, 31000)
|
||||
mobs:register_mob("horror:ghost_friendly", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
attacks_monsters = true,
|
||||
reach = 2,
|
||||
damage = 2,
|
||||
attack_type = "dogfight",
|
||||
hp_min = 32,
|
||||
hp_max = 42,
|
||||
armor = 130,
|
||||
collisionbox = {-0.4, 0, -0.5, 0.5, 1.5, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "ghost.b3d",
|
||||
textures = {
|
||||
{"horror_ghost.png"},
|
||||
},
|
||||
blood_amount = 60,
|
||||
blood_texture = "horror_blood_effect.png",
|
||||
visual_size = {x=2, y=2.6},
|
||||
makes_footstep_sound = false,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2.1,
|
||||
sounds = {
|
||||
random = "mobs_oerkki",
|
||||
attack = "mobs_oerkki",
|
||||
},
|
||||
follow = "horror:ring",
|
||||
jump = true,
|
||||
water_damage = 2,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
view_range = 15,
|
||||
animation = {
|
||||
speed_normal = 10,
|
||||
speed_run = 15,
|
||||
walk_start = 1,
|
||||
walk_end = 20,
|
||||
run_start = 30,
|
||||
run_end = 50,
|
||||
stand_start = 1,
|
||||
stand_end = 2,
|
||||
punch_start = 50,
|
||||
punch_end = 70,
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:ghost", {"default:snowblock","default:sand", "default:dirt_with_snow"}, 20, 0, 15000, 2, 31000)
|
||||
|
||||
mobs:register_egg("horror:ghost", "Ghost", "default_snow.png", 1)
|
||||
|
||||
|
||||
mobs:register_mob("horror:skeleton", {
|
||||
type = "monster",
|
||||
reach = 3,
|
||||
damage = 2,
|
||||
attack_type = "dogfight",
|
||||
hp_min = 62,
|
||||
hp_max = 72,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, 0, -0.4, 0.4, 2.5, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "skeleton.b3d",
|
||||
textures = {
|
||||
{"horror_skeleton.png"},
|
||||
},
|
||||
blood_texture = "default_stone.png",
|
||||
visual_size = {x=1, y=1},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2.5,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "bones:bones", chance = 5, min = 3, max = 6},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 1,
|
||||
fall_damage = 0,
|
||||
fear_height = 10,
|
||||
view_range = 14,
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 20,
|
||||
walk_start = 46,
|
||||
walk_end = 66,
|
||||
stand_start = 1,
|
||||
stand_end = 20,
|
||||
run_start = 46,
|
||||
run_end = 66,
|
||||
punch_start = 20,
|
||||
punch_end = 45,
|
||||
},
|
||||
})
|
||||
|
||||
mobs:register_spawn("horror:skeleton", {"default:stone"}, 7, 0, 16000, 2, 31000)
|
||||
|
||||
mobs:register_egg("horror:skeleton", "Skeleton", "default_dirt.png", 1)
|
||||
|
||||
mobs:register_mob("horror:cyberdemon", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
@ -641,7 +753,7 @@ mobs:register_mob("horror:cacodemon", {
|
||||
},
|
||||
blood_amount = 80,
|
||||
blood_texture = "horror_plasma.png",
|
||||
visual_size = {x=3, y=3},
|
||||
visual_size = {x=2, y=2},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 3,
|
||||
run_velocity = 5,
|
||||
|
BIN
models/horror_skeleton.png
Normal file
BIN
models/horror_skeleton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 KiB |
BIN
models/skeleton.b3d
Normal file
BIN
models/skeleton.b3d
Normal file
Binary file not shown.
BIN
textures/horror_ring.png
Normal file
BIN
textures/horror_ring.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 177 B |
Loading…
x
Reference in New Issue
Block a user