This commit is contained in:
Kacper Kostka 2023-02-06 05:22:35 +01:00
parent f62082d9c6
commit 5233a3aa6f
3 changed files with 62 additions and 16 deletions

View File

@ -166,7 +166,7 @@ local entity = {
if math.random(10) == 1 then
self.player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 1},
damage_groups = {fleshy = 5},
}, nil)
end
end
@ -278,4 +278,26 @@ local entity = {
}
minetest.register_entity("amogus_entities:sussy_imposter", entity)
minetest.register_entity("amogus_entities:sussy_imposter", entity)
-- register spawn egg
minetest.register_craftitem("amogus_entities:sussy_imposter_spawn_egg", {
description = "Sussy Imposter Spawn Egg",
inventory_image = "amogus_entities_sussy_imposter_spawn_egg.png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return
end
local pos = pointed_thing.above
local node = minetest.get_node(pos)
local def = minetest.registered_nodes[node.name]
if not def or not def.buildable_to then
return
end
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
itemstack:take_item()
return itemstack
end,
})

View File

@ -536,6 +536,30 @@ minetest.register_decoration({
schematic = "/schematics/STATUE_GIANT.mts",
})
minetest.register_abm({
label = "Spawn Imposter",
nodenames = {"air"},
neighbors = {"group:stone"},
interval = 30,
chance = 100,
action = function(pos)
local light = minetest.get_node_light(pos)
local time = minetest.get_timeofday()
if light <= 12 and time >= 0.2 and time <= 0.8 then
local entities = minetest.get_objects_inside_radius(pos, 20)
local bat_count = 0
for _, entity in pairs(entities) do
if entity:get_entity_name() == "amogus_entities:sussy_imposter" then
bat_count = bat_count + 1
if bat_count >= 3 then
return
end
end
end
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
end
end,
})
-- wtf is this??

View File

@ -12,7 +12,7 @@ minetest.register_item(":", { -- Hand
cracky = {times = {[1] = 1.0, [2] = 0.7, [3] = 0.5}, uses = 20, maxlevel = 1},
flower = {times={[1] = 0, [2] = 0, [3] = 0}, uses = 10, maxlevel=3},
},
damage_groups = {fleshy = 1, snappy = 1, cracky=1},
damage_groups = {fleshy = 0.5, snappy = 1, cracky=1},
}
})
@ -120,7 +120,7 @@ minetest.register_tool("amogus_items:lightsaber_blue", {
groupcaps={
snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=0, maxlevel=3},
},
damage_groups = {fleshy=10},
damage_groups = {fleshy=1.01},
},
sound = {breaks = "amogus_sound"},
})
@ -134,7 +134,7 @@ minetest.register_tool("amogus_items:lightsaber_red", {
groupcaps={
snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=0, maxlevel=3},
},
damage_groups = {fleshy=10},
damage_groups = {fleshy=1.01},
},
sound = {breaks = "amogus_sound"},
@ -149,7 +149,7 @@ minetest.register_tool("amogus_items:lightsaber_green", {
groupcaps={
snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=0, maxlevel=3},
},
damage_groups = {fleshy=10},
damage_groups = {fleshy=1.01},
},
sound = {breaks = "amogus_sound"},
})
@ -234,7 +234,7 @@ minetest.register_tool("amogus_items:stonepickaxe", {
groupcaps={
stone={times={[1]=2.5, [2]=1.0, [3]=0.50}, uses=30, maxlevel=1},
},
damage_groups = {fleshy=2},
damage_groups = {fleshy=1.0},
},
sound = {breaks = "default_tool_breaks"},
})
@ -247,7 +247,7 @@ minetest.register_tool("amogus_items:goldenpickaxe", {
groupcaps={
stone={times={[1]=1.3, [2]=0.60, [3]=0.40}, uses=30, maxlevel=1},
},
damage_groups = {fleshy=2},
damage_groups = {fleshy=1.0},
},
sound = {breaks = "default_tool_breaks"},
})
@ -260,7 +260,7 @@ minetest.register_tool("amogus_items:sussiumpickaxe", {
groupcaps={
stone={times={[0.5]=2.0,[1]=0.85, [2]=0.40, [3]=0.20}, uses=30, maxlevel=1},
},
damage_groups = {fleshy=2},
damage_groups = {fleshy=1.0},
},
sound = {breaks = "default_tool_breaks"},
})
@ -273,7 +273,7 @@ minetest.register_tool("amogus_items:goldenaxe", {
groupcaps={
choppy={times={[1]=2.50, [2]=1.40, [3]=0.45}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
damage_groups = {fleshy=1.0},
},
groups = {flammable = 2}
})
@ -286,7 +286,7 @@ minetest.register_tool("amogus_items:stoneaxe", {
groupcaps={
choppy={times={[1]=2.50, [2]=1.40, [3]=0.80}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
damage_groups = {fleshy=1.0},
},
groups = {flammable = 2}
})
@ -299,7 +299,7 @@ minetest.register_tool("amogus_items:sussiumaxe", {
groupcaps={
choppy={times={[1]=0.90, [2]=0.80, [3]=0.35}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
damage_groups = {fleshy=1.0},
},
groups = {flammable = 2}
@ -314,7 +314,7 @@ minetest.register_tool("amogus_items:stoneshovel", {
groupcaps={
crumbly={times={[1]=1.5, [2]=1.0, [3]=0.9}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
damage_groups = {fleshy=1.0},
},
groups = {flammable = 2}
})
@ -329,7 +329,7 @@ minetest.register_tool("amogus_items:goldenshovel", {
groupcaps={
crumbly={times={[1]=1.0, [2]=0.8, [3]=0.6}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
-- damage_groups = {fleshy=1.0},
},
groups = {flammable = 2}
})
@ -342,7 +342,7 @@ minetest.register_tool("amogus_items:sussiumshovel", {
groupcaps={
crumbly={times={[1]=0.8, [2]=0.6, [3]=0.35}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
--damage_groups = {fleshy=1.0},
},
groups = {flammable = 2}
})
@ -359,7 +359,7 @@ minetest.register_tool("amogus_items:obsussian_hammer", {
stone={times={[0.5]=1.4,[1]=0.90, [2]=0.40, [3]=0.06}, uses=30, maxlevel=1},
crumbly={times={[1]=0.90, [2]=0.40, [3]=0.06}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=4},
damage_groups = {fleshy=1.0},
},
groups = {flammable = 2}