-
Notifications
You must be signed in to change notification settings - Fork 7
/
hunger.ds
5212 lines (4908 loc) · 179 KB
/
hunger.ds
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
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
DS
// The Hunger Games Simulation - A script file for Daedalus 3.5
// By Walter D. Pullen, [email protected], http://www.astrolog.org/labyrnth.htm
// Inspired by "The Hunger Games" series, as seen in the novels by Suzanne Collins and the movies by Lionsgate Films
// Documentation for this script: http://www.astrolog.org/labyrnth/daedalus/hunger.htm
// Variable usage:
// a: Game activity status (0=active, 1=player dead, 2=winner determined, 3=player won)
// b: Mode to wait until something happens (0-1)
// c: Temporary coordinate
// d: Text display count (0+)
// e: Text emphasis flag (0=black, 1=gray, 2=yellow, 3=red, 4+ prefix, 8+ postfix)
// f: Food of current tribute (0-500)
// g: Wielded weapon or worn item index (0-9, or -1 for none)
// h: Hit points of target tribute (0-13 normally)
// i-j: Generic indexes
// k-l: Effective objects
// m-n: X and Y coordinates of tribute
// o: Current object
// p: Turns passed (0=opening gong)
// q: User tribute index (-1-25 normally)
// r: Current tribute (-1-25 normally)
// s: Tributes left in game (0-24 normally, not counting mutts)
// t: Target tribute
// u: Selected action
// v: Input parameter
// w: Temporary variable
// x-y: X and Y coordinates
// z: Event return value
// Custom variables (settings):
// 27 [SA]: Atmosphere of arena (0-6, 7=random pair, 8=random solid, 9=random)
// 28 [SB]: Background sky of arena (0-3, 4=random non-night)
// 29 [SC]: Cornucopia space size (0-3)
// 30 [SD]: District total count (1-13)
// 31 [SE]: Edge of arena (0-4, 5=random edge, 6=random)
// 32 [SF]: Forest presence (0-3)
// 33 [SG]: Glass blocks (0=solid, 1,2,4,8=transparent, 16,32,64,128=random)
// 34 [SH]: Hilliness of arena (0-7, 8=bowl, 9=stadium, 10=random)
// 35 [SI]: Items in cornucopia (0-5)
// 36 [SJ]: Initial object in inventory (0=none, 30=random)
// 37 [SK]: Initial countdown (0+)
// 38 [SL]: Lake presence (0-6)
// 39 [SM]: Mountain presence (0-5)
// 40 [SN]: Noise listen radius (0+)
// 41 [SO]: Order of launch tubes (0-5, 6=random)
// 42 [SP]: Plains presence (0-4)
// 43 [SQ]: Quell of arena (0-3, 4=random shape, 5=random)
// 44 [SR]: Random seed of arena (0=random)
// 45 [SS]: Size radius of arena (10-2048, 0=random)
// 46 [ST]: Tree density (0-100, 101-200=random, 1000+=2nd atmosphere)
// 47 [SU]: Launch tube radius (0+)
// 48 [SV]: River presence (0-3)
// 49 [SW]: Wasp Tracker Jacker percentage (0-100)
// 50 [SX]: Feast item given (0=none, 33=random)
// 51 [SY]: Your tributes per District (1-255)
// 52 [SZ]: Maze presence (0-3, 4=random width, 5+=city)
// Custom variables (more settings):
// 53 [Sa]: Object availability in Cornucopia
// 54 [Sb]: Object availability nearby Cornucopia
// 55 [Sc]: Object availability out in wild
// 56 [Sd]: Object availability as sponsor gift
// 57 [Se]: Object availability at random Feast
// 58 [Sf]: Max food (0=random)
// 59 [Sg]: Feast turn frequency
// 60 [Sh]: Max hitpoints (0=random)
// 61 [Si]: Inventory size (0=random)
// 62 [Sj]: Hill frequency (0-11, 12=random)
// 63 [Sk]: Probability of stepping off platform early
// 64 [Sl]: Sponsor/Feast final turn (0=never)
// 65 [Sm]: Number of mutts (256+=per district)
// 66 [Sn]: Number of mutts to remain withheld (256+=all)
// 67 [So]: Turn to release remaining mutts
// 68 [Sp]: Feast turn preparation time (0=none)
// 69 [Sq]: Difficulty mode (0=everything, 1=no cheat commands, 2=no tribute messages, 3=no status line)
// 70 [Sr]: Ranged weapon distance
// 71 [Ss]: Tribute name and style (0=unchanged, 1=empty, 2=50th, 3=74th, 4=75th, 5=10th, 6=random names)
// 72 [St]: Percentage of set Net traps on ground
// 73 [Su]: Day period length
// 74 [Sv]: Daylight extra length
// 75 [Sw]: Percentage of tracker jacker wasp nests on ground
// 76 [Sx]: Number of feast items given (0=random)
// 77 [Sy]: Chosen tribute for next game (DDYYY)
// 78 [Sz]: Finale beginning turn (0=never)
// Custom variables (still more settings):
// 79 [!, SCont]: Whether continue game even after victor determined (0=no, 1=yes)
// 80 [@, SPeace]: Whether tributes can maintain no enemies (0=no, 1=yes)
// 81 [#, SHover]: Whether invisible hovercraft remove corpses so no item drops (0=no, 1=yes)
// 82 [$, SCorn]: Whether things lit up at night (0=nothing, 1=cornucopia, 2=launch tubes, 4,8=random)
// 83 [%, SAlly]: Percentage of computer offering alliance (0-100)
// 84 [^, STrap]: Percentage of computer not noticing trap (0-100)
// 85 [&, SMist]: Mist distance (0=none)
// 86 [*, SDeep]: Distance before deep water (256+=never)
// 87 [(, SMuttH]: Mutt health (0=same as tributes)
// 88 [), SMuttT]: Height of Mutts in inches
// 89 [-, SMuttR]: Whether dead tributes rise as Mutts if possible (0=no, 1=yes)
// 90 [_, SMuttD]: Release mutts equal to number of dead tributes (0=no, 1=yes)
// 91 [=, SMuttS]: Mutts can swim (0=no, 1=yes)
// 92 [+, SMuttC]: Mutts can climb (0=no, 1=yes)
// Custom variables (colors):
// 100+14 [KDist]: Colors of the 13 Districts + mutts (constant)
// 114+4 [KMsg]: Text colors (constant)
// 118 [KTube]: Launch tube color (constant)
// 119 [KCorn]: Cornucopia color (constant)
// 120 [KMaze]: Maze color (constant)
// 101 [KMist]: Mist color (constant)
// 102+6 [KSky]: Day/night transition colors for sky (constant)
// 128+6 [KGrd]: Day/night transition colors for ground (constant)
// 134+6 [KMtn]: Day/night transition colors for mountains (constant)
// 140+6 [KCld]: Day/night transition colors for clouds (constant)
// 146+6 [KFog]: Day/night transition distance and colors for fog (constant)
// Custom variables (internal)
// 152 [Dists]: Max number of Districts possible (constant)
// 153 [Dist]: Number of Districts playing (SD)
// 154 [Per]: Number of tributes per District (SY)
// 155 [Trib]: Number of tributes total (1-255)
// 156 [Live]: Number of tributes + mutts total (1-255)
// 157 [Tmp]: Landscape temperature (SA)
// 158 [Sky]: Day/night setting (SB, -1-1)
// 159 [Edge]: Forcefield setting (SE)
// 160 [Hill]: Arena hilliness (SH)
// 161 [Ord]: Order of launch tubes (SO)
// 162 [Quel]: Quell arena (SQ)
// 163 [Rad]: Arena radius (SR)
// 164 [Tube]: Launch tube radius (SU)
// 165 [Food]: Max food (Sf)
// 166 [HpMax]: Max hitpoints (Sh)
// 167 [Inv]: Inventory size (Si)
// 168 [Day]: Day period length (Su)
// 169 [Corn]: Whether things lit up at night (SCorn)
// 170 [Land]: Specific arena type (SLand)
// 171 [SLand]: Arena type (-1=unchanged, 0+=specific)
// 172 [SAmmo]: Animate ammunition (0=yes, 1=no, 2=interrupted)
// 173 [SMove]: Animate movement steps (0=none)
// 174 [SAid]: Hitpoints healed via First-Aid Kit
// 175 [SBerry]: Food gained via Berries
// 176 [SBread]: Food gained via Bread
// 177 [SFish]: Food gained via Fish
// 178 [SStarv]: Food regained when starving (1+)
// 179 [SAllow]: Whether you accept alliance proposals (-1=reject, 0=prompt, 1=accept)
// 180 [SLead]: Whether you ask to be leader (-1=no, 0=toggle, 1=yes)
// 181 [Item]: Audience item (0=random)
// 182 [File]: Log file handle (0=Null)
// 183 [Custom]: Custom arena bitmap file handle (0=Null)
// 184 [Auto]: Animation setting copy (0-1)
// 185 [Wipe]: Was everybody killed at once?
// 186 [Line]: Index into line buffer (0-9)
// 187 [Txture]: Whether detailed texture bitmaps exist (0=no, 1=yes)
// 188+5 [JDcc JDnc JDow JDsg JDfe]: Default object availabilities
// Custom variables (tables)
// 200+50 [JDmg]: Weapon damage of the 33 objects (constant)
// 250+50 [JUse]: Weapon usages of the 33 objects (constant)
// 300+50 [JDst]: District favored weapon of the 33 objects (constant)
// 350+50 [JMat]: Material of the 33 objects (constant)
// 400+50 [JCol]: Colors of the 33 objects (constant)
// 450+50 [JAcc]: Availability of the 33 objects in Cornucopia (constant)
// 500+50 [JAnc]: Availability of the 33 objects nearby Cornucopia (constant)
// 550+50 [JAow]: Availability of the 33 objects out in wild (constant)
// 600+50 [JAsg]: Availability of the 33 objects as sponsor gift (constant)
// 650+50 [JAfe]: Availability of the 33 objects at random Feast (constant)
// 900+300 [PXY]: X and Y positions of the 24 tributes + 2 mutts
// 1200+300 [PZ]: Elevation of the 24 tributes + 2 mutts
// 1500+300 [PHP]: Hit points of the 24 tributes + 2 mutts
// 1800+300 [PFood]: Food of the 24 tributes + 2 mutts
// 2100+300 [PKill]: Kills of the 24 tributes + 2 mutts
// 2400+300 [PWield]: Wielded weapon inventory index of the 24 tributes + 2 mutts
// 2700+300 [PWear]: Worn item inventory index of the 24 tributes + 2 mutts
// 3000+300 [PNet]: Netting of the 24 tributes + 2 mutts
// 3300+300 [PDest]: X and Y destination of the 24 tributes + 2 mutts
// 3600+300 [PWasp]: Wasp poison of the 24 tributes + 2 mutts
// 3900+300 [PLead]: Leadership score of the 24 tributes + 2 mutts
// 4200+300 [PBody]: Body of the 24 tributes + 2 mutts
// 4500+300 [PDead]: Fallen movie position of the 24 tributes
// 4800+300 [PTall]: Height of the 24 tributes in inches
// 5100+1200 [Log]: Death log (tributes left, turn, victim, killed by)
// Bitmap usage:
// -1: Mono = Where objects are, Color = Color of objects
// -2: Mono = Scratch, Color = Color of ground marking
// -3: Mono = Where semitransparency is, Color = Tributes and items
// 0 [TWall]: Color = Block side textures
// 1 [TVar]: Mono = Where variable height walls are, Color = Actual height of walls
// 2 [TElev]: Color = Ground elevation
// 3 [TFloor]: Color = Ground surface textures
// 4 [TBlock]: Color = Block top/bottom textures
// 5 [TSide]: Color = Ground side textures
// 6 [TLit]: Mono = Where cells lit
// 7 [BInv]: Color = Inventory grid (x=tribute, y=slot)
// 8 [BAlly]: Color = Alliance grid (x=tribute, y=hatred) 0=self, 1-50=partner, 51-100=ally, 101-150=neutral, 151-200=enemy, 201-255=fighting
// 9 [BWater]: Mono = Where water is
// 10 [MWasp]: Color = Tracker Jacker nest texture (constant)
// 11 [MTrap]: Color = Net trap texture (constant)
// 12 [MFire]: Mono = Firewall side mask (constant)
// 13 [MFire2]: Mono = Firewall top mask (constant)
// 14 [MTree]: Mono = Tree trunk mask (constant)
// 15 [MTree2]: Mono = Tree top mask (constant)
// 16 [MCact]: Mono = Cactus trunk mask (constant)
// 17 [MCact2]: Mono = Cactus top mask (constant)
// 18 [MRock]: Mono = Mountain wall mask (constant)
// 19 [MRock2]: Mono = Mountain top mask (constant)
// 20 [MBrick]: Mono = Brick wall mask (constant)
// 21 [MBrick2]: Mono = Brick wall top mask (constant)
// 22 [MTube]: Mono = Platform wall masks (constant)
// 23 [MTube2]: Mono = Platform top mask (constant)
// 24 [MTube3]: Mono = Platform open top mask (constant)
// 25+4 [MFoot]: Mono = Footprint masks (constant)
// 29+4 [MFoot2]: Mono = Possible footprint masks (constant)
// 33+4 [MFoot3]: Mono = Possible footprint masks (constant)
// 37+4 [MPaw]: Mono = Pawprint masks (constant)
// 41+4 [MPaw2]: Mono = Possible pawprint masks (constant)
// 45+4 [MPaw3]: Mono = Possible pawprint masks (constant)
// 49 [MNet]: Mono = Tribute net mask part (constant)
// 50 [BNet]: Mono = User net mask part (constant)
// 51+25 [BNum]: Mono = Number mask parts of the 25 numbers (constant)
// 76+21 [BBody]: Mono = Body mask parts of the mutt + 2 genders (constant)
// 97+3 [BCopy]: Mono = Temp copy of arena for map, Color = Temp copy of arena for map
// 100 [BDirt]: Mono = Arena cornucopia circle area
// 101 [BTrans]: Mono = Arena object transparency
// 102 [BBlock]: Mono = Arena blocks
// 103 [BFloor]: Color = Arena floor colors
// 104 [BDist]: Color = District arena
// 105 [BInit]: Color = Custom arena (constant)
// 106+15 [MPic]: Color = Loaded picture textures of environment (constant)
// 200+50 [BObj]: Mono = Object masks of the 33 objects (constant)
// 250+50 [BObj2]: Mono = Small object masks of the 33 objects (constant)
// 300+50 [MObj]: Color = Object textures of the 33 objects (constant)
// 350+50 [MObj2]: Color = Loaded picture textures of the 33 objects (constant)
// 400+300 [MTrib]: Mono = Tribute masks of the 24 tributes + 2 mutts
// Custom variable prefixes:
// A: Macro (audience command)
// B: Bitmap (general)
// F: Macro (function for user command)
// I: Macro (initialize arena)
// J: Object index
// K: Color
// M: Bitmap (texture that gets displayed)
// O: Macro (object selection)
// P: Person i.e. tribute array
// S: Setting
// T: Bitmap (texture indexes)
// V: Macro (event)
// Z: String
// Custom texture bitmaps:
// _tree.bmp, _tree2.bmp: Tree side and top
// _cactus.bmp, _cactus2.bmp: Cactus side and top
// _rock.bmp, _rock2.bmp: Mountain side and top
// _brick.bmp, _brick2.bmp: Brick wall side and top
// _tube.bmp, _tube2.bmp, _tube3.bmp: Launch platform side, top (closed), and top (open)
// _wasp.bmp: Wasp nest
// _trap.bmp: Net trap
// Custom item bitmaps:
// Arrow.bmp Axe.bmp Berries.bmp Blowgun.bmp
// Blowtorch.bmp Body Armor.bmp Bow.bmp Bread.bmp
// Brick.bmp Bullet.bmp Club.bmp Dart.bmp
// First-Aid Kit.bmp Fish.bmp Grenade.bmp Gun.bmp
// Helmet.bmp Knife.bmp Landmine (Active).bmp Landmine.bmp
// Mace.bmp Mutt Teeth.bmp Net.bmp Nightlock Berries.bmp
// Nightvision Goggles.bmp Parachute.bmp Pick.bmp Rock.bmp
// Slingshot.bmp Spear.bmp Sword.bmp Trident.bmp
// Custom sounds:
// announce.wav - Feast announcement
// anthem.wav - Fallen movie starts
// cannon.wav - Tribute dies
// chimes.wav - Player receives sponsor gift parachute
// choke.wav - Player can't swim, or tribute eats Nightlock
// die_fem.wav - Female player dies
// die_male.wav - Male player dies
// die_mutt.wav - Mutt dies
// firewall.wav - Firewall starts, or player killed in firewall
// gong.wav - Opening gong
// hit_fem.wav - Female player takes damage
// hit_male.wav - Male player takes damage
// hit_mutt.wav - Mutt player takes damage
// landmine.wav - Landmine detonates
// mutts.wav - Extra mutts released into arena
// victor.wav - Trumpets when victor determined
// wasps.wav - Wasp nest falls to ground, or player stung
// was_bad.wav - Player entrapped in Net or breaks alliance
// was_good.wav - Player given item or enters alliance
// water.wav - Player moves or falls into water
// zap.wav - Player takes damage from forcefield
// ///////////////////// //
// Script initialization //
// ///////////////////// //
If Lt Version 3300 {Message 'This script requires Daedalus 3.3 or later to run.' Halt}
Spc fRedrawWhenBitmapEdited False ResetProgram WindowTitle "- The Hunger Games" True nHorizontalScroll 8 nVerticalScroll 8 fHideMenu True fHideScrollbars True
SetString 0 "1 FHelp FStart FPause FInv FGet FDrop FUse FThrow FChat FGive FRot FPick FHelp2 FArena FWait FAuto FDig FSort FFire FSky FDeath FTable FMap FChange FMove FAsk FAlly FBehave FName FDist FRnd FSet FPrev FFeel FSound FPict FUp FDown FLookU FLookD FSpc FLeft FRight FUp2 FDown2 FLookU2 FLookD2 FMap2 FMap3 FHome FExit FExit2 AInv AGet ADrop AUse AThrow AChat AGive ADig ASort AFire AAsk AAlly VEdge VWall VMove VMoved VInside VScreen VMouse " // Macros 1
AppendString 0 "Msg Name GetXY SetXY Wrap SqIn SqOut FndSq PutObj DelObj GetObj Drop DelInv View Draw Wield Wear Ouch UpdHp Hit UHit THit NetOn Net NetHlp SavBmp Hunger Sponsor Sponsor2 Feast Fire Mutt Movie Movie2 Anger Enemy Ally Seek Boom Mine Wasp Trap Burn Dig Hole Wall Tree Incin Fall Falls Sting Anim Sink Rise Unrise Map List Table Parse Set Reset Namer Next MsgEnd Moves Move Death Done Escape LogOn LogOff Log1K Hard Use Throw Boing Ammo Prop Break Lead AddInv LstInv SelInv ODrop OUse OThrow OGive Give " // Macros 2
AppendString 0 "UseWear Use1 Use2 Use3 Use4 Use5 Use6 Use7 Use8 Use9 Use10 Use11 Act1 Act2 Act3 Act4 Act5 Act6 Act7 Act8 Act9 Act10 Act11 Act12 Act13 Day0 Day1 Day2 Day3 Day4 Day5 Day6 IArena IElev ITemp IGrass ITrees IMtn IRidge IMaze IWater IElev2 IRiver IQuell IHalf IBlob IEdge ITrans ICorn ICorn2 ITrap IObj IObj2 ITable IVar ITube IOrd ISeek ITrib IMutt ISky IText ICust ITall " // Macros 3
AppendString 0 "0 TWall TVar TElev TFloor TBlock TSide TLit BInv BAlly BWater MWasp MTrap MFire MFire2 MTree MTree2 MCact MCact2 MRock MRock2 MBrick MBrick2 MTube MTube2 MTube3 MFoot +4 MFoot2 +4 MFoot3 +4 MPaw +4 MPaw2 +4 MPaw3 +4 MNet BNet BNum +25 BBody +21 BCopy +3 BDirt BTrans BBlock BFloor BDist BInit MPic 200 BObj +50 BObj2 +50 MObj +50 MObj2 +50 MTrib +300 " // Bitmaps
AppendString 0 "27 SA SB SC SD SE SF SG SH SI SJ SK SL SM SN SO SP SQ SR SS ST SU SV SW SX SY SZ Sa Sb Sc Sd Se Sf Sg Sh Si Sj Sk Sl Sm Sn So Sp Sq Sr Ss St Su Sv Sw Sx Sy Sz SCont SPeace SHover SCorn SAlly STrap SMist SDeep SMuttH SMuttT SMuttR SMuttD SMuttS SMuttC 100 KDist +14 KMsg +4 KTube KCorn KMaze KMist KSky +6 KGrd +6 KMtn +6 KCld +6 KFog +6 Dists Dist Per Trib Live Tmp Sky Edge Hill Ord Quel Rad Tube Food HpMax Inv Day Corn Land SLand SAmmo SMove SAid SBerry SBread SFish SStarv SAllow SLead Item File Custom Auto Wipe Line Txture JDcc JDnc JDow JDsg JDfe 200 JDmg +50 JUse +50 JDst +50 JMat +50 JCol +50 JAcc +50 JAnc +50 JAow +50 JAsg +50 JAfe 900 PXY +300 PZ +300 PHP +300 PFood +300 PKill +300 PWield +300 PWear +300 PNet +300 PDest +300 PWasp +300 PLead +300 PBody +300 PDead +300 PTall +300 Log " // Variables
AppendString 0 "3 ZX ZY ZSex +2 ZDist +14 ZNum +26 ZHair +20 ZCorn +2 ZVerb +7 ZDeath +13 ZMName +15 ZSet ZSet2 ZArena ZArenas +20 ZTree +2 ZThe +4 ZAlly ZNameA +3 ZBody +2 ZTall ZNameB +162 ZName +255 ZText ZLine +12 ZHelp1 ZHelp2 ZHelp3 ZHelp4 ZHelp5 ZChat11 +5 ZChat12 +5 ZChat13 +5 ZChat21 +5 ZChat22 +5 ZChat23 +5 ZChat31 +5 ZChat32 +5 ZChat33 +5 ZChatM +5 ZGive +9 ZGiveM +9 ZAsk +10 ZObj +50 ZObjA +50 ZHit +50 ZHits +50 ZIcoJ +50 ZItem ZMsg " // Strings
AppendString 0 "0 JFst JRck JDrt JArr JBul JGre JNet JClb JBlt JBrk JPck JMut JKnf JMce JSpr JAxe JSwd JTri JSlg JBlw JBow JGun JBry JNlk JBrd JFsh JAid JGog JHel JArm JPar JLm0 JLm1 JMax 17 JDif" // Objects
DefineConst $0 If @z {Message 'Initialization failed!' Halt}
// ///////////// //
// Main commands //
// ///////////// //
EmbedMacro %FHelp "Help Text"
If fDontAutostartInfinite {@z True Return}
IfElse Gte @q 0
{@v Add @q 300 *Name @z Div @q @Per If Gte @z @Dist (@z @Dists)}
{$0 'Audience' @z @Dists}
@z Add %ZDist @z MessageAsk $ZHelp1 1 If Neq @z 1 {@z True Return}
@x @Trib @y @Dist MessageAsk $ZHelp2 1 If Neq @z 1 {@z True Return}
Message $ZHelp3
@z True
EmbedMacro %FStart "Restart Game"
DoWait {
fRedrawWhenBitmapEdited False
IfElse @SR (nRandomSeed @SR) (nRandomSeed Rnd 0 Dec << 1 30)
*LogOn ResetInside *Set
@Rad ?: @SS Min Max @SS 10 2048 Rnd 25 125
@Tmp ?: Lt @SA 7 @SA ?: Equ @SA 7 Inc Mul Rnd 0 2 2 ?: Equ @SA 8 Mul Rnd 0 3 2 Rnd 0 6
@Sky ?: Lt @SB 2 @SB ?: Lt @SB 4 -1 Rnd 0 1
@Dist Min Max @SD 1 13
@Edge ?: Lt @SE 5 @SE Rnd 0 Add 3 Gt @SE 5
@Hill ?: Lt @SH 10 @SH Rnd 0 7
@Ord ?: Lt @SO 6 @SO Rnd 0 5
@Quel ?: Lt @SQ 4 @SQ Rnd 0 Add 1 Gt @SQ 4
@Tube Min Max @SU 0 @Rad @Per Min Max @SY 1 Div 255 @Dist
@Trib Mul @Dist @Per
@Food ?: @Sf @Sf Mul Rnd 1 10 100
@HpMax ?: @Sh @Sh Rnd 1 20
@Inv ?: @Si Min @Si 26 Rnd 3 20
@Day Max @Su 2
@Live Min Add @Trib ?: Gt @Sm 255 @Per @Sm 255
@Corn Or ?: And @SCorn 4 Rnd 0 1 And @SCorn 1 ?: And @SCorn 8 << Rnd 0 1 1 And @SCorn 2
@Wipe False
@Line 0 SetStrings %ZLine 12 ','
*IArena
k @z 0
IfElse Gte @Sky 0 '*Day1' '*Day4'
cg *Rise n
}
*FHelp
fPauseTimer False ct
*Moves
@z True
EmbedMacro %FPause "User Wait"
If And @a 2 {
SwitchSgn ?: Lt @q 0 -1 Neq @a 2
($0 'hopefully enjoyed them. ;-)')
($0 'are the victor! :-)')
($0 'were killed along the way. :-(')
Message 'The Hunger Games have finished.\nYou $0'
@z True Return
}
@d 0 @v True *Next
@z True
EmbedMacro %FInv "Inventory"
@z True
If Lt @q 0 {*AInv Return}
If And @a 1 {Message 'Dead tributes have no inventory.' Return}
@d 0 $0 'You are carrying:' *Msg
@t @q *LstInv
@z True
EmbedMacro %FGet "Get Object"
@z True
If Lt @q 0 {*AGet Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes can't pick up items.') (Message 'Victors have no need to pick up items.')
Return
}
If Gt Sub Var Add %PZ @q GetM nX nY 32 {Message 'You're too high to reach the ground.' Return}
@o RgbG GetCE nX nY
If Not @o {Message 'There is nothing here.' Return}
@w GetCA %BInv @q Var Add %PWield @q
If And And And And And Equ And 127 @o %JFsh GetA %BWater nX nY Neq Inc Div @q @Per 4 Neq @w %JNet Neq @w %JSpr Neq @w %JTri
{Message 'Fish are too hard to catch unless you're wielding a Net, Spear, or Trident.' Return}
*GetObj If @z {@v False *Next}
@z True
EmbedMacro %FDrop "Drop Item"
@z True
If Lt @q 0 {*ADrop Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes have nothing to drop.') (Message 'Victors have no need to drop items.')
Return
}
@d 0 $0 'What do you want to drop?' *Msg
@t @q *LstInv
@Auto fAutorepeatLastCommand fAutorepeatLastCommand False nOnRunCommand %ODrop
@z True
EmbedMacro %FUse "Use Item"
@z True
If Lt @q 0 {*AUse Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes have nothing to use.') (Message 'Victors have no need to use items.')
Return
}
@d 0 $0 'What do you want to use?' *Msg
@t @q *LstInv
@Auto fAutorepeatLastCommand fAutorepeatLastCommand False nOnRunCommand %OUse
@z True
EmbedMacro %FThrow "Throw Item"
@z True
If Lt @q 0 {*AThrow Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes have nothing to throw.') (Message 'Victors have no need to throw items.')
Return
}
If Var Add %PNet @q {Message 'You can't throw while entangled in a net.' Return}
@d 0 $0 'What do you want to throw?' *Msg
@t @q *LstInv
@Auto fAutorepeatLastCommand fAutorepeatLastCommand False nOnRunCommand %OThrow
@z True
EmbedMacro %FChat "Chat"
@z True
If Lt @q 0 {*AChat Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes can't talk.') (Message 'Victors have no need to chat.')
Return
}
@x nX @y nY
@z Div Mod Add 382 Add Mul nDir 90 nDirectionOffset 360 45
@u Sub Char $ZX @z 49 @v Sub Char $ZY @z 49
For (i) 1 50 {
@x Add @x @u @y Add @y @v *Wrap
@t RgbR GetCE @x @y
If @t (Break)
If Get @x @y (@i 50)
}
If Gt @i 50 {Message 'There is nobody to talk with in that direction.' Return}
If Gt @i @Sr {Message 'That tribute is too far away to talk with.' Return}
@t Sub 255 @t
@v Add @t 300 *Name
@w Add %ZObjA GetCA %BInv @t Var Add %PWield @t
SetString 1 '\n\nYou notice $0 is wielding a$w.'
@w Var Add %PWear @t
If Gte @w 0 {@w Add %ZObjA GetCA %BInv @t @w SetString 1 '$1 You notice $0 is wearing a$w.'}
@v Add @t 600 *Name
@w Min Div Add GetCA %BAlly @t @q 49 50 4
If Gte @w 3 {fRedrawWhenBitmapEdited False SetCA %BAlly @q @t Max GetCA %BAlly @q @t 101 fRedrawWhenBitmapEdited True}
IfElse Lt @t @Trib {
@i Char $ZAlly Div @t @Per
@i Add Gte @i 48 Gte @i 97
@j Div Mul
Mul Var Add %PHP @q Var Add %JDmg GetCA %BInv @q Var Add %PWield @q
100
Mul Var Add %PHP @t Var Add %JDmg GetCA %BInv @t Var Add %PWield @t
@j Add Gt @j 50 Gte @j 200
@w Add Add Add %ZChat11 Mul @i 15 Mul @j 5 @w
SetString 0 ($0 says: '$w'$1)
} {
@w Add %ZChatM @w
SetString 0 '$0 $w$1'
}
Message $0
EmbedMacro %FGive "Give Item"
@z True
If Lt @q 0 {*AGive Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes can't give anything.') (Message 'Victors have no need to give anything.')
Return
}
@w Div Mod Add 382 Add Mul nDir 90 nDirectionOffset 360 45
@x Add nX Sub Char $ZX @w 49 @y Add nY Sub Char $ZY @w 49 *Wrap
@w RgbR GetCE @x @y
If Not @w {Message 'There is nobody to give anything to in that space.' Return}
If Gt Abs Sub Var Add %PZ @q Var Add %PZ Sub 255 @w 64 {Message 'You can't reach that tribute to give them something.' Return}
@d 0 $0 'What do you want to give?' *Msg
@t @q *LstInv @t @w
@Auto fAutorepeatLastCommand fAutorepeatLastCommand False nOnRunCommand %OGive
@z True
EmbedMacro %FRot "Set Rotation"
@x nRotationVelocity @y @SMove @w nClippingPlane
SetString 0 '@x' SetString 1 '@y' SetString 2 '@w'
GetString3
'Enter rotation step rate in degrees (1, 3, 5, 15, or 45):'
'Enter animation frames per step (0-14):'
'Enter visual clipping distance in squares (50-10000):' 0
If @z {Return}
@z True
@x Num $0 If And And And And Neq @x 1 Neq @x 3 Neq @x 5 Neq @x 15 Neq @x 45 {Message 'Bad rotation step rate!\nNumber must be 1, 3, 5, 15, or 45.' Return}
@y Num $1 If Or Lt @y 0 Gt @y 14 {Message 'Bad animation frames!\nNumber must be between 0-14.' Return}
@w Num $2 If Or Lt @w 50 Gt @w 10000 {Message 'Bad clipping distance!\nNumber must be between 50-10000.' Return}
nRotationVelocity @x @SMove @y nClippingPlane @w
If Neq Mod nDirectionOffset 45 0 'nDirectionOffset 0'
EmbedMacro %FPick "Choose Tribute"
@x Div @Sy 1000 @y Mod @Sy 1000
SetString 0 '@x' SetString 1 '@y'
GetString2 'Enter District to play next game (1-15, or 0 for random):' 'Enter gender to play (1=Girl, 2=Boy, or 0 for random):' 0
If @z {Return}
@z True
@x Num $0 If Or Lt @x 0 Gt @x 15 {Message 'Bad district!\nNumber must be between 0-15.' Return}
@y Num $1 If Or Lt @y 0 Gt @y @Per {@z @Per Message 'Bad gender!\nNumber must be between 0-@z.' Return}
@Sy Add Mul @x 1000 @y
// ///////////////// //
// Advanced commands //
// ///////////////// //
EmbedMacro %FHelp2 "Advanced Help"
MessageAsk $ZHelp4 1
If Neq @z 1 {@z True Return}
Message $ZHelp5
@z True
EmbedMacro %FArena "Set Size"
@x Mul @SS 2 SetString 0 '@x'
$1 '_' SetChar 1 0 ?: Gte @SLand 0 Char $ZArena @SLand 0
GetString2 'Enter arena size to restart with (20-4096, 0=Random):' 'Enter arena type (FMDPSZQCI 2739XUB4, 0=Random):' 0
If @z {Return}
@z True
@x Num $0 If And Or Lt @x 20 Gt @x 4096 Neq @x 0 {Message 'Bad arena size!\nNumber must be 0 or between 20-4096.' Return}
@z Len $1 If Gt @z 1 {Message 'Bad arena type!\nString must be 0-1 characters long.' Return}
@y ?: @z InChar $ZArena Char $1 0 -1
If And Lt @y 0 Equ Len $1 1 {@w %ZArena Message 'Bad arena type!\nString must be blank or one of the characters: $w' Return}
@SS Div @x 2 @SLand @y
*FStart
@z True
EmbedMacro %FWait "Wait Until"
@b Gt @s 1
If And @b Not nInside {i}
*FPause
@z True
EmbedMacro %FAuto "Wait Continuous"
If And @a 2 {*FPause Return}
IfElse fAutorepeatLastCommand {N} {Macro3 N}
@z True
EmbedMacro %FDig "Dig"
@z True
If Lt @q 0 {*ADig Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes can't dig.') (Message 'Victors have no need to dig.')
Return
}
If Gt Var Add %PZ @q GetM nX nY {Message 'You're too high to reach the ground.' Return}
@g GetCA %BInv @q Var Add %PWield @q
@o RgbG GetCE nX nY
@w Var Add %JMat And @o 127
If Equ @g %JNet {fRedrawWhenBitmapEdited False *Trap Return}
If Equ @g %JBlt {*Burn Return}
If And Gt @o 0 Neq @w 1 {Message 'You can't dig here because there's something on the ground not made of stone.' Return}
If GetA %BWater nX nY {Message 'You can't dig in water.' Return}
If Equ GetCA %TSide nX nY UD %MTube %MTube {Message 'Launch platforms are too hard to dig.' Return}
If Neq @g %JPck {Message 'You can't dig without wielding a Pick.' Return}
@d 0
IfElse And Neq Inc Div @q @Per 12 Gt Rnd 1 4 1
{$0 'You attempt to dig up something...'}
{fRedrawWhenBitmapEdited False @x nX @y nY *Dig}
*Msg
@v False *Next
@z True
EmbedMacro %FSort "Sort Inventory"
@z True
If Lt @q 0 {*ASort Return}
fRedrawWhenBitmapEdited False
@g Var Add %PWield @q
@o ?: Gte @g 0 GetCA %BInv @q @g -1
@g Var Add %PWear @q
@k ?: Gte @g 0 GetCA %BInv @q @g -1
For (i) 0 Sub @Inv 2 {
ForStep (j) @i 0 -1 (
@x GetCA %BInv @q @j @y GetCA %BInv @q Inc @j
If Lt @x @y 'SetCA %BInv @q @j @y SetCA %BInv @q Inc @j @x'
)
}
If Gt @o 0 {
ForStep (i) Dec @Inv 0 -1 (
If Equ GetCA %BInv @q @i @o 'SetVar Add %PWield @q @i'
)
}
If Gt @k 0 {
ForStep (i) Dec @Inv 0 -1 (
If Equ GetCA %BInv @q @i @k 'SetVar Add %PWear @q @i'
)
}
fRedrawWhenBitmapEdited True
*FInv
EmbedMacro %FFire "Fire Launcher"
@z True
If Lt @q 0 {*AFire Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes can't launch ammo.') (Message 'Victors have no need to launch ammo.')
Return
}
@z True
@g Var Add %PWield @q
If Lt @g 0 {Message 'You aren't wielding anything.' Return}
@o GetCA %BInv @q @g
If Not And Var Add %JUse @o 8 {Message 'You aren't wielding a launcher.' Return}
If Var Add %PNet @q {Message 'You can't launch while entangled in a net.' Return}
ForStep (i) Dec @Inv 0 -1 {
If Equ GetCA %BInv @q @i Sub @o %JDif 'Break'
}
@z Not And Var Add %JUse @o 16
If And Lt @i 0 @z {Message 'You don't have any ammo for your launcher.' Return}
IfElse @z {@x Add 65 @i} {@i Neg Sub @o %JDif}
*OThrow
@z True
EmbedMacro %FSky "Day and Night"
If *Hard {Return}
If And And Gte @q 0 Neq @SB 1 Not And @a 2 {Message 'Tributes can't change the time of day in this arena.' @z True Return}
fRedrawWhenBitmapEdited False
@Sky ?: @Sky Neg @Sky ?: fStars 1 -1
@z 0
@g Inc Div @q @Per
@g And And And
Neq GetCA %BInv @q Var Add %PWear @q %JGog
Lte @g @Dist
Neq @g 13
Or Gt @q -1 Neq @Item %JGog
IfElse Gte @Sky 0 {*Day1} {*Day4}
fRainbow And And Gte @a 2 Not fStars Not @SMist
fRedrawWhenBitmapEdited True Spc
@z True
EmbedMacro %FDeath "Show Deaths"
If *Hard {Return}
If Not @Log {Message 'No deaths yet.' @z True Break}
@k ?: Lte @Per 2 28 20
ForStep (j) 0 Dec @Log @k {
*List
If Gte Add @j @k @Log (Message $1 Break)
MessageAsk $1 1
If Neq @z 1 'Break'
}
@z True
EmbedMacro %FTable "Show Status"
If *Hard {Return}
@k 30
ForStep (j) 0 Dec @Live @k {
*Table
If Gte Add @j @k @Live (Message $1 Break)
MessageAsk $1 1
If Neq @z 1 'Break'
}
@z True
EmbedMacro %FMap "Show Map"
If *Hard {Return}
fRedrawWhenBitmapEdited False
@v False *SavBmp
k _ - _ TempOr _ - _
CopyTexture %TBlock -1 ColorAnd
Replace %MRock2 GrayN 19 0
Replace %MBrick2 Rgb 39 0 0 0
Replace %MFire2 Dark Blend Orange Brown 0
CopyMask %BWater -1 ColorOr Replace White Rgb 0 21 31 0
_ CopyTexture %BCopy -1
@z kDot kDot @KCorn ColorDotXor kDot @z
ColorPut cDel k _ ColorOr Replace White Dark @KCorn 0
@v -100 *Map
If nInside {i} n
Message 'Arena tribute map...\n\nGold: Cornucopia\nGray, maroon: Mountains, walls\nDark cyan: Water\nOther: Tributes'
@v True *SavBmp
i fRedrawWhenBitmapEdited True n
@z True
EmbedMacro %FChange "Change Tribute"
IfElse Gte @q 0 {
@x ?: Lt @q @Trib Inc Div @q @Per Inc @Dists
@y ?: Lt @q @Trib Inc Mod @q @Per Inc Sub @q @Trib
} {
@x 15 @y 1
} SetString 0 '@x' SetString 1 '@y'
GetString2 'Enter District to change to (0-13, 14=Mutt, 15=Audience):' 'Enter gender to change to (1=Girl, 2=Boy, 0=Random):' 0
If @z {Return}
@x Num $0 If Or Lt @x 0 Gt @x 15 {Message 'Bad district!\nNumber must be between 0-15.' @z True Return}
@y Num $1 If Or Lt @y 0 Gt @y @Per {Message 'Bad gender!\nNumber must be between 0-2.' @z True Return}
fRedrawWhenBitmapEdited False
@w Min
?: Lt @x 15
Add Mul
Dec ?: @x Min @x Inc @Dist Rnd 1 @Dist
@Per
?: @y Dec @y Rnd 0 Dec @Per
-1
Dec @Live
If Gt Var Add %PHP @q 0 {
@v @q *GetXY
Set @x @y True SetE @x @y True
@z Var Add %PZ @v
SetCA %TVar @x @y UD Add Var Add %PTall @q @z Max @z GetM @x @y
}
@v @w *GetXY
Set @x @y False SetE @x @y False
nX @x nY @y
nHorizontalOffset 0 nVerticalOffset 0
@q @w
@a Or And @a 2 Lt Var Add %PHP @q 1
fGlancingBlows Gt @a 0
*ITrib
@d 0
fRedrawWhenBitmapEdited True n
@v True *Next
@z True
// //////////////////////// //
// Advanced commands part 2 //
// //////////////////////// //
EmbedMacro %FMove "Move Only"
@w Div Mod Add 382 Add Mul nDir 90 nDirectionOffset 360 45
@x Add nX Sub Char $ZX @w 49 @y Add nY Sub Char $ZY @w 49 *Wrap
@t RgbR GetCE @x @y
If Or Not @t Gt @a 0 {@z False Return}
@t Sub 255 @t
@v Add @t 300 *Name
If Not Var Add %PNet @t {Message 'You stop to avoid hitting $0.' @z True Return}
fRedrawWhenBitmapEdited False
@d 0 *NetHlp
*Next
@z True
EmbedMacro %FAsk "Ask Tribute"
@z True
If Lt @q 0 {*AAsk Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes can't ask.') (Message 'Victors have no need to ask.')
Return
}
@x nX @y nY
@w Div Mod Add 382 Add Mul nDir 90 nDirectionOffset 360 45
@u Sub Char $ZX @w 49 @v Sub Char $ZY @w 49
For (i) 1 50 {
@x Add @x @u @y Add @y @v *Wrap
@t RgbR GetCE @x @y
If @t (Break)
If Get @x @y (@i 50)
}
If Gt @i 50 {Message 'There is nobody to ask in that direction.' Return}
If Gt @i @Sr {Message 'That tribute is too far away to ask.' Return}
@t Sub 255 @t
@v Add @t 600 *Name
@w Min Div Add GetCA %BAlly @t @q 49 50 4
If Lt @w 3 {SetVar Add %PDest @t UD nX nY}
IfElse Lt @t @Trib {
IfElse And And Lt @w 3 Lt Abs Sub nX @x 2 Lt Abs Sub nY @y 2
(*Lead)
(@w Add Add %ZAsk @w Mul 5 Gt Var Add %PLead @q Var Add %PLead @t)
SetString 0 ($0 says: '$w')
} {
@w Add %ZChatM @w SetString 0 '$0 $w'
}
@d 0 *Msg
*Next
@z True
EmbedMacro %FAlly "Propose Alliance"
@z True
If Lt @q 0 {*AAlly Return}
If @a {
IfElse And @a 1 (Message 'Dead tributes can't ally.') (Message 'Victors have no need to ally.')
Return
}
@x nX @y nY
@w Div Mod Add 382 Add Mul nDir 90 nDirectionOffset 360 45
@u Sub Char $ZX @w 49 @v Sub Char $ZY @w 49
For (i) 1 50 {
@x Add @x @u @y Add @y @v *Wrap
@t RgbR GetCE @x @y
If @t (Break)
If Get @x @y (@i 50)
}
If Gt @i 50 {Message 'There is nobody to propose in that direction.' Return}
If Gt @i @Sr {Message 'That tribute is too far away to propose.' Return}
@t Sub 255 @t
If Gte @t @Trib {Message 'Mutts can't understand complex speech.' Return}
@v Add @t 600 *Name
@w GetCA %BAlly @t @q
SwitchSgn Add Neg Lte @w 100 Gt @w 150
{fRedrawWhenBitmapEdited False *Break fRedrawWhenBitmapEdited True If @z 'Return'}
{fRedrawWhenBitmapEdited False *Prop fRedrawWhenBitmapEdited True}
{SetString 0 ($0 says: 'You're my enemy! There's no way I'd ever ally with you!')}
@d 0 *Msg
*Next
@z True
EmbedMacro %FBehave "Set Behavior"
@x @SAllow SetString 0 '@x'
@y @SLead SetString 1 '@y'
@z nStereoWidth SetString 2 '@z'
GetString3
'Accept alliances? -1=Decline, 0=Prompt, 1=Accept:'
'Declare leadership? -1=No, 0=Toggle, 1=Yes:'
'Stereoscopic 3D display? 0=No, 1-50=Eye separation:' 0
If @z {Return}
@SAllow Sgn Num $0
@SLead Sgn Num $1
nStereoWidth Min Num $2 Div nCellSize 2
@z True
EmbedMacro %FName "Name Tribute"
IfElse Gte @q 0
{@x Add %ZName @q SetString 0 $x @y Var Add %PBody @q SetString 1 '@y' @z Var Add %PTall @q SetString 2 '@z'}
{$0 '' $1 '' $2 ''}
GetString3
'Enter name of tribute (? or 74 or 75 or 10 names all):'
'Enter hair style of tribute (0-9, ?, 74 or 75 sets all):'
'Enter height of tribute (? or 74th sets all):' 0
If @z {Return}
@z True
IfElse NeqStr $1 '?' {@y Num $1} {@y Rnd 0 9}
If And Or Lt @y 0 Gt @y 9 Or Lt @y 74 Gt @y 75
{Message 'Bad hair style!\nNumber must be between 0-9 or 74-75.' Return}
IfElse NeqStr $2 '?' {@v Num $2} {@v 0}
If And And And Or Lt @v 24 Gt @v 96 Lt InChar $2 (?) 0 Lt InChar $2 32 0 Len $2
{Message 'Bad height!\nNumber must be between 24-96.' Return}
fRedrawWhenBitmapEdited False
If EquStr $0 '74' {$0 $ZNameA}
If EquStr $0 '75' {@w Inc %ZNameA $0 $w}
If EquStr $0 '10' {@w Add %ZNameA 2 $0 $w}
If EquStr $0 '?' {*Namer}
IfElse Gte InChar $0 (,) 0
{SetString 0 ',$0' SetStrings %ZName 255 $0}
{If And Gte @q 0 NeqStr $0 '?' (SetString @x $0)}
If Gte @y 74 {@w Add %ZBody Sub @y 74 $1 $w}
IfElse Gte InChar $1 32 0 {
IfElse Gte InChar $1 (?) 0
(For 't' 0 Dec @Trib 'SetVar Add %PBody @t Rnd 0 9')
(SetVars %PBody 255 $1)
For (t) 0 Dec @Trib '*IText'
} {
SetVar Add %PBody @q @y @t @q
*IText
}
If EquStr $2 '74th' {$2 $ZTall}
IfElse Gte InChar $2 32 0 {
IfElse Lt InChar $2 (?) 0 (
SetVars %PTall 255 $2
For 't' 0 255 "@v Var Add %PTall @t *ITall"
) (
For 't' 0 Dec @Live '@v 0 *ITall'
)
} {
If Len $2 (@t @q *ITall)
}
fRedrawWhenBitmapEdited True Spc
EmbedMacro %FDist "Set Districts"
@x @Dist @y @Per @w ?: Lt @Sm 256 @Sm -1
SetString 0 '@x' SetString 1 '@y' SetString 2 '@w'
GetString3
'Enter number of Districts (1-13):'
'Enter tributes per District (1-255):'
'Enter number of Mutts (-1=same as tributes per District):' 0
If @z {Return}
@z True
@x Num $0 If Or Lt @x 1 Gt @x 13 {Message 'Bad district count!\nNumber must be between 1-13.' Return}
@y Num $1 If Or Lt @y 1 Gt @y 255 {Message 'Bad tributes per District count!\nNumber must be between 1-255.' Return}
@w Num $2 If Or Lt @w -1 Gt @w 255 {Message 'Bad Mutt count!\nNumber must be between -1-255.' Return}
@z Add Mul @x @y ?: Lt @w 0 @y @w
If Gt @z 255 {Message '@x Districts x @y tributes per District + @w Mutts = @z total.\nTotal number must be 1-255.' @z True Return}
@SD @x @SY @y @Sm ?: Gte @w 0 @w 999
*Reset *FStart
@z True
EmbedMacro %FRnd "Random Seed"
$0 ''
For (i) 0 Dec Len $ZSet {
@w Char $ZSet @i
@z Var Add %SA Sub @w 65
SetString 1 '_@z' SetChar 1 0 @w
SetString 0 '$0$1'
}
$1 $0
@z @SR SetString 0 '@z'
GetString2 'Enter random number seed for arena (0 for random):' 'Enter arena details for new games (ACEFHLMPQTVZ):' 0
If @z {Return}
@SR Num $0
*Parse *Reset
@z True
EmbedMacro %FSet "Change Settings"
$1 ''
For (i) 0 Dec Len $ZSet2 {
@z Var Add %SA @i
SetString 0 '_@z' SetChar 0 0 Char $ZSet2 @i
SetString 1 '$1$0'
}
$0 ''
GetString2 'Enter changes to arena settings for future games:' 'Arena settings for future games:' 0
If @z {Return}
*Parse $1 $0 *Parse
*Reset
@z True
EmbedMacro %FPrev "Previous Messages"
$0 ''
For (i) 0 11 {
@z Add %ZLine Mod Add @Line @i 12
If Not Len $z 'Continue'
IfElse Len $0 (SetString 0 '$0\n$z') ($0 $z)
}
Message $0
@z True
EmbedMacro %FFeel "Show Alliance"
If *Hard {Return}
fRedrawWhenBitmapEdited False
SwapTexture -1 %BAlly
If nInside {i}
@x nX @y nY
@z ?: Lt @q 0 @Live @q
nX @z nY @z
n Message 'Current Alliances...\n\nColumns: Who's tribute angry at.\nRows: Who's angry at tribute.\n\nDarker red: Friendlier, Lighter red: Angrier\nPurple: Dead, Gray: Killed by'
nX @x nY @y
SwapTexture -1 %BAlly
i fRedrawWhenBitmapEdited True n
@z True
EmbedMacro %FSound "Toggle Sounds"
fAllowSoundPlaying Not fAllowSoundPlaying
IfElse fAllowSoundPlaying
{Sound 'hunger\was_good.wav' Message 'Sound enabled!'}
{Message 'Sound disabled.'}
@z True
EmbedMacro %FPict "Toggle Texture Pictures"
IfElse @Txture {
fRedrawWhenBitmapEdited False
For (i) 0 14 (SwapTexture Add %MPic @i Add %MWasp @i SwapMask Add %MPic @i Add %MWasp @i)
For (i) 1 Dec %JMax (SwapTexture Add %MObj @i Add %MObj2 @i SwapMask Add %MObj @i Add %MObj2 @i)
fRedrawWhenBitmapEdited True Spc
} {
Message 'No textures installed.'
}
@z True
// ////////////// //
// Other commands //
// ////////////// //
EmbedMacro %FUp "Climb Up"
@z True
If @a {
fRedrawWhenBitmapEdited False
u
@v GetM nX nY *View nViewHeight Max nViewHeight @v
fRedrawWhenBitmapEdited True Spc
Return
}
@w Max Max Max Max Max Max Max
Mul Get nX Dec nY UdU GetCA %TVar nX Dec nY
Mul Get Dec nX nY UdU GetCA %TVar Dec nX nY
Mul Get nX Inc nY UdU GetCA %TVar nX Inc nY
Mul Get Inc nX nY UdU GetCA %TVar Inc nX nY
GetCA %TElev nX Dec nY
GetCA %TElev Dec nX nY
GetCA %TElev nX Inc nY
GetCA %TElev Inc nX nY
If Not @w {Message 'You aren't next to anything climbable.' Return}
@z Var Add %PZ @q
If Lt @w Add @z Div Mul Var Add %PTall @q 3 2 {Message 'You've climbed as high as you can.' @z True Return}
If @SMove {
For (i) 1 @SMove (
@v Add @z Div Mul @i Var Add %PTall @q Inc @SMove
*View nViewHeight @v Spc
)
}
@v Add @z Var Add %PTall @q
SetVar Add %PZ @q @v
*View nViewHeight @v
@d 0 $0 'You climb upward...' *Msg
@v False *Next
@z True
EmbedMacro %FDown "Climb Down"
@z True