tidied code, added pet scorpion.
parent
083161e570
commit
3e123fcef9
81
big.lua
81
big.lua
|
@ -1,46 +1,47 @@
|
||||||
mobs:register_mob("scorpion:big", {
|
mobs:register_mob('scorpion:big', {
|
||||||
type = "monster",
|
type = 'monster',
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = 'dogfight',
|
||||||
damage = 15,
|
damage = 15,
|
||||||
hp_min = 50, hp_max = 100, armor = 30,
|
hp_min = 50, hp_max = 100, armor = 30,
|
||||||
collisionbox = {-1.2, -.6, -1, 1.2, 0.6, 1},
|
collisionbox = {-1.2, -.6, -1, 1.2, 0.6, 1},
|
||||||
visual = "mesh",
|
visual = 'mesh',
|
||||||
mesh = "scorpion.b3d",
|
mesh = 'scorpion.b3d',
|
||||||
drawtype = "front",
|
drawtype = 'front',
|
||||||
textures = {
|
textures = {
|
||||||
{"scorpion_red.png"},
|
{'scorpion_red.png'},
|
||||||
{"scorpion_green.png"},
|
{'scorpion_green.png'},
|
||||||
},
|
{'scorpion_tan.png'},
|
||||||
blood_texture = "mobs_blood.png",
|
},
|
||||||
visual_size = {x=13,y=13},
|
blood_texture = 'mobs_blood.png',
|
||||||
makes_footstep_sound = true,
|
visual_size = {x=13,y=13},
|
||||||
|
makes_footstep_sound = true,
|
||||||
sounds = {
|
sounds = {
|
||||||
war_cry = "scorpion_squeak",
|
war_cry = 'scorpion_squeak',
|
||||||
},
|
},
|
||||||
walk_velocity = .5,
|
walk_velocity = .5,
|
||||||
run_velocity = 2,
|
run_velocity = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
stepheight = 2.2,
|
stepheight = 2.2,
|
||||||
reach = 4,
|
reach = 4,
|
||||||
view_range = 4,
|
view_range = 8,
|
||||||
fear_height = 5,
|
fear_height = 5,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 5, max = 20},
|
{name = 'mobs:meat_raw', chance = 1, min = 5, max = 20},
|
||||||
},
|
},
|
||||||
water_damage = 1,
|
water_damage = 2,
|
||||||
lava_damage = 20,
|
lava_damage = 60,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15, speed_run = 15,
|
speed_normal = 15, speed_run = 15,
|
||||||
stand_start = 0, stand_end = 60,
|
stand_start = 0, stand_end = 60,
|
||||||
walk_start = 150, walk_end = 210,
|
walk_start = 150, walk_end = 210,
|
||||||
run_start = 150, run_end = 210,
|
run_start = 150, run_end = 210,
|
||||||
punch_start = 220, punch_end = 260,
|
punch_start = 220, punch_end = 260,
|
||||||
punch2_start = 265, punch2_end = 305,
|
punch2_start = 265, punch2_end = 305,
|
||||||
punch3_start = 70, punch3_end = 140,
|
punch3_start = 70, punch3_end = 140,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_spawn("scorpion:big", {"default:desert_sand"}, 20, 0, 1000, 5, 31000)
|
mobs:register_spawn('scorpion:big', {'default:desert_sand'}, 10, 0, 2000, 5, 31000)
|
||||||
mobs:register_egg("scorpion:big", "Big Scorpion", "default_grass.png", 1)
|
mobs:register_egg('scorpion:big', 'Big Scorpion', 'default_grass.png', 1)
|
||||||
|
|
102
boss.lua
102
boss.lua
|
@ -1,48 +1,49 @@
|
||||||
mobs:register_mob("scorpion:boss", {
|
mobs:register_mob('scorpion:boss', {
|
||||||
type = "monster",
|
type = 'monster',
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = 'dogfight',
|
||||||
damage = 20,
|
damage = 20,
|
||||||
hp_min = 75, hp_max = 175, armor = 20,
|
hp_min = 75, hp_max = 175, armor = 20,
|
||||||
collisionbox = {-1, -0.95, -1, 1, .35, 1},
|
collisionbox = {-1, -0.95, -1, 1, .35, 1},
|
||||||
visual = "mesh",
|
visual = 'mesh',
|
||||||
mesh = "scorpion.b3d",
|
mesh = 'scorpion.b3d',
|
||||||
drawtype = "front",
|
drawtype = 'front',
|
||||||
textures = {
|
textures = {
|
||||||
{"scorpion_red.png^scorpion_armor.png"},
|
{'scorpion_red.png^scorpion_armor.png'},
|
||||||
{"scorpion_green.png^scorpion_armor.png"},
|
{'scorpion_green.png^scorpion_armor.png'},
|
||||||
},
|
{'scorpion_tan.png^scorpion_armor.png'},
|
||||||
blood_texture = "mobs_blood.png",
|
},
|
||||||
visual_size = {x=20,y=20},
|
blood_texture = 'mobs_blood.png',
|
||||||
makes_footstep_sound = true,
|
visual_size = {x=20,y=20},
|
||||||
sounds = {
|
makes_footstep_sound = true,
|
||||||
war_cry = "scorpion_squeak",
|
sounds = {
|
||||||
},
|
war_cry = 'scorpion_squeak',
|
||||||
walk_velocity = 3,
|
},
|
||||||
run_velocity = 7,
|
walk_velocity = 3,
|
||||||
jump = true,
|
run_velocity = 7,
|
||||||
stepheight = 3,
|
jump = true,
|
||||||
drops = {
|
stepheight = 3,
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 5, max = 15},
|
drops = {
|
||||||
{name = "default:diamondblock", chance = 3, min = 4, max = 15},
|
{name = 'mobs:meat_raw', chance = 1, min = 5, max = 15},
|
||||||
{name = "default:mese", chance = 3, min = 4, max = 15},
|
{name = 'default:diamondblock', chance = 3, min = 4, max = 15},
|
||||||
{name = "default:steel_ingot", chance = 2, min = 10, max = 40},
|
{name = 'default:mese', chance = 3, min = 4, max = 15},
|
||||||
},
|
{name = 'default:steel_ingot', chance = 2, min = 10, max = 40},
|
||||||
water_damage = 1,
|
},
|
||||||
lava_damage = 20,
|
water_damage = 20,
|
||||||
light_damage = 0,
|
lava_damage = 60,
|
||||||
|
light_damage = 0,
|
||||||
reach = 5,
|
reach = 5,
|
||||||
view_range = 10,
|
view_range = 12,
|
||||||
fear_height = 9,
|
fear_height = 9,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15, speed_run = 15,
|
speed_normal = 15, speed_run = 15,
|
||||||
stand_start = 0, stand_end = 60,
|
stand_start = 0, stand_end = 60,
|
||||||
walk_start = 150, walk_end = 210,
|
walk_start = 150, walk_end = 210,
|
||||||
run_start = 150, run_end = 210,
|
run_start = 150, run_end = 210,
|
||||||
punch_start = 220, punch_end = 260,
|
punch_start = 220, punch_end = 260,
|
||||||
punch2_start = 265, punch2_end = 305,
|
punch2_start = 265, punch2_end = 305,
|
||||||
punch3_start = 70, punch3_end = 140,
|
punch3_start = 70, punch3_end = 140,
|
||||||
},
|
},
|
||||||
|
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
local random_number = math.random(0,8)
|
local random_number = math.random(0,8)
|
||||||
|
@ -50,10 +51,19 @@ mobs:register_mob("scorpion:boss", {
|
||||||
if random_number == 3 then
|
if random_number == 3 then
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local pos1 = {x=s.x+math.random(-3,3), y=s.y, z=s.z+math.random(-3,3)}
|
local pos1 = {x=s.x+math.random(-3,3), y=s.y, z=s.z+math.random(-3,3)}
|
||||||
minetest.add_entity(pos1, "scorpion:little")
|
minetest.add_entity(pos1, 'scorpion:little')
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_die = function(self)
|
||||||
|
local random_number = math.random(0,10)
|
||||||
|
if random_number == 2 then
|
||||||
|
local s = self.object:get_pos()
|
||||||
|
local pos1 = {x=s.x+math.random(-2,2), y=s.y, z=s.z+math.random(-2,2)}
|
||||||
|
minetest.add_entity(pos1, 'scorpion:pet')
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_spawn("scorpion:boss", {"default:desert_stone"}, 20, 0, 5000, 1, 31000)
|
mobs:register_spawn('scorpion:boss', {'default:desert_stone'}, 10, 0, 5000, 1, 31000)
|
||||||
mobs:register_egg("scorpion:boss", "Boss Scorpion", "default_grass.png", 1)
|
mobs:register_egg('scorpion:boss', 'Boss Scorpion', 'default_grass.png', 1)
|
||||||
|
|
1
init.lua
1
init.lua
|
@ -3,5 +3,6 @@ if mobs.mod and mobs.mod == "redo" then
|
||||||
dofile(minetest.get_modpath('scorpion')..'/little.lua')
|
dofile(minetest.get_modpath('scorpion')..'/little.lua')
|
||||||
dofile(minetest.get_modpath('scorpion')..'/big.lua')
|
dofile(minetest.get_modpath('scorpion')..'/big.lua')
|
||||||
dofile(minetest.get_modpath('scorpion')..'/boss.lua')
|
dofile(minetest.get_modpath('scorpion')..'/boss.lua')
|
||||||
|
dofile(minetest.get_modpath('scorpion')..'/pet.lua')
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
85
little.lua
85
little.lua
|
@ -1,46 +1,47 @@
|
||||||
mobs:register_mob("scorpion:little", {
|
mobs:register_mob('scorpion:little', {
|
||||||
type = "monster",
|
type = 'monster',
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = 'dogfight',
|
||||||
damage = 3,
|
damage = 3,
|
||||||
hp_min = 30, hp_max = 75, armor = 45,
|
hp_min = 30, hp_max = 75, armor = 45,
|
||||||
collisionbox = {-0.6, -0.35, -0.5, 0.6, 0.3, 0.5},
|
collisionbox = {-0.6, -0.35, -0.5, 0.6, 0.3, 0.5},
|
||||||
visual = "mesh",
|
visual = 'mesh',
|
||||||
mesh = "scorpion.b3d",
|
mesh = 'scorpion.b3d',
|
||||||
drawtype = "front",
|
drawtype = 'front',
|
||||||
textures = {
|
textures = {
|
||||||
{"scorpion_red.png"},
|
{'scorpion_red.png'},
|
||||||
{"scorpion_green.png"},
|
{'scorpion_green.png'},
|
||||||
},
|
{'scorpion_tan.png'},
|
||||||
blood_texture = "mobs_blood.png",
|
},
|
||||||
visual_size = {x=7,y=7},
|
blood_texture = 'mobs_blood.png',
|
||||||
makes_footstep_sound = true,
|
visual_size = {x=7,y=7},
|
||||||
|
makes_footstep_sound = true,
|
||||||
sounds = {
|
sounds = {
|
||||||
war_cry = "scorpion_squeak",
|
war_cry = 'scorpion_squeak',
|
||||||
},
|
},
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
run_velocity = 6,
|
run_velocity = 6,
|
||||||
jump = true,
|
jump = true,
|
||||||
stepheight = 1.7,
|
stepheight = 1.7,
|
||||||
reach = 2,
|
reach = 3,
|
||||||
view_range = 2,
|
view_range = 6,
|
||||||
fear_height = 2,
|
fear_height = 2,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 2, max = 8},
|
{name = 'mobs:meat_raw', chance = 1, min = 2, max = 8},
|
||||||
},
|
},
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 20,
|
lava_damage = 60,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 45, speed_run = 90,
|
speed_normal = 45, speed_run = 90,
|
||||||
stand_start = 0, stand_end = 60,
|
stand_start = 0, stand_end = 60,
|
||||||
walk_start = 150, walk_end = 210,
|
walk_start = 150, walk_end = 210,
|
||||||
run_start = 150, run_end = 210,
|
run_start = 150, run_end = 210,
|
||||||
punch_start = 220, punch_end = 260,
|
punch_start = 220, punch_end = 260,
|
||||||
punch2_start = 265, punch2_end = 305,
|
punch2_start = 265, punch2_end = 305,
|
||||||
punch3_start = 70, punch3_end = 140,
|
punch3_start = 70, punch3_end = 140,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_spawn("scorpion:little", {"default:dirt_with_rainforest_litter", "default:desert_sand"}, 20, 0, 1000, 15, 31000)
|
mobs:register_spawn('scorpion:little', {'default:dirt_with_rainforest_litter', 'default:desert_sand'}, 10, 0, 2000, 7, 31000)
|
||||||
mobs:register_egg("scorpion:little", "Little Scorpion", "default_grass.png", 1)
|
mobs:register_egg('scorpion:little', 'Little Scorpion', 'default_grass.png', 1)
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
mobs:register_mob('scorpion:pet', {
|
||||||
|
type = 'animal',
|
||||||
|
passive = false,
|
||||||
|
attack_type = 'dogfight',
|
||||||
|
owner_loyal = true,
|
||||||
|
damage = 10,
|
||||||
|
hp_min = 30, hp_max = 75, armor = 45,
|
||||||
|
collisionbox = {-0.6, -0.35, -0.5, 0.6, 0.3, 0.5},
|
||||||
|
visual = 'mesh',
|
||||||
|
mesh = 'scorpion.b3d',
|
||||||
|
drawtype = 'front',
|
||||||
|
textures = {
|
||||||
|
{'scorpion_red.png'},
|
||||||
|
{'scorpion_green.png'},
|
||||||
|
{'scorpion_tan.png'},
|
||||||
|
},
|
||||||
|
blood_texture = 'mobs_blood.png',
|
||||||
|
visual_size = {x=7,y=7},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
war_cry = 'scorpion_squeak',
|
||||||
|
},
|
||||||
|
walk_velocity = 2,
|
||||||
|
run_velocity = 6,
|
||||||
|
jump = true,
|
||||||
|
stepheight = 1.7,
|
||||||
|
reach = 4,
|
||||||
|
view_range = 6,
|
||||||
|
fear_height = 2,
|
||||||
|
drops = {
|
||||||
|
{name = 'mobs:meat_raw', chance = 1, min = 2, max = 8},
|
||||||
|
},
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 60,
|
||||||
|
light_damage = 0,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 45, speed_run = 90,
|
||||||
|
stand_start = 0, stand_end = 60,
|
||||||
|
walk_start = 150, walk_end = 210,
|
||||||
|
run_start = 150, run_end = 210,
|
||||||
|
punch_start = 220, punch_end = 260,
|
||||||
|
punch2_start = 265, punch2_end = 305,
|
||||||
|
punch3_start = 70, punch3_end = 140,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
mobs:register_egg('scorpion:pet', 'Pet Scorpion', 'default_grass.png', 1)
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 299 KiB |
Loading…
Reference in New Issue