add dog wolf, update menu, tweak spawning add bat

This commit is contained in:
maikerumine 2016-03-18 19:03:29 -04:00
parent f138106088
commit eab74e595d
14 changed files with 7669 additions and 52 deletions

View File

@ -40,13 +40,16 @@ dofile(minetest.get_modpath("cottages").."/adaptions.lua");
-- add a stack size if you want a higher yield
cottages.handmill_product = {};
cottages.handmill_product[ cottages.craftitem_seed_wheat ] = 'farming:flour 1';
cottages.handmill_product[ 'es:purpellium_lump' ] = 'es:purpellium_dust 1';
cottages.handmill_product[ 'default:cobble' ] = 'default:gravel';
cottages.handmill_product[ 'default:gravel' ] = 'default:sand';
cottages.handmill_product[ 'default:sand' ] = 'default:dirt 2';
cottages.handmill_product[ 'flowers:rose' ] = 'dye:red 6';
cottages.handmill_product[ 'default:cactus' ] = 'dye:green 6';
cottages.handmill_product[ 'default:coal_lump'] = 'dye:black 6';
--cottages.handmill_product[ 'es:purpellium_lump' ] = 'es:purpellium_dust 1';
--cottages.handmill_product[ 'es:aikerum_crystal' ] = 'es:aikerum_dust 1';
--cottages.handmill_product[ 'es:ruby_crystal' ] = 'es:ruby_dust 1';
--cottages.handmill_product[ 'es:emerald_crystal' ] = 'es:emerald_dust 1';
--cottages.handmill_product[ 'default:cobble' ] = 'default:gravel';
--cottages.handmill_product[ 'default:gravel' ] = 'default:sand';
--cottages.handmill_product[ 'default:sand' ] = 'default:dirt 2';
--cottages.handmill_product[ 'flowers:rose' ] = 'dye:red 6';
--cottages.handmill_product[ 'default:cactus' ] = 'dye:green 6';
--cottages.handmill_product[ 'default:coal_lump'] = 'dye:black 6';
-- process that many inputs per turn
cottages.handmill_max_per_turn = 20;

View File

@ -1095,9 +1095,9 @@ minetest.register_entity(name, {
end
-- never go over 100
-- if self.timer > 100 then
-- self.timer = 1
-- end
if self.timer > 100 then
self.timer = 1
end
-- node replace check (cow eats grass etc.)
replace(self, pos)
@ -1354,7 +1354,7 @@ minetest.register_entity(name, {
return
end
if self.state == "stand" then
if math.random(1, 4) == 1 then
@ -1728,7 +1728,7 @@ minetest.register_entity(name, {
-- path finding by rnd
if self.pathfinding -- only if mob has pathfinding enabled
and enable_pathfinding then
smart_mobs(self, s, p, dist, dtime)
end
@ -1846,7 +1846,7 @@ minetest.register_entity(name, {
local obj = minetest.add_entity(p, self.arrow)
local ent = obj:get_luaentity()
local amount = (vec.x * vec.x + vec.y * vec.y + vec.z * vec.z) ^ 0.5
--local v = ent.velocity
--local v = ent.velocity
local v = 7.2
ent.switch = 1
@ -1861,7 +1861,7 @@ minetest.register_entity(name, {
end
end -- END if self.state == "attack"
end,
on_punch = function(self, hitter, tflp, tool_capabilities, dir)
@ -1974,7 +1974,7 @@ minetest.register_entity(name, {
-- knock back effect
if self.knock_back > 0 then
local dir = self.object:getvelocity() --maikerumine added this hack
local v = self.object:getvelocity()
local r = 1.4 - math.min(punch_interval, 1.4)
@ -1984,9 +1984,9 @@ minetest.register_entity(name, {
-- if already in air then dont go up anymore when hit
if v.y > 0
or self.fly then
up = 0
up = 0
end
self.object:setvelocity({
x = dir.x * kb,
y = dir.y * kb, --was up
@ -2158,11 +2158,12 @@ minetest.register_entity(name, {
if remove_far
and self.remove_ok
and self.state ~= "run" --maikerumine to fix dissappearing mobs
and self.state ~= "follow" --maikerumine to fix dissappearing mobs
--and self.state ~= "attack" --maikerumine to fix dissappearing mobs
--and self.state ~= "stand" --maikerumine to fix dissappearing mobs
and self.state ~= "stand" --maikerumine to fix dissappearing mobs
and not self.tamed then
print ("REMOVED " .. self.name)
--print ("REMOVED " .. self.name)
self.object:remove()
@ -2258,7 +2259,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter
end
end
end
-- spawn above node
pos.y = pos.y + 1
@ -2835,7 +2836,7 @@ end)
end
end
end
--maikeruminefollow
function mobs:team_player(self,pos)
if tamed == true or

View File

@ -781,6 +781,182 @@ mobs:register_mob("esmobs:horse3", {
})
-- Dog
mobs:register_mob("esmobs:dog", {
type = "npc",
passive = true,
hp_max = 55,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
visual = "mesh",
mesh = "mobs_wolf.x",
textures = {
{"mobs_25.png"},
},
makes_footstep_sound = true,
sounds = {
war_cry = "mobs_wolf_attack",
},
view_range = 15,
stepheight = 1.1,
owner = "",
order = "follow",
floats = {x=0,y=0,z=0},
walk_velocity = 4,
run_velocity = 4,
stepheight = 1.1,
damage = 3,
armor = 200,
attacks_monsters = true,
attack_type = "dogfight",
drops = {
{name = "esmobs:meat_raw",
chance = 1,
min = 2,
max = 3,},
},
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == "esmobs:meat_raw" then
local hp = self.object:get_hp()
if hp + 4 > self.hp_max then return end
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
self.object:set_hp(hp+4)
else
if self.owner == "" then
self.owner = clicker:get_player_name()
else
local formspec = "size[8,4]"
formspec = formspec .. "textlist[2.85,0;2.1,0.5;dialog;What can I do for you?]"
formspec = formspec .. "button_exit[1,1;2,2;dfollow;follow]"
formspec = formspec .. "button_exit[5,1;2,2;dstand;stand]"
formspec = formspec .. "button_exit[0,2;4,4;dfandp;follow and protect]"
formspec = formspec .. "button_exit[4,2;4,4;dsandp;stand and protect]"
formspec = formspec .. "button_exit[1,2;2,2;dgohome; go home]"
formspec = formspec .. "button_exit[5,2;2,2;dsethome; sethome]"
minetest.show_formspec(clicker:get_player_name(), "order", formspec)
minetest.register_on_player_receive_fields(function(clicker, formname, fields)
if fields.dfollow then
self.order = "follow"
self.attacks_monsters = false
end
if fields.dstand then
self.order = "stand"
self.attacks_monsters = false
end
if fields.dfandp then
self.order = "follow"
self.attacks_monsters = true
end
if fields.dsandp then
self.order = "stand"
self.attacks_monsters = true
end
if fields.dsethome then
self.floats = self.object:getpos()
end
if fields.dgohome then
if self.floats then
self.order = "stand"
self.object:setpos(self.floats)
end
end
end)
end
end
end,
animation = {
speed_normal = 20,
speed_run = 30,
stand_start = 10,
stand_end = 20,
walk_start = 75,
walk_end = 100,
run_start = 100,
run_end = 130,
punch_start = 135,
punch_end = 155,
},
jump = true,
step = 1,
blood_texture = "mobs_blood.png",
})
-- Wolf by KrupnoPavel
mobs:register_mob("esmobs:wolf", {
type = "animal",
hp_max = 55,
passive = false,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
visual = "mesh",
mesh = "mobs_wolf.x",
textures = {
{"mobs_26.png"},
},
makes_footstep_sound = true,
sounds = {
war_cry = "mobs_wolf_attack",
},
view_range = 7,
walk_velocity = 2,
run_velocity = 3,
stepheight = 1.1,
damage = 3,
armor = 200,
attack_type = "dogfight",
drops = {
{name = "esmobs:meat_raw",
chance = 1,
min = 2,
max = 3,},
},
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
on_rightclick = function(self, clicker)
tool = clicker:get_wielded_item()
local dog
local ent
if tool:get_name() == "esmobs:meat_raw" then
clicker:get_inventory():remove_item("main", "esmobs:meat_raw")
dog = minetest.add_entity(self.object:getpos(), "esmobs:dog")
ent = dog:get_luaentity()
ent.owner = clicker:get_player_name()
self.object:remove()
end
end,
animation = {
speed_normal = 20,
speed_run = 30,
stand_start = 10,
stand_end = 20,
walk_start = 75,
walk_end = 100,
run_start = 100,
run_end = 130,
punch_start = 135,
punch_end = 155,
},
jump = true,
step = 0.5,
blood_texture = "mobs_blood.png",
})
--REFERENCE
--function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
--mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass", "ethereal:gray_dirt"}, 7, 0, 7000, 2, 31000)
@ -806,4 +982,5 @@ mobs:register_spawn("esmobs:horse", {"default:dirt_with_dry_grass"}, 20, 12, 170
mobs:register_spawn("esmobs:horse2", {"default:dirt_with_dry_grass"}, 20, 12, 17000, 1, 31000)
mobs:register_spawn("esmobs:horse3", {"default:desert_sand"}, 20, 8, 17000, 1, 5)
mobs:register_spawn("esmobs:chickoboo", {"default:dirt_with_grass", "ethereal:bamboo_dirt"}, 15, 10, 12000, 1, 31000)
mobs:register_spawn("esmobs:wolf", {"default:dirt_with_grass","default:dirt","default:snow", "default:snowblock"}, 20, 0, 15000, 1, 31000)

View File

@ -66,10 +66,11 @@ mobs:register_mob("esmobs:dungeon_master", {
mobs:register_mob("esmobs:tree_monster", {
type = "monster",
passive = false,
attack_type = "dogfight",
--attack_type = "dogfight",
attack_type = "explode",
reach = 2,
damage = 2,
hp_min = 7,
hp_min = 17,
hp_max = 33,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
@ -82,9 +83,13 @@ mobs:register_mob("esmobs:tree_monster", {
makes_footstep_sound = true,
sounds = {
random = "mobs_treemonster",
--random = "Fuse",
explode = "explo",
attack = "mobs_treemonster",
war_cry = "Fuse",
},
walk_velocity = 3,
run_velocity = 4,
walk_velocity = 2.5,
run_velocity = 3.5,
jump = true,
view_range = 15,
drops = {
@ -97,7 +102,7 @@ mobs:register_mob("esmobs:tree_monster", {
},
water_damage = 1,
lava_damage = 5,
light_damage = 2,
light_damage = 0,
fall_damage = 0,
group_attack = true,
animation = {
@ -481,9 +486,9 @@ mobs:register_mob("esmobs:herobrines_bloody_ghost", {
--mobs:register_spawn("esmobs:phoenix", {"air","air"}, 6, -1, 170000, 1, 100)
mobs:register_mob("esmobs:paniki", {
type = "monster",
hp_max = 60,
hp_min = 50,
damage = 2,
hp_max = 40,
hp_min = 20,
damage = 1,
collisionbox = {-0.15, -0.2, -0.15, 0.15, 0.2, 0.15},
visual = "mesh",
mesh = "phoenix.b3d", --paniki from minetest defense
@ -493,8 +498,8 @@ mobs:register_mob("esmobs:paniki", {
lifetimer = 500,
floats=1,
rotate = 270,
walk_velocity = 1.5,
run_velocity = 2.5,
walk_velocity = 0.5,
run_velocity = 2.0,
fall_speed = 2,
stepheight = 1,
sounds = {
@ -522,7 +527,7 @@ mobs:register_mob("esmobs:paniki", {
armor = 60,
--drawtype = "side",
water_damage = 5,
lava_damage = 0,
lava_damage = 40,
light_damage = 10,
--fear_height = 70,
on_rightclick = nil,
@ -581,7 +586,7 @@ mobs:register_mob("esmobs:phoenix", {
damage = 2,
--jump = true,
drops = {
{name = "esmobs:feather",
chance = 1,
min = 1,
@ -683,7 +688,7 @@ mobs:register_mob("esmobs:bomber", {
arrow = "esmobs:stone_monster",
--arrow = "esmobs:smbullet",
reach = 1,
shoot_interval = 2,
shoot_interval = 10,
animation = {
speed_normal = 22,
@ -1130,20 +1135,20 @@ mobs:register_spawn("esmobs:chickoboo", {"default:dirt_with_dry_grass"},{"air"},
--function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
--function (mod_name_here):spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
mobs:register_spawn("esmobs:spider", {"default:stone" ,"default:cobble","group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 6, -1, 24000, 1, 31000)
mobs:register_spawn("esmobs:applmons", {"default:stone","nether:rack", "esmobs:cursed_stone"}, 6, -1, 4000, 5, -30)
mobs:register_spawn("esmobs:applmons", {"default:stone","nether:rack", "esmobs:cursed_stone"}, 6, -1, 4000, 1, -30)
mobs:register_spawn("esmobs:herobrines_bloody_ghost", {"default:stone","default:desert_sand","nether:brick", "bedrock2:bedrock"}, 4, -1, 22000, 1, -6030)
mobs:register_spawn("esmobs:bone_monster", {"default:stone_with_iron","bones:bones","esmobs:bones", "bedrock2:bedrock","default:stone"},6, -1, 17000, 3, 31000)
mobs:register_spawn("esmobs:bone_monster", {"default:stone_with_iron","bones:bones","esmobs:bones", "bedrock2:bedrock","default:stone"},6, -1, 17000, 1, 31000)
mobs:register_spawn("esmobs:icemon", {"default:ice"}, 5, -1, 14000, 1, 3100)
mobs:register_spawn("esmobs:snowmon", {"default:snow","default:snowblock","default:snow_block", "default:dirt_with_snow"}, 5, -1, 14000, 12, 31000)
mobs:register_spawn("esmobs:watermon", {"default:water_source","default:water_flowing"}, 5, -1, 14000, 5, -120)
mobs:register_spawn("esmobs:dirt2", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 16000, 2, -100)
mobs:register_spawn("esmobs:stone_monster2", {"default:stone","bedrock2:bedrock"}, 5, -1, 14000, 3, -500)
mobs:register_spawn("esmobs:dungeon_master", {"default:stone"}, 2, 0, 7000, 2, -70)
mobs:register_spawn("esmobs:snowmon", {"default:snow","default:snowblock","default:snow_block", "default:dirt_with_snow"}, 5, -1, 14000, 1, 31000)
mobs:register_spawn("esmobs:watermon", {"default:water_source","default:water_flowing"}, 5, -1, 14000, 1, -120)
mobs:register_spawn("esmobs:dirt2", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 16000, 1, -100)
mobs:register_spawn("esmobs:stone_monster2", {"default:stone","bedrock2:bedrock"}, 5, -1, 14000, 1, -500)
mobs:register_spawn("esmobs:dungeon_master", {"default:stone"}, 2, 0, 7000, 1, -70)
mobs:register_spawn("esmobs:tree_monster", {"default:leaves", "default:jungleleaves","default:dirt", "default:jungletree"}, 5, 0, 14000, 1, 31000)
mobs:register_spawn("esmobs:sand_monster", {"default:sand", "meru:stone","group:sand"},4, -1, 14000, 1, 31000)
mobs:register_spawn("esmobs:stone_monster", {"default:stone", "bedrock2:bedrock"}, 5, 2, 9000, 20, 31000)
mobs:register_spawn("esmobs:oerkki", { "default:stone"}, 4, -1, 2000, 3, -70)
mobs:register_spawn("esmobs:dirt", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 2, 31000)
mobs:register_spawn("esmobs:phoenix",{"air"}, 4,-1, 16000, 1, 90,false)
mobs:register_spawn("esmobs:paniki", {"default:stone_with_coal", "default:stone"}, 5,-1, 11000, 1, 90,false)
mobs:register_spawn("esmobs:bomber", {"air"}, 4,-1, 18000, 1, 90,false)
mobs:register_spawn("esmobs:stone_monster", {"default:stone", "bedrock2:bedrock"}, 5, 2, 9000, 1, 31000)
mobs:register_spawn("esmobs:oerkki", { "default:stone"}, 4, -1, 2000, 1, -70)
mobs:register_spawn("esmobs:dirt", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, 31000)
--mobs:register_spawn("esmobs:phoenix",{"air"}, 4,-1, 16000, 1, 90,false)
mobs:register_spawn("esmobs:paniki", {"air", "default:stone_with_coal", "default:stone"}, 5,-1, 13100, 1, 20,false)
--mobs:register_spawn("esmobs:bomber", {"air"}, 4,-1, 18000, 1, 90,false)

View File

@ -2084,7 +2084,7 @@ mobs:register_mob("esmobs:Maikerumine", {
water_damage = 0,
lava_damage = 50,
light_damage = 0,
fear_height = 5,
fear_height = 4,
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local_chat(clicker:getpos(),"Maikerumine: Maybe a new game is in the works... Hmmm...",3)

View File

@ -1,5 +1,5 @@
name = "The Bomber",
type = "Monster",
hp = "50-60",
drops = "sand, feather, chicken, bomb",
info = "He shoots Bone Monsters at you, they shoot too!",
drops = "sand, feather, chicken, stone_monster",
info = "He drops stone_monsters at you, they tough too!",

View File

@ -0,0 +1,5 @@
name = "Dog",
type = "Animal",
hp = "55",
drops = "raw_meat",
info = "Right click to command.",

View File

@ -0,0 +1,5 @@
name = "Wolf",
type = "Animal",
hp = "55",
drops = "meat",
info = "Right click with raw meat to tame into dog.",

View File

@ -2,4 +2,4 @@ name = "Phoenix Bat",
type = "Monster",
hp = "50-60",
drops = "sand, feather, gold, chicken",
info = "Hide at night, fireballs are lethal!",
info = "Hide at night, fireballs are lethal! Look out for the mini bats too!",

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -244,7 +244,8 @@ mobs:register_egg("esmobs:horse3", "Arabic Horse", "mobs_horse_ara_inv.png", 0)
mobs:register_egg("esmobs:horseh1", "Tamed Brown Horse", "mobs_horse_inv.png", 0)
mobs:register_egg("esmobs:horsepegh1", "Tamed White Horse", "mobs_horse_peg_inv.png", 0)
mobs:register_egg("esmobs:horsearah1", "Tamed Arabic Horse", "mobs_horse_ara_inv.png", 0)
mobs:register_egg("esmobs:wolf", "Wolf", "wool_grey.png", 1)
mobs:register_egg("esmobs:dog", "Dog", "wool_brown.png", 1)
--MT monster spawn eggs
mobs:register_egg("esmobs:tree_monster", "Tree Monster", "default_tree_top.png", 1)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB