33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
..
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
...
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
...
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
return stack
end;
};
drain = {
groups = {'sword'};
cost = 4;
}; -- health vampirism
glitter = { -- created prolonged light on digging
name = 'Glitter';
groups = digtools;
affinity = 'cognic';
cost = 1;
tone = {255,235,195};
desc = 'Leave a trail of light hanging in the air as you dig';
};
harvest = { -- kills or digging ore replenish durability
name = 'Harvest';
cost = 0; -- energy is only depleted when repair takes place
tone = {255,84,187};
affinity = 'syncretic';
groups = {
................................................................................
{lens = 'concave', gem = 'sapphire', dmg = 1};
};
desc = 'some damage is repaired when used to mine ore or kill an attacker';
on_dig = function(ctx)
local orepfx = "stone_with_" -- }:<
-- local oredrop = ' lump'
local barename = string.sub(ctx.node.name, string.find(ctx.node.name, ':') + 1)
if minetest.get_item_group(ctx.node.name, 'ore') ~= 0 or
string.sub(barename,1,string.len(orepfx)) == orepfx
then
ctx.tool:add_wear(-(sorcery.enchant.strength(ctx.tool,'harvest') * 2000))
ctx.cost = 3
end
end;
};
conserve = { -- use less magical energy
name = 'Conserve';
................................................................................
color = sorcery.lib.color(colors[minetest.get_node(n).name]);
count = 100 * dstfac;
}
end
end
end;
};
glitter = { -- increase odds of finding gem
name = 'Glitter';
cost = 10;
tone = {255,50,60};
desc = 'dramatically improve your chances of finding gems while mining veins';
groups = {'pick','pickaxe'};
affinity = 'entropic';
recipe = {
................................................................................
desc = 'cleave through sturdy ores and tear mortal flesh with fearsome ease';
apply = function(stack,power,base)
local caps = table.copy(stack:get_definition().tool_capabilities)
for g,v in pairs(caps.groupcaps) do
local unit = 2
caps.groupcaps[g].maxlevel = caps[g].maxlevel + math.floor(unit*power)
end
stack:get_meta():set_tool_capabilities(caps)
return stack
end;
};
-- multiply = {}; -- add a chance of receiving multiple drops of ore/coal
-- leech = {}; -- draw power from local leylines
}
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
..
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
...
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
return stack
end;
};
drain = {
groups = {'sword'};
cost = 4;
}; -- health vampirism
glimmer = { -- created prolonged light on digging
name = 'Glimmer';
groups = digtools;
affinity = 'cognic';
cost = 1;
tone = {255,235,195};
desc = 'Leave a trail of light hanging in the air as you dig';
recipe = {
{lens = 'convex', gem = 'sapphire', dmg = 2};
{lens = 'concave', gem = 'ruby', dmg = 1};
{lens = 'concave', gem = 'sapphire', dmg = 1};
};
on_dig = function(ctx)
local chance = 10 -- make dependent on power somehow?
if math.random(chance) == 1 then
local lightlevel = math.floor(math.min(minetest.LIGHT_MAX,4*ctx.power))
-- spawn a light block
minetest.set_node(ctx.pos, {
name = 'sorcery:air_glimmer_' .. tostring(lightlevel);
})
local lm = minetest.get_meta(ctx.pos)
lm:set_float('duration',45)
lm:set_float('timeleft',45)
lm:set_int('power',lightlevel)
end
end;
};
harvest = { -- kills or digging ore replenish durability
name = 'Harvest';
cost = 0; -- energy is only depleted when repair takes place
tone = {255,84,187};
affinity = 'syncretic';
groups = {
................................................................................
{lens = 'concave', gem = 'sapphire', dmg = 1};
};
desc = 'some damage is repaired when used to mine ore or kill an attacker';
on_dig = function(ctx)
local orepfx = "stone_with_" -- }:<
-- local oredrop = ' lump'
local barename = string.sub(ctx.node.name, string.find(ctx.node.name, ':') + 1)
if sorcery.itemclass.get(ctx.node.name,'ore') then
ctx.tool:add_wear(-(sorcery.enchant.strength(ctx.tool,'harvest') * 2000))
ctx.cost = 3
end
end;
};
conserve = { -- use less magical energy
name = 'Conserve';
................................................................................
color = sorcery.lib.color(colors[minetest.get_node(n).name]);
count = 100 * dstfac;
}
end
end
end;
};
glitter = {
name = 'Glitter';
cost = 10;
tone = {255,50,60};
desc = 'dramatically improve your chances of finding gems while mining veins';
groups = {'pick','pickaxe'};
affinity = 'entropic';
recipe = {
................................................................................
desc = 'cleave through sturdy ores and tear mortal flesh with fearsome ease';
apply = function(stack,power,base)
local caps = table.copy(stack:get_definition().tool_capabilities)
for g,v in pairs(caps.groupcaps) do
local unit = 2
caps.groupcaps[g].maxlevel = caps[g].maxlevel + math.floor(unit*power)
end
if caps.damage_groups and caps.damage_groups.fleshy then
caps.damage_groups.fleshy = caps.damage_groups.fleshy + power * 5;
end
stack:get_meta():set_tool_capabilities(caps)
return stack
end;
};
-- multiply = {}; -- add a chance of receiving multiple drops of ore/coal
-- leech = {}; -- draw power from local leylines
-- shadowcloak = {}; -- make player briefly invisible after blows are struck, reappearing only momentarily after each blow
sanctify = {
desc = 'prolong the blessings of the heavens';
groups = {'sorcery_sanctify'};
affinity = 'entropic';
tone = {255,255,255};
cost = 7;
recipe = {
{lens = 'amplifier', gem = 'ruby', dmg = 13};
{lens = 'amplifier', gem = 'ruby', dmg = 15};
{lens = 'amplifier', gem = 'ruby', dmg = 18};
};
};
}
|