53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
local wear = 65535 / dagger_uses
stack:add_wear(wear)
inv:remove_item('main',btl)
inv:add_item('main',blood)
target:punch(user, 1.0, caps, nil)
for i=0, 48 do
minetest.add_particle{
texture = 'sorcery_blood_' .. math.random(5) .. '.png',
size = 7,
expirationtime = 2 + math.random(),
glow = 1,
pos = pos,
velocity = {
x = (math.random() * 3.0) - 1.5,
y = math.random(),
z = (math.random() * 3.0) - 1.5
},
acceleration = {
x = 0,
y = -1,
z = 0
}
}
end
if math.random(3 + sorcery.enchant.strength(stack,'sanctify') * 6) == 1 then
-- we've used up the consecration
local unholy = ItemStack("sorcery:dagger")
unholy:set_wear(stack:get_wear())
local ench = sorcery.enchant.get(stack)
if #ench.spells > 0 then
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
local wear = 65535 / dagger_uses
stack:add_wear(wear)
inv:remove_item('main',btl)
inv:add_item('main',blood)
target:punch(user, 1.0, caps, nil)
sorcery.vfx.bloodburst(pos)
if math.random(3 + sorcery.enchant.strength(stack,'sanctify') * 6) == 1 then
-- we've used up the consecration
local unholy = ItemStack("sorcery:dagger")
unholy:set_wear(stack:get_wear())
local ench = sorcery.enchant.get(stack)
if #ench.spells > 0 then
|