116 lines
2.7 KiB
Lua
116 lines
2.7 KiB
Lua
PyuTestCore.ENTITY_BLOOD_AMOUNT = 6
|
|
PyuTestCore.HUMAN_LIKE_CBOX = {-0.25, -1, -0.25, 0.25, 1, 0.25}
|
|
|
|
minetest.register_alias("mapgen_dirt", "pyutest_core:dirt_block")
|
|
mobs.fallback_node = "pyutest_core:dirt_block"
|
|
|
|
mobs:register_mob("pyutest_core:monster", {
|
|
type = "monster",
|
|
hp_max = 20,
|
|
hp_min = 20,
|
|
walk_velocity = 1,
|
|
run_velocity = 3,
|
|
armor = 100,
|
|
passive = false,
|
|
walk_chance = 0,
|
|
stand_chance = 25,
|
|
damage = 5.5,
|
|
attack_chance = 1,
|
|
attack_type = "dogfight",
|
|
pathfinding = 1,
|
|
visual = "upright_sprite",
|
|
visual_size = {x = 1, y = 2},
|
|
collisionbox = PyuTestCore.HUMAN_LIKE_CBOX,
|
|
physical = true,
|
|
blood_amount = PyuTestCore.ENTITY_BLOOD_AMOUNT,
|
|
view_range = 30,
|
|
reach = 2,
|
|
jump = 1,
|
|
group_attack = true,
|
|
|
|
textures = {
|
|
"player.png^[invert:rgb", "player_back.png^[invert:rgb"
|
|
}
|
|
})
|
|
mobs:register_egg("pyutest_core:monster", "Monster Spawn Egg", "egg.png", 0)
|
|
mobs:spawn({
|
|
name = "pyutest_core:monster",
|
|
nodes = {"group:ground"},
|
|
interval = 2,
|
|
chance = 2,
|
|
active_object_count = 8,
|
|
min_light = 0,
|
|
max_light = 9,
|
|
})
|
|
|
|
mobs:register_mob("pyutest_core:human", {
|
|
type = "npc",
|
|
hp_max = 20,
|
|
hp_min = 20,
|
|
walk_velocity = 1,
|
|
run_velocity = 3,
|
|
armor = 100,
|
|
passive = true,
|
|
walk_chance = 50,
|
|
stand_chance = 50,
|
|
damage = 3,
|
|
attack_type = "dogfight",
|
|
pathfinding = 1,
|
|
visual = "upright_sprite",
|
|
visual_size = {x = 1, y = 2},
|
|
collisionbox = PyuTestCore.HUMAN_LIKE_CBOX,
|
|
textures = {"player.png", "player_back.png"},
|
|
follow = {"pyutest_core:coin"},
|
|
runaway = true,
|
|
view_range = 15,
|
|
reach = 2,
|
|
fear_height = 7,
|
|
blood_amount = PyuTestCore.ENTITY_BLOOD_AMOUNT,
|
|
})
|
|
mobs:register_egg("pyutest_core:human", "Human Spawn Egg", "egg.png", 0)
|
|
mobs:spawn({
|
|
name = "pyutest_core:human",
|
|
nodes = {"group:ground"},
|
|
interval = 3,
|
|
chance = 4,
|
|
active_object_count = 5,
|
|
min_light = 9,
|
|
max_light = 15,
|
|
day_toggle = true,
|
|
})
|
|
|
|
mobs:register_mob("pyutest_core:mimic", {
|
|
type = "monster",
|
|
hp_max = 15,
|
|
hp_min = 15,
|
|
walk_velocity = 1,
|
|
run_velocity = 3,
|
|
armor = 100,
|
|
passive = false,
|
|
stand_chance = 1,
|
|
walk_chance = 0,
|
|
damage = 4,
|
|
attack_type = "dogfight",
|
|
pathfinding = 1,
|
|
visual = "cube",
|
|
visual_size = {x = 1, y = 1, z = 1},
|
|
collisionbox = {
|
|
-0.25, -0.5, -0.25, 0.25, 0.5, 0.25
|
|
},
|
|
textures = {"crate.png", "crate.png", "crate.png", "crate.png", "crate.png", "crate.png"},
|
|
view_range = 12,
|
|
blood_amount = PyuTestCore.ENTITY_BLOOD_AMOUNT,
|
|
reach = 2
|
|
})
|
|
mobs:register_egg("pyutest_core:mimic", "Mimic Spawn Egg", "egg.png", 0)
|
|
mobs:spawn({
|
|
name = "pyutest_core:mimic",
|
|
nodes = {"group:ground"},
|
|
interval = 3,
|
|
chance = 18,
|
|
active_object_count = 2,
|
|
min_light = 0,
|
|
max_light = 15,
|
|
day_toggle = true,
|
|
})
|