sorcery  Diff

Differences From Artifact [151760f504]:

  • File data/spells.lua — part of check-in [96c5289a2a] at 2020-10-21 03:35:35 on branch trunk — add rune forges, runes, amulet frames, write sacrifice spell, touch up amulet graphics, enable enchantment of amulets (though spells cannot yet be cast), defuckulate syncresis core icon, unfuckitize sneaky leycalc bug that's probably been the cause of some long-standing wackiness, add item classes, add some more textures, disbungle various other asstastrophes, remove sneaky old debug code, improve library code, add utility for uploading merge requests (user: lexi, size: 28394) [annotate] [blame] [check-ins using]

To Artifact [16c84d9b57]:


   179    179   		uses = 32;
   180    180   		affinity = {'acacia','blazing'};
   181    181   		leytype = 'praxic';
   182    182   		desc = 'Conjure a gout of fire to scorch your foes with a flick of this wand';
   183    183   		cast = function(ctx)
   184    184   			local speed = 30 -- TODO maybe amethyst tip increases speed?
   185    185   			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))
   186         -			print('!! radius',radius)
   187    186   			local heading = ctx.heading
   188    187   			heading.pos.y = heading.pos.y + heading.eyeheight*0.9
   189    188   			local vel = vector.multiply(heading.yaw,speed)
   190    189   			local bolt = minetest.add_entity(vector.add(heading.pos,vector.multiply(heading.yaw,2.5)),'sorcery:spell_projectile_flamebolt')
   191    190   			bolt:set_rotation(heading.yaw)
   192    191   			bolt:get_luaentity()._blastradius = radius
   193    192   			bolt:set_velocity(vel)
................................................................................
   491    490   		cast = function(ctx)
   492    491   			local tgt = target_node(ctx, 'sorcery:enchanter')
   493    492   			if not tgt then return false end
   494    493   
   495    494   			local inv = minetest.get_meta(ctx.target.under):get_inventory()
   496    495   			for _,name in pairs{'foci','item'} do
   497    496   				for i=1,inv:get_size(name) do
          497  +					if inv:get_stack(name,i):is_empty() then goto skip end
   498    498   					local stack = 'sorcery:ash'
   499    499   					if ctx.base.gem == 'sapphire' then
   500    500   						stack = nil
   501    501   					end
   502    502   					inv:set_stack(name,i,ItemStack(stack))
   503         -				end
          503  +				::skip::end
   504    504   			end
   505    505   
   506    506   			enchantment_sparkle(ctx,sorcery.lib.color(255,12,0))
   507    507   			enchantment_sparkle(ctx,sorcery.lib.color(85,18,35))
   508    508   			enchantment_sparkle(ctx,sorcery.lib.color(0,0,0))
   509    509   		end
   510    510   	};