diff --git a/depends.txt b/depends.txt index a3172c8..58b4e62 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ default mobs intllib? +lucky_block? diff --git a/dirt_monster.lua b/dirt_monster.lua index 675da01..3206e21 100644 --- a/dirt_monster.lua +++ b/dirt_monster.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Dirt Monster by PilzAdam mobs:register_mob("mobs_monster:dirt_monster", { @@ -33,7 +34,7 @@ mobs:register_mob("mobs_monster:dirt_monster", { }, water_damage = 1, lava_damage = 5, - light_damage = 2, + light_damage = 3, fear_height = 4, animation = { speed_normal = 15, @@ -49,10 +50,26 @@ mobs:register_mob("mobs_monster:dirt_monster", { }, }) -mobs:register_spawn("mobs_monster:dirt_monster", - {"default:dirt_with_grass", "ethereal:gray_dirt"}, 7, 0, 7000, 3, 31000, false) + +local spawn_on = "default:dirt_with_grass" + +if minetest.get_modpath("ethereal") then + spawn_on = "ethereal:gray_dirt" +end + +mobs:spawn({ + name = "mobs_monster:dirt_monster", + nodes = {spawn_on}, + min_light = 0, + max_light = 7, + chance = 7000, + active_object_count = 2, + min_height = 0, + day_toggle = false, +}) + mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1) --- compatibility -mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") + +mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") -- compatibility diff --git a/dungeon_master.lua b/dungeon_master.lua index aa6ca6f..d4b55bd 100644 --- a/dungeon_master.lua +++ b/dungeon_master.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Dungeon Master by PilzAdam mobs:register_mob("mobs_monster:dungeon_master", { @@ -58,12 +59,22 @@ mobs:register_mob("mobs_monster:dungeon_master", { }, }) -mobs:register_spawn("mobs_monster:dungeon_master", {"default:stone"}, 7, 0, 7000, 2, -70) + +mobs:spawn({ + name = "mobs_monster:dungeon_master", + nodes = {"default:stone"}, + max_light = 7, + chance = 7000, + active_object_count = 1, + max_height = -70, +}) + mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true) --- compatibility -mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") + +mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") -- compatibility + -- fireball (weapon) mobs:register_arrow("mobs_monster:fireball", { @@ -71,9 +82,11 @@ mobs:register_arrow("mobs_monster:fireball", { visual_size = {x = 1, y = 1}, textures = {"mobs_fireball.png"}, velocity = 6, --- tail = 1, --- tail_texture = "mobs_fireball.png", --- tail_size = 10, + tail = 1, + tail_texture = "mobs_fireball.png", + tail_size = 10, + glow = 5, + expire = 0.1, -- direct hit, no fire... just plenty of pain hit_player = function(self, player) diff --git a/init.lua b/init.lua index 437a214..e39198e 100644 --- a/init.lua +++ b/init.lua @@ -22,4 +22,6 @@ dofile(path .. "/lava_flan.lua") -- Zeg9 dofile(path .. "/mese_monster.lua") dofile(path .. "/spider.lua") -- AspireMint +dofile(path .. "/lucky_block.lua") + print ("[MOD] Mobs Redo 'Monsters' loaded") diff --git a/lava_flan.lua b/lava_flan.lua index 0d00606..b36598b 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Lava Flan by Zeg9 (additional textures by JurajVajda) mobs:register_mob("mobs_monster:lava_flan", { @@ -56,12 +57,21 @@ mobs:register_mob("mobs_monster:lava_flan", { end, }) -mobs:register_spawn("mobs_monster:lava_flan", {"default:lava_source"}, 15, 0, 1000, 3, 0) + +mobs:spawn({ + name = "mobs_monster:lava_flan", + nodes = {"default:lava_source"}, + chance = 1000, + active_object_count = 2, + max_height = 0, +}) + mobs:register_egg("mobs_monster:lava_flan", S("Lava Flan"), "default_lava.png", 1) --- compatibility -mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") + +mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") -- compatibility + -- lava orb minetest.register_craftitem(":mobs:lava_orb", { @@ -77,6 +87,7 @@ minetest.register_craft({ burntime = 80, }) + -- Lava Pick (digs and smelts at same time) local old_handle_node_drops = minetest.handle_node_drops diff --git a/lucky_block.lua b/lucky_block.lua new file mode 100644 index 0000000..38065b6 --- /dev/null +++ b/lucky_block.lua @@ -0,0 +1,19 @@ + +if minetest.get_modpath("lucky_block") then + + lucky_block:add_blocks({ + {"spw", "mobs:dungeon_master", 1, nil, nil, 3, "Billy"}, + {"spw", "mobs:sand_monster", 3}, + {"spw", "mobs:stone_monster", 3, nil, nil, 3, "Bob"}, + {"spw", "mobs:dirt_monster", 3}, + {"spw", "mobs:tree_monster", 3}, + {"spw", "mobs:oerkki", 3}, + {"exp"}, + {"spw", "mobs:spider", 5}, + {"spw", "mobs:mese_monster", 2}, + {"spw", "mobs:lava_flan", 3}, + {"nod", "default:chest", 0, { + {name = "mobs:lava_orb", max = 1}}}, + }) + +end diff --git a/mese_monster.lua b/mese_monster.lua index dbcf209..4fb6d14 100644 --- a/mese_monster.lua +++ b/mese_monster.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Mese Monster by Zeg9 mobs:register_mob("mobs_monster:mese_monster", { @@ -54,19 +55,32 @@ mobs:register_mob("mobs_monster:mese_monster", { }, }) -mobs:register_spawn("mobs_monster:mese_monster", {"default:stone"}, 7, 0, 5000, 2, -20) + +mobs:spawn({ + name = "mobs_monster:mese_monster", + nodes = {"default:stone"}, + max_light = 7, + chance = 5000, + active_object_count = 1, + max_height = -20, +}) + mobs:register_egg("mobs_monster:mese_monster", S("Mese Monster"), "default_mese_block.png", 1) --- compatibility -mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster") + +mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster") -- compatiblity + -- mese arrow (weapon) mobs:register_arrow("mobs_monster:mese_arrow", { visual = "sprite", +-- visual = "wielditem", visual_size = {x = 0.5, y = 0.5}, textures = {"default_mese_crystal_fragment.png"}, + --textures = {"default:mese_crystal_fragment"}, velocity = 6, +-- rotate = 180, hit_player = function(self, player) player:punch(self.object, 1.0, { diff --git a/oerkki.lua b/oerkki.lua index c869531..26aa298 100644 --- a/oerkki.lua +++ b/oerkki.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Oerkki by PilzAdam mobs:register_mob("mobs_monster:oerkki", { @@ -57,9 +58,17 @@ mobs:register_mob("mobs_monster:oerkki", { }, }) -mobs:register_spawn("mobs_monster:oerkki", {"default:stone"}, 7, 0, 7000, 3, -10) + +mobs:spawn({ + name = "mobs_monster:oerkki", + nodes = {"default:stone"}, + max_light = 7, + chance = 7000, + max_height = -10, +}) + mobs:register_egg("mobs_monster:oerkki", S("Oerkki"), "default_obsidian.png", 1) --- compatibility -mobs:alias_mob("mobs:oerkki", "mobs_monster:oerkki") + +mobs:alias_mob("mobs:oerkki", "mobs_monster:oerkki") -- compatiblity diff --git a/readme.md b/readme.md index fd18d2d..eb79726 100644 --- a/readme.md +++ b/readme.md @@ -36,3 +36,5 @@ Stone Monster Tree Monster - Found atop tree's at night time they drop down and look for food in the form of players and animals. Can drop saplings and sometimes an apple or three. + +Lucky Blocks: 11 diff --git a/sand_monster.lua b/sand_monster.lua index d378b99..5c9ac62 100644 --- a/sand_monster.lua +++ b/sand_monster.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Sand Monster by PilzAdam mobs:register_mob("mobs_monster:sand_monster", { @@ -8,6 +9,7 @@ mobs:register_mob("mobs_monster:sand_monster", { passive = false, attack_type = "dogfight", pathfinding = true, + --specific_attack = {"player", "mobs_npc:npc"}, reach = 2, damage = 1, hp_min = 4, @@ -55,9 +57,17 @@ mobs:register_mob("mobs_monster:sand_monster", { ]] }) -mobs:register_spawn("mobs_monster:sand_monster", {"default:desert_sand"}, 20, 0, 7000, 4, 31000) + +mobs:spawn({ + name = "mobs_monster:sand_monster", + nodes = {"default:desert_sand"}, + chance = 7000, + active_object_count = 2, + min_height = 0, +}) + mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1) --- compatibility -mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") + +mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility diff --git a/spider.lua b/spider.lua index ef31b83..7466d15 100644 --- a/spider.lua +++ b/spider.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture) mobs:register_mob("mobs_monster:spider", { @@ -52,17 +53,27 @@ mobs:register_mob("mobs_monster:spider", { }, }) -mobs:register_spawn("mobs_monster:spider", - {"default:desert_stone", "ethereal:crystal_dirt"}, 13, 0, 7000, 3, 71) +local spawn_on = "default:desert_stone" -mobs:register_egg("mobs_monster:spider", S("Spider"), "homedecor_cobweb.png", 1) - --- compatibility -mobs:alias_mob("mobs:spider", "mobs_monster:spider") - --- ethereal crystal spike compatibility -if not minetest.get_modpath("ethereal") then +if minetest.get_modpath("ethereal") then + spawn_on = "ethereal:crystal_dirt" +else minetest.register_alias("ethereal:crystal_spike", "default:sandstone") end minetest.register_alias("mobs:cobweb", "homedecor:cobweb_corner") + +mobs:spawn({ + name = "mobs_monster:spider", + nodes = {spawn_on}, + min_light = 0, + max_light = 12, + chance = 7000, + active_object_count = 1, + min_height = -50, + max_height = 31000, +}) + +mobs:register_egg("mobs_monster:spider", S("Spider"), "mobs_cobweb.png", 1) + +mobs:alias_mob("mobs:spider", "mobs_monster:spider") -- compatibility diff --git a/stone_monster.lua b/stone_monster.lua index 124b730..2351448 100644 --- a/stone_monster.lua +++ b/stone_monster.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Stone Monster by PilzAdam mobs:register_mob("mobs_monster:stone_monster", { @@ -26,7 +27,8 @@ mobs:register_mob("mobs_monster:stone_monster", { }, walk_velocity = 1, run_velocity = 2, - jump = true, + jump_height = 0, + stepheight = 1.1, floats = 0, view_range = 10, drops = { @@ -51,9 +53,17 @@ mobs:register_mob("mobs_monster:stone_monster", { }, }) -mobs:register_spawn("mobs_monster:stone_monster", {"default:stone", "default:desert_stone"}, 7, 0, 7000, 3, 0) + +mobs:spawn({ + name = "mobs_monster:stone_monster", + nodes = {"default:stone", "default:desert_stone"}, + max_light = 7, + chance = 7000, + max_height = 0, +}) + mobs:register_egg("mobs_monster:stone_monster", S("Stone Monster"), "default_stone.png", 1) --- compatibility -mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") + +mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") -- compatibility diff --git a/tree_monster.lua b/tree_monster.lua index 0856955..239cf27 100644 --- a/tree_monster.lua +++ b/tree_monster.lua @@ -1,6 +1,7 @@ local S = mobs.intllib + -- Tree Monster (or Tree Gollum) by PilzAdam mobs:register_mob("mobs_monster:tree_monster", { @@ -31,8 +32,8 @@ mobs:register_mob("mobs_monster:tree_monster", { jump = true, view_range = 15, drops = { - {name = "ethereal:tree_sapling", chance = 3, min = 1, max = 2}, - {name = "ethereal:jungle_tree_sapling", chance = 3, min = 1, max = 2}, + {name = "default:sapling", chance = 3, min = 1, max = 2}, + {name = "default:junglesapling", chance = 3, min = 1, max = 2}, {name = "default:apple", chance = 2, min = 1, max=3}, }, water_damage = 0, @@ -53,16 +54,18 @@ mobs:register_mob("mobs_monster:tree_monster", { }, }) -mobs:register_spawn("mobs_monster:tree_monster", - {"default:leaves", "default:jungleleaves"}, 7, 0, 7000, 3, 31000, false) + +mobs:spawn({ + name = "mobs_monster:tree_monster", + nodes = {"default:leaves", "default:jungleleaves"}, + max_light = 7, + chance = 7000, + min_height = 0, + day_toggle = false, +}) + mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1) --- compatibility -mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster") --- ethereal sapling compatibility -if not minetest.get_modpath("ethereal") then - minetest.register_alias("ethereal:tree_sapling", "default:sapling") - minetest.register_alias("ethereal:jungle_tree_sapling", "default:junglesapling") -end +mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster") -- compatibility