oh yeah more to commit
parent
ad57d39c8d
commit
04863139f9
1
init.lua
1
init.lua
|
@ -2,6 +2,7 @@
|
|||
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
dofile(modpath.."/realm.lua")
|
||||
dofile(modpath.."/items.lua")
|
||||
dofile(modpath.."/mobs.lua")
|
||||
dofile(modpath.."/nodes.lua")
|
||||
|
|
25
items.lua
25
items.lua
|
@ -1,7 +1,7 @@
|
|||
-- used to craft Asptooth Sword
|
||||
minetest.register_craftitem("shadowrealm:asp_tooth", {
|
||||
description = "Asp Tooth",
|
||||
inventory_image = "shadowrealm_asp_tooth.png",
|
||||
-- used to craft Aspfang Sword
|
||||
minetest.register_craftitem("shadowrealm:asp_fang", {
|
||||
description = "Asp Fang",
|
||||
inventory_image = "shadowrealm_asp_fang.png",
|
||||
})
|
||||
|
||||
-- used to bait Gargantuan
|
||||
|
@ -25,15 +25,15 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
-- used to bait Asp
|
||||
minetest.register_craftitem("shadowrealm:carmelized_apple", {
|
||||
minetest.register_craftitem("shadowrealm:caramelized_apple", {
|
||||
description = "Carmelized Apple",
|
||||
inventory_image = "shadowrealm_carmelized_apple.png",
|
||||
inventory_image = "shadowrealm_caramelized_apple.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "shadowrealm:carmelized_apple",
|
||||
output = "shadowrealm:caramelized_apple",
|
||||
recipe = "default:apple",
|
||||
cooktime = 4,
|
||||
})
|
||||
|
@ -42,3 +42,14 @@ minetest.register_tool("shadowrealm:asptooth_sword", {
|
|||
description = "Asptooth Sword",
|
||||
inventory_image = "shadowrealm_asptooth_sword.png",
|
||||
})
|
||||
|
||||
minetest.register_tool("shadowrealm:aspfang_sword", {
|
||||
description = "Aspfang Sword",
|
||||
inventory_image = "shadowrealm_aspfang_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.6,
|
||||
max_drop_level = 1,
|
||||
damage_groups = {fleshy=8},
|
||||
},
|
||||
groups = {sword = 1}
|
||||
})
|
||||
|
|
13
mobs.lua
13
mobs.lua
|
@ -77,16 +77,3 @@ minetest.register_entity("shadowrealm:asp", {
|
|||
attack = {range = 2, damage_groups = {fleshy = 4}},
|
||||
armor_groups = {fleshy = 5},
|
||||
})
|
||||
|
||||
-- Entity which will carry the sparkle particlespawner
|
||||
-- This will be invisible, but the particlespawners for
|
||||
-- each mob will be attached to it.
|
||||
-- Upon the mob being summoned to the real world, the sparkler
|
||||
-- will be destroyed.
|
||||
minetest.register_entity("shadowrealm:sparkler",
|
||||
{
|
||||
initial_properties = {
|
||||
visual = "sprite",
|
||||
is_visible = false,
|
||||
},
|
||||
})
|
||||
|
|
2
mod.conf
2
mod.conf
|
@ -1,3 +1,3 @@
|
|||
name = shadowrealm
|
||||
description = The realm of shadows contains many hidden horrors.
|
||||
depends = mobkit, default
|
||||
depends = mobs, default
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
realm.baits = {
|
||||
["shadowrealm:asp_meat"] = {"shadowrealm:gargantuan", "Gargantuan"},
|
||||
["shadowrealm:carmelized_apple"] = {"shadowrealm:asp", "Asp"},
|
||||
["shadowrealm:caramelized_apple"] = {"shadowrealm:asp", "Asp"},
|
||||
}
|
||||
|
||||
minetest.register_node("shadowrealm:bait_trap", {
|
||||
description = "Bait Box",
|
||||
description = "Bait Box\nSummon a creature from the Shadow Realm!",
|
||||
tiles = {"shadowrealm_bait_trap.png"},
|
||||
groups = {cracky=2},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
-- some random shadow realm things
|
||||
|
||||
realm = {}
|
||||
|
||||
local modstorage = minetest.get_mod_storage()
|
||||
|
||||
realm.is_gargantuan_defeated = modstorage:get_int("dead") == 1
|
||||
|
||||
realm.on_gargantuan_death = function()
|
||||
realm.is_gargantuan_defeated = true
|
||||
modstorage:set_int("dead", 1)
|
||||
end
|
||||
|
||||
-- as long as gargantuan remains undefeated
|
||||
local timer = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
if not realm.is_gargantuan_defeated and dtime then
|
||||
timer = timer + dtime
|
||||
if not (timer >= 1) then return end
|
||||
timer = 0
|
||||
for _, player in pairs(minetest.get_connected_players()) do
|
||||
local pos = player:get_pos()
|
||||
if pos.y < -200 then
|
||||
player:set_hp(player:get_hp()-1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
Binary file not shown.
After Width: | Height: | Size: 556 B |
Binary file not shown.
After Width: | Height: | Size: 559 B |
Binary file not shown.
After Width: | Height: | Size: 552 B |
Binary file not shown.
After Width: | Height: | Size: 624 B |
Binary file not shown.
After Width: | Height: | Size: 390 B |
Loading…
Reference in New Issue