1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Update mobs mod

- Add Yeti monster (not over), spawn on snow biome, attack with snowball(arrow), equivalent to Mese Monster but in surface
- Add Minotaur monster (not over), move slowly  and attack sowly, but do big damage
- Fix the "colisionbox" and "view range" of the zombie
- Wolf can now be tamed into dog - he has modified skills (3 damages, move more slower, different texture, run and walk more slowly)
- NPC now do 4 damage when tamed (6 damage when neutral/enemy)
This commit is contained in:
Quentin BUISSON-DEBON
2015-05-05 13:37:37 +02:00
parent 1287bd78c6
commit aeb83ed122
169 changed files with 253 additions and 83512 deletions

View File

@ -0,0 +1,74 @@
-- Wolf by KrupnoPavel
mobs:register_mob("mobs:wolf", {
-- animal, monster, npc, barbarian
type = "monster",
-- agressive, does 4 damage to player when hit
passive = false,
attack_type = "dogfight",
damage = 3, -- 2 damage less than wolf
-- health & armor
hp_min = 15, hp_max = 20, armor = 200,
-- textures and model
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
visual = "mesh",
mesh = "mobs_wolf.x",
drawtype = "front",
textures = {
{"mobs_wolf.png"},
},
--visual_size = {x=1,y=1}, --Quel valeur lui mettre ?
blood_texture = "mobs_blood.png",
-- sounds
makes_footstep_sound = true,
sounds = {
random = "mobs_wolf",
},
-- speed and jump
walk_velocity = 3,
run_velocity = 5,
jump = true,
view_range = 16,
-- drops mese or diamond when dead
drops = {
{name = "mobs:meat_raw",
chance = 1,
min = 2,
max = 3,},
{name = "maptools:copper_coin",
chance = 2,
min = 1,
max = 4,},
},
-- damaged by
water_damage = 1,
lava_damage = 5,
light_damage = 2,
-- model animation
animation = {
stand_start = 0, stand_end = 14,
walk_start = 15, walk_end = 38,
run_start = 40, run_end = 63,
punch_start = 40, punch_end = 63,
speed_normal = 15, speed_run = 15,
},
-- right clicking with "raw meat" 4 times will tame the wolf into a friendly dog
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == "mobs:raw_meat" and self.raw_meat_count == 4 then
clicker:get_inventory():remove_item("main", "mobs:meat_raw")
minetest.add_entity(self.object:getpos(), "mobs:dog")
self.object:remove()
local dog_obj = minetest.add_entity(self.object:getpos(), "mobs:dog")
dog_obj.tamed == true
if dog_obj.owner == "" then
self.owner = clicker:get_player_name()
else return end
elseif item:get_name() == "mobs:raw_meat" and self.raw_meat_count ~= 4 then
self.raw_meat_count = (self.raw_meat_count or 0) + 1
else return end
end
})
mobs:register_spawn("mobs:wolf", {"default:dirt_with_grass"}, 3, -1, 9500, 1, 31000)
mobs:register_egg("mobs:wolf", "Wolf", "mobs_wolf_inv.png", 1)

View File

@ -24,13 +24,15 @@ dofile(minetest.get_modpath("mobs").."/sandmonster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/stonemonster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/treemonster.lua") -- PilzAdam
dofile(minetest.get_modpath("mobs").."/wolf.lua") -- PilzAdam
--dofile(minetest.get_modpath("mobs").."/dog-can-help.lua") -- ???
--dofile(minetest.get_modpath("mobs").."/lava_flan.lua") -- Zeg9 --Remplaced by Lava Slime
dofile(minetest.get_modpath("mobs").."/mese_monster.lua") -- Zeg9
dofile(minetest.get_modpath("mobs").."/spider.lua") -- AspireMint
dofile(minetest.get_modpath("mobs").."/greenslimes.lua") -- davedevils/TomasJLuis/TenPlus1
dofile(minetest.get_modpath("mobs").."/lavaslimes.lua") -- davedevils/TomasJLuis/TenPlus1
dofile(minetest.get_modpath("mobs").."/zombie.lua") -- ???
dofile(minetest.get_modpath("mobs").."/yeti.lua") -- ???
dofile(minetest.get_modpath("mobs").."/minotaur.lua") -- ???
-- begin slimes mobs compatibility changes
-- cannot find mesecons?, craft glue instead

View File

@ -76,7 +76,7 @@ mobs:register_arrow("mobs:mese_arrow", {
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=9},
damage_groups = {fleshy=1},
}, 0)
end,

57
mods/mobs/minotaur.lua Normal file
View File

@ -0,0 +1,57 @@
-- Minotaur Monster by ???
mobs:register_mob("mobs:minotaur", {
-- animal, monster, npc, barbarian
type = "monster",
-- aggressive, deals 6 damage to player when hit
passive = false,
attack_type = "dogfight",
damage = 6,
-- health & armor
hp_min = 40,
hp_max = 60,
armor = 90,
-- textures and model
collisionbox = {-0.9,-0.01,-0.9, 0.9,2.5,0.9},
visual = "mesh",
mesh = "mobs_minotaur.b3d",
textures = {
{"mobs_minotaur.png"},
},
rotate = 1.5,
visual_size = {x=1, y=1},
blood_texture = "mobs_blood.png",
-- sounds
makes_footstep_sound = true,
-- sounds = {
-- random = "mobs_zombie",
-- damage = "mobs_zombie_hit",
-- attack = "mobs_zombie_attack",
-- death = "mobs_zombie_death",
-- },
-- speed and jump
walk_velocity = 2,
run_velocity = 4,
jump = true,
floats = 1,
view_range = 16,
-- drops desert_sand and coins when dead
drops = {
{name = "default:desert_sand",
chance = 1, min = 3, max = 5,},
{name = "maptools:copper_coin",
chance = 5, min = 2, max = 4,},
},
water_damage = 1,
lava_damage = 5,
light_damage = 2,
-- model animation
animation = {
speed_normal = 15, speed_run = 15,
stand_start = 0, stand_end = 19,
walk_start = 20, walk_end = 39,
run_start = 20, run_end = 39,
punch_start = 40, punch_end = 50,
},
})

Binary file not shown.

View File

@ -13,7 +13,7 @@ mobs:register_mob("mobs:npc", {
type = "npc",
-- aggressive, deals 6 damage to player/monster when hit
passive = false,
damage = 6,
damage = 6, -- 4 damages if tamed
attack_type = "dogfight",
attacks_monsters = true,
-- health & armor
@ -97,6 +97,7 @@ mobs:register_mob("mobs:npc", {
if self.owner == "" then
self.owner = clicker:get_player_name()
self.damages = 4
else
if self.order == "follow" then
self.order = "stand"

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,5 +1,5 @@
-- Wolf (from Mobs_plus)
-- Wolf by KrupnoPavel
mobs:register_mob("mobs:wolf", {
-- animal, monster, npc, barbarian
@ -7,7 +7,7 @@ mobs:register_mob("mobs:wolf", {
-- agressive, does 4 damage to player when hit
passive = false,
attack_type = "dogfight",
damage = 5,
damage = 5, -- 3 damages if tamed
-- health & armor
hp_min = 15, hp_max = 20, armor = 200,
-- textures and model
@ -24,6 +24,7 @@ mobs:register_mob("mobs:wolf", {
makes_footstep_sound = true,
sounds = {
random = "mobs_wolf",
attack = "mobs_wolf_attack",
},
-- speed and jump
walk_velocity = 3,
@ -52,8 +53,27 @@ mobs:register_mob("mobs:wolf", {
run_start = 40, run_end = 63,
punch_start = 40, punch_end = 63,
speed_normal = 15, speed_run = 15,
},
-- right clicking with "raw meat" 4 times will tame the wolf into a friendly dog
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == "mobs:raw_meat" and self.raw_meat_count == 4 then
clicker:get_inventory():remove_item("main", "mobs:meat_raw")
minetest.add_entity(self.object:getpos(), "mobs:dog")
self.object:remove()
local dog_obj = minetest.add_entity(self.object:getpos(), "mobs:dog")
dog_obj.tamed == true
dog_obj.textures = {{"mobs_dog.png"},},
dog_obj.damage = 3
dog_obj.walk_velocity = 4,
dog_obj.run_velocity = 4,
if dog_obj.owner == "" then
self.owner = clicker:get_player_name()
else return end
elseif item:get_name() == "mobs:raw_meat" and self.raw_meat_count ~= 4 then
self.raw_meat_count = (self.raw_meat_count or 0) + 1
else return end
end
})
mobs:register_spawn("mobs:wolf", {"default:dirt_with_grass"}, 3, -1, 9500, 1, 31000)
mobs:register_egg("mobs:wolf", "Wolf", "mobs_wolf_inv.png", 1)

88
mods/mobs/yeti.lua Normal file
View File

@ -0,0 +1,88 @@
-- Yeti by TenPlus1
mobs:register_mob("mobs:yeti", {
-- animal, monster, npc, barbarian
type = "monster",
-- agressive, deals 7 damage to player when hit
passive = false,
damage = 7,
attack_type = "shoot",
shoot_interval = .75,
arrow = "mobs:snowball",
shoot_offset = 2,
-- health & armor
hp_min = 25,
hp_max = 30,
armor = 90,
-- textures and model
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
visual = "mesh",
mesh = "character.b3d",
textures = {
{"mobs_yeti.png"},
},
visual_size = {x=1, y=1},
blood_texture = "mobs_blood.png",
-- sounds
makes_footstep_sound = true,
sounds = {
random = "mobs_dirtmonster",
attack = "mobs_stonemonster_attack",
death = "mobs_zombie_death",
},
-- speed and jump
view_range = 16,
walk_velocity = 1,
run_velocity = 3,
jump = true,
floats = 1,
-- drops ice when dead
drops = {
{name = "default:ice",
chance = 1,
min = 1,
max = 3,},
},
-- damaged by
water_damage = 1,
lava_damage = 5,
light_damage = 1,
-- model animation
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
})
-- spawn on stone between 20 and -1 light, 1 in 7000 chance, 1 in area below -25
mobs:register_spawn("mobs:yeti", {"default:dirt_with_snow", "default:snowblock", "default:ice"}, 10, -1, 7000, 1, 31000)
-- register spawn egg
mobs:register_egg("mobs:yeti", "Yeti", "default_snow.png", 1)
-- snowball (weapon)
mobs:register_arrow("mobs:snowball", {
visual = "sprite",
visual_size = {x=.5, y=.5},
textures = {"default_snowball.png"},
velocity = 6,
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=7},
}, 0)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=7},
}, 0)
end,
hit_node = function(self, pos, node)
end
})

View File

@ -13,7 +13,7 @@ mobs:register_mob("mobs:zombie", {
hp_max = 40,
armor = 100,
-- textures and model
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
collisionbox = {-0.25, -1, -0.3, 0.25, 0.75, 0.3},
visual = "mesh",
mesh = "mobs_zombie.x",
textures = {
@ -30,11 +30,11 @@ mobs:register_mob("mobs:zombie", {
death = "mobs_zombie_death",
},
-- speed and jump
view_range = 16,
walk_velocity = 1,
run_velocity = 3,
jump = true,
floats = 0,
view_range = 10,
-- drops dirt and coins when dead
drops = {
{name = "maptools:copper_coin",