Add manticore from horror.
This commit is contained in:
parent
e64d458359
commit
232fac6361
5 changed files with 79 additions and 1 deletions
11
dungeon.lua
11
dungeon.lua
|
@ -150,10 +150,19 @@ if fun_caves.register_status then
|
||||||
if not player then
|
if not player then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local player_name = player:get_player_name()
|
||||||
|
if not player_name or player_name == '' then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local damage = 1
|
||||||
|
if fun_caves.db.status and fun_caves.db.status[player_name] and fun_caves.db.status[player_name]['poisoned'] and fun_caves.db.status[player_name]['poisoned']['damage'] then
|
||||||
|
damage = tonumber(fun_caves.db.status[player_name]['poisoned']['damage'])
|
||||||
|
end
|
||||||
|
|
||||||
local hp = player:get_hp()
|
local hp = player:get_hp()
|
||||||
if hp and type(hp) == 'number' then
|
if hp and type(hp) == 'number' then
|
||||||
hp = hp - 1
|
hp = hp - damage
|
||||||
player:set_hp(hp)
|
player:set_hp(hp)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
67
horror.lua
Normal file
67
horror.lua
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
-- This code and all associated textures and models were
|
||||||
|
-- originated by DOOMED <heiselong@gmx.com>, and published in
|
||||||
|
-- the horror mod, under the GPL 2.1 license and CC-by-SA 3.
|
||||||
|
-- https://forum.minetest.net/viewtopic.php?f=9&t=12961&hilit=doomed
|
||||||
|
|
||||||
|
mobs:register_mob("fun_caves:manticore", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = true,
|
||||||
|
damage = 5,
|
||||||
|
reach = 4,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 15,
|
||||||
|
hp_max = 28,
|
||||||
|
armor = 70,
|
||||||
|
collisionbox = {-0.7, -0.5, -0.7, 0.7, 1.5, 0.7},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "manticore.b3d",
|
||||||
|
textures = {
|
||||||
|
{"manticore.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2.5, y=2.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 9},
|
||||||
|
},
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 1,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 11,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 11,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 11,
|
||||||
|
punch_start = 11,
|
||||||
|
punch_end = 26,
|
||||||
|
},
|
||||||
|
do_custom = function(self)
|
||||||
|
if not (self and fun_caves.custom_ready and fun_caves.set_status and fun_caves.surface_damage and fun_caves.custom_ready(self)) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.attack and math.random(3) == 1 then
|
||||||
|
local player_name = self.attack:get_player_name()
|
||||||
|
if player_name and player_name ~= '' then
|
||||||
|
minetest.chat_send_player(player_name, minetest.colorize('#FF0000', 'You\'ve been poisoned!'))
|
||||||
|
fun_caves.set_status(player_name, 'poisoned', 2 ^ math.random(8), {damage = 1})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
fun_caves.surface_damage(self)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--mobs:spawn_specific("horror:manticore", {"default:dirt_with_grass"}, {"default:stone"}, 20, 0, 300, 15000, 2, -100, 11000)
|
||||||
|
|
||||||
|
mobs:register_egg("fun_caves:manticore", "Manticore", "default_dirt.png", 1)
|
||||||
|
|
2
mobs.lua
2
mobs.lua
|
@ -819,6 +819,7 @@ if fun_caves.path then
|
||||||
dofile(fun_caves.path.."/zombie.lua")
|
dofile(fun_caves.path.."/zombie.lua")
|
||||||
dofile(fun_caves.path.."/goblin.lua")
|
dofile(fun_caves.path.."/goblin.lua")
|
||||||
dofile(fun_caves.path.."/demon.lua")
|
dofile(fun_caves.path.."/demon.lua")
|
||||||
|
dofile(fun_caves.path.."/horror.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
fun_caves.dungeon_spawns = {}
|
fun_caves.dungeon_spawns = {}
|
||||||
|
@ -843,6 +844,7 @@ local t_mobs = {
|
||||||
"fun_caves:goblin_king",
|
"fun_caves:goblin_king",
|
||||||
"fun_caves:zombie",
|
"fun_caves:zombie",
|
||||||
"fun_caves:zombie",
|
"fun_caves:zombie",
|
||||||
|
'fun_caves:manticore',
|
||||||
"dmobs:orc",
|
"dmobs:orc",
|
||||||
"dmobs:orc",
|
"dmobs:orc",
|
||||||
"dmobs:orc",
|
"dmobs:orc",
|
||||||
|
|
BIN
models/manticore.b3d
Normal file
BIN
models/manticore.b3d
Normal file
Binary file not shown.
BIN
textures/manticore.png
Normal file
BIN
textures/manticore.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 267 KiB |
Loading…
Add table
Add a link
Reference in a new issue