Differences From
Artifact [2062a1f6be]:
167 167 -- determine the power of a particular enchantment on
168 168 -- an enchanted item.
169 169 local e = sorcery.enchant.get(stack)
170 170 local p = 0.0
171 171 local slots = sorcery.matreg.lookup[stack:get_name()].data.slots
172 172 -- TODO handle strength-boosting spells!
173 173 for _,s in pairs(e.spells) do
174 - print(dump(s))
175 174 if s.id == id then p = p + ((s.boost * slots[s.slot].confluence)/10) end
176 175 end
177 176 return p
178 177 end
179 178 sorcery.enchant.stackup = function(stack)
180 179 -- stack update function. this should be called whenever
181 180 -- the enchantment status of a stack changes; it will
................................................................................
263 262 minetest.register_craftitem('sorcery:enchanter_pedestal',{
264 263 inventory_image = 'sorcery_enchanter_pedestal.png';
265 264 description = 'Pedestal';
266 265 })
267 266 minetest.register_craft {
268 267 output = 'sorcery:enchanter_channeler';
269 268 recipe = {
270 - {'','default:bronze_ingot',''};
269 + {'sorcery:grease_enchanting','sorcery:platinum_ingot','sorcery:grease_enchanting'};
271 270 {'basic_materials:gold_wire','basic_materials:steel_strip','basic_materials:gold_wire'};
272 271 {'','sorcery:electrum_ingot',''};
273 272 };
274 273 replacements = {
274 + {'sorcery:grease_enchanting','xdecor:bowl'};
275 + {'sorcery:grease_enchanting','xdecor:bowl'};
275 276 {'basic_materials:gold_wire','basic_materials:empty_spool'};
276 277 {'basic_materials:gold_wire','basic_materials:empty_spool'};
277 278 };
278 279 }
279 280 minetest.register_craft {
280 281 output = 'sorcery:enchanter_pedestal';
281 282 recipe = {
282 283 {'basic_materials:copper_strip','group:wood','basic_materials:copper_strip'};
283 - {'','default:bronze_ingot',''};
284 + {'','sorcery:iridium_ingot',''};
284 285 {'','group:wood',''};
285 286 };
286 287 }
287 288 minetest.register_craft {
288 289 output = 'sorcery:enchanter';
289 290 recipe = {
290 - {'','sorcery:enchanter_channeler',''};
291 + {'sorcery:grease_sealant','sorcery:enchanter_channeler','sorcery:grease_sealant'};
291 292 {'sorcery:enchanter_channeler','sorcery:enchanter_pedestal','sorcery:enchanter_channeler'};
292 293 {'group:wood','group:wood','group:wood'};
293 294 };
295 + replacements = {
296 + {'sorcery:grease_sealant','xdecor:bowl'};
297 + {'sorcery:grease_sealant','xdecor:bowl'};
298 + };
294 299 }
295 300 for i=1,10 do
296 301 minetest.register_node('sorcery:air_flash_' .. i, {
297 302 drawtype = 'airlike';
298 303 pointable = false; walkable = false;
299 304 buildable_to = true;
300 305 sunlight_propagates = true;
................................................................................
319 324 -- replace the air with a "glow-air" that removes
320 325 -- itself after a short period of time, to create
321 326 -- a flash of light when an enchanted tool's used
322 327 -- to dig out a node
323 328 local tool = puncher:get_wielded_item()
324 329 local ench = sorcery.enchant.get(tool)
325 330 if #ench.spells == 0 then return end
326 - print('enchanted!')
327 331 local sparks = {}
328 332 -- local spark = function(name,color)
329 333 local material = sorcery.enchant.getsubj(tool)
330 334 local totalcost = 0
331 335 do local done = {} for _,sp in pairs(ench.spells) do
332 336 if done[sp.id] then goto skip end
333 337 done[sp.id] = true