140
141
142
143
144
145
146
147
148
149
150
151
152
153
...
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
|
cast = function(ctx)
local target = minetest.get_player_by_name(ctx.meta:get_string('rune_join_target'))
if not target then return false end
local subjects if ctx.amulet.frame == 'cobalt' then
if ctx.target.type ~= 'object' then return false end
subjects = {{ref=ctx.target.ref}}
else subjects = {{ref=ctx.caster}} end
local delay = math.max(5,11 - ctx.stats.power) + 2.3*(math.random()*2-1)
local color = sorcery.lib.color(117,38,237)
teleport(ctx,subjects,delay,target:get_pos(),color)
if ctx.amulet.frame == 'gold' then
teleport(ctx,{{ref=target}},delay,ctx.caster:get_pos())
................................................................................
mingrade = 4;
name = 'Duplication';
desc = 'Bring an exact twin of any object or item into existence, no matter how common or rare it might be';
cast = function(ctx)
local color = sorcery.lib.color(255,61,205)
local dup, sndpos, anchor, sbj, ty
if ctx.target.type == 'object' and ctx.target.ref:get_luaentity().name == '__builtin:item' then
-- sorcery.vfx.imbue(color, ctx.target.ref) -- causes graphics card problems???
sndpos = 'subjects'
sbj = {{player = ctx.target.ref}}
local item = ItemStack(ctx.target.ref:get_luaentity().itemstring)
local r = function() return math.random() * 2 - 1 end
local putpos = vector.offset(ctx.target.ref:get_pos(), r(), 1, r())
dup = function()
item:set_count(1) -- nice try bouge-san
|
|
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
...
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
|
cast = function(ctx)
local target = minetest.get_player_by_name(ctx.meta:get_string('rune_join_target'))
if not target then return false end
local subjects if ctx.amulet.frame == 'cobalt' then
if ctx.target.type ~= 'object' then return false end
subjects = {{ref=ctx.target.ref}}
elseif ctx.amulet.frame == 'iridium' then
subjects = {}
for _,o in pairs(minetest.get_objects_inside_radius(ctx.caster:get_pos(), ctx.stats.power)) do
subjects[#subjects+1] = {player = o}
end
else subjects = {{ref=ctx.caster}} end
local delay = math.max(5,11 - ctx.stats.power) + 2.3*(math.random()*2-1)
local color = sorcery.lib.color(117,38,237)
teleport(ctx,subjects,delay,target:get_pos(),color)
if ctx.amulet.frame == 'gold' then
teleport(ctx,{{ref=target}},delay,ctx.caster:get_pos())
................................................................................
mingrade = 4;
name = 'Duplication';
desc = 'Bring an exact twin of any object or item into existence, no matter how common or rare it might be';
cast = function(ctx)
local color = sorcery.lib.color(255,61,205)
local dup, sndpos, anchor, sbj, ty
if ctx.target.type == 'object' and ctx.target.ref:get_luaentity().name == '__builtin:item' then
sorcery.vfx.imbue(color, ctx.target.ref) -- causes graphics card problems???
sndpos = 'subjects'
sbj = {{player = ctx.target.ref}}
local item = ItemStack(ctx.target.ref:get_luaentity().itemstring)
local r = function() return math.random() * 2 - 1 end
local putpos = vector.offset(ctx.target.ref:get_pos(), r(), 1, r())
dup = function()
item:set_count(1) -- nice try bouge-san
|