commit 083161e5709bce3c72d89e54bd4acabf4eddf61e Author: NathanSalapat Date: Sat Aug 3 18:12:24 2019 -0500 initial upload diff --git a/big.lua b/big.lua new file mode 100644 index 0000000..1aea0fe --- /dev/null +++ b/big.lua @@ -0,0 +1,46 @@ +mobs:register_mob("scorpion:big", { + type = "monster", + passive = false, + attack_type = "dogfight", + damage = 15, + hp_min = 50, hp_max = 100, armor = 30, + collisionbox = {-1.2, -.6, -1, 1.2, 0.6, 1}, + visual = "mesh", + mesh = "scorpion.b3d", + drawtype = "front", + textures = { + {"scorpion_red.png"}, + {"scorpion_green.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=13,y=13}, + makes_footstep_sound = true, + sounds = { + war_cry = "scorpion_squeak", + }, + walk_velocity = .5, + run_velocity = 2, + jump = true, + stepheight = 2.2, + reach = 4, + view_range = 4, + fear_height = 5, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 5, max = 20}, + }, + water_damage = 1, + lava_damage = 20, + light_damage = 0, + animation = { + speed_normal = 15, speed_run = 15, + 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_spawn("scorpion:big", {"default:desert_sand"}, 20, 0, 1000, 5, 31000) +mobs:register_egg("scorpion:big", "Big Scorpion", "default_grass.png", 1) diff --git a/boss.lua b/boss.lua new file mode 100644 index 0000000..5e25fd8 --- /dev/null +++ b/boss.lua @@ -0,0 +1,59 @@ +mobs:register_mob("scorpion:boss", { + type = "monster", + passive = false, + attack_type = "dogfight", + damage = 20, + hp_min = 75, hp_max = 175, armor = 20, + collisionbox = {-1, -0.95, -1, 1, .35, 1}, + visual = "mesh", + mesh = "scorpion.b3d", + drawtype = "front", + textures = { + {"scorpion_red.png^scorpion_armor.png"}, + {"scorpion_green.png^scorpion_armor.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=20,y=20}, + makes_footstep_sound = true, + sounds = { + war_cry = "scorpion_squeak", + }, + walk_velocity = 3, + run_velocity = 7, + jump = true, + stepheight = 3, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 5, max = 15}, + {name = "default:diamondblock", chance = 3, min = 4, max = 15}, + {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, + light_damage = 0, + reach = 5, + view_range = 10, + fear_height = 9, + animation = { + speed_normal = 15, speed_run = 15, + 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, + }, + + custom_attack = function(self) + local random_number = math.random(0,8) + print (random_number) + if random_number == 3 then + 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)} + minetest.add_entity(pos1, "scorpion:little") + end + end, +}) + +mobs:register_spawn("scorpion:boss", {"default:desert_stone"}, 20, 0, 5000, 1, 31000) +mobs:register_egg("scorpion:boss", "Boss Scorpion", "default_grass.png", 1) diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..44aca44 --- /dev/null +++ b/init.lua @@ -0,0 +1,7 @@ +if mobs.mod and mobs.mod == "redo" then + +dofile(minetest.get_modpath('scorpion')..'/little.lua') +dofile(minetest.get_modpath('scorpion')..'/big.lua') +dofile(minetest.get_modpath('scorpion')..'/boss.lua') + +end diff --git a/little.lua b/little.lua new file mode 100644 index 0000000..6c269db --- /dev/null +++ b/little.lua @@ -0,0 +1,46 @@ +mobs:register_mob("scorpion:little", { + type = "monster", + passive = false, + attack_type = "dogfight", + damage = 3, + 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"}, + }, + 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 = 2, + view_range = 2, + fear_height = 2, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 2, max = 8}, + }, + water_damage = 2, + lava_damage = 20, + 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_spawn("scorpion:little", {"default:dirt_with_rainforest_litter", "default:desert_sand"}, 20, 0, 1000, 15, 31000) +mobs:register_egg("scorpion:little", "Little Scorpion", "default_grass.png", 1) diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..b8607de --- /dev/null +++ b/mod.conf @@ -0,0 +1,2 @@ +name = scorpion +depends = mobs, default diff --git a/models/scorpion.b3d b/models/scorpion.b3d new file mode 100644 index 0000000..eccfe6d Binary files /dev/null and b/models/scorpion.b3d differ diff --git a/sounds/scorpion_squeak.ogg b/sounds/scorpion_squeak.ogg new file mode 100644 index 0000000..f8c530c Binary files /dev/null and b/sounds/scorpion_squeak.ogg differ diff --git a/textures/scorpion_armor.png b/textures/scorpion_armor.png new file mode 100644 index 0000000..55c93ce Binary files /dev/null and b/textures/scorpion_armor.png differ diff --git a/textures/scorpion_green.png b/textures/scorpion_green.png new file mode 100644 index 0000000..b9cc06e Binary files /dev/null and b/textures/scorpion_green.png differ diff --git a/textures/scorpion_red.png b/textures/scorpion_red.png new file mode 100644 index 0000000..e553187 Binary files /dev/null and b/textures/scorpion_red.png differ