delete mobs
@ -1,34 +0,0 @@
|
||||
-= MOBS-MOD for MINETEST =-
|
||||
by PilzAdam, KrupnovPavel, Zeg9 and TenPlus1
|
||||
|
||||
This mod contains the following additions:
|
||||
|
||||
- Giant Spiders (found in desert caves, drop string when killed)
|
||||
- Bee's (found around flowers, drop honey when killed, right-click to pick up, also Beehives)
|
||||
- Chicken (lays eggs, added fried egg, raw & cooked chicken, right-click to pick up)
|
||||
- Cow (right-click with empty bucket to get bucket of milk, feed 8 wheat to replenish milk)
|
||||
- Sheep (right-click for wool, feed 8 wheat to replenish wool)
|
||||
- Warthog (the local pig that gives raw and cooked port)
|
||||
- Rats (right-click to pick up and place, cook for a tasty treat)
|
||||
- Sand, Dirt, Stone, Tree Monsters, Oerkki and Dungeon Masters as standard
|
||||
- Lava Flan, Mese Monsters added to spice things up a bit
|
||||
- Cook milk in furnace to get cheese wedge, 9 wedges make 1 cheese block
|
||||
|
||||
..with the following new features:
|
||||
|
||||
- Hitting a mob has knock-back effect like in minecraft, and with blood effect
|
||||
- Mobs float in water, so monsters can still chase you
|
||||
- Mobs can die from falling from a height
|
||||
- Mobs have better health and drops
|
||||
- Hitting a mob also puts them into fight mode (apart from animals)
|
||||
- Compatible with Ethereal mod, mobs now spawn on ethereal worlds
|
||||
|
||||
Changelog:
|
||||
|
||||
0.7 - mob.protected switch added to api.lua, when set to 1 mobs no longer spawn in protected areas, also bug fixes
|
||||
0.6 - Api now supports multi-textured mobs, e.g oerkki, dungeon master, rats and chickens have random skins when spawning (sheep fix TODO), also new Honey block
|
||||
0.5 - Mobs now float in water, die from falling, and some code improvements
|
||||
0.4 - Dungeon Masters and Mese Monsters have much better aim due to shoot_offset, also they can both shoot through nodes that aren't walkable (flowers, grass etc) plus new sheep sound :)
|
||||
0.3 - Added LOTT's Spider mob, made Cobwebs, added KPavel's Bee with Honey and Beehives (made texture), Warthogs now have sound and can be tamed, taming of shaved sheep or milked cow with 8 wheat so it will not despawn, many bug fixes :)
|
||||
0.2 - Cooking bucket of milk into cheese now returns empty bucket
|
||||
0.1 - Initial Release
|
@ -1,963 +0,0 @@
|
||||
mobs = {}
|
||||
mobs.mod = "redo"
|
||||
mobs.protected = 0 -- Set to 1 if you do not wish mobs to spawn in protected areas (default: 0)
|
||||
local highfa = {}
|
||||
|
||||
function mobs:register_mob(name, def)
|
||||
minetest.register_entity(name, {
|
||||
name = name,
|
||||
hp_min = def.hp_min or 5,
|
||||
hp_max = def.hp_max,
|
||||
physical = true,
|
||||
collisionbox = def.collisionbox,
|
||||
visual = def.visual,
|
||||
visual_size = def.visual_size,
|
||||
mesh = def.mesh,
|
||||
--textures = def.textures,
|
||||
makes_footstep_sound = def.makes_footstep_sound,
|
||||
view_range = def.view_range,
|
||||
walk_velocity = def.walk_velocity,
|
||||
run_velocity = def.run_velocity,
|
||||
damage = def.damage,
|
||||
light_damage = def.light_damage,
|
||||
water_damage = def.water_damage,
|
||||
lava_damage = def.lava_damage,
|
||||
fall_damage = def.fall_damage or true,
|
||||
drops = def.drops,
|
||||
armor = def.armor,
|
||||
drawtype = def.drawtype,
|
||||
on_rightclick = def.on_rightclick,
|
||||
type = def.type,
|
||||
attack_type = def.attack_type,
|
||||
arrow = def.arrow,
|
||||
shoot_interval = def.shoot_interval,
|
||||
sounds = def.sounds,
|
||||
animation = def.animation,
|
||||
follow = def.follow,
|
||||
jump = def.jump or true,
|
||||
exp_min = def.exp_min or 0,
|
||||
exp_max = def.exp_max or 0,
|
||||
walk_chance = def.walk_chance or 50,
|
||||
attacks_monsters = def.attacks_monsters or false,
|
||||
group_attack = def.group_attack or false,
|
||||
step = def.step or 0,
|
||||
fov = def.fov or 120,
|
||||
passive = def.passive or false,
|
||||
recovery_time = def.recovery_time or 0.5,
|
||||
knock_back = def.knock_back or 3,
|
||||
blood_offset = def.blood_offset or 0,
|
||||
blood_amount = def.blood_amount or 5, -- 15
|
||||
blood_texture = def.blood_texture or "mobs_blood.png",
|
||||
rewards = def.rewards or nil,
|
||||
animaltype = def.animaltype,
|
||||
shoot_offset = def.shoot_offset or 0,
|
||||
replace_rate = def.replace_rate,
|
||||
replace_what = def.replace_what,
|
||||
replace_with = def.replace_with,
|
||||
replace_offset = def.replace_offset or 0,
|
||||
child = false,
|
||||
stimer = 0,
|
||||
timer = 0,
|
||||
env_damage_timer = 0, -- only if state = "attack"
|
||||
attack = {player=nil, dist=nil},
|
||||
state = "stand",
|
||||
v_start = false,
|
||||
old_y = nil,
|
||||
lifetimer = 600,
|
||||
health = 0,
|
||||
tamed = false,
|
||||
last_state = nil,
|
||||
pause_timer = 0,
|
||||
|
||||
do_attack = function(self, player, dist)
|
||||
if self.state ~= "attack" then
|
||||
-- if self.sounds.war_cry then
|
||||
-- if math.random(0,100) < 90 then
|
||||
-- minetest.sound_play(self.sounds.war_cry,{ object = self.object })
|
||||
-- end
|
||||
-- end
|
||||
self.state = "attack"
|
||||
self.attack.player = player
|
||||
self.attack.dist = dist
|
||||
end
|
||||
end,
|
||||
|
||||
set_velocity = function(self, v)
|
||||
local yaw = self.object:getyaw()
|
||||
if self.drawtype == "side" then
|
||||
yaw = yaw+(math.pi/2)
|
||||
end
|
||||
local x = math.sin(yaw) * -v
|
||||
local z = math.cos(yaw) * v
|
||||
self.object:setvelocity({x=x, y=self.object:getvelocity().y, z=z})
|
||||
end,
|
||||
|
||||
get_velocity = function(self)
|
||||
local v = self.object:getvelocity()
|
||||
return (v.x^2 + v.z^2)^(0.5)
|
||||
end,
|
||||
--[[
|
||||
in_fov = function(self,pos)
|
||||
-- checks if POS is in self's FOV
|
||||
local yaw = self.object:getyaw()
|
||||
if self.drawtype == "side" then
|
||||
yaw = yaw+(math.pi/2)
|
||||
end
|
||||
local vx = math.sin(yaw)
|
||||
local vz = math.cos(yaw)
|
||||
local ds = math.sqrt(vx^2 + vz^2)
|
||||
local ps = math.sqrt(pos.x^2 + pos.z^2)
|
||||
local d = { x = vx / ds, z = vz / ds }
|
||||
local p = { x = pos.x / ps, z = pos.z / ps }
|
||||
|
||||
local an = ( d.x * p.x ) + ( d.z * p.z )
|
||||
|
||||
a = math.deg( math.acos( an ) )
|
||||
|
||||
if a > ( self.fov / 2 ) then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end,
|
||||
]]
|
||||
set_animation = function(self, type)
|
||||
if not self.animation then
|
||||
return
|
||||
end
|
||||
if not self.animation.current then
|
||||
self.animation.current = ""
|
||||
end
|
||||
if type == "stand" and self.animation.current ~= "stand" then
|
||||
if
|
||||
self.animation.stand_start
|
||||
and self.animation.stand_end
|
||||
and self.animation.speed_normal
|
||||
then
|
||||
self.object:set_animation(
|
||||
{x=self.animation.stand_start,y=self.animation.stand_end},
|
||||
self.animation.speed_normal, 0
|
||||
)
|
||||
self.animation.current = "stand"
|
||||
end
|
||||
elseif type == "walk" and self.animation.current ~= "walk" then
|
||||
if
|
||||
self.animation.walk_start
|
||||
and self.animation.walk_end
|
||||
and self.animation.speed_normal
|
||||
then
|
||||
self.object:set_animation(
|
||||
{x=self.animation.walk_start,y=self.animation.walk_end},
|
||||
self.animation.speed_normal, 0
|
||||
)
|
||||
self.animation.current = "walk"
|
||||
end
|
||||
elseif type == "run" and self.animation.current ~= "run" then
|
||||
if
|
||||
self.animation.run_start
|
||||
and self.animation.run_end
|
||||
and self.animation.speed_run
|
||||
then
|
||||
self.object:set_animation(
|
||||
{x=self.animation.run_start,y=self.animation.run_end},
|
||||
self.animation.speed_run, 0
|
||||
)
|
||||
self.animation.current = "run"
|
||||
end
|
||||
elseif type == "punch" and self.animation.current ~= "punch" then
|
||||
if
|
||||
self.animation.punch_start
|
||||
and self.animation.punch_end
|
||||
and self.animation.speed_normal
|
||||
then
|
||||
self.object:set_animation(
|
||||
{x=self.animation.punch_start,y=self.animation.punch_end},
|
||||
self.animation.speed_normal, 0
|
||||
)
|
||||
self.animation.current = "punch"
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
local yaw = 0
|
||||
if self.type == "monster" and minetest.setting_getbool("only_peaceful_mobs") then
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
self.lifetimer = self.lifetimer - dtime
|
||||
if self.lifetimer <= 0 and not self.tamed and self.type ~= "npc" then
|
||||
local player_count = 0
|
||||
for _,obj in ipairs(minetest.get_objects_inside_radius(self.object:getpos(), 10)) do
|
||||
if obj:is_player() then
|
||||
player_count = player_count+1
|
||||
end
|
||||
end
|
||||
if player_count == 0 and self.state ~= "attack" then
|
||||
minetest.log("action","lifetimer expired, removed mob "..self.name)
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
--spider cobweb
|
||||
if self.replace_rate
|
||||
and self.child == false
|
||||
and math.random(1, self.replace_rate) == 1 then
|
||||
local pos = self.object:getpos()
|
||||
pos.y = pos.y + self.replace_offset
|
||||
-- print ("replace node = ".. minetest.get_node(pos).name, pos.y)
|
||||
if self.replace_what
|
||||
and self.object:getvelocity().y == 0
|
||||
and #minetest.find_nodes_in_area(pos, pos, self.replace_what) > 0 then
|
||||
minetest.set_node(pos, {name = self.replace_with})
|
||||
end
|
||||
end
|
||||
|
||||
--[[ drop egg
|
||||
if self.monstertype == "spider" then
|
||||
if math.random(1, 3000) <= 1
|
||||
and minetest.get_node(self.object:getpos()).name == "air"
|
||||
and self.state == "stand" then
|
||||
minetest.set_node(self.object:getpos(), {name="mobs:cobweb"})
|
||||
print ("replace node = ".. minetest.get_node(pos).name, pos.y)
|
||||
end
|
||||
end
|
||||
--]]
|
||||
if self.object:getvelocity().y > 0.1 then
|
||||
local yaw = self.object:getyaw()
|
||||
if self.drawtype == "side" then
|
||||
yaw = yaw+(math.pi/2)
|
||||
end
|
||||
local x = math.sin(yaw) * -2
|
||||
local z = math.cos(yaw) * 2
|
||||
-- self.object:setacceleration({x=x, y=-10, z=z})
|
||||
-- else
|
||||
-- self.object:setacceleration({x=0, y=-10, z=0})
|
||||
-- end
|
||||
-- Mobs float in water now, to revert uncomment previous 4 lines and remove following block of 12
|
||||
if minetest.get_item_group(minetest.get_node(self.object:getpos()).name, "water") ~= 0 then
|
||||
self.object:setacceleration({x = x, y = 1.5, z = z})
|
||||
else
|
||||
self.object:setacceleration({x = x, y = -10, z = z}) -- 14.5
|
||||
end
|
||||
else
|
||||
if minetest.get_item_group(minetest.get_node(self.object:getpos()).name, "water") ~= 0 then
|
||||
self.object:setacceleration({x = 0, y = 1.5, z = 0})
|
||||
else
|
||||
self.object:setacceleration({x = 0, y = -10, z = 0}) -- 14.5
|
||||
end
|
||||
end
|
||||
|
||||
-- fall damage
|
||||
if self.fall_damage and self.object:getvelocity().y == 0 then
|
||||
if not self.old_y then
|
||||
self.old_y = self.object:getpos().y
|
||||
else
|
||||
local d = self.old_y - self.object:getpos().y
|
||||
if d > 5 then
|
||||
local damage = d-5
|
||||
self.object:set_hp(self.object:get_hp()-damage)
|
||||
if self.object:get_hp() == 0 then
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
self.old_y = self.object:getpos().y
|
||||
end
|
||||
end
|
||||
|
||||
-- if pause state then this is where the loop ends
|
||||
-- pause is only set after a monster is hit
|
||||
if self.pause_timer > 0 then
|
||||
self.pause_timer = self.pause_timer - dtime
|
||||
if self.pause_timer <= 0 then
|
||||
self.pause_timer = 0
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
self.timer = self.timer+dtime
|
||||
if self.state ~= "attack" then
|
||||
if self.timer < 1 then
|
||||
return
|
||||
end
|
||||
self.timer = 0
|
||||
end
|
||||
|
||||
if self.sounds and self.sounds.random and math.random(1, 100) <= 1 then
|
||||
minetest.sound_play(self.sounds.random, {object = self.object})
|
||||
end
|
||||
|
||||
local do_env_damage = function(self)
|
||||
local pos = self.object:getpos()
|
||||
local n = minetest.get_node(pos)
|
||||
|
||||
if self.light_damage and self.light_damage ~= 0
|
||||
and pos.y>0
|
||||
and minetest.get_node_light(pos)
|
||||
and minetest.get_node_light(pos) > 4
|
||||
and minetest.get_timeofday() > 0.2
|
||||
and minetest.get_timeofday() < 0.8
|
||||
then
|
||||
self.object:set_hp(self.object:get_hp()-self.light_damage)
|
||||
if self.object:get_hp() < 1 then
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
|
||||
if self.water_damage and self.water_damage ~= 0 and
|
||||
minetest.get_item_group(n.name, "water") ~= 0
|
||||
then
|
||||
self.object:set_hp(self.object:get_hp()-self.water_damage)
|
||||
if self.object:get_hp() < 1 then
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
|
||||
if self.lava_damage and self.lava_damage ~= 0 and
|
||||
minetest.get_item_group(n.name, "lava") ~= 0
|
||||
then
|
||||
self.object:set_hp(self.object:get_hp()-self.lava_damage)
|
||||
if self.object:get_hp() < 1 then
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.env_damage_timer = self.env_damage_timer + dtime
|
||||
if self.state == "attack" and self.env_damage_timer > 1 then
|
||||
self.env_damage_timer = 0
|
||||
do_env_damage(self)
|
||||
elseif self.state ~= "attack" then
|
||||
do_env_damage(self)
|
||||
end
|
||||
|
||||
-- FIND SOMEONE TO ATTACK
|
||||
if ( self.type == "monster" or self.type == "barbarian" ) and minetest.setting_getbool("enable_damage") and self.state ~= "attack" then
|
||||
local s = self.object:getpos()
|
||||
local inradius = minetest.get_objects_inside_radius(s,self.view_range)
|
||||
local player = nil
|
||||
local type = nil
|
||||
for _,oir in ipairs(inradius) do
|
||||
if oir:is_player() then
|
||||
player = oir
|
||||
type = "player"
|
||||
else
|
||||
local obj = oir:get_luaentity()
|
||||
if obj then
|
||||
player = obj.object
|
||||
type = obj.type
|
||||
end
|
||||
end
|
||||
|
||||
if type == "player" or type == "npc" then
|
||||
local s = self.object:getpos()
|
||||
local p = player:getpos()
|
||||
local sp = s
|
||||
p.y = p.y + 1
|
||||
sp.y = sp.y + 1 -- aim higher to make looking up hills more realistic
|
||||
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
if dist < self.view_range then -- and self.in_fov(self,p) then
|
||||
if minetest.line_of_sight(sp,p,2) == true then
|
||||
self.do_attack(self,player,dist)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- NPC FIND A MONSTER TO ATTACK
|
||||
-- if self.type == "npc" and self.attacks_monsters and self.state ~= "attack" then
|
||||
-- local s = self.object:getpos()
|
||||
-- local inradius = minetest.get_objects_inside_radius(s,self.view_range)
|
||||
-- for _, oir in pairs(inradius) do
|
||||
-- local obj = oir:get_luaentity()
|
||||
-- if obj then
|
||||
-- if obj.type == "monster" or obj.type == "barbarian" then
|
||||
-- -- attack monster
|
||||
-- local p = obj.object:getpos()
|
||||
-- local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
-- self.do_attack(self,obj.object,dist)
|
||||
-- break
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
if self.follow ~= "" and not self.following then
|
||||
for _,player in pairs(minetest.get_connected_players()) do
|
||||
local s = self.object:getpos()
|
||||
local p = player:getpos()
|
||||
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
if self.view_range and dist < self.view_range then
|
||||
self.following = player
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if self.following and self.following:is_player() then
|
||||
if self.following:get_wielded_item():get_name() ~= self.follow then
|
||||
self.following = nil
|
||||
else
|
||||
local s = self.object:getpos()
|
||||
local p = self.following:getpos()
|
||||
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
if dist > self.view_range then
|
||||
self.following = nil
|
||||
self.v_start = false
|
||||
else
|
||||
local vec = {x=p.x-s.x, y=p.y-s.y, z=p.z-s.z}
|
||||
local yaw = math.atan(vec.z/vec.x)+math.pi/2
|
||||
if self.drawtype == "side" then
|
||||
yaw = yaw+(math.pi/2)
|
||||
end
|
||||
if p.x > s.x then
|
||||
yaw = yaw+math.pi
|
||||
end
|
||||
self.object:setyaw(yaw)
|
||||
if dist > 2 then
|
||||
if not self.v_start then
|
||||
self.v_start = true
|
||||
self.set_velocity(self, self.walk_velocity)
|
||||
else
|
||||
if self.jump and self.get_velocity(self) <= 1.5 and self.object:getvelocity().y == 0 then
|
||||
local v = self.object:getvelocity()
|
||||
v.y = 6
|
||||
self.object:setvelocity(v)
|
||||
end
|
||||
self.set_velocity(self, self.walk_velocity)
|
||||
end
|
||||
self:set_animation("walk")
|
||||
else
|
||||
self.v_start = false
|
||||
self.set_velocity(self, 0)
|
||||
self:set_animation("stand")
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if self.state == "stand" then
|
||||
-- randomly turn
|
||||
if math.random(1, 4) == 1 then
|
||||
-- if there is a player nearby look at them
|
||||
local lp = nil
|
||||
local s = self.object:getpos()
|
||||
if self.type == "npc" then
|
||||
local o = minetest.get_objects_inside_radius(self.object:getpos(), 3)
|
||||
|
||||
local yaw = 0
|
||||
for _,o in ipairs(o) do
|
||||
if o:is_player() then
|
||||
lp = o:getpos()
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if lp ~= nil then
|
||||
local vec = {x=lp.x-s.x, y=lp.y-s.y, z=lp.z-s.z}
|
||||
yaw = math.atan(vec.z/vec.x)+math.pi/2
|
||||
if self.drawtype == "side" then
|
||||
yaw = yaw+(math.pi/2)
|
||||
end
|
||||
if lp.x > s.x then
|
||||
yaw = yaw+math.pi
|
||||
end
|
||||
else
|
||||
yaw = self.object:getyaw()+((math.random(0,360)-180)/180*math.pi)
|
||||
end
|
||||
self.object:setyaw(yaw)
|
||||
end
|
||||
self.set_velocity(self, 0)
|
||||
self.set_animation(self, "stand")
|
||||
if math.random(1, 100) <= self.walk_chance then
|
||||
self.set_velocity(self, self.walk_velocity)
|
||||
self.state = "walk"
|
||||
self.set_animation(self, "walk")
|
||||
end
|
||||
elseif self.state == "walk" then
|
||||
if math.random(1, 100) <= 30 then
|
||||
self.object:setyaw(self.object:getyaw()+((math.random(0,360)-180)/180*math.pi))
|
||||
end
|
||||
if self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
|
||||
local v = self.object:getvelocity()
|
||||
v.y = 5
|
||||
self.object:setvelocity(v)
|
||||
end
|
||||
self:set_animation("walk")
|
||||
self.set_velocity(self, self.walk_velocity)
|
||||
if math.random(1, 100) <= 30 then
|
||||
self.set_velocity(self, 0)
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
end
|
||||
elseif self.state == "attack" and self.attack_type == "dogfight" then
|
||||
if not self.attack.player or not self.attack.player:getpos() then
|
||||
print("stop attacking")
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
return
|
||||
end
|
||||
local s = self.object:getpos()
|
||||
local p = self.attack.player:getpos()
|
||||
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
if dist > self.view_range or self.attack.player:get_hp() <= 0 then
|
||||
self.state = "stand"
|
||||
self.v_start = false
|
||||
self.set_velocity(self, 0)
|
||||
self.attack = {player=nil, dist=nil}
|
||||
self:set_animation("stand")
|
||||
return
|
||||
else
|
||||
self.attack.dist = dist
|
||||
end
|
||||
|
||||
local vec = {x=p.x-s.x, y=p.y-s.y, z=p.z-s.z}
|
||||
local yaw = math.atan(vec.z/vec.x)+math.pi/2
|
||||
if self.drawtype == "side" then
|
||||
yaw = yaw+(math.pi/2)
|
||||
end
|
||||
if p.x > s.x then
|
||||
yaw = yaw+math.pi
|
||||
end
|
||||
self.object:setyaw(yaw)
|
||||
if self.attack.dist > 2 then
|
||||
if not self.v_start then
|
||||
self.v_start = true
|
||||
self.set_velocity(self, self.run_velocity)
|
||||
else
|
||||
if self.jump and self.get_velocity(self) <= 0.5 and self.object:getvelocity().y == 0 then
|
||||
local v = self.object:getvelocity()
|
||||
v.y = 5
|
||||
self.object:setvelocity(v)
|
||||
end
|
||||
self.set_velocity(self, self.run_velocity)
|
||||
end
|
||||
self:set_animation("run")
|
||||
else
|
||||
self.set_velocity(self, 0)
|
||||
self:set_animation("punch")
|
||||
self.v_start = false
|
||||
if self.timer > 1 then
|
||||
self.timer = 0
|
||||
local p2 = p
|
||||
local s2 = s
|
||||
p2.y = p2.y + 1.5
|
||||
s2.y = s2.y + 1.5
|
||||
if minetest.line_of_sight(p2,s2) == true then
|
||||
if self.sounds and self.sounds.attack then
|
||||
minetest.sound_play(self.sounds.attack, {object = self.object})
|
||||
end
|
||||
self.attack.player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=self.damage}
|
||||
}, vec)
|
||||
if self.attack.player:get_hp() <= 0 then
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif self.state == "attack" and self.attack_type == "shoot" then
|
||||
if not self.attack.player or not self.attack.player:is_player() then
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
return
|
||||
end
|
||||
local s = self.object:getpos()
|
||||
local p = self.attack.player:getpos()
|
||||
p.y = p.y - .5
|
||||
s.y = s.y + .5
|
||||
local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
|
||||
if dist > self.view_range or self.attack.player:get_hp() <= 0 then
|
||||
self.state = "stand"
|
||||
self.v_start = false
|
||||
self.set_velocity(self, 0)
|
||||
if self.type ~= "npc" then
|
||||
self.attack = {player=nil, dist=nil}
|
||||
end
|
||||
self:set_animation("stand")
|
||||
return
|
||||
else
|
||||
self.attack.dist = dist
|
||||
end
|
||||
|
||||
local vec = {x=p.x-s.x, y=p.y-s.y, z=p.z-s.z}
|
||||
local yaw = math.atan(vec.z/vec.x)+math.pi/2
|
||||
if self.drawtype == "side" then
|
||||
yaw = yaw+(math.pi/2)
|
||||
end
|
||||
if p.x > s.x then
|
||||
yaw = yaw+math.pi
|
||||
end
|
||||
self.object:setyaw(yaw)
|
||||
self.set_velocity(self, 0)
|
||||
|
||||
if self.timer > self.shoot_interval and math.random(1, 100) <= 60 then
|
||||
self.timer = 0
|
||||
|
||||
self:set_animation("punch")
|
||||
|
||||
if self.sounds and self.sounds.attack then
|
||||
minetest.sound_play(self.sounds.attack, {object = self.object})
|
||||
end
|
||||
|
||||
local p = self.object:getpos()
|
||||
p.y = p.y + (self.collisionbox[2]+self.collisionbox[5])/2
|
||||
local obj = minetest.add_entity(p, self.arrow)
|
||||
local amount = (vec.x^2+vec.y^2+vec.z^2)^0.5
|
||||
local v = obj:get_luaentity().velocity
|
||||
vec.y = vec.y + self.shoot_offset -- was +1, this way shoot aim is accurate
|
||||
vec.x = vec.x*v/amount
|
||||
vec.y = vec.y*v/amount
|
||||
vec.z = vec.z*v/amount
|
||||
obj:setvelocity(vec)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
on_activate = function(self, staticdata, dtime_s)
|
||||
-- reset HP
|
||||
--[[
|
||||
local pos = self.object:getpos()
|
||||
local distance_rating = ( ( get_distance({x=0,y=0,z=0},pos) ) / 19000 )
|
||||
local newHP = self.hp_min + math.floor( self.hp_max * distance_rating )
|
||||
self.object:set_hp( newHP )
|
||||
--]]
|
||||
|
||||
if self.health == 0 then
|
||||
-- HP
|
||||
-- note: attention: real hp.max = hp.min + hp.max * highfactor
|
||||
local highdefi = self.object:getpos().y
|
||||
highfa = 0
|
||||
if highdefi >= 0 then highfa = 0.1
|
||||
elseif highdefi <= -1 and highdefi >= -99 then highfa = 0.2
|
||||
elseif highdefi <= -100 and highdefi >= -249 then highfa = 0.3
|
||||
elseif highdefi <= -250 and highdefi >= -499 then highfa = 0.4
|
||||
elseif highdefi <= -500 and highdefi >= -999 then highfa = 0.5
|
||||
elseif highdefi <= -1000 and highdefi >= -2499 then highfa = 0.6
|
||||
elseif highdefi <= -2500 and highdefi >= -4999 then highfa = 0.7
|
||||
elseif highdefi <= -5000 and highdefi >= -7499 then highfa = 0.8
|
||||
elseif highdefi <= -7500 and highdefi >= -9999 then highfa = 0.9
|
||||
elseif highdefi <= -10000 then highfa = 1.0
|
||||
end
|
||||
self.health = self.hp_min + math.floor( self.hp_max * highfa )
|
||||
end
|
||||
self.object:set_hp( self.health )
|
||||
|
||||
self.object:set_armor_groups({fleshy=self.armor})
|
||||
self.object:setacceleration({x=0, y=-10, z=0})
|
||||
self.state = "stand"
|
||||
self.object:setvelocity({x=0, y=self.object:getvelocity().y, z=0})
|
||||
self.object:setyaw(math.random(1, 360)/180*math.pi)
|
||||
if self.type == "monster" and minetest.setting_getbool("only_peaceful_mobs") then
|
||||
self.object:remove()
|
||||
end
|
||||
if self.type ~= "npc" then
|
||||
self.lifetimer = 600 - dtime_s
|
||||
end
|
||||
if staticdata then
|
||||
local tmp = minetest.deserialize(staticdata)
|
||||
if tmp and tmp.lifetimer then
|
||||
self.lifetimer = tmp.lifetimer - dtime_s
|
||||
end
|
||||
if tmp and tmp.tamed then
|
||||
self.tamed = tmp.tamed
|
||||
end
|
||||
--[[if tmp and tmp.textures then
|
||||
self.object:set_properties(tmp.textures)
|
||||
end]]
|
||||
end
|
||||
if self.lifetimer <= 0 and not self.tamed and self.type ~= "npc" then
|
||||
self.object:remove()
|
||||
end
|
||||
end,
|
||||
|
||||
get_staticdata = function(self)
|
||||
local tmp = {
|
||||
lifetimer = self.lifetimer,
|
||||
tamed = self.tamed,
|
||||
--textures = { textures = self.textures },
|
||||
textures = def.available_textures["texture_"..math.random(1,def.available_textures["total"])],
|
||||
}
|
||||
self.object:set_properties(tmp)
|
||||
return minetest.serialize(tmp)
|
||||
end,
|
||||
|
||||
on_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
||||
|
||||
process_weapon(hitter,tflp,tool_capabilities)
|
||||
|
||||
local pos = self.object:getpos()
|
||||
if self.object:get_hp() < 1 then
|
||||
if hitter and hitter:is_player() then -- and hitter:get_inventory() then
|
||||
for _,drop in ipairs(self.drops) do
|
||||
if math.random(1, drop.chance) == 1 then
|
||||
local d = ItemStack(drop.name.." "..math.random(drop.min, drop.max))
|
||||
-- default.drop_item(pos,d)
|
||||
local pos2 = pos
|
||||
pos2.y = pos2.y + 0.5 -- drop items half block higher
|
||||
minetest.add_item(pos2,d)
|
||||
end
|
||||
end
|
||||
|
||||
-- if self.sounds.death ~= nil then
|
||||
-- minetest.sound_play(self.sounds.death,{
|
||||
-- object = self.object,
|
||||
-- })
|
||||
-- end
|
||||
-- if minetest.get_modpath("skills") and minetest.get_modpath("experience") then
|
||||
-- -- DROP experience
|
||||
-- local distance_rating = ( ( get_distance({x=0,y=0,z=0},pos) ) / ( skills.get_player_level(hitter:get_player_name()).level * 1000 ) )
|
||||
-- local emax = math.floor( self.exp_min + ( distance_rating * self.exp_max ) )
|
||||
-- local expGained = math.random(self.exp_min, emax)
|
||||
-- skills.add_exp(hitter:get_player_name(),expGained)
|
||||
-- local expStack = experience.exp_to_items(expGained)
|
||||
-- for _,stack in ipairs(expStack) do
|
||||
-- default.drop_item(pos,stack)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- -- see if there are any NPCs to shower you with rewards
|
||||
-- if self.type ~= "npc" then
|
||||
-- local inradius = minetest.get_objects_inside_radius(hitter:getpos(),10)
|
||||
-- for _, oir in pairs(inradius) do
|
||||
-- local obj = oir:get_luaentity()
|
||||
-- if obj then
|
||||
-- if obj.type == "npc" and obj.rewards ~= nil then
|
||||
-- local yaw = nil
|
||||
-- local lp = hitter:getpos()
|
||||
-- local s = obj.object:getpos()
|
||||
-- local vec = {x=lp.x-s.x, y=1, z=lp.z-s.z}
|
||||
-- yaw = math.atan(vec.z/vec.x)+math.pi/2
|
||||
-- if self.drawtype == "side" then
|
||||
-- yaw = yaw+(math.pi/2)
|
||||
-- end
|
||||
-- if lp.x > s.x then
|
||||
-- yaw = yaw+math.pi
|
||||
-- end
|
||||
-- obj.object:setyaw(yaw)
|
||||
-- local x = math.sin(yaw) * -2
|
||||
-- local z = math.cos(yaw) * 2
|
||||
-- acc = {x=x, y=-5, z=z}
|
||||
-- for _, r in pairs(obj.rewards) do
|
||||
-- if math.random(0,100) < r.chance then
|
||||
-- default.drop_item(obj.object:getpos(),r.item, vec, acc)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--blood_particles
|
||||
--[[
|
||||
if self.blood_amount > 0 and pos then
|
||||
local p = pos
|
||||
p.y = p.y + self.blood_offset
|
||||
|
||||
minetest.add_particlespawner(
|
||||
5, --blood_amount, --amount
|
||||
0.25, --time
|
||||
{x=p.x-0.2, y=p.y-0.2, z=p.z-0.2}, --minpos
|
||||
{x=p.x+0.2, y=p.y+0.2, z=p.z+0.2}, --maxpos
|
||||
{x=0, y=-2, z=0}, --minvel
|
||||
{x=2, y=2, z=2}, --maxvel
|
||||
{x=-4,y=-4,z=-4}, --minacc
|
||||
{x=4,y=-4,z=4}, --maxacc
|
||||
0.1, --minexptime
|
||||
1, --maxexptime
|
||||
0.5, --minsize
|
||||
1, --maxsize
|
||||
false, --collisiondetection
|
||||
self.blood_texture --texture
|
||||
)
|
||||
end
|
||||
]]--
|
||||
-- knock back effect, adapted from blockmen's pyramids mod
|
||||
-- https://github.com/BlockMen/pyramids
|
||||
local kb = self.knock_back
|
||||
local r = self.recovery_time
|
||||
|
||||
if tflp < tool_capabilities.full_punch_interval then
|
||||
kb = kb * ( tflp / tool_capabilities.full_punch_interval )
|
||||
r = r * ( tflp / tool_capabilities.full_punch_interval )
|
||||
end
|
||||
|
||||
local ykb=2
|
||||
local v = self.object:getvelocity()
|
||||
if v.y ~= 0 then
|
||||
ykb = 0
|
||||
end
|
||||
|
||||
self.object:setvelocity({x=dir.x*kb,y=ykb,z=dir.z*kb})
|
||||
self.pause_timer = r
|
||||
--[[
|
||||
-- attack puncher and call other mobs for help
|
||||
if self.passive == false then
|
||||
if self.state ~= "attack" then
|
||||
self.do_attack(self,hitter,1)
|
||||
end
|
||||
-- alert other NPCs to the attack
|
||||
local inradius = minetest.get_objects_inside_radius(hitter:getpos(),5)
|
||||
for _, oir in pairs(inradius) do
|
||||
local obj = oir:get_luaentity()
|
||||
if obj then
|
||||
if obj.group_attack == true and obj.state ~= "attack" then
|
||||
obj.do_attack(obj,hitter,1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
]]--
|
||||
end,
|
||||
|
||||
})
|
||||
end
|
||||
|
||||
mobs.spawning_mobs = {}
|
||||
function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height, min_dist, max_dist, spawn_func)
|
||||
mobs.spawning_mobs[name] = true
|
||||
minetest.register_abm({
|
||||
nodenames = nodes,
|
||||
neighbors = {"air"},
|
||||
interval = 30,
|
||||
chance = chance,
|
||||
action = function(pos, node, _, active_object_count_wider)
|
||||
if active_object_count_wider > active_object_count then
|
||||
return
|
||||
end
|
||||
if not mobs.spawning_mobs[name] then
|
||||
return
|
||||
end
|
||||
|
||||
-- Check if protected area using bogus name so mobs will not spawn
|
||||
if mobs.protected == 1 and minetest.is_protected(pos, "-") then
|
||||
return
|
||||
end
|
||||
|
||||
pos.y = pos.y+1
|
||||
if not minetest.get_node_light(pos) then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) > max_light then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) < min_light then
|
||||
return
|
||||
end
|
||||
if pos.y > max_height then
|
||||
return
|
||||
end
|
||||
|
||||
if not minetest.registered_nodes[minetest.get_node(pos).name] then return end
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].walkable then return end
|
||||
|
||||
pos.y = pos.y+1
|
||||
|
||||
if not minetest.registered_nodes[minetest.get_node(pos).name] then return end
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].walkable then return end
|
||||
|
||||
if min_dist == nil then
|
||||
min_dist = {x=-1,z=-1}
|
||||
end
|
||||
if max_dist == nil then
|
||||
max_dist = {x=33000,z=33000}
|
||||
end
|
||||
|
||||
if math.abs(pos.x) < min_dist.x or math.abs(pos.z) < min_dist.z
|
||||
or math.abs(pos.x) > max_dist.x or math.abs(pos.z) > max_dist.z then
|
||||
return
|
||||
end
|
||||
|
||||
if spawn_func and not spawn_func(pos, node) then
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.setting_getbool("display_mob_spawn") then
|
||||
minetest.chat_send_all("[mobs] Add "..name.." at "..minetest.pos_to_string(pos))
|
||||
end
|
||||
local mob = minetest.add_entity(pos, name)
|
||||
|
||||
-- setup the hp, armor, drops, etc... for this specific mob
|
||||
local distance_rating = ( ( get_distance({x=0,y=0,z=0},pos) ) / 15000 )
|
||||
if mob then
|
||||
mob = mob:get_luaentity()
|
||||
local newHP = mob.hp_min + math.floor( mob.hp_max * distance_rating )
|
||||
mob.object:set_hp( newHP )
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
function mobs:register_arrow(name, def)
|
||||
minetest.register_entity(name, {
|
||||
physical = false,
|
||||
visual = def.visual,
|
||||
visual_size = def.visual_size,
|
||||
textures = def.textures,
|
||||
velocity = def.velocity,
|
||||
hit_player = def.hit_player,
|
||||
hit_node = def.hit_node,
|
||||
collisionbox = {0,0,0,0,0,0}, -- remove box around arrows
|
||||
|
||||
on_step = function(self, dtime)
|
||||
local pos = self.object:getpos()
|
||||
--if minetest.get_node(self.object:getpos()).name ~= "air" then
|
||||
local node = minetest.get_node(self.object:getpos()).name
|
||||
if minetest.registered_nodes[node].walkable then
|
||||
self.hit_node(self, pos, node)
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
-- pos.y = pos.y-1.0
|
||||
for _,player in pairs(minetest.get_objects_inside_radius(pos, 1)) do
|
||||
if player:is_player() then
|
||||
self.hit_player(self, player)
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
function get_distance(pos1,pos2)
|
||||
if ( pos1 ~= nil and pos2 ~= nil ) then
|
||||
return math.abs(math.floor(math.sqrt( (pos1.x - pos2.x)^2 + (pos1.z - pos2.z)^2 )))
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
function process_weapon(player, time_from_last_punch, tool_capabilities)
|
||||
local weapon = player:get_wielded_item()
|
||||
if tool_capabilities ~= nil then
|
||||
local wear = ( tool_capabilities.full_punch_interval / 75 ) * 65535
|
||||
weapon:add_wear(wear)
|
||||
player:set_wielded_item(weapon)
|
||||
end
|
||||
minetest.sound_play("default_punch", {
|
||||
object = hitter,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
-- if weapon:get_definition().sounds ~= nil then
|
||||
-- local s = math.random(0,#weapon:get_definition().sounds)
|
||||
-- minetest.sound_play(weapon:get_definition().sounds[s], {
|
||||
-- object=player,
|
||||
-- })
|
||||
-- else
|
||||
-- minetest.sound_play("default_sword_wood", {
|
||||
-- object = player,
|
||||
-- })
|
||||
-- end
|
||||
end
|
||||
|
@ -1 +0,0 @@
|
||||
default
|
@ -1,115 +0,0 @@
|
||||
|
||||
-- Dungeon Master (This one spits out fireballs at you)
|
||||
|
||||
mobs:register_mob("mobs:dungeon_master", {
|
||||
type = "monster",
|
||||
hp_min = 25,
|
||||
hp_max = 40,
|
||||
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_dungeon_master.x",
|
||||
--textures = {"mobs_dungeon_master.png"},
|
||||
available_textures = {
|
||||
total = 4,
|
||||
texture_1 = {"mobs_dungeon_master.png"},
|
||||
texture_2 = {"mobs_dungeon_master2.png"},
|
||||
texture_3 = {"mobs_dungeon_master3.png"},
|
||||
texture_4 = {"mobs_dungeon_master4.png"},
|
||||
},
|
||||
visual_size = {x=8, y=8},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_dungeonmaster",
|
||||
attack = "mobs_dungeonmaster",
|
||||
},
|
||||
view_range = 15,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
damage = 4,
|
||||
drops = {
|
||||
{name = "default:mese_crystal_fragment",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 3,},
|
||||
{name = "default:diamond",
|
||||
chance = 4,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
{name = "default:mese_crystal",
|
||||
chance = 2,
|
||||
min = 1,
|
||||
max = 2,},
|
||||
{name = "default:mese",
|
||||
chance = 30,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
},
|
||||
armor = 60,
|
||||
drawtype = "front",
|
||||
water_damage = 1,
|
||||
lava_damage = 1,
|
||||
light_damage = 0,
|
||||
on_rightclick = nil,
|
||||
attack_type = "shoot",
|
||||
arrow = "mobs:fireball",
|
||||
shoot_interval = 2.5,
|
||||
sounds = {
|
||||
attack = "mobs_fireball",
|
||||
},
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 19,
|
||||
walk_start = 20,
|
||||
walk_end = 35,
|
||||
punch_start = 36,
|
||||
punch_end = 48,
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
},
|
||||
jump = true,
|
||||
step = 0.5,
|
||||
shoot_offset = 0,
|
||||
blood_texture = "mobs_blood.png",
|
||||
})
|
||||
mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 0, -1, 7000, 1, -333)
|
||||
mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 1, -1, 6000, 2, -666)
|
||||
mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 3, -1, 5000, 3, -10000)
|
||||
|
||||
-- Fireball (weapon)
|
||||
|
||||
mobs:register_arrow("mobs:fireball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=1, y=1},
|
||||
textures = {"mobs_fireball.png"},
|
||||
velocity = 5,
|
||||
|
||||
-- direct hit, no fire... just plenty of pain
|
||||
hit_player = function(self, player)
|
||||
local s = self.object:getpos()
|
||||
local p = player:getpos()
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=8},
|
||||
}, 0) -- {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z})
|
||||
end,
|
||||
|
||||
-- node hit, bursts into flame (cannot blast through obsidian)
|
||||
hit_node = function(self, pos, node)
|
||||
|
||||
for dx=-1,1 do
|
||||
for dy=-1,1 do
|
||||
for dz=-1,1 do
|
||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||
local n = minetest.env:get_node(p).name
|
||||
if n ~= "default:obsidian" and n ~= "ethereal:obsidian_brick" then
|
||||
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30 then
|
||||
-- minetest.env:set_node(p, {name="fire:basic_flame"})
|
||||
else
|
||||
minetest.env:set_node(p, {name="air"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
@ -1,55 +0,0 @@
|
||||
-- Mob Api (10th Dec 2014)
|
||||
|
||||
dofile(minetest.get_modpath("mobs").."/api.lua")
|
||||
|
||||
-- Animals inc. Krupnovpavel's warthog/bee and JKmurray's chicken
|
||||
|
||||
-- dofile(minetest.get_modpath("mobs").."/chicken.lua")
|
||||
-- dofile(minetest.get_modpath("mobs").."/cow.lua")
|
||||
-- dofile(minetest.get_modpath("mobs").."/rat.lua")
|
||||
-- dofile(minetest.get_modpath("mobs").."/sheep.lua")
|
||||
-- dofile(minetest.get_modpath("mobs").."/warthog.lua")
|
||||
-- dofile(minetest.get_modpath("mobs").."/bee.lua")
|
||||
|
||||
-- Monsters
|
||||
|
||||
-- dofile(minetest.get_modpath("mobs").."/dirtmonster.lua")
|
||||
dofile(minetest.get_modpath("mobs").."/dungeonmaster.lua")
|
||||
dofile(minetest.get_modpath("mobs").."/oerkki.lua")
|
||||
dofile(minetest.get_modpath("mobs").."/sandmonster.lua")
|
||||
dofile(minetest.get_modpath("mobs").."/stonemonster.lua")
|
||||
-- dofile(minetest.get_modpath("mobs").."/treemonster.lua")
|
||||
|
||||
-- Zmobs by Zeg9
|
||||
|
||||
-- dofile(minetest.get_modpath("mobs").."/lava_flan.lua")
|
||||
dofile(minetest.get_modpath("mobs").."/mese_monster.lua")
|
||||
|
||||
-- Spider from Lord of the Test - https://forum.minetest.net/viewtopic.php?pid=127538
|
||||
|
||||
dofile(minetest.get_modpath("mobs").."/spider.lua")
|
||||
|
||||
-- Meat & Cooked Meat
|
||||
|
||||
--minetest.register_craftitem("mobs:meat_raw", {
|
||||
--description = "Raw Meat",
|
||||
--inventory_image = "mobs_meat_raw.png",
|
||||
--on_use = minetest.item_eat(3),
|
||||
--})
|
||||
|
||||
--minetest.register_craftitem("mobs:meat", {
|
||||
--description = "Meat",
|
||||
--inventory_image = "mobs_meat.png",
|
||||
--on_use = minetest.item_eat(8),
|
||||
--})
|
||||
|
||||
--minetest.register_craft({
|
||||
--type = "cooking",
|
||||
--output = "mobs:meat",
|
||||
--recipe = "mobs:meat_raw",
|
||||
--cooktime = 5,
|
||||
--})
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
minetest.log("action", "mobs loaded")
|
||||
end
|
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Krupnov Pavel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
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.
|
@ -1,96 +0,0 @@
|
||||
|
||||
--= Mese Monster by Zeg9
|
||||
|
||||
-- 9 mese crystal fragments = 1 mese crystal
|
||||
minetest.register_craft({
|
||||
output = "default:mese_crystal",
|
||||
recipe = {
|
||||
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
|
||||
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
|
||||
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Mese Monster
|
||||
mobs:register_mob("mobs:mese_monster", {
|
||||
type = "monster",
|
||||
hp_min = 20,
|
||||
hp_max = 25,
|
||||
collisionbox = {-0.5, -1.5, -0.5, 0.5, 0.5, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "zmobs_mese_monster.x",
|
||||
--textures = {"zmobs_mese_monster.png"},
|
||||
available_textures = {
|
||||
total = 1,
|
||||
texture_1 = {"zmobs_mese_monster.png"},
|
||||
},
|
||||
visual_size = {x=1, y=1},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_mesemonster",
|
||||
attack = "mobs_mesemonster",
|
||||
},
|
||||
view_range = 10,
|
||||
walk_velocity = 0.5,
|
||||
run_velocity = 2,
|
||||
damage = 3,
|
||||
drops = {
|
||||
{name = "default:mese_crystal",
|
||||
chance = 9,
|
||||
min = 1,
|
||||
max = 3,},
|
||||
{name = "default:mese_crystal_fragment",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 9,},
|
||||
},
|
||||
light_resistant = true,
|
||||
armor = 80,
|
||||
drawtype = "front",
|
||||
water_damage = 0,
|
||||
lava_damage = 0,
|
||||
light_damage = 0,
|
||||
attack_type = "shoot",
|
||||
arrow = "mobs:mese_arrow",
|
||||
shoot_interval = .5,
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
stand_start = 0,
|
||||
stand_end = 14,
|
||||
walk_start = 15,
|
||||
walk_end = 38,
|
||||
run_start = 40,
|
||||
run_end = 63,
|
||||
punch_start = 15, -- 40
|
||||
punch_end = 38, -- 63
|
||||
},
|
||||
jump = true,
|
||||
step = 0.5,
|
||||
shoot_offset = 2,
|
||||
blood_texture = "default_mese_crystal_fragment.png",
|
||||
})
|
||||
mobs:register_spawn("mobs:mese_monster", {"default:stone"}, 2, -1, 9000, 2, -1000)
|
||||
mobs:register_spawn("mobs:mese_monster", {"default:stone"}, 2, -1, 5000, 3, -10000)
|
||||
|
||||
-- Mese Monster Crystal Shards (weapon)
|
||||
|
||||
mobs:register_arrow("mobs:mese_arrow", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"default_mese_crystal_fragment.png"},
|
||||
velocity = 5,
|
||||
|
||||
hit_player = function(self, player)
|
||||
local s = self.object:getpos()
|
||||
local p = player:getpos()
|
||||
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=1},
|
||||
}, 0) -- {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z})
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end
|
||||
})
|
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 948 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.0 KiB |
@ -1,699 +0,0 @@
|
||||
xof 0303txt 0032
|
||||
|
||||
Frame Root {
|
||||
FrameTransformMatrix {
|
||||
1.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 1.000000, 0.000000,
|
||||
0.000000, 1.000000,-0.000000, 0.000000,
|
||||
0.000000, 0.000000, 0.000000, 1.000000;;
|
||||
}
|
||||
Frame Cube_004 {
|
||||
FrameTransformMatrix {
|
||||
1.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000, 1.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 1.000000, 0.000000,
|
||||
0.000000, 0.000000,-0.000000, 1.000000;;
|
||||
}
|
||||
Mesh { //Cube_005 Mesh
|
||||
176;
|
||||
0.336296; 1.101631; 1.340231;,
|
||||
1.524099; 1.101631; 1.348138;,
|
||||
1.516191; 1.101631; 2.535941;,
|
||||
0.328389; 1.101631; 2.528034;,
|
||||
0.328389; 1.101631; 2.528034;,
|
||||
0.336296; 1.101631; 1.340231;,
|
||||
0.336296; 1.101631; 1.340231;,
|
||||
0.328389; 1.101631; 2.528034;,
|
||||
1.524099; 1.101631; 1.348138;,
|
||||
1.516191; 1.101631; 2.535941;,
|
||||
1.516191; 1.101631; 2.535941;,
|
||||
1.524099; 1.101631; 1.348138;,
|
||||
1.516191; 1.101631; 2.535941;,
|
||||
0.328389; 1.101631; 2.528034;,
|
||||
0.328389; 1.101631; 2.528034;,
|
||||
1.516191; 1.101631; 2.535941;,
|
||||
0.336296; 1.101631; 1.340231;,
|
||||
1.524099; 1.101631; 1.348138;,
|
||||
1.524099; 1.101631; 1.348138;,
|
||||
0.336296; 1.101631; 1.340231;,
|
||||
-1.564649; 0.817637; 1.334045;,
|
||||
-1.564649; 1.101631; 1.334045;,
|
||||
-1.596119; 1.101631; 2.521457;,
|
||||
-1.596119; 0.817637; 2.521457;,
|
||||
-1.564649; 1.101631; 1.334045;,
|
||||
-0.377237; 1.101631; 1.365515;,
|
||||
-0.408707; 1.101631; 2.552927;,
|
||||
-1.596119; 1.101631; 2.521457;,
|
||||
-0.377237; 1.101631; 1.365515;,
|
||||
-0.377237; 0.817638; 1.365515;,
|
||||
-0.408707; 0.817638; 2.552928;,
|
||||
-0.408707; 1.101631; 2.552927;,
|
||||
-0.377237; 0.817638; 1.365515;,
|
||||
-1.564649; 0.817637; 1.334045;,
|
||||
-1.596119; 0.817637; 2.521457;,
|
||||
-0.408707; 0.817638; 2.552928;,
|
||||
-0.377237; 0.817638; 1.365515;,
|
||||
-0.377237; 1.101631; 1.365515;,
|
||||
-1.564649; 1.101631; 1.334045;,
|
||||
-1.564649; 0.817637; 1.334045;,
|
||||
-1.596119; 0.817637; 2.521457;,
|
||||
-1.596119; 1.101631; 2.521457;,
|
||||
-0.408707; 1.101631; 2.552927;,
|
||||
-0.408707; 0.817638; 2.552928;,
|
||||
0.336296; 0.817638; 1.340231;,
|
||||
0.336296; 1.101631; 1.340231;,
|
||||
0.328389; 1.101631; 2.528034;,
|
||||
0.328389; 0.817638; 2.528034;,
|
||||
1.524099; 1.101631; 1.348138;,
|
||||
1.524099; 0.817637; 1.348139;,
|
||||
1.516192; 0.817637; 2.535942;,
|
||||
1.516191; 1.101631; 2.535941;,
|
||||
1.524099; 0.817637; 1.348139;,
|
||||
0.336296; 0.817638; 1.340231;,
|
||||
0.328389; 0.817638; 2.528034;,
|
||||
1.516192; 0.817637; 2.535942;,
|
||||
1.524099; 0.817637; 1.348139;,
|
||||
1.524099; 1.101631; 1.348138;,
|
||||
0.336296; 1.101631; 1.340231;,
|
||||
0.336296; 0.817638; 1.340231;,
|
||||
0.328389; 0.817638; 2.528034;,
|
||||
0.328389; 1.101631; 2.528034;,
|
||||
1.516191; 1.101631; 2.535941;,
|
||||
1.516192; 0.817637; 2.535942;,
|
||||
-0.117394;-5.732621; 0.182654;,
|
||||
-0.186090;-2.477838; 0.265415;,
|
||||
-0.186090;-2.477838; 0.668304;,
|
||||
-0.117394;-5.732621; 0.448150;,
|
||||
-0.186090;-2.477838; 0.265415;,
|
||||
0.216799;-2.477838; 0.265415;,
|
||||
0.216799;-2.477838; 0.668304;,
|
||||
-0.186090;-2.477838; 0.668304;,
|
||||
0.216799;-2.477838; 0.265415;,
|
||||
0.148102;-5.732621; 0.182654;,
|
||||
0.148102;-5.732621; 0.448150;,
|
||||
0.216799;-2.477838; 0.668304;,
|
||||
0.148102;-5.732621; 0.182654;,
|
||||
-0.117394;-5.732621; 0.182654;,
|
||||
-0.117394;-5.732621; 0.448150;,
|
||||
0.148102;-5.732621; 0.448150;,
|
||||
0.148102;-5.732621; 0.182654;,
|
||||
0.216799;-2.477838; 0.265415;,
|
||||
-0.186090;-2.477838; 0.265415;,
|
||||
-0.117394;-5.732621; 0.182654;,
|
||||
-0.117394;-5.732621; 0.448150;,
|
||||
-0.186090;-2.477838; 0.668304;,
|
||||
0.216799;-2.477838; 0.668304;,
|
||||
0.148102;-5.732621; 0.448150;,
|
||||
-0.933130;-2.573576; 0.130200;,
|
||||
-0.933130; 0.667430; 0.130200;,
|
||||
-0.933130; 0.667430; 2.038438;,
|
||||
-0.933130;-2.573576; 2.038438;,
|
||||
-0.933130; 0.667430; 0.130200;,
|
||||
0.963839; 0.667430; 0.130200;,
|
||||
0.963839; 0.667430; 2.038438;,
|
||||
-0.933130; 0.667430; 2.038438;,
|
||||
0.963839; 0.667430; 0.130200;,
|
||||
0.963839;-2.573576; 0.130200;,
|
||||
0.963839;-2.573576; 2.038438;,
|
||||
0.963839; 0.667430; 2.038438;,
|
||||
0.963839;-2.573576; 0.130200;,
|
||||
-0.933130;-2.573576; 0.130200;,
|
||||
-0.933130;-2.573576; 2.038438;,
|
||||
0.963839;-2.573576; 2.038438;,
|
||||
0.963839;-2.573576; 0.130200;,
|
||||
0.963839; 0.667430; 0.130200;,
|
||||
-0.933130; 0.667430; 0.130200;,
|
||||
-0.933130;-2.573576; 0.130200;,
|
||||
-0.933130;-2.573576; 2.038438;,
|
||||
-0.933130; 0.667430; 2.038438;,
|
||||
0.963839; 0.667430; 2.038438;,
|
||||
0.963839;-2.573576; 2.038438;,
|
||||
-0.694354; 0.619175; 0.175005;,
|
||||
-0.469990; 2.744857; 0.240792;,
|
||||
-0.469990; 2.744857; 1.874725;,
|
||||
-0.694354; 0.619175; 1.814122;,
|
||||
0.015354; 2.744857; 0.240792;,
|
||||
0.500698; 2.744857; 0.240792;,
|
||||
0.500698; 2.744857; 1.874725;,
|
||||
0.015354; 2.744857; 1.874725;,
|
||||
0.500698; 2.744857; 0.240792;,
|
||||
0.725062; 0.619175; 0.175005;,
|
||||
0.725062; 0.619175; 1.814122;,
|
||||
0.500698; 2.744857; 1.874725;,
|
||||
0.015354; 0.619175; 0.175005;,
|
||||
-0.694354; 0.619175; 0.175005;,
|
||||
-0.694354; 0.619175; 1.814122;,
|
||||
0.015354; 0.619175; 1.814122;,
|
||||
0.725062; 0.619175; 0.175005;,
|
||||
0.500698; 2.744857; 0.240792;,
|
||||
0.015354; 2.744857; 0.240792;,
|
||||
0.015354; 0.619175; 0.175005;,
|
||||
-0.694354; 0.619175; 1.814122;,
|
||||
-0.469990; 2.744857; 1.874725;,
|
||||
0.015354; 2.744857; 1.874725;,
|
||||
0.015354; 0.619175; 1.814122;,
|
||||
-0.281961; 2.574486; 0.745273;,
|
||||
-0.281961; 3.169116; 0.745273;,
|
||||
-0.281961; 3.169116; 1.339903;,
|
||||
-0.281961; 2.574486; 1.339903;,
|
||||
-0.281961; 3.169116; 0.745273;,
|
||||
0.312669; 3.169116; 0.745273;,
|
||||
0.312669; 3.169116; 1.339903;,
|
||||
-0.281961; 3.169116; 1.339903;,
|
||||
0.312669; 3.169116; 0.745273;,
|
||||
0.312669; 2.574486; 0.745273;,
|
||||
0.312669; 2.574486; 1.339903;,
|
||||
0.312669; 3.169116; 1.339903;,
|
||||
0.312669; 2.574486; 0.745273;,
|
||||
-0.281961; 2.574486; 0.745273;,
|
||||
-0.281961; 2.574486; 1.339903;,
|
||||
0.312669; 2.574486; 1.339903;,
|
||||
0.312669; 2.574486; 0.745273;,
|
||||
0.312669; 3.169116; 0.745273;,
|
||||
-0.281961; 3.169116; 0.745273;,
|
||||
-0.281961; 2.574486; 0.745273;,
|
||||
-0.281961; 2.574486; 1.339903;,
|
||||
-0.281961; 3.169116; 1.339903;,
|
||||
0.312669; 3.169116; 1.339903;,
|
||||
0.312669; 2.574486; 1.339903;,
|
||||
-0.469990; 2.744857; 0.240792;,
|
||||
0.015354; 2.744857; 0.240792;,
|
||||
0.015354; 2.744857; 1.874725;,
|
||||
-0.469990; 2.744857; 1.874725;,
|
||||
0.725062; 0.619175; 0.175005;,
|
||||
0.015354; 0.619175; 0.175005;,
|
||||
0.015354; 0.619175; 1.814122;,
|
||||
0.725062; 0.619175; 1.814122;,
|
||||
0.015354; 0.619175; 0.175005;,
|
||||
0.015354; 2.744857; 0.240792;,
|
||||
-0.469990; 2.744857; 0.240792;,
|
||||
-0.694354; 0.619175; 0.175005;,
|
||||
0.015354; 0.619175; 1.814122;,
|
||||
0.015354; 2.744857; 1.874725;,
|
||||
0.500698; 2.744857; 1.874725;,
|
||||
0.725062; 0.619175; 1.814122;;
|
||||
44;
|
||||
4;0;1;2;3;,
|
||||
4;4;5;6;7;,
|
||||
4;8;9;10;11;,
|
||||
4;12;13;14;15;,
|
||||
4;16;17;18;19;,
|
||||
4;20;21;22;23;,
|
||||
4;24;25;26;27;,
|
||||
4;28;29;30;31;,
|
||||
4;32;33;34;35;,
|
||||
4;36;37;38;39;,
|
||||
4;40;41;42;43;,
|
||||
4;44;45;46;47;,
|
||||
4;48;49;50;51;,
|
||||
4;52;53;54;55;,
|
||||
4;56;57;58;59;,
|
||||
4;60;61;62;63;,
|
||||
4;64;65;66;67;,
|
||||
4;68;69;70;71;,
|
||||
4;72;73;74;75;,
|
||||
4;76;77;78;79;,
|
||||
4;80;81;82;83;,
|
||||
4;84;85;86;87;,
|
||||
4;88;89;90;91;,
|
||||
4;92;93;94;95;,
|
||||
4;96;97;98;99;,
|
||||
4;100;101;102;103;,
|
||||
4;104;105;106;107;,
|
||||
4;108;109;110;111;,
|
||||
4;112;113;114;115;,
|
||||
4;116;117;118;119;,
|
||||
4;120;121;122;123;,
|
||||
4;124;125;126;127;,
|
||||
4;128;129;130;131;,
|
||||
4;132;133;134;135;,
|
||||
4;136;137;138;139;,
|
||||
4;140;141;142;143;,
|
||||
4;144;145;146;147;,
|
||||
4;148;149;150;151;,
|
||||
4;152;153;154;155;,
|
||||
4;156;157;158;159;,
|
||||
4;160;161;162;163;,
|
||||
4;164;165;166;167;,
|
||||
4;168;169;170;171;,
|
||||
4;172;173;174;175;;
|
||||
MeshNormals { //Cube_005 Normals
|
||||
176;
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
0.000000; 1.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
0.000000; 0.000000; 0.000000;,
|
||||
-0.999649; 0.000000;-0.026494;,
|
||||
-0.999649; 0.000000;-0.026494;,
|
||||
-0.999649; 0.000000;-0.026494;,
|
||||
-0.999649; 0.000000;-0.026494;,
|
||||
-0.000000; 1.000000; 0.000000;,
|
||||
-0.000000; 1.000000; 0.000000;,
|
||||
-0.000000; 1.000000; 0.000000;,
|
||||
-0.000000; 1.000000; 0.000000;,
|
||||
0.999649; 0.000001; 0.026494;,
|
||||
0.999649; 0.000001; 0.026494;,
|
||||
0.999649; 0.000001; 0.026494;,
|
||||
0.999649; 0.000001; 0.026494;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.026494; 0.000000;-0.999649;,
|
||||
0.026494; 0.000000;-0.999649;,
|
||||
0.026494; 0.000000;-0.999649;,
|
||||
0.026494; 0.000000;-0.999649;,
|
||||
-0.026494; 0.000000; 0.999649;,
|
||||
-0.026494; 0.000000; 0.999649;,
|
||||
-0.026494; 0.000000; 0.999649;,
|
||||
-0.026494; 0.000000; 0.999649;,
|
||||
-0.999978;-0.000000;-0.006657;,
|
||||
-0.999978;-0.000000;-0.006657;,
|
||||
-0.999978;-0.000000;-0.006657;,
|
||||
-0.999978;-0.000000;-0.006657;,
|
||||
0.999978; 0.000001; 0.006657;,
|
||||
0.999978; 0.000001; 0.006657;,
|
||||
0.999978; 0.000001; 0.006657;,
|
||||
0.999978; 0.000001; 0.006657;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
-0.000000;-1.000000;-0.000000;,
|
||||
0.006657; 0.000000;-0.999978;,
|
||||
0.006657; 0.000000;-0.999978;,
|
||||
0.006657; 0.000000;-0.999978;,
|
||||
0.006657; 0.000000;-0.999978;,
|
||||
-0.006657; 0.000000; 0.999978;,
|
||||
-0.006657; 0.000000; 0.999978;,
|
||||
-0.006657; 0.000000; 0.999978;,
|
||||
-0.006657; 0.000000; 0.999978;,
|
||||
-0.999777;-0.021102; 0.000000;,
|
||||
-0.999777;-0.021102; 0.000000;,
|
||||
-0.999777;-0.021102; 0.000000;,
|
||||
-0.999777;-0.021102; 0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.999777;-0.021102; 0.000000;,
|
||||
0.999777;-0.021102; 0.000000;,
|
||||
0.999777;-0.021102; 0.000000;,
|
||||
0.999777;-0.021102; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000; 0.025419;-0.999677;,
|
||||
0.000000; 0.025419;-0.999677;,
|
||||
0.000000; 0.025419;-0.999677;,
|
||||
0.000000; 0.025419;-0.999677;,
|
||||
0.000000;-0.067486; 0.997720;,
|
||||
0.000000;-0.067486; 0.997720;,
|
||||
0.000000;-0.067486; 0.997720;,
|
||||
0.000000;-0.067486; 0.997720;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
-0.994476; 0.104966; 0.000000;,
|
||||
-0.994476; 0.104966; 0.000000;,
|
||||
-0.994476; 0.104966; 0.000000;,
|
||||
-0.994476; 0.104966; 0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.994476; 0.104966; 0.000000;,
|
||||
0.994476; 0.104966; 0.000000;,
|
||||
0.994476; 0.104966; 0.000000;,
|
||||
0.994476; 0.104966; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000;-0.028498; 0.999594;,
|
||||
0.000000;-0.028498; 0.999594;,
|
||||
0.000000;-0.028498; 0.999594;,
|
||||
0.000000;-0.028498; 0.999594;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
-1.000000; 0.000000; 0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
1.000000; 0.000000;-0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000;-1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
-0.000000; 0.000000; 1.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000; 1.000000;-0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000;-1.000000; 0.000000;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000; 0.030934;-0.999521;,
|
||||
0.000000;-0.028498; 0.999594;,
|
||||
0.000000;-0.028498; 0.999594;,
|
||||
0.000000;-0.028498; 0.999594;,
|
||||
0.000000;-0.028498; 0.999594;;
|
||||
44;
|
||||
4;0;1;2;3;,
|
||||
4;4;5;6;7;,
|
||||
4;8;9;10;11;,
|
||||
4;12;13;14;15;,
|
||||
4;16;17;18;19;,
|
||||
4;20;21;22;23;,
|
||||
4;24;25;26;27;,
|
||||
4;28;29;30;31;,
|
||||
4;32;33;34;35;,
|
||||
4;36;37;38;39;,
|
||||
4;40;41;42;43;,
|
||||
4;44;45;46;47;,
|
||||
4;48;49;50;51;,
|
||||
4;52;53;54;55;,
|
||||
4;56;57;58;59;,
|
||||
4;60;61;62;63;,
|
||||
4;64;65;66;67;,
|
||||
4;68;69;70;71;,
|
||||
4;72;73;74;75;,
|
||||
4;76;77;78;79;,
|
||||
4;80;81;82;83;,
|
||||
4;84;85;86;87;,
|
||||
4;88;89;90;91;,
|
||||
4;92;93;94;95;,
|
||||
4;96;97;98;99;,
|
||||
4;100;101;102;103;,
|
||||
4;104;105;106;107;,
|
||||
4;108;109;110;111;,
|
||||
4;112;113;114;115;,
|
||||
4;116;117;118;119;,
|
||||
4;120;121;122;123;,
|
||||
4;124;125;126;127;,
|
||||
4;128;129;130;131;,
|
||||
4;132;133;134;135;,
|
||||
4;136;137;138;139;,
|
||||
4;140;141;142;143;,
|
||||
4;144;145;146;147;,
|
||||
4;148;149;150;151;,
|
||||
4;152;153;154;155;,
|
||||
4;156;157;158;159;,
|
||||
4;160;161;162;163;,
|
||||
4;164;165;166;167;,
|
||||
4;168;169;170;171;,
|
||||
4;172;173;174;175;;
|
||||
} //End of Cube_005 Normals
|
||||
MeshMaterialList { //Cube_005 Material List
|
||||
1;
|
||||
44;
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0;;
|
||||
Material Material_001 {
|
||||
0.640000; 0.640000; 0.640000; 1.000000;;
|
||||
96.078431;
|
||||
0.500000; 0.500000; 0.500000;;
|
||||
0.000000; 0.000000; 0.000000;;
|
||||
}
|
||||
} //End of Cube_005 Material List
|
||||
MeshTextureCoords { //Cube_005 UV Coordinates
|
||||
176;
|
||||
0.635817; 0.275819;,
|
||||
0.635817; 0.046728;,
|
||||
0.864908; 0.046728;,
|
||||
0.864908; 0.275819;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.864346; 0.986031;,
|
||||
0.783570; 0.986031;,
|
||||
0.783570; 0.648180;,
|
||||
0.864346; 0.648180;,
|
||||
0.635817; 0.274669;,
|
||||
0.635817; 0.045578;,
|
||||
0.864908; 0.045578;,
|
||||
0.864908; 0.274669;,
|
||||
0.863901; 0.987104;,
|
||||
0.783126; 0.987104;,
|
||||
0.783126; 0.649254;,
|
||||
0.863901; 0.649254;,
|
||||
0.991231; 0.987104;,
|
||||
0.653381; 0.987104;,
|
||||
0.653381; 0.649254;,
|
||||
0.991232; 0.649254;,
|
||||
0.991232; 0.777658;,
|
||||
0.991232; 0.858433;,
|
||||
0.653381; 0.858433;,
|
||||
0.653381; 0.777658;,
|
||||
0.655529; 0.859063;,
|
||||
0.655529; 0.778288;,
|
||||
0.993379; 0.778288;,
|
||||
0.993379; 0.859063;,
|
||||
0.335443; 0.861158;,
|
||||
0.265926; 0.861158;,
|
||||
0.265926; 0.570397;,
|
||||
0.335443; 0.570397;,
|
||||
0.334205; 0.859816;,
|
||||
0.264688; 0.859816;,
|
||||
0.264688; 0.569055;,
|
||||
0.334205; 0.569055;,
|
||||
0.444367; 0.858474;,
|
||||
0.153606; 0.858474;,
|
||||
0.153606; 0.567713;,
|
||||
0.444367; 0.567713;,
|
||||
0.333996; 0.859816;,
|
||||
0.264479; 0.859816;,
|
||||
0.264479; 0.569055;,
|
||||
0.333996; 0.569055;,
|
||||
0.264228; 0.568595;,
|
||||
0.333745; 0.568595;,
|
||||
0.333745; 0.859357;,
|
||||
0.264228; 0.859357;,
|
||||
0.910309; 0.067094;,
|
||||
0.990888; 0.067068;,
|
||||
0.991634; 0.077574;,
|
||||
0.911094; 0.077574;,
|
||||
0.910309; 0.024149;,
|
||||
0.921538; 0.024149;,
|
||||
0.921538; 0.035379;,
|
||||
0.910309; 0.035379;,
|
||||
0.990708; 0.067037;,
|
||||
0.910309; 0.067041;,
|
||||
0.910896; 0.056534;,
|
||||
0.991418; 0.056534;,
|
||||
0.928966; 0.035379;,
|
||||
0.921565; 0.035379;,
|
||||
0.921565; 0.027979;,
|
||||
0.928966; 0.027979;,
|
||||
0.910595; 0.035408;,
|
||||
0.990869; 0.035406;,
|
||||
0.990583; 0.045937;,
|
||||
0.910309; 0.045939;,
|
||||
0.910597; 0.045966;,
|
||||
0.990951; 0.045966;,
|
||||
0.990662; 0.056507;,
|
||||
0.910309; 0.056507;,
|
||||
0.461795; 0.725720;,
|
||||
0.002369; 0.725720;,
|
||||
0.002369; 0.455219;,
|
||||
0.461795; 0.455219;,
|
||||
0.728915; 0.630399;,
|
||||
0.460011; 0.630399;,
|
||||
0.460011; 0.359898;,
|
||||
0.728915; 0.359898;,
|
||||
0.459622; 0.999805;,
|
||||
0.000195; 0.999805;,
|
||||
0.000195; 0.729304;,
|
||||
0.459622; 0.729304;,
|
||||
0.990155; 1.001469;,
|
||||
0.721251; 1.001469;,
|
||||
0.721251; 0.730968;,
|
||||
0.990155; 0.730968;,
|
||||
0.000987; 0.351616;,
|
||||
0.460413; 0.351616;,
|
||||
0.460413; 0.620520;,
|
||||
0.000987; 0.620520;,
|
||||
0.728915; 0.540378;,
|
||||
0.728915; 0.999805;,
|
||||
0.460011; 0.999805;,
|
||||
0.460011; 0.540378;,
|
||||
0.006594; 0.353635;,
|
||||
0.507556; 0.369053;,
|
||||
0.507556; 0.596553;,
|
||||
0.006594; 0.737794;,
|
||||
0.752538; 0.533913;,
|
||||
0.752538; 0.647662;,
|
||||
0.525038; 0.647662;,
|
||||
0.525038; 0.533913;,
|
||||
0.509703; 0.731028;,
|
||||
0.008741; 0.746446;,
|
||||
0.008741; 0.362287;,
|
||||
0.509703; 0.503529;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.003201; 0.349292;,
|
||||
0.501634; 0.401876;,
|
||||
0.501634; 0.515626;,
|
||||
0.003201; 0.515626;,
|
||||
0.529333; 0.186216;,
|
||||
0.171158; 0.150188;,
|
||||
0.171083; 0.071516;,
|
||||
0.529224; 0.071176;,
|
||||
0.636995; 0.428681;,
|
||||
0.636995; 0.545208;,
|
||||
0.520468; 0.545208;,
|
||||
0.520468; 0.428681;,
|
||||
0.340480; 0.361873;,
|
||||
0.452832; 0.361873;,
|
||||
0.452832; 0.474224;,
|
||||
0.340480; 0.474224;,
|
||||
0.453577; 0.475130;,
|
||||
0.341226; 0.475130;,
|
||||
0.341226; 0.362779;,
|
||||
0.453577; 0.362779;,
|
||||
0.453737; 0.472732;,
|
||||
0.341386; 0.472732;,
|
||||
0.341386; 0.360381;,
|
||||
0.453737; 0.360381;,
|
||||
0.454483; 0.362033;,
|
||||
0.454483; 0.474384;,
|
||||
0.342132; 0.474384;,
|
||||
0.342132; 0.362033;,
|
||||
0.342132; 0.472732;,
|
||||
0.342132; 0.360381;,
|
||||
0.454483; 0.360381;,
|
||||
0.454483; 0.472732;,
|
||||
0.752538; 0.420163;,
|
||||
0.752538; 0.533913;,
|
||||
0.525038; 0.533913;,
|
||||
0.525038; 0.420163;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.000000; 1.000000;,
|
||||
0.003201; 0.515626;,
|
||||
0.501634; 0.515626;,
|
||||
0.501634; 0.629375;,
|
||||
0.003201; 0.681959;,
|
||||
0.529223; 0.070318;,
|
||||
0.171082; 0.070658;,
|
||||
0.171157; 0.149330;,
|
||||
0.529332; 0.185358;;
|
||||
} //End of Cube_005 UV Coordinates
|
||||
} //End of Cube_005 Mesh
|
||||
} //End of Cube_004
|
||||
} //End of Root Frame
|
Before Width: | Height: | Size: 834 B |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.9 KiB |
@ -1,61 +0,0 @@
|
||||
|
||||
-- Oerkki
|
||||
|
||||
mobs:register_mob("mobs:oerkki", {
|
||||
type = "monster",
|
||||
hp_min = 12,
|
||||
hp_max = 30,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_oerkki.x",
|
||||
--textures = {"mobs_oerkki.png"},
|
||||
available_textures = {
|
||||
total = 2,
|
||||
texture_1 = {"mobs_oerkki.png"},
|
||||
texture_2 = {"mobs_oerkki2.png"},
|
||||
},
|
||||
visual_size = {x=5, y=5},
|
||||
makes_footstep_sound = false,
|
||||
sounds = {
|
||||
random = "mobs_oerkki",
|
||||
attack = "mobs_oerkki",
|
||||
},
|
||||
view_range = 15,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
damage = 4,
|
||||
drops = {
|
||||
{name = "default:obsidian",
|
||||
chance = 3,
|
||||
min = 1,
|
||||
max = 2,},
|
||||
{name = "default:gold_lump",
|
||||
chance = 5,
|
||||
min = 1,
|
||||
max = 2,},
|
||||
},
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
light_resistant = true,
|
||||
water_damage = 1,
|
||||
lava_damage = 1,
|
||||
light_damage = 0,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 23,
|
||||
walk_start = 24,
|
||||
walk_end = 36,
|
||||
run_start = 37,
|
||||
run_end = 49,
|
||||
punch_start = 37,
|
||||
punch_end = 49,
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
},
|
||||
jump = true,
|
||||
step = 0.5,
|
||||
blood_texture = "mobs_blood.png",
|
||||
})
|
||||
mobs:register_spawn("mobs:oerkki", {"default:stone"}, 0, -1, 10000, 2, -1200)
|
||||
mobs:register_spawn("mobs:oerkki", {"default:stone"}, 1, -1, 10000, 3, -10000)
|
@ -1,66 +0,0 @@
|
||||
|
||||
-- Sand Monster
|
||||
|
||||
mobs:register_mob("mobs:sand_monster", {
|
||||
type = "monster",
|
||||
hp_min = 15,
|
||||
hp_max = 55,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_sand_monster.x",
|
||||
--textures = {"mobs_sand_monster.png"},
|
||||
available_textures = {
|
||||
total = 3,
|
||||
texture_1 = {"mobs_sand_monster.png"},
|
||||
texture_2 = {"mobs_sand_monster2.png"},
|
||||
texture_3 = {"mobs_sand_monster3.png"},
|
||||
},
|
||||
visual_size = {x=8,y=8},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
--random = "mobs_mutant",
|
||||
attack = "mobs_mutant",
|
||||
},
|
||||
view_range = 15,
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 4,
|
||||
damage = 1,
|
||||
drops = {
|
||||
{name = "default:sand",
|
||||
chance = 2,
|
||||
min = 3,
|
||||
max = 5,},
|
||||
{name = "default:iron_lump",
|
||||
chance=9,
|
||||
min=1,
|
||||
max=2,},
|
||||
{name = "default:apple",
|
||||
chance=4,
|
||||
min=1,
|
||||
max=2,},
|
||||
},
|
||||
light_resistant = true,
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
water_damage = 3,
|
||||
lava_damage = 1,
|
||||
light_damage = 0,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
stand_start = 0,
|
||||
stand_end = 39,
|
||||
walk_start = 41,
|
||||
walk_end = 72,
|
||||
run_start = 74,
|
||||
run_end = 105,
|
||||
punch_start = 74,
|
||||
punch_end = 105,
|
||||
},
|
||||
jump = true,
|
||||
step = 0.5,
|
||||
blood_texture = "mobs_blood.png",
|
||||
})
|
||||
mobs:register_spawn("mobs:sand_monster", {"default:sand"}, 20, -1, 16000, 1, 31000)
|
||||
mobs:register_spawn("mobs:sand_monster", {"default:sand"}, 5, -1, 6000, 3, 31000)
|
@ -1 +0,0 @@
|
||||
mobs_mutant = creature Zombie 2 from Game Wasteland by Blockmen
|
@ -1,103 +0,0 @@
|
||||
|
||||
-- Glowtest Spider
|
||||
|
||||
mobs:register_mob("mobs:spider", {
|
||||
type = "monster",
|
||||
hp_min = 20,
|
||||
hp_max = 35,
|
||||
collisionbox = {-0.9, -0.01, -0.7, 0.7, 0.6, 0.7},
|
||||
--textures = {"mobs_spider.png"},
|
||||
available_textures = {
|
||||
total = 4,
|
||||
texture_1 = {"mobs_spider.png"},
|
||||
texture_2 = {"mobs_spider2.png"},
|
||||
texture_3 = {"mobs_spider3.png"},
|
||||
texture_4 = {"mobs_spider4.png"},
|
||||
},
|
||||
visual_size = {x=7,y=7},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_spider.x",
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_spider",
|
||||
attack = "mobs_spider",
|
||||
},
|
||||
view_range = 15,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 150,
|
||||
damage = 3,
|
||||
replace_rate = 15000,
|
||||
replace_what = {"air"},
|
||||
replace_with = "mobs:cobweb",
|
||||
drops = {
|
||||
{name = "farming:string",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 5,},
|
||||
{name = "farming:string",
|
||||
chance = 15,
|
||||
min = 2,
|
||||
max = 6,},
|
||||
},
|
||||
light_resistant = false,
|
||||
drawtype = "front",
|
||||
water_damage = 5,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
on_rightclick = nil,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
stand_start = 1,
|
||||
stand_end = 1,
|
||||
walk_start = 20,
|
||||
walk_end = 40,
|
||||
run_start = 20,
|
||||
run_end = 40,
|
||||
punch_start = 50,
|
||||
punch_end = 90,
|
||||
},
|
||||
jump = true,
|
||||
sounds = {},
|
||||
step = 1,
|
||||
})
|
||||
mobs:register_spawn("mobs:spider", {"default:tuff", "default:stone"}, 5, -1, 4500, 3, 31000)
|
||||
|
||||
-- Ethereal crystal spike compatibility
|
||||
|
||||
if not minetest.get_modpath("ethereal") then
|
||||
minetest.register_alias("ethereal:crystal_spike", "default:sandstone")
|
||||
end
|
||||
|
||||
-- Cobweb
|
||||
|
||||
minetest.register_node("mobs:cobweb", {
|
||||
description = "Cobweb",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.1,
|
||||
tiles = {"mobs_cobweb.png"},
|
||||
inventory_image = "mobs_cobweb.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
liquid_viscosity = 11,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "mobs:cobweb",
|
||||
liquid_alternative_source = "mobs:cobweb",
|
||||
liquid_renewable = false,
|
||||
liquid_range = 0,
|
||||
walkable = false,
|
||||
groups = {snappy=2,liquid=3},
|
||||
drop = "farming:cotton",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:cobweb",
|
||||
recipe = {
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
}
|
||||
})
|
@ -1,65 +0,0 @@
|
||||
|
||||
-- Stone Monster
|
||||
|
||||
mobs:register_mob("mobs:stone_monster", {
|
||||
type = "monster",
|
||||
hp_min = 18,
|
||||
hp_max = 35,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_stone_monster.x",
|
||||
--textures = {"mobs_stone_monster.png"},
|
||||
available_textures = {
|
||||
total = 1,
|
||||
texture_1 = {"mobs_stone_monster.png"},
|
||||
},
|
||||
visual_size = {x=3, y=2.6},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_stonemonster",
|
||||
attack = "mobs_stonemonster",
|
||||
},
|
||||
view_range = 10,
|
||||
walk_velocity = 0.5,
|
||||
run_velocity = 2,
|
||||
damage = 3,
|
||||
drops = {
|
||||
{name = "default:stone",
|
||||
chance = 2,
|
||||
min = 3,
|
||||
max = 5,},
|
||||
{name = "default:chondrit",
|
||||
chance=3,
|
||||
min=1,
|
||||
max=2,},
|
||||
{name = "default:coal_lump",
|
||||
chance=5,
|
||||
min=1,
|
||||
max=3,},
|
||||
},
|
||||
light_resistant = true,
|
||||
armor = 80,
|
||||
drawtype = "front",
|
||||
water_damage = 0,
|
||||
lava_damage = 0,
|
||||
light_damage = 0,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
stand_start = 0,
|
||||
stand_end = 14,
|
||||
walk_start = 15,
|
||||
walk_end = 38,
|
||||
run_start = 40,
|
||||
run_end = 63,
|
||||
punch_start = 40,
|
||||
punch_end = 63,
|
||||
},
|
||||
jump = true,
|
||||
step = 0.5,
|
||||
blood_texture = "mobs_blood.png",
|
||||
})
|
||||
mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 0, -1, 12000, 1, 0)
|
||||
mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 2, -1, 10000, 2, -500)
|
||||
mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 3, -1, 8000, 3, -10000)
|
Before Width: | Height: | Size: 934 B |
Before Width: | Height: | Size: 513 B |
Before Width: | Height: | Size: 267 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 216 B |
Before Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 522 B |