Add model for dungeon master

master
PilzAdam 2013-04-29 13:37:17 +02:00
parent 091ac6929a
commit 1a40012cf1
6 changed files with 2859 additions and 26 deletions

View File

@ -341,7 +341,9 @@ function mobs:register_mob(name, def)
minetest.sound_play(self.sounds.attack, {object = self.object})
end
local obj = minetest.env:add_entity(self.object:getpos(), self.arrow)
local p = self.object:getpos()
p.y = p.y + (self.collisionbox[2]+self.collisionbox[5])/2
local obj = minetest.env:add_entity(p, self.arrow)
local amount = (vec.x^2+vec.y^2+vec.z^2)^0.5
local v = obj:get_luaentity().velocity
vec.y = vec.y+1

View File

@ -31,10 +31,7 @@ mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass"}, 3, -1, 700
mobs:register_mob("mobs:stone_monster", {
type = "monster",
hp_max = 10,
collisionbox = {-0.4, 0, -0.4, 0.4, 1.9, 0.4},
--visual = "upright_sprite",
--visual_size = {x=1, y=2},
--textures = {"mobs_stone_monster.png", "mobs_stone_monster_back.png"},
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_stone_monster.x",
textures = {"mobs_stone_monster.png"},
@ -66,6 +63,8 @@ mobs:register_mob("mobs:stone_monster", {
walk_end = 38,
run_start = 40,
run_end = 63,
punch_start = 40,
punch_end = 63,
}
})
mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 3, -1, 7000, 3, 0)
@ -74,10 +73,7 @@ mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 3, -1, 7000, 3, 0)
mobs:register_mob("mobs:sand_monster", {
type = "monster",
hp_max = 3,
collisionbox = {-0.4, 0, -0.4, 0.4, 1.9, 0.4},
--visual = "upright_sprite",
--visual_size = {x=1, y=2},
--textures = {"mobs_sand_monster.png", "mobs_sand_monster_back.png"},
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_sand_monster.x",
textures = {"mobs_sand_monster.png"},
@ -109,6 +105,8 @@ mobs:register_mob("mobs:sand_monster", {
walk_end = 72,
run_start = 74,
run_end = 105,
punch_start = 74,
punch_end = 105,
},
})
mobs:register_spawn("mobs:sand_monster", {"default:desert_sand"}, 20, -1, 7000, 3, 31000)
@ -116,10 +114,7 @@ mobs:register_spawn("mobs:sand_monster", {"default:desert_sand"}, 20, -1, 7000,
mobs:register_mob("mobs:sheep", {
type = "animal",
hp_max = 5,
collisionbox = {-0.4, 0, -0.4, 0.4, 1, 0.4},
--visual = "upright_sprite",
--visual_size = {x=2, y=1.25},
--textures = {"mobs_sheep.png", "mobs_sheep.png"},
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
textures = {"mobs_sheep.png"},
visual = "mesh",
mesh = "mobs_sheep.x",
@ -157,7 +152,6 @@ mobs:register_mob("mobs:sheep", {
clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3)))
end
self.object:set_properties({
--textures = {"mobs_sheep_naked.png", "mobs_sheep_naked.png"},
textures = {"mobs_sheep_shaved.png"},
mesh = "mobs_sheep_shaved.x",
})
@ -187,10 +181,7 @@ minetest.register_craft({
mobs:register_mob("mobs:rat", {
type = "animal",
hp_max = 1,
collisionbox = {-0.2, 0, -0.2, 0.2, 0.2, 0.2},
--visual = "upright_sprite",
--visual_size = {x=0.7, y=0.35},
--textures = {"mobs_rat.png", "mobs_rat.png"},
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.2, 0.2},
visual = "mesh",
mesh = "mobs_rat.x",
textures = {"mobs_rat.png"},
@ -242,10 +233,7 @@ minetest.register_craft({
mobs:register_mob("mobs:oerkki", {
type = "monster",
hp_max = 8,
collisionbox = {-0.4, 0, -0.4, 0.4, 1.9, 0.4},
--visual = "upright_sprite",
--visual_size = {x=1, y=2},
--textures = {"mobs_oerkki.png", "mobs_oerkki_back.png"},
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_oerkki.x",
textures = {"mobs_oerkki.png"},
@ -270,6 +258,8 @@ mobs:register_mob("mobs:oerkki", {
walk_end = 36,
run_start = 37,
run_end = 49,
punch_start = 37,
punch_end = 49,
speed_normal = 15,
speed_run = 15,
},
@ -279,10 +269,11 @@ mobs:register_spawn("mobs:oerkki", {"default:stone"}, 2, -1, 7000, 3, -10)
mobs:register_mob("mobs:dungeon_master", {
type = "monster",
hp_max = 10,
collisionbox = {-0.8, -1.21875, -0.8, 0.8, 1.21875, 0.8},
visual = "upright_sprite",
visual_size = {x=1.875, y=2.4375},
textures = {"mobs_dungeon_master.png", "mobs_dungeon_master_back.png"},
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"},
visual_size = {x=8, y=8},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
@ -306,6 +297,16 @@ mobs:register_mob("mobs:dungeon_master", {
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,
},
})
mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 2, -1, 7000, 1, -50)

BIN
models/mobs_dungeon_master.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

2830
models/mobs_dungeon_master.x Executable file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB