sorcery  Diff

Differences From Artifact [442f0f3bcd]:

To Artifact [ab3b6e4e1b]:


3
4
5
6
7
8
9



10
11
12
13
14
15
16
17
18
19
20
21
22
..
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
..
86
87
88
89
90
91
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
121
122
123
124
125
126
127
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
...
182
183
184
185
186
187
188
189
190













191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
	regen = {
		name = 'Regeneration';
		color = {243,106,44};
		style = 'sparkle';
		desc = "A potion that amps up your body's natural\nhealing abilities, causing you to heal rapidly\neven if you're starving";
		infusion = 'sorcery:blood';
		basis = 'sorcery:potion_luminous';



		effect = function(self, user)
			local meta = self:get_meta()
			local force = 1 + meta:get_int('force')
			local duration = 10 + meta:get_int('duration')*2
			late.new_effect(user, {
				duration = duration;
				raise = 4; fall = 4;
				impacts = {
					damage = {0-force, 0.5};
				};
			})
		end;
	};
................................................................................
		color = {79,228,243}; style = 'sparkle';
		basis = 'sorcery:potion_luminous';
		desc = "Conserve your precious supply of oxygen when diving down into the ocean's depths";
		infusion = 'sorcery:extract_kelp';
		duration = function(self,meta)
			return 20 + meta:get_int('duration')*30
		end;
		effect = function(self,user)
			local meta = self:get_meta()
			local force = 1 + 2 * (meta:get_int('force'))
			late.new_effect(user, {
				duration = self:get_definition()._proto:duration(meta);
				raise = 2; fall = 5;
				impacts = {
					breath = {1 * force, 5}
				};
			})
		end;
	};
	heal = {
		name = 'Healing';
		color = {243,44,58};
		style = 'sparkle';
		no_duration = true;
		desc = 'This blood-red liquid glitters with an\nenchantment that rapidly knits torn flesh and broken\nbones';
		infusion = 'sorcery:oil_sanguine';
		basis = 'sorcery:potion_luminous';
		effect = function(self, user)
			local meta = self:get_meta()
			user:set_hp(user:get_hp() + (2 * (2 + meta:get_int('force'))))
		end;
	};
................................................................................
		color = {184,106,224}; style = 'sparkle';
		infusion = 'default:coal_lump';
		basis = 'sorcery:potion_soft';
		desc = 'Drinking this dark, swirling draught will shelter you from the power of mortal perception for a time, even rendering you entirely invisible at full strength.';
		duration = function(self,meta)
			return 30 + meta:get_int('duration')*30
		end;
		effect = function(self,user)
			local meta = self:get_meta()
			local force = 1 + 1 * (meta:get_int('force'))
			local opacity = 1.0 - (1.0 * (force / 4)) 
			late.new_effect(user, {
				duration = self:get_definition()._proto:duration(meta);
				raise = 10; fall = 15;
				impacts = {
					texture = { nil, opacity };
					nametag = { nil, opacity };
				};
			})
		end;
................................................................................
		desc = 'While this potion flows through your veins, your vision will be strengthened against the darkness of the night';
		maxforce = 3;
		infusion = 'sorcery:oil_dawn';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			return 50 + meta:get_int('duration')*70
		end;
		effect = function(self,user)
			--TODO ensure it can only be drunk at night
			--TODO ensure it can't last more than one night
			local meta = self:get_meta()
			local force = 0.3 * (1+meta:get_int('force'))
			late.new_effect(user, {
				duration = self:get_definition()._proto:duration(meta);
				raise = 15; fall = 30;
				impacts = {
					daylight = force;
				};
			})
		end;
	};
	antigravity = {
		name = 'Antigravity';
		color = {240,59,255}; style = 'sparkle';
		desc = 'Loosen the crushing grip of the earth upon your tender mortal form with a few sips from this glittering phial.';
		infusion = 'sorcery:oil_stone';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			return 20 + meta:get_int('duration')*25
		end;
		effect = function(self,user)
			local meta = self:get_meta()
			local force = 1 - 0.3 * (meta:get_int('force') + 1)
			late.new_effect(user, {
				duration = self:get_definition()._proto:duration(meta);
				raise = 2; fall = 15;
				impacts = {
					gravity = force;
				};
			})
		end;
	};
................................................................................
		color = {187,176,203};
		desc = 'Move and strike with the speed of a hurricane as this enchanted fluid courses through your veins';
		infusion = 'sorcery:grease_storm';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			return 10 + meta:get_int('duration')*15
		end;
		effect = function(self,user)
			local meta = self:get_meta()
			local force = 2 + 0.7 * (meta:get_int('force'))
			late.new_effect(user, {
				duration = self:get_definition()._proto:duration(meta);
				raise = 5; fall = 5;
				impacts = {
					speed = force;
				};
			})
		end;
	};
	obsidian = {
		name = 'Obsidian';
		infusion = 'default:obsidian_shard';
		color = {76,0,121}; style = 'sparkle';
		desc = 'Walk untroubled through volleys of arrows and maelstroms of swinging blades, for all will batter uselessly against skin protected by spellwork mightier than the doughtiest armor';
		infusion = 'default:obsidian_shard';
		basis = 'sorcery:potion_soft';
		no_force = true;
		duration = function(self,meta)
			return 5 + meta:get_int('duration')*7
		end;
	};
	lavabreathing = {
		name = 'Lavabreathing';
................................................................................
		color = {164,252,55}; style = 'sparkle';
		desc = 'Rise into the air for a time and stay there until the potion wears off';
		basis = 'sorcery:potion_soft';
	}; 
	flight = {
		name = 'Flight';
		color = {143,35,255}; style = 'sparkle';
		desc = 'Free yourself totally from the shackles of gravity';
		basis = 'sorcery:potion_soft';













	};
	leap = {
		name = 'Leap';
		color = {164,252,55};
		desc = 'Soar high into the air each time you jump (but may risk damage if used without a Feather Potion)';
		infusion = 'sorcery:oil_wind';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			 return 5 + meta:get_int('duration')*7
		end;
		effect = function(self,user)
			local meta = self:get_meta()
			local force = 2 + (0.5 * meta:get_int('force'))
			late.new_effect(user, {
				duration = self:get_definition()._proto:duration(meta);
				fall = 3;
				impacts = {
					jump = force;
				};
			})
		end
	};
}







>
>
>
|


<

|







 







|



|












|







 







|




|







 







|





|










|





|



|







 







|



|













|







 







|

>
>
>
>
>
>
>
>
>
>
>
>
>










|



|








3
4
5
6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
..
27
28
29
30
31
32
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
..
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
..
88
89
90
91
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
121
122
123
124
125
126
127
128
129
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
...
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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
	regen = {
		name = 'Regeneration';
		color = {243,106,44};
		style = 'sparkle';
		desc = "A potion that amps up your body's natural\nhealing abilities, causing you to heal rapidly\neven if you're starving";
		infusion = 'sorcery:blood';
		basis = 'sorcery:potion_luminous';
		duration = function(self,meta)
			return 10 + meta:get_int('duration')*2
		end;
		effect = function(self, user, proto)
			local meta = self:get_meta()
			local force = 1 + meta:get_int('force')

			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 4; fall = 4;
				impacts = {
					damage = {0-force, 0.5};
				};
			})
		end;
	};
................................................................................
		color = {79,228,243}; style = 'sparkle';
		basis = 'sorcery:potion_luminous';
		desc = "Conserve your precious supply of oxygen when diving down into the ocean's depths";
		infusion = 'sorcery:extract_kelp';
		duration = function(self,meta)
			return 20 + meta:get_int('duration')*30
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 1 + 2 * (meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 2; fall = 5;
				impacts = {
					breath = {1 * force, 5}
				};
			})
		end;
	};
	heal = {
		name = 'Healing';
		color = {243,44,58};
		style = 'sparkle';
		no_duration = true;
		desc = 'This blood-red liquid glitters with an enchantment that rapidly knits torn flesh and broken bones';
		infusion = 'sorcery:oil_sanguine';
		basis = 'sorcery:potion_luminous';
		effect = function(self, user)
			local meta = self:get_meta()
			user:set_hp(user:get_hp() + (2 * (2 + meta:get_int('force'))))
		end;
	};
................................................................................
		color = {184,106,224}; style = 'sparkle';
		infusion = 'default:coal_lump';
		basis = 'sorcery:potion_soft';
		desc = 'Drinking this dark, swirling draught will shelter you from the power of mortal perception for a time, even rendering you entirely invisible at full strength.';
		duration = function(self,meta)
			return 30 + meta:get_int('duration')*30
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 1 + 1 * (meta:get_int('force'))
			local opacity = 1.0 - (1.0 * (force / 4)) 
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 10; fall = 15;
				impacts = {
					texture = { nil, opacity };
					nametag = { nil, opacity };
				};
			})
		end;
................................................................................
		desc = 'While this potion flows through your veins, your vision will be strengthened against the darkness of the night';
		maxforce = 3;
		infusion = 'sorcery:oil_dawn';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			return 50 + meta:get_int('duration')*70
		end;
		effect = function(self,user,proto)
			--TODO ensure it can only be drunk at night
			--TODO ensure it can't last more than one night
			local meta = self:get_meta()
			local force = 0.3 * (1+meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 15; fall = 30;
				impacts = {
					daylight = force;
				};
			})
		end;
	};
	antigravity = {
		name = 'Antigravity';
		color = {240,59,255}; style = 'sparkle';
		desc = 'Loosen the crushing grip of the earth upon your tender mortal form with a few sips from this glittering phial';
		infusion = 'sorcery:oil_stone';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			return 20 + meta:get_int('duration')*25
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 1 - 0.3 * (meta:get_int('force') + 1)
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 2; fall = 15;
				impacts = {
					gravity = force;
				};
			})
		end;
	};
................................................................................
		color = {187,176,203};
		desc = 'Move and strike with the speed of a hurricane as this enchanted fluid courses through your veins';
		infusion = 'sorcery:grease_storm';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			return 10 + meta:get_int('duration')*15
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 2 + 0.7 * (meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 5; fall = 5;
				impacts = {
					speed = force;
				};
			})
		end;
	};
	obsidian = {
		name = 'Obsidian';
		infusion = 'default:obsidian_shard';
		color = {76,0,121}; style = 'sparkle';
		desc = 'Walk untroubled through volleys of arrows and maelstroms of swinging blades, for all will batter uselessly against skin protected by spellwork mightier than the doughtiest armor';
		infusion = 'default:obsidian_shard';
		basis = 'sorcery:potion_luminous';
		no_force = true;
		duration = function(self,meta)
			return 5 + meta:get_int('duration')*7
		end;
	};
	lavabreathing = {
		name = 'Lavabreathing';
................................................................................
		color = {164,252,55}; style = 'sparkle';
		desc = 'Rise into the air for a time and stay there until the potion wears off';
		basis = 'sorcery:potion_soft';
	}; 
	flight = {
		name = 'Flight';
		color = {143,35,255}; style = 'sparkle';
		desc = 'Free yourself totally from the shackles of gravity and soar through the air however you should will';
		basis = 'sorcery:potion_soft';
		infusion = 'sorcery:grease_lift';
		no_force = true;
		duration = function(self,meta)
			return 40 + meta:get_int('duration')*55
		end;
		effect = function(self,user,proto)
			late.new_effect(user, {
				duration = proto:duration(self:get_meta());
				impacts = {
					fly = 1;
				};
			})
		end;
	};
	leap = {
		name = 'Leap';
		color = {164,252,55};
		desc = 'Soar high into the air each time you jump (but may risk damage if used without a Feather Potion)';
		infusion = 'sorcery:oil_wind';
		basis = 'sorcery:potion_soft';
		duration = function(self,meta)
			 return 5 + meta:get_int('duration')*7
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 2 + (0.5 * meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				fall = 3;
				impacts = {
					jump = force;
				};
			})
		end
	};
}