forked from AvanWolf/G.O.D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModuleEnhancements.xml
462 lines (429 loc) · 15.8 KB
/
ModuleEnhancements.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
128
129
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<?xml version="1.0" ?>
<TranscendenceModule>
<!--
TODO
* Enhance reactors with (shpEnhanceItem greactor)
-->
<Globals>
(block (module)
(setq module (list
'((weight 5)
(title "Apply Enhancement")
; (subtitle "Because a +fast Ares Archcannon works wonders!")
(on-select (block nil
(dsf/add-action 'select '("Select" 'S) (lambda nil
(god/enhance-item)
))
(dsf/set-default-action 'select)
))
)
'((weight 5)
(title "Analyze Enhancement")
; (subtitle "Find out just what is going on with your enhancement")
(hide (block ((do-hide true))
(objEnumItems gPlayerShip "*" itm
(if (itmIsEnhanced itm) (setq do-hide nil))
)
do-hide
))
(on-select (block nil
(dsf/add-action 'select '("Select" 'S) (lambda nil
(block nil
(dsf/new-screen 'analyze-enhancement "Analyze Enhancement" 'itempicker)
(dsf/set-item-filter (lambda nil (lambda (itm)
(itmIsEnhanced itm)
)))
(dsf/set-description (lambda (desc) (block (itm hex)
(setq itm (dsf/get-item))
(if (and itm (setq hex (itmIsEnhanced itm))) (block (data type)
(setq data (god/decode-enhancement hex))
(setq type (fn/get data 'type))
(dbgLog type)
(setq desc (cat desc "Type: " (fn/get data 'name) " [" (fn/get data 'hex) "]\n"))
(if (eq type 2)
(setq desc (cat desc "Damage Type: " (fn/int-to-damagetype (modulo (divide hex 16) 16)) "\n"))
)
(if (or (eq type 1) (eq type 2))
(setq desc (cat desc "Power: " (modulo hex 16) "\n"))
)
))
desc
)))
(dsf/show-screen)
)
))
(dsf/set-default-action 'select)
))
)
'((weight 5)
(title "Remove Enhancement")
; (subtitle "Because we are testers after all :/")
(hide (block ((do-hide true))
(objEnumItems gPlayerShip "*" itm
(if (itmIsEnhanced itm) (setq do-hide nil))
)
do-hide
))
(on-select (block nil
(dsf/add-action 'select '("Select" 'S) (lambda nil
(block nil
(dsf/new-screen 'remove-enhancement "Remove Enhancement" 'itempicker)
(dsf/set-item-filter (lambda nil (lambda (itm)
(itmIsEnhanced itm)
)))
(dsf/add-action 'remove '("Remove" 'R) (lambda nil
(block (itm)
(setq itm (dsf/get-item))
;; FIXME does this still work??
(objSetItemProperty gPlayerShip itm 'damaged)
(dsf/notify "Unenhanced Item")
(dsf/show-screen)
)
))
(dsf/show-screen)
)
))
(dsf/set-default-action 'select)
))
)
))
(setq god/modules (if (iserror god/modules)
module
(append god/modules module)
))
(setq god/enhance-item (lambda nil (block nil
(dsf/new-screen 'enhance-item "Enhance Item" 'itempicker)
(dsf/set-description "Select an item you want to enhance")
(dsf/set-item-filter "swabr")
(dsf/add-action 'select '("Select" 'S) (lambda nil (block (itm criteria)
(setq itm (dsf/get-item))
(dsf/session-set 'enhancement-item itm)
(setq criteria (fn/int-to-criteria (itmGetCategory itm)))
(if (eq criteria "l") (setq criteria "w"))
(dsf/session-set 'enhancement-criteria criteria)
(dsf/session-set 'enhancement-object gPlayerShip)
(god/enhancement-choose)
)))
(dsf/set-default-action 'select)
(dsf/set-disable-action 'select '(dsf/list-is-empty))
(dsf/set-no-save 'select)
(dsf/show-screen)
)))
(setq god/enhancement-choose (lambda nil (block (type)
(dsf/new-screen 'enhancement-choose "Select Enhancement" 'custompicker)
(dsf/set-description "Choose the enhancement you want to apply")
(setq criteria (dsf/session-delete 'enhancement-criteria))
(enum (filter god/enhancement-data e (find (fn/get e 'criteria) criteria)) e
(dsf/add-list-entry (list
(list 'title (cat (fn/get e 'name) ": " (fn/get e 'hex)))
(list 'subtitle (cat "Applicable for: " (fn/get e 'devices) "\n\n" (fn/get e 'desc)))
(list 'hex (fn/get e 'hex))
(list 'type (fn/get e 'type))
))
)
(dsf/add-action 'select '("Select" 'S) (lambda nil (block (type)
(dsf/session-set 'enhancement-hex (dsf/get-list-entry 'hex))
(setq type (dsf/get-list-entry 'type))
(switch
(eq type 2)
(god/enhancement-type)
(eq type 1)
(god/enhancement-power)
(god/enhancement-apply)
)
)))
(dsf/set-default-action 'select)
(dsf/set-no-save 'select)
(dsf/set-no-back)
(dsf/show-screen)
)))
(setq god/enhancement-type (lambda nil (block nil
(dsf/new-screen 'enhancement-type "Enhancement Damage Type" 'custompicker)
(dsf/set-description "Choose the damage type of the enhancement")
(enum (fn/range 0 15) i (dsf/add-list-entry (list
(list 'title (fn/int-to-damagetype i))
(list 'damagetype i)
)))
(dsf/add-action 'select '("Select" 'S) (lambda nil
(block (damagetype hex)
(setq damagetype (dsf/get-list-entry 'damagetype))
(setq hex (dsf/session-get 'enhancement-hex))
(setq hex (add hex (multiply damagetype 15)))
(dsf/session-set 'enhancement-hex hex)
(god/enhancement-power)
)
))
(dsf/set-default-action 'select)
(dsf/set-no-save 'select)
(dsf/set-no-back)
(dsf/show-screen)
)))
(setq god/enhancement-power (lambda nil (block nil
(dsf/new-screen 'enhancement-power "Enhancement Power" 'standard)
(dsf/set-description "Choose the power of the enhancement. Can be a number from 0 to 15")
(dsf/set-pane 'Counter)
(dsf/add-action 'select '('Select 'S) (lambda nil (block (pow hex)
(setq pow (dsf/get-counter 0 15))
(setq hex (dsf/session-get 'enhancement-hex))
(setq hex (add hex pow))
(dsf/session-set 'enhancement-hex hex)
(god/enhancement-apply)
)))
(dsf/set-default-action 'select)
(dsf/set-no-save 'select)
(dsf/set-no-back)
(dsf/show-screen)
)))
(setq god/enhancement-apply (lambda nil (block nil
(dsf/new-screen 'enhancement-apply "Apply Enhancement")
(dsf/on-screen-init (lambda nil (block (hex itm obj)
(setq hex (dsf/session-delete 'enhancement-hex))
(setq itm (dsf/session-delete 'enhancement-item))
(setq obj (dsf/session-delete 'enhancement-object))
(if (shpEnhanceItem obj itm hex)
(dsf/set-description "Enhancement applied")
(dsf/set-description "An error ocurred. Please contact your local administrator")
)
)))
(dsf/add-action 'more '("Enhance More" 'M) (lambda nil
(god/enhance-item)
))
(dsf/set-no-save 'more)
(dsf/add-action 'return '("Return to Main" 'R) (lambda nil
(god/core-screen)
))
(dsf/set-default-action 'return)
(dsf/set-no-save 'return)
(dsf/set-no-back)
(dsf/show-screen)
)))
(setq god/decode-enhancement (lambda (value)
(block (hex selected)
(setq hex (multiply 16 (subtract (divide value 16) (modulo value 16))))
(enum god/enhancement-data enhancement
(if (eq (int (fn/get enhancement 'hex)) hex)
(setq selected enhancement)
)
)
(if (not selected) (block nil
(setq hex (multiply 16 (divide value 16)))
(enum god/enhancement-data enhancement
(if (eq (int (fn/get enhancement 'hex)) hex)
(setq selected enhancement)
)
)
))
selected
)
))
(setq god/enhancement-data (list
'((name "Damage Reflect")
(devices "Shield")
(criteria "s")
(hex "0x0300")
(type 2)
(desc "Causes damage type Y to bounce off shields with probability X.")
)
'((name "Damage Transparency")
(devices "Shield")
(criteria "s")
(hex "0x8300")
(type 2)
(desc "Causes damage type Y to pass through shields with probability X.")
)
'((name "Regeneration")
(devices "Armor")
(criteria "a")
(hex "0x0200")
(type 0)
(desc "More information needed..")
)
'((name "Decay")
(devices "Armor")
(criteria "a")
(hex "0x8200")
(type 0)
(desc "More information needed..")
)
'((name "Immunity, Radiation")
(devices "Armor")
(criteria "a")
(hex "0x0B00")
(type 0)
(desc "Will render armor immune to radiation.")
)
'((name "Immunity, Blinding")
(devices "Armor")
(criteria "a")
(hex "0x0B10")
(type 0)
(desc "Will render armor immune to blinding.")
)
'((name "Immunity, EMP")
(devices "Armor")
(criteria "a")
(hex "0x0B20")
(type 0)
(desc "Will render armor immune to EMP.")
)
'((name "Immunity, Device Damage")
(devices "Armor")
(criteria "a")
(hex "0x0B30")
(type 0)
(desc "Will render armor immune to Device Damage.")
)
'((name "Immunity, Disintegration")
(devices "Armor")
(criteria "a")
(hex "0x0B40")
(type 0)
(desc "Will render armor immune to Disintegration.")
)
'((name "Immunity, Blinding/EMP/Device Damage")
(devices "Armor")
(criteria "a")
(hex "0x0C00")
(type 0)
(desc "Will render armor immune to Blinding/EMP/Device Damage.")
)
'((name "Interferes with Shields")
(devices "Armor")
(criteria "a")
(hex "0x8C00")
(type 0)
(desc "Armor will interfere with shields.")
)
'((name "Regenerate near Sun")
(devices "Armor")
(criteria "a")
(hex "0x0D00")
(type 0)
(desc "Armor will regenerate near a sun.")
)
'((name "Refuel near Sun")
(devices "Armor")
(criteria "a")
(hex "0x0E00")
(type 0)
(desc "Armor will refuel ship's reactor near a sun.")
)
'((name "Damage / Hit Point Bonus")
(devices "Weapon, Shield, Armor")
(criteria "was")
(hex "0x0100")
(type 1)
(desc "Will increase damage output or hitpoints from 10 to 150 percent.")
)
'((name "Damage / Hit Point Penalty")
(devices "Weapon, Shield, Armor")
(criteria "was")
(hex "0x8100")
(type 1)
(desc "Will decrease damage output or hitpoints from 10 to 150 percent.")
)
'((name "Speed Increase")
(devices "Weapon")
(criteria "w")
(hex "0x1000")
(type 1)
(desc "Will increase a weapons rate of fire from 10 to 150%.")
)
'((name "Speed Decrease")
(devices "Weapon")
(criteria "w")
(hex "0x9000")
(type 1)
(desc "Will decrease a weapons rate of fire from 10 to 150%.")
)
'((name "Damage Reduction, Energy")
(devices "Shield, Armor")
(criteria "sa")
(hex "0x0600")
(type 1)
(desc "More information needed.")
)
'((name "Damage Reduction, Matter")
(devices "Shield, Armor")
(criteria "sa")
(hex "0x0700")
(type 1)
(desc "More information needed.")
)
'((name "Damage Reduction, Special I")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x0800")
(type 2)
(desc "Reduce damage of type Y and Y+1. More information needed.")
)
'((name "Damage Reduction, Special II")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x0900")
(type 2)
(desc "Reduce damage of type Y. More information needed.")
)
'((name "Damage Reduction, Special III")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x0A00")
(type 2)
(desc "Reduce damage of type Y and Y+2 with 1.5*X. More information needed.")
)
'((name "Damage Increase, Energy")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x8600")
(type 1)
(desc "More information needed.")
)
'((name "Damage Increase, Matter")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x8700")
(type 1)
(desc "More information needed.")
)
'((name "Damage Increase, Special I")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x8800")
(type 2)
(desc "Increase damage of type Y and Y+1. More information needed.")
)
'((name "Damage Increase, Special II")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x8900")
(type 2)
(desc "Increase damage of type Y. More information needed.")
)
'((name "Damage Increase, Special III")
(devices "Shield, Armor, (Weapon?)")
(criteria "wsa")
(hex "0x8A00")
(type 2)
(desc "Increase damage of type Y and Y+2 with 1.5*X. More information needed.")
)
'((name "Efficiency")
(devices "Shield, Weapon")
(criteria "wsbr")
(hex "0x0F00")
(type 1)
(desc "Lowers power consumption. Effect of higher X unknown. More information needed.")
)
'((name "Decrease Efficiency")
(devices "Shield, Weapon")
(criteria "ws")
(hex "0x8F00")
(type 1)
(desc "Increase power consumption. Effect of higher X unknown. More information needed.")
)
))
)
</Globals>
</TranscendenceModule>
<!--
vim:ts=2:sw=2:sts=2:ft=tlisp:
-->