diff --git a/README.md b/README.md index 37311ef..99ef06e 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,29 @@ Thanks to TenPlus1, blert2112, and taikedz + +## Grossam's fork changes log + +* 2019-07-31 : + * spawn.lua rewritten using mobs:spawn() + * spawn rules modified for more consistency (e.g. hedgehogs now spawn at night) + * some sounds and textures added + * dragon arrow bug corrected + * elemental an great drangons can fly in water (still take damages from it !) + * great dragons may spawn in caverealms * 2019-07-28 : * some little bugs corrected * dragon_normal described as 'minor dragons' and now they can spawn * ice dragons are now named "Blue dragon" * hatched great dragons are tamed now * great dragons now need a diamond block nest (you've to deserve greatness !) +* 2019-07-27 : + * Forked on https://git.fwhost.eu/Grossam/dmobs + + +## Credits + +* dmobs_thunder.ogg : https://freesound.org/people/Josh74000MC/sounds/475094/ +* dmobs_wind.ogg : https://freesound.org/people/Pedaling%20Prince/sounds/338952/ +* dmobs_poison.ogg : https://freesound.org/people/qubodup/sounds/182789/ +* dmobs_wave.ogg : https://freesound.org/people/Kayyy/sounds/61011/ diff --git a/api.lua b/api.lua index 030eaa0..e11ae2c 100644 --- a/api.lua +++ b/api.lua @@ -160,9 +160,12 @@ function object_fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim local yaw = entity.driver:get_look_yaw(); local pos = entity.object:get_pos() local node = minetest.get_node(pos).name - if node == "default:water_source" or node == "default:river_water_source" or node == "default:river_water_flowing" or node == "default:water_flowing" then - entity.object:set_velocity({x=velo.x*0.9, y=-1, z=velo.z*0.9}) - elseif ctrl.up then + +-- Commented condition makes dragons stuck in water, lava and so on… +-- if node == "default:water_source" or node == "default:river_water_source" or node == "default:river_water_flowing" or node == "default:water_flowing" or node == "default:lava_source" or node == "default:lava_flowing" then +-- entity.object:set_velocity({x=velo.x*0.5, y=velo.y*0.5, z=velo.z*0.5}) +-- end + if ctrl.up then entity.object:set_yaw(yaw+math.pi+math.pi/2) entity.object:set_velocity(vec_forward) elseif ctrl.down then @@ -202,8 +205,8 @@ function object_fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim end end ---lib_mount (not required by new functions) +--lib_mount (not required by new functions) local function is_group(pos, group) local nn = minetest.get_node(pos).name diff --git a/arrows/dragonarrows.lua b/arrows/dragonarrows.lua index 81e7fee..ffecbbd 100644 --- a/arrows/dragonarrows.lua +++ b/arrows/dragonarrows.lua @@ -1,7 +1,10 @@ +local name = {} + local base_arrow = { visual = "sprite", visual_size = {x = 0.5, y = 0.5}, velocity = 8, + textures = {}, tail = 1, -- enable tail tail_texture = "dmobs_ice.png", @@ -25,6 +28,7 @@ local base_arrow = { } for _,arrowtype in pairs( {"ice","lightning","poison"} ) do - base_arrow.textures = {"dmobs_"..arrowtype..".png"}, - mobs:register_arrow("dmobs:"..arrowtype, dmobs.deepclone(base_arrow) ) + base_arrow.textures = {"dmobs_"..arrowtype..".png"} + name = "dmobs:"..arrowtype + mobs:register_arrow(name, dmobs.deepclone(base_arrow) ) end diff --git a/dragons/dragon1.lua b/dragons/dragon1.lua index 6adec82..b0e32bf 100644 --- a/dragons/dragon1.lua +++ b/dragons/dragon1.lua @@ -39,14 +39,15 @@ local dragondef = { run_velocity = 5, jump = true, fly = true, + fly_in = {"air","default:water_source", "default:water_flowing", "default:lava_source", "default:lava_flowing"}, drops = { {name = "dmobs:egg", chance = 1, min = 1, max = 1}, {name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1}, }, fall_speed = 0, stepheight = 10, - water_damage = 2, - lava_damage = 0, + water_damage = 3, + lava_damage = 1, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/dragon2.lua b/dragons/dragon2.lua index f6b27e3..7931769 100644 --- a/dragons/dragon2.lua +++ b/dragons/dragon2.lua @@ -33,12 +33,13 @@ local dragondef = { pathfinding = true, fall_damage = 0, sounds = { - shoot_attack = "mobs_fireball", + shoot_attack = "dmobs_thunder", }, walk_velocity = 3, run_velocity = 5, jump = true, fly = true, + fly_in = {"air","default:water_source","default:water_flowing"}, drops = { {name = "dmobs:egg", chance = 1, min = 1, max = 1}, {name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1}, diff --git a/dragons/dragon3.lua b/dragons/dragon3.lua index 12b9383..30b98e9 100644 --- a/dragons/dragon3.lua +++ b/dragons/dragon3.lua @@ -33,12 +33,13 @@ local dragondef = { pathfinding = true, fall_damage = 0, sounds = { - shoot_attack = "mobs_fireball", + shoot_attack = "dmobs_poison", }, walk_velocity = 3, run_velocity = 5, jump = true, fly = true, + fly_in = {"air","default:water_source","default:water_flowing"}, drops = { {name = "dmobs:egg", chance = 1, min = 1, max = 1}, {name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1}, diff --git a/dragons/dragon4.lua b/dragons/dragon4.lua index 53f5dff..22ba68e 100644 --- a/dragons/dragon4.lua +++ b/dragons/dragon4.lua @@ -33,20 +33,21 @@ local dragondef = { pathfinding = true, fall_damage = 0, sounds = { - shoot_attack = "mobs_fireball", + shoot_attack = "dmobs_wind.ogg", }, walk_velocity = 3, run_velocity = 5, jump = true, fly = true, + fly_in = {"air","default:water_source","default:water_flowing"}, drops = { {name = "dmobs:egg", chance = 1, min = 1, max = 1}, {name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1}, }, fall_speed = 0, stepheight = 10, - water_damage = 2, - lava_damage = 0, + water_damage = 1, + lava_damage = 2, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/great_dragon.lua b/dragons/great_dragon.lua index 4c17b34..1c1b8ab 100644 --- a/dragons/great_dragon.lua +++ b/dragons/great_dragon.lua @@ -37,6 +37,7 @@ local gdragon_base = { run_velocity = 5, jump = true, fly = true, + fly_in = {"air","default:water_source","default:water_flowing", "default:lava_source","default:lava_flowing"}, drops = { {name = "dmobs:dragon_egg_great", chance = 1, min = 1, max = 1}, }, diff --git a/dragons/main.lua b/dragons/main.lua index 30491c2..cb659f4 100644 --- a/dragons/main.lua +++ b/dragons/main.lua @@ -38,7 +38,7 @@ minetest.register_craftitem("dmobs:dragon_gem", { -- Wild dragons mobs:register_egg("dmobs:dragon", "Minor Dragon", "default_apple.png", 1) mobs:register_egg("dmobs:dragon1", "Wild Fire Dragon", "default_apple.png", 1) -mobs:register_egg("dmobs:dragon2", "Wild Lightning Dragon", "default_mese_crystal.png", 1) +mobs:register_egg("dmobs:dragon2", "Wild Lightning Dragon", "dmobs_lightning.png", 1) mobs:register_egg("dmobs:dragon3", "Wild Poison Dragon", "dmobs_poison.png", 1) mobs:register_egg("dmobs:dragon4", "Wild Ice Dragon", "default_ice.png", 1) mobs:register_egg("dmobs:dragon_great", "Boss Dragon", "dmobs_egg1.png", 1) @@ -47,7 +47,7 @@ mobs:register_egg("dmobs:wyvern", "Boss Wyvern", "dmobs_egg3.png", 1) -- Tamed dragons mobs:register_egg("dmobs:dragon_red", "Tamed Fire Dragon", "default_apple.png", 1) -mobs:register_egg("dmobs:dragon_black", "Tamed Lightning Dragon", "default_mese_crystal.png", 1) +mobs:register_egg("dmobs:dragon_black", "Tamed Lightning Dragon", "dmobs_lightning.png", 1) mobs:register_egg("dmobs:dragon_green", "Tamed Poison Dragon", "dmobs_poison.png", 1) mobs:register_egg("dmobs:dragon_blue", "Tamed Ice Dragon", "default_ice.png", 1) mobs:register_egg("dmobs:dragon_great_tame", "Tamed Great Dragon", "default_lava_source_animated.png", 1) diff --git a/dragons/water_dragon.lua b/dragons/water_dragon.lua index eb5464c..19604c9 100644 --- a/dragons/water_dragon.lua +++ b/dragons/water_dragon.lua @@ -27,6 +27,7 @@ mobs:register_mob("dmobs:waterdragon", { makes_footstep_sound = true, sounds = { random = "mobs_dirtmonster", + shoot_attack = "dmobs_wave" }, view_range = 15, rotate = 180, @@ -105,9 +106,9 @@ mobs:register_mob("dmobs:waterdragon_2", { blood_texture = "mobs_blood.png", makes_footstep_sound = true, sounds = { - shoot_attack = "mobs_fireball", - random = "velociraptor", - }, + shoot_attack = "dmobs_wave", + random = "velociraptor", + }, view_range = 15, rotate = 180, floats = 0, diff --git a/dragons/wyvern.lua b/dragons/wyvern.lua index d034f48..0b7a7d6 100644 --- a/dragons/wyvern.lua +++ b/dragons/wyvern.lua @@ -37,7 +37,7 @@ mobs:register_mob("dmobs:wyvern", { {name = "dmobs:dragon_gem_lightning", chance = 1, min = 1, max = 1}, }, sounds = { - shoot_attack = "mobs_fireball", + shoot_attack = "dmobs_poison", random = "velociraptor", }, water_damage = 0, diff --git a/sounds/dmobs_poison.ogg b/sounds/dmobs_poison.ogg new file mode 100644 index 0000000..a1ea13a Binary files /dev/null and b/sounds/dmobs_poison.ogg differ diff --git a/sounds/dmobs_thunder.ogg b/sounds/dmobs_thunder.ogg new file mode 100644 index 0000000..9a76bca Binary files /dev/null and b/sounds/dmobs_thunder.ogg differ diff --git a/sounds/dmobs_wave.ogg b/sounds/dmobs_wave.ogg new file mode 100644 index 0000000..32ff31f Binary files /dev/null and b/sounds/dmobs_wave.ogg differ diff --git a/sounds/dmobs_wind.ogg b/sounds/dmobs_wind.ogg new file mode 100644 index 0000000..267f5c9 Binary files /dev/null and b/sounds/dmobs_wind.ogg differ diff --git a/spawn.lua b/spawn.lua index 774bab5..3e06ad7 100644 --- a/spawn.lua +++ b/spawn.lua @@ -64,18 +64,18 @@ if dmobs.regulars then min_light = 0, max_light = 10, interval = 300, chance = 32000, active_object_count = 2, min_height = -30000, max_height = 100}) mobs:spawn({name = "dmobs:treeman", nodes = {"group:leaves"}, neighbor = {}, min_light = 7, max_light = 15, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 2000}) - mobs:spawn({name = "dmobs:skeleton", nodes = {"group:stone"}, neighbor = {}, - min_light = 0, max_light = 10, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 2000}) + mobs:spawn({name = "dmobs:skeleton", nodes = {"group:stone","caverealms:stone_with_salt","default:desert_sand"}, neighbor = {}, + min_light = 0, max_light = 10, interval = 300, chance = 16000, active_object_count = 2, min_height = -31000, max_height = -1000}) -- Orcs and ogres spawn more often when dragons are disabled if not dmobs.dragons then mobs:spawn({name = "dmobs:orc", nodes = {"default:snow_block", "default:permafrost_with_moss", "default:permafrost_with_stone", "ethereal:cold_dirt"}, - neighbor = {}, min_light = 0, max_light = 10, interval = 300, chance = 16000, + neighbor = {}, min_light = 0, max_light = 10, interval = 300, chance = 6000, active_object_count = 2, min_height = 0, max_height = 2000}) mobs:spawn({name = "dmobs:ogre", nodes = {"default:snow_block", "default:permafrost_with_moss", "default:permafrost_with_stone", "ethereal:cold_dirt"}, - neighbor = {}, min_light = 0, max_light = 10, interval = 300, chance = 8000, + neighbor = {}, min_light = 0, max_light = 10, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 2000}) else mobs:spawn({name = "dmobs:orc", @@ -84,7 +84,7 @@ if dmobs.regulars then active_object_count = 2, min_height = 0, max_height = 2000}) mobs:spawn({name = "dmobs:ogre", nodes = {"default:snow_block", "default:permafrost_with_moss", "default:permafrost_with_stone", "ethereal:cold_dirt"}, - neighbor = {}, min_light = 0, max_light = 10, interval = 300, chance = 6000, + neighbor = {}, min_light = 0, max_light = 10, interval = 300, chance = 32000, active_object_count = 2, min_height = 0, max_height = 2000}) end end @@ -96,22 +96,24 @@ end -- Generic dragon always spawn, the others only if enabled mobs:spawn({name = "dmobs:dragon", nodes = {"group:leaves"}, neighbor = {}, - min_light = 5, max_light = 15, interval = 300, chance = 24000, active_object_count = 2, min_height = 0, max_height = 30000}) + min_light = 5, max_light = 15, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 30000}) if dmobs.dragons then mobs:spawn({name = "dmobs:dragon1", nodes = {"ethereal:fiery_dirt", "default:desert_sand"}, neighbor = {}, - min_light = 5, max_light = 15, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 30000}) + min_light = 5, max_light = 15, interval = 300, chance = 24000, active_object_count = 2, min_height = 0, max_height = 30000}) mobs:spawn({name = "dmobs:dragon2", nodes = {"ethereal:crystal_dirt", "default:dirt_with_dry_grass"}, neighbor = {}, - min_light = 5, max_light = 15, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 30000}) + min_light = 5, max_light = 15, interval = 300, chance = 24000, active_object_count = 2, min_height = 0, max_height = 30000}) mobs:spawn({name = "dmobs:dragon3", nodes = {"ethereal:jungle_dirt", "default:jungleleaves"}, neighbor = {}, - min_light = 0, max_light = 10, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 30000}) + min_light = 0, max_light = 10, interval = 300, chance = 24000, active_object_count = 2, min_height = 0, max_height = 30000}) mobs:spawn({name = "dmobs:dragon4", nodes = {"default:snow_block", "default:permafrost_with_moss", "default:permafrost_with_stone", "ethereal:cold_dirt"}, neighbor = {}, - min_light = 5, max_light = 15, interval = 300, chance = 16000, active_object_count = 2, min_height = 0, max_height = 30000}) - mobs:spawn({name = "dmobs:waterdragon", nodes = {"default:water_source"}, neighbor = {}, - min_light = 0, max_light = 15, interval = 300, chance = 1, active_object_count = 2, min_height = -10, max_height = 100}) + min_light = 5, max_light = 15, interval = 300, chance = 24000, active_object_count = 2, min_height = 0, max_height = 30000}) + mobs:spawn({name = "dmobs:waterdragon", nodes = {"default:water_source"}, neighbor = {"air"}, + min_light = 0, max_light = 15, interval = 300, chance = 32000, active_object_count = 2, min_height = -10, max_height = 100}) mobs:spawn({name = "dmobs:wyvern", nodes = {"group:leaves"}, neighbor = {}, - min_light = 0, max_light = 10, interval = 300, chance = 8000, active_object_count = 2, min_height = 0, max_height = 30000}) - mobs:spawn({name = "dmobs:dragon_great", nodes = {"ethereal:jungle_dirt", "default:jungleleaves"}, neighbor = {}, - min_light = 0, max_light = 10, interval = 300, chance = 8000, active_object_count = 2, min_height = -30000, max_height = 30000}) + min_light = 0, max_light = 10, interval = 300, chance = 32000, active_object_count = 2, min_height = 0, max_height = 30000}) + mobs:spawn({name = "dmobs:dragon_great", + nodes = {"ethereal:jungle_dirt", "default:jungleleaves", "default:lava_source", "caverealms:glow_mese", + "caverealms:glow_amethyst", "caverealms:glow_crystal", "caverealms:glow_emerald","cavereals:glow_ruby"}, neighbor = {}, + min_light = 0, max_light = 15, interval = 300, chance = 32000, active_object_count = 2, min_height = -30000, max_height = 30000}) end diff --git a/textures/Copyrighted_Image_Reuse_Prohibited_10372.jpg b/textures/Copyrighted_Image_Reuse_Prohibited_10372.jpg new file mode 100644 index 0000000..34d0b1f Binary files /dev/null and b/textures/Copyrighted_Image_Reuse_Prohibited_10372.jpg differ diff --git a/textures/dmobs_lightning.png b/textures/dmobs_lightning.png index 8495702..cd9017c 100644 Binary files a/textures/dmobs_lightning.png and b/textures/dmobs_lightning.png differ