mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2025-07-04 17:30:21 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
-- Translation support
|
||||
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
-- custom dungeon master types
|
||||
|
||||
local master_types = {
|
||||
|
||||
{ nodes = {"nether:rack"},
|
||||
@ -11,7 +13,6 @@ local master_types = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-- Dungeon Master by PilzAdam
|
||||
|
||||
mobs:register_mob("mobs_monster:dungeon_master", {
|
||||
@ -62,16 +63,11 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 19,
|
||||
walk_start = 20,
|
||||
walk_end = 35,
|
||||
punch_start = 36,
|
||||
punch_end = 48,
|
||||
shoot_start = 36,
|
||||
shoot_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,
|
||||
shoot_start = 36, shoot_end = 48,
|
||||
speed_normal = 15, speed_run = 15
|
||||
},
|
||||
|
||||
-- check surrounding nodes and spawn a specific monster
|
||||
@ -89,9 +85,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
||||
self.base_texture = tmp.skins
|
||||
self.object:set_properties({textures = tmp.skins})
|
||||
|
||||
if tmp.drops then
|
||||
self.drops = tmp.drops
|
||||
end
|
||||
if tmp.drops then self.drops = tmp.drops end
|
||||
|
||||
return true
|
||||
end
|
||||
@ -101,6 +95,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
||||
end
|
||||
})
|
||||
|
||||
-- where to spawn
|
||||
|
||||
if not mobs.custom_spawn_monster then
|
||||
mobs:spawn({
|
||||
@ -113,14 +108,17 @@ if not mobs.custom_spawn_monster then
|
||||
})
|
||||
end
|
||||
|
||||
-- spawn egg
|
||||
|
||||
mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true)
|
||||
mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"),
|
||||
"fire_basic_flame.png", 1, true)
|
||||
|
||||
-- old mobs mod compatibility
|
||||
|
||||
mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") -- compatibility
|
||||
mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master")
|
||||
|
||||
-- fireball arrow
|
||||
|
||||
-- fireball (weapon)
|
||||
mobs:register_arrow("mobs_monster:fireball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
@ -161,6 +159,7 @@ mobs:register_arrow("mobs_monster:fireball", {
|
||||
|
||||
-- direct hit, no fire... just plenty of pain
|
||||
hit_player = function(self, player)
|
||||
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 8}
|
||||
@ -168,6 +167,7 @@ mobs:register_arrow("mobs_monster:fireball", {
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 8}
|
||||
|
Reference in New Issue
Block a user