oh yeah more to commit

master
archfan 2020-04-10 11:26:22 -04:00
parent ad57d39c8d
commit 04863139f9
11 changed files with 50 additions and 23 deletions

View File

@ -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")

View File

@ -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}
})

View File

@ -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,
},
})

View File

@ -1,3 +1,3 @@
name = shadowrealm
description = The realm of shadows contains many hidden horrors.
depends = mobkit, default
depends = mobs, default

View File

@ -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)

28
realm.lua Normal file
View File

@ -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