diff --git a/fire_spirit.lua b/fire_spirit.lua new file mode 100644 index 0000000..6e9bea9 --- /dev/null +++ b/fire_spirit.lua @@ -0,0 +1,98 @@ + +local S = mobs.intllib + +local mob_drops = { + {name = "fireflies:firefly", chance = 1, min = 1, max = 1} +} + +if minetest.get_modpath("ethereal") then + + table.insert(mob_drops, + {name = "ethereal:fire_dust", chance = 1, min = 1, max = 1}) +end + +-- Fire Spirit + +mobs:register_mob("mobs_monster:fire_spirit", { + type = "monster", + passive = false, + attack_type = "dogfight", + pathfinding = true, + reach = 2, + damage = 4, + hp_min = 25, + hp_max = 45, + armor = 100, + collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + visual_scale = {x = 0.5, y = 0.5, z = 0.5}, + visual = "sprite", + textures = { + {"mobs_fire_spirit.png"} + }, + glow = 14, + blood_texture = "fire_basic_flame.png", + immune_to = { + {"bucket:bucket_water", 1}, + {"bucket:bucket_river_water", 1}, + {"all"} + }, + makes_footstep_sound = false, + sounds = { + random = "fire_fire", + damage = "fire_extinguish_flame", + death = "fire_extinguish_flame" + }, + view_range = 14, + walk_velocity = 2, + run_velocity = 3, + jump = true, + jump_height = 6, + drops = mob_drops, + water_damage = 1, + lava_damage = 0, + fire_damage = 0, + light_damage = 0, + fall_damage = false, + fear_height = 8, + animation = {}, + + on_die = function(self, pos) + + mobs:effect(pos, 20, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false) + + self.object:remove() + end, + + do_custom = function(self, dtime) + + self.flame_timer = (self.flame_timer or 0) + dtime + + if self.flame_timer < 0.25 then + return + end + + self.flame_timer = 0 + + local pos = self.object:get_pos() + + -- pos, amount, texture, min_size, max_size, radius, gravity, glow, fall + mobs:effect(pos, 5, "fire_basic_flame.png", 1, 2, 0.1, 0.2, 14, nil) + end +}) + + +if not mobs.custom_spawn_monster then +mobs:spawn({ + name = "mobs_monster:fire_spirit", + nodes = {"default:obsidian", "caverealms:hot_cobble"}, + neighbors = {"group:fire"}, + min_light = 12, + max_light = 15, + chance = 1500, + active_object_count = 1, + max_height = -150 +}) +end + + +mobs:register_egg("mobs_monster:fire_spirit", S("Fire Spirit"), "fire_basic_flame.png", 1) diff --git a/init.lua b/init.lua index 29d5516..c9d67bf 100644 --- a/init.lua +++ b/init.lua @@ -30,6 +30,7 @@ dofile(path .. "mese_monster.lua") dofile(path .. "spider.lua") -- AspireMint dofile(path .. "minotaur.lua") -- NALC(sys4 fork MFF) Kalabasa dofile(path .. "land_guard.lua") +dofile(path .. "fire_spirit.lua") -- Load custom spawning diff --git a/lava_flan.lua b/lava_flan.lua index 6e355fe..1e957e3 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -36,7 +36,7 @@ mobs:register_mob("mobs_monster:lava_flan", { {name = "mobs:lava_orb", chance = 15, min = 1, max = 1}, }, water_damage = 8, - lava_damage = 0, + lava_damage = -1, fire_damage = 0, light_damage = 0, immune_to = { @@ -53,7 +53,7 @@ mobs:register_mob("mobs_monster:lava_flan", { run_start = 20, run_end = 28, punch_start = 20, - punch_end = 28, + punch_end = 28 }, on_die = function(self, pos) @@ -174,9 +174,13 @@ minetest.register_tool(":mobs:pick_lava", { inventory_image = "mobs_pick_lava.png", tool_capabilities = { full_punch_interval = 0.4, - max_drop_level=3, - groupcaps={ - cracky = {times={[1]=1.80, [2]=0.80, [3]=0.40}, uses=40, maxlevel=3}, + max_drop_level = 3, + groupcaps = { + cracky = { + times = {[1] = 1.80, [2] = 0.80, [3] = 0.40}, + uses = 40, + maxlevel = 3 + } }, damage_groups = {fleshy = 6, fire = 1}, }, @@ -189,7 +193,7 @@ minetest.register_craft({ recipe = { {"mobs:lava_orb", "mobs:lava_orb", "mobs:lava_orb"}, {"", "default:obsidian_shard", ""}, - {"", "default:obsidian_shard", ""}, + {"", "default:obsidian_shard", ""} } }) @@ -253,7 +257,7 @@ mobs:register_mob("mobs_monster:obsidian_flan", { run_start = 20, run_end = 28, punch_start = 20, - punch_end = 28, + punch_end = 28 } }) @@ -296,9 +300,11 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", { local radius = 1 local def = minetest.registered_nodes[node] + if def then - node = { name = node } + node = {name = node} end + if def and def.tiles and def.tiles[1] then texture = def.tiles[1] end @@ -325,7 +331,7 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", { texture = texture, -- ^ only as fallback for clients without support for `node` parameter node = node, - collisiondetection = true, + collisiondetection = true }) minetest.set_node(pos, {name = "air"}) diff --git a/readme.md b/readme.md index cd03fcb..424777f 100644 --- a/readme.md +++ b/readme.md @@ -41,4 +41,8 @@ Land Guard - These huge monsters roam the land in cold, hot and temperate areas and don't like players wandering around their domain. +Fire Spirit + +- Fire Spirits will not tolerate players roaming around their domain and will fiercely attack until their dying puff of smoke. Will drop it's spirit and some fire dust when using ethereal. + Lucky Blocks: 11 diff --git a/textures/mobs_fire_spirit.png b/textures/mobs_fire_spirit.png new file mode 100644 index 0000000..4a31242 Binary files /dev/null and b/textures/mobs_fire_spirit.png differ