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" local snowball_hit_player = function (self, player) player:punch(self.object, nil, { damage_groups = {fleshy = 9} }, nil) end mobs:register_arrow("pyutest_core:arrow_snowball", { visual = "sprite", visual_size = {x = 1, y = 1}, textures = {"snowball.png"}, hit_node = function (self, pos) PyuTestCore.create_explosion(pos, 1, false, 9, self.object, false) end, hit_player = snowball_hit_player, hit_mob = snowball_hit_player, velocity = 9, collisionbox = { -1.5, -1.5, -1.5, 1.5, 1.5, 1.5 } }) 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 = { "monster.png", "monster_back.png" } }) mobs:register_egg("pyutest_core:monster", "Monster Spawn Egg", "egg.png^[multiply:darkgreen", 0) mobs:register_mob("pyutest_core:human", { type = "npc", hp_max = 20, hp_min = 20, walk_velocity = 1, run_velocity = 6, 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) mobs:register_mob("pyutest_core:snowman", { type = "monster", hp_max = 450, hp_min = 450, walk_velocity = 1, run_velocity = 4, armor = 100, passive = false, walk_chance = 1, stand_chance = 2, damage = 9, attack_chance = 1, attack_type = "dogshoot", arrow = "pyutest_core:arrow_snowball", shoot_interval = 1.2, shoot_offset = 2, 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 = 35, reach = 2, jump = 1, group_attack = false, makes_footstep_sound = true, dogshoot_switch = 2, dogshoot_count_max = 3, dogshoot_count2_max = 6, textures = { "snowman.png", "snowman_back.png" }, drops = { { name = "pyutest_core:magic_shards", min = 2, max = 5, chance = 1 }, { name = "pyutest_core:snowball", min = 4, max = 9, chance = 1 } } }) mobs:register_egg("pyutest_core:snowman", "Snowman Spawn Egg", "egg.png^[multiply:skyblue", 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 = 6, chance = 4, active_object_count = 3, min_light = 0, max_light = 8, y_max = PyuTestCore_WorldTop, y_min = PyuTestCore_SurfaceBottom }) mobs:spawn({ name = "pyutest_core:monster", nodes = {"group:ground"}, interval = 2, chance = 2, active_object_count = 6, min_light = 0, max_light = 8, y_max = PyuTestCore_DeepOceanMin - 1, y_min = PyuTestCore_WorldBottom }) 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