Differences From
Artifact [442f0f3bcd]:
3 3 regen = {
4 4 name = 'Regeneration';
5 5 color = {243,106,44};
6 6 style = 'sparkle';
7 7 desc = "A potion that amps up your body's natural\nhealing abilities, causing you to heal rapidly\neven if you're starving";
8 8 infusion = 'sorcery:blood';
9 9 basis = 'sorcery:potion_luminous';
10 - effect = function(self, user)
10 + duration = function(self,meta)
11 + return 10 + meta:get_int('duration')*2
12 + end;
13 + effect = function(self, user, proto)
11 14 local meta = self:get_meta()
12 15 local force = 1 + meta:get_int('force')
13 - local duration = 10 + meta:get_int('duration')*2
14 16 late.new_effect(user, {
15 - duration = duration;
17 + duration = proto:duration(meta);
16 18 raise = 4; fall = 4;
17 19 impacts = {
18 20 damage = {0-force, 0.5};
19 21 };
20 22 })
21 23 end;
22 24 };
................................................................................
25 27 color = {79,228,243}; style = 'sparkle';
26 28 basis = 'sorcery:potion_luminous';
27 29 desc = "Conserve your precious supply of oxygen when diving down into the ocean's depths";
28 30 infusion = 'sorcery:extract_kelp';
29 31 duration = function(self,meta)
30 32 return 20 + meta:get_int('duration')*30
31 33 end;
32 - effect = function(self,user)
34 + effect = function(self,user,proto)
33 35 local meta = self:get_meta()
34 36 local force = 1 + 2 * (meta:get_int('force'))
35 37 late.new_effect(user, {
36 - duration = self:get_definition()._proto:duration(meta);
38 + duration = proto:duration(meta);
37 39 raise = 2; fall = 5;
38 40 impacts = {
39 41 breath = {1 * force, 5}
40 42 };
41 43 })
42 44 end;
43 45 };
44 46 heal = {
45 47 name = 'Healing';
46 48 color = {243,44,58};
47 49 style = 'sparkle';
48 50 no_duration = true;
49 - desc = 'This blood-red liquid glitters with an\nenchantment that rapidly knits torn flesh and broken\nbones';
51 + desc = 'This blood-red liquid glitters with an enchantment that rapidly knits torn flesh and broken bones';
50 52 infusion = 'sorcery:oil_sanguine';
51 53 basis = 'sorcery:potion_luminous';
52 54 effect = function(self, user)
53 55 local meta = self:get_meta()
54 56 user:set_hp(user:get_hp() + (2 * (2 + meta:get_int('force'))))
55 57 end;
56 58 };
................................................................................
62 64 color = {184,106,224}; style = 'sparkle';
63 65 infusion = 'default:coal_lump';
64 66 basis = 'sorcery:potion_soft';
65 67 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.';
66 68 duration = function(self,meta)
67 69 return 30 + meta:get_int('duration')*30
68 70 end;
69 - effect = function(self,user)
71 + effect = function(self,user,proto)
70 72 local meta = self:get_meta()
71 73 local force = 1 + 1 * (meta:get_int('force'))
72 74 local opacity = 1.0 - (1.0 * (force / 4))
73 75 late.new_effect(user, {
74 - duration = self:get_definition()._proto:duration(meta);
76 + duration = proto:duration(meta);
75 77 raise = 10; fall = 15;
76 78 impacts = {
77 79 texture = { nil, opacity };
78 80 nametag = { nil, opacity };
79 81 };
80 82 })
81 83 end;
................................................................................
86 88 desc = 'While this potion flows through your veins, your vision will be strengthened against the darkness of the night';
87 89 maxforce = 3;
88 90 infusion = 'sorcery:oil_dawn';
89 91 basis = 'sorcery:potion_soft';
90 92 duration = function(self,meta)
91 93 return 50 + meta:get_int('duration')*70
92 94 end;
93 - effect = function(self,user)
95 + effect = function(self,user,proto)
94 96 --TODO ensure it can only be drunk at night
95 97 --TODO ensure it can't last more than one night
96 98 local meta = self:get_meta()
97 99 local force = 0.3 * (1+meta:get_int('force'))
98 100 late.new_effect(user, {
99 - duration = self:get_definition()._proto:duration(meta);
101 + duration = proto:duration(meta);
100 102 raise = 15; fall = 30;
101 103 impacts = {
102 104 daylight = force;
103 105 };
104 106 })
105 107 end;
106 108 };
107 109 antigravity = {
108 110 name = 'Antigravity';
109 111 color = {240,59,255}; style = 'sparkle';
110 - desc = 'Loosen the crushing grip of the earth upon your tender mortal form with a few sips from this glittering phial.';
112 + desc = 'Loosen the crushing grip of the earth upon your tender mortal form with a few sips from this glittering phial';
111 113 infusion = 'sorcery:oil_stone';
112 114 basis = 'sorcery:potion_soft';
113 115 duration = function(self,meta)
114 116 return 20 + meta:get_int('duration')*25
115 117 end;
116 - effect = function(self,user)
118 + effect = function(self,user,proto)
117 119 local meta = self:get_meta()
118 120 local force = 1 - 0.3 * (meta:get_int('force') + 1)
119 121 late.new_effect(user, {
120 - duration = self:get_definition()._proto:duration(meta);
122 + duration = proto:duration(meta);
121 123 raise = 2; fall = 15;
122 124 impacts = {
123 125 gravity = force;
124 126 };
125 127 })
126 128 end;
127 129 };
................................................................................
130 132 color = {187,176,203};
131 133 desc = 'Move and strike with the speed of a hurricane as this enchanted fluid courses through your veins';
132 134 infusion = 'sorcery:grease_storm';
133 135 basis = 'sorcery:potion_soft';
134 136 duration = function(self,meta)
135 137 return 10 + meta:get_int('duration')*15
136 138 end;
137 - effect = function(self,user)
139 + effect = function(self,user,proto)
138 140 local meta = self:get_meta()
139 141 local force = 2 + 0.7 * (meta:get_int('force'))
140 142 late.new_effect(user, {
141 - duration = self:get_definition()._proto:duration(meta);
143 + duration = proto:duration(meta);
142 144 raise = 5; fall = 5;
143 145 impacts = {
144 146 speed = force;
145 147 };
146 148 })
147 149 end;
148 150 };
149 151 obsidian = {
150 152 name = 'Obsidian';
151 153 infusion = 'default:obsidian_shard';
152 154 color = {76,0,121}; style = 'sparkle';
153 155 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';
154 156 infusion = 'default:obsidian_shard';
155 - basis = 'sorcery:potion_soft';
157 + basis = 'sorcery:potion_luminous';
156 158 no_force = true;
157 159 duration = function(self,meta)
158 160 return 5 + meta:get_int('duration')*7
159 161 end;
160 162 };
161 163 lavabreathing = {
162 164 name = 'Lavabreathing';
................................................................................
182 184 color = {164,252,55}; style = 'sparkle';
183 185 desc = 'Rise into the air for a time and stay there until the potion wears off';
184 186 basis = 'sorcery:potion_soft';
185 187 };
186 188 flight = {
187 189 name = 'Flight';
188 190 color = {143,35,255}; style = 'sparkle';
189 - desc = 'Free yourself totally from the shackles of gravity';
191 + desc = 'Free yourself totally from the shackles of gravity and soar through the air however you should will';
190 192 basis = 'sorcery:potion_soft';
193 + infusion = 'sorcery:grease_lift';
194 + no_force = true;
195 + duration = function(self,meta)
196 + return 40 + meta:get_int('duration')*55
197 + end;
198 + effect = function(self,user,proto)
199 + late.new_effect(user, {
200 + duration = proto:duration(self:get_meta());
201 + impacts = {
202 + fly = 1;
203 + };
204 + })
205 + end;
191 206 };
192 207 leap = {
193 208 name = 'Leap';
194 209 color = {164,252,55};
195 210 desc = 'Soar high into the air each time you jump (but may risk damage if used without a Feather Potion)';
196 211 infusion = 'sorcery:oil_wind';
197 212 basis = 'sorcery:potion_soft';
198 213 duration = function(self,meta)
199 214 return 5 + meta:get_int('duration')*7
200 215 end;
201 - effect = function(self,user)
216 + effect = function(self,user,proto)
202 217 local meta = self:get_meta()
203 218 local force = 2 + (0.5 * meta:get_int('force'))
204 219 late.new_effect(user, {
205 - duration = self:get_definition()._proto:duration(meta);
220 + duration = proto:duration(meta);
206 221 fall = 3;
207 222 impacts = {
208 223 jump = force;
209 224 };
210 225 })
211 226 end
212 227 };
213 228 }