Index: data/compat.lua ================================================================== --- data/compat.lua +++ data/compat.lua @@ -72,6 +72,9 @@ ['default:stone_with_tin' ] = { id = 'tin', metal = true }; ['default:stone_with_gold' ] = { id = 'gold', metal = true }; ['default:stone_with_mese' ] = { id = 'mese', gem = true }; ['default:stone_with_diamond'] = { id = 'diamond', gem = true }; }; + residue = { + ['farming:hemp_oil'] = 'vessels:glass_bottle'; + }; } Index: data/oils.lua ================================================================== --- data/oils.lua +++ data/oils.lua @@ -101,12 +101,13 @@ }; }; luscious = { color = {10,255,10}; mix = { - 'sorcery:extract_greengrass'; - 'sorcery:extract_grape'; + 'farming:hemp_oil'; + 'farming:grapes'; + 'farming:cocoa_beans'; 'farming:cocoa_beans'; 'farming:sugar'; 'farming:sugar'; }; }; @@ -114,12 +115,11 @@ color = {156,54,255}; style = 'sparkle'; mix = { 'sorcery:extract_marram'; 'farming:hemp_leaf'; - 'farming:hemp_oil'; 'xdecor:honey'; 'farming:salt'; 'farming:salt'; }; }; } Index: data/runes.lua ================================================================== --- data/runes.lua +++ data/runes.lua @@ -900,14 +900,14 @@ end end if #vp > 0 then npos=vp[math.random(#vp)] end end if npos then - minetest.set_node(npos, minetest.get_node(ctx.target.under)) - if minetest.registered_nodes[ty].on_construct then - minetest.registered_nodes[ty].on_construct(npos) - end + minetest.place_node(npos, minetest.get_node(ctx.target.under)) + -- if minetest.registered_nodes[ty].on_construct then + -- minetest.registered_nodes[ty].on_construct(npos) + -- end minetest.get_meta(npos):from_table(origmeta) return npos, true else local nstack = ItemStack(ty) nstack:get_meta():from_table(origmeta) @@ -990,11 +990,11 @@ }; luminate = { name = 'Luminate'; tone = {255,194,0}; minpower = 1; - rarity = 5; + rarity = 8; amulets = { luxite = { name = 'Glow'; desc = 'Swathe yourself in an aura of sparkling radiance, casting light upon all the dark places where you voyage'; cast = function(ctx) @@ -1015,19 +1015,17 @@ end end end; intervals = { {period = period, after = {whence=0,secs=0.7}, fn = function(c) - print('cycling!') for _,sub in pairs(c.spell.subjects) do local ox, oy, oz = math.random(-radius,radius), math.random(-radius,radius), math.random(-radius,radius) local pos = vector.offset(sub.player:get_pos(), ox,oy,oz) - print('pos',minetest.pos_to_string(pos),'player',minetest.pos_to_string(sub.player:get_pos())) + -- print('pos',minetest.pos_to_string(pos),'player',minetest.pos_to_string(sub.player:get_pos())) if sorcery.lib.node.is_air(pos) then - print('is air!') local power = math.random(4,minetest.LIGHT_MAX) minetest.set_node(pos, { name = 'sorcery:air_glimmer_' .. tostring(power); }) c.spell.nodes[#c.spell.nodes + 1] = pos @@ -1034,12 +1032,12 @@ local d = glowduration * (0.5 + math.random()*0.5) local m = minetest.get_meta(pos) m:set_float('duration', d) m:set_float('timeleft', d) m:set_int('power', power) - else - print('not air!', dump(minetest.get_node(pos))) + -- else + -- print('not air!', dump(minetest.get_node(pos))) end end end}; }; } Index: enchanter.lua ================================================================== --- enchanter.lua +++ enchanter.lua @@ -172,16 +172,20 @@ -- this functions should be used whenever you need to -- determine the power of a particular enchantment on -- an enchanted item. local e = sorcery.enchant.get(stack) local p = 0.0 + local ct = 0 local slots = sorcery.matreg.lookup[stack:get_name()].data.slots -- TODO handle strength-boosting spells! for _,s in pairs(e.spells) do - if s.id == id then p = p + ((s.boost * slots[s.slot].confluence)/10) end + if s.id == id then + p = p + ((s.boost * slots[s.slot].confluence)/10) + ct = ct + 1 + end end - return p + return p, ct end sorcery.enchant.stackup = function(stack) -- stack update function. this should be called whenever -- the enchantment status of a stack changes; it will -- alter/reset tool capabilities and tooltip as necessary @@ -425,11 +429,11 @@ do local done = {} for _,sp in pairs(ench.spells) do if done[sp.id] then goto skip end done[sp.id] = true local data = sorcery.data.enchants[sp.id] - local strength = sorcery.enchant.strength(tool,sp.id) + local strength, nsp = sorcery.enchant.strength(tool,sp.id) local ch = math.random(1,100) local props = { fail = ch > sp.reliability; user = puncher; pos = pos; @@ -441,16 +445,17 @@ spell = sp; sparks = sparks; cost = data.cost; } if data.on_dig then data.on_dig(props) end - if props.cost ~= 0 then totalcost = totalcost + math.max(1,math.floor(props.cost * strength)) end + if props.cost ~= 0 then totalcost = totalcost + math.max(1,props.cost * nsp) --[[math.max(1,math.floor(props.cost * strength))]] end + -- strength does not increase cost but number of spell slots occupied does -- incentive for the player to be more clever, less brute-force-y if ch > sp.reliability then goto skip end sparks[#sparks + 1] = { color = sorcery.lib.color(data.tone):brighten(1.1); - count = strength * 7; + count = strength * 8; } ::skip::end end if totalcost > 0 then local conservation = math.floor(sorcery.enchant.strength(tool,'conserve') * 6) -- totalcost = totalcost - (totalcost * conservation) @@ -485,11 +490,11 @@ x = range(-1.3,1.3); z = range(-1.3,1.3); y = range( 0.3,0.9); }; expirationtime = life; - size = range(0.5,1.5); + size = range(0.2,1.5); texture = sorcery.lib.image('sorcery_spark.png'):multiply(s.color):render(); glow = 14; animation = { type = "vertical_frames"; aspect_w = 16; Index: potions.lua ================================================================== --- potions.lua +++ potions.lua @@ -1,8 +1,9 @@ local u = sorcery.lib sorcery.registry.mk('infusions',false) sorcery.registry.mk('residue',false) +sorcery.register.residue.meld(sorcery.data.compat.residue) sorcery.register_potion_tbl = function(tbl) -- :/ return sorcery.register_potion(tbl.name,tbl.label,tbl.desc,tbl.color,tbl.imgvariant,tbl.glow,tbl.extra) end sorcery.register_potion = function(name,label,desc,color,imgvariant,glow,extra) Index: registration.lua ================================================================== --- registration.lua +++ registration.lua @@ -66,11 +66,11 @@ for id in pairs(dat.iters) do reg.invoke(id,key) end end reg.meld = function(tbl) - for k,v in pairs(tbl) do reg.add(k,v) end + for k,v in pairs(tbl) do reg.link(k,v) end end sorcery.register[name] = reg local nextfn = sorcery.registry.defercheck sorcery.registry.defercheck = function() Index: vfx.lua ================================================================== --- vfx.lua +++ vfx.lua @@ -118,15 +118,15 @@ tpos = target:get_pos() if target.get_properties then height = height or ((target:get_properties().eye_height or 1)*1.3) end else - tpos = target + tpos = vector.offset(target, 0,0.5,0) end height = height or 1 local scenter = vector.add(tpos, {x=0,y=height/2,z=0}) - for i=1,math.random(64*(strength or 1),128*(strength or 1)) do + for i=1,math.random(24*(strength or 1),32*(strength or 1)) do local high = (height+0.8)*math.random() - 0.8 local far = (high >= -0.5 and high <= height) and (math.random() * 0.3 + 0.4) or (math.random() * 0.5) local yaw = {x=0, y = math.random()*(2*math.pi), z=0}