-- CONTENTS
-- Dalekanium Armor + Shield - definitions + crafting
--       Order: helmet, chestplate, leggings, boots, shield


--Dalekanium Armor (using 3d_armor) and Shield
-- Armor Values from nether armor


-- Helmet
armor:register_armor("drwho_tardis:helmet_dalek", {
	description = ("Dalekanium Helmet"),
	inventory_image = "inv_helmet_dalek.png",
	groups = {armor_head=1, armor_heal=14, armor_use=100, armor_fire=1},
	armor_groups = {fleshy=18},
	damage_groups = {cracky=3, snappy=2, level=3},
})
minetest.register_craft({
	output = "drwho_tardis:helmet_dalek",
	recipe = {
		{"drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot"},
		{"drwho_tardis:dalekanium_ingot", "", "drwho_tardis:dalekanium_ingot"},
		{"", "", ""}
	}
})


-- Chestplate
armor:register_armor("drwho_tardis:chestplate_dalek", {
	description = ("Dalekanium Chestplate"),
	inventory_image = "inv_chest_dalek.png",
	groups = {armor_torso=1, armor_heal=14, armor_use=200, armor_fire=1},
	armor_groups = {fleshy=25},
	damage_groups = {cracky=3, snappy=2, level=3},
})
minetest.register_craft({
	output = "drwho_tardis:chestplate_dalek",
	recipe = {
		{"drwho_tardis:dalekanium_ingot", "", "drwho_tardis:dalekanium_ingot"},
		{"drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot"},
		{"drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot"}
	}
})


-- Leggings
armor:register_armor("drwho_tardis:leggings_dalek", {
	description = ("Dalekanium Leggings"),
	inventory_image = "inv_leggings_dalek.png",
	groups = {armor_legs=1, armor_heal=14, armor_use=200, armor_fire=1},
	armor_groups = {fleshy=25},
	damage_groups = {cracky=3, snappy=2, level=3},
})
minetest.register_craft({
	output = "drwho_tardis:leggings_dalek",
	recipe = {
		{"drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot"},
		{"drwho_tardis:dalekanium_ingot", "", "drwho_tardis:dalekanium_ingot"},
		{"drwho_tardis:dalekanium_ingot", "", "drwho_tardis:dalekanium_ingot"}
	}
})


-- Boots
armor:register_armor("drwho_tardis:boots_dalek", {
	description = ("Dalekanium Boots"),
	inventory_image = "inv_boots_dalek.png",
	groups = {armor_feet=1, armor_heal=14, armor_use=200, armor_fire=1},
	armor_groups = {fleshy=18},
	damage_groups = {cracky=3, snappy=2, level=3},
})
minetest.register_craft({
	output = "drwho_tardis:boots_dalek",
	recipe = {
		{"drwho_tardis:dalekanium_ingot", "", "drwho_tardis:dalekanium_ingot"},
		{"drwho_tardis:dalekanium_ingot", "", "drwho_tardis:dalekanium_ingot"}
	}
})


-- Shield
-- values from Mithril

-- Only if shields are enabled in 3d_armor settings
if minetest.get_modpath("shields") then

	armor:register_armor("drwho_tardis:shield_dalek", {
		description = ("Dalekanium Shield"),
		inventory_image = "inv_shield_dalek.png",
		groups = {armor_shield=1, armor_heal=13, armor_use=66},
		armor_groups = {fleshy=20},
		damage_groups = {cracky=2, snappy=1, level=3},
		reciprocate_damage = true,
		--on_damage = function(player, index, stack)
			--play_sound_effect(player, "default_dig_metal")
		--end,
		--on_destroy = function(player, index, stack)
			--play_sound_effect(player, "default_dug_metal")
		--end,
	})

	minetest.register_craft({
		output = "drwho_tardis:shield_dalek",
		recipe = {
			{"drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot"},
			{"drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot", "drwho_tardis:dalekanium_ingot"},
			{"", "drwho_tardis:dalekanium_ingot", ""}
		}
	})
end -- of Shields