2014-10-28 18:01:32 +01:00
|
|
|
|
|
|
|
-- Dungeon Master (This one spits out fireballs at you)
|
|
|
|
|
2014-12-18 20:09:07 +01:00
|
|
|
-- Node which cannot be destroyed by DungeonMasters' fireballs
|
|
|
|
local excluded = {"nether:netherrack","default:obsidian_glass","maptools:cobble",
|
|
|
|
"maptools:sand", "maptools:desert_sand"
|
|
|
|
}
|
|
|
|
|
2014-10-28 18:01:32 +01:00
|
|
|
mobs:register_mob("mobs:dungeon_master", {
|
|
|
|
type = "monster",
|
Tweaks mobs
- un peu plus de vie pour le sandmonster,
- un peu plus de vie pour le dirtmonster, plus de dommages, meilleur
drop de copper_coin,
- un peu plus de vie, et vie plus stable pour la spider, plus d’armure,
plus de dommages, ajout du drop de dopper_coin,
- ajout du drop de silver_coin pour le treemonster,
- ajout du drop de silver_coin à l’oerkki,
- un peu plus de vie pour le stonemonster, plus de dommages,
équilibrage du drop de silver_coin,
- beaucoup plus de vie pour le mesemonster, beaucoup plus de
silver_coin, plus d’armure,
- un peu plus de vie pour le dungeonmaster, meilleur drop de
silver_coin.
2014-11-13 01:15:50 +01:00
|
|
|
hp_min = 50,
|
|
|
|
hp_max = 60,
|
2014-10-28 18:01:32 +01:00
|
|
|
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
|
|
|
|
visual = "mesh",
|
|
|
|
mesh = "mobs_dungeon_master.x",
|
2014-12-09 14:09:14 +01:00
|
|
|
--textures = {"mobs_dungeon_master.png"},
|
|
|
|
available_textures = {
|
|
|
|
total = 3,
|
|
|
|
texture_1 = {"mobs_dungeon_master.png"},
|
|
|
|
texture_2 = {"mobs_dungeon_master_cobblestone.png"},
|
|
|
|
texture_3 = {"mobs_dungeon_master_strangewhite.png"},
|
|
|
|
},
|
2014-10-28 18:01:32 +01:00
|
|
|
visual_size = {x=8, y=8},
|
|
|
|
makes_footstep_sound = true,
|
|
|
|
view_range = 16,
|
|
|
|
walk_velocity = 1,
|
|
|
|
run_velocity = 3,
|
2014-11-13 01:53:54 +01:00
|
|
|
damage = 13,
|
2014-10-28 18:01:32 +01:00
|
|
|
drops = {
|
|
|
|
{name = "default:mese_crystal_fragment",
|
|
|
|
chance = 1,
|
|
|
|
min = 1,
|
|
|
|
max = 3,},
|
|
|
|
{name = "default:diamond",
|
|
|
|
chance = 5,
|
|
|
|
min = 1,
|
2014-10-28 19:48:41 +01:00
|
|
|
max = 3,},
|
2014-10-28 18:01:32 +01:00
|
|
|
{name = "default:mese_crystal",
|
|
|
|
chance = 2,
|
|
|
|
min = 1,
|
2014-10-28 19:48:41 +01:00
|
|
|
max = 3,},
|
2014-10-28 18:01:32 +01:00
|
|
|
{name = "default:diamond_block",
|
|
|
|
chance = 30,
|
|
|
|
min = 1,
|
|
|
|
max = 1,},
|
2014-11-22 01:47:41 +01:00
|
|
|
{name = "maptools:gold_coin",
|
|
|
|
chance = 15,
|
|
|
|
min = 1,
|
|
|
|
max = 2,},
|
2014-10-28 19:48:41 +01:00
|
|
|
{name = "maptools:silver_coin",
|
|
|
|
chance = 1,
|
Tweaks mobs
- un peu plus de vie pour le sandmonster,
- un peu plus de vie pour le dirtmonster, plus de dommages, meilleur
drop de copper_coin,
- un peu plus de vie, et vie plus stable pour la spider, plus d’armure,
plus de dommages, ajout du drop de dopper_coin,
- ajout du drop de silver_coin pour le treemonster,
- ajout du drop de silver_coin à l’oerkki,
- un peu plus de vie pour le stonemonster, plus de dommages,
équilibrage du drop de silver_coin,
- beaucoup plus de vie pour le mesemonster, beaucoup plus de
silver_coin, plus d’armure,
- un peu plus de vie pour le dungeonmaster, meilleur drop de
silver_coin.
2014-11-13 01:15:50 +01:00
|
|
|
min = 2,
|
|
|
|
max = 10,},
|
2014-10-28 18:01:32 +01:00
|
|
|
},
|
|
|
|
armor = 60,
|
|
|
|
drawtype = "front",
|
|
|
|
water_damage = 1,
|
|
|
|
lava_damage = 1,
|
|
|
|
light_damage = 0,
|
|
|
|
on_rightclick = nil,
|
|
|
|
attack_type = "shoot",
|
|
|
|
arrow = "mobs:fireball",
|
|
|
|
shoot_interval = 2.5,
|
|
|
|
sounds = {
|
|
|
|
attack = "mobs_fireball",
|
|
|
|
},
|
|
|
|
animation = {
|
|
|
|
stand_start = 0,
|
|
|
|
stand_end = 19,
|
|
|
|
walk_start = 20,
|
|
|
|
walk_end = 35,
|
|
|
|
punch_start = 36,
|
|
|
|
punch_end = 48,
|
|
|
|
speed_normal = 15,
|
|
|
|
speed_run = 15,
|
|
|
|
},
|
|
|
|
jump = true,
|
|
|
|
step = 0.5,
|
2014-11-05 22:02:36 +01:00
|
|
|
shoot_offset = 0,
|
2014-10-28 18:01:32 +01:00
|
|
|
blood_texture = "mobs_blood.png",
|
|
|
|
})
|
2014-11-22 01:29:53 +01:00
|
|
|
mobs:register_spawn("mobs:dungeon_master", {"default:stone, nether:netherrack"}, 2, -1, 6000, 1, -70)
|
2014-10-28 18:01:32 +01:00
|
|
|
|
|
|
|
-- Fireball (weapon)
|
|
|
|
|
|
|
|
mobs:register_arrow("mobs:fireball", {
|
|
|
|
visual = "sprite",
|
|
|
|
visual_size = {x=1, y=1},
|
|
|
|
textures = {"mobs_fireball.png"},
|
|
|
|
velocity = 5,
|
|
|
|
|
|
|
|
-- direct hit, no fire... just plenty of pain
|
|
|
|
hit_player = function(self, player)
|
|
|
|
local s = self.object:getpos()
|
|
|
|
local p = player:getpos()
|
|
|
|
player:punch(self.object, 1.0, {
|
|
|
|
full_punch_interval=1.0,
|
2014-11-22 01:47:41 +01:00
|
|
|
damage_groups = {fleshy=13},
|
2014-11-01 14:51:14 +01:00
|
|
|
}, 0) -- {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z})
|
2014-10-28 18:01:32 +01:00
|
|
|
end,
|
|
|
|
|
|
|
|
-- node hit, bursts into flame (cannot blast through obsidian)
|
|
|
|
hit_node = function(self, pos, node)
|
|
|
|
|
|
|
|
for dx=-1,1 do
|
|
|
|
for dy=-1,1 do
|
|
|
|
for dz=-1,1 do
|
|
|
|
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
2014-11-08 18:36:57 +01:00
|
|
|
local n = minetest.get_node(p).name
|
2014-12-18 20:13:33 +01:00
|
|
|
local excluding = minetest.registered_nodes[n].groups["unbreakable"] ~= nil
|
|
|
|
or n:split(":")[1] == "nether"
|
2014-12-18 20:09:07 +01:00
|
|
|
for _,i in ipairs(excluded) do
|
2014-12-19 21:41:28 +01:00
|
|
|
if i == n then excluding = true end
|
2014-12-18 20:09:07 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
--if p.y < -19600 and including and n:split(":")[1] == "nether" then
|
2014-12-18 20:13:33 +01:00
|
|
|
if excluding then
|
2014-11-22 01:01:26 +01:00
|
|
|
return
|
|
|
|
end
|
2014-10-28 18:01:32 +01:00
|
|
|
if n ~= "default:obsidian" and n ~= "ethereal:obsidian_brick" then
|
|
|
|
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30 then
|
2014-11-08 18:36:57 +01:00
|
|
|
minetest.set_node(p, {name="fire:basic_flame"})
|
2014-10-28 18:01:32 +01:00
|
|
|
else
|
2014-11-08 18:36:57 +01:00
|
|
|
minetest.set_node(p, {name="air"})
|
2014-10-28 18:01:32 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|