forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapdata.h
820 lines (775 loc) · 36.3 KB
/
mapdata.h
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
#ifndef _MAPDATA_H_
#define _MAPDATA_H_
#include <vector>
#include <string>
#include "color.h"
#include "item.h"
#include "trap.h"
#include "monster.h"
#include "enums.h"
#include "computer.h"
#include "vehicle.h"
#include "graffiti.h"
#include "basecamp.h"
#include "iexamine.h"
#include <iosfwd>
class game;
class monster;
#ifndef SEEX // SEEX is how far the player can see in the X direction (at
#define SEEX 12 // least, without scrolling). All map segments will need to be
#endif // at least this wide. The map therefore needs to be 3x as wide.
#ifndef SEEY // Same as SEEX
#define SEEY 12 // Requires 2*SEEY+1= 25 vertical squares
#endif // Nuts to 80x24 terms. Mostly exists in graphical clients, and
// those fatcats can resize.
// mfb(t_flag) converts a flag to a bit for insertion into a bitfield
#ifndef mfb
#define mfb(n) long(1 << (n))
#endif
enum t_flag {
transparent = 0,// Player & monsters can see through/past it
bashable, // Player & monsters can bash this & make it the next in the list
container, // Items on this square are hidden until looted by the player
place_item, // Valid terrain for place_item() to put items on
door, // Can be opened--used for NPC pathfinding.
flammable, // May be lit on fire
l_flammable, // Harder to light on fire, but still possible
explodes, // Explodes when on fire
diggable, // Digging monsters, seeding monsters, digging w/ shovel, etc.
tentable, // I'm lazy, this is just diggable with a few more tacked on.
liquid, // Blocks movement but isn't a wall, e.g. lava or water
swimmable, // You (and monsters) swim here
sharp, // May do minor damage to players/monsters passing it
painful, // May cause a small amount of pain
rough, // May hurt the player's feet
sealed, // Can't 'e' to retrieve items here
noitem, // Items "fall off" this space
goes_down, // Can '>' to go down a level
goes_up, // Can '<' to go up a level
console, // Used as a computer
alarmed, // Sets off an alarm if smashed
supports_roof,// Used as a boundary for roof construction
// can also knock down adjacent supports_roof and collapses tiles when destroyed
thin_obstacle,// passable by player and monsters, but not by vehicles
collapses, // Tiles that have a roof over them (which can collapse)
flammable2, // Burn to ash rather than rubble.
deconstruct, // Can be deconstructed
reduce_scent, // Reduces the scent even more, only works if object is bashable as well
fire_container,// Contains fire like brazier or wood stove.
suppress_smoke, // Prevents smoke from being generated by fires. Used for ventilated tiles such as wood stoves.
num_t_flags // MUST be last
};
struct ter_t {
std::string name;
long sym;
nc_color color;
unsigned char movecost;
trap_id trap;
unsigned long flags;// : num_t_flags;
void (iexamine::*examine)(game *, player *, map *m, int examx, int examy);
};
enum ter_id {
t_null = 0,
t_hole, // Real nothingness; makes you fall a z-level
// Ground
t_dirt, t_sand, t_dirtmound, t_pit_shallow, t_pit,
t_pit_corpsed, t_pit_covered, t_pit_spiked, t_pit_spiked_covered,
t_rock_floor, t_rubble, t_ash, t_metal, t_wreckage,
t_grass,
t_metal_floor,
t_pavement, t_pavement_y, t_sidewalk,
t_floor,
t_dirtfloor,//Dirt floor(Has roof)
t_hay,
t_grate,
t_slime,
t_bridge,
// Tent Walls & doors
t_canvas_wall, t_canvas_door, t_canvas_door_o, t_groundsheet, t_fema_groundsheet,
t_skin_wall, t_skin_door, t_skin_door_o, t_skin_groundsheet,
// Lighting related
t_skylight, t_emergency_light_flicker, t_emergency_light,
// Walls
t_wall_log_half, t_wall_log, t_wall_log_chipped, t_wall_log_broken, t_palisade, t_palisade_gate,
t_wall_half, t_wall_wood, t_wall_wood_chipped, t_wall_wood_broken,
t_wall_v, t_wall_h, t_concrete_v, t_concrete_h,
t_wall_metal_v, t_wall_metal_h,
t_wall_glass_v, t_wall_glass_h,
t_wall_glass_v_alarm, t_wall_glass_h_alarm,
t_reinforced_glass_v, t_reinforced_glass_h,
t_bars,
t_door_c, t_door_b, t_door_o, t_door_locked, t_door_locked_alarm, t_door_frame,
t_chaingate_l, t_fencegate_c, t_fencegate_o, t_chaingate_c, t_chaingate_o, t_door_boarded,
t_door_metal_c, t_door_metal_o, t_door_metal_locked,
t_door_glass_c, t_door_glass_o,
t_bulletin,
t_portcullis,
t_recycler, t_window, t_window_taped, t_window_domestic, t_window_domestic_taped, t_window_open, t_curtains,
t_window_alarm, t_window_alarm_taped, t_window_empty, t_window_frame, t_window_boarded,
t_rock, t_fault,
t_paper,
// Tree
t_tree, t_tree_young, t_tree_apple, t_underbrush, t_shrub, t_shrub_blueberry, t_log,
t_root_wall,
t_wax, t_floor_wax,
t_fence_v, t_fence_h, t_chainfence_v, t_chainfence_h, t_chainfence_posts,
t_fence_post, t_fence_wire, t_fence_barbed, t_fence_rope,
t_railing_v, t_railing_h,
// Nether
t_marloss, t_fungus, t_tree_fungal,
// Water, lava, etc.
t_water_sh, t_water_dp, t_sewage,
t_lava,
// Embellishments
t_bed, t_toilet, t_makeshift_bed,
// More embellishments than you can shake a stick at.
t_sink, t_oven, t_woodstove, t_bathtub, t_chair, t_armchair, t_sofa, t_cupboard, t_trashcan, t_desk,
t_sandbox, t_slide, t_monkey_bars, t_backboard,
t_bench, t_table, t_pool_table,
t_gas_pump, t_gas_pump_smashed, t_gas_pump_empty,
t_missile, t_missile_exploded,
t_counter,
t_radio_tower, t_radio_controls,
t_console_broken, t_console, t_gates_mech_control, t_barndoor, t_palisade_pulley,
t_sewage_pipe, t_sewage_pump,
t_centrifuge,
t_column,
// Containers
t_fridge, t_glass_fridge, t_dresser, t_locker,
t_rack, t_bookcase,
t_dumpster,
t_vat, t_crate_c, t_crate_o,
// Staircases etc.
t_stairs_down, t_stairs_up, t_manhole, t_ladder_up, t_ladder_down, t_slope_down,
t_slope_up, t_rope_up,
t_manhole_cover,
// Special
t_card_science, t_card_military, t_card_reader_broken, t_slot_machine,
t_elevator_control, t_elevator_control_off, t_elevator, t_pedestal_wyrm,
t_pedestal_temple,
// Temple tiles
t_rock_red, t_rock_green, t_rock_blue, t_floor_red, t_floor_green, t_floor_blue,
t_switch_rg, t_switch_gb, t_switch_rb, t_switch_even,
// found at fields
t_mutpoppy, //mutated poppy flower
num_terrain_types
};
const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
{"nothing", ' ', c_white, 2, tr_null,
mfb(transparent)|mfb(diggable), &iexamine::none},
{"empty space", ' ', c_black, 2, tr_ledge,
mfb(transparent), &iexamine::none},
{"dirt", '.', c_brown, 2, tr_null,
mfb(transparent)|mfb(diggable)|mfb(tentable), &iexamine::none},
{"sand", '.', c_yellow, 2, tr_null,
mfb(transparent)|mfb(diggable)|mfb(tentable), &iexamine::none},
{"mound of dirt", '#', c_brown, 3, tr_null,
mfb(transparent)|mfb(diggable), &iexamine::none},
{"shallow pit", '0', c_yellow, 8, tr_null,
mfb(transparent)|mfb(diggable), &iexamine::none},
{"pit", '0', c_brown, 10, tr_pit,
mfb(transparent)|mfb(diggable), &iexamine::pit},
{"corpse filled pit",'#', c_green, 5, tr_null,
mfb(transparent)|mfb(diggable), &iexamine::none},
{"covered pit", '#', c_ltred, 2, tr_null,
mfb(transparent), &iexamine::pit_covered},
{"spiked pit", '0', c_ltred, 10, tr_spike_pit,
mfb(transparent)|mfb(diggable), &iexamine::pit_spiked},
{"covered spiked pit",'#',c_ltred, 2, tr_null,
mfb(transparent), &iexamine::pit_spiked_covered},
{"rock floor", '.', c_ltgray, 2, tr_null,
mfb(transparent), &iexamine::none},
{"pile of rubble", '^', c_ltgray, 4, tr_null,
mfb(transparent)|mfb(rough)|mfb(diggable), &iexamine::rubble},
{"pile of ash", '#', c_ltgray, 2, tr_null,
mfb(transparent)|mfb(diggable), &iexamine::rubble},
{"twisted metal", '#', c_cyan, 5, tr_null,
mfb(transparent)|mfb(rough)|mfb(sharp)|mfb(place_item), &iexamine::wreckage},
{"metal wreckage", '#', c_cyan, 5, tr_null,
mfb(transparent)|mfb(rough)|mfb(sharp)|mfb(place_item), &iexamine::wreckage},
{"grass", '.', c_green, 2, tr_null,
mfb(transparent)|mfb(diggable)|mfb(tentable), &iexamine::none},
{"metal floor", '.', c_ltcyan, 2, tr_null,
mfb(transparent), &iexamine::none},
{"pavement", '.', c_dkgray, 2, tr_null,
mfb(transparent), &iexamine::none},
{"yellow pavement", '.', c_yellow, 2, tr_null,
mfb(transparent), &iexamine::none},
{"sidewalk", '.', c_ltgray, 2, tr_null,
mfb(transparent), &iexamine::none},
{"floor", '.', c_cyan, 2, tr_null,
mfb(transparent)|mfb(l_flammable)|mfb(supports_roof)|mfb(collapses), &iexamine::none},
{"dirt floor", '.', c_brown, 2, tr_null, //Dirt Floor, must have roofs!
mfb(transparent)|mfb(diggable)|mfb(supports_roof)|mfb(collapses), &iexamine::none},
{"hay", '#', i_brown, 5, tr_null,
mfb(transparent)|mfb(container)|mfb(flammable2)|mfb(collapses), &iexamine::none},
{"metal grate", '#', c_dkgray, 2, tr_null,
mfb(transparent), &iexamine::none},
{"slime", '~', c_green, 6, tr_null,
mfb(transparent)|mfb(container)|mfb(flammable2)|mfb(place_item), &iexamine::none},
{"walkway", '#', c_yellow, 2, tr_null,
mfb(transparent), &iexamine::none},
{"canvas wall", '#', c_blue, 0, tr_null,
mfb(l_flammable)|mfb(bashable)|mfb(noitem)|mfb(tentable), &iexamine::tent},
{"canvas flap", '+', c_blue, 0, tr_null,
mfb(l_flammable)|mfb(bashable)|mfb(noitem)|mfb(tentable), &iexamine::none},
{"open canvas flap", '.', c_blue, 2, tr_null,
mfb(transparent), &iexamine::none},
{"groundsheet", ';', c_green, 2, tr_null,
mfb(transparent)|mfb(tentable), &iexamine::tent},
{"groundsheet", ';', c_green, 2, tr_null,
mfb(transparent), &iexamine::none},
{"animalskin wall", '#', c_brown, 0, tr_null,
mfb(l_flammable)|mfb(bashable)|mfb(noitem)|mfb(tentable), &iexamine::none},
{"animalskin flap", '+', c_white, 0, tr_null,
mfb(l_flammable)|mfb(bashable)|mfb(noitem)|mfb(tentable), &iexamine::none},
{"open animalskin flap", '.', c_white, 2, tr_null,
mfb(transparent), &iexamine::none},
{"animalskin floor", ';', c_brown, 2, tr_null,
mfb(transparent)|mfb(tentable), &iexamine::shelter},
{"floor", '.', c_white, 2, tr_null,
mfb(transparent)|mfb(l_flammable)|mfb(supports_roof)|mfb(collapses), &iexamine::none}, // Skylight
{"floor", '.', c_white, 2, tr_null,
mfb(transparent)|mfb(l_flammable)|mfb(supports_roof)|mfb(collapses), &iexamine::none}, // Emergency Light
{"floor", '.', c_white, 2, tr_null,
mfb(transparent)|mfb(l_flammable)|mfb(supports_roof)|mfb(collapses), &iexamine::none}, // Regular Light
{"half-built wall", '#', c_brown, 4, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2)|mfb(noitem), &iexamine::none},
{"log wall", '#', c_brown, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"chipped log wall",'#', c_brown, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"broken log wall", '&', c_brown, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2)|mfb(noitem)|
mfb(supports_roof), &iexamine::none},
{"palisade wall", '#', c_brown, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)|mfb(supports_roof)|mfb(transparent), &iexamine::none},
{"palisade gate", '+', c_ltred, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)|mfb(supports_roof)|mfb(door)|mfb(transparent), &iexamine::none},
{"half-built wall", '#', c_ltred, 4, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2)|mfb(noitem), &iexamine::none},
{"wooden wall", '#', c_ltred, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"chipped wood wall",'#', c_ltred, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"broken wood wall", '&', c_ltred, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2)|mfb(noitem)|
mfb(supports_roof), &iexamine::none},
{"wall", LINE_XOXO, c_ltgray, 0, tr_null,
mfb(flammable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"wall", LINE_OXOX, c_ltgray, 0, tr_null,
mfb(flammable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"concrete wall", LINE_XOXO, c_dkgray, 0, tr_null,
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"concrete wall", LINE_OXOX, c_dkgray, 0, tr_null,
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"metal wall", LINE_XOXO, c_cyan, 0, tr_null,
mfb(noitem)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"metal wall", LINE_OXOX, c_cyan, 0, tr_null,
mfb(noitem)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"glass wall", LINE_XOXO, c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"glass wall", LINE_OXOX, c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"glass wall", LINE_XOXO, c_ltcyan, 0, tr_null, // Alarmed
mfb(transparent)|mfb(bashable)|mfb(alarmed)|mfb(noitem)|
mfb(supports_roof), &iexamine::none},
{"glass wall", LINE_OXOX, c_ltcyan, 0, tr_null, // Alarmed
mfb(transparent)|mfb(bashable)|mfb(alarmed)|mfb(noitem)|
mfb(supports_roof), &iexamine::none},
{"reinforced glass", LINE_XOXO, c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"reinforced glass", LINE_OXOX, c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"metal bars", '"', c_ltgray, 0, tr_null,
mfb(transparent)|mfb(noitem), &iexamine::none},
{"closed wood door", '+', c_brown, 0, tr_null,
mfb(bashable)|mfb(flammable2)|mfb(door)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"damaged wood door",'&', c_brown, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2)|mfb(noitem)|
mfb(supports_roof), &iexamine::none},
{"open wood door", '\'', c_brown, 2, tr_null,
mfb(flammable2)|mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"closed wood door", '+', c_brown, 0, tr_null, // Actually locked
mfb(bashable)|mfb(flammable2)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"closed wood door", '+', c_brown, 0, tr_null, // Locked and alarmed
mfb(bashable)|mfb(flammable2)|mfb(alarmed)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"empty door frame", '.', c_brown, 2, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"locked wire gate", '+', c_cyan, 0, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"closed wooden gate", '+', c_brown, 3, tr_null,
mfb(transparent)|mfb(supports_roof) |mfb(bashable)|mfb(flammable2), &iexamine::none},
{"open wooden gate", '.', c_brown, 2, tr_null,
mfb(transparent)|mfb(supports_roof) |mfb(bashable)|mfb(flammable2), &iexamine::none},
{"closed wire gate", '+', c_cyan, 0, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"open wire gate", '.', c_cyan, 2, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"boarded up door", '#', c_brown, 0, tr_null,
mfb(bashable)|mfb(flammable2)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"closed metal door",'+', c_cyan, 0, tr_null,
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"open metal door", '\'', c_cyan, 2, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"closed metal door",'+', c_cyan, 0, tr_null, // Actually locked
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"closed glass door",'+', c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(door)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"open glass door", '\'', c_ltcyan, 2, tr_null,
mfb(transparent)|mfb(supports_roof), &iexamine::none},
{"bulletin board", '6', c_blue, 0, tr_null,
mfb(flammable)|mfb(noitem), &iexamine::none},
{"makeshift portcullis", '&', c_cyan, 0, tr_null,
mfb(noitem), &iexamine::none},
{"steel compactor", '&', c_green, 0, tr_null,
mfb(transparent), &iexamine::recycler},
{"window", '"', c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable)|mfb(noitem)|
mfb(supports_roof)|mfb(deconstruct), &iexamine::none}, // Plain Ol' window
{"taped window", '"', c_dkgray, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)| mfb(reduce_scent), &iexamine::none}, // Regular window
{"window", '"', c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable)|mfb(noitem)|
mfb(supports_roof)|mfb(deconstruct), &iexamine::none}, //has curtains
{"taped window", '"', c_dkgray, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)| mfb(reduce_scent), &iexamine::none}, // Curtain window
{"open window", '\'', c_ltcyan, 4, tr_null,
mfb(transparent)|mfb(flammable)|mfb(noitem)| mfb(supports_roof), &iexamine::none},
{"closed curtains", '"', c_dkgray, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof), &iexamine::none},
{"window", '"', c_ltcyan, 0, tr_null, // Actually alarmed
mfb(transparent)|mfb(bashable)|mfb(flammable)|mfb(alarmed)|mfb(noitem)|
mfb(supports_roof), &iexamine::none},
{"taped window", '"', c_dkgray, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)|mfb(alarmed)| mfb(reduce_scent), &iexamine::none}, //Alarmed, duh.
{"empty window", '0', c_yellow, 8, tr_null,
mfb(transparent)|mfb(flammable)|mfb(supports_roof), &iexamine::none},
{"window frame", '0', c_ltcyan, 8, tr_null,
mfb(transparent)|mfb(sharp)|mfb(flammable)|mfb(noitem)|
mfb(supports_roof), &iexamine::none},
{"boarded up window",'#', c_brown, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"solid rock", '#', c_white, 0, tr_null,
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"odd fault", '#', c_magenta, 0, tr_null,
mfb(noitem)|mfb(supports_roof), &iexamine::fault},
{"paper wall", '#', c_white, 0, tr_null,
mfb(bashable)|mfb(flammable2)|mfb(noitem), &iexamine::none},
{"tree", '7', c_green, 0, tr_null,
mfb(flammable2)|mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"young tree", '1', c_green, 4, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2)|mfb(noitem), &iexamine::none},
{"apple tree", '7', c_ltgreen, 0, tr_null,
mfb(flammable2)|mfb(noitem)|mfb(supports_roof), &iexamine::tree_apple},
{"underbrush", '#', c_ltgreen, 6, tr_null,
mfb(transparent)|mfb(bashable)|mfb(diggable)|mfb(container)|
mfb(flammable2)|mfb(thin_obstacle)|mfb(place_item), &iexamine::shrub_wildveggies},
{"shrub", '#', c_green, 8, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(flammable2)|
mfb(thin_obstacle)|mfb(place_item), &iexamine::none},
{"blueberry bush", '#', c_ltgreen, 8, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(flammable2)|mfb(thin_obstacle), &iexamine::shrub_blueberry},
{"tree trunk", '1', c_brown, 4, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(diggable), &iexamine::none},
{"root wall", '#', c_brown, 0, tr_null,
mfb(noitem)|mfb(supports_roof), &iexamine::none},
{"wax wall", '#', c_yellow, 0, tr_null,
mfb(flammable2)|mfb(noitem)|mfb(supports_roof)|mfb(place_item), &iexamine::none},
{"wax floor", '.', c_yellow, 2, tr_null,
mfb(transparent)|mfb(l_flammable), &iexamine::none},
{"picket fence", '|', c_brown, 3, tr_null,
mfb(bashable)|mfb(transparent)|mfb(diggable)|mfb(flammable2)|mfb(noitem)|mfb(thin_obstacle), &iexamine::none},
{"picket fence", '-', c_brown, 3, tr_null,
mfb(bashable)|mfb(transparent)|mfb(diggable)|mfb(flammable2)|mfb(noitem)|mfb(thin_obstacle), &iexamine::none},
{"chain link fence", '|', c_cyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(noitem)|mfb(thin_obstacle), &iexamine::chainfence},
{"chain link fence", '-', c_cyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(noitem)|mfb(thin_obstacle), &iexamine::chainfence},
{"metal post", '#', c_cyan, 2, tr_null,
mfb(transparent)|mfb(thin_obstacle), &iexamine::fence_post},
{"fence post", '#', c_brown, 2, tr_null,
mfb(transparent)|mfb(thin_obstacle), &iexamine::fence_post},
{"wire fence", '$', c_blue, 4, tr_null,
mfb(transparent)|mfb(thin_obstacle), &iexamine::remove_fence_wire},
{"barbed wire fence",'$', c_blue, 4, tr_null,
mfb(transparent)|mfb(sharp)|mfb(thin_obstacle), &iexamine::remove_fence_barbed},
{"rope fence", '$', c_brown, 3, tr_null,
mfb(transparent)|mfb(thin_obstacle), &iexamine::remove_fence_rope},
{"railing", '|', c_yellow, 3, tr_null,
mfb(transparent)|mfb(noitem)|mfb(thin_obstacle), &iexamine::none},
{"railing", '-', c_yellow, 3, tr_null,
mfb(transparent)|mfb(noitem)|mfb(thin_obstacle), &iexamine::none},
{"marloss bush", '1', c_dkgray, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2), &iexamine::none},
{"fungal bed", '#', c_dkgray, 3, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(diggable), &iexamine::none},
{"fungal tree", '7', c_dkgray, 0, tr_null,
mfb(flammable2)|mfb(noitem), &iexamine::none},
{"shallow water", '~', c_ltblue, 5, tr_null,
mfb(transparent)|mfb(liquid)|mfb(swimmable), &iexamine::none},
{"deep water", '~', c_blue, 0, tr_null,
mfb(transparent)|mfb(liquid)|mfb(swimmable), &iexamine::none},
{"sewage", '~', c_ltgreen, 6, tr_null,
mfb(transparent)|mfb(swimmable), &iexamine::none},
{"lava", '~', c_red, 4, tr_lava,
mfb(transparent)|mfb(liquid), &iexamine::none},
{"bed", '#', c_magenta, 5, tr_null,
mfb(transparent)|mfb(container)|mfb(flammable2)|mfb(collapses)|
mfb(deconstruct)|mfb(place_item), &iexamine::none},
{"toilet", '&', c_white, 4, tr_null,
mfb(transparent)|mfb(bashable)|mfb(l_flammable)|mfb(collapses), &iexamine::none},
{"makeshift bed", '#', c_magenta, 5, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable2)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"sink", '&', c_white, 4, tr_null,
mfb(transparent)|mfb(bashable)|mfb(l_flammable)|mfb(collapses)|mfb(container)|mfb(place_item), &iexamine::none},
{"oven", '#', c_dkgray, 4, tr_null,
mfb(transparent)|mfb(bashable)|mfb(l_flammable)|mfb(collapses)|mfb(container)|mfb(place_item), &iexamine::none},
{"wood stove", '#', i_red, 4, tr_null,
mfb(transparent)|mfb(container)|mfb(fire_container)|mfb(suppress_smoke)|mfb(place_item), &iexamine::none},
{"bathtub", '~', c_white, 4, tr_null,
mfb(transparent)|mfb(bashable)|mfb(l_flammable)|mfb(collapses)|mfb(container)|mfb(place_item), &iexamine::none},
{"chair", '#', c_brown, 2, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"arm chair", 'H', c_green, 3, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"sofa", 'H', i_red, 3, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"cupboard", '#', c_blue, 3, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(collapses)|mfb(deconstruct)|
mfb(container)|mfb(place_item), &iexamine::none},
{"trash can", '&', c_ltcyan, 3, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(collapses)|mfb(container)|mfb(place_item), &iexamine::none},
{"desk", '#', c_ltred, 3, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(collapses)|mfb(deconstruct)|
mfb(container)|mfb(place_item), &iexamine::none},
{"sandbox", '#', c_yellow, 3, tr_null,
mfb(transparent)|mfb(deconstruct), &iexamine::none},
{"slide", '#', c_ltcyan, 4, tr_null,
mfb(transparent)|mfb(deconstruct), &iexamine::none},
{"monkey bars", '#', c_cyan, 4, tr_null,
mfb(transparent)|mfb(deconstruct), &iexamine::none},
{"backboard", '7', c_red, 0, tr_null,
mfb(transparent)|mfb(deconstruct), &iexamine::none},
{"bench", '#', c_brown, 3, tr_null,
mfb(transparent)|mfb(flammable2)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"table", '#', c_red, 4, tr_null,
mfb(transparent)|mfb(flammable)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"pool table", '#', c_green, 4, tr_null,
mfb(transparent)|mfb(flammable)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"gasoline pump", '&', c_red, 0, tr_null,
mfb(transparent)|mfb(explodes)|mfb(noitem), &iexamine::gaspump},
{"smashed gas pump", '&', c_ltred, 0, tr_null,
mfb(transparent)|mfb(noitem), &iexamine::none},
{"out-of-order gasoline pump", '&', c_red, 0, tr_null,
mfb(transparent)|mfb(noitem), &iexamine::none},
{"missile", '#', c_ltblue, 0, tr_null,
mfb(explodes)|mfb(noitem), &iexamine::none},
{"blown-out missile",'#', c_ltgray, 0, tr_null,
mfb(noitem), &iexamine::none},
{"counter", '#', c_blue, 4, tr_null,
mfb(transparent)|mfb(flammable)|mfb(collapses)|mfb(deconstruct), &iexamine::none},
{"radio tower", '&', c_ltgray, 0, tr_null,
mfb(noitem), &iexamine::none},
{"radio controls", '6', c_green, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(noitem), &iexamine::none},
{"broken console", '6', c_ltgray, 0, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::none},
{"computer console", '6', c_blue, 0, tr_null,
mfb(transparent)|mfb(console)|mfb(noitem)|mfb(collapses), &iexamine::none},
{"mechanical winch", '6', c_cyan_red, 0, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"rope and pulley", '|', c_brown, 0, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"rope and pulley", '|', c_brown, 0, tr_null,
mfb(transparent)|mfb(noitem)|mfb(collapses), &iexamine::controls_gate},
{"sewage pipe", '1', c_ltgray, 0, tr_null,
mfb(transparent), &iexamine::none},
{"sewage pump", '&', c_ltgray, 0, tr_null,
mfb(noitem), &iexamine::none},
{"centrifuge", '{', c_magenta, 0, tr_null,
mfb(transparent), &iexamine::none},
{"column", '1', c_ltgray, 0, tr_null,
mfb(flammable), &iexamine::none},
{"refrigerator", '{', c_ltcyan, 0, tr_null,
mfb(container)|mfb(collapses)|mfb(bashable)|mfb(place_item), &iexamine::none},
{"glass door fridge",'{', c_ltcyan, 0, tr_null,
mfb(collapses)|mfb(bashable)|mfb(place_item), &iexamine::none},
{"dresser", '{', c_brown, 0, tr_null,
mfb(transparent)|mfb(container)|mfb(flammable)|mfb(collapses)|
mfb(bashable)|mfb(deconstruct)|mfb(place_item), &iexamine::none},
{"locker", '{', c_ltgray, 0, tr_null,
mfb(container)|mfb(collapses)|mfb(bashable)|mfb(place_item), &iexamine::none},
{"display rack", '{', c_ltgray, 0, tr_null,
mfb(transparent)|mfb(l_flammable)|mfb(collapses)|mfb(bashable)|
mfb(deconstruct)|mfb(place_item), &iexamine::none},
{"book case", '{', c_brown, 0, tr_null,
mfb(flammable)|mfb(collapses)|mfb(bashable)|mfb(deconstruct)|mfb(place_item), &iexamine::none},
{"dumpster", '{', c_green, 0, tr_null,
mfb(container)|mfb(bashable)|mfb(place_item), &iexamine::none},
{"cloning vat", '0', c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(sealed)|mfb(place_item), &iexamine::none},
{"crate", 'X', i_brown, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(sealed)|
mfb(flammable)|mfb(deconstruct)|mfb(place_item), &iexamine::none},
{"open crate", 'O', i_brown, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(container)|mfb(flammable)|mfb(place_item), &iexamine::none},
{"stairs down", '>', c_yellow, 2, tr_null,
mfb(transparent)|mfb(goes_down)|mfb(place_item), &iexamine::none},
{"stairs up", '<', c_yellow, 2, tr_null,
mfb(transparent)|mfb(goes_up)|mfb(place_item), &iexamine::none},
{"manhole", '>', c_dkgray, 2, tr_null,
mfb(transparent)|mfb(goes_down)|mfb(place_item), &iexamine::none},
{"ladder", '<', c_dkgray, 2, tr_null,
mfb(transparent)|mfb(goes_up)|mfb(place_item), &iexamine::none},
{"ladder", '>', c_dkgray, 2, tr_null,
mfb(transparent)|mfb(goes_down)|mfb(place_item), &iexamine::none},
{"downward slope", '>', c_brown, 2, tr_null,
mfb(transparent)|mfb(goes_down)|mfb(place_item), &iexamine::none},
{"upward slope", '<', c_brown, 2, tr_null,
mfb(transparent)|mfb(goes_up)|mfb(place_item), &iexamine::none},
{"rope leading up", '<', c_white, 2, tr_null,
mfb(transparent)|mfb(goes_up), &iexamine::none},
{"manhole cover", '0', c_dkgray, 2, tr_null,
mfb(transparent), &iexamine::none},
{"card reader", '6', c_pink, 0, tr_null, // Science
mfb(noitem), &iexamine::cardreader},
{"card reader", '6', c_pink, 0, tr_null, // Military
mfb(noitem), &iexamine::cardreader},
{"broken card reader",'6',c_ltgray, 0, tr_null,
mfb(noitem), &iexamine::none},
{"slot machine", '6', c_green, 0, tr_null,
mfb(bashable)|mfb(noitem), &iexamine::slot_machine},
{"elevator controls",'6', c_ltblue, 0, tr_null,
mfb(noitem), &iexamine::elevator},
{"powerless controls",'6',c_ltgray, 0, tr_null,
mfb(noitem), &iexamine::none},
{"elevator", '.', c_magenta, 2, tr_null,
0, &iexamine::none},
{"dark pedestal", '&', c_dkgray, 0, tr_null,
mfb(transparent), &iexamine::pedestal_wyrm},
{"light pedestal", '&', c_white, 0, tr_null,
mfb(transparent), &iexamine::pedestal_temple},
{"red stone", '#', c_red, 0, tr_null,
0, &iexamine::none},
{"green stone", '#', c_green, 0, tr_null,
0, &iexamine::none},
{"blue stone", '#', c_blue, 0, tr_null,
0, &iexamine::none},
{"red floor", '.', c_red, 2, tr_null,
mfb(transparent), &iexamine::none},
{"green floor", '.', c_green, 2, tr_null,
mfb(transparent), &iexamine::none},
{"blue floor", '.', c_blue, 2, tr_null,
mfb(transparent), &iexamine::none},
{"yellow switch", '6', c_yellow, 0, tr_null,
mfb(transparent), &iexamine::fswitch},
{"cyan switch", '6', c_cyan, 0, tr_null,
mfb(transparent), &iexamine::fswitch},
{"purple switch", '6', c_magenta, 0, tr_null,
mfb(transparent), &iexamine::fswitch},
{"checkered switch", '6', c_white, 0, tr_null,
mfb(transparent), &iexamine::fswitch},
{"mutated poppy flower", 'f', c_red, 3, tr_null,
mfb(transparent), &iexamine::flower_poppy}
};
enum map_extra {
mx_null = 0,
mx_helicopter,
mx_military,
mx_science,
mx_stash,
mx_drugdeal,
mx_supplydrop,
mx_portal,
mx_minefield,
mx_wolfpack,
mx_cougar,
mx_puddle,
mx_crater,
mx_fumarole,
mx_portal_in,
mx_anomaly,
num_map_extras
};
const int classic_extras = mfb(mx_helicopter) | mfb(mx_military) |
mfb(mx_stash) | mfb(mx_drugdeal) | mfb(mx_supplydrop) | mfb(mx_minefield) |
mfb(mx_wolfpack) | mfb(mx_cougar) | mfb(mx_puddle) | mfb(mx_crater);
// Chances are relative to eachother; e.g. a 200 chance is twice as likely
// as a 100 chance to appear.
const int map_extra_chance[num_map_extras + 1] = {
0, // Null - 0 chance
40, // Helicopter
50, // Military
120, // Science
200, // Stash
20, // Drug deal
10, // Supply drop
5, // Portal
70, // Minefield
30, // Wolf pack
40, // Cougar
250, // Puddle
10, // Crater
8, // Fumarole
7, // One-way portal into this world
10, // Anomaly
0 // Just a cap value; leave this as the last one
};
struct map_extras {
unsigned int chance;
int chances[num_map_extras + 1];
map_extras(unsigned int embellished, int helicopter = 0, int mili = 0,
int sci = 0, int stash = 0, int drug = 0, int supply = 0,
int portal = 0, int minefield = 0, int wolves = 0, int cougar = 0, int puddle = 0,
int crater = 0, int lava = 0, int marloss = 0, int anomaly = 0)
: chance(embellished)
{
chances[ 0] = 0;
chances[ 1] = helicopter;
chances[ 2] = mili;
chances[ 3] = sci;
chances[ 4] = stash;
chances[ 5] = drug;
chances[ 6] = supply;
chances[ 7] = portal;
chances[ 8] = minefield;
chances[ 9] = wolves;
chances[10] = cougar;
chances[11] = puddle;
chances[12] = crater;
chances[13] = lava;
chances[14] = marloss;
chances[15] = anomaly;
chances[16] = 0;
}
};
struct field_t {
std::string name[3];
char sym;
nc_color color[3];
bool transparent[3];
bool dangerous[3];
int halflife; // In turns
};
enum field_id {
fd_null = 0,
fd_blood,
fd_bile,
fd_web,
fd_slime,
fd_acid,
fd_sap,
fd_fire,
fd_smoke,
fd_toxic_gas,
fd_tear_gas,
fd_nuke_gas,
fd_gas_vent,
fd_fire_vent,
fd_flame_burst,
fd_electricity,
fd_fatigue,
fd_push_items,
fd_shock_vent,
fd_acid_vent,
num_fields
};
const field_t fieldlist[] = {
{{"", "", ""}, '%',
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0},
{{"blood splatter", "blood stain", "puddle of blood"}, '%',
{c_red, c_red, c_red}, {true, true, true}, {false, false, false},2500},
{{"bile splatter", "bile stain", "puddle of bile"}, '%',
{c_pink, c_pink, c_pink}, {true, true, true}, {false, false, false},2500},
{{"cobwebs","webs", "thick webs"}, '}',
{c_white, c_white, c_white}, {true, true, false},{false, false, false}, 0},
{{"slime trail", "slime stain", "puddle of slime"}, '%',
{c_ltgreen, c_ltgreen, c_green},{true, true, true},{false, false, false},2500},
{{"acid splatter", "acid streak", "pool of acid"}, '5',
{c_ltgreen, c_green, c_green}, {true, true, true}, {true, true, true}, 10},
{{"sap splatter", "glob of sap", "pool of sap"}, '5',
{c_yellow, c_brown, c_brown}, {true, true, true}, {true, true, true}, 20},
{{"small fire", "fire", "raging fire"}, '4',
{c_yellow, c_ltred, c_red}, {true, true, true}, {true, true, true}, 800},
{{"thin smoke", "smoke", "thick smoke"}, '8',
{c_white, c_ltgray, c_dkgray}, {true, false, false},{false, true, true}, 300},
{{"hazy cloud","toxic gas","thick toxic gas"}, '8',
{c_white, c_ltgreen, c_green}, {true, false, false},{false, true, true}, 900},
{{"hazy cloud","tear gas","thick tear gas"}, '8',
{c_white, c_yellow, c_brown}, {true, false, false},{true, true, true}, 600},
{{"hazy cloud","radioactive gas", "thick radioactive gas"}, '8',
{c_white, c_ltgreen, c_green}, {true, true, false}, {true, true, true}, 1000},
{{"gas vent", "gas vent", "gas vent"}, '%',
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0},
{{"", "", ""}, '&', // fire vents
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0},
{{"fire", "fire", "fire"}, '5',
{c_red, c_red, c_red}, {true, true, true}, {true, true, true}, 0},
{{"sparks", "electric crackle", "electric cloud"}, '9',
{c_white, c_cyan, c_blue}, {true, true, true}, {true, true, true}, 2},
{{"odd ripple", "swirling air", "tear in reality"}, '*',
{c_ltgray, c_dkgray, c_magenta},{true, true, false},{false, false, false}, 0},
{{"", "", ""}, '&', // push items
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0},
{{"", "", ""}, '&', // shock vents
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0},
{{"", "", ""}, '&', // acid vents
{c_white, c_white, c_white}, {true, true, true}, {false, false, false}, 0}
};
struct field {
field_id type;
signed char density;
int age;
field() { type = fd_null; density = 1; age = 0; };
field(field_id t, unsigned char d, unsigned int a) {
type = t;
density = d;
age = a;
}
bool is_null()
{
return (type == fd_null || type == fd_blood || type == fd_bile ||
type == fd_slime);
}
bool is_dangerous()
{
return fieldlist[type].dangerous[density - 1];
}
std::string name()
{
return fieldlist[type].name[density - 1];
}
};
struct spawn_point {
int posx, posy;
int count;
mon_id type;
int faction_id;
int mission_id;
bool friendly;
std::string name;
spawn_point(mon_id T = mon_null, int C = 0, int X = -1, int Y = -1,
int FAC = -1, int MIS = -1, bool F = false,
std::string N = "NONE") :
posx (X), posy (Y), count (C), type (T), faction_id (FAC),
mission_id (MIS), friendly (F), name (N) {}
};
struct submap {
ter_id ter[SEEX][SEEY]; // Terrain on each square
std::vector<item> itm[SEEX][SEEY]; // Items on each square
trap_id trp[SEEX][SEEY]; // Trap on each square
field fld[SEEX][SEEY]; // Field on each square
int rad[SEEX][SEEY]; // Irradiation of each square
graffiti graf[SEEX][SEEY]; // Graffiti on each square
int active_item_count;
int field_count;
int turn_last_touched;
std::vector<spawn_point> spawns;
std::vector<vehicle*> vehicles;
computer comp;
basecamp camp; // only allowing one basecamp per submap
};
std::ostream & operator<<(std::ostream &, const submap *);
std::ostream & operator<<(std::ostream &, const submap &);
#endif