forked from LizzyFleckenstein03/Memeclone
Refactor mobs_mc a bit
This commit is contained in:
parent
cc9b78215a
commit
2c599c4a0e
|
@ -195,8 +195,8 @@ if c("egg") then
|
|||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||
hit_mob = function(self, mob)
|
||||
mob:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {},
|
||||
}, nil)
|
||||
|
|
|
@ -87,8 +87,8 @@ mobs:register_arrow("mobs_mc:blaze_fireball", {
|
|||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
hit_mob = function(self, mob)
|
||||
mob:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 5},
|
||||
}, nil)
|
||||
|
|
|
@ -4,35 +4,6 @@
|
|||
|
||||
local S = minetest.get_translator("mobs_mc")
|
||||
|
||||
--[[
|
||||
mobs:register_mob("mobs_mc:12enderdragon", {
|
||||
type = "animal",
|
||||
passive = true,
|
||||
runaway = true,
|
||||
stepheight = 1.2,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 150,
|
||||
collisionbox = {-0.35, -0.01, -0.35, 0.35, 2, 0.35},
|
||||
visual = "mesh",
|
||||
mesh = "enderdragon.b3d",
|
||||
textures = {
|
||||
{"enderdragon.png"},
|
||||
},
|
||||
visual_size = {x=1, y=1},
|
||||
walk_velocity = 0.6,
|
||||
run_velocity = 2,
|
||||
jump = true,
|
||||
animation = {
|
||||
speed_normal = 25, speed_run = 50,
|
||||
stand_start = 0, stand_end = 20,
|
||||
walk_start = 0, walk_end = 20,
|
||||
run_start = 0, run_end = 20,
|
||||
},
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_mc:12enderdragon", "Enderdragon", "enderdragon_inv.png", 0)
|
||||
]]
|
||||
mobs:register_mob("mobs_mc:enderdragon", {
|
||||
type = "monster",
|
||||
pathfinding = 1,
|
||||
|
|
|
@ -94,8 +94,8 @@ mobs:register_arrow(":mobs_monster:fireball", {
|
|||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
hit_mob = function(self, mob)
|
||||
mob:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 8},
|
||||
}, nil)
|
||||
|
|
|
@ -66,8 +66,8 @@ mobs:register_arrow("mobs_mc:shulkerbullet", {
|
|||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
hit_mob = function(self, mob)
|
||||
mob:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 4},
|
||||
}, nil)
|
||||
|
|
|
@ -87,8 +87,8 @@ mobs:register_arrow(":mobs:potion_arrow", {
|
|||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
hit_mob = function(self, mob)
|
||||
mob:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 2},
|
||||
}, nil)
|
||||
|
|
Loading…
Reference in New Issue