@@ -182,9 +182,8 @@ desc = 'Conjure a gout of fire to scorch your foes with a flick of this wand'; cast = function(ctx) local speed = 30 -- TODO maybe amethyst tip increases speed? local radius = math.random(math.max(1,math.floor((ctx.stats.power or 1) - 0.5)), math.ceil((ctx.stats.power or 1)+0.5)) - print('!! radius',radius) local heading = ctx.heading heading.pos.y = heading.pos.y + heading.eyeheight*0.9 local vel = vector.multiply(heading.yaw,speed) local bolt = minetest.add_entity(vector.add(heading.pos,vector.multiply(heading.yaw,2.5)),'sorcery:spell_projectile_flamebolt') @@ -494,14 +493,15 @@ local inv = minetest.get_meta(ctx.target.under):get_inventory() for _,name in pairs{'foci','item'} do for i=1,inv:get_size(name) do + if inv:get_stack(name,i):is_empty() then goto skip end local stack = 'sorcery:ash' if ctx.base.gem == 'sapphire' then stack = nil end inv:set_stack(name,i,ItemStack(stack)) - end + ::skip::end end enchantment_sparkle(ctx,sorcery.lib.color(255,12,0)) enchantment_sparkle(ctx,sorcery.lib.color(85,18,35))