View difference between Paste ID: 6X6Mt28E and PfTFgNxJ
SHOW: | | - or go back to the newest paste.
1
-- Caesium
2
caes = elements.allocate("RAD", "CAES") --properties
3
elements.element(caes, elements.element(elements.DEFAULT_PT_COAL))
4
elements.property(caes, "Name", "CAES")
5
elements.property(caes, "Description", "Caesium. Highly reactive and will violently explode in water.")
6
elements.property(caes, "Colour", 0xD8D8D8)
7
elements.property(caes, "MenuSection", 10)
8
elements.property(caes, "Gravity", 0)
9
elements.property(caes, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_DEADLY)
10
elements.property(caes, "Flammable", 0)
11
elements.property(caes, "Explosive", 0)
12
function propc(i,x,y,s,n)
13
local ctemp = tpt.get_property("temp", i) -- melt into Liquid Caesium
14
	if ctemp > 301.59 then
15
	tpt.set_property("type", "lcas", i)
16
	end
17
	if math.random(1, 7500) == 1 then -- decay
18
	local ran = math.random(-20,20) 
19
	local ran2 = math.random(-20,0)
20
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
21
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
22
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
23
	tpt.set_property("vx", math.random(-25,25), i)
24
	tpt.set_property("vy", math.random(-25,25), i)
25
	tpt.set_property("life", 10000, i)
26
		if math.abs(ran) + math.abs(ran2) > 10 then
27
		local ran3 = math.random(1,4)
28
			if ran3 == 1 then
29
			tpt.set_property("type", "elec", i)
30
			end
31
			if ran3 == 2 then
32
			tpt.set_property("type", "phot", i)
33
			end
34
			if ran3 == 3 then
35
			tpt.set_property("type", "prot", i)
36
			end
37
			if ran3 == 4 then
38
			tpt.set_property("type", "neut", i)
39
			end
40
		end
41
	end
42
	
43
local colx = math.random(-1,1) -- react with water
44
local coly = math.random(-1,1)
45
local coltype = tpt.get_property("type", x+colx, y+coly)
46
local temp = tpt.get_property("temp", i)
47
	if coltype == elements.DEFAULT_PT_WATR then 
48
	if math.random(0,1) == 1 then
49
	local ran = x+math.random(-1,1)
50
	local ran2 = y+math.random(-1,1)
51
	tpt.create(ran, ran2, "mort")
52
	tpt.set_property("vx", math.random(-25,25) , ran)
53
	tpt.set_property("vy", math.random(-25,25) , ran2)
54
	end
55
	tpt.set_pressure(x,y,10,10,100)
56
	tpt.set_property("life", 10000, i)
57
	tpt.set_property("vx", math.random(-25,25), i)
58
	tpt.set_property("vy", math.random(-25,25), i)
59
	tpt.set_property("temp", temp + 1000 ,i)
60
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
61
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
62
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
63
	tpt.set_property("type", "hygn", coltype)
64
	local rand = math.random(1,4)
65
		if rand == 1 then
66
		tpt.set_property("type", "elec", i)
67
		end
68
		if rand == 2 then
69
		tpt.set_property("type", "phot", i)
70
		end
71
		if rand == 3 then
72
		tpt.set_property("type", "prot", i)
73
		end
74
		if rand == 4 then
75
		tpt.set_property("type", "neut", i)
76
		end
77
	end
78
	if coltype == elements.DEFAULT_PT_DSTW then 
79
	if math.random(0,1) == 1 then
80
	local ran = x+math.random(-1,1)
81
	local ran2 = y+math.random(-1,1)
82
	tpt.create(ran, ran2, "mort")
83
	tpt.set_property("vx", math.random(-25,25) , ran)
84
	tpt.set_property("vy", math.random(-25,25) , ran2)
85
	end
86
	tpt.set_pressure(x,y,10,10,100)
87
	tpt.set_property("life", 10000, i)
88
	tpt.set_property("vx", math.random(-25,25), i)
89
	tpt.set_property("vy", math.random(-25,25), i) 
90
	local rand = math.random(1,4)
91
		if rand == 1 then
92
				tpt.set_property("type", "elec", i)
93
		end
94
		if rand == 2 then
95
		tpt.set_property("type", "phot", i)
96
		end
97
		if rand == 3 then
98
		tpt.set_property("type", "prot", i)
99
		end
100
				if rand == 4 then
101
		tpt.set_property("type", "neut", i)
102
		end
103
	tpt.set_property("temp", temp + 1000 ,i)
104
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
105
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
106
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
107
	tpt.set_property("type", "hygn", coltype)
108
	end
109
	if coltype == elements.DEFAULT_PT_SLTW then 
110
	if math.random(0,1) == 1 then
111
	local ran = x+math.random(-1,1)
112
	local ran2 = y+math.random(-1,1)
113
	tpt.create(ran, ran2, "mort")
114
	tpt.set_property("vx", math.random(-25,25) , ran)
115
	tpt.set_property("vy", math.random(-25,25) , ran2)
116
	end
117
	tpt.set_pressure(x,y,10,10,100)
118
	tpt.set_property("life", 10000, i)
119
	tpt.set_property("vx", math.random(-25,25), i)
120
	tpt.set_property("vy", math.random(-25,25), i) 
121
	local rand = math.random(1,4)
122
		if rand == 1 then
123
		tpt.set_property("type", "elec", i)
124
		end
125
		if rand == 2 then
126
		tpt.set_property("type", "phot", i)
127
		end
128
		if rand == 3 then
129
		tpt.set_property("type", "prot", i)
130
		end
131
		if rand == 4 then
132
		tpt.set_property("type", "neut", i)
133
		end
134
	tpt.set_property("temp", temp + 1000 ,i)
135
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
136
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
137
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
138
	tpt.set_property("type", "hygn", coltype)
139
	end
140
end
141
tpt.element_func(propc, tpt.element("caes"))
142
elements.property(caes, "HighTemperature", 1938)
143
-- Liquid Caesium
144
Lcas = elements.allocate("RAD", "LCAS") -- properties 
145
elements.element(Lcas, elements.element(elements.DEFAULT_PT_EXOT))
146
elements.property(Lcas, "Name", "LCAS")
147
elements.property(Lcas, "Description", "Liquid Caesium. Highly reactive and will violently explode in water.")
148
elements.property(Lcas, "Colour", 0xD9D9D9)
149
elements.property(Lcas, "MenuSection", 10)
150
elements.property(Lcas, "Gravity", 1)
151
elements.property(Lcas, "Weight", 10)
152
elements.property(Lcas, "Flammable", 0)
153
elements.property(Lcas, "Explosive", 0)
154
elements.property(caes, "Properties", elements.ST_LIQUID + elements.TYPE_LIQUID + elements.PROP_DEADLY)
155
function proplcas(i,x,y,s,n)
156
local ctemp = tpt.get_property("temp", i) -- decay
157
	if math.random(1, 7500) == 1 then 
158
	local ran = math.random(-20,20) 
159
	local ran2 = math.random(-20,0)
160
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
161
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
162
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
163
	tpt.set_property("life", 10000, i)
164
	tpt.set_property("vx", math.random(-25,25), i)
165
	tpt.set_property("vy", math.random(-25,25), i)
166
		if math.abs(ran) + math.abs(ran2) > 10 then
167
		local ran3 = math.random(1,4)
168
			if ran3 == 1 then
169
			tpt.set_property("type", "elec", i)
170
			end
171
			if ran3 == 2 then
172
			tpt.set_property("type", "phot", i)
173
			end
174
			if ran3 == 3 then
175
			tpt.set_property("type", "prot", i)
176
			end
177
			if ran3 == 4 then
178
			tpt.set_property("type", "neut", i)
179
			end
180
		end
181
	end
182
local colx = math.random(-1,1) -- react w/ water
183
local coly = math.random(-1,1)
184
local coltype = tpt.get_property("type", x+colx, y+coly)
185
local temp = tpt.get_property("temp", i)
186
	if coltype == elements.DEFAULT_PT_WATR then 
187
	if math.random(0,1) == 1 then
188
	local ran = x+math.random(-1,1)
189
	local ran2 = y+math.random(-1,1)
190
	tpt.create(ran, ran2, "mort")
191
	tpt.set_property("vx", math.random(-25,25) , ran)
192
	tpt.set_property("vy", math.random(-25,25) , ran2)
193
	end
194
	tpt.set_pressure(x,y,10,10,100)
195
	tpt.set_property("life", 10000, i)
196
	tpt.set_property("vx", math.random(-25,25), i)
197
	tpt.set_property("vy", math.random(-25,25), i)
198
	local rand = math.random(1,4)
199
		if rand == 1 then
200
		tpt.set_property("type", "elec", i)
201
		end
202
		if rand == 2 then
203
		tpt.set_property("type", "phot", i)
204
		end
205
		if rand == 3 then
206
		tpt.set_property("type", "prot", i)
207
		end 
208
		if rand == 4 then
209
		tpt.set_property("type", "neut", i)
210
		end
211
	tpt.set_property("temp", temp + 1000 ,i)
212
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
213
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
214
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
215
	tpt.set_property("type", "hygn", coltype)
216
	end
217
	if coltype == elements.DEFAULT_PT_DSTW then 
218
	if math.random(0,1) == 1 then
219
	local ran = x+math.random(-1,1)
220
	local ran2 = y+math.random(-1,1)
221
	tpt.create(ran, ran2, "mort")
222
	tpt.set_property("vx", math.random(-25,25) , ran)
223
	tpt.set_property("vy", math.random(-25,25) , ran2)
224
	end
225
	tpt.set_pressure(x,y,10,10,100)
226
	tpt.set_property("life", 10000, i)
227
	tpt.set_property("vx", math.random(-25,25), i)
228
	tpt.set_property("vy", math.random(-25,25), i) 
229
	local rand = math.random(1,4)
230
		if rand == 1 then
231
		tpt.set_property("type", "elec", i)
232
		end
233
		if rand == 2 then
234
		tpt.set_property("type", "phot", i)
235
		end
236
		if rand == 3 then
237
		tpt.set_property("type", "prot", i)
238
		end
239
		if rand == 4 then
240
		tpt.set_property("type", "neut", i)
241
		end
242
	tpt.set_property("temp", temp + 1000 ,i)
243
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
244
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
245
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
246
	tpt.set_property("type", "hygn", coltype)
247
	end
248
	if coltype == elements.DEFAULT_PT_SLTW then 
249
	if math.random(0,1) == 1 then
250
	local ran = x+math.random(-1,1)
251
	local ran2 = y+math.random(-1,1)
252
	tpt.create(ran, ran2, "mort")
253
	tpt.set_property("vx", math.random(-25,25) , ran)
254
	tpt.set_property("vy", math.random(-25,25) , ran2)
255
	end
256
	tpt.set_pressure(x,y,10,10,100)
257
	tpt.set_property("life", 10000, i)
258
	tpt.set_property("vx", math.random(-25,25), i)
259
	tpt.set_property("vy", math.random(-25,25), i) 
260
	local rand = math.random(1,4)
261
		if rand == 1 then
262
		tpt.set_property("type", "elec", i)
263
		end
264
		if rand == 2 then
265
		tpt.set_property("type", "phot", i)
266
		end
267
		if rand == 3 then
268
		tpt.set_property("type", "prot", i)
269
		end
270
		if rand == 4 then
271
		tpt.set_property("type", "neut", i)
272
		end
273
	tpt.set_property("temp", temp + 1000 ,i)
274
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
275
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
276
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
277
	tpt.set_property("type", "hygn", coltype)
278
	end
279
end
280
elements.property(Lcas, "LowTemperature", 200) -- turn into Solid Caesium
281
tpt.element_func(proplcas, tpt.element("lcas"))
282
elements.property(Lcas, "LowTemperatureTransition", caes)
283
-- Palladium
284
-- notes: Asorbs hydrogen, acid resistant, melts at 1833.15, solidifies at about 1700
285
Pald = elements.allocate("STB", "PALD") --properties
286
elements.element(Pald, elements.element(elements.DEFAULT_PT_GLAS))
287
elements.property(Pald, "Name", "PALD")
288
elements.property(Pald, "Description", "Palladium. Adsorbs Hydrogen and doesn't corrode.")
289
elements.property(Pald, "Colour", 0xFFABBBBF)
290
elements.property(Pald, "MenuSection", 9)
291
elements.property(Pald, "Gravity", 0)
292
elements.property(Pald, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_CONDUCTS)
293
elements.property(Pald, "Flammable", 0)
294
elements.property(Pald, "Explosive", 0)
295
elements.property(Pald, "HighTemperature", 1833.15)
296
function propp(i,x,y,s,nt)
297
local life = tpt.get_property("life", i)
298
	if life >= 1 then
299
	tpt.set_property("life", 0 , i)
300
	end 
301
-- adsorbs hydrogen
302
local collx = math.random(-1,1)
303
local colly = math.random(-1,1)
304
hygn = tpt.get_property("type", x+collx, y+colly)
305
	if hygn == elements.DEFAULT_PT_HYGN then
306
	tpt.delete(x+collx, y+colly)
307
	end
308
end
309
tpt.element_func(propp, tpt.element("pald"))
310
-- Radium
311
-- notes: Emits light and decays, soft and a white to black colour. Radium corrodes in water. Dangerous to humans. Melts at 973.15 boils at 1413.15.
312
Radi = elements.allocate("RAD", "RADI") --properties
313
elements.element(Radi, elements.element(elements.DEFAULT_PT_TTAN))
314
elements.property(Radi, "Name", "RADI")
315
elements.property(Radi, "Description", "Radium. Emits light and slowly corrodes in water.")
316
elements.property(Radi, "Colour", 0xFFFFFFFF)
317
elements.property(Radi, "MenuSection", 10)
318
elements.property(Radi, "Gravity", 0)
319
elements.property(Radi, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_DEADLY)
320
elements.property(Radi, "Flammable", 0)
321
elements.property(Radi, "Explosive", 0)
322
elements.property(Radi, "HighTemperature", 1413.15)
323
function propr(i,x,y,s,n)
324
local ratemp = tpt.get_property("temp",i)
325
	if ratemp > 973.15 then
326
	tpt.set_property("type","lrad",i)
327
	end
328
	if math.random(0,100) == 1 then -- create photons and decay
329
	local mathx = math.random(-1,1)
330
	local mathy = math.random(-1,1)
331
	tpt.create(x+mathx, y+mathy, "PHOT")
332
	tpt.set_property("life",680,mathx,mathy)
333
		if(math.random(0,7500) == 1) then
334
		tpt.set_property("life", 10000, i)
335
		tpt.set_property("vx", math.random(-25,25), i)
336
		tpt.set_property("vy", math.random(-25,25), i) 
337
		tpt.set_property("type", "neut", i)
338
		end 
339
	end
340
local nx = math.random(-1,1) -- react w/ water
341
local nx2 = math.random(-1,1)
342
watr = tpt.get_property("type", x+nx, y+nx2)
343
	if watr == elements.DEFAULT_PT_WATR then
344
		if math.random(0,7500) == 1 then
345
		tpt.set_property("type","exot",i)
346
		end
347
	end
348
	if watr == elements.DEFAULT_PT_DSTW then
349
		if math.random(0,7500) == 1 then
350
		tpt.set_property("type","exot",i)
351
		end
352
	end
353
	if watr == elements.DEFAULT_PT_SLTW then
354
		if math.random(0,7500) == 1 then
355
		tpt.set_property("type","exot",i)
356
		end
357
	end
358
end 
359
tpt.element_func(propr, tpt.element("radi"))
360
-- Liquid Radium 
361
-- notes:
362
Lrad = elements.allocate("RAD", "Lrad") --properties
363
elements.element(Lrad, elements.element(elements.DEFAULT_PT_MERC))
364
elements.property(Lrad, "Name", "LRAD")
365
elements.property(Lrad, "Description", "Liquid Radium. Emits light and slowly corrodes in water.")
366
elements.property(Lrad, "Colour", 0xFFFFFFFF)
367
elements.property(Lrad, "MenuSection", 10)
368
elements.property(Lrad, "Gravity", 1)
369
elements.property(Lrad, "Properties", elements.ST_LIQUID + elements.TYPE_LIQUID + elements.PROP_DEADLY)
370
elements.property(Lrad, "Flammable", 0)
371
elements.property(Lrad, "Explosive", 0)
372
elements.property(Lrad, "HighTemperature", 1413.15)
373
elements.property(Lrad, "LowTemperature", 1300)
374
elements.property(Lrad, "LowTemperatureTransition", Radi)
375
function proplr(i,x,y,s,n)
376
local lrtemp = tpt.get_property("temp",i)
377
tpt.set_property("temp", lrtemp + 973.15, i)
378
	if math.random(0,100) == 1 then -- decay and create photons
379
	local mathx = math.random(-1,1)
380
	local mathy = math.random(-1,1)
381
	tpt.create(x+mathx, y+mathy, "PHOT")
382
	tpt.set_property("life",680,x+mathx, y+mathy)
383
		if(math.random(0,7500) == 1) then
384
		tpt.set_property("life", 10000, i)
385
		tpt.set_property("vx", math.random(-25,25), i)
386
		tpt.set_property("vy", math.random(-25,25), i) 
387
		tpt.set_property("type", "neut", i)
388
		end
389
	end 
390
local nx = math.random(-1,1) -- react w/ water
391
local nx2 = math.random(-1,1)
392
watr = tpt.get_property("type", x+nx, y+nx2)
393
	if watr == elements.DEFAULT_PT_WATR then
394
		if math.random(0,7500) == 1 then
395
		tpt.set_property("type","exot",i)
396
		end
397
	end
398
	if watr == elements.DEFAULT_PT_DSTW then
399
		if math.random(0,7500) == 1 then
400
		tpt.set_property("type","exot",i)
401
		end
402
	end
403
	if watr == elements.DEFAULT_PT_SLTW then
404
		if math.random(0,7500) == 1 then
405
		tpt.set_property("type","exot",i)
406
		end
407
	end		
408
end
409
tpt.element_func(proplr, tpt.element("lrad"))
410
-- Magnesium 
411
-- notes: Burns with fire or plasma, flame is very hot. Melts (or burns) at 923.15. Boils at 1380.15. Burns with white flame. Creates hydrogen with acid.
412
Magn = elements.allocate("STB", "MAGN") --properties
413
elements.element(Magn, elements.element(elements.DEFAULT_PT_GLAS))
414
elements.property(Magn, "Name", "MAGN")
415
elements.property(Magn, "Description", "Magnesium. Burns with an intense flame.")
416
elements.property(Magn, "Colour", 0x586165)
417
elements.property(Magn, "MenuSection", 9)
418
elements.property(Magn, "Gravity", 0)
419
elements.property(Magn, "Properties", elements.ST_SOLID + elements.TYPE_SOLID)
420
elements.property(Magn, "Flammable", 0)
421
elements.property(Magn, "Explosive", 0)
422
elements.property(Magn, "HighTemperature", 100000)
423
function propmag(i,x,y,s,n)
424
local tempm = tpt.get_property("temp", i) -- burn with temperature.
425
	if tempm > 1380.15 and math.random(0,10) == 1 then
426
	tpt.set_property("life", 500, i)
427
	tpt.set_property("temp", 6500, i)
428
	local magran = math.random(1,3)
429
		if magran == 1 then
430
		tpt.set_property("type", "PLSM", i)
431
		end
432
		if magran == 2 then
433-
		if math.random(0,10) == 1 then
433+
			if math.random(0,5) == 1 then
434-
			tpt.set_property("vx", math.random(-5,5), i)
434+
			local ran = x+math.random(-1,1)
435-
			tpt.set_property("vy", math.random(-5,5), i)
435+
			local ran2 = y+math.random(-1,1)
436-
			tpt.set_property("life", 250, i)
436+
			tpt.create(ran, ran2, "mort")
437-
			tpt.set_property("type", "MORT", i)
437+
			tpt.set_property("vx", math.random(-25,25) , ran)
438-
		else
438+
			tpt.set_property("vy", math.random(-25,25) , ran2)
439
			else
440
			tpt.set_property("type", "PLSM", i)
441
			end
442
		end
443
		if magran == 3 then
444
		tpt.set_property("life", 1000, i)
445
		tpt.set_property("type", "PLSM", i)
446
		end
447
	end
448
local magx = math.random(-1,1)
449
local magy = math.random(-1,1)
450
local acid = tpt.get_property("type", x+magx, y+magy) -- react with acid
451
	if acid == elements.DEFAULT_PT_ACID then
452
	tpt.set_property("type", "HYGN", i)
453
	tpt.set_property("type", "HYGN", acid)
454
	end
455
end
456
tpt.element_func(propmag, tpt.element("magn"))
457
-- Francium
458
-- notes: Violently explodes in water. 
459
Fran = elements.allocate("RAD", "Fran") --properties
460
elements.element(Fran, elements.element(elements.DEFAULT_PT_BCOL))
461
elements.property(Fran, "Name", "FRAN")
462
elements.property(Fran, "Description", "Francium. Highly unstable and will decay within seconds. Do not place in water.")
463
elements.property(Fran, "Colour", 0xC0C0C0)
464
elements.property(Fran, "MenuSection", 10)
465
elements.property(Fran, "Weight", 100)
466
elements.property(Fran, "Gravity", 1)
467
elements.property(Fran, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_DEADLY)
468
elements.property(Fran, "Flammable", 0)
469
elements.property(Fran, "Explosive", 0)
470
elements.property(Fran, "HighTemperature", 100000)
471
function propfr(i,x,y,s,n)
472
	if math.random(0,25) == 1 then
473
		local frdecay = math.random(1,7) -- decay
474
		local frtemp = tpt.get_property("temp", i)
475
		tpt.set_property("life", math.random(500,1000),i)
476
		tpt.set_property("vx", math.random(-25,25), i)
477
		tpt.set_property("vy", math.random(-25,25), i) 
478
		tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
479
		tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
480
		tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
481
			if frdecay == 1 then 
482
			tpt.set_property("temp", frtemp + 50000 , i)
483
			tpt.set_property("type", "PHOT", i)
484
			end
485
			if frdecay == 2 then
486
			tpt.set_property("type", "PHOT", i)
487
			end
488
			if frdecay == 3 then 
489
			tpt.set_property("type", "PROT", i)
490
			end
491
			if frdecay == 4 then 
492
			tpt.set_property("type", "NEUT", i)
493
			end
494
			if frdecay == 5 then 
495
			tpt.set_property("type", "NEUT", i)
496
			end
497
			if frdecay == 5 then 
498
			tpt.set_property("type", "NBLE", i)
499
			end
500
			if frdecay == 5 then 
501
			tpt.set_property("type", "PROT", i)
502
			end
503
	end
504
local col = math.random(-1,1) -- react with water
505
local col2 = math.random(-1,1)
506
colltype = tpt.get_property("type", x+col, y+col2)
507
	if colltype == elements.DEFAULT_PT_WATR then
508
	if math.random(0,1) == 1 then
509
	local ran = x+math.random(-1,1)
510
	local ran2 = y+math.random(-1,1)
511
	tpt.create(ran, ran2, "mort")
512
	tpt.set_property("vx", math.random(-25,25) , ran)
513
	tpt.set_property("vy", math.random(-25,25) , ran2)
514
	end
515
	local frdecay = math.random(1,7)
516
	local frtemp = tpt.get_property("temp", i)
517
	tpt.set_property("type", "PHOT", colltype)
518
	tpt.set_property("life", math.random(500,1000),i)
519
	tpt.set_property("vx", math.random(-25,25), i)
520
	tpt.set_property("vy", math.random(-25,25), i) 
521
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
522
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
523
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
524
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "thdr")
525
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "caes")
526
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "magn")
527
	tpt.set_pressure(x,y,1,1,200)
528
	    if frdecay == 1 then 
529
		tpt.set_property("temp", frtemp + 50000 , i)
530
		tpt.set_property("type", "PHOT", i)
531
		end
532
		if frdecay == 2 then
533
		tpt.set_property("type", "PHOT", i)
534
		end
535
		if frdecay == 3 then 
536
		tpt.set_property("type", "PROT", i)
537
		end
538
		if frdecay == 4 then 
539
		tpt.set_property("type", "NEUT", i)
540
		end
541
		if frdecay == 5 then 
542
		tpt.set_property("type", "NEUT", i)
543
		end
544
		if frdecay == 5 then 
545
		tpt.set_property("type", "NBLE", i)
546
		end
547
		if frdecay == 5 then 
548
		tpt.set_property("type", "PROT", i)
549
		end
550
	end
551
	if colltype == elements.DEFAULT_PT_DSTW then
552
	if math.random(0,1) == 1 then
553
	local ran = x+math.random(-1,1)
554
	local ran2 = y+math.random(-1,1)
555
	tpt.create(ran, ran2, "mort")
556
	tpt.set_property("vx", math.random(-25,25) , ran)
557
	tpt.set_property("vy", math.random(-25,25) , ran2)
558
	end
559
	local frdecay = math.random(1,7)
560
	local frtemp = tpt.get_property("temp", i)
561
	tpt.set_property("life", math.random(500,1000),i)
562
	tpt.set_property("vx", math.random(-25,25), i)
563
	tpt.set_property("vy", math.random(-25,25), i) 
564
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
565
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
566
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
567
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "thdr")
568
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "caes")
569
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "magn")
570
	tpt.set_pressure(x,y,10,10,200)
571
	    if frdecay == 1 then 
572
		tpt.set_property("temp", frtemp + 50000 , i)
573
		tpt.set_property("type", "PHOT", i)
574
		end
575
		if frdecay == 2 then
576
		tpt.set_property("type", "PHOT", i)
577
		end
578
		if frdecay == 3 then 
579
		tpt.set_property("type", "PROT", i)
580
		end
581
		if frdecay == 4 then 
582
		tpt.set_property("type", "NEUT", i)
583
		end
584
		if frdecay == 5 then 
585
		tpt.set_property("type", "NEUT", i)
586
		end
587
		if frdecay == 5 then 
588
		tpt.set_property("type", "NBLE", i)
589
		end
590
		if frdecay == 5 then 
591
		tpt.set_property("type", "PROT", i)
592
		end
593
	end
594
	if colltype == elements.DEFAULT_PT_SLTW then
595
	if math.random(0,1) == 1 then
596
	local ran = x+math.random(-1,1)
597
	local ran2 = y+math.random(-1,1)
598
	tpt.create(ran, ran2, "mort")
599
	tpt.set_property("vx", math.random(-25,25) , ran)
600
	tpt.set_property("vy", math.random(-25,25) , ran2)
601
	end
602
	local frdecay = math.random(1,7)
603
	local frtemp = tpt.get_property("temp", i)
604
	tpt.set_property("life", math.random(500,1000),i)
605
	tpt.set_property("vx", math.random(-25,25), i)
606
	tpt.set_property("vy", math.random(-25,25), i) 
607
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
608
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
609
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
610
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "thdr")
611
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "caes")
612
	tpt.create(x+math.random(-1,1), y+math.random(-1,1), "magn")
613
	tpt.set_pressure(x,y,10,10,200)
614
	    if frdecay == 1 then 
615
		tpt.set_property("temp", frtemp + 50000 , i)
616
		tpt.set_property("type", "PHOT", i)
617
		end
618
		if frdecay == 2 then
619
		tpt.set_property("type", "PHOT", i)
620
		end
621
		if frdecay == 3 then 
622
		tpt.set_property("type", "PROT", i)
623
		end
624
		if frdecay == 4 then 
625
		tpt.set_property("type", "NEUT", i)
626
		end
627
		if frdecay == 5 then 
628
		tpt.set_property("type", "NEUT", i)
629
		end
630
		if frdecay == 5 then 
631
		tpt.set_property("type", "NBLE", i)
632
		end
633
		if frdecay == 5 then 
634
		tpt.set_property("type", "PROT", i)
635
		end
636
	end
637
end
638
tpt.element_func(propfr, tpt.element("Fran"))