Differences From
Artifact [9a3424a733]:
58 58 {lens = 'concave', gem = 'mese', dmg = 1};
59 59 {lens = 'concave', gem = 'sapphire', dmg = 1};
60 60 };
61 61 desc = 'some damage is repaired when used to mine ore or kill an attacker';
62 62 on_dig = function(ctx)
63 63 local orepfx = "stone_with_" -- }:<
64 64 -- local oredrop = ' lump'
65 - local dug = minetest.get_node(ctx.target.under)
66 - local barename = string.sub(dug.name, string.find(dug.name, ':') + 1)
67 - print('is ore? ',dug.name,barename)
68 - if minetest.get_item_group(dug.name, ore) ~= 0 or
65 + local barename = string.sub(ctx.node.name, string.find(ctx.node.name, ':') + 1)
66 + if minetest.get_item_group(ctx.node.name, 'ore') ~= 0 or
69 67 string.sub(barename,1,string.len(orepfx)) == orepfx
70 68 then
71 - print('is ore!')
72 69 ctx.tool:add_wear(-(sorcery.enchant.strength(ctx.tool,'harvest') * 2000))
73 70 ctx.cost = 3
74 71 end
75 72 end;
76 73 };
77 74 conserve = { -- use less magical energy
78 75 name = 'Conserve';