84 lines
2.0 KiB
Lua
84 lines
2.0 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: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",
|
|
attack_players = true,
|
|
attack_npcs = true,
|
|
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 = 15,
|
|
-- min_light = 0,
|
|
-- max_light = 7,
|
|
-- on_map_load = true
|
|
-- })
|
|
|
|
mobs:register_mob("pyutest_core:human", {
|
|
type = "npc",
|
|
hp_max = 20,
|
|
hp_min = 20,
|
|
walk_velocity = 1,
|
|
run_velocity = 3,
|
|
armor = 100,
|
|
passive = false,
|
|
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"},
|
|
attack_monsters = true,
|
|
group_attack = true,
|
|
view_range = 15,
|
|
reach = 2,
|
|
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 = 7,
|
|
-- min_light = 9,
|
|
-- max_light = 15,
|
|
-- day_toggle = true,
|
|
-- on_map_load = true
|
|
-- })
|