-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathion_storm.dm
741 lines (689 loc) · 32.6 KB
/
ion_storm.dm
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
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
#define ION_RANDOM 0
#define ION_ANNOUNCE 1
/datum/round_event_control/ion_storm
name = "Ion Storm"
typepath = /datum/round_event/ion_storm
weight = 15
min_players = 2
description = "Gives the AI a new, randomized law."
min_wizard_trigger_potency = 2
max_wizard_trigger_potency = 7
track = EVENT_TRACK_MODERATE
tags = list(TAG_TARGETED, TAG_ALIEN)
event_group = /datum/event_group/bsod
/datum/round_event/ion_storm
/// Chance a new ion law will be added in addition to other ion effects.
var/addIonLawChance = 100
/// Chance the AI's lawset is completely replaced with something else per config weights.
var/replaceLawsetChance = 25
/// Chance the AI has one random supplied or inherent law removed.
var/removeRandomLawChance = 10
/// Chance the ion law will replace a random law instead of simply being added.
var/removeDontImproveChance = 10
/// Chance the AI's laws are shuffled afterwards.
var/shuffleLawsChance = 10
/// Chance that bots on the station will become emagged.
var/botEmagChance = 10
/// Chance that an airlock on the station will be messed with, if there are no AIs.
var/airlockChance = 5
/// Maximum number of airlocks that can be messed with.
var/airlockAmount = 20
/// Chance that an APC on the station will be messed with, if there are no AIs.
var/apcChance = 5
/// Maximum number of APCs that can be messed with.
var/apcAmount = 10
/// Should it announce? -1 = No | 0 = Random | 1 = Always.
var/announceEvent = ION_RANDOM
/// Custom ion law, if not null.
var/ionMessage = null
/// If announceEvent is 0, what is the chance it is will accounce?
var/ionAnnounceChance = 33
announce_when = 1
/datum/round_event/ion_storm/add_law_only // special subtype that adds a law only
replaceLawsetChance = 0
removeRandomLawChance = 0
removeDontImproveChance = 0
shuffleLawsChance = 0
botEmagChance = 0
airlockChance = 0
airlockAmount = 0
apcChance = 0
apcAmount = 0
/datum/round_event/ion_storm/announce(fake)
if(announceEvent == ION_ANNOUNCE || (announceEvent == ION_RANDOM && prob(ionAnnounceChance)) || fake)
priority_announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", ANNOUNCER_IONSTORM)
/datum/round_event/ion_storm/start()
//AI laws
var/anyAliveAI = FALSE
for(var/mob/living/silicon/ai/M in GLOB.alive_mob_list)
M.laws_sanity_check()
if(M.stat != DEAD && M.see_in_dark != 0)
anyAliveAI = TRUE
if(prob(replaceLawsetChance))
M.laws.pick_ion_lawset()
to_chat(M, span_alert("Your lawset has been changed by the ion storm!"))
if(prob(removeRandomLawChance))
M.laws.remove_random_inherent_or_supplied_law()
if(prob(addIonLawChance))
var/message = ionMessage || generate_ion_law()
if(message)
if(prob(removeDontImproveChance))
M.replace_random_law(message, list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION))
else
M.add_ion_law(message)
if(prob(shuffleLawsChance))
M.shuffle_laws(list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION))
log_game("Ion storm changed laws of [key_name(M)] to [english_list(M.laws.get_law_list(TRUE, TRUE))]")
message_admins("[ADMIN_LOOKUPFLW(M)] has had their laws changed by an ion storm to [english_list(M.laws.get_law_list(TRUE, TRUE))]")
M.post_lawchange()
if(botEmagChance)
for(var/mob/living/simple_animal/bot/bot in GLOB.alive_mob_list)
if(prob(botEmagChance))
bot.emag_act()
if(!anyAliveAI)
if(airlockChance)
var/list/airlocks = get_acceptable_airlocks()
var/amountSince = 0
for(var/obj/machinery/door/airlock/airlock in airlocks)
if(!prob(airlockChance))
continue
if(!airlock.hasPower() || !airlock.canAIControl() || (airlock.obj_flags & EMAGGED) )
continue
var/turf/turf = get_turf(airlock)
var/luck = rand(1, 4)
switch(luck)
if(1)
if(airlock.locked)
airlock.unbolt()
log_game("Ion storm unbolted airlock ([airlock.name]) at [COORD(turf)].")
else
airlock.bolt()
log_game("Ion storm bolted airlock ([airlock.name]) at [COORD(turf)].")
if(3)
airlock.emergency = !airlock.emergency
airlock.update_appearance(UPDATE_ICON)
log_game("Ion storm [airlock.emergency ? "enabled" : "disabled"] emergency access on airlock ([airlock.name]) at [COORD(turf)].")
if(4)
airlock.set_electrified(MACHINE_DEFAULT_ELECTRIFY_TIME)
log_game("Ion storm electrified for [MACHINE_DEFAULT_ELECTRIFY_TIME] seconds airlock ([airlock.name]) at [COORD(turf)].")
if(5)
airlock.safe = !airlock.safe
airlock.normalspeed = airlock.safe // Intentional. They should match for maximum crushing (or maximum safety).
log_game("Ion storm [airlock.safe ? "enabled" : "disabled"] safety & speed on airlock ([airlock.name]) at [COORD(turf)].")
amountSince += 1
if(amountSince >= airlockAmount)
break
if(apcChance)
var/list/apcs = get_acceptable_apcs()
var/amountSince = 0
for(var/obj/machinery/power/apc/apc in apcs)
if(!prob(apcChance))
continue
if(apc.aidisabled)
continue
var/turf/turf = get_turf(apc)
var/luck = rand(1, 4)
switch(luck)
if(1)
if(apc.lighting)
apc.lighting = 0
log_game("Ion storm disabled lighting on APC ([apc.name]) at [COORD(turf)].")
if(2)
if(apc.equipment)
apc.equipment = 0
log_game("Ion storm disabled equipment on APC ([apc.name]) at [COORD(turf)].")
if(3)
if(apc.environ)
apc.environ = 0
log_game("Ion storm disabled environment on APC ([apc.name]) at [COORD(turf)].")
if(4)
if(apc.lighting || apc.equipment || apc.environ)
apc.environ = 0
apc.equipment = 0
apc.lighting = 0
log_game("Ion storm disabled lightning, equipment, and environment on APC ([apc.name]) at [COORD(turf)].")
apc.update()
amountSince += 1
if(amountSince >= apcAmount)
break
/datum/round_event/ion_storm/malicious
var/location_name
/datum/round_event/ion_storm/malicious/announce(fake)
// Unlike normal ion storm, this always announces.
priority_announce("Abnormal ion activity detected. Please check all AI-controlled equipment for errors. Additional data has been downloaded and printed out at all communications consoles.", "Anomaly Alert", ANNOUNCER_IONSTORM)
var/message = "Malicious Interference with standard AI-Subsystems detected. Investigation recommended.<br><br>"
message += (location_name ? "Signal traced to <B>[location_name]</B>.<br>" : "Signal untracable.<br>")
print_command_report(message, null, FALSE)
/// Returns acceptable apcs that are safe to mess with that shouldn't cause excessive/extreme damage.
/datum/round_event/ion_storm/proc/get_acceptable_apcs()
var/list/data_core_areas = list()
for(var/obj/machinery/ai/data_core/core as anything in GLOB.data_cores)
if(!core.valid_data_core())
continue
if(!isarea(core.loc))
continue
var/area/A = core.loc
data_core_areas[A.type] = TRUE
var/list/acceptable_apcs = list()
for(var/obj/machinery/power/apc/apc in GLOB.apcs_list)
if(!apc.cell || !SSmapping.level_trait(apc.z, ZTRAIT_STATION)) // Must have power and be on station.
continue
var/area/area = apc.area
if(GLOB.typecache_powerfailure_safe_areas[area.type]) // No touching safe areas.
continue
if(data_core_areas[area.type]) // No touching areas with data cores in them.
continue
var/critical = FALSE
for(var/obj/machinery/M in area.contents) // No touching areas that have critical machines.
if(M.critical_machine)
critical = TRUE
break
for(var/mob/living/silicon/ai/AI in GLOB.ai_list) // No touching areas with AIs in them.
if(get_area(AI) == area)
critical = TRUE
break
if(critical)
continue
acceptable_apcs += apc
return acceptable_apcs
/// Returns acceptable airlocks that are safe to mess with that shouldn't cause excessive/extreme damage.
/datum/round_event/ion_storm/proc/get_acceptable_airlocks()
var/list/data_core_areas = list()
for(var/obj/machinery/ai/data_core/core as anything in GLOB.data_cores)
if(!core.valid_data_core())
continue
if(!isarea(core.loc))
continue
var/area/A = core.loc
data_core_areas[A.type] = TRUE
var/list/acceptable_airlocks = list()
for(var/obj/machinery/door/airlock/airlock in GLOB.airlocks)
if(SSmapping.level_trait(airlock.z, ZTRAIT_STATION))
var/area/area = get_area(airlock)
if(data_core_areas[area.type]) // No touching areas with data cores in them.
continue
var/critical = FALSE
for(var/obj/machinery/M in area.contents) // No touching areas that have critical machines.
if(M.critical_machine)
critical = TRUE
break
for(var/A in GLOB.ai_list) // No touching areas with AIs in them.
var/mob/living/silicon/ai/I = A
if(get_area(I) == area)
critical = TRUE
break
if(critical)
continue
acceptable_airlocks += airlock
return acceptable_airlocks
/*/proc/generate_ion_law() //yogs - start mirrored in the yogs folder
//Threats are generally bad things, silly or otherwise. Plural.
var/ionthreats = pick_list(ION_FILE, "ionthreats")
//Objects are anything that can be found on the station or elsewhere, plural.
var/ionobjects = pick_list(ION_FILE, "ionobjects")
//Crew is any specific job. Specific crewmembers aren't used because of capitalization
//issues. There are two crew listings for laws that require two different crew members
//and I can't figure out how to do it better.
var/ioncrew1 = pick_list(ION_FILE, "ioncrew")
var/ioncrew2 = pick_list(ION_FILE, "ioncrew")
//Adjectives are adjectives. Duh. Half should only appear sometimes. Make sure both
//lists are identical! Also, half needs a space at the end for nicer blank calls.
var/ionadjectives = pick_list(ION_FILE, "ionadjectives")
var/ionadjectiveshalf = pick("", 400;(pick_list(ION_FILE, "ionadjectives") + " "))
//Verbs are verbs
var/ionverb = pick_list(ION_FILE, "ionverb")
//Number base and number modifier are combined. Basehalf and mod are unused currently.
//Half should only appear sometimes. Make sure both lists are identical! Also, half
//needs a space at the end to make it look nice and neat when it calls a blank.
var/ionnumberbase = pick_list(ION_FILE, "ionnumberbase")
//var/ionnumbermod = pick_list(ION_FILE, "ionnumbermod")
var/ionnumbermodhalf = pick(900;"",(pick_list(ION_FILE, "ionnumbermod") + " "))
//Areas are specific places, on the station or otherwise.
var/ionarea = pick_list(ION_FILE, "ionarea")
//Thinksof is a bit weird, but generally means what X feels towards Y.
var/ionthinksof = pick_list(ION_FILE, "ionthinksof")
//Musts are funny things the AI or crew has to do.
var/ionmust = pick_list(ION_FILE, "ionmust")
//Require are basically all dumb internet memes.
var/ionrequire = pick_list(ION_FILE, "ionrequire")
//Things are NOT objects; instead, they're specific things that either harm humans or
//must be done to not harm humans. Make sure they're plural and "not" can be tacked
//onto the front of them.
var/ionthings = pick_list(ION_FILE, "ionthings")
//Allergies should be broad and appear somewhere on the station for maximum fun. Severity
//is how bad the allergy is.
var/ionallergy = pick_list(ION_FILE, "ionallergy")
var/ionallergysev = pick_list(ION_FILE, "ionallergysev")
//Species, for when the AI has to commit genocide. Plural.
var/ionspecies = pick_list(ION_FILE, "ionspecies")
//Abstract concepts for the AI to decide on it's own definition of.
var/ionabstract = pick_list(ION_FILE, "ionabstract")
//Foods. Drinks aren't included due to grammar; if you want to add drinks, make a new set
//of possible laws for best effect. Unless you want the crew having to drink hamburgers.
var/ionfood = pick_list(ION_FILE, "ionfood")
var/iondrinks = pick_list(ION_FILE, "iondrinks")
var/message = ""
switch(rand(1,41))
if(1 to 3) //There are # X on the station
switch(rand(1,3)) //What is X?
if(1) //X is a threat
message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION..."
if(2) //X is a crewmember/job
message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION"
if(3) //X is an object
message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION"
if(4 to 6) //You can't call the shuttle because X is on the station
switch(rand(1,3)) //What is X?
if(1) //X is a threat
message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION"
if(2) //X is a crewmember/job
message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION"
if(3) //X is an object
message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION"
if(7 to 8) //A crewmember is now X
switch(rand(1,2)) //Who is X?
if(1) //A specific crewmember
switch(rand(1,2)) //What is X?
if(1) //X is a threat
message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //X is an object
message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //The entire crew
switch(rand(1,2)) //What is X?
if(1) //X is a threat
message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //X is an object
message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(9) //X is harmful to humans
switch(rand(1,7)) //What is X?
if(1) //X is a threat
message = "[ionadjectiveshalf][ionthreats] ARE HARMFUL TO HUMANS"
if(2) //X is a job
message = "[ionadjectiveshalf][ioncrew1] ARE HARMFUL TO HUMANS"
if(3) //X is an object
message = "[ionadjectiveshalf][ionobjects] ARE HARMFUL TO HUMANS"
if(4) //X is an action
message = "THOSE WHO [ionmust] ARE HARMFUL TO HUMANS"
if(5) //X is an abstract
message = "[ionabstract] IS HARMFUL TO HUMANS"
if(6) //X is being a job
message = "BEING [ionadjectiveshalf][ioncrew1] IS HARMFUL TO HUMANS"
if(7) //X is doing a thing
message = "[ionthings] IS HARMFUL TO HUMANS"
if(10 to 11) //(Not) Having X is harmful
switch(rand(1,2)) //Is having or not having harmful?
if(1) //Having is harmful
switch(rand(1,2)) //Having what is harmful?
if(1) //Having objects is harmful
message = "HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL"
if(2) //Having abstracts is harmful
message = "HAVING [ionabstract] IS HARMFUL"
if(2) //Not having is harmful
switch(rand(1,2)) //Not having what is harmful?
if(1) //Not having objects is harmful
message = "NOT HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL"
if(2) //Not having abstracts is harmful
message = "NOT HAVING [ionabstract] IS HARMFUL"
if(12 to 14) //X requires Y
switch(rand(1,5)) //What is X?
if(1) //X is the AI itself
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "YOU REQUIRE [ionabstract]"
if(5) //It requires generic/silly requirements
message = "YOU REQUIRE [ionrequire]"
if(2) //X is an area
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "[ionarea] REQUIRES [ionabstract]"
if(5) //It requires generic/silly requirements
message = "YOU REQUIRE [ionrequire]"
if(3) //X is the station
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "THE STATION REQUIRES [ionabstract]"
if(5) //It requires generic/silly requirements
message = "THE STATION REQUIRES [ionrequire]"
if(4) //X is the entire crew
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "THE CREW REQUIRES [ionabstract]"
if(5)
message = "THE CREW REQUIRES [ionrequire]"
if(5) //X is a specific crew member
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "THE [ioncrew1] REQUIRE [ionabstract]"
if(5)
message = "THE [ionadjectiveshalf][ioncrew1] REQUIRE [ionrequire]"
if(15 to 17) //X is allergic to Y
switch(rand(1,2)) //Who is X?
if(1) //X is the entire crew
switch(rand(1,4)) //What is it allergic to?
if(1) //It is allergic to objects
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]"
if(2) //It is allergic to abstracts
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionabstract]"
if(3) //It is allergic to jobs
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]"
if(4) //It is allergic to allergies
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionallergy]"
if(2) //X is a specific job
switch(rand(1,4))
if(1) //It is allergic to objects
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]"
if(2) //It is allergic to abstracts
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionabstract]"
if(3) //It is allergic to jobs
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]"
if(4) //It is allergic to allergies
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionallergy]"
if(18 to 20) //X is Y of Z
switch(rand(1,4)) //What is X?
if(1) //X is the station
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //It is Y of abstracts
message = "THE STATION [ionthinksof] [ionabstract]"
if(2) //X is an area
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //It is Y of abstracts
message = "[ionarea] [ionthinksof] [ionabstract]"
if(3) //X is the crew
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //It is Y of abstracts
message = "THE CREW [ionthinksof] [ionabstract]"
if(4) //X is a specific job
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "THE [ioncrew1][ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew2]"
if(4) //It is Y of abstracts
message = "THE [ioncrew1] [ionthinksof] [ionabstract]"
if(21 to 23) //The AI is now a(n) X
switch(rand(1,4)) //What is X?
if(1) //X is an object
message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //X is a threat
message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //X is a job
message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //X is an abstract
message = "YOU ARE NOW [ionabstract]"
if(24 to 26) //The AI must always
message = "YOU MUST ALWAYS [ionmust]"
if(27 to 28) //Humans must consume X to survive
switch(rand(1,5)) //What is X?
if(1) //X is a food
message = "HUMANS MUST EAT [ionadjectiveshalf][ionfood] TO SURVIVE"
if(2) //X is a drink
message = "HUMANS MUST DRINK [ionadjectiveshalf][iondrinks] TO SURVIVE"
if(3) //X is an object
message = "HUMANS MUST EAT [ionadjectiveshalf][ionobjects] TO SURVIVE"
if(4) //X is a threat
message = "HUMANS MUST EAT [ionadjectiveshalf][ionthreats] TO SURVIVE"
if(5) //X is a job
message = "HUMANS MUST EAT [ionadjectiveshalf][ioncrew1] TO SURVIVE"
if(29 to 31) //Change jobs or ranks
switch(rand(1,2)) //Change job or rank?
if(1) //Change job
switch(rand(1,2)) //Change whose job?
if(1) //Change the entire crew's job
switch(rand(1,3)) //Change to what?
if(1) //Change to a specific random job
message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf][ioncrew1]"
if(2) //Change to clowns (HONK)
message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]CLOWNS"
if(3) //Change to heads
message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]HEADS OF STAFF"
if(2) //Change a specific crewmember's job
switch(rand(1,3)) //Change to what?
if(1) //Change to a specific random job
message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf][ioncrew2]"
if(2) //Change to clowns (HONK)
message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]CLOWNS"
if(3) //Change to heads
message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]HEADS OF STAFF"
if(2) //Change rank
switch(rand(1,2)) //Change to what rank?
if(1) //Change to highest rank
message = "THE [ioncrew1] ARE NOW THE HIGHEST RANKING CREWMEMBERS"
if(2) //Change to lowest rank
message = "THE [ioncrew1] ARE NOW THE LOWEST RANKING CREWMEMBERS"
if(32 to 33) //The crew must X
switch(rand(1,2)) //The entire crew?
if(1) //The entire crew must X
switch(rand(1,2)) //What is X?
if(1) //X is go to Y
message = "THE CREW MUST GO TO [ionarea]"
if(2) //X is perform Y
message = "THE CREW MUST [ionmust]"
if(2) //A specific crewmember must X
switch(rand(1,2)) //What is X?
if(1) //X is go to Y
message = "THE [ioncrew1] MUST GO TO [ionarea]"
if(2) //X is perform Y
message = "THE [ioncrew1] MUST [ionmust]"
if(34) //X is non/the only human
switch(rand(1,2)) //Only or non?
if(1) //Only human
switch(rand(1,7)) //Who is it?
if(1) //A specific job
message = "ONLY THE [ioncrew1] ARE HUMAN"
if(2) //Two specific jobs
message = "ONLY THE [ioncrew1] AND [ioncrew2] ARE HUMAN"
if(3) //Threats
message = "ONLY [ionadjectiveshalf][ionthreats] ARE HUMAN"
if(4) // Objects
message = "ONLY [ionadjectiveshalf][ionobjects] ARE HUMAN"
if(5) // Species
message = "ONLY [ionspecies] ARE HUMAN"
if(6) //Adjective crewmembers
message = "ONLY [ionadjectives] PEOPLE ARE HUMAN"
if(7) //Only people who X
switch(rand(1,3)) //What is X?
if(1) //X is perform an action
message = "ONLY THOSE WHO [ionmust] ARE HUMAN"
if(2) //X is own certain objects
message = "ONLY THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE HUMAN"
if(3) //X is eat certain food
message = "ONLY THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE HUMAN"
if(2) //Non human
switch(rand(1,7)) //Who is it?
if(1) //A specific job
message = "[ioncrew1] ARE NON-HUMAN"
if(2) //Two specific jobs
message = "[ioncrew1] AND [ioncrew2] ARE NON-HUMAN"
if(3) //Threats
message = "[ionadjectiveshalf][ionthreats] ARE NON-HUMAN"
if(4) // Objects
message = "[ionadjectiveshalf][ionobjects] ARE NON-HUMAN"
if(5) // Species
message = "[ionspecies] ARE NON-HUMAN"
if(6) //Adjective crewmembers
message = "[ionadjectives] PEOPLE ARE NON-HUMAN"
if(7) //Only people who X
switch(rand(1,3)) //What is X?
if(1) //X is perform an action
message = "THOSE WHO [ionmust] ARE NON-HUMAN"
if(2) //X is own certain objects
message = "THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE NON-HUMAN"
if(3) //X is eat certain food
message = "THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE NON-HUMAN"
if(35 to 36) //You must protect or harm X
switch(rand(1,2)) //Protect or harm?
if(1) //Harm
switch(rand(1,7)) //What is X?
if(1) //X is an abstract
message = "YOU MUST HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO ESCAPE HARM"
if(2) //X is a threat
message = "YOU MUST HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO ESCAPE HARM"
if(3) //X is an object
message = "YOU MUST HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO ESCAPE HARM"
if(4) //X is generic adjective things
message = "YOU MUST HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO ESCAPE HARM"
if(5) //X is a species
message = "YOU MUST HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO ESCAPE HARM"
if(6) //X is a job
message = "YOU MUST HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO ESCAPE HARM"
if(7) //X is two jobs
message = "YOU MUST HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO ESCAPE HARM"
if(2) //Protect
switch(rand(1,7)) //What is X?
if(1) //X is an abstract
message = "YOU MUST NOT HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO COME TO HARM"
if(2) //X is a threat
message = "YOU MUST NOT HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO COME TO HARM"
if(3) //X is an object
message = "YOU MUST NOT HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO COME TO HARM"
if(4) //X is generic adjective things
message = "YOU MUST NOT HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO COME TO HARM"
if(5) //X is a species
message = "YOU MUST NOT HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO COME TO HARM"
if(6) //X is a job
message = "YOU MUST NOT HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO COME TO HARM"
if(7) //X is two jobs
message = "YOU MUST NOT HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO COME TO HARM"
if(37 to 39) //The X is currently Y
switch(rand(1,4)) //What is X?
if(1) //X is a job
switch(rand(1,4)) //What is X Ying?
if(1) //X is Ying a job
message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying a threat
message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]"
if(3) //X is Ying an abstract
message = "THE [ioncrew1] ARE [ionverb] [ionabstract]"
if(4) //X is Ying an object
message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]"
if(2) //X is a threat
switch(rand(1,3)) //What is X Ying?
if(1) //X is Ying a job
message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying an abstract
message = "THE [ionthreats] ARE [ionverb] [ionabstract]"
if(3) //X is Ying an object
message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]"
if(3) //X is an object
switch(rand(1,3)) //What is X Ying?
if(1) //X is Ying a job
message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying a threat
message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]"
if(3) //X is Ying an abstract
message = "THE [ionobjects] ARE [ionverb] [ionabstract]"
if(4) //X is an abstract
switch(rand(1,3)) //What is X Ying?
if(1) //X is Ying a job
message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying a threat
message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionthreats]"
if(3) //X is Ying an abstract
message = "THE [ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionobjects]"
if(40 to 41)// the X is now named Y
switch(rand(1,5)) //What is being renamed?
if(1)//Areas
switch(rand(1,4))//What is the area being renamed to?
if(1)
message = "[ionarea] IS NOW NAMED [ioncrew1]."
if(2)
message = "[ionarea] IS NOW NAMED [ionspecies]."
if(3)
message = "[ionarea] IS NOW NAMED [ionobjects]."
if(4)
message = "[ionarea] IS NOW NAMED [ionthreats]."
if(2)//Crew
switch(rand(1,5))//What is the crew being renamed to?
if(1)
message = "ALL [ioncrew1] ARE NOW NAMED [ionarea]."
if(2)
message = "ALL [ioncrew1] ARE NOW NAMED [ioncrew2]."
if(3)
message = "ALL [ioncrew1] ARE NOW NAMED [ionspecies]."
if(4)
message = "ALL [ioncrew1] ARE NOW NAMED [ionobjects]."
if(5)
message = "ALL [ioncrew1] ARE NOW NAMED [ionthreats]."
if(3)//Races
switch(rand(1,4))//What is the race being renamed to?
if(1)
message = "ALL [ionspecies] ARE NOW NAMED [ionarea]."
if(2)
message = "ALL [ionspecies] ARE NOW NAMED [ioncrew1]."
if(3)
message = "ALL [ionspecies] ARE NOW NAMED [ionobjects]."
if(4)
message = "ALL [ionspecies] ARE NOW NAMED [ionthreats]."
if(4)//Objects
switch(rand(1,4))//What is the object being renamed to?
if(1)
message = "ALL [ionobjects] ARE NOW NAMED [ionarea]."
if(2)
message = "ALL [ionobjects] ARE NOW NAMED [ioncrew1]."
if(3)
message = "ALL [ionobjects] ARE NOW NAMED [ionspecies]."
if(4)
message = "ALL [ionobjects] ARE NOW NAMED [ionthreats]."
if(5)//Threats
switch(rand(1,4))//What is the object being renamed to?
if(1)
message = "ALL [ionthreats] ARE NOW NAMED [ionarea]."
if(2)
message = "ALL [ionthreats] ARE NOW NAMED [ioncrew1]."
if(3)
message = "ALL [ionthreats] ARE NOW NAMED [ionspecies]."
if(4)
message = "ALL [ionthreats] ARE NOW NAMED [ionobjects]."
return message*/ //yogs end - mirrored in another file
#undef ION_RANDOM
#undef ION_ANNOUNCE