Differences From
Artifact [56e196edd6]:
- File
data/runes.lua
— part of check-in
[15f176a7fe]
at
2020-10-31 19:49:49
on branch trunk
— add background noise for condensers (temporary hack, need to write a proper environment sound framework as the fucking env_sounds module is completely impossible to extend), fix a couple of really stupid bugs, make higher-quality phials increase the chance of getting good runes so it's not a complete waste to burn iridium or levitanium powder on making them, add targeted disjunction and some other amulet spells
(user:
lexi,
size: 42828)
[annotate]
[blame]
[check-ins using]
140 140 cast = function(ctx)
141 141 local target = minetest.get_player_by_name(ctx.meta:get_string('rune_join_target'))
142 142 if not target then return false end
143 143
144 144 local subjects if ctx.amulet.frame == 'cobalt' then
145 145 if ctx.target.type ~= 'object' then return false end
146 146 subjects = {{ref=ctx.target.ref}}
147 + elseif ctx.amulet.frame == 'iridium' then
148 + subjects = {}
149 + for _,o in pairs(minetest.get_objects_inside_radius(ctx.caster:get_pos(), ctx.stats.power)) do
150 + subjects[#subjects+1] = {player = o}
151 + end
147 152 else subjects = {{ref=ctx.caster}} end
148 153
149 154 local delay = math.max(5,11 - ctx.stats.power) + 2.3*(math.random()*2-1)
150 155 local color = sorcery.lib.color(117,38,237)
151 156 teleport(ctx,subjects,delay,target:get_pos(),color)
152 157 if ctx.amulet.frame == 'gold' then
153 158 teleport(ctx,{{ref=target}},delay,ctx.caster:get_pos())
................................................................................
864 869 mingrade = 4;
865 870 name = 'Duplication';
866 871 desc = 'Bring an exact twin of any object or item into existence, no matter how common or rare it might be';
867 872 cast = function(ctx)
868 873 local color = sorcery.lib.color(255,61,205)
869 874 local dup, sndpos, anchor, sbj, ty
870 875 if ctx.target.type == 'object' and ctx.target.ref:get_luaentity().name == '__builtin:item' then
871 - -- sorcery.vfx.imbue(color, ctx.target.ref) -- causes graphics card problems???
876 + sorcery.vfx.imbue(color, ctx.target.ref) -- causes graphics card problems???
872 877 sndpos = 'subjects'
873 878 sbj = {{player = ctx.target.ref}}
874 879 local item = ItemStack(ctx.target.ref:get_luaentity().itemstring)
875 880 local r = function() return math.random() * 2 - 1 end
876 881 local putpos = vector.offset(ctx.target.ref:get_pos(), r(), 1, r())
877 882 dup = function()
878 883 item:set_count(1) -- nice try bouge-san