Arrows bug corrected
This commit is contained in:
parent
d02a353368
commit
668fe6eeed
20
README.md
20
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/
|
||||
|
11
api.lua
11
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
|
||||
|
@ -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
|
||||
|
@ -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 = {
|
||||
|
@ -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},
|
||||
|
@ -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},
|
||||
|
@ -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 = {
|
||||
|
@ -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},
|
||||
},
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
BIN
sounds/dmobs_poison.ogg
Normal file
BIN
sounds/dmobs_poison.ogg
Normal file
Binary file not shown.
BIN
sounds/dmobs_thunder.ogg
Normal file
BIN
sounds/dmobs_thunder.ogg
Normal file
Binary file not shown.
BIN
sounds/dmobs_wave.ogg
Normal file
BIN
sounds/dmobs_wave.ogg
Normal file
Binary file not shown.
BIN
sounds/dmobs_wind.ogg
Normal file
BIN
sounds/dmobs_wind.ogg
Normal file
Binary file not shown.
32
spawn.lua
32
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
|
||||
|
BIN
textures/Copyrighted_Image_Reuse_Prohibited_10372.jpg
Normal file
BIN
textures/Copyrighted_Image_Reuse_Prohibited_10372.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
Binary file not shown.
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 1.0 KiB |
Loading…
x
Reference in New Issue
Block a user