1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-07-07 02:20:21 +02:00

update mobs 02/02

stats mobs,

    oerkki peut détruire/enlever torchs,

    vache/sheep mangent l'herbe,

    bébé phacochère/mouton qui suivent leur "maman",

    npc => suit les diamonds, il peut etre soigné avec meat ou bread,
clique droit avec "default:gold_lump" en main et il droppera un objet
au hasard en échange,

    pumba => follow maintenant "default:apple"

    kittens => follow maintenant "fishing:fish_raw"
This commit is contained in:
Ombridride
2015-03-18 21:28:40 +01:00
parent ec9c96562f
commit d72ff66ad2
36 changed files with 915 additions and 712 deletions

View File

@ -1,5 +1,5 @@
-- Dungeon Master (This one spits out fireballs at you)
-- Dungeon Master by PilzAdam
-- Node which cannot be destroyed by DungeonMasters' fireballs
local excluded = {"nether:netherrack","default:obsidian_glass","maptools:cobble",
@ -7,13 +7,22 @@ local excluded = {"nether:netherrack","default:obsidian_glass","maptools:cobble"
}
mobs:register_mob("mobs:dungeon_master", {
-- animal, monster, npc, barbarian
type = "monster",
hp_min = 50,
hp_max = 60,
-- aggressive, shoots fireballs at player
passive = false,
damage = 13,
attack_type = "shoot",
shoot_interval = 2.5,
arrow = "mobs:fireball",
shoot_offset = 0,
-- health & armor
hp_min = 50, hp_max = 60, armor = 60,
-- textures and model
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
visual = "mesh",
mesh = "mobs_dungeon_master.x",
--textures = {"mobs_dungeon_master.png"},
drawtype = "front",
available_textures = {
total = 3,
texture_1 = {"mobs_dungeon_master.png"},
@ -21,72 +30,52 @@ mobs:register_mob("mobs:dungeon_master", {
texture_3 = {"mobs_dungeon_master_strangewhite.png"},
},
visual_size = {x=8, y=8},
blood_texture = "mobs_blood.png",
-- sounds
makes_footstep_sound = true,
view_range = 16,
sounds = {
random = "mobs_dungeonmaster",
attack = "mobs_fireball",
},
-- speed and jump
walk_velocity = 1,
run_velocity = 3,
damage = 13,
run_velocity = 2,
jump = true,
step = 0.5,
view_range = 16,
-- drops mese or diamond when dead
drops = {
{name = "default:mese_crystal_fragment",
chance = 1,
min = 1,
max = 3,},
chance = 1, min = 1, max = 3,},
{name = "default:diamond",
chance = 5,
min = 1,
max = 3,},
chance = 5, min = 1, max = 3,},
{name = "default:mese_crystal",
chance = 2,
min = 1,
max = 3,},
chance = 2, min = 1, max = 3,},
{name = "default:diamond_block",
chance = 30,
min = 1,
max = 1,},
chance = 30, min = 1, max = 1,},
{name = "maptools:gold_coin",
chance = 15,
min = 1,
max = 2,},
chance = 15, min = 1, max = 2,},
{name = "maptools:silver_coin",
chance = 1,
min = 2,
max = 10,},
chance = 1, min = 2, max = 10,},
},
armor = 60,
drawtype = "front",
-- damaged by
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",
},
-- model animation
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,
stand_start = 0, stand_end = 19,
walk_start = 20, walk_end = 35,
punch_start = 36, punch_end = 48,
speed_normal = 15, speed_run = 15,
},
sounds = {
random = "mobs_dungeonmaster",
},
jump = true,
step = 0.5,
shoot_offset = 0,
blood_texture = "mobs_blood.png",
})
-- spawn on stone between 20 and -1 light, 1 in 7000 chance, 1 dungeon master in area starting at -100 and below
mobs:register_spawn("mobs:dungeon_master", {"default:stone, nether:netherrack"}, 20, -1, 7000, 1, -100)
-- register spawn egg
mobs:register_egg("mobs:dungeon_master", "Dungeon Master", "fire_basic_flame.png", 1)
-- Fireball (weapon)
-- Fireball (dungeon masters weapon)
mobs:register_arrow("mobs:fireball", {
visual = "sprite",
visual_size = {x=1, y=1},
@ -100,12 +89,11 @@ mobs:register_arrow("mobs:fireball", {
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=13},
}, 0) -- {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z})
}, 0)
end,
-- node hit, bursts into flame (cannot blast through obsidian)
-- node hit, bursts into flame (cannot blast through obsidian or protection redo mod items)
hit_node = function(self, pos, node)
for dx=-1,1 do
for dy=-1,1 do
for dz=-1,1 do
@ -123,7 +111,7 @@ mobs:register_arrow("mobs:fireball", {
end
if n ~= "default:obsidian"
and n ~= "default:obsidianbrick"
and not n:find("protector:") then
and not n:find("protector:") then
if minetest.registered_nodes[n].groups.flammable or math.random(1, 100) <= 30 then
minetest.set_node(p, {name="fire:basic_flame"})
else