1
0
spegling av https://codeberg.org/tenplus1/mobs_monster.git synced 2025-11-02 00:15:25 +01:00

add Land Guards

This commit is contained in:
tenplus1
2021-03-02 13:35:17 +00:00
förälder 57f40cf4b1
incheckning 5723ba508e
16 ändrade filer med 138 tillägg och 5 borttagningar

Visa fil

@@ -60,7 +60,7 @@ mobs:register_mob("mobs_monster:dirt_monster", {
punch_end = 63,
},
-- check surrounding nodes and spawn a specific spider
-- check surrounding nodes and spawn a specific monster
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1

Visa fil

@@ -16,8 +16,8 @@ mobs:register_mob("mobs_monster:dungeon_master", {
shoot_interval = 2.2,
arrow = "mobs_monster:fireball",
shoot_offset = 1,
hp_min = 22,
hp_max = 45,
hp_min = 42,
hp_max = 75,
armor = 60,
collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
visual = "mesh",

Visa fil

@@ -28,6 +28,7 @@ dofile(path .. "tree_monster.lua")
dofile(path .. "lava_flan.lua") -- Zeg9
dofile(path .. "mese_monster.lua")
dofile(path .. "spider.lua") -- AspireMint
dofile(path .. "land_guard.lua")
-- Load custom spawning

127
land_guard.lua Normal file
Visa fil

@@ -0,0 +1,127 @@
local S = mobs.intllib
local guard_types = {
{ nodes = {
"default:snow", "default:snowblock", "default:ice",
"default:dirt_with_snow"
},
skins = {"mobs_land_guard6.png", "mobs_land_guard7.png", "mobs_land_guard8.png"},
drops = {
{name = "default:ice", chance = 1, min = 1, max = 4},
{name = "mobs:leather", chance = 2, min = 0, max = 2},
{name = "default:diamond", chance = 4, min = 0, max = 2},
},
},
{ nodes = {
"ethereal:dry_dirt", "default:sand", "default:desert_sand",
"default:dry_dirt_with_dry_grass", "default:dry_dirt"
},
skins = {"mobs_land_guard4.png", "mobs_land_guard5.png"},
drops = {
{name = "default:sandstone", chance = 1, min = 1, max = 4},
{name = "mobs:leather", chance = 2, min = 0, max = 2},
{name = "default:mese_crystal", chance = 4, min = 0, max = 2},
},
}
}
-- Land Guard
mobs:register_mob("mobs_monster:land_guard", {
type = "monster",
passive = false,
attack_type = "dogfight",
group_attack = true,
reach = 3,
damage = 15,
hp_min = 30,
hp_max = 65,
armor = 50,
collisionbox = {-0.5, -1.01, -0.5, 0.5, 1.6, 0.5},
visual_size = {x = 1, y = 1},
visual = "mesh",
mesh = "mobs_dungeon_master.b3d",
textures = {
{"mobs_land_guard.png"},
{"mobs_land_guard2.png"},
{"mobs_land_guard3.png"}
},
makes_footstep_sound = true,
sounds = {
random = "mobs_dungeonmaster",
},
walk_velocity = 1.5,
run_velocity = 3.4,
jump = true,
jump_height = 2.0,
floats = 0,
view_range = 15,
drops = {
{name = "mobs:leather", chance = 2, min = 0, max = 2},
{name = "default:mese_crystal", chance = 3, min = 0, max = 2},
{name = "default:diamond", chance = 4, min = 0, max = 1},
},
water_damage = 0,
lava_damage = 6,
light_damage = 0,
fear_height = 8,
animation = {
stand_start = 0,
stand_end = 19,
walk_start = 20,
walk_end = 35,
punch_start = 36,
punch_end = 48,
speed_normal = 15,
speed_run = 20,
},
-- check surrounding nodes and spawn a specific guard
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1
local tmp
for n = 1, #guard_types do
tmp = guard_types[n]
if minetest.find_node_near(pos, 1, tmp.nodes) then
self.base_texture = { tmp.skins[math.random(#tmp.skins)] }
self.object:set_properties({textures = self.base_texture})
self.docile_by_day = tmp.docile
if tmp.drops then
self.drops = tmp.drops
end
return true
end
end
return true -- run only once, false/nil runs every activation
end,
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:land_guard",
nodes = {
"default:snow", "default:ice", "default:stone",
"default:dry_dirt_with_dry_grass", "ethereal:dry_dirt"
},
max_light = 7,
chance = 25000,
min_height = 0,
active_object_count = 1,
})
end
mobs:register_egg("mobs_monster:land_guard", S("Land Guard"), "default_ice.png", 1)

Visa fil

@@ -27,7 +27,7 @@ Sand Monster
Spiders
- Snowy spiders are found on higher cold areas, Tarantula's in higher jungle, Cave spider below -20 and Mese spider near areas containing the ore and Crystal spiders only in Ethereal's crystal biomes. Some are docile during the daytime and will drop string when killed.
- Snowy spiders are found on higher cold areas, spitting Tarantula's in higher jungle, small Cave spider below -20 and Mese spider near areas containing the ore and Crystal spiders only in Ethereal's crystal biomes. Some are docile during the daytime and will drop string when killed.
Stone Monster
@@ -37,4 +37,8 @@ Tree Monster
- Found atop tree's at night time they drop down and look for food in the form of players and animals. Can drop saplings and sometimes an apple or three.
Land Guard
- These huge monsters roam the land in cold, hot and temperate areas and don't like players wandering around their domain.
Lucky Blocks: 11

Visa fil

@@ -49,6 +49,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
mesh = "mobs_sand_monster.b3d",
textures = {
{"mobs_sand_monster.png"},
{"mobs_sand_monster2.png"},
},
blood_texture = "default_desert_sand.png",
makes_footstep_sound = true,

Binär
textures/mobs_land_guard.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 1.2 KiB

Binär
textures/mobs_land_guard2.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 2.6 KiB

Binär
textures/mobs_land_guard3.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 3.4 KiB

Binär
textures/mobs_land_guard4.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 2.6 KiB

Binär
textures/mobs_land_guard5.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 2.5 KiB

Binär
textures/mobs_land_guard6.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 3.5 KiB

Binär
textures/mobs_land_guard7.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 2.4 KiB

Binär
textures/mobs_land_guard8.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 2.6 KiB

Binär
textures/mobs_sand_monster2.png Normal file

Binary file not shown.

Efter

Bredd:  |  Höjd:  |  Storlek: 778 B

Visa fil

@@ -98,7 +98,7 @@ mobs:register_mob("mobs_monster:tree_monster", {
punch_end = 62,
},
-- check surrounding nodes and spawn a specific spider
-- check surrounding nodes and spawn a specific tree monster
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1