sorcery  Diff

Differences From Artifact [5670d710ce]:

To Artifact [f66e8dbb2f]:


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
69
70
71
72
73
74
75
76
77
78
79
80



81
82
83
84
85
86
87
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
...
188
189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
204
...
217
218
219
220
221
222
223
224
225
226
227
228
229
		cost = 1;
		tone = {232,102,255};
		desc = 'tools last longer before wearing out';
		affinity = 'counterpraxic';
		groups = allgroups;
		recipe = {
			{lens = 'convex',    gem = 'amethyst', dmg = 2};
			{lens = 'rectifier', gem = 'emerald',  dmg = 4};
			{lens = 'convex',    gem = 'emerald',  dmg = 2};
		};
		apply = function(stack,power,base)
			local caps = table.copy(stack:get_definition().tool_capabilities)
			for g,v in pairs(caps.groupcaps) do
				local unit = base.groupcaps[g].uses * 0.6
				caps.groupcaps[g].uses = v.uses + unit*power
................................................................................
		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
................................................................................
		cost = 0; -- energy is only depleted when repair takes place
		tone = {255,84,187};
		affinity = 'syncretic';
		groups = {
			'pick'; 'pickaxe'; 'sword';
		};
		recipe = {
			{lens = 'amplifier', gem = 'ruby',     dmg = 5};
			{lens = 'concave',   gem = 'mese',     dmg = 1};
			{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
................................................................................
		name = 'Conserve';
		tone = {84,255,144};
		cost = 0;
		desc = 'enchantments last longer before running out of power to sustain them';
		groups = allgroups;
		affinity = 'syncretic';
		recipe = {
			{lens = 'rectifier', gem = 'mese',     dmg = 7};
			{lens = 'rectifier', gem = 'sapphire', dmg = 2};
			{lens = 'rectifier', gem = 'amethyst', dmg = 2};
		};
		-- implemented in sorcery/enchanter.lua:register_on_dig
	};
	dowse = { -- send up flare when valuable ores are nearby
		name = 'Dowse';
		tone = {241,251,113};
		cost = 1;
		desc = 'strike colored sparks when used to dig near valuable ore.';
		groups = {'pick','pickaxe'};
		affinity = 'cognic';
		recipe = {
			{lens = 'concave', gem = 'ruby',     dmg = 3};
			{lens = 'concave', gem = 'emerald',  dmg = 3};
			{lens = 'concave', gem = 'sapphire', dmg = 3};
		};
		on_dig = function(ctx)
			local range = 4*sorcery.enchant.strength(ctx.tool,'dowse')
			local colors = {
				['default:stone_with_gold'    ] = {255,234,182};
................................................................................
		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 = {

			{lens = 'amplifier', gem = 'diamond',  dmg = 12};
			{lens = 'rectifier', gem = 'sapphire', dmg = 9};
			{lens = 'convex',    gem = 'ruby',     dmg = 7};
		};
	};
	pierce = { -- faster mining speed
		name = 'Pierce';
		cost = 3;
		tone = {113,240,251};
		groups = digtools;
		{
			'pick';'pickaxe';'axe';'shovel';'sickle';
		};
		desc = 'rip through solid stone or wood like a hot knife through butter';
		recipe = {
			{lens = 'amplifier', gem = 'diamond',  dmg = 4};
			{lens = 'amplifier', gem = 'ruby',     dmg = 4};
			{lens = 'rectifier', gem = 'diamond',  dmg = 2};
		};
		affinity = 'praxic';
		apply = function(stack,power,base)
			local caps = table.copy(stack:get_definition().tool_capabilities)
			for g,v in pairs(caps.groupcaps) do
				for i,t in pairs(v.times) do
					local unit = base.groupcaps[g].times[i] * 0.15
................................................................................
	};
	rend = { -- more damage / mine higher level blocks
		name = 'Rend';
		affinity = 'praxic';
		tone = {251,203,113};
		groups = {'sword';'pick';'pickaxe';};
		recipe = {
			{lens = 'convex',    gem = 'mese',    dmg = 3};
			{lens = 'amplifier', gem = 'emerald', dmg = 7};

			{lens = 'amplifier', gem = 'diamond', dmg = 7};
		};
		cost = 5;
		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
................................................................................
	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};
		};
	};
}







|







 







|







 







|
|
|


>
>
>







 







|













|







 







>


<







<
<
<




|







 







<

>
|







 







|





16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
..
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
...
153
154
155
156
157
158
159
160
161
162

163
164
165
166
167
168
169



170
171
172
173
174
175
176
177
178
179
180
181
...
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202
203
204
...
217
218
219
220
221
222
223
224
225
226
227
228
229
		cost = 1;
		tone = {232,102,255};
		desc = 'tools last longer before wearing out';
		affinity = 'counterpraxic';
		groups = allgroups;
		recipe = {
			{lens = 'convex',    gem = 'amethyst', dmg = 2};
			{item = 'default:obsidian_shard'};
			{lens = 'convex',    gem = 'emerald',  dmg = 2};
		};
		apply = function(stack,power,base)
			local caps = table.copy(stack:get_definition().tool_capabilities)
			for g,v in pairs(caps.groupcaps) do
				local unit = base.groupcaps[g].uses * 0.6
				caps.groupcaps[g].uses = v.uses + unit*power
................................................................................
		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};
			{item = 'sorcery:gem_luxite_shard'};
			{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
................................................................................
		cost = 0; -- energy is only depleted when repair takes place
		tone = {255,84,187};
		affinity = 'syncretic';
		groups = {
			'pick'; 'pickaxe'; 'sword';
		};
		recipe = {
			{lens = 'amplifier', gem = 'ruby', dmg = 5};
			{item = 'sorcery:powder_tungsten'};
			{item = 'sorcery:extract_rye'};
		};
		desc = 'some damage is repaired when used to mine ore or kill an attacker';
		info = {
			note = 'Consumes <b>3</b> thaum-seconds of charge when repair takes place';
		};
		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
................................................................................
		name = 'Conserve';
		tone = {84,255,144};
		cost = 0;
		desc = 'enchantments last longer before running out of power to sustain them';
		groups = allgroups;
		affinity = 'syncretic';
		recipe = {
			{item = 'default:mese_crystal_fragment'};
			{lens = 'rectifier', gem = 'sapphire', dmg = 2};
			{lens = 'rectifier', gem = 'amethyst', dmg = 2};
		};
		-- implemented in sorcery/enchanter.lua:register_on_dig
	};
	dowse = { -- send up flare when valuable ores are nearby
		name = 'Dowse';
		tone = {241,251,113};
		cost = 1;
		desc = 'strike colored sparks when used to dig near valuable ore.';
		groups = {'pick','pickaxe'};
		affinity = 'cognic';
		recipe = {
			{item = 'sorcery:gem_luxite'};
			{lens = 'concave', gem = 'emerald',  dmg = 3};
			{lens = 'concave', gem = 'sapphire', dmg = 3};
		};
		on_dig = function(ctx)
			local range = 4*sorcery.enchant.strength(ctx.tool,'dowse')
			local colors = {
				['default:stone_with_gold'    ] = {255,234,182};
................................................................................
		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 = {
			{item = 'sorcery:oil_luck'};
			{lens = 'amplifier', gem = 'diamond',  dmg = 12};
			{lens = 'rectifier', gem = 'sapphire', dmg = 9};

		};
	};
	pierce = { -- faster mining speed
		name = 'Pierce';
		cost = 3;
		tone = {113,240,251};
		groups = digtools;



		desc = 'rip through solid stone or wood like a hot knife through butter';
		recipe = {
			{lens = 'amplifier', gem = 'diamond',  dmg = 4};
			{lens = 'amplifier', gem = 'ruby',     dmg = 4};
			{item = 'default:flint'};
		};
		affinity = 'praxic';
		apply = function(stack,power,base)
			local caps = table.copy(stack:get_definition().tool_capabilities)
			for g,v in pairs(caps.groupcaps) do
				for i,t in pairs(v.times) do
					local unit = base.groupcaps[g].times[i] * 0.15
................................................................................
	};
	rend = { -- more damage / mine higher level blocks
		name = 'Rend';
		affinity = 'praxic';
		tone = {251,203,113};
		groups = {'sword';'pick';'pickaxe';};
		recipe = {

			{lens = 'amplifier', gem = 'emerald', dmg = 7};
			{item = 'flowers:flower_rose'};
			{item = 'sorcery:powder_silver'};
		};
		cost = 5;
		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
................................................................................
	sanctify = {
		desc = 'prolong the blessings of the heavens';
		groups = {'sorcery_sanctify'};
		affinity = 'entropic';
		tone = {255,255,255};
		cost = 7;
		recipe = {
			{item = 'sorcery:holy_water'};
			{lens = 'amplifier', gem = 'ruby', dmg = 15};
			{lens = 'amplifier', gem = 'ruby', dmg = 18};
		};
	};
}