2024-07-10 15:37:25 -06:00

158 lines
3.7 KiB
Lua

PyuTestCore.ENTITY_BLOOD_AMOUNT = 6
PyuTestCore.HUMAN_LIKE_CBOX = {-0.25, -1, -0.25, 0.25, 1, 0.25}
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 = 2.7,
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,
makes_footstep_sound = true,
textures = {
"player.png^[invert:rgb", "player_back.png^[invert:rgb"
}
})
mobs:register_egg("pyutest_core:monster", "Monster Spawn Egg", "egg.png^[multiply:blue", 0)
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,
makes_footstep_sound = true,
})
mobs:register_egg("pyutest_core:human", "Human Spawn Egg", "egg.png^[multiply:peachpuff", 0)
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^[multiply:brown", 0)
mobs:register_mob("pyutest_core:firefly", {
type = "animal",
hp_max = 3,
hp_min = 3,
walk_velocity = 1,
run_velocity = 3,
armor = 100,
passive = true,
stand_chance = 0,
walk_chance = 100,
fly = true,
keep_flying = true,
visual = "sprite",
visual_size = {x = 0.05, y = 0.05},
collisionbox = {
-0.0, -0.0, -0.0, 0.0, 0.0, 0.0
},
textures = {"firefly.png"},
blood_amount = PyuTestCore.ENTITY_BLOOD_AMOUNT,
glow = 7,
})
mobs:register_egg("pyutest_core:firefly", "Firefly Spawn Egg", "egg.png^[multiply:yellow", 0)
local mapgen = minetest.get_mapgen_params().mgname or "???"
if mapgen ~= "flat" and mapgen ~= "singlenode" then
mobs:spawn({
name = "pyutest_core:monster",
nodes = {"group:ground"},
interval = 2,
chance = 2,
active_object_count = 3,
min_light = 0,
max_light = 9,
})
mobs:spawn({
name = "pyutest_core:human",
nodes = {"group:ground"},
interval = 3,
chance = 4,
active_object_count = 3,
min_light = 9,
max_light = 15,
min_height = PyuTestCore_SurfaceBottom,
day_toggle = true,
})
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,
})
mobs:spawn({
name = "pyutest_core:firefly",
nodes = {"group:ground"},
interval = 3,
chance = 3,
active_object_count = 4,
min_light = 0,
max_light = 9,
day_toggle = false,
})
end