File: mini_monsters.des

package info (click to toggle)
crawl 2%3A0.34.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 100,188 kB
  • sloc: cpp: 363,709; ansic: 27,765; javascript: 9,516; python: 8,463; perl: 3,293; java: 3,132; xml: 2,380; makefile: 1,835; sh: 611; objc: 250; cs: 15; sed: 9; lisp: 3
file content (11660 lines) | stat: -rw-r--r-- 270,400 bytes parent folder | download | duplicates (2)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
##############################################################################
# mini_monsters.des: This is the place for minivaults with monsters.
#
# So all vaults in this file should have no ORIENT lines but they should
# contain MONS or KMONS lines.

# Additionally, maps that only place in one branch where that branch is not
# Dungeon or Depths should go in the corresponding branch DES file. Vaults with
# ORIENT lines are stored in float.des or large.des. Minivaults without
# monsters go to mini_features.des.
#
# Sections:
# <<1>> Invertebrae        (insects, spiders, worms)
# <<2>> Vertebrae          (mammals, reptiles, also serpents, dragons)
# <<3>> Humanoids          (including centaurs, spriggans)
# <<4>> Demons and undead
# <<5>> Fixed shooters     (statues, oklobs, fog generators)
# <<6>> Others             (slime denizens, insubstantial monsters)
# <<7>> Random             (using 8,9,0 or too many monsters to categorise)
# <<8>> Guardians          (thematic vaults centered around special items)
# <<9>> Manuals            (pre-lair vaults placing manuals with guardians)
# <<10>> Classics           (ancient minivaults and extensions)
#
# Often, a vault will fit in two categories. Choose the one you think fits
# best or else delegate to Random or Others. Be picky with Guardians, please.
###############################################################################

: crawl_require('dlua/vault.lua')

{{
-- Functionality for some Grunt vaults.
function grunt_ministairs_setup(e, hatches)
  e.tags("luniq_generic_threat_stair buniq_grunt_ministairs")
  if you.in_branch("Crypt") or you.in_branch("Zot") then
    e.shuffle("GT")
    if you.in_branch("Crypt") then
      e.subst("T = T V:20 Y:1")
      e.subst("x = c")
    end
  else
    e.shuffle("GTt")
    e.subst("T = T:20 V U:1")
    if you.in_branch("D") or you.in_branch("Depths") then
      init_hm_decor_walldepth(e, 'x')
    end
  end
  if hatches then
    e.shuffle("{[(<}])>")
  else
    e.shuffle("{[(}])")
  end
  e.subst("+ = +.")
  e.nsubst(". = 2 = 0:19 .:1 / *:.")
  e.kmons("0 = 0 band")
end

function random_stair(e, symbol)
  local valid;
  if you.depth() > 1 then
    valid = "([{"
  else
    -- should coincide with you.depth() ~= dgn.br_depth(you.branch())
    valid = ""
  end
  if you.depth() ~= dgn.br_depth(you.branch()) then
    valid = valid .. ")]}"
  end
  if valid == "" then
    valid = "." -- shouldn't happen outside validation/caching
  end
  e.subst(symbol .. " = " .. valid)
end
}}

default-depth: D:9-, Depths, Elf

###############################################################################
#
# <<1>> Invertebrae
#       Insects, spiders, worms
#
###############################################################################

NAME:    eino_jars
TAGS:    patrolling uniq_beehive transparent
DEPTH:   D:7-14
KMONS:   1 = killer bee
KMONS:   2 = meliai
KITEM:   1 = %
KITEM:   2 = *
KFEAT:   X = x
: if you.absdepth() < 12 then
NSUBST:  1 = 1:1 / * = 11.
: else
NSUBST:  1 = 1:2 / 2 = 21 / 1:. / * = 11.
: end
TILE:    X = wall_wax
: decorative_floor(_G, 'p', "flower patch")
MAP
 xxxxx
 x111x
 x1X1x.@.
 x+++x.x.
.....p.....
  .x.x+++x
  .@.x1X1x
     x111x
     xxxxx
ENDMAP

# Beehive which needs digging to access.
NAME:   hive_lemuel
TAGS:   no_trap_gen transparent no_descent
DEPTH:  D:9-, Spider
MONS:   killer bee, meliai, queen bee, hornet
KMASK:  1234*R = opaque
KMONS:  *R = ribbon worm
KITEM:  * = *
KITEM:  R = potion of ambrosia pre_id
SUBST:  ? : .w
SUBST:  * : *:20 R:3
# Since one has to dig the bees out, early meliai are fine.
: if not is_validating() then
:   if crawl.x_chance_in_y(15, 27) then
TAGS:   uniq_beehive
NSUBST: 1 = 1:3 / 1:1 / * = 1 x:2
:   else
TAGS:   uniq_hornetnest
SUBST:  1 : 4
:   end
: end
COLOUR: x = yellow
TILE:   x = wall_wax
MAP
  ????????
 ??????????
???xxxxxx???
??xmxxxxxx??
??xx1111xx??
??xx1**1xx??
??xx1**1xx??
??xx1111xx??
??xxxxxxmx??
???xxxxxx???
 ??????????
  ????????
ENDMAP

# Beehive minivault
NAME:   minivault_7
TAGS:   uniq_beehive patrolling transparent
DEPTH:  D:9-
MONS:   queen bee, meliai, killer bee
KITEM:  R = potion of ambrosia pre_id / nothing
COLOUR: x = yellow
TILE:   x = wall_wax
: if you.absdepth() < 12 then
SUBST:  2 = 3
: end
MAP
............
....xxxx....
..x3x3xxxx..
..xxRx3x2x..
.xx3xRx3xxx.
.x2xRx1xRx3.
.xx3xRxRx3x.
.xxx3x3x3xx.
..x3xRx3xx..
...xx2xx3x..
....xxxx....
............
ENDMAP

# Not Minivault 9 (by Mu.)
NAME:   not_door_vault_mu
TAGS:   extra allow_dup luniq vaults_empty
DEPTH:  D:13-, Elf, Vaults, !Vaults:$, Crypt, Depths, Zot, Dis, Geh, Tar, Coc
WEIGHT: 1
KMONS:  12 = butterfly
: door_vault_setup(_G)
: if you.in_branch("D") or you.in_branch("Depths") or you.in_branch("Vaults") then
FTILE:  12 = floor_grass_dark
:   decorative_floor(_G, '12', "flower patch")
: end
MAP
..............
..............
..aaaaaaaaaa..
..a++++++++a..
..a++++++++a..
..a++1111++a..
..a++1221++a..
..a++1221++a..
..a++1111++a..
..a++++++++a..
..a++++++++a..
..aaaaaaaaaa..
..............
..............
ENDMAP

# I've revamped this vault to always place reasonably challenging monsters,
# with monster/loot types and number scaling with depth. -gammafunk
NAME:   worms_lemuel
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:7-, Lair, Spider, Swamp
KMONS:  1 = swamp worm
KMONS:  2 = tyrant leech
KMONS:  3 = demonic crawler
KMONS:  4 = torpor snail
KMONS:  5 = moth of wrath
KMONS:  P = plant
KITEM:  | = |
KITEM:  * = *
KFEAT:  12345P|* = W
: if you.in_branch("D") then
:     if you.depth() < 10 then
SUBST:  D = W
NSUBST: 1 = 1 / 2=1W / |* / |*WW / W
:     elseif you.depth() < 13 then
SUBST:  D = 1WW
NSUBST: 1 = 1 / 3=1W / 23WW / |* / 2=|*WW / W
:     else
SUBST:  D = 1W
NSUBST: 1 = 2=1 / 3=1W / 23 / 2=23WW / 45 / 2=|* / 2=|*WW / W
:     end
: elseif you.in_branch("Lair") then
:     if you.depth() < 4 then
SUBST:  D = 1WW
NSUBST: 1 = 1 / 3=1W / 23WW / |* / 2=|*WW / W
:     else
SUBST:  D = 1W
NSUBST: 1 = 2=1 / 2=1W / 2=23WW / 45WW / |* / 3=|*WW / W
:     end
: elseif you.in_branch("Swamp") then
SUBST:  D = 1W
NSUBST: 1 = 3=1 / 3=1W / 2 / 3=2W / 45 / 45WW / 2=|* / 3=|*WW / W
# Spider
: else
SUBST:  D = 3W
NSUBST: 1 = 4=3 / 6=3W / 4 / 4W / 2=|* / 3=|*WW / W
: end
MAP
    WWWWW
   WWwDwWW
 WWWWxxxWWWW
WWWxxx1xxxwWW
Wwxx11111xPWW
WDx111111PPWW
Wwxx11111xPWW
WWwxxx1xxxwWW
 WWWWxxxWWWW
   WWwDwWW
    WWWWW
ENDMAP

NAME:    hangedman_stitches_earthworm
TAGS:    no_monster_gen no_item_gen transparent no_pool_fixup
DEPTH:   Depths, Spider:2-, Abyss
KMONS:   0 = 0
KMONS:   1 = tyrant leech
KMONS:   2 = boulder beetle
KMONS:   3 = redback w:5 / orb spider w:5 / nothing
KMONS:   4 = thrashing horror
KITEM:   ' = stone no_pickup q:1 w:5 / nothing
SHUFFLE: ABCDEF / ABCDEF / ABCCBA, ABC, DEF, 13 / 13 / 31, {`
:  if you.in_branch("Abyss") then
:    if you.depth() ~= dgn.br_depth(you.branch()) then
KFEAT:   04 = abyssal_stair
:    end
SUBST:   G = BEG, C : x:5 cvb, B : x:5 cvbw, A : xcvb w:4
SUBST:   D: x:5 cvb, E : x:5 cvbw, F : xcvb w:4, { = '
SUBST:   0 = 4:50 0
:  else
KITEM:   01234 = % w:90 no_pickup / * no_pickup
SUBST:   { = {[( .:15, ` = '
NSUBST:  { = 1:{ / 1:}, [ = 1:[ / 1:(, ( = 1:] / 1:)
SUBST:   G = BEG, C: xc, B : x., A : xxc .:2
SUBST:   D : xc, E : x .:5, F : xxc .:2
:    if you.in_branch("Spider") then
SUBST:   0 = 3:50 0
:    else
SUBST:   c : cb
:    end
:  end
MAP
  '...      ..'.D.1.D.'..
 '.'A..    ..'D'E'D'E'D'..
..'0B..   ..'0E'F'E'F'E0'..
.'ABC..   .'DEF.'.F.'.FED'.
..''...   ..'..{.....`..'..
.CBA'..   ..'DEF.. ..FED'..
..'2...   ...2'..   ..1'...
.'CBA..   ..AGF'.   .'FED..
..'1...   ...'2..   ..2'...
.CBA'... ...'ABC.   .FED'..
..''.`.....{.''..   .....'.
.'CBA.'.A.'.ABC'.   ..FED'.
..'0B'A'B'A'B0'..   ..E0'..
 ..'C'B'C'B'C'..    ..D'.'
  ..'.C.1.C.'..      ...'
ENDMAP

NAME:   nicolae_looking_at_the_future
TAGS:   no_monster_gen no_trap_gen uniq_beehive patrolling
DEPTH:  D:8-, Spider
KMONS:  B = queen bee
KMONS:  b = killer bee
KMONS:  M = meliai
KMONS:  p = plant
: if you.in_branch("Spider") then
SUBST:  + = .
: end
: if you.absdepth() > 12 then
NSUBST: b = 1:B / 3:M / *:b
: else
NSUBST: b = 1:B / 1:b / * = bb.
: end
MAP
xxxxx++xxxxx
xp........px
xpb.pb.pb.px
xp..p..p..px
xp.bp.bp.bpx
xp..p..p..px
xpb.pb.pb.px
xp..p..p..px
xp.bp.bp.bpx
xp..p..p..px
xpb..b..b.px
xxxxxxxxxxxx
ENDMAP

NAME:   minmay_worlds_worst_comb
TAGS:   transparent
DEPTH:  D:3-5
MONS:   clockroach
NSUBST: 1 = 1:1 / 1:. / * = 1.
MAP
   ....
  ..xx.
  .xx1..
 ..1xxx.
 .xxx1...
...1xxxx.
.xxxx1...
...1xxx.
 .xxx1..
 ..1xx.
  .xx..
  ....
ENDMAP

NAME:   nzn_sisyphean_effort
DEPTH:  D:9-12, Lair
MONS:   patrolling boulder beetle
KITEM:  e = potion of attraction pre_id
: dgn.delayed_decay(_G, 'd', 'human corpse')
MAP
xxxxxxxxx
@.......@
@..d1e..@
@.......@
xxxxxxxxx
ENDMAP

NAME:   hellmonk_scarab_ruin
TAGS:   ruin
DEPTH:  Crypt, Depths
MONS:   death scarab band
FTILE:  .$1c = floor_sandstone
TILE:   c = wall_tomb
NSUBST: ' = 2 = 1.. / *:.
MAP
   ccccc
 ccc...ccc
cc..c$c..cc
ccc.$1$.ccc
@...ccc...@
ccc.....ccc
c.ccc.ccc.c
c...c.c...c
c...c.c...c
ccc.....ccc
  ccc@ccc
ENDMAP

NAME:    nicolae_wormholes
TAGS:    transparent
DEPTH:   D:2-5
MONS:    ribbon worm
KFEAT:   ^ = shaft trap
NSUBST:  - = 1:} / *:`
SUBST:   D = x, E = x.
SHUFFLE: }])
: local d = math.max(1, you.depth() - 1 + crawl.random_range(0, 2))
: nsubst("` = " .. d .. ":1 / " .. ((d + 3) * 2) .. ":^ / *:.")
MAP
xxxxE.Exxxx
xxD`...`Dxx
xD```````Dx
x``-----``x
E.`-----`.E
..`-----`..
E.`-----`.E
x``-----``x
xD```````Dx
xxD`...`Dxx
xxxxE.Exxxx
ENDMAP

NAME:   dreamdust_wasp_nest
TAGS:   no_monster_gen uniq_hornetnest
DEPTH:  D:12-, Lair, Spider, Depths
WEIGHT: 5
NSUBST: . = 6 = 11. / 6 = 1.. / *:.
: if you.in_branch("Depths") then
SUBST:  x = b
COLOUR: b = silver
MONS:   spark wasp
: elseif you.in_branch("Spider") then
MONS:   hornet / spark wasp
: else
MONS:   hornet
: end
MAP
    xxxx
  xxx..xxx
xxx..xx..xxx
x..xx..xx..x
@xx..xx..xx@
x..xx..xx..x
xxx..xx..xxx
  xxx..xxx
    xxxx
ENDMAP

NAME:    regret_index_collectors'_demense
TAGS:    no_monster_gen vaults_room vaults_orient_s no_pool_fixup no_wall_fixup
DEPTH:   D:5-, Swamp, Vaults, !Vaults:$, Depths
SHUFFLE: ABCD
SUBST:   AB : y, C : y., D : y., z : x., Z : x., c : cccct
: if you.in_branch("D") then
:   if you.depth() < 8 then
MONS:    dart slug, ribbon worm, bombardier beetle / scorpion w:3
MONS:    gnoll bouda / kobold w:2
NSUBST:  0 = 2:. / *:0, % = 4:$ / 1:d%% / *:%
:   elseif you.depth() < 10 then
MONS:    bombardier beetle / scorpion w:3, vampire mosquito
MONS:    killer bee / hornet, kobold brigand / gnoll bouda w:2
NSUBST:  0 = 3:. / *:0, % = 3:$ / 1:d%% / *:%
:   elseif you.depth() < 12 then
MONS:    vampire mosquito, killer bee / hornet w:1
MONS:    hornet perm_ench:shapeshifter / queen bee perm_ench:shapeshifter / \
         tarantella perm_ench:shapeshifter
MONS:    arcanist / ogre mage
NSUBST:  % = 1:d* / 1:*% / *:%
:   else
MONS:    redback / hornet perm_ench:shapeshifter w:2 / \
         tarantella perm_ench:shapeshifter w:2
MONS:    boulder beetle / tarantella w:2, wolf spider
MONS:    rakshasa / occultist
NSUBST:  % = 1:d / 2 = *% / *:%
:   end
SUBST:   W = ., X = x
: elseif you.in_branch("Swamp") then
MONS:    hornet / vampire mosquito, swamp worm / tyrant leech
MONS:    shambling mangrove, spriggan druid / fenstrider witch w:2
NSUBST:  10 = 2:., % = 1:d / 1:dde / 1:| / 1:* / *:%
NSUBST:  ' = 2:w / 2:tw / 2 = W. / *:W, " = 2 = tw / 2 = W. / *:W
NSUBST:  x = 2:. / 2:t / *:x, X = 2:x / *:t
TILE:    x = wall_brick_vines
: elseif you.in_branch("Vaults") then
MONS:    redback / boulder beetle / wolf spider w:2 / tarantella w:2
MONS:    swamp worm perm_ench:glowing_shapeshifter / \
         steelbarb worm perm_ench:glowing_shapeshifter
MONS:    entropy weaver, ironbound preserver / necromancer
NSUBST:  0 = 1:. / *:0, % = 1:ddde / 3:% / *:.
CLEAR:   X
: else -- Depths
MONS:    orb spider perm_ench:glowing_shapeshifter / \
         swamp worm perm_ench:glowing_shapeshifter
MONS:    spriggan rider, spark wasp
MONS:    spriggan berserker / lich / alderking w:2
NSUBST:  10 = 2:3 / 1:2, % = 1:| / 1:* / 1:e / * = *%%
SUBST:   W = ., X = x
: end
ITEM:    throwing net q:1 no_pickup / rapier ego:venom no_pickup w:12 / \
         scimitar ego:venom no_pickup w:8 / \ any hex wand charges:8 no_pickup / \
         potion of ambrosia q:1 w:3 pre_id / potion of curing w:3 pre_id / \
         fen folio w:3 / my sojourn through swampland w:3 / \
         dart ego:curare no_pickup w:3 / scarab talisman
ITEM:    throwing net q:2 no_pickup / quick blade ego:venom randart w:12 / \
         swamp dragon scales randart / potion of ambrosia q:2 w:3 pre_id / \
         potion of curing w:3 q:3 pre_id / hive talisman / \
         randbook numspells:6 spells:launch_clockwork_bee&&summon_forest w:6
KFEAT:   y = x
NSUBST:  0 = 3:1 / 2:2 / 1:3 / 1:. / * = 11223
TILE:    y = wall_wax
MAP
        XXXXXXX
       XXXXXXXXX
      xxc4c%c4cxx
     Xx1.......2xX
     Xx...y.y...xX
   XXx%..0...0..%xXX
  Xxxx"..x...x.."xxxX
 Xx.."xx"....."xx"..xX
 X%.x.."xxx3xxx"..x.%X
XX....x."xxxxx".x....XX
Xx.A.W....%x%....W.A.xX
Xx...WW...xxx...WW...xX
Xx.B.WW.Z.x%x.Z.WW.B.xX
Xx0..W..x'''''x..W..0xX
Xx'C..x.x''z''x.x..C'xX
Xx0....0x.xxx.x0....0xX
 Xx.D..xx''1''xx.D..xX
 Xx0...xx'''''xx...0xX
  Xxx0%xxx+x+xxx%0xxX
   XxxxxX'''''XxxxxX
     XXX  @@@  XXX
ENDMAP

NAME:    darby_bombarded_bulwark
TAGS:    no_monster_gen
DEPTH:   D:3-7, Depths
: if you.in_branch("D") then
MONS:    bombardier beetle
MONS:    orc wizard w:20 / orc wizard band w:15 / orc band / orc w:5
KITEM:   any weapon ego:flaming w:18 / parchment disc:fire w:18 / \
         wand of flame w:18 / scarab talisman w:18 / \
         ring of protection from fire w:18 / manual of fire magic w:15 / \
         fire dragon scales w:15 / pair of gloves ego:fire w:5 / \
         staff of fire w:5 / orb ego:pyromania w:5
: elseif you.in_branch("Depths") then
MONS:    balrug, fire giant / fire dragon
ITEM:    any weapon ego:flaming good_item w:21 / dragon-coil talisman w:21 / \
         randbook disc:fire numspells:2 w:21 / manual of fire magic w:18 / \
         fire dragon scales good_item w:15 / \
         pair of gloves ego:fire good_item w:5 / \
         any magical staff randart artprops:Fire w:5 / \
         orb randart artprops:fire w:5
: end
SHUFFLE: Pp / Qq / Rr
SUBST:   } = }., P = @, QqRr = T, t = lt, l = .l, T = tT, pL = l
NSUBST:  ? = 1:1 / 1:. / * = 12., 2 = 1:2. / *:2
CLEAR:   T
COLOUR:  t = brown
FTILE:   ' = floor_vault
TILE:    c = wall_stone_scorched
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "broken pillar")
MAP
 xxx    TppPpTT
xxWx   TcccccccT
xWW....lcLttlLcT
 W2..tlLcl...lcTTT
WW..tccccl.G.tccccT
 WW.tctlt..?..tlLcq
 ''..c..........lcq
@''..+..G1.}.?GdtcQ
 ''..c..........tcq
 WW.tcltt..?..llLcT
WW2.tcccct.G.lccccT
WWW..tlLcl...lcTTT
 WWx...lcLlttLcT
xWxx   TcccccccT
xxx     TTrRrrT
ENDMAP

###############################################################################
#
# <<2>> Vertebrae
#       Mammals, reptiles, also dragons, serpents.
#
###############################################################################

NAME:  minmay_lizard_pond
TAGS:  transparent
DEPTH: D:1-2
KMONS: 1 = frilled lizard
KFEAT: 1 = W
SUBST: W = WWW1
MAP
 ......
..WWWW.
.WWWWW..
.WWWWWW.
.WWWWWW.
..WWWW..
 ......
ENDMAP

NAME:  minmay_rat_gold_closets
TAGS:  transparent
DEPTH: D:1-2
MONS:  rat
SUBST: 1 = 111$
MAP
.............
.x+x+x+x+x+x.
.x1x1x1x1x1x.
.xxxxxxxxxxx.
.x1x1x1x1x1x.
.x+x+x+x+x+x.
.............
ENDMAP

NAME:  minmay_rat_hole
DEPTH: D:2-4
MONS:  rat, quokka
ITEM:  stone / nothing w:30
KFEAT: C = cache_of_baked_goods
MAP
 xxx
xxCx
xddxx
xdddxxxx
xxxx211xx
  xx1111x
  x11111x
  x11111x
  xx11xxx
   xx@x
ENDMAP

NAME:  minmay_snake_closets
TAGS:  no_monster_gen no_item_gen transparent
DEPTH: D:2-4
MONS:  adder / ball python
ITEM:  any scroll / any potion
SUBST: ? = 111d
MAP
   xxxxxxx.@.xxxxxxx
   x.?x..+...+..x?.x
   x..x?.x...x.?x..x
xxxx+xxxxx...xxxxx+xxxx
x..+.....x...x.....+..x
x?.x.....x...x.....x.?x
x+xx?....+...+....?xxxx
x?.x.....x...x.....x.?x
x..+.....x...x.....+..x
xxxx+xxxxx...xxxxx+xxxx
   x..x?.x...x.?x..x
   x.?x..+...+..x?.x
   xxxxxxx.@.xxxxxxx
ENDMAP

NAME:   goddamned_bats
DEPTH:  D:4-5
# Sadly, for size-based ones, only mega, micro and giga exist.  Lack of kilo
# and tera is understandable, but come on, even mili is lacking.
KMONS:  1 = bat name:megabat n_rpl n_des n_spe n_noc hd:2 tile:mons_megabat
KMONS:  2 = bat name:microbat n_rpl n_des n_spe n_noc col:magenta tile:mons_microbat
KMONS:  4 = bat name:giga n_adj n_des n_spe n_noc hd:4 col:brown tile:mons_gigabat
# Way harder than the rest here.
KMONS:  5 = vampire bat
# In RL, they sit put, not moving a finger.  Lazy bastards.
KMONS:  6 = bat draugr name:skeletal_bat n_rpl n_des n_spe n_zom ; dagger plus:-4
# The only here without a basis in reality.
KMONS:  7 = bat simulacrum name:ice_bat n_rpl n_des n_spe n_zom
# There are actual "ghost bats" too, but near-extinct, while ghost-faceds
# have a number of species and are widespread.
KMONS:  8 = spectral bat name:ghost-faced_bat n_rpl n_des n_spe n_zom
# Just an US WW2 military project, but that's good enough.
KMONS:  9 = fire bat
KMONS:  0 = bat zombie name:rotten_bat n_rpl n_des n_spe n_zom
# Correction, this one, added because of a tile, is not real as well.
KMONS:  3 = bat name:phase n_adj n_des n_spe col:lightgreen \
            spells:blink.29.natural tile:mons_phase_bat
MAP
       xxxxx
      xxxxxxx
     xxxx7xxx
    xxxxx.xxx
   xxx9..xxx
  xxx9..0xxx
  xx.9..xxxxx
  xxx....xxxx
  xx88.xx.xxxx
  xxxxxxxx.xxxx
 xxxxxxxxx.33xx
xxx.4xxxx..x..xx
xxx12.xxx.xx...xx
xxxx.xxx.xxxx6..x
xxxxx.xx.xxxx66.x
xx11.x...xxxxx.xxx
xxxxxxx...xxxxx.xx
 xxxx22xx.xxxxx5xx
  xxxxxxx.xxxxxxx
    xxxx@xx
ENDMAP

NAME:   saegor_snake_ambush
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:3-5
KMONS:  S = w:3 adder / w:4 ball python / w:5 plant / nothing
KFEAT:  SX = W
KITEM:  X = gold, serpent talisman
KPROP:  W = no_tele_into
MAP
.xxxxxx.@..
.xxWStxx+xx
@+SttctWStx
.xWtctWttWx
xxtWtWtctSx
xtctWXWtctx
xStctWtWtxx
xWttWtctWx.
xxSWtcttS+@
xx+xxtSWxx.
..@.xxxxxx.
ENDMAP

# This vault can be highly OOD, which is why lindwurms are used in the
# first place; unlike most dragon-types, lindwurms are flightless.
# The no_trap_gen tag prevents teleport traps (or shafts) that might set
# the lindwurms free.
NAME:   minmay_lindwurm_lava
TAGS:   no_monster_gen no_trap_gen transparent no_descent
DEPTH:  D:8-, Lair:2-
KMASK:  '*|1> = opaque
KPROP:  '*|1> = no_tele_into
KMONS:  1 = lindwurm
KITEM:  1 = *
SUBST:  L : ..Ll
SUBST:  L = ..l
KFEAT:  ' = floor
NSUBST: | = 1:> / *:|
KITEM:  > = |
: if you.at_branch_bottom() then
KFEAT:  > = escape_hatch_up
: else
KFEAT:  > = escape_hatch_down
: end
MAP
          ....
      .....LL.....
    ....LLLllLLL....
   ...LLllllllllLL...
  ...LllllllllllllL...
  ..LllllllllllllllL..
 ..LllllllllllllllllL..
 ..Lllllll''''llllllL..
 .Llllll'''xx'''lllllL.
 .Llllll''xxxx''lllllL.
..Lllll''x'1*'x''llllL..
.Llllll'xx*||1xx'lllllL.
.Llllll'xx1||*xx'lllllL.
..Lllll''x'*1'x''llllL..
 .Llllll''xxxx''lllllL.
 .Llllll'''xx'''lllllL.
 ..Lllllll''''llllllL..
 ..LllllllllllllllllL..
  ..LllllllllllllllL..
  ...LllllllllllllL...
   ...LLllllllllLL...
    ....LLLllLLL....
      .....LL.....
          ....
ENDMAP

NAME:  pond
TAGS:  no_monster_gen
DEPTH: D:10-, Lair
KMONS: p = plant w:30 / fungus
: if you.in_branch("D") then
:   if you.depth() < 13 then
MONS:  bullfrog / water moccasin / river rat / cane toad w:2 \
       / blink frog w:2 / komodo dragon w:2
MONS:  vampire mosquito / swamp drake w:3
# For earlier Dungeon and Lair, 50% chance of a Lair set or a Swamp set.
SUBST: 1 : 12
:   else
# For post-Lair Dungeon, always use the Swamp set.
MONS:  vampire mosquito / swamp drake w:2 / swamp dragon w:3 / hydra w:3 / \
       will-o-the-wisp w:2
:   end
# Lair
: else
:   if you.depth() < 4 then
MONS:  bullfrog / water moccasin / river rat / blink frog / cane toad / \
       komodo dragon
MONS:  vampire mosquito / swamp drake w:3 / swamp dragon w:1 / hydra w:1
:   else
MONS:  blink frog / cane toad / komodo dragon / torpor snail w:5
MONS:  vampire mosquito / swamp drake w:3 / swamp dragon w:2 / hydra w:2 \
       / will-o-the-wisp w:1
:   end
SUBST: 1 : 12
: end
SUBST: ! : w., 1 = 1., 2 = 2., . = . p:1
KFEAT: p = W
MAP
..wwwww...
.wwwwwwww1
.wwwwwwwww
.1wwwwwwww
..ww111ww.
.wwww111w.
wwww!p11ww
www!!!*ww.
.ww!!!wpw.
.1w!!!ww1.
....!!w...
ENDMAP

# Not Minivault 9 (or, hellephant zoo)
NAME:    not_door_vault_due
TAGS:    allow_dup luniq vaults_hard
DEPTH:   D:13-, Elf, Vaults, !Vaults:$, Crypt, Depths, Zot, Dis, Geh
WEIGHT:  4
# Hellish beasts for Dungeon
: if you.in_branch("D") then
KMONS:   1 = hell hound
KMONS:   2 = hell hog
NSUBST:  2 = 2=2 / 2223 / 3
# Elf and Zot have a sort of "chaos zoo"
: elseif you.in_branch("Elf") then
KMONS:   1 = very ugly thing / apocalypse crab w:3 / shapeshifter hd:12 / \
             glowing shapeshifter
NSUBST:  2 = 2=1 / 13 / 3
# Remaining non-Zot branches: hell knights, balrugs and hellions, and multiple
# hellephants.
: elseif you.in_branch("Vaults") then
KMONS:   1 = hell knight
KMONS:   2 = hellion / balrug
KMONS:   3 = hellephant
NSUBST:  2 = 2=1 / 23 / 3
:  vaults_hard_standard(_G)
: elseif you.in_branch("Crypt") then
KMONS:   1 = hell knight
KMONS:   2 = hellion / balrug
NSUBST:  2 = 2 / 2=23 / 3, 1 = 2=12 / 1
: elseif you.in_branch("Depths") then
KMONS:   1 = hell knight
KMONS:   2 = hellion / balrug
NSUBST:  2 = 3=23 / 3, 1 = 2 / 3=12 / 1
: elseif you.in_branch("Zot") then
# Chaos zoos.
KMONS:   1 = very ugly thing / apocalypse crab w:5 / shapeshifter hd:14 / \
             glowing shapeshifter / protean progenitor / killer klown
KMONS:   2 = killer klown
NSUBST:  2 = 2=23 / 3
: elseif you.in_branch("Geh") or you.in_branch("Dis") then
KMONS:   1 = hell knight / hellion / balrug
SUBST:   2 = 3
: end
KMONS:   3 = hellephant
: door_vault_setup(_G)
MAP
..............
..............
..aaaaaaaaaa..
..a++++++++a..
..a++++++++a..
..a++1111++a..
..a++1221++a..
..a++1221++a..
..a++1111++a..
..a++++++++a..
..a++++++++a..
..aaaaaaaaaa..
..............
..............
ENDMAP

# A plain guardian serpent vault. (nrook)
NAME:  nrook_guardian_serpent_ordinary
DEPTH: D:11-, Snake, Crypt
TAGS:  no_monster_gen no_item_gen transparent
: if you.in_branch("Crypt") then
TAGS:  extra
MONS:  patrolling spectral guardian serpent
SUBST: x = c
: else
MONS:  patrolling guardian serpent
: end
: if crawl.x_chance_in_y(you.absdepth() - 13, 4) then
SUBST: ' = 1
: else
SUBST: ' = .
: end
MAP
......
.xxxx.
.x**x.
.x**x.
.xx+x.
..'10.
ENDMAP

# A real vault behind a false one. (nrook)
NAME:  nrook_guardian_serpent_double
TAGS:  no_monster_gen transparent
DEPTH: D:11-, Snake
MONS:  patrolling guardian serpent
KMASK: *| = opaque
KPROP: *| = no_tele_into
: if crawl.x_chance_in_y(you.absdepth() - 13, 4) then
SUBST: ' = 1
: else
SUBST: ' = .
: end
MAP
.......
.ccccc.
.c*|*c.
.ccxcc.
.n%%%n.
.n%%%n.
.cc+cc.
..'10..
ENDMAP

# Things aren't always what they seem (Lemuel)
#
# Slight tweak by having a fraction (unknown to the player) of items be
# real. (dp)
NAME:   fake_guardian_serpent_vault
TAGS:   transparent
DEPTH:  D:12-, Depths, Elf, Snake
WEIGHT: 5
MONS:  patrolling guardian serpent
: if you.in_branch("Depths") then
KMONS:  D = quicksilver dragon
KITEM:  D = $ q:55 / barding good_item w:5
NSUBST: d = 1:D / *:d
: end
ITEM:  any good_item / any mimic, any good_item w:1 / any mimic w:3, any mimic
: if crawl.x_chance_in_y(3, 5) then
SUBST: d = e
: elseif crawl.one_chance_in(2) then
SUBST: d = f
: end
MAP
...........
.xxxxxxxxx.
.xdddddddx.
.xdddddddx.
.xddd1dddx.
.xdd.0.ddx.
.xxxx+xxxx.
...........
ENDMAP

NAME:   minmay_serpent_palace
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  Depths
MONS:   salamander w:2 / naga ritualist w:8 / naga mage w:4
MONS:   nagaraja / guardian serpent, salamander mystic / salamander tyrant
MONS:   mana viper w:5 / anaconda / anaconda simulacrum w:5 / sea snake
MONS:   lindwurm, quicksilver dragon
SUBST:  c : cv
NSUBST: 3 = 1:6 / 2:3 / 5:4 / 8 = 444... / *:.
NSUBST: 2 = 1:6 / *:2, 1 = 1:2 / 1:12 / 4:. / *:11.
KMASK:  5 = opaque
MAP
...............................
.ccccccccccccccccccccccccccccc.
.c3+33.33c..3..3..2....3.c%%%c.
.c1ccccc1c.2...1.3.1.3.2.c%%%c.
.c.c$$$c3c.3.3..2.......3c%%%c.
.c1c$$$c3c....13...3.1...ccc+c.
.c3c$$$c.c3.1.....1..3.3.1332c.
.c1c2ccc3c....3.13....1.cccccc.
.c.c.3313c.3.1......1.3.c3313c.
.c3ccccccc1...3.....3...c3cc3c.
.c33.313....3.....3...1.c2|c3c.
.c1.31..3.3..ccc++ccc...cccc+c.
.c32..33.1.33c5l..l5c..1.2.1.c.
.cccccccccccccll..llcccccccccc.
...............................
ENDMAP

NAME:   roderic_batcave
TAGS:   no_monster_gen extra transparent
DEPTH:  D:3-, Lair, Orc
: local d = you.absdepth()
: if d < 7 then d = 0 end
: mons("bat w:60 / vampire bat w:" .. d .. " / nothing w:10")
MONS:  obsidian bat
SUBST:  ? : x@
SUBST:  1 = 1:10 .:1
: if you.in_branch("Orc") then
NSUBST: 1 = 1:2 / 1:* / *:1
: end
MAP
  xxxx?xx
 xxx1..xxxx
xxx1...1xxx
xx11...11xx
xxx1...1xxx
 xxx..1xxx
  xx@xxx
ENDMAP

NAME:   nicolae_underground_beach
DEPTH:  D:2-
TAGS:   no_trap_gen no_pool_fixup
SUBST:  N = MO, M = bW, O = wW
: if you.absdepth() > 9 then
SUBST:  b = SBB
KPROP:  B = bloody
SUBST:  B = S
NSUBST: S = 3:v / *:S
: dgn.delayed_decay(_G, 'v', 'human corpse')
NSUBST: w = 4:j / *:w
KMONS:  j = water elemental
KFEAT:  j = w
: else
SUBST:  b = S
TAGS:   no_monster_gen
: end
SUBST:  E = .S
COLOUR: Sv : brown
FTILE:  vSwWj = floor_sand
SUBST:  S = .
MAP
      xxxxx
    xxxMNOxxx
   xxbbMNOwwxx
xxxxbbbMNOwwwx
.EEEbbbMNOwwwx
@EEEbbbMNOwwwx
.EEEbbbMNOwwwx
xxxxbbbMNOwwwx
   xxbbMNOwwxx
    xxxMNOxxx
      xxxxx
ENDMAP

NAME:    hangedman_aviary
TAGS:    no_rotate no_hmirror no_pool_fixup transparent
DEPTH:   D:12-, Depths
MONS:    tengu warrior, harpy, tengu reaver, caustic shrike / chonchon w:5
: if you.in_branch("D") then
SUBST:   3 = 2
: else
SUBST:   2 = 4, " = *|
SHUFFLE: wW / ll
: end
KMASK:   wWl = no_monster_gen
MAP
cccccccWW.@@.WWccccccc
c32..1ccW.xx.Wcc1..23c
cc.ww.%c......c%.ww.cc
 c*.ww.cc....cc.ww.*c
 cc*.w..........w.*cc
  cc"1.cc.xx.cc.1"cc
   cccccW.@@.Wccccc
ENDMAP

NAME:   introduction_to_nature_1
TAGS:   no_monster_gen no_pool_fixup uniq_introduction_to_nature transparent
DEPTH:  D:8-13
WEIGHT: 3
ITEM:   any potion
ITEM:   young poisoner's handbook / fen folio / \
        randbook disc:Alchemy slevels:8 w:5 / \
        randbook numspells:4 title:Nature \
        spells:summon_small_mammal&call_canine_familiar&hailstorm&summon_forest / \
        randbook numspells:3 title:Nature \
        spells:mercury_arrow&stone_arrow&hailstorm&summon_forest
KITEM:  f = dart ego:poisoned / dart ego:curare / dart ego:atropa
KITEM:  g = quill talisman randart, any potion q:2
MONS:   plant, oklob sapling, ball python
MONS:   adder, oklob plant, water moccasin
KMONS:  7 = hornet
KMONS:  8 = scorpion
KMONS:  9 = hound / jackal
KMONS:  & = bush
KFEAT:  78 = W
KFEAT:  ' = shaft trap
KFEAT:  ~ = alarm trap / floor
KFEAT:  ` = web trap / floor w:30
: if you.absdepth() < 11 then
SUBST:  m : 1twx, 5 = 25, 7 = 78
: else
SUBST:  ? = 6
: end
: if crawl.coinflip() then
SHUFFLE: def
: end
# a bit inelegant but KMASK applies after the shuffle, if it happens:
KMASK:  'def = opaque
SUBST:  & = wwwW&1
SUBST:  x : xxxcc
MAP
 tttttttttt@1
 teWWtwwww+tt`w1
wt~xWWWxxxxtw`Ww1
wt6xxxx77+dtwwwWx
wtt+3?xxxxttwWW1x
w1434.x'x'ft5wxxx
w1.4.mwxwxttWwgx
.w1..mmxxxWWww.x
..w33.Ww2Wwww.4x
.4....3wwww.3.xx
 ..........3.&1
   @9.......11
    ...1.
ENDMAP

NAME:   introduction_to_nature_2
TAGS:   no_monster_gen no_pool_fixup uniq_introduction_to_nature
DEPTH:  D:8-13
ITEM:   any potion
ITEM:   young poisoner's handbook / fen folio / \
        randbook disc:Alchemy slevels:8 w:5 / \
        randbook numspells:4 title:Nature \
        spells:summon_small_mammal&call_canine_familiar&hailstorm&summon_forest / \
        randbook numspells:4 title:Nature \
        spells:mercury_arrow&stone_arrow&hailstorm&summon_forest
KITEM:  f = dart ego:poisoned / dart ego:curare / dart ego:atropa
KITEM:  g = quill talisman randart, any potion q:2 / any potion q:3
MONS:   plant, oklob sapling, ball python
MONS:   adder, oklob plant, water moccasin
KMONS:  7 = hornet
KMONS:  8 = scorpion
KMONS:  9 = hound / jackal band
KMONS:  & = bush
KFEAT:  78 = W
KFEAT:  ' = shaft trap
KFEAT:  ` = web trap / floor w:60
: if you.absdepth() < 11 then
SUBST:  m : 1twx, 5 = 25, 7 = 78
: else
SUBST:  T = tx, ? = 6
: end
: if crawl.coinflip() then
SHUFFLE: def
: end
SUBST:  & = ww&&1
SUBST:  x : xxxcc
SUBST:  z : wW
MAP
        tttttttttt@
      tttwg1tetwtttt
   ttttw12w5tt't4..xxxxxxxx
  1tttwwwWwwtttt.34..x>``7x
...twww1ww1ttw....x.`x````x
..9t1wwwwWwwtw.3....`&```fx
....tWwwWWwwtx....x.`x````x
@...twWWwWwwW+.......x```7x
 ...ttwwwWwWtx..3..xxxxxxxx
 ..4t3tttwWttwWWWW33tttx
 .wwt4t?1WwtwwwwWwtt1ttt
  zzttdtWtttttwwwwwt1.tt
   wz1tttt   ttwwwwtt6tt
   ttttttt       1wwtttt
                  @ ttt
                      t
ENDMAP

NAME:    hangedman_parallel_progression
TAGS:    patrolling no_monster_gen transparent
TAGS:    layout_rooms layout_corridors
DEPTH:   D:11-
MONS:    rat, bat, frilled lizard, dart slug, endoplasm
MONS:    clockroach, jackal
KMONS:   8 = ball python / adder w:8
KMONS:   A = river rat
KMONS:   B = vampire bat / fire bat w:8
KMONS:   C = iguana / basilisk w:8
KMONS:   D = ribbon worm / tyrant leech
KMONS:   E = jelly
KMONS:   F = scorpion
KMONS:   G = hound / wolf w:3
KMONS:   H = water moccasin
KMONS:   I = hell rat
KMONS:   J = unseen horror
KMONS:   K = alligator
KMONS:   L = lindwurm
KMONS:   M = large slime creature
KMONS:   N = demonic crawler
KMONS:   O = hell hound
KMONS:   P = black mamba
KITEM:   IJKLMNOP = any, any / gold w:5 / nothing
SHUFFLE: 1AI / 2BJ / 3CK / 4DL / 5EM / 6FN / 7GO / 8HP
MAP
xxxx+xxx    xxxx+xxx    xxxx+xxx    xxxx+xxx
x1x..xIx    x2x..xJx    x3x..xKx    x4x..xLx
x11.xxAx    x22.xxBx    x33.xxCx    x44.xxDx
xAx%%xAx    xBx%%xBx    xCx%%xCx    xDx%%xDx
xAxx.11x    xBxx.22x    xCxx.33x    xDxx.44x
xIx..x1x    xJx..x2x    xKx..x3x    xLx..x4x
xxx+xxxx    xxx+xxxx    xxx+xxxx    xxx+xxxx
ENDMAP

NAME:    hangedman_misty_isle
TAGS:    transparent no_monster_gen no_pool_fixup patrolling
DEPTH:   D:7-11
KMONS:   123 = sky beast
KMONS:   56 = steam dragon
KITEM:   15% = any / gold
KITEM:   36 = gold, star_item
KFEAT:   F = shallow_water
SHUFFLE: Ww, aA, bB, cC, dD
SUBST:   abcd = ., ABCD = x, X = xx.
MARKER:  F = lua:fog_machine {cloud_type = "thin mist", \
             pow_min = 5, pow_max = 12, delay_min = 28, delay_max = 42, \
             size = 2, spread_rate = 2, start_clouds = 1 }
MAP
   ..........
  ...a....b...
 ...AWWWWWWB...
...XFwwwwwwFB..
..AWWw.x2.wwWb.
.aWww.16x%.wW..
..Ww..xxx..wW..
..Ww.%x35.wwWd.
.cWww.4x.wWWD..
..CFwwwwwwFX...
...CWWWWWWD...
 ...c....d...
  ..........
ENDMAP

NAME:  guppyfry_early_lair_pool
TAGS:  patrolling no_monster_gen transparent
DEPTH: D:2-5
KMONS: 2 = adder
KMONS: 3 = plant
ITEM:  any potion / gold / stone / nothing
SUBST: - = wwwwwwWWW
KMASK: W = opaque
KPROP: W = no_tele_into
SUBST: . = ........33
SUBST: ? = ..wwwtt33%%d222
: if you.absdepth() < 4 then
SUBST: 2 = .
: end
MAP
............
....?--?....
..?-----?...
..--------..
.----------.
.----------.
..-------...
...-----....
...?---?....
.....?--?...
......?-?...
............
ENDMAP

NAME:   argonaut_fire_from_heaven
TAGS:   transparent
DEPTH:  Depths:2-
KMASK:  T = opaque
KMONS:  T = titan
KMONS:  2 = caustic shrike
KFEAT:  m = iron_grate
KITEM:  T = randbook disc:fire, gold good_item
KFEAT:  T = <
NSUBST: 2 = 1:2 / 1:. / * = 2.
KPROP:  T = no_tele_into
MAP
..xxxxxxx.@
..........x
xxxxx2....x
xcccx...2.x
xcTm..2..Cx
xcccx...2.x
xxxxx2....x
..........x
..xxxxxxx.@
ENDMAP

# Medium trappings still informed by Topsell, I guess.
NAME:   argonaut_gorgonesque
TAGS:   no_monster_gen
DEPTH:  D:12-, Shoals
MONS:   harpy, basilisk, catoblepas
KMONS:  P = withered plant
ITEM:   kite shield ego:reflection pre_id / \
        buckler ego:reflection pre_id w:1 / \
        tower shield ego:reflection pre_id w:1
ITEM:   stone
NSUBST: H = 4:G / 2:G. / *:e
MAP
     xxxxxxx
   xxxx1x.xxx
  xxxxxx2xxxxxx
 xxx.H.....H.xxx
xxx.....H.....xxx
x.x.....3.....x1x
xx2.....H.....2xx
x1x..H..d..H..x.x
xxx.....G.....xxx
 xxx.........xxx
  xxxxHx.xHxxxx
   xxxxx.xxxxxx
    xxx.Gxxxx
      xxPxx
       @..
ENDMAP

NAME:   wander_ebering_terrifying_dragon_lair
TAGS:   no_monster_gen
DEPTH:  D:1-3
MONS:   frilled lizard
ITEM:   human skeleton
NSUBST: $ = $ / 4=$.. / *:.
NSUBST: D = 3:d / 3=d.. / *:.
NSUBST: E = e / 2=e. / .
: dgn.delayed_decay(_G, 'e', 'human corpse')
MAP
   xxxxx
  xx...xx
 xxDxx..xx
xxDxxxxDDxx
xE$$$xxx.Dx
xE$1$xx..xx
xx$$$Dx..x
 xEEExxDDx
 xxxxx..xx
  xxDD.xx
   xxx@x
ENDMAP

NAME:    hangedman_snake_sidewinding
TAGS:    allow_dup
DEPTH:   Snake, !Snake:$, Zot, !Zot:$
: if you.in_branch("Zot") then
KMONS:   A = base draconian / green draconian w:4
KMONS:   B = fire dragon w:5 / ice dragon w:5 / storm dragon / shadow dragon
KMONS:   C = nonbase draconian / draconian annihilator
KMONS:   D = golden dragon / quicksilver dragon / wyrmhole
: else
KMONS:   A = naga warrior / naga mage
KMONS:   B = mana viper / anaconda
KMONS:   C = nagaraja / naga sharpshooter
KMONS:   D = guardian serpent / shock serpent
: end
SHUFFLE: @123<= / &456"-, EF
SUBST:   = = +, 1 = A, 2 = B, 3 = C, < : ~~_..., &E = x, - = c
SUBST:   456 = ', "F = ., y : x:2 G:1 .:6, Y : z', Z : z', z : xc
NSUBST:  * = **|, ~ = 1:( / 1:(<.., _ = 1:) / 1:)>.
KMASK:   '%*d = no_monster_gen
MAP
x@@xxxxxxxxxxxxxxxxxxxx
x""xxcccccccccccccccccx
x..xxxcc13121'''%%%**cx
xy..A%c--32z'''Z''BD*cx
xy...B%--c1'1z'''z'B%cx
x4.xxxxxccc''z''zYz'%cx
x..xxEExxccc'''zYz''%cx
xy...EE.A%ccc'''z''Z'cx
xy...FF..B%ccc'''''''cx
x4.xxFFxxxxxccc''zz''cx
x1.xxEExxEExxccc''4'4cx
xy...EE..EE.A%ccc''z5cx
xy...FF..FF..B%ccc454cx
x..xxFFxxFFxxxxxccc66cx
x1.xxEExxEExxEExxc==4cx
xy...EE..EE..EE.A%==ccx
xy...FF..FF..FF..B%cccx
x..xxFFxxFFxxFFxxxxxccx
x<<xxxxxxxxxxxxxxxxxxcx
x&&xxxxxxxxxxxxxxxxxxxx
ENDMAP

# I'd apologize for this pun, but I'm not actually sorry.
NAME:    nicolae_half_adder
TAGS:    transparent patrolling
DEPTH:   D:2-6
KMONS:   1 = adder
KFEAT:   !O = c
SHUFFLE: pqrs/O!!O/!O!O/!!O!
SUBST:   pqrs = O
: nsubst( "1 = " .. you.depth() .. "=1 / 1=1. / ." )
TILE:    ! = WALL_STONE_SMOOTH
TILE:    O = DNGN_STONE_DARK
COLOUR:  ! = white
COLOUR:  O = magenta
MAP
.....................
..p.........c.c....1.
.pppppppppppcpcc..r..
..p.p.1..1..1.%ccrrr.
.1...p....qqcqcc..r..
....1.p..q.1c.c..1...
.......pq............
.......qp............
....1.q..p.1cccc.1...
.1...q....ppccccc.s..
..q.q.1..1..1.%ccsss.
.qqqqqqqqqqqccccc.s..
..q.........cccc...1.
.....................
ENDMAP

# TODO: Convert this to a decorative skeleton vault by letting corpses recieve
#       more monster data like hydra head count, and let it be a vault that
#       another adventurer went through already. Reduces the issues of
#       weaker hydras being freer experience and keeps actually-fighting Lerny
#       properly kept to the Swamp rune.
NAME:   nicolae_hydra_factorization
TAGS:   no_monster_gen no_trap_gen
DEPTH:  D:12-
WEIGHT: 0
veto {{
   return crawl.game_started() and dgn.br_exists("Swamp")
}}
# The final loot is geared towards 6-9 pieces of good stuff, including a
# guaranteed randart or two, because otherwise who would go in?
KITEM:  * = *
KITEM:  % = %
KITEM:  $ = $ q:1
KITEM:  s = | w:70 / gold good_item
KITEM:  S- = any armour randart / any weapon randart / any jewellery randart
KMONS:  Q = three-headed hydra
KMONS:  R = nine-headed hydra
KMONS:  S = Lernaean Hydra
KFEAT:  $%*|PQRS`s- = . / W w:5
KFEAT:  t = mangrove
NSUBST: O = s / O
SUBST:  L = tp, M = tq, N = tr, O = ts
NSUBST: p = 27:P / 7:$ / `, q = 9:Q / 5:% / `, r = 3:R / 3:* / `, s = S / - / s
KITEM:  P = one-headed hydra skeleton
MAP
ccccccccccc
cpppppppppccccccccc
cppLLpLLppcMqqqqqMccccccc
cpLLLpLLLpcqMMqMMqcrNrNrccccc
cpLLpppLLpcqMMMMMqcNrNrNcOsOc
+ppppLpppp=qqMtMqq=rNtNr=sssn@
cpLLpppLLpcqMMMMMqcNrNrNcOsOc
cpLLLpLLLpcqMMqMMqcrNrNrccccc
cppLLpLLppcMqqqqqMccccccc
cpppppppppccccccccc
ccccccccccc
ENDMAP

NAME:   tekkud_yamata_no_oroachi
TAGS:   no_monster_gen
DEPTH:  D:12-, !D:$, Lair, !Lair:$
MONS:   eight-headed hydra, patrolling clockroach, plant
ITEM:   long sword good_item / scimitar good_item w:6, human skeleton
KFEAT:  C = cache_of_fruit
SUBST:  ` = @'''', ' = x', " = x.
NSUBST: . = 4:2 / *:.
CLEAR:  '
MAP
     '   `
  `''x'''x''
 xx'xxx'xxx'
 'xxxCxxx'''
''xxe...xxxx`
'x'xd.1..xx'
 'xxx....3xx'
  'x"x..33x3
 `xxxx3x333
  'x'xx3x3@
     x3
ENDMAP

# A simply-themed but decorated pale ruin, once peaceful, left now
# to the scavenging pests endemic to the early game.
NAME:    darby_scavenged_remnants
TAGS:    no_monster_gen ruin_lair ruin_swamp
DEPTH:   D:1-8, Lair, Swamp
# The D version places scavengers that might be found rifling
# through old food. Lair and Swamp place normal spawns, as similar
# ruins are common in their normal level generation.
: if you.in_branch("D") then
:   if you.depth() == 1 then
MONS:    rat / endoplasm / dart slug
:   elseif you.depth() == 2 then
MONS:    rat / endoplasm / dart slug / ribbon worm
:   elseif you.depth() == 3 then
MONS:    rat / endoplasm / dart slug / ribbon worm / \
         bombardier beetle w:6 / clockroach w:6
:   elseif you.depth() == 4 then
MONS:    endoplasm / dart slug / ribbon worm / bombardier beetle / \
         clockroach / jelly / sleepcap / black bear
:   else -- D:5-8
MONS:    bombardier beetle / clockroach / jelly / sleepcap / \
         black bear / bes kemwar band
:   end
: end
: if you.in_branch("D") and you.depth() > 3 then
KMONS:   p = fungus / toadstool
: else
KMONS:   p = plant / pile of debris w:2
: end
KMONS:   D = pile of debris
KMONS:   s = sacred lotus
# Take a cue and scavenge the food and old books yourself.
ITEM:    any potion, any scroll / parchment
KFEAT:   z = c
KFEAT:   M = cache_of_baked_goods / cache_of_fruit
KFEAT:   + = broken_door
KFEAT:   ^ = web trap
NSUBST:  e = 2:e / *:!
SUBST:   G = GG., ? = .p, ! = .p^
: decorative_floor(_G, 'F', "broken floral vase")
: if you.in_branch("Lair") then
FTILE:   .cdempDFGMPV1@%^+> = floor_lair / floor_sprouting_stone
: elseif you.in_branch("D") then
FTILE:   .cdempDGMPV1@%^+> = floor_sprouting_stone / floor_pebble_lightgray
# decorative_floor recolors the tile below if possible, so avoid pebble floor.
FTILE:   F = floor_sprouting_stone
: else -- Swamp
SUBST:   . = W..
: end
TILE:    z = wall_studio
: random_stair(_G, ">")
: vault_granite_statue_setup(_G, "G", "broken pillar")
MAP
    ccccc
  cccezeccc
 cc!!.e.!!cc
 cF..?G?..Fc
cc!1G???G.!cc
ceM?..???.?ec
cz1G.?>?.G1zc
ce?.???..?Mec
cc!.G???G1.ccF..
 c!.?.G?..!+!.1?.
 cc!.?..!!ccFwww?.
 cc+c!F!ccc!.wsw%.
cc.!ccmcc  .?www?.
c!1dFc.     .???.
c!M1!+!.     ...
cc!!cc!.
 ccccF?.
    .@.
ENDMAP

# A breezy autumn forest, or demonic mockery thereof.
NAME:    darby_harvest_season
TAGS:    no_monster_gen no_pool_fixup
DEPTH:   D:1-4, Lair, Depths, Zot, Pan
# IX: Monsters on 1 need to be able to traverse water one way or another.
: if you.in_branch("D") then
:   if you.depth() == 1 then
KMONS:   1 = frilled lizard / ball python
KMONS:   2 = frilled lizard w:5 / ball python w:5 / quokka / dart slug
:   elseif you.depth() < 4 then
KMONS:   1 = frilled lizard / ball python / adder
KMONS:   2 = frilled lizard w:5 / ball python w:5 / \
             adder w:5 / quokka / dart slug
:   else
KMONS:   1 = ball python / adder
KMONS:   2 = ball python w:5 / adder w:5 / quokka / \
             dart slug / black bear w:35 / sleepcap w:35
:   end
: elseif you.in_branch("Lair") then
KMONS:   1 = bullfrog / water moccasin / cane toad w:12 / \
             komodo dragon / skyshark w:8 / hydra
KMONS:   2 = 0 w:25 / 9
: elseif you.in_branch("Depths") then
# It's a dry season underground, the autumn leaves burn easily.
KMONS:   1 = tengu conjurer band / tengu reaver
KMONS:   2 = spriggan air mage / spriggan berserker / spriggan defender
SUBST:   % = %**
: elseif you.in_branch("Zot") then
KMONS:   1 = moth of wrath / storm dragon / tentacled monstrosity
KMONS:   2 = death cob / moth of wrath w:5
SUBST:   % = **|
: elseif you.in_branch("Pandemonium") then
KMONS:   1 = reaper / nekomata w:5
KMONS:   2 = reaper w:5 / sin beast / executioner
SUBST:   % = *||
: end
: if you.in_branch("Pandemonium") then
# Submitted with crimson imps as pseudo-butterflies. Instead, have harvesters.
KMONS:   3 = red devil
: else
KMONS:   3 = butterfly
: end
KFEAT:   1 = w
SHUFFLE: TR
SUBST:   F = F., d = %w, e = 2%, T : tww, R = w
KPROP:   %*| = no_tele_into
: if you.in_branch("Zot") or you.in_branch("Pandemonium") then
KMONS:   F = withered plant
KFEAT:   tT = demonic_tree
COLOUR:  dw1 = green
# The autumnal and white demonic tree tiles.
TILE:    tT = dngn_demonic_tree_2 / dngn_demonic_tree_3 / \
              dngn_demonic_tree_4 w:5 / dngn_demonic_tree_5 w:5 / \
              dngn_demonic_tree_6 / dngn_demonic_tree_7 / \
              dngn_demonic_tree_14 w:20 / dngn_demonic_tree_15 w:20
: else
KMONS:   F = fungus / toadstool
COLOUR:  t = lightred / red / yellow / green
TILE:    t = dngn_tree_lightred / dngn_tree_red / dngn_tree_yellow / dngn_tree
: end
MAP
            t      t tt
 t   t tttt   ttttt   tt
tt       t  ttttttttt
t  ttttt   ttttttttttt t
  tttttttttttttF..3ttt
F.t.Fwttttttt...3.%.ttt
....wwwtwwwtF.wwwF.3ttt
@t.%wwwTTtRRwwwdww.Fttt
.F...ww1tttF.www1w.tttt
...t.Fwttttt...ww..ttt
   ttttttttttt....tttt t
  ttttttttFtttt.tttttF
t ttttttFt.ttF.tt.tt2. t
t tttt....t.ttt..tetF.tt
  ttt.2..ttt.2.tttttt.t
t ttt.Ft..t.ttt.t.tet.
t  tt.ttt.ttettt.F.tt@
   tt..tt.FtttFttttt..
tt  tt.tF.......tt...t
 tt  .....tF.Ft....t..
ENDMAP

# The dusty underground desert remnants of a lost village.
NAME:    darby_desolate_dusts
TAGS:    no_monster_gen
DEPTH:   D:1-10
WEIGHT:  7 (D:1), 10
: if you.depth() < 4 then
KMONS:   12 = jackal band / gnoll w:5
SUBST:   ? = .
: elseif you.depth() < 6 then
KMONS:   1 = scorpion / hound / howler monkey band / gnoll bouda band w:5
KMONS:   2 = jackal band / gnoll band w:5
SHUFFLE: !?
: else
KMONS:   1 = gnoll bouda band / gnoll sergeant band / howler monkey band
# Encountered in the open, but player is likely to retreat to a corridor
# to deal with the other monsters (and they're thematic).
KMONS:   2 = rock fish band
NSUBST:  ? = 2:2 / *:.
: end
KMONS:   p = fungus / toadstool / withered plant
KMONS:   D = pile of debris
# Species one might find underground, but not as enemies.
KITEM:   s = human skeleton / dwarf skeleton / oni skeleton
KFEAT:   ^ = shaft trap
KFEAT:   + = broken_door
NSUBST:  ! = 1:1 / *:., ? = 1:2 / *:.
SUBST:   X = D:1 `:5 .:5, " = "., . = .:20 ':20 p:2 ^:1 s:1, > = >..
MARKER:  F = lua:fog_machine { cloud_type = "sparse dust", \
             pow_min = 9, pow_max = 12, delay = 45, \
             size = 2, walk_dist = 1, spread_rate = 33 }
FTILE:   ' = floor_pebble_darkbrown
FTILE:   DX"` = floor_mud
: random_stair(_G, ">")
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
    ...
  ......    ...
 ........?.......
 .XXx+xX..........
..X""""X.........
..X"%""X.....G...
 .X"""FX.!..F....
 .XXXXXX.........
  ...............
  ?...!..>..!...?.
  ................
 ..........XXXXX...
...G.GF..!.XF%"x...
...........X"""+...
...........XXXXx..
 ................
 ........?.......
  ..   .........
          ....
ENDMAP

# An overgrown courtyard. Fast land animals hide in the underbrush.
NAME:    darby_ripple_courtyard
TAGS:    no_monster_gen ruin_lair
DEPTH:   D:1-3, Lair, Depths
: if you.in_branch("D") then
:   if you.depth() == 1 then
MONS:    ball python / quokka
:   else
MONS:    ball python / quokka / adder
:   end
ITEM:    any potion
# floor_grass is only for outdoor deployment, but it's believable that
# this might be at the bottom of a chasm to the sky above.
FTILE:   'tP12? = floor_grass
FTILE:   .cGUdp+ = floor_pebble_white
: elseif you.in_branch("Lair") then
MONS:    black mamba / bullfrog / water moccasin / cane toad
ITEM:    any potion / any potion q:2
FTILE:   .cGUdp+ = floor_lair / floor_sprouting_stone
: elseif you.in_branch("Depths") then
# In the Depths, it is instead an Erl-King's court.
MONS:    spriggan air mage / spriggan berserker / spriggan defender, alderking
ITEM:    any potion q:3
NSUBST:  ? = 1:2 / *:?
FTILE:   'tP12? = floor_grass_dark
FTILE:   .cdpGU+ = floor_sprouting_squares
: end
KMONS:   Pp = plant
NSUBST:  @ = 1:+ / *:@, ? = 1:1 / *:?
SUBST:   @ = c+, ? = 1P, ' = P'', p = p.
: if you.in_branch("Depths") then
TILE:    G = depths_column / depths_crumbled_column
: else
:   vault_granite_statue_setup(_G, "G", "broken pillar")
: end
: decorative_floor(_G, 'F', "garden patch")
MAP
   cccccc
 ccc....ccc     c@c
cc........ccccccc.c
c...GpGpGp........c
c.Gp''F'''Gp...pG.c
c.p'''W'?'''GpG'p.c
c.G'?'W''t''F'''G.c
c.p't'W'pdp'W'?'p.c
c.G'''Wt.U.tW'''G.c
c.p'?'W'p.p'W't'p.c
c.G'''F''.''W'?'G.c
c.p'GpG''.''W'''p.c
c.Gp...pG.''F''pG.c
c.........GpGpG...c
c.ccccccc........cc
c@c     ccc....ccc
          cccccc
ENDMAP

NAME:     darby_fish_out_of_rock
TAGS:     no_monster_gen no_pool_fixup
DEPTH:    D:6-10
KMONS:    1 = rock fish band / rock fish w:5
KMONS:    2 = kobold geomancer
KMONS:    F = fungus / toadstool
ITEM:     parchment disc:earth w:20 / tin of tremorstones w:8 / \
          wand of digging w:4 / granite talisman w:4 / staff of earth w:1 / \
          manual of earth magic w:4 / pair of boots ego:earth w:1 / \
          barding ego:earth w:1 / orb randart artprops:earth w:1
ITEM:     stone no_pickup / large rock q:1 no_pickup
KFEAT:    1X = x
SHUFFLE:  Aa / Bb, Aa / Aa / Cc
SUBST:    2 = 2.., F = FF., e = ee., AaBb = ., C = X, c = x
TILE:     1X = wall_pebble_brown
MAP
 xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxXXXXXXXXXXxxx
xxXXXX1wXXXw1Xxx
xxXXXewwwwwweXxx
xxXXe.wwdwww.Xxx
xxXX.Fww.wwF.Xxx
xxXF..ww.Fw.XXxx
xxX2..Fw....XXxx
xxXXF....eFBXXxx
xxXXXXe.FXXBBXxx
xxXXXXXAXXXXBBbb
xxXXXXXAXXXXXXxx
xxxXXXXAXXXXXxxx
xxxxxxxaxxxxxxxx
 xxxxxxaxxxxxxx
ENDMAP

###############################################################################
#
# <<3>> Humanoids
#       Goblins, gnolls, orcs, ogres etc. We include e.g. spriggans, centaurs.
#
###############################################################################

NAME:    minmay_goblin_outpost
TAGS:    no_pool_fixup transparent
DEPTH:   D:2-4
MONS:    goblin / hobgoblin w:5, goblin ; sling
KMASK:   >_"+2 = opaque
SUBST:   y = .WWw, Y = ...W, . = .....1
SHUFFLE: >X/_"
SUBST:   X = x, _ = +, " = @
MAP
   XXX
xxxx>xxxx
xxxx+xxxx
xwww2wwwx
xyywwwyyx
xYYYYYYYx
x.......x
x.......x
x.......x
@.......@
xxxxxxxxx
ENDMAP

NAME:   minmay_goblin_kobold_house
TAGS:   no_monster_gen
DEPTH:  D:2-4
MONS:   goblin / hobgoblin, kobold
SUBST:  . = 1%......
SUBST:  1 : 112
: decorative_floor(_G, 'p', "garden patch")
MAP
 xxxxxxx
xx.....xx
x.......x
x.......x
x.......x
xx.....xx
 xxx+xxx
  xp.px
  x.1.x
  xx+xx
ENDMAP

NAME:   minmay_sticks_and_stones
TAGS:   patrolling transparent
DEPTH:  D:8-
WEIGHT: 5
KMONS:  1 = Joseph / cyclops, \
            yaktaur ; quarterstaff . sling / cyclops
ITEM:   stone / club w:5 / large rock w:3 / quarterstaff w:1
NSUBST: . = 4:d / 4:. / * = d:30 .:150
MAP
.........
.........
.........
.........
....1....
.........
.........
.........
.........
ENDMAP

# Sigmund has been educating the oppressed masses in guerrilla warfare.
NAME:    sigmund_army
DEPTH:   D:4-7
: mons("gnoll ; " .. scythe() .. " . robe")
: mons("hobgoblin ; " .. scythe() .. " . robe")
: mons("orc ; " .. scythe() .. " . robe")
MONS:    Sigmund
SUBST:   n = 1:20 n:5
SHUFFLE: x+1 / x+1 / x+1 / y-5
SUBST:   - = y , y = 5, 5 = 1..
SUBST:   1 : 123444, 4 = 1223.., 1 = 1., 3 = 33.
veto {{ return you.uniques("Sigmund") }}
MAP
xxxxx
x1n1x
x111x
xx+xx
 ...
ENDMAP

NAME:  minmay_mini_ossuary
TAGS:  no_monster_gen no_item_gen transparent
DEPTH: D:4-8
MONS:  mummy, kobold zombie / orc zombie / hobgoblin zombie
MONS:  ogre zombie w:5 / centaur zombie / killer bee zombie
: if you.absdepth() > 6 then
SUBST: 2 = 3
: end
ITEM:  any scroll / any potion
MAP
........
.cccccc.
.c.1ddc.
.c.cccc.
.c.22.c.
.c2..2c.
.cc..cc.
........
ENDMAP

NAME:   minmay_orc_keep
TAGS:   vaults_room vaults_orient_n
DEPTH:  D:8-, Orc, Vaults
WEIGHT: 5 (Vaults), 10
: if you.in_branch("Vaults") then
MONS:   orc knight, orc warlord, orc sorcerer / orc high priest
SUBST:  % = $, @ = .
KMASK:  w = no_monster_gen
: elseif you.absdepth() > 11 then
MONS:   orc / orc warrior w:5, orc knight / orc warrior
MONS:   orc wizard / orc priest / orc sorcerer w:2 / orc high priest w:2
SUBST:  % = %*
: else
MONS:   orc, orc warrior / orc, orc wizard / orc priest
: end
: decorative_floor(_G, 'B', "orcish standard")
MAP
wwwB@Bwww
wcc+++ccw
wc1...1cw
wc.....cw
wc2...2cw
wc%3%3%cw
wc1%3%1cw
wcccccccw
wwwwwwwww
ENDMAP

NAME:   minmay_ogre_servants
DEPTH:  D:3-6
MONS:   ogre
NSUBST: " = 6:" / *:'
KITEM:  ' = large rock
KMONS:  "' = goblin
MAP
xxxxx
x"1"x
x"""x
x"""x
xx+xx
ENDMAP

# Very unpleasant kobold minivaults
NAME:   minmay_unpleasant_kobolds
TAGS:   transparent
DEPTH:  D:6-
MONS:   kobold ; dart ego:disjunction q:2 / w:3 kobold brigand ; dart ego:disjunction q:4
MONS:   kobold ; boomerang q:2 / w:3 kobold brigand ; boomerang q:4
MONS:   kobold ; dart ego:curare q:1 / \
        w:3 kobold brigand ; dart ego:curare q:2
MONS:   kobold blastminer
: if you.absdepth() > 13 then
SUBST:  1 = 3:100 4
: elseif you.absdepth() > 11 then
SUBST:  1 : 23
: elseif you.absdepth() > 7 then
SUBST:  1 : 12
: end
MAP
xx+xx
x111x
x111x
xx+xx
ENDMAP

# Elven Outpost
#   50-50 chance of spiral arms, 50-50 chance of a moat
NAME:    elves_outpost_lemuel
TAGS:    transparent no_pool_fixup
DEPTH:   D:11-, Orc, Elf
: if (you.in_branch("D") and you.depth() > 12) or you.in_branch("Elf") then
MONS:    deep elf pyromancer, deep elf knight / deep elf archer
MONS:    deep elf zephyrmancer / thermic dynamo w:4
NSUBST:  1 = 2 = %** / 2 = 1% / 3 = 11122 / 3 = 22333 / *:1
: else
MONS:    fire elemental / water elemental w:12
MONS:    deep elf pyromancer ; dagger . robe ego:fire_resistance . \
                               ring of protection from fire
MONS:    deep elf archer
NSUBST:  1 = 2 = %%* / 2 = 1% / 2 = 12 / 2 = 23 / *:1
: end
KMASK:   123"%*> = opaque
SHUFFLE: _? / bb, _' / ww
SUBST:   ?_'" = .
MAP
.?.....???..
?.'''__'''?.
?''__''''''.
?''bbbbbb_'.
._'b1111b_'.
._'"1111>'_.
.'_b1111b'_.
.'_bbbbbb''?
.''''''__''?
.?'''__'''.?
..???.....?.
ENDMAP

# Humans defending their loot
NAME:   minmay_ruffians
TAGS:   transparent
DEPTH:  D:6-10
MONS:   human; club | mace w:3 . animal skin | leather armour
MONS:   human; sling . animal skin | \
        leather armour
SUBST:  1 = 112.
KMONS:  3 = human; flail . ring mail | scale mail
KITEM:  3 = %
MAP
.........
.1.1.1...
.........
.x+xxx.1.
.x%%3x...
.xxxxx.1.
.........
ENDMAP

# Necromancer has a house with a fridge (and a nice garden) (Eino)
NAME:   eino_house_with_fridge
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:9-, Lair:2-
MONS:   patrolling necromancer, plant
: if you.branch() == "Lair" and you.depth() ~= dgn.br_depth(you.branch())
:   or you.branch() == "D" and you.depth () < 12 then
MONS:   river rat / wolf / yak / polar bear
MONS:   river rat simulacrum / wolf simulacrum / \
        yak simulacrum / polar bear simulacrum
: else
MONS:   hell rat / elephant / death yak / hydra
MONS:   hell rat simulacrum / elephant simulacrum / \
        death yak simulacrum / hydra simulacrum
: end
SUBST:  G = GG.
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
............
.xxxxxxxxxx.
.x444x..%%x.
.x444+..xxx.
.x444x...Gx.
.xxxxx.3.4x.
.....x.413x.
.2T2.+....x.
..3..xxxxxx.
............
ENDMAP

# kobolds around a campfire
NAME:    lexackson_kobold_supper
DEPTH:   D:1-6
TAGS:    no_monster_gen
KPROP:   56' = no_tele_into
MONS:    kobold, plant, bush
: if you.absdepth() < 4 then
MONS:    kobold ; dagger . stone
: else
MONS:    kobold brigand ; dagger . throwing net q:2
: end
SUBST:   . = e f .:150
KITEM:   e = rat skeleton
KITEM:   f = frilled lizard skeleton
MONS:    rat / frilled lizard
KFEAT:   m = iron_grate
: single_cloud(_G, "P", "flame", false)
MARKER:  P = lua:fog_machine { cloud_type = "grey smoke", \
             pow_min = 3, pow_max = 3, delay = 100, \
             size = 1, walk_dist = 1, start_clouds = 1 }
SUBST:   y = 2 3 x:5
NSUBST:  W = 5:.
NSUBST:  t = 6:2 3 / 6:x / *:t
MAP
xxxxxxxxxxxxx
xtttttttttttxxxx
xtyyWWWyyyyytttx
xyy.....y3yyyttx
xy..s1s..m'5yytx
@...1P1..m'5'ytx
xy..s14..m'5yytx
xyy.....y2yyyttx
xtyyWWWyyyyyttxx
xttttttttxxttxxx
xxxxxxxxxxxxxx
ENDMAP

NAME:   nooodl_orcs_dogs
TAGS:   transparent vaults_hard
DEPTH:  D:11-, Orc, Vaults, !Vaults:$
WEIGHT: 5 (Vaults), 10
: if you.branch() == "Vaults" then
TAGS:   no_monster_gen
MONS:   orc warlord, orc knight w:20 / orc sorcerer
MONS:   peacekeeper / crystal guardian w:4
SUBST:  Gw = .
: else
:   if you.absdepth() > 11 then
MONS:   orc knight, orc w:5 / orc warrior / orc wizard
:   else
MONS:   orc warrior, orc / orc wizard
:   end
MONS:   warg
SUBST:  * = %, G : GG.
: vault_metal_statue_setup(_G, "G", "mystic cage")
: end
NSUBST: A = 2 = 122 / *:2, B = 2 = 122 / *:2
: decorative_floor(_G, 'F', "orcish standard")
: vaults_hard_standard(_G)
MAP
..................
.wwwwwww..wwwwwww.
.wxxxxxx++xxxxxxw.
.wx%...x..x...%xw.
.wx.AA.x..x.BB.xw.
.wxG33.+..+.33Gxw.
.wx.AA.x..x.BB.xw.
.wx*..%xFFx%..*xw.
.wxxxxxxxxxxxxxxw.
.wwwwwwwwwwwwwwww.
..................
ENDMAP

# This vault was built by evilmike, but the idea is mikee's. Who is really the
# evil one here?
NAME:   mikee_hates_you
TAGS:   no_monster_gen no_item_gen
DEPTH:  D:12-, !D:$
KPROP:  l = no_cloud_gen
KMONS:  1 = generate_awake merfolk avatar
KMONS:  2 = generate_awake merfolk impaler ; trident ego:distortion w:5 | \
                                             trident ego:draining . robe
KITEM:  > = |
KFEAT:  > = escape_hatch_down
: single_cloud(_G, "!", "foul pestilence", true)
SUBST:  ! = .
MAP
ccccccccccc
cccccc=2ccc
@=!!!!l1=>c
ccccccccncc
ccccccccncc
        @.
ENDMAP

# Inspired by the Jorge Luis Borges story "The Library of Babel".
NAME:    bh_hangedman_babel_library
TAGS:    transparent no_monster_gen no_item_gen
DEPTH:   D:10-, !D:$, Elf, !Elf:$
MONS:    arcanist w:6 / deep elf pyromancer
MONS:    occultist w:6 / deep elf zephyrmancer
ITEM:    randbook numspells:2 title:Dhcmrlchtdj
ITEM:    randbook numspells:2 title:Combed_Thunderclap disc:air
ITEM:    randbook numspells:2 title:Plaster_Cramp disc:earth
ITEM:    randbook numspells:2 title:Axaxaxas_mlö
ITEM:    randbook numspells:3 title:Forking_Paths owner:Ts'ui_Pên \
                  disc:hexes disc2:alchemy
ITEM:    randbook numspells:2 title:Sand
KITEM:   % = any potion
KFEAT:   ^ = shaft trap
KFEAT:   % = cache_of_baked_goods
: if you.branch() == "D" and you.depth() < 12 then
NSUBST:  1 = 1:. / *:1
: else
NSUBST:  1 = 1:2 / * = 12
: end
SHUFFLE: %def, defghi, bm, bm / ++
MAP
   xxx@xxx     xxx@xxx
  xx.....xx   xx.....xx
 xx1.....dxxxxxf.....1xx
xx....^....xbx....^....xx
@....^<^....1....^>^....@
xx....^....xmx....^....xx
 xxe.....1xxxxx1.....gxx
  xx.....xx   xx.....xx
   xxx@xxx     xxx@xxx
ENDMAP

#################################################################

# checkpoint with guards to alert nearby monsters, by Core Xii
NAME:    corexii_checkpoint
TAGS:    no_monster_gen no_item_gen allow_dup extra transparent
DEPTH:   D:4-, Elf
: if you.in_branch("Elf") then
MONS:    deep elf pyromancer / deep elf zephyrmancer
: elseif you.absdepth() > 11 then
MONS:    centaur / troll / kobold demonologist / orc knight
: elseif you.absdepth() > 7 then
MONS:    gnoll / ogre / kobold brigand / orc warrior
: else
MONS:    goblin / hobgoblin / kobold / orc
: end
SHUFFLE: &@X'mn / &@X'nm / @""Xmn / @""Xmn / @""Xmn
SUBST:   nX = x, '& = .
NSUBST:  1 = 2:1 / *:.
CLEAR:   "
MAP
Xxxxxxx
X&....&
X'xmmx'
X'n11x'
@'n11x@
Xxx+xxx
   @
ENDMAP

NAME:   corexii_shack
TAGS:   no_monster_gen no_item_gen allow_dup extra transparent
DEPTH:  D:2-6
NSUBST: + = 1:+ / *:x, m = 1:m / *:x, - = 1:1 / *:d
ITEM:   any weapon / any armour / w:5 any potion / w:40 nothing
MONS:   goblin / hobgoblin / kobold / orc, plant / w:100 nothing
MAP
........
..2..2..
.2x++x2.
.2m--m2.
.2m--m2.
.2xmmx2.
..2222..
........
ENDMAP

# Centaur isle (Lemuel)
NAME:   centaur_isle
TAGS:   no_monster_gen no_pool_fixup no_rotate no_descent
DEPTH:  D:6-12, Shoals
MONS:   centaur, yaktaur, faun, centaur warrior
KFEAT:  d = cache_of_baked_goods
: if you.absdepth() > 11 then
NSUBST: 1 = 1:4 / 2:33 / * = 123
: end
SUBST:  ? = *$
MAP
          wwww
       wwwwwwww
    wwwwwwwwwwwwwww
 wwwwwwwwwwwwwwwwwwwww
wwwwwwww..wwwwwwwwwwwww
wwwwww.11...wwwwwwwwwww
wwwww........wwwwwwwwww
wwwww...x+x..wwwwwwwwww
wwww..11x>x..wwwwwwwww
 www...xx?x11wwwwwwwww
 www..xx??x.wwwwwwwww
 wwww.xx?dx.wwwwwww
  wwww.xxxx.wwwwww
   wwwwww..wwwww
    wwwwwwwwwww
       wwwwww
ENDMAP

NAME:   kilobyte_rumbling_trees
TAGS:   transparent misc_elf_vault
DEPTH:  Lair:2-, Elf, Depths
WEIGHT: 5 (Elf), 10
MONS:   black bear w:5 / polar bear / wolf
MONS:   shapeshifter / glowing shapeshifter
MONS:   ice dragon / spark wasp w:20 / caustic shrike
MONS:   patrolling boggart, patrolling deep elf archer
MONS:   patrolling spriggan druid
: if you.in_branch("Lair") then
SUBST:  ' = 4, 6 = .
: elseif you.in_branch("Elf") then
NSUBST: ' = 1:6 / 1:% / *:1, 1 = 3:2 / * = 25..
: else
NSUBST: ' = 1:6 / 1:%* / 1:. / *:1, 1 = 2:3 / * = 223.
: end
FTILE:  .t123456%*@ = floor_moss
MAP
ttttt       tttt@t
tttttt tt ttttt1tt
t1tttttttttttt.ttt
@t..ttttttttt.tttt
tttt.'t*ttt..tttt
tttttt.6..'ttttt
 ttttt.'tttttttt
 tttt'ttttttttt
tttt.tttttttt
tttt1tttttt
 tttt@ttt
ENDMAP

NAME:    billiards_dpeg
TAGS:    transparent
DEPTH:   D:6-, !D:$, Elf, !Elf:$
MONS:    orc wizard, deep elf pyromancer, arcanist / deep elf zephyrmancer
ITEM:    scarab talisman
KFEAT:   ^ = shaft trap
NSUBST:  X = 1:+ / *:x
: if you.absdepth() > 11 then
NSUBST:  1 = 1:2 / 1:3 / * = 22233
SUBST:   * = *|
: elseif you.absdepth() > 8 then
NSUBST:  1 = 1:2 / * = 1
SUBST:   * = *:5 |:2 %:3, d = d..
: else
SUBST:   * = * %:5, d = d....
: end
MAP
.............
.xxxxxxxxxxx.
.x*1.....^bx.
.x11...d..bx.
.x..bbbbb+bx.
.x.dbxxxb.bx.
.x..bbbbb.bx.
.x^.+......x.
.xbbbbbbb..X.
.xxxxxxxxxXx.
............0
ENDMAP

NAME:    kb_tengu_band
TAGS:    no_pool_fixup transparent
DEPTH:   D:12-, Shoals, Swamp
WEIGHT:  5
MONS:    tengu warrior, tengu conjurer
MAP
 .........
..wwwww....
.wwttwww...
.wtt2*tww..
.wwwt*1....
..wwwwww...
 .........
ENDMAP

NAME:   minmay_rotating_lava
TAGS:   no_monster_gen transparent no_descent
DEPTH:  D:10-
MONS:   hell hound, hell knight band, hell knight
ITEM:   potion of enlightenment pre_id q:3
KFEAT:  ' = floor
KMASK:  .123*< = opaque
KPROP:  .123*< = no_tele_into
TILE:   c = wall_stone_scorched
MAP
'''''''''''''''
'ccccccccccccc'
'c.....3.....c'
'c.ccccccccc.c'
'c.c......1c.c'
'c.c.cclcc.c.c'
'c.c.c...c1l.c'
'c<c2c.3<c.l.c'
'c.c.c***c1l.c'
'c.c.ccccc.c.c'
'c.c...<..1c.c'
'c.ccccccccc.c'
'c...1.1.1...c'
'cccclllllcccc'
'''''''d'''''''
ENDMAP

NAME:   evilmike_spriggan_trog_shrine
TAGS:   transparent
DEPTH:  Depths, Elf
MONS:   spriggan berserker
: if you.absdepth() < 19 then
NSUBST: 1 = 2=2 / 1
: end
SUBST:  2 = 1'
KMONS:  _ = spriggan berserker
KFEAT:  _ = altar_trog
SUBST:  C : c', B : +', D : +', E : +c
SUBST:  F = ccc+
COLOUR: # = red
FTILE:  *|_1'c = floor_sprouting_squares
FTILE:  +t = floor_moss
FTILE:  # = floor_rough_lightred
: single_cloud(_G, "#", "flame", false)
SUBST:  '# = .
MAP
.................
.ccccccccccccccc.
.cttcc#ccc#ccttc.
.c*1''''_''''1|c.
.c'''''''''''''c.
.c''''''C''''''c.
.cccctcBcBctcccc.
....ccc'C'ccc....
   ..cc'''cc..
    ..F'2'F..
   ..cc'''cc..
 ...ccc'c'ccc...
 .ccctcDcDctccc.
 .c'''''c'''''c.
 .c'''c'''c'''c.
 .c'1'c'''c'1'c.
 .ctcccE+Eccctc.
 .ccc#c...c#ccc.
 ...............
   .....@.....
ENDMAP

NAME:  kb_lookout_dungeons_type
TAGS:  extra no_pool_fixup transparent
DEPTH: D:5-12
MONS:  centaur, bush
KMASK: w = no_monster_gen
MAP
 ....
......
......
...wwxxxx...
@..w1.%.2..@
...wwxxxx...
......
......
 ....
ENDMAP

NAME:   wad_orctagon
TAGS:   transparent
DEPTH:  D:2-4
WEIGHT: 4
MONS:   orc
MAP
......xxxxxxxxxxxxxx......
.....xxxxxxxx.1.1xxxx.....
....xx.xxxxx.G..G.xxxx....
...xx...xxxx......xxxxx...
..xxxx.xxxxxx....xxxxxxx..
.xxxxx+xxxxxx.mm.xxxxxxxx.
.xxIx.I.xIx.xx++xx.xxx...x
@+...m.m...x......x.+.mmm@
.xxIx.I.xIx.xx++xx.xxx...x
.xxxxxxxxxxxx.mm.xxxxxxxx.
..xxxxxxxxxxx....xxxxxxx..
...xxxxxxxxx......xxxxx...
....xxxxxxxx.G..G.xxxx....
.....xxxxxxxx.1.1xxxx.....
......xxxxxxxxxxxxxx......
ENDMAP

NAME:    hangedman_summoners_spam
TAGS:    no_monster_gen patrolling
DEPTH:   Depths, Elf, Crypt, Abyss
MONS:    boggart, orc high priest, kobold demonologist
MONS:    shadow demon, deep elf demonologist, glowing orange brain, vampire mage
KMONS:   8 = mummy priest
ITEM:    book of callings w:5 / book of the wilderness w:20 / \
         grand grimoire w:5 / randbook disc:summoning numspells:6
ITEM:    manual of summonings
ITEM:    amulet of magic regeneration w:5 pre_id / \
         amulet of magic regeneration randart
ITEM:    any ally misc / orb randart artprops:Summ
KITEM:   % = any, any / gold / nothing, any / nothing
KITEM:   _ = any ally scroll pre_id, any ally scroll pre_id / nothing
KFEAT:   _ = altar_sif_muna
KFEAT:   ? = altar_lugonu
KFEAT:   < = exit_abyss
KFEAT:   C = c
KMASK:   "'@ = !no_monster_gen
SHUFFLE: 12, 34, 12 / 34
NSUBST:  ' = 1:@ / * = .@
SUBST:   c : ccb
: if you.in_branch("Abyss") then
SUBST:   bc = xcccccvb
SUBST:   %efg = $, * = <, _ = ?
: elseif you.in_branch("Crypt") then
SUBST:   5 = 7, 6 = 8
: else
SHUFFLE: 56 / 78
TILE:    C = wall_stone_magic_shelf
: end
MAP
ccccccccccccccc
c24C5de6fd5C32c
c%%C*g...g*C%2c
c..cccc+cccc..c
c.............c
c%cG..%_%..Gc%c
c.............c
c..ccc+++ccc..c
c1%c.......c%%c
c13c"""U"""c14c
cccc'''''''cccc
ENDMAP

NAME:    hangedman_minor_magic
TAGS:    no_monster_gen transparent
DEPTH:   D:9-11, Orc
MONS:    crimson imp, white imp, shadow imp, iron imp
MONS:    orc, orc wizard w:39 / Blorkula the orcula w:1, swamp drake
KMONS:   0 = orc ; robe . wand of charming | wand of flame
KMONS:   89 = deep elf pyromancer / deep elf zephyrmancer
KMONS:   & = obsidian bat
# FIXME: make these the wizard hat tiles only.
KITEM:   8d = robe, hat w:40 / hat good_item, \
              hat w:20 / hat good_item
KITEM:   9e = book of minor magic
SUBST:   - = +
KMASK:   de89 = no_item_gen
SHUFFLE: 1234
COLOUR:  F = red
: if you.in_branch("Orc") then
SUBST:   7 = &
: end
FTILE:   F = floor_pebble_lightred
TILE:    c = wall_stone_magic_shelf
{{
  local fog = chained_fog_machine {
                            cloud_type = 'flame', pow_min = 6, pow_max = 6,
                            delay = 100, size = 1, walk_dist = 0, excl_rad = 0
                          }
  lua_marker('F', fog)
}}
MAP
@@xxxxxxxxxxx
..xxxxxxxxxxx
.5xx1xx2xxcxx
.5xx++++xx9xx
..x..60..xexx
..x.F..F.x+xx
@.-...6..-7xx
@.-...0..-'xx
..x.F..F.x+xx
..x..60..xdxx
.5xx++++xx8xx
.5xx3xx4xxcxx
..xxxxxxxxxxx
@@xxxxxxxxxxx
ENDMAP

NAME:  guppyfry_early_elven_hall
TAGS:  patrolling no_monster_gen transparent
DEPTH: D:7-10
MONS:  deep elf pyromancer, deep elf zephyrmancer, fungus
ITEM:  any scroll / any potion / any book
SUBST: - = 33..GTd$%
: if you.depth() > 8 then
SUBST: 1 = 11122
: end
MAP
.............
.xxxxxxxxxxx.
.x...........
.x...........
.x+++mxxxxxG.
.x-.-+.......
.x1..+...>...
.x-.-+.......
.x+++mxxxxxG.
.x...........
.x...........
.xxxxxxxxxxx.
.............
ENDMAP

NAME:   guppyfry_early_orc_mine
TAGS:   patrolling no_monster_gen transparent
DEPTH:  D:2-5
MONS:   orc, goblin, hobgoblin, orc priest, orc wizard, orc warrior
ITEM:   stone / large rock q:1 w:1
NSUBST: ? = 2:$ / 2:d / *:.
: if you.absdepth() > 3 then
NSUBST: - = 1:65 / 1:5 / 1:4 / 3:1 / 2:. / 2:x / 2:I / *:.
: else
NSUBST: - = 2:1 / 2:2 / 2:3 / 2:. / 2:x / 2:I / *:.
: end
MAP
..............
.x.xxxxxxxxxx.
.x..xxx.x..xx.
.xx...xx.xx.x.
..xx..-.x.xx-.
..x.x.-?x.xxx.
..xxx?---?.1x.
..-xx?---x.xx.
..xx.?---xxxx.
.xx....-xxxxx.
.xxxx.xxxxxxx.
..............
ENDMAP

NAME:    guppyfry_library_mini
TAGS:    patrolling no_monster_gen transparent misc_elf_vault
DEPTH:   Orc, Snake, Elf, Zot
ITEM:    gold / any scroll / any book w:4
SUBST:   ? = 123d
: if you.in_branch("Orc") then
MONS:    orc, orc warrior, orc wizard w:9 / orc sorcerer w:1
: elseif you.in_branch("Snake") then
MONS:    naga, naga warrior, naga mage w:9 / nagaraja w:1
: elseif you.in_branch("Elf") then
MONS:    deep elf pyromancer / deep elf zephyrmancer
MONS:    deep elf knight / deep elf archer
MONS:    deep elf death mage / deep elf elementalist
: else
MONS:    any draconian, draconian scorcher
MONS:    draconian annihilator / draconian knight
: end
TILE:    c = wall_studio
MAP
............
.xxmxxxxmxx.
.x.?....?.x.
.x........x.
.x.xx++xx.x.
.+1cd33dc.+.
.+.cd33dc1+.
.x.xx++xx.x.
.x........x.
.x.?....?.x.
.xxmxxxxmxx.
............
ENDMAP

NAME:    lightli_giant_bouncers
DEPTH:   Depths
MONS:    fire giant, frost giant, titan
SHUFFLE: 12
KMASK:   l = no_monster_gen
FTILE:   =.123*|+ = floor_mystic_chasm
MAP
bbbbbbbbbbb
b.......bbb
b.bbbbb+bbb
b.l1b...bbb
b.bbb.212bb
b.bbb.121bb
b.l2b.....b
b.bbbb.3..b
b.b**+....b
b=b|*bbbbbb
'@nbbbbbbbb
ENDMAP

NAME:   lightli_church_of_beogh
TAGS:   vaults_hard vaults_orient_e
DEPTH:  D:6-, Orc, Vaults, !Vaults:$
MONS:   orc, orc warrior, orc knight, orc priest
MONS:   orc wizard, orc high priest, orc sorcerer
KMONS:  8 = orc warlord
KFEAT:  _ = altar_beogh
: if you.branch() == "D" or you.branch() == "Orc" then
SUBST:  CD = c
:   if you.absdepth() < 9 then
SUBST:  - = =
NSUBST: 0 = 6:. / 2:1 / * = 1:9 2:1
:   elseif you.absdepth() < 12 then
SUBST:  - = +
NSUBST: 0 = 2 = 33322 / 2:. / * = 2111
:   else
SUBST:  4 = 6, 5 = 47, - = +
NSUBST: 0 = 1:8 / 1:3 / 2:3 / 4:1 / * = 1:8 2:4 3:2
:   end
: else
SUBST:  4 = 9, 5 = 990, 1 = 3
NSUBST: 0 = 1:8 / 1:893 / 2:3 / 2:6 / 2 = 30. / *:.
SUBST:  C- = ., c = x, * = *%
:   decorative_floor(_G, 'D', "orcish standard")
FTILE:  .+_%*D3456098I = floor_metal_gold
: end
MAP
ccccccccccccccccccccC
cccc..000........cccD
c%ccI.050I..I..I..IcC
c*%c..000..........1C
c_%+4.050..........1-
c*%c..000..........1C
c%ccI.050I..I..I..IcC
cccc..000........cccD
ccccccccccccccccccccC
ENDMAP

NAME:   lightli_orcish_oven
TAGS:   vaults_room vaults_orient_s
DEPTH:  D:6-11, Orc, Vaults
WEIGHT: 5 (Vaults), 10
MONS:   orc warrior, orc, orc warlord, orc knight w:14 / lindwurm w:1
KITEM:  d = stone q:1 no_pickup
KFEAT:  e = cache_of_meat
KFEAT:  f = cache_of_baked_goods
: if you.in_branch("Vaults") then
SUBST:  1 = 3, 2 = 4, @ = ., d = f, g = h
: else
SUBST:  d = def
: end
: dgn.delayed_decay(_G, 'g', 'adder corpse / electric eel corpse')
: dgn.delayed_decay(_G, 'h', 'hog corpse / lindwurm corpse')
MAP
xxxxxxxxxx
xvvvggggxx
xvl+.222.x
xvvv.212.x
xxxx...xxx
xxx.x..xxx
xxx+xx..xx
x$$$xx..xx
xdexx..xxx
xxxx.@xxxx
ENDMAP

NAME:     grunt_tower_of_power
TAGS:     vaults_hard vaults_orient_s no_monster_gen patrolling
DEPTH:    Depths, Vaults, !Vaults:$
: if you.in_branch("Vaults") then
MONS:     lich, arcanist / ogre mage / deep elf annihilator, tengu reaver
SUBST:    c : vvb, @' = .
:  vaults_hard_standard(_G)
: else
MONS:     lich, occultist / tengu conjurer / nagaraja, tengu reaver
NSUBST:   ' = 1:2 / 1:2. / *:.
: end
ITEM:     book of power, robe good_item, hat good_item, robe, hat
KFEAT:    _ = altar_vehumet
SHUFFLE:  ef, gh, ij
TILE:     v = dngn_metal_wall_magenta
TILE:     c = dngn_stone_wall_magenta
TILE:     b = dngn_crystal_magenta
MAP
      ccccc
     ccedfcc
     ceh_gfc
     c..1..c
cccccc..'..cccccc
c.fhccc...cccge.c
ce2.cccc+cccc.2fc
cg.'cc.....cc'.hc
cccc+.......+cccc
 ccc..2.U.2..ccc
 cc...........cc
 @....U.3.U....@
 cc...........cc
  cc....U....cc
   cc.......cc
    cc..@..cc
ENDMAP

NAME:    grunt_absolute_annihilation
DEPTH:   Depths
MONS:    ancient lich
MONS:    deep elf annihilator / draconian annihilator w:5 / lich
MONS:    kobold fleshcrafter w:40 / tengu conjurer w:20 / \
         occultist w:20 / orc sorcerer w:20 / nagaraja / tengu reaver
ITEM:    book of annihilations, book of power, book of conjurations
ITEM:    randbook disc:conjuration, staff of conjuration
KFEAT:   _ = altar_vehumet
KFEAT:   z = c
SHUFFLE: efgh
: tile("z = " .. crackle_def(_G))
MAP
   xxxxxxxxxxx
  xxczccccczcxxxxxxxxx
  xcc2ccccc2cccccccccxx
  xc.c.ccc.c.ccbbbbbccx
 @xc.c.ccc.c.cbbe.fbbcx
.3.c.c.czc.c.cb.2...bcx
@U..3.3...3.3.=.._1dbcx
.3.cczc.c.czccb.2...bcx
 @xcccc.c.ccccbbg.hbbcx
  xcccc.c.cccccbbbbbccx
  xccccc2ccccccccccccxx
  xxcccczccccxxxxxxxxx
   xxxxxxxxxxx
ENDMAP

NAME:   marbit_kobold_abyssish
TAGS:   no_monster_gen
DEPTH:  D:11-
MONS:   kobold brigand ; dart ego:disjunction, kobold demonologist
KFEAT:  _ = altar_lugonu
KPROP:  1 = no_tele_into
MAP
xxxxxxxxxxxxxxx
xxlllxx<.xlll%x
xlllllxx.lll2.x
@x.llll..lll._x
x.xl1lllllll2>x
xlllxlllx1lll%x
xxxxxxxxxxxxxxx
ENDMAP

NAME:    sigmund_edmund_badplayer
TAGS:    no_item_gen no_monster_gen no_pool_fixup no_trap_gen transparent
DEPTH:   D:4-7
MONS:    plant / bush
KMONS:   S = Sigmund
KMONS:   E = Edmund
KITEM:   ( = flail / any armour
: kitem("s = " .. scythe() .. " / robe")
KFEAT:   F = cache_of_meat / cache_of_fruit
SHUFFLE: SE, 1' / 'F
NSUBST:  S = 1:S / *:., E = 1:E / *:., 1 = 1:1 / * = 1.
SUBST:   ' = .
: decorative_floor(_G, 'V', "floral vase")
veto {{ return you.uniques("Edmund") or you.uniques("Sigmund") }}
MAP
....................
.xxxxxxxxxxxxxxxx1..
.xEEEExWS....x.'x11.
.x...'xWE.......x11.
.x..xxxxxx.xxx..x11.
.xV........xsxx.xxx.
.xx...........xSSSx.
.x(..............Sx.
.xxxxxxx..xxxxxxxxx.
....................
ENDMAP

NAME:  cheibrodos_gnoll_hut
TAGS:  no_monster_gen no_item_gen transparent
DEPTH: D:2-5
KMONS: P = bush
MONS:  jackal, hound, gnoll
KFEAT: S = shaft trap
: if you.depth() > 2 then
SUBST: 1 = 2
: end
TILE:  c = wall_stone_magic_shelf
MAP
...@...
..P.P..
xxx+xxx
x%+...x
xcx1.1x
xS+.3.x
xxxxxxx
ENDMAP

NAME:  lightli_minifort
TAGS:  no_pool_fixup
DEPTH: D:4-, Depths
: if you.in_branch("Depths") then
MONS:  fire giant / frost giant / titan
TILE:  c : wall_stone_scorched / stone_wall_depths
: elseif you.absdepth () > 11 then
MONS:  orc knight band
: elseif you.absdepth () > 8 then
MONS:  cyclops band
: elseif you.absdepth () > 5 then
MONS:  orc warrior band
: else
MONS:  gnoll sergeant band
: end
: decorative_floor(_G, 'V', "floral vase")
MAP
wwwwwwwww
wccwwwccw
wcccccccw
wwcV.*cww
wwc.1.cww
wwc...cww
wccc+cccw
wccw.wccw
wwww@wwww
ENDMAP

NAME:  lightli_wizard_tower
TAGS:  no_monster_gen patrolling
DEPTH: D:9-
MONS:  crimson imp / drude w:2, arcanist, occultist
ITEM:  any book, any scroll
: if you.depth() > 11 then
SUBST: 2 = 23
: end
SUBST: c : c.
TILE:  c = wall_stone_magic_shelf
MAP
   bbbb
  bbdebb
 bb....bb
bb......bb
b.c.12.c.b
b........b
bb......bb
 bb....bb
  bb..bb
   b++b
ENDMAP

NAME:   cheibrodos_lost_city_excavation
TAGS:   no_item_gen no_monster_gen
DEPTH:  D:11-, Depths
: if you.in_branch("D") then
MONS:   deep elf pyromancer w:8 / fire elemental w:5
MONS:   arcanist / occultist
: else
MONS:   occultist / sun demon, lich
: end
ITEM:   randbook / any scroll
NSUBST: 1 = 1:1 / 1:. / * = 1.
SUBST:  - = .lx
TILE:   c = wall_stone_scorched
: decorative_floor(_G, 'V', "broken floral vase")
MAP
llllll
llllllllll
.l-x-llllllllllllll
@.+1xlxx-lllllllllll
.lx.-l-1xlxx-lcxxcll
lll.llx...+1xlxddxll
llx.xlll.l-.xlx22xll
ll+1.l-x.lx..lx..xll
llx--..1+l-.xlx..xll
llllll-xxlx1+.+.Vxll
llllllllll-xxlcxxcll
    llllllllllllllll
        lllllllllll
ENDMAP

NAME:  minmay_a_box_with_orc_wizards_in_it
TAGS:  transparent
DEPTH: D:4-7
MONS:  orc wizard, orc priest
ITEM:  any book
SUBST: 1 : 1:49 2:1, 1 = 1., 2 = 2.
MAP
  .....
 ..xxx..
...m1x...
.mmm1xxm.
.m11d11m.
.mxx1mmm.
...+1m...
 ..xxx..
  .....
ENDMAP

# Very hungry Elvish explorers and their campfire, mounts and pet.
# Sometimes they have starved to death.
NAME:   beargit_elvish_explorers
DEPTH:  D:12-, Depths, Crypt
TAGS:   transparent patrolling no_monster_gen no_trap_gen
: if you.in_branch("D") then
:     if you.depth() < 14 then
MONS:   deep elf archer; shortbow good_item . quarterstaff \
            . robe good_item
MONS:   deep elf knight; quarterstaff good_item . leather armour good_item
MONS:   elephant, warg / hell hound w:5
:     else
MONS:   deep elf archer; longbow good_item . quarterstaff \
            . robe good_item
MONS:   deep elf knight; lajatang good_item . scale mail good_item
MONS:   elephant / dire elephant, warg / hell hound / raiju
:     end
MONS:   plant / fungus, nothing
: elseif you.in_branch("Crypt") then
KITEM:  1 = longbow good_item, quarterstaff, robe good_item
KITEM:  2 = lajatang good_item, chain mail good_item
KMONS:  1 = spectral deep elf master archer
KMONS:  2 = spectral deep elf blademaster
KMONS:  3 = spectral hellephant
KMONS:  4 = spectral shadow dragon
KMONS:  6 = deep elf death mage w:30 / vampire mage / \
            lich / ancient lich / dread lich
KITEM:  P = rat skeleton
SUBST:  5 = -
: else
# The elves have mastered the dungeon and allied with the darkness.
MONS:   deep elf master archer; longbow good_item | longbow randart \
            . chain mail good_item | quicksilver dragon scales
MONS:   deep elf blademaster; lajatang good_item | lajatang randart \
            . shadow dragon scales good_item | shadow dragon scales randart
MONS:   hellephant, alderking w:5 / shadow dragon
SUBST:  56 = -
: end
: if you.in_branch("Crypt") then
SUBST:  x = c
COLOUR: t = brown
TILE:   t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
FTILE:  - = floor_crypt
: else
FTILE:  -123456t = floor_grass_dark
FTILE:  P = floor_sand
: end
: single_cloud(_G, "P", "flame", true)
MARKER: P = lua:fog_machine { cloud_type = "grey smoke", \
            pow_min = 3, pow_max = 3, delay = 100, \
            size = 1, walk_dist = 1, start_clouds = 1 }
MAP
    xx.@.xxx
    xt----tx
    xt555ttx
    xt----tx
    xtt--ttx
    xt----tx
    xt--t-tx
    xt----tx
   xxt-t--tx
  xxttt---txxxx
 xxtt-----ttttx
xxtt---t----4txx
xttWWW---P---ttx
xt-WwWW----3--tx
xt------2163--tx
xttt---------ttx
xxxtt--tttttttxx
  xxt---tttttttx
   xt----t----5.
   xtt--------5@
   xxtt-----t-5.
    xxtttttttttx
     xxxxxxxxxxx
ENDMAP

NAME:   the_bakery
DEPTH:  D:7-14
MONS:   spriggan col:white name:baker n_suf n_noc ; robe . dagger
# It's a chef's hat. Maybe we should get a tile for that?
ITEM:   hat
KFEAT:  e = cache_of_baked_goods
: if crawl.one_chance_in(8) then
SUBST:  = = +
:   dgn.delayed_decay(_G, 'f', 'spriggan name:baked n_adj n_spe n_des corpse')
: else
SUBST:  =f = x
: end
MAP
xxxxxx
xee=fx
x.xxxx
x..1dx
x+xxxx
ENDMAP

NAME:   hangedman_fish_farm
TAGS:   no_monster_gen no_pool_fixup patrolling
DEPTH:  D:9-14
KMONS:  A = merfolk ; spear
ITEM:   throwing net / spear
KFEAT:  % = cache_of_meat
KFEAT:  e = shallow_water
:       dgn.delayed_decay(_G, 'e', 'electric eel corpse')
MAP
xxxxxx
x.dd%x
+...Ax
xWWeex
xxxxxx
ENDMAP

# An ogre roasts intruders over his little campfire.
NAME:   grunt_ogre_cave
TAGS:   extra no_monster_gen no_trap_gen patrolling
DEPTH:  D:7-14
{{
  local twochance = you.absdepth() - 8
  local onechance = 7 - twochance
  if twochance <= 0 then
    mons("ogre")
  elseif onechance <= 0 then
    mons("two-headed ogre")
  else
    mons("ogre w:" .. onechance .. " / two-headed ogre w:" .. twochance)
  end
}}
ITEM:   throwing net
KFEAT:  % = cache_of_meat
KITEM:  g = orc skeleton / human skeleton / elf skeleton / dwarf skeleton
: single_cloud(_G, "O", "flame", false)
MAP
 xxxxx
xxxxxxx
xx.1gxx
xx%Ogxx
xxd..xx
 xxx.xx
 xx.xx
 xx.xx
xx.xx
 .g.
  @
ENDMAP

NAME:     blue_anna_alchemist
TAGS:     extra
DEPTH:    D:5-11
MONS:     kobold brigand ; wand of flame pre_id . short sword . \
                           dart ego:poisoned | dart ego:curare w:5
ITEM:     potion of moonshine w:50 pre_id / potion of ambrosia pre_id
KFEAT:    e = cache_of_fruit
SUBST:    e : e.
: decorative_floor(_G, 'V', "floral vase")
MAP
    c++c
ccccc..ccccc
cddc....cddc
cde+.1..+edc
ccccV..Vcccc
cccccccccccc
ENDMAP

NAME:    hellmonk_jugg_or_not
TAGS:    no_monster_gen no_item_gen no_descent
DEPTH:   D:13-, Orc:1
WEIGHT:  3
MONS:    juggernaut
KFEAT:   B = altar_nemelex_xobeh
SHUFFLE: DE
MARKER:  P = lua:transp_loc("jugg_or_not_entry")
MARKER:  Q = lua:transp_dest_loc("jugg_or_not_entry")
MARKER:  R = lua:transp_loc("jugg_or_not_exit")
MARKER:  S = lua:transp_dest_loc("jugg_or_not_exit")
MARKER:  D = lua:transp_loc("jugg_or_not_jugg")
MARKER:  F = lua:transp_dest_loc("jugg_or_not_jugg")
MARKER:  E = lua:transp_loc("jugg_or_not_not")
MARKER:  G = lua:transp_dest_loc("jugg_or_not_not")
MARKER:  H = lua:transp_loc("jugg_or_not_jugg_end")
MARKER:  K = lua:transp_dest_loc("jugg_or_not_jugg_end")
MARKER:  J = lua:transp_loc("jugg_or_not_not_end")
MARKER:  L = lua:transp_dest_loc("jugg_or_not_not_end")
MAP
      ..........
  ....nnnnnnnnnn.
 .nnnnnF..1HnK|nn.
@PnQDEnnnnnnnn|RnS.
 .nnnnnG..BJnL|nn.
  ....nnnnnnnnnn.
      ..........
ENDMAP

NAME:   nicolae_grassy_gnolls
TAGS:   transparent
DEPTH:  D:1-8
KMONS:  p = plant
: if you.depth() == 1 then
KMONS:  1 = gnoll
: elseif you.depth() == 2 then
KMONS:  1 = gnoll band
: elseif you.depth() == 3 then
KMONS:  1 = gnoll bouda band / gnoll band
: elseif you.depth() == 4 then
KMONS:  1 = gnoll sergeant band / gnoll bouda band / gnoll band
: else
KMONS:  1 = gnoll bouda band / gnoll sergeant band / gnoll band
KMONS:  2 = gnoll bouda / gnoll sergeant
NSUBST: - = 2 / -
: end
NSUBST: - = 1 / p```
SUBST:  P = pp`, . = ...`
FTILE:  `p12 = floor_grass_dark
MAP
 .......
..PPPPP..
.PP---PP.
.P-----P.
.P-----P.
.P-----P.
.PP---PP.
..PPPPP..
 .......
ENDMAP

NAME:   nicolae_splish_splash
TAGS:   transparent
DEPTH:  D:12-, Shoals
KMONS:  1 = water nymph / merfolk aquamancer
KFEAT:  1 = w
: if you.branch() == "D" then
NSUBST: w = 3=1 / 2=1ww / w
: else
NSUBST: w = 4=1 / 4=1w / w
: end
SUBST:  M = w.
MAP
   ...   ...
  ..... .....
 ...M.....M...
...MwM...MwM...
..MwwwM.MwwwM..
...MwwwMwwwM...
 ...MwwwwwM...
  ...MwwwM...
 ...MwwwwwM...
...MwwwMwwwM...
..MwwwM.MwwwM..
...MwM...MwM...
 ...M.....M...
  ..... .....
   ...   ...
ENDMAP

NAME:   dreamdust_gnoll_farm
TAGS:   no_monster_gen transparent
DEPTH:  D:4-7
MONS:   gnoll ; halberd, hound
ITEM:   any potion no_pickup
NSUBST: . = 2=1 / 3=1. / 2 / 1=2. / .
KMONS:  p = fungus
COLOUR: pc = brown
FTILE:  p' = floor_mud
: single_cloud(_G, "!", "flame", false)
MAP
..............
.pppppp.ccccc.
.pWWWWp.c.!dc.
.pppppp.c...c.
.pWWWWp.cc+cc.
.pppppp.......
..............
ENDMAP

NAME:   dreamdust_gnoll_shepherd
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:7-11, Lair
KMONS:  1 = gnoll bouda ; quarterstaff
KMONS:  2 : yak / dream sheep
NSUBST: . = 5 = 2. / .
MAP
.....
..1..
.....
ENDMAP

NAME:   dreamdust_looks_like_rain
TAGS:   transparent no_monster_gen patrolling
DEPTH:  D:13-, Depths
: if you.in_branch("D") then
MONS:   sky beast
KMONS:  A = air elemental / wind drake
: else
MONS:   air elemental
KMONS:  A = titan / storm dragon
: end
KFEAT:  A = stone_arch
NSUBST: . = 2=1 / 3=1. / .
: if crawl.coinflip() then
MARKER: A = lua:fog_machine { cloud_type='rain', pow_min = 10, \
                              pow_max = 10, delay = 10, size = 1 }
: else
:   single_cloud(_G, "A", "thunder", false)
: end
FTILE: .1A = floor_pebble_cyan
MAP
 ...
.....
..A..
.....
 ...
ENDMAP

# Robin is capable of hurling Ijyb at the player, but sadly, instances where a
# player was killed by a projectile Ijyb are few and far between. Here, we put
# the two goblin uniques together to increase the chances of a lethal Ijyb toss.
# Robin's band is reduced from its usual 10-12 to 5-6, to increase the chances
# that Ijyb gets thrown instead of a non-unique goblin.
NAME:   nicolae_goblin_pals
DEPTH:  D:3-5
TAGS:   transparent
KMONS:  1 = Robin, goblin / hobgoblin
KMONS:  2 = Ijyb, goblin / hobgoblin
# The usual ratio of Robin's band is goblin w:30 / hobgoblin, but here it has
# slightly more hobgoblins to compensate for the reduction in size.
KMONS:  3 = goblin / hobgoblin
NSUBST: ` = 5=3 / 3. / .
MAP
........
........
..````..
..`1.`..
..`.2`..
..````..
........
........
ENDMAP

# A shopkeeper has learned why there are no NetHack-style shops in this dungeon.
NAME:   nicolae_nh_ransacked_shop
TAGS:   transparent patrolling no_item_gen
DEPTH:  D:4-10
KITEM:  1d = any armour no_uniq w:9 / any weapon no_uniq w:1 / nothing w:40
KMONS:  1 = orc priest band / orc wizard band / orc warrior band / \
            kobold brigand band
KFEAT:  + = broken_door / +
NSUBST: D = + / c, E = e / .
KPROP:  e = bloody
: dgn.delayed_decay(_G, "e", "human corpse")
MAP
xx     xx
xcDDDDDcx
xcEEEEEcx
xcdddddcx
xcdd1ddcx
xcdddddcx
xcccccccx
xxxxxxxxx
ENDMAP

NAME:    mainiacjoe_okawaru_digging_arena
TAGS:    no_monster_gen no_item_gen transparent patrolling
DEPTH:   D:11-
WEIGHT:  5
MONS:    human, tengu warrior, tengu reaver
MONS:    two-headed ogre, ettin, vampire, vampire knight
KMONS:   8 = gargoyle
KMONS:   9 = war gargoyle
KFEAT:   C = altar_okawaru
ITEM:    any armour / animal skin w:5, any weapon / boomerang q:1 w:5
ITEM:    manual of fighting / manual of armour / \
         manual of dodging / manual of shields / manual of stealth
ITEM:    ring mail randart / scale mail randart / chain mail randart / \
         plate armour randart / kite shield randart / tower shield randart
ITEM:    manual of maces & flails / manual of axes / manual of polearms / \
         manual of staves / manual of short blades / manual of long blades / \
         manual of ranged weapons / manual of throwing
ITEM:    great mace randart / battleaxe randart / glaive randart / \
         lajatang randart / rapier randart / great sword randart
KITEM:   C = wand of digging charges:1
# Autoexplore will stop to look at a mediocre non-mundane weapon,
# so players with instant autoexplore can see they've entered a vault.
KITEM:   ? = mace good_item / falchion good_item
SHUFFLE: 23 / 45 / 67 / 89, fi / gh
FTILE:   `"C23456789defghi?xn+ = floor_sand
KMASK:   13579defghi = opaque
KPROP:   13579defghi = no_tele_into
MAP
   vvvvvvvvv
   v1111111vv
   vnnnnnnnnvvv
   v```v`2`n33v
  .+```v```nddv
 ..+```+``2nddvv
 ..v```+```nddfv
@..v`?`+``Cxxxxv
 ..v```+```neeiv
 ..+```+``4neevv
  .+```v```neev
   v```v`4`n55v
   vnnnnnnnnvvv
   v1111111vv
   vvvvvvvvv
ENDMAP

NAME:   mainiacjoe_labyrinth_nostalgia
TAGS:   no_monster_gen no_item_gen patrolling uniq_faux_labyrinth
DEPTH:  D:11-
WEIGHT: 5
MONS:   basilisk / gargoyle / shadowghast, generate_awake minotaur
KFEAT:  < = <
KITEM:  < = |, *, %
KFEAT:  X = rock_wall
TILE:   X = wall_lab_rock
TILE:   c = wall_lab_stone
TILE:   v = wall_lab_metal
FTILE:  `12| = floor_gauntlet
MAP
xxxxxxxxxxxxxxxxxx@xx
xXXXXXXcccccvvvvvvnvx
xX```X```````````v<vx
xX`X`X`ccc`cvvvv`v2vx
xX`X`X`c```c```v`v`vx
xX`X`XXc`ccc`v`v`v`vx
xX`X`````c```v`v`v`vx
xX`XXXXccc`cvv`v`v`vx
xX`X```c```c```v`v`vx
xX`X`XXc`ccc`ccc`c`cx
xX`X```````c`c```c`cx
xX`XXXXccc`c`c`ccc`cx
xX```````c`c`c`c```cx
xX`XXXXc`c```c`c`cccx
xX`X`````X`X`X`X```Xx
xXXX`XXXXX`X`X`XXX`Xx
xX```X`````X`X`````Xx
xX`XXX`XXXXX`X`XXX`Xx
xX```````X11`X`````Xx
xXXXXXXXXX1XXXXXXXXXx
xxxxxxxxxx=xxxxxxxxxx
ENDMAP

NAME:   roadster_trireme
TAGS:   no_trap_gen no_monster_gen
DEPTH:  D:8-, Depths
: if you.branch() == "D" then
:   if you.depth() < 12 then
MONS:   gnoll / kobold brigand w:2, centaur, gnoll sergeant, merfolk
NSUBST: 1 = 8:1 / 2 = 1. / *:.
:   else
MONS:   human ; quarterstaff . robe, merfolk
MONS:   occultist w:5 / arcanist w:5 / necromancer, cyclops / centaur warrior
NSUBST: 1 = 10:1 / 3 = 122. / *:.
:   end
TILE:   G = dngn_statue_mermaid
: else
MONS:   tengu warrior / hell knight w:2, merfolk impaler
MONS:   titan, merfolk javelineer
NSUBST: 1 = 12:1 / 4 = 12. / *:.
TILE:   G = dngn_statue_depths_zot_tentacles
: end
ITEM:   throwing net q:1, javelin
KFEAT:  B = cache_of_baked_goods
MARKER: G = lua:fog_machine { cloud_type='translocational energy',  \
                              pow_min = 7, pow_max = 10, delay = 50, \
                              size = 4, walk_dist = 1 }
MAP
    wwwwwwwwwwwww
...wwwwwwwwwwwwwww
.WWxxxxxxxxxxxxxxww
@Wxxxxxxxxxxxxxxxxww
@xx1x1x1x1x1x1xxxxww
@xx1x1x1x1x1x1x2xxxww
@x.............d*xxxw
@+............B34CxGw
@x.............d|xxxw
@xx1x1x1x1x1x1x2xxxww
@xx1x1x1x1x1x1xxxxww
@Wxxxxxxxxxxxxxxxxww
.WWxxxxxxxxxxxxxxww
...wwwwwwwwwwwwwww
   wwwwwwwwwwwwww
ENDMAP

# A staircase open to the surface, or a secret underground garden?
# Friendly hosts (usually)? Part of a set with misty_motte since one
# can otherwise recognise the vault ahead of time.
NAME:    darby_backdoor_grove
TAGS:    extra no_descent no_monster_gen uniq_backdoor
DEPTH:   D:1-3, Lair, !Lair:$, Depths, !Depths:$, Zot, !Zot:$
WEIGHT:  7
: local gn = "att:good_neutral  ; nothing"
KMONS:   1 = felid att:good_neutral
KMONS:   2 = generate_awake butterfly
# Prefer natural, animal-intelligence enemies, ideally "cute" ones,
# and random branch-fitting or unusual surface-dwelling hosts. Avoid
# slow enemies, since player can escape to the hosts.
: if you.in_branch("D") then
:   kmons("3 = human " .. gn .. " / barachi " .. gn .. " / formicid " .. gn)
KMONS:   4 = goblin / kobold / hobgoblin / gnoll
:   if you.depth() == 1 then
KMONS:   5 = frilled lizard / ball python / quokka
:   elseif you.depth() == 2 then
KMONS:   5 = frilled lizard / ball python / quokka / adder
:   else
# One floor OoD: the vault is usually only accessible from D:4 or tele.
KMONS:   5 = ball python / quokka / adder / black bear / sleepcap
:   end
FTILE:   .t25}> = floor_grass
:   decorative_floor(_G, 'p', "garden patch")
: elseif you.in_branch("Lair") then
:   kmons("3 = naga " .. gn .. " / merfolk " .. gn .. " / formicid " .. gn)
KMONS:   4 = spriggan
:   decorative_floor(_G, 'p', "flower patch")
SUBST:   X = Xx
: elseif you.in_branch("Depths") then
:   kmons("3 = tengu " .. gn .. " / spriggan " .. gn)
KMONS:   4 = tengu warrior / tengu conjurer / tengu reaver
KMONS:   5 = spark wasp band / alderking / caustic shrike band
# All fitting Depths monsters are top-end threats, do not spawn 3.
NSUBST:  5 = 1:5 / *:.
:   decorative_floor(_G, 'p', "garden patch")
FTILE:   .t25}> = floor_grass_dark
TILE:    c = wall_church
: elseif you.in_branch("Zot") then
KMONS:   3 = base draconian att:good_neutral ; nothing
KMONS:   4 = base draconian
KMONS:   5 = moth of wrath w:20 / quicksilver dragon / \
             shadow dragon /storm dragon / golden dragon / \
             death cob w:20 / tentacled monstrosity w:20
# Use all demonic tree variations, a riot of colour befits Zot.
KFEAT:   t = demonic_tree
:   decorative_floor(_G, 'p', "flower patch")
: end
# Friendly hosts share drink and a random magical secret.
ITEM:    any potion, parchment
KFEAT:   z = c
KFEAT:   F = cache_of_fruit / cache_of_baked_goods
KFEAT:   ~ = closed_clear_door
SHUFFLE: de, 13= / 13= / 04~
CLEAR:   X
FTILE:   =deF0134~' = floor_studio
TILE:    z = wall_studio
# Layout and runed door designed so hosts do not help fight. Runed
# door also makes early placements less a trap for Oka/sac love.
MAP
   XXXXXXXXXXXXXXX
  XxxxxxxxxxxxxxxxX
 XxxxxxxxxxxxxxxxxxX
XxxxxtttttxtttxxxxxxX
Xxxxtt5..ttt5tttxxxxX
Xxxxt..w.......ttxxxX
Xxxtt.www.p.t.2.txxxX
Xxxt..ww2......tttxxX
Xxxtt..w.ccccc...txxX
Xxxt.t...cz3dcp.ttxxX
Xxxt...}.czF1=.>.txxX
Xxxtt.2..cz3ecp..txxX
Xxxxtt.p.ccccc..ttxxX
Xxxxxt.....2....txxxX
Xxxxxtt.t5tttt.ttxxxX
XxxxxxtttttxxtttxxxxX
 XxxxxxxxxxxxxxxxxxX
  XxxxxxxxxxxxxxxxX
   XXXXXXXXXXXXXXX
ENDMAP

# A vaguely sky-themed bailey in microcosm, contrast backdoor_grove.
NAME:    darby_backdoor_misty_motte
TAGS:    extra no_descent no_monster_gen no_item_gen no_pool_fixup uniq_backdoor
DEPTH:   D:1-3, Lair, !Lair:$, Depths, !Depths:$, Zot, !Zot:$
: if you.in_branch("D") then
KMONS:   1 = bat
:   if you.depth() == 1 then
KMONS:   2 = goblin / kobold
KMONS:   3 = hobgoblin / gnoll
:   else
KMONS:   2 = gnoll / orc
KMONS:   3 = Terence / gnoll band w:2, Sigmund / gnoll band w:2, gnoll band
:   end
: elseif you.in_branch("Lair") then
# Specifically winged monsters, not just amphibious.
KMONS:   1 = rime drake / wyvern / raven
KFEAT:   + = broken_door
SUBST:   X = Xx, 2 = 0, 3 = 9
: elseif you.in_branch("Depths") then
# Tengu fit the combined military and sky theme too well to dilute
# with other Depths monsters.
KMONS:   1 = tengu warrior / tengu conjurer
KMONS:   2 = tengu warrior band / tengu conjurer band / tengu reaver
KMONS:   3 = Sojobo band / tengu reaver w:1, tengu reaver
: elseif you.in_branch("Zot") then
KMONS:   1 = black draconian w:20 / quicksilver dragon / \
             shadow dragon / storm dragon / golden dragon
KMONS:   2 = base draconian band / nonbase draconian
# The vault constrains Tiamat's band, but already places enough
# draconians as is.
KMONS:   3 = Tiamat band / nonbase draconian band w:2, nonbase draconian band
: end
ITEM:    any weapon good_item, any armour good_item, any missile
KFEAT:   1! = deep_water
# Bailey-like ("motte and bailey"), so tyrant's traps fit.
KFEAT:   ^ = tyrant's trap
KFEAT:   3 = escape_hatch_down
KFEAT:   y = x
SHUFFLE: def
CLEAR:   X
MARKER:  ! = lua:fog_machine { cloud_type = "thin mist", \
             pow_min = 8, pow_max = 12, delay = 25, \
             size = 2, walk_dist = 1, spread_rate= 33 }
: if you.in_branch("Lair") then
KFEAT:   ~ = broken_clear_door
FTILE:   .cdefmyG123~%^+}> = floor_lair / floor_sprouting_stone
: else
KFEAT:   ~ = closed_clear_door
FTILE:   .cdefmyG123~%^+}> = floor_pebble_white
: end
: if you.in_branch("Depths") or you.in_branch("Zot") then
SUBST:   ^ = .^
TILE:    c = wall_marble
: else
SUBST:   ^ = .
: end
TILE:    y = wall_pebble_white
: vault_metal_statue_setup(_G, "G", "iron statue")
TILE:    G = dngn_oka_iron_statue
MAP
  XXXXXXXXXXXXXXXXX
 XxxxxxxxxxxxxxxxxxX
XxxxxxxxxxxxxxxxxxxxX
XxxyyyyyyxxxyyyyyyxxX
Xxxy!w1wyyyyyw1w!yxxX
Xxxyw...ww1ww...wyxxX
Xxxyw.G.......2.wyxxX
Xxxyw..^ccmcc~c.wyxxX
Xxxyywc~c2.dc.cwyyxxX
Xxxxy1c.+.3ec.cwyxxxX
Xxxyywc2c2.fc~cwyyxxX
Xxxyw^cmccccc^..wyxxX
Xxxyw.}^..2...G.wyxxX
Xxxyw...ww!ww...wyxxX
XxxywwwwyyyyywwwwyxxX
XxxyyyyyyxxxyyyyyyxxX
XxxxxxxxxxxxxxxxxxxxX
 XxxxxxxxxxxxxxxxxxX
  XXXXXXXXXXXXXXXXX
ENDMAP

# Mining and underhanded tactics, two classic kobold motifs. Why not
# both? Intended to *seem* mean but not be especially difficult. Monster
# set mainly split between ranged "miners," melee "guards," and one
# usually-random branch spawn near the entrance.
NAME:    darby_miner_ambush
TAGS:    no_monster_gen no_pool_fixup
DEPTH:   D, Orc
WEIGHT:  5 (D:1-3), 10
: if you.in_branch("D") then
:   if you.depth() == 1 then
KMONS:   134 = kobold ; dagger | whip . stone
KMONS:   267 = kobold
SUBST:   ^! = '
:   elseif you.depth() < 5 then
KMONS:   134 = kobold ; dagger | whip . dart ego:poisoned | stone
KMONS:   27 = kobold
:   elseif you.depth() < 12 then
KMONS:   14 = kobold geomancer
KMONS:   267 = kobold ; dagger good_item | whip good_item / \
             kobold brigand
KMONS:   3 = kobold geomancer / kobold brigand
:   else
KMONS:   14 = kobold blastminer
KMONS:   267 = kobold geomancer / kobold brigand / kobold demonologist
KMONS:   3 = kobold blastminer / kobold geomancer
:   end
: elseif you.in_branch("Orc") then
KMONS:   1 = kobold demonologist
KMONS:   27 = kobold geomancer / kobold brigand / kobold demonologist
KMONS:   3 = kobold blastminer / kobold geomancer
KMONS:   46 = kobold blastminer
# A demon-summoning orc working with the kobold demonologist.
KMONS:   5 = orc high priest / orc sorcerer
SUBST:   R = Rx
: end
# It's not an ambush if you see it coming. Sometimes, they're already
# dead of mysterious causes.
SHUFFLE: 347"/347"/eeee
: if you.in_branch("D") and you.depth() < 5 then
KFEAT:   ^ = net trap / tyrant's trap
: else
KFEAT:   ^ = net trap / tyrant's trap / alarm trap
SHUFFLE: 34, wl
: end
KFEAT:   M = cache_of_meat
# Always found while autoexploring into gold. Used to pause and reveal
# the "bait" to the player, and the "secret door" is thematic.
KFEAT:   - = x mimic
KFEAT:   X = x
SHUFFLE: M%, ^!
SUBST:   ^ = ^', ! = '
CLEAR:   R
FTILE:   '"$eMX23467%^!- = floor_orc
TILE:    X- = wall_orc
: dgn.delayed_decay(_G, 'e', 'kobold corpse')
: decorative_floor(_G, 'S', "skull pike")
MAP
    RRRRRRRRRRRRRRRRR
 RRRxxxxxxxxxxxxxxxxxRRR
RxxxxXXXXXXXXXXXXXXXxxxxR
RxXXXXXXXXXXXXXXXXXXXXXxR
RxXXXXXX''''''''''XXXXXxR
RxXXXXXX'www''www'''$XXxR
RxXX'''''w''M%''w'XXXXXxR
RxXX"XXX3w7X^!X7w4XXXXXxR
RxXX$XXXXXXX''XXXXXXXXXxR
RxXXXXXXXXXX!^XXXXXXXXXxR
RxXXXXXXXXXX--XXXXXXXXXxR
RxxXXXXXX$''''XXXX$XXXxxR
 RxXXXXXXXXX'''''''XXXxR
 RxxXXXXXXXX62XXXXXXXxxR
  Rxxxxxxxxx++xxxxxxxxR
  Rxxxxxxx...1xxxxxxxxR
   RRRRRRx5wwwxRRRRRRR
         x..S.
           ...
ENDMAP

# Quoth the goblin description, "Sadly, no number of raucous goblin
# parties will put them in a welcoming mood toward adventurers."
NAME:    darby_raucous_goblin_parties
TAGS:    no_monster_gen no_pool_fixup
DEPTH:   D:1-4
# 1: Bouncer. 2: Guard pet. 3-4: Partiers. 5: Drummer. 6: Kitchen pest.
KMONS:   1 = hobgoblin
KMONS:   34 = goblin
KMONS:   5 = Robin band, hobgoblin
KMONS:   p = withered plant
KMONS:   F = fungus / toadstool
ITEM:    potion of moonshine pre_id
ITEM:    potion of ambrosia pre_id / potion of berserk rage pre_id
KFEAT:   MP = cache_of_meat
SHUFFLE: 12, dM, Pe
: if you.depth() == 1 then
KMONS:   2 = jackal / ball python w:5
KMONS:   6 = rat w:20 / endoplasm / dart slug
SUBST:   5 = 1, e = de
NSUBST:  4 = 1:4 / *:'
: elseif you.depth() == 3 then
KMONS:   2 = jackal band / jackal w:5
KMONS:   6 = rat / clockroach
: elseif you.depth() == 4 then
KMONS:   2 = hound / adder w:5
KMONS:   6 = clockroach / sleepcap
: end
NSUBST:  e = 1:e / *:d
COLOUR:  '4 = red
FTILE:   '4 = floor_rough_red
: vault_granite_statue_setup(_G, "G", "broken pillar")
: decorative_floor(_G, 'D', "djembe set")
MAP
        x
       xxx
      xx.xx
     xx.5.xx
    xxF.D..xx     x
   xxd......xx   xxx
  xxM.G...G..xx xxPxx
 xxd.4''''''..xxxF6Pxx
xxF3.'4'4'4'...+....Fxx
 xxM.4''''''..xxxe3Fxx
  xxd.G...G..xx xxexx
   xxF......xx   xxx
    xx.....xx     x
     xm...mx
     xmx.xmx
    xxpx+xpxx
    xp.1.2.px
ENDMAP

# The gnolls tire of killing adventurers, and would prefer to scare
# you away, but if you insist... Themed around infamous top killers
# and experiments in heavy warning without runed doors. Unlike true
# runed doors, the monsters here are smart enough to path to you if
# you linger in their home.
NAME:    darby_intimidation_tactics
TAGS:    no_monster_gen no_item_gen
DEPTH:   D:1-6
WEIGHT:  5 (D:1-3), 10
# They are still in-depth, since the vault is both early and is not
# no_tele_into, just the meanest representatives of their depth.
: if you.depth() == 1 then
MONS:    bat / rat / ball python, jackal band, gnoll
: elseif you.depth() < 4 then
MONS:    bat / rat / ball python / ribbon worm / adder, gnoll band
KMONS:   3 = Sigmund, gnoll ; halberd . throwing net
: else
MONS:    adder / scorpion / hound / black bear, gnoll bouda band
KMONS:   3 = Sigmund, gnoll sergeant
: end
KMONS:   D = pile of debris
ITEM:    mundane mace no_pickup / mundane hand axe no_pickup / \
         mundane spear no_pickup / mundane falchion no_pickup / \
         mundane dagger no_pickup
KFEAT:   z = v
SUBST:   z = vzz
NSUBST:  e = 2:e / * = e'', ' = 1:' / * = '..
KPROP:   z' = bloody
TILE:    vz = dngn_metal_wall_darkgray
TILE:    m = dngn_transparent_wall_red
: dgn.delayed_decay(_G, 'e', 'human corpse')
: decorative_floor(_G, 's', "skull pike")
MAP
  xxxxxxxxxxxxxxx
  xvvvvvvvvvvvvvx
  xv.....D.....vx
  xv.s...D.....vx
xxxv.....D.....vxxx
xvvv...vvvvv+++vzzx
xv.......v'e'eeeezx
xv$..3..$ve1e'e1ezx
xv%v.2.v%v'e'eeeezx
xvvvmmmvvvvv+++vzzx
xxxv.....D.....vxxx
  xv.}...D...s.vx
  xv.....D.....vx
  .v+++vvvvvvvvv.
  .zeeezdddvdddv.
  .ze1ez.s.v.s.v.
  ..eee..........
ENDMAP

################################################################################
#
# <<4>> Demons and undead
#
################################################################################

NAME:  minmay_nine_imps
DEPTH: D:6-11
MONS:  crimson imp / white imp w:3 / shadow imp w:1
MONS:  crimson imp ; any good_item
MAP
xxxxx
x121x
x111x
x111x
xx+xx
ENDMAP

NAME:   minmay_metal_thing
TAGS:   no_descent
DEPTH:  Depths
MONS:   iron dragon, rust devil
KPROP:  .1$| = no_tele_into
NSUBST: ? = 1:+ / *:v
MAP
xxxlllllllllllllllllxxx
xxxlvvvlvlvvvlvlvvvlxxx
xxxlv2vlvlv1vlvlv2vlxxx
llllv$vlvlv$vlvlv$vllll
lvvvv$v?v?v$v?v?v$vvvvl
lv1$$|$$$$$|$$$$$|$$1vl
lvvvv$v?v?v$v?v?v$vvvvl
llllv$vlvlv$vlvlv$vllll
xxxlv2vlvlv1vlvlv2vlxxx
xxxlvvvlvlvvvlvlvvvlxxx
xxxlllllllllllllllllxxx
ENDMAP

NAME:   minmay_beelzebubs_servants
TAGS:   transparent
DEPTH:  D:10-
MONS:   orange demon, red devil
NSUBST: 1 = 1:1 / * = 1., 2 = 1:2 / * = 2.
MAP
........................
..xxxx....xxxx....xxxx..
.xx1.xx..xx**xx..xx.1xx.
.x21................12x.
.x21................12x.
.xx1.xx..xx**xx..xx.1xx.
..xxxx....xxxx....xxxx..
........................
ENDMAP

# Inspired by the Jorge Luis Borges story "The Circular Ruins".
NAME:   bh_circular_ruins
TAGS:   transparent
DEPTH:  D:7-12
MONS:   human simulacrum
KMONS:  D = pile of debris
: if you.absdepth() > 10 then
KMONS:  O = fire elemental
: end
ITEM:   stone q:1 no_pickup
KITEM:  O = book of dreams
SUBST:  E : ddD, F : ddD
MARKER: O = lua:fog_machine { cloud_type = "flame", pow_min = 15, \
                              pow_max = 20, delay = 15, size = 2, \
                              walk_dist = 1, excl_rad = 1}
TILE:   x = wall_catacombs
TILE:   c = wall_stone_scorched
MAP
  ..
 .xxd  ...
.xx1..Fxxx.
.x.......xx.
 d...xx...x.
  ..xc....x.
  E.x.O.x.E
 .x....cx..
 .x...xx...d
 .xx.......x.
  .xxxF..1xx.
   ...  dxx.
         ..
ENDMAP

################################################################################
# Some earlyish demon minivaults by Eino.
# The difficulty of most low-tier demons is lost by the time the player gets to
# meet them. Here they aspire to be both challenging and flavourful.

##### Red devils (4) can use weapons and armour.
NAME:    einodemon_armed_red_devil_minivault
TAGS:    patrolling transparent
DEPTH:   D:8-12, Orc
MONS:    red devil ; spear | trident . ring mail | scale mail
MONS:    red devil ; spear | trident . buckler
MONS:    red devil ; spear | trident . boomerang
MONS:    orc warrior ; trident good_item . ring mail
KITEM:   $ = $ no_pickup
SHUFFLE: 1234
KMASK:   l = no_monster_gen
MAP
...........
.ll.v.v.ll.
.l..v.v..l.
...vv.vv...
.vvv1$2vvv.
....$.$....
.vvv3$4vvv.
...vv.vv...
.l..v.v..l.
.ll.v.v.ll.
...........
ENDMAP

##### Demonic crawlers (s) and beetles.
NAME:   einodemon_crawler_minivault
TAGS:   patrolling transparent
DEPTH:  D:13-, Elf, Spider
MONS:   demonic crawler
MONS:   vampire mosquito / boulder beetle w:8 / demonic crawler w:2
NSUBST: 2 = 2:2 / 1:. / * = 22.
: if you.in_branch("Spider") then
SUBST:  G = x, m = mx
: else
SUBST:  G : GGGx
:   vault_metal_statue_setup(_G, "G", "mystic cage")
: end
MAP
..........
.m.mmmmmm.
.mx.x.x*m.
.m.x2x2xm.
.mG2x1x.m.
.m.x1x2Gm.
.mx2x2x.m.
.m*x.x.xm.
.mmmmmm.m.
..........
ENDMAP

##### Orange demons (4), manticores, scorpions.
NAME:  einodemon_barbed_minivault
TAGS:  patrolling transparent
DEPTH: D:12-, Orc
MONS:  orange demon, scorpion, manticore
NSUBST: 1 = 2:1 / * = 1.., 2 = 2:2 / * = 2..
MAP
xxxxxxxxxxxxx
@.....xxxxxxx
xxxxx..xxxxxx
xxxxxx.xxxxxx
xx1*x...x*1xx
x12.2...2.23x
x32.2...2.21x
xx1*x...x*1xx
xxxxxx.xxxxxx
xxxxxx..xxxxx
xxxxxxx.....@
xxxxxxxxxxxxx
ENDMAP

# Carrion pond
# Bad water, a lot of carrion and feeders around, yuck!
NAME:   roderic_carrion_pond
TAGS:   no_monster_gen no_trap_gen transparent extra
DEPTH:  Lair:2-, !Lair:$, Swamp
MONS:   vampire mosquito, bloated husk
NSUBST: ' = 1:1 / 2:. / * = 111.
: if you.in_branch("Swamp") then
SUBST:  1 = 2
: end
SUBST:  ? = %%.
: dgn.delayed_decay(_G, '%', 'any corpse')
MAP
 ..'..?..
.?'.?.??'.
'?.www?.?.
.'wwwww.?.
?..ww?.?'.
 .?'.?...
ENDMAP

###############################################################################
# Kobold demonologist guarded by shadows.
# Added "evil rite" looking colours, so players expect some nastiness.
#
NAME:   nrook_kobold_shadow_demons
TAGS:   patrolling transparent
DEPTH:  Depths
KMONS:  1 = kobold demonologist
KMONS:  2 = shadow demon / shadow dragon w:5
KITEM:  1 = | / *, * / %
NSUBST: 2 = 1:2 / 3 = 2""" / *:"
COLOUR: ' = white
COLOUR: "12 = darkgrey
FTILE:  'G = floor_pebble_lightgray
FTILE:  "12 = floor_pebble_darkgray
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
    ...
  .'''''.
 .'''''''.
 ''G222'''
.''22222''.
.''22122''.
.''22222''.
 '''222G''
 .'''''''.
  .'''''.
    ...
ENDMAP

#############################################################
# Fire demons vs. ice demons
NAME:   minmay_fire_ice_demons
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:4-, Depths, Coc, Geh
MONS:   brimstone fiend, ice fiend
MONS:   balrug / hellion, blizzard demon
MONS:   sun demon / smoke demon w:5, ice devil
MONS:   crimson imp ; spear ego:flaming
KMONS:  8 = white imp
KFEAT:  yz = crystal_wall
# Demote each grouping down the paired tiers above,
# and downgrade the loot, depending on depth.
: if you.branch() == "Depths" then
SUBST:  '" = |
: elseif you.branch() == "D" then
SUBST:  > = .
: end
: if you.absdepth() >= 27 then
NSUBST: 5 = 1:3 / *:., 6 = 1:4 / *:.
SUBST:  '" = ., > = }
: elseif you.absdepth() >= 16 then
SUBST:  56 = ., 3 = 5, 4 = 6, 1 = 3, 2 = 4
SUBST:  " = |, ' = *
: elseif you.absdepth() >= 12 then
NSUBST: 5 = 1:5 / *:., 6 = 1:6 / *:.
SUBST:  3 = 7, 4 = 8, 1 = 5, 2 = 6
SUBST:  " = *, ' = %
: elseif you.absdepth() >= 8 then
NSUBST: 3 = 2:7 / 1:. / * = 77., 4 = 2:8 / 1:. / * = 88.
SUBST:  1 = 7, 2 = 8
SUBST:  '56 = ., " = %
: else
SUBST:  '3456 = ., 1 = 7, 2 = 8, " = %
: end
SHUFFLE: yz / CC / CC
SUBST:   C = c
TILE:    y = bedevilled_crystal_gehenna
TILE:    z = bedevilled_crystal_cocytus
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
............. .............
..ccccccc.........ccccccc..
.cc'3553ccc.....ccc4664'cc.
.c"'lll..5cy...cc6..www'"c.
.c1lllll..5..>..6..wwwww2c.
.c"'lll..5cc...zc6..www'"c.
.cc'3553ccc.....ccc4664'cc.
..ccccccc.........ccccccc..
............. .............
ENDMAP


NAME:    hallowed_hall
TAGS:    no_monster_gen no_trap_gen no_pool_fixup
DEPTH:   Depths
KMONS:   1 = pearl dragon
KMONS:   2 = apis
KMONS:   34 = ophan
KMONS:   P = plant
KMONS:   S = sacred lotus
ITEM:    potion of curing pre_id / potion of heal wounds pre_id
KFEAT:   A = altar_the_shining_one
KFEAT:   B = altar_elyvilon
KFEAT:   C = altar_zin
KFEAT:   S = w
SHUFFLE: ABC
COLOUR:  c = white
TILE:    c = wall_church
FTILE:   .+d123GgtABC = floor_limestone
COLOUR:  .123 = white
TILE:    G = dngn_statue_depths_zot_angel
: vault_metal_statue_setup(_G, "g", "silver statue")
MAP
xxxxxxxxx
xcccccccx
xcGdBdgcx
xcd.1.dcx
xcA.2.Ccx
xcd...dcxP''
xcg...Gcx'''''
xccc+cccxP''''''
xct...Scx''''''''
xc..2..cx'''''''''xx
xc..3..+'''4''''''cx
xcS....c'''''''''Pcx
xccccccccccccccccccx
xxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   hangedman_tell_no_tales
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  D:11-, !D:$
MONS:   spriggan draugr, troll draugr
KMONS:  A = unseen horror
KFEAT:  def = cache_of_baked_goods
SUBST:  D : DDDDE
NSUBST: D = 1 = A:4 .:1 / 2:d / 2:e / 1:1, E = 2:d / 2:e / 2:1
KPROP:  def = bloody
MAP
 cccccccccc
ccxx+x1+DDc
c.x.x..mDDc
@.d.x2.mDDc
c.x.x..cc+c
ccxx+x1c*fc
 cccccccccc
ENDMAP

NAME:   hangedman_weighted_door
TAGS:   extra
DEPTH:  D:9-, Crypt
MONS:   zombie / simulacrum
KMONS:  A = spectral thing
KMONS:  P = pile of debris
KITEM:  A = any good_item
KMASK:  .%* = no_monster_gen
KITEM:  * = star_item
KITEM:  % = any
KMASK:  1 = no_item_gen
MAP
cccc cccc
c11ccc%*c
c11cAc$%c
cn+++++nc
cPPPPPPPc
c@..$..@c
ENDMAP

NAME:   hangedman_blasphemy
TAGS:   no_monster_gen vaults_hard
DEPTH:  Vaults, !Vaults:$, Crypt
MONS:   phantasmal warrior, apis draugr, pearl dragon zombie
MONS:   patrolling profane servitor, death knight
COLOUR: t = brown, c = white
FTILE:  t' = floor_pebble_brown
: if you.in_branch("Vaults") then
SUBST:  @ = .
FTILE:  .1234V$%* = floor_metal_gold
CLEAR:  X
: else
SUBST:  X = x
: end
TILE:   G = dngn_statue_angel
TILE:   t = dngn_tree_dead, c = wall_stone_gray
KFEAT:  _ = altar_yredelemnul
: single_cloud(_G, "_", "foul pestilence", true)
: decorative_floor(_G, 'V', "broken floral vase")
TILE:   V = dngn_flower_pot_broken / dngn_dark_flower_pot_broken
: set_feature_name("tree", "dead tree")
KMASK:  _ = no_item_gen
MAP
@@xxxxxxxXXXXX
@..t....xxxxxXX
x...'''..cV2xXX
xt...tc'.c..xxx
x.'.11c'...G.2x
x.'t1cc't....Vx
x.'ccc'G...ccxx
x..'''G'''...xX
xx...t.'_ccc.xX
Xxcc...'cc3*%xX
XxV.....c34$xxX
Xx2.G.c.c*$5xxX
Xxxx..c..%xxxx
XXXx2Vxxxxxxxx
 XXxxxxXXXXX
ENDMAP

NAME:    hangedman_devilish_allure
TAGS:    no_monster_gen no_item_gen
DEPTH:   D:12-, Depths
WEIGHT:  5
MONS:    obsidian statue, lesser demon, common demon
MONS:    efreet / large abomination / rakshasa
MONS:    shadow demon / green death / blizzard demon / balrug / cacodemon / \
         sin beast / hellion / reaper / tormentor / zykzyl w:2
KITEM:   | = superb_item / any good_item / randbook disc:summoning w:5
: if you.in_branch("Depths") then
SUBST:   2 = 3, 4 = 5, v = c
NSUBST:  3 = 1:5 / *:3
TILE:    c = stone_wall_pyre
: else
SUBST:   b = bbv
: end
SHUFFLE: {( / <<
KPROP:   2345*| = no_tele_into
TILE:    b = bedevilled_crystal_pandemonium
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
xxxxxxxxxxxx@@x
@.lxlll.l.l...x
@..xl..l.l.l.lx
x.{xl%vvvvvvvvx
x..m$.v2234*vvx
xl.m2|123334|bx
x..m$.v2234*vvx
x.(xl%vvvvvvvvx
@..xl..l.l.l.lx
@.lxlll.l.l...x
xxxxxxxxxxxx@@x
ENDMAP

NAME:    hangedman_batty
TAGS:    patrolling no_monster_gen no_item_gen
DEPTH:   D:11-, Crypt, !Crypt:$
WEIGHT:  5
MONS:    vampire bat, phantom, vampire, unseen horror
MONS:    phantasmal warrior, vampire knight, jiangshi
KMONS:   8 = vampire bloodprince
KFEAT:   8 = fountain_blood
KITEM:   8d = sanguine talisman
KITEM:   % = % no_pickup
KITEM:   * = * no_pickup
# Notably, sometimes fill in parts of the grid.
SHUFFLE: ABC, DE, FGH, 34 / 34 / 34 / 43
SUBST:   A = 1, F = 2, B : xx..., D : xx..., G : xx..., CEH = .
SUBST:   I : c...., 5 = 3333445, * = ***d
: if you.in_branch("Crypt") then
SUBST:   4 = 7, 3 = 6668, 2 = 5, 1 = 1444
SUBST:   c = v, x = c
: end
MAP
xx@xxxxxxxxxxx
x.x.xxxxxxxxxx
@x.x.xAxBxxxxx
x.x.x.x.x1xxxx
xx.x4....xCxxxxxxx
xxx..%....xxxxxxxx
xxAx..%..xDxxxxxxx
xxx....%..cExFxxxx
xxBx....Ic.x.x1xxx
xxx1x.x.cI..%.xGxx
xxxxCxDc..*..%.xxx
xxxxxxxEx..*..xHxx
xxxxxxxx.%..*..xxx
     xxFx.%..3x4xx
     xxx1x.x.x5xxx
     xxxxGxHx4xxxx
     xxxxxxxxxxx
     xxxxxxxxxxx
ENDMAP

NAME:    nzn_life_drinkers
TAGS:    no_monster_gen no_item_gen no_wall_fixup vaults_hard
DEPTH:   D:8-, Crypt, Vaults, Depths
ITEM:    sanguine talisman
SHUFFLE: '-
NSUBST:  ' = 1:D / 1:DE / *:.
SUBST:   V = V:50 Y
: if you.in_branch("Vaults") then
MONS:    vampire knight, vault warden ; scimitar ego:vampirism . plate armour
SUBST:   @ = ., - = |||*d
NSUBST:  1 = 1:2 / 2:1 / *:.
TILE:    x = wall_undead
FTILE:   `?VY = floor_w_marble
FTILE:   .12dDE*| = floor_metal_gold
: elseif not you.in_branch("D") then
:   if you.in_branch("Depths") then
MONS:    vampire mage / chonchon w:3
:   else
MONS:    vampire mage
:   end
SUBST:   x = c, - = **%%d, ` = $
: else
MONS:    vampire, vampire mage
SUBST:   - = %:9 d:1, x = c, ` = .
:   if you.absdepth() > 11 then
NSUBST:  1 = 1:2 / 2:1 / *:.
:   end
: end
: if not you.in_branch("D") or you.depth() > 10 then
# Chosen to represent gods that heal on kills, I guess.
KFEAT:   D = altar_makhleb
KFEAT:   E = altar_the_shining_one
: else
SUBST:   DE = .
: end
: decorative_floor(_G, '?', "mourning vase")
MAP
       @
      c+c
     cc.cc
    cc...cc
   cc.....cc
  cc...1...cc
 cc`..'x-..`cc
ccV`?1xxx1?`Vcc
 cc`..-x'..`cc
  cc...1...cc
   cc.....cc
    cc...cc
     cc.cc
      c+c
       @
ENDMAP

NAME:    nicolae_burly_brawl
TAGS:    transparent no_monster_gen
DEPTH:   D:13-, Depths:2-
KMONS:   1 = rakshasa
SHUFFLE: {[(
NSUBST:  D = 2=1 / ., E = 2=1 / .
: if you.in_branch("D") then
SUBST:   1 = 1..
: end
FTILE:   .{[(1G = floor_mystic_chasm
MAP
xxxxxxxxxxxxxxxxx
xGD..D..1..E..EGx
xx.............xx
 x.............x
 +1..D..{..E..1+
 x.............x
xx.............xx
xGD..D..1..E..EGx
xxxxxxxxxxxxxxxxx
ENDMAP

# Another NetHack-inspired vault, based on the top floor of Vlad's Tower.
NAME:  nicolae_nh_vlads_tower
TAGS:  transparent patrolling
DEPTH: D:10-, Crypt
: if you.in_branch("D") then
:   if you.absdepth() < 12 then
KMONS:  _ = vampire
KMONS:  1 = vampire bat
:   elseif you.absdepth() < 14 then
KMONS:  _ = vampire mage
KMONS:  1 = vampire
:   else
KMONS:  _ = vampire mage / vampire knight
KMONS:  1 = vampire / jiangshi
:   end
TILE:   c = dngn_stone_wall_darkgray
NSUBST: z = 2:yzz / *:y
: else
KMONS:  _ = vampire bloodprince
KMONS:  1 = vampire mage / vampire knight / jiangshi
SUBST:  c = v
: end
KITEM:  | = |
KITEM:  _ = * / sanguine talisman
KITEM:  1 = %
KFEAT:  yz = c
KFEAT:  _ = altar_dithmenos / altar_kikubaaqudgha / altar_makhleb / \
            altar_yredelemnul
TILE:   y = dngn_stone_wall_red
TILE:   z = wall_stone_magic_shelf
MAP
xxxxxxxxxxxxxxxxx
xxxczcxczcxczcxxx
xxxc1cxc1cxc1cxxx
xccc+ccc+ccc+cccx
xc.......+.+...cx
xccc+ccccc.ccc+cx
xxxc..._|y.+1c..@
xccc+ccccc.cccccx
xc.......+.+...cx
xccc+ccc+ccc+cccx
xxxc1cxc1cxc1cxxx
xxxczcxczcxczcxxx
xxxxxxxxxxxxxxxxx
ENDMAP

NAME:   nicolae_demonic_statue_gallery
TAGS:   transparent
DEPTH:  D:9-13
KMONS:  5 = lesser demon
KMONS:  4 = orange demon / hellwing / ice devil / \
            rust devil / red devil / chaos spawn
KMONS:  3 = soul eater / sun demon / sixfirhy / \
            smoke demon / neqoxec / ynoxinul
: if you.depth() > 11 then
NSUBST: D = 1:3 / 1:34 / 1:345 / 1:45 / 3=5 / * = 5.
: else
NSUBST: D = 2:4 / 2:45 / 2:5 / * = 5.
: end
MAP
 ccGl@lGcc
ccGl...lGcc
cGl..D..lGc
Gl.D.l.D.lG
l...lGl...l
@.DlGcGlD.@
l...lGl...l
Gl.D.l.D.lG
cGl..D..lGc
ccGl...lGcc
 ccGl@lGcc
ENDMAP

# It's mostly ufetubi. It's fine. You'll be fine.
NAME:    nicolae_fort_ynox
TAGS:    transparent no_pool_fixup
DEPTH:   D:9-12
MONS:    ufetubus, ynoxinul
KFEAT:   - = iron_grate
SHUFFLE: }])>>
NSUBST:  ` = 6:1 / 4 = 1. / *:.
MAP
    .........
   ..wwwwwww..
  ..wwv---vww..
 ..wwvv}])vvww..
..wwvv2...2vvww..
.wwvv..```..vvww.
.wvv..`````..vvw.
.w-$.```````.$-w.
.w-$.```G```.$-w.
.w-$.```````.$-w.
.wvv..`````..vvw.
.wwvv..```..vvww.
..wwvv.....vvww..
 ..wwvv...vvww..
  ..wwv+++vww..
   ..ww...ww..
    .........
ENDMAP

NAME:    nicolae_neqoxec_dot_bat
TAGS:    transparent
DEPTH:   D:9-12
KMONS:   3 = neqoxec
KMONS:   4 = chaos spawn / hellwing / ice devil / orange demon / red devil / \
             rust devil
KFEAT:   z = c
NSUBST:  3 = 2:3 / 1:4 / * = 44.
SUBST:   % = %%%*, z : zzc
TILE:    z = wall_stone_magic_shelf
MAP
           cccccc
         cccccccccc
       cccc......cccc
  cc@@ccc..........ccc@@cc
 cc...cc....cccc....cc...cc
 cc..cc...cccczccc...cc..cc
cc...cc..ccc%..%ccc..cc...cc
cc..cc.......3.3.cc.......cc
cc..cc.....3......cc......cc
cc..ccczcc...GG.3.cccccc..cc
cc..cccccc.3.GG...cczccc..cc
cc......cc......3.....cc..cc
cc.......cc.3.3.......cc..cc
cc...cc..ccc%..%ccc..cc...cc
 cc..cc...ccczcccc...cc..cc
 cc...cc....cccc....cc...cc
  cc@@ccc..........ccc@@cc
       cccc......cccc
         cccccccccc
           cccccc
ENDMAP

# oh nice you can put ' in vault names
NAME:   nicolae_where_there's_smoke
TAGS:   transparent
DEPTH:  D:9-12
KMONS:  2 = nothing / hellwing / red devil / rust devil
KMONS:  3 = patrolling smoke demon
KITEM:  2 = % / nothing
KITEM:  3 = *
KFEAT:  - = iron_grate
NSUBST: ` = . / c, c = 2:. / 3:.c / c
SUBST:  Cc = cccc-l, L = ll.
MAP
    .........
  .............
 ......cLc......
 ....LL`c`LL....
....Lccc.cccL....
...LcCL.2.LCcL...
...LcLLL.LLLcL...
..c`c.L...L.c`c..
..Lc.2..3..2.cL..
..c`c.L...L.c`c..
...LcLLL.LLLcL...
...LcCL.2.LCcL...
....Lccc.cccL....
 ....LL`c`LL....
 ......cLc......
  .............
    .........
ENDMAP

NAME:    roadster_capsule_ark_zombie
TAGS:    no_monster_gen patrolling
DEPTH:   D:6-, Crypt
: if you.branch() == "D" then
:   if you.depth() < 10 then
MONS:   adder zombie / scorpion zombie / \
        hound zombie w:20 / howler monkey zombie
MONS:   weeping skull w:1 / human zombie / elf zombie / centaur zombie w:20
MONS:   killer bee zombie / elephant zombie / ogre zombie
:   else
MONS:   wolf zombie / killer bee zombie / spriggan zombie / centaur zombie
MONS:   small abomination / meliai zombie / \
        elephant zombie / two-headed ogre zombie
MONS:   harpy zombie / laughing skull / hydra zombie
:   end
: else
MONS:   large abomination / jiangshi / laughing skull / ettin zombie
MONS:   spriggan defender zombie w:20 / dire elephant zombie / \
        iron dragon zombie
MONS:   deep elf blademaster zombie / caustic shrike zombie / \
        storm dragon zombie / golden dragon zombie
: end
KITEM:  d = $ / %, any good_item
KFEAT:  C = altar_kikubaaqudgha / altar_yredelemnul
MARKER: F = lua:fog_machine{ cloud_type = "black smoke", \
            pow_min = 24, pow_max = 32, delay_min = 280, delay_max = 320, \
            size_min = 1, size_max = 2, start_clouds = 2, size_buildup_amnt = 1 }
: single_cloud(_G, "l", "flame", false)
MAP
    v
   vvv
   +2+
 vmv1vmv
 vm212mv
vv11311vv
vd31113dv
vvmv+vmvv
@.FlClF.@
ENDMAP

################################################################################
#
# <<5>> Stationary shooters: statues, oklobs, fog generators.
#       We include fog generators here, as they won't move away either.
#
################################################################################

NAME:  minmay_statue_bubble
TAGS:  transparent
DEPTH: D:9-
MONS:  obsidian statue / orange crystal statue / ice statue w:5
NSUBST: ? = 1:. / *:?
SUBST:  ? = bb.
MAP
 .......
..bG?Gb..
.bG...Gb.
.G..*..G.
.?.*1*.?.
.G..*..G.
.bG...Gb.
..bG?Gb..
 .......
ENDMAP

NAME:  minmay_protected_statue
TAGS:  transparent
DEPTH: D:9-, Depths, !Depths:$
: if you.in_branch("Depths") then
MONS: orange crystal statue
: else
MONS:  obsidian statue / orange crystal statue
: end
MONS: plant, bush
SUBST: n : n:20 G 2:1 3:1
KFEAT: n = iron_grate
KMASK: 1 = opaque
MAP
  ...
 .*|*.
.*nnn*.
.|n1n|.
.*nnn*.
 .*|*.
  ...
ENDMAP

NAME:   minmay_statue_crystal_thing
TAGS:   transparent
DEPTH:  D:9-
MONS:   orange crystal statue w:30 / obsidian statue / ice statue w:5
KFEAT:  ~ = closed_clear_door
MAP
      .....
    ...b=b...
  ...bbb.bbb...
  .bbb.....bbb.
 ..b...b~b...b..
 .bb.bbb.bbb.bb.
..b..b.....b..b..
.bb.bb..*..bb.bb.
.=..~..*1*..~..=.
.bb.bb..*..bb.bb.
..b..b.....b..b..
 .bb.bbb.bbb.bb.
 ..b...b~b...b..
  .bbb.....bbb.
  ...bbb.bbb...
    ...b=b...
      .....
ENDMAP

NAME:   minmay_dual_archer_statues
TAGS:   transparent
DEPTH:  D:10-
WEIGHT: 2
MONS:   statue tile:mons_statue_archer name:archer name_adjective; \
        longbow
MONS:   bush
MAP
.........
...ccc...
.ccc|ccc.
.c.2.2.c.
.c12.21c.
.c.2.2.c.
.ccc.ccc.
...c+c...
.........
ENDMAP

# Another Ice Statue vault
NAME:   ice2_lemuel
TAGS:   no_pool_fixup no_monster_gen no_descent patrolling
DEPTH:  D:12-, Depths, !Depths:$, Lair:2-
KMONS:  1 = ice statue
KMONS:  2 = white imp / ice beast w:30 / polar bear
KMONS:  3 = ice devil w:8 / ice dragon / freezing wraith
KMONS:  4 = storm dragon simulacrum w:8 / blizzard demon
KMONS:  5 = ice fiend / walking frostbound tome
KFEAT:  1 = >
ITEM:   rimehorn talisman / rimehorn talisman randart w:1
ITEM:   hat ego:ice / helmet ego:ice
: if you.absdepth() > 20 then
NSUBST: | = 1:1 / *:|
SUBST:  | = ||****%%e, 3 = 5, 2 = ..334, b = bwww
: else
SUBST:  | = ||****%%%d, 2 = 2., b = w
: end
SUBST:  T = TU, W = w:20 W .:5, ' = W
TILE:   b = bedevilled_crystal_cocytus
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
T.WWW..........WWW.T
.'WWW..........WWW'.
WW'W.Wwww..wwwW.W'WW
WWW2WwwwwwwwwwwW2WWW
WW222wwwwwwwwww222WW
..W2WwwwwwwwwwwW2W..
.WWWWwwwwwwwwwwwWWW.
..WWwwww||||wwwwWW..
...Wwwwb|13|bwwwW...
..WWwwww||||wwwwWW..
.WWWWwwwwwwwwwwWWWW.
..W2WwwwwwwwwwwW2W..
WW222wwwwwwwwww222WW
WWW2WwwwwwwwwwwW2WWW
WW'W.Wwww..wwwW.W'WW
.'WWW..........WWW'.
T.WWW..........WWW.T
ENDMAP

# Oklob assault; statistically, three oklobs
NAME:    dpeg_oklob_1
TAGS:    transparent
DEPTH:   Lair:3-
MONS:    plant, oklob plant, bush
SUBST:   ? = 1 2:5 '
SHUFFLE: '"
SUBST:   ' : W .:5
SUBST:   " = .
SUBST:   1 = 113
MAP
   ...........
  .............
 .....'''''.....
.....''???''.....
....''?????''%...
...%''?????''....
.....''???''.....
 .....'''''.....
  .............
   ...........
ENDMAP

NAME:   statue_in_the_mist_lemuel
TAGS:   extra no_exits
DEPTH:  D:9-, Depths, Orc, Elf, Snake, Swamp
: if you.in_branch("Depths") or you.in_branch("Elf") then
KMONS:  1 = orange crystal statue
: else
KMONS:  1 = orange crystal statue / obsidian statue / ice statue
: end
KITEM:  1 = %, % / $
MARKER: G = lua:fog_machine { cloud_type= "grey smoke", \
            pow_min = 10, pow_max = 20, delay_min = 15, delay_max = 35, \
            size = 3, walk_dist = 2, spread_rate= 25 }
: if you.in_branch("Abyss") then
SUBST:  G : G111
: end
MAP
G
ENDMAP

# Greed's colour
NAME:    david_greed
DEPTH:   D:10-, Elf
WEIGHT:  4
: if you.in_branch("Elf") then
MONS:    orange crystal statue / obsidian statue
: else
MONS:    obsidian statue / orange crystal statue / ice statue
: end
ITEM:    nothing / any good_item
SHUFFLE: d|
MAP
xxxxxxxxxxxx
xxxxxxbbbbbx
xbbbbbb..1bx
@.........bx
I.*.....d|bx
@.........bx
xbbbbbb..1bx
xxxxxxbbbbbx
xxxxxxxxxxxx
ENDMAP

# Rather shallow depth but you cannot randomly teleport in there.
NAME:    minmay_crystal_box
TAGS:    no_monster_gen patrolling transparent no_descent vaults_hard
DEPTH:   D:12-, Vaults, !Vaults:$
MONS:    crystal guardian, thermic dynamo
MONS:    orange crystal statue, ironbound mechanist
KFEAT:   + = closed_clear_door
SUBST:   . = .:80 %$*|
: if you.in_branch("D") then
SUBST:   14 = 0, + = =
KPROP:   .$%*|023 = no_tele_into
CLEAR:   `
: else
FTILE:   .1234$%*|+ = floor_crystal
: end
MAP
````````````````
`WWWWWWWWWWWWWW`
`WbbbbbbbbbbbbW`
`Wbb2.......1bW`
`Wbb.........bW`
`Wbb.........bW`
`Wnn.........bW`
`WW+....3.4..bW`
`Wnn.........bW`
`Wbb.........bW`
`Wbb.........bW`
`Wbb2.......1bW`
`WbbbbbbbbbbbbW`
`WWWWWWWWWWWWWW`
````````````````
ENDMAP

NAME:  minmay_more_statues
DEPTH: D:12-
MONS:  ice statue w:5 / obsidian statue / orange crystal statue
KFEAT: z = c
TILE:  c = dngn_stone_wall_darkgray
TILE:  b = dngn_crystal_lightred
: tile("z = " .. crackle_def(_G))
MAP
cccbcccccbcccccbccc
c.....z%*|*%z.....c
c.................c
b..1.....G.....1..b
c.................c
c.....z.....z.....c
cccbcccc.@.ccccbccc
ENDMAP

NAME:   hangedman_tree_tricks
TAGS:   extra no_monster_gen
DEPTH:  Lair, !Lair:$
NSUBST: T = 1:. / 1:t
KMONS:  1 = oklob plant
KITEM:  1A_ = gold / nothing w:7
KFEAT:  _ = altar_fedhas
MAP
 tttttttttt
tttt.ttttttt
@tt.t.tttttt
t.tt.t.Tt1tt
t.t.ttT.A$tt
tt.ttttA_Att
t.t.tt1$Attt
tt.ttttttttt
 tttttttttt
ENDMAP

NAME:   disabler_island
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:8-14, Lair
SUBST:  ? = W..
NSUBST: ' = 3:* / 1:> / 3:1 / *:", 1 : 2:1 / 2 = 1" / *:w
NSUBST: G = 1:2 / *:"
KMASK:  *>12" = opaque
KFEAT:  " = floor
: if crawl.one_chance_in(3) and (not you.in_branch("Lair") or crawl.coinflip()) then
MONS:   lava snake, orange crystal statue
SUBST:  wW = l
: elseif crawl.coinflip() then
MONS:   oklob plant, golden eye
MONS:   plant, bush
SUBST:  w = 334, W = .
: else
MONS:   electric eel, basilisk
: end
MAP
    ........
  ............
 ..............
 ..............
.......??.......
....?.1w1?......
....?1w'w1.?....
....1w'G'w1.....
....1'G'G'w1....
....1ww'''1?....
.....?1w1w1.....
......1.?.......
 ..............
 ..............
  ............
   .........
ENDMAP

# A stationary monster guarding a staircase.
#
# This can place a crucial locations (like Snake:1), forcing the player
# to actually deal with the problem -- hence "stationary puzzle".
# We expect players to have resources to cope with it.
#
# TODO: This could be extended to branch entries but I don't know if I can
#       do that feasibly in a single map.
#
# With increasing depth the distance between staircase and stationary monster
# can decrease, and fewer supporting walls are to be expected. Sometimes a
# nearby downstairs exit is generated, to provide another option.
#
# Monster set: currently only the classical stationary monsters, i.e.
# statues, oklob plants.
# This could be expanded: pool with electric eel, or monsters behind grates.
#
NAME:     dpeg_stationary_puzzle
DEPTH:    D:10-, Lair, Snake, Shoals, Depths
# Weights for levels not of subdepth 1 intentionally lower.
WEIGHT:   1 (D:10-, Lair:2-, Snake:2-, Shoals:2-, Depths:2-)
WEIGHT:   10 (Lair:1, Shoals:1, Snake:1, Depths:1)
: if you.in_branch("D") or you.in_branch("Lair") then
MONS:     oklob plant, electric eel
SHUFFLE:  1" / 22
: elseif you.in_branch("Snake") or you.in_branch("Shoals") then
MONS:     oklob plant / obsidian statue / orange crystal statue / ice statue /\
          w:1 Roxanne
: else
MONS:     orange crystal statue / w:1 Roxanne
: end
#
# Sometimes add some additional rock walls
SUBST:    . : ._
NSUBST:   _ = 3:x / *:.
#
# Select possible staircase range:
: if you.absdepth() < 14 then
NSUBST:   bc = 1:x / *:.
: elseif you.absdepth() < 18 then
SHUFFLE:  ab
NSUBST:   c = 1:x / *:.
: else
SHUFFLE:  abc
: end
#
NSUBST:   a = 1:{ / *:.
SUBST:    "'bc = .
#
# 50% chance for nearby >
SUBST:    x : xy
NSUBST:   y = 1:} / *:x
MAP
 ......x
 ....cbxx
 '''''cbaxx
@"1'''''aa@
 '''''cbaxx
 ....cbxx
 ......x
ENDMAP

###################################################################
#
# <<6>> Other monsters
#       Slime denizens, insubstantial monsters, everything else...
#
###################################################################

NAME:    onia_ninara_cookie
TAGS:    transparent
SHUFFLE: ABCDEF
SUBST:   A : x, B : x, C : x, D : x, E : x, F : +, G : l:50 w:50 I
SUBST:   x : xvcb
SUBST:   H = 0 ., J = 1 0:100 $:20
ITEM:    any jewellery
MONS:    glass eye
MAP
...........
..xHxHxHx..
.xxBxAxFxx.
.HCJJJxJEH.
.xxJxGxJxx.
.HDJxdxJDH.
.xxJxJxJxx.
.HEJxJJJCH.
.xxFxAxBxx.
..xHxHxHx..
...........
ENDMAP

NAME:   minmay_acid_items
TAGS:   no_monster_gen no_trap_gen transparent
DEPTH:  Depths
MONS:   slime creature w:30 / rockslime / azure jelly / acid blob w:5
MONS:   acid blob
MAP
  ...........
 ..nnnnnnnnn..
..nn1112111nn..
.nn11nnnnn11nn.
.=111+|||nn11n.
.nn11nnnnn11nn.
..nn1112111nn..
 ..nnnnnnnnn..
  ...........
ENDMAP

NAME:   hangedman_incinerator
TAGS:   no_item_gen no_monster_gen
DEPTH:  D:8-14
MONS:   fire bat, lava snake, fire elemental, hell hound, thermic dynamo
NSUBST: ' = 4:F / *:.
: if you.depth() > 11 then
NSUBST: 1 = 1:335 / *:1
: end
: single_cloud(_G, "F", "flame", true)
KPROP:  l = no_cloud_gen
TILE:   c = wall_stone_scorched
MAP
xxxxxxxxxx
xxxxxccccx
xl.1xc23cx
x1l''c|2cx
x.l''4cccx
x.ll'''xxx
x.lll''1xx
x'.llll.xx
x.'...1lxx
+xxxxxxxxx
ENDMAP

NAME:   hangedman_eye_storm
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  Depths, !Depths:$, Abyss
MONS:   golden eye, eye of draining, glass eye, eye of devastation
MONS:   great orb of eyes / shining eye w:3
ITEM:   scroll of vulnerability q:1 pre_id / orb ego:guile randart w:4 / \
        book of the spheres w:4 / potion of enlightenment q:2 pre_id
KFEAT:  m = iron_grate
KFEAT:  T = fountain_eyes
NSUBST: 5 = 2:5 / 1:3 / *:4 5:15
: if you.in_branch("Abyss") then
SUBST:  c = c:4 v:1 b:1, '| = d
: end
MAP
     c++cccc
   ccc..c3%ccc
  cc'c..c+m.%cc
 cc'mm..c.mmm.cc
 c.mm...c...mm.c
cc.m....c.5..m.cc
c.mm...mc+.5.mm.c
c1m...mm5mm...m.c
c+m.4.m|m2m.5.m+c
c1m...mm|mm...m1c
c.mm.4.mmm...mm.c
cc.m..5.T..5.m.cc
 c.mm...5...mm.c
 cc.mmm...mmm.cc
  cc..mmmmm..cc
   ccc.1+1.ccc
     ccccccc
ENDMAP

NAME:    hangedman_cracks_in_the_wall
TAGS:    no_monster_gen patrolling transparent
DEPTH:   D:9-, Depths, !Depths:$
: if you.in_branch("D") then
:   if you.depth() < 12 then
MONS:    rock fish, kobold geomancer, basilisk, cyclops
SUBST:   * = $%%, | = *
:   else
MONS:    gargoyle, cyclops, basilisk, catoblepas
SUBST:   * = %%***, | = *|, c = x
:   end
: else
MONS:    deep troll earth mage, stone giant, iron dragon, caustic shrike
SUBST:   c : cxx
: end
SUBST:   5 = 1.
MAP
xxxxxxxxxxxxxx.@@
xxxxcccccccxxx..@
xxxxc1c.c5cxxx...
xxcccc.c.ccccx...
xxc5c.ccc.c1cx...
xxcc.cc2cc.ccx...
xbc.cc.*3cc.c...@
xb.c$$x*|4cc.x..@
xbc.cc.*3cc.c...@
xxcc.cc2cc.ccx...
xxc5c.ccc.c1cx...
xxcccc.c.cccxx...
xxxxc1c.c5cxxx...
xxxxcccccccxxx..@
xxxxxxxxxxxxxx.@@
ENDMAP

NAME:    hangedman_aerie_drop
TAGS:    no_monster_gen no_item_gen no_pool_fixup
DEPTH:   Elf, Depths
MONS:    spriggan air mage ; staff of air pre_id . robe
MONS:    deep elf zephyrmancer ; rapier ego:electrocution . robe
MONS:    spriggan rider ; spear ego:electrocution . buckler . robe
MONS:    lightning spire
KMONS:   5 = dancing weapon ; any weapon good_item ego:electrocution
KMONS:   6 = spark wasp
KMONS:   E = generate_awake air elemental w:7 / air elemental w:1
KITEM:   d = any weapon good_item ego:electrocution pre_id, \
             any weapon good_item ego:electrocution pre_id, \
             storm dragon scales / storm dragon scales randart w:3
KITEM:   e = staff of air randart / storm talisman / \
             storm talisman randart w:1
KITEM:   f = mundane ring of flight no_pickup
KFEAT:   E56 = deep_water
KFEAT:   de = shallow_water
KFEAT:   T = dispersal trap
SHUFFLE: vb
NSUBST:  E = 6:E / 3 = Ew / *:w, 5 = 3:5 / *:w
: if you.branch() == "Depths" then
SUBST:   2 = 3, 5 = 6
: end
MARKER:  e = lua:fog_machine { cloud_type = "rain", pow_max = 2, \
                  delay_min = 10, delay_max = 60, size = 4, walk_dist = 2 }
KMASK:   d = opaque
KPROP:   d = no_tele_into
MAP
 .bvb bvb bvbvbtt
.bvEvbvEvbv...vbtt
@nEEwEwEEv2.5.1vtt
.bTwwv5wvb.4v4.bvt
f=wEndnE+.5nen5<bt
.bTw5vwwvb.4v4.bvt
@nEEwEwEEv2.5.1vtt
.bvEvbvEvbv...vbtt
 .bvb bvb bvbvbtt
ENDMAP

NAME:   lightli_elemental_guards
TAGS:   no_pool_fixup no_monster_gen
DEPTH:  D:10-, !D:$
MONS:   air elemental
MONS:   earth elemental
KMONS:  F = fire elemental
KMONS:  W = water elemental
KFEAT:  F = lava
KFEAT:  W = deep_water
KPROP:  %*12wWlF = no_tele_into
MAP
xxxxxxxxxxxx
x==========x
x=*%=..=x%=x
x=%1=..=2x=x
x====..====x
x=...$x...=x
x=...wl...=x
x====..====x
x=ww=..=ll=x
x=Ww=..=lF=x
x====..====x
xxxxx@@xxxxx
ENDMAP

# So he drove out the man; and he placed at the east of the garden of Eden
# Cherubim, and a flaming sword which turned every way, to keep the way of the
# tree of life.
NAME:    pf_eden
TAGS:    no_monster_gen
DEPTH:   Elf
MONS:    patrolling cherub, patrolling dancing weapon ; great sword ego:flaming
KMONS:   p = plant
KFEAT:   C = cache_of_fruit
ITEM:    randbook title:Forbidden_Fruit owner:the_Tempter \
         numspells:2 spells:summon_mana_viper&discord
NSUBST:  1 = 2:1 / *:.
NSUBST:  d = 1:d / 1:C. /  *:.
SUBST:   3 = 33.
RTILE:   x = wall_lair
FTILE:   12p.dCt@ = floor_grass_dark
FTILE:   @ = floor_moss
MAP
       xxx
  xxx xxpxx
 xxpxxxp.1xxx
xxppp2.1...px
xppp..ppx1.1x
xpdddpxxxp..xx
xpdtdpxxxx...@
xpddd.px xxp.@
xp...pxx  xxxx
xxpppxx
 xxxxx
ENDMAP

NAME:    nicolae_danse_macabre
TAGS:    transparent patrolling no_monster_gen no_item_gen no_trap_gen
DEPTH:   D:11-, Elf, Depths, Crypt
: local evilegos = util.random_subset({ "pain", "vampirism", "draining" }, 3)
: kmons("1 = dancing weapon ; demon whip good_item ego:" .. evilegos[1] )
: kmons("2 = dancing weapon ; demon blade good_item ego:" .. evilegos[2] )
: kmons("3 = dancing weapon ; demon trident good_item ego:" .. evilegos[3] )
: kmons("4 = dancing weapon ; demon whip ego:" .. evilegos[2] )
: kmons("5 = dancing weapon ; demon blade ego:" .. evilegos[3] )
: kmons("6 = dancing weapon ; demon trident ego:" .. evilegos[1] )
KFEAT:   D = altar_uskayaw
KFEAT:   E = altar_kikubaaqudgha / altar_lugonu / \
             altar_makhleb / altar_yredelemnul
KFEAT:   + = closed_clear_door
SHUFFLE: FH
# D and Elf get a runed door instead, and D gets only three weapons.
: if you.branch() == "D" then
SUBST:   + = =
NSUBST:  F = 1444 / 2555 / 3666 / .
: elseif you.branch() == "Elf" then
SUBST:   + = =
NSUBST:  F = 1 / 2 / 3 / 4 / 5 / 6
: else
NSUBST:  F = 1 / 2 / 3 / 4 / 5 / 6
: end
SUBST:   H = ., Y = YYDE
MAP
xxxm+mxxx
xx.....xx
x..FHF..x
x.H...H.x
x.F.Y.F.x
x.H...H.x
x..FHF..x
xx.....xx
xxxxxxxxx
ENDMAP

NAME:    nicolae_rock_paper_scissors
TAGS:    transparent patrolling no_monster_gen
DEPTH:   Depths, !Depths:$, Zot, !Zot:$
KMONS:   r = nargun
KMONS:   p = walking frostbound tome / walking earthen tome / \
             walking divine tome / walking crystal tome
KMONS:   s = dancing weapon ; double sword good_item | \
                              double sword randart good_item w:5
SHUFFLE: }])>
NSUBST:  1 = r / p / s / rps...
SUBST:   T = TTTTTTV
MAP
    cc+cc
    c...c
   cc.1.cc
   cT...Tc
  cc.1.1.cc
  c}.....]c
 cc.1.1.1.cc
 cT...U...Tc
cc.1.1.1.1.cc
c...........c
+.1.1.1.1.1.+
cc..T.).T..cc
 ccccccccccc
ENDMAP

NAME:   hellmonk_no_cap
TAGS:   transparent no_monster_gen
DEPTH:  D:3-7
MONS:   sleepcap
ITEM:   hat / nothing
NSUBST: - = 1:1 / 4 = 10.. / *:.
SUBST:  c : cxt, + : +.
MAP
   c
  ccc
  cdc
 cc-cc
 c---c
cc---cc
c-----c
c.....c
cc+++cc
ENDMAP

NAME:   tekkud_crystal_farm
TAGS:   no_monster_gen patrolling
DEPTH:  Crypt, Depths
WEIGHT: 5 (Crypt), 10
: if you.branch() == "Crypt" then
MONS:   screaming refraction
MONS:   death knight / ancient champion w:5 / vampire knight / eidolon
MONS:   lich / bone dragon / curse skull w:5
NSUBST: ' = 3:1 / *=1...
NSUBST: ~ = 3:2 / 3=2.. / 1:3 / 1:3.. / 2:* / 4:$ / 2 = $$*.. / *:.
FTILE:  123O-. = floor_crystal_squares
: else -- Depths
MONS:   crystal guardian / crystal echidna w:3 / walking crystal tome w:2
MONS:   deep troll earth mage w:15 / tengu reaver / fire giant / frost giant /\
        hell knight w:5 / glass eye w:5
MONS:   ancient lich / golden dragon
NSUBST: ' = 4:1 / *=1....
NSUBST: ~ = 5:2 / 3=2.. / 1:3 / 1:3.. / 3:* / 6:$ / 3 = *$$.. / *:.
FTILE:  123O-. = floor_marble
: end
NSUBST: - = b.
KMONS:  O = orange crystal statue
MAP
    bbb-  -@@@b@
   bbbbb-b@b--.-@
   b'bbbb.-..-.-b
  bb''b-.bbb-.b@
  b-''bb-.--..b@
 bb-'bb-....b-@
bb-'bb...---.b-
b-.-b-.--bbbbbb
b-.-b..bbbbbbbbb
bb-....b-bb----b
 b-..-bb.bb-~~-bb
 b-...--.-b-~~~-b
 bb-......-~~~-bb
  bb-..O..~~~~-b
   b-.....~~~--b
  bb-.---.---bbb
   bb-bbb-bbbbb
    bbb bbb
ENDMAP

###################################################################
#
# <<7>> Random monsters
#       Either using 8, 9, 0 glyphs or just many choices.
#
###################################################################

NAME:   minmay_circled_x
TAGS:   transparent
DEPTH:  D:1-2
WEIGHT: 3
MAP
     ......
   ...xxxx...
  ..xx....xx..
 ..x........x..
 .x.x......x.x.
..x..x....x..x..
.x....x%%x....x.
.x....0xx0....x.
.x....0xx0....x.
.x....x%%x....x.
..x..x....x..x..
 .x.x......x.x.
 ..x........x..
  ..xx....xx..
   ...xxxx...
     ......
ENDMAP

NAME:   minmay_three_crescents
TAGS:   transparent
DEPTH:  D:1-4
WEIGHT: 3
MAP
 .....
..xxx..
.xx%xx..
.x%.0......
.xx0...xxx..
..x.....0xx.
 ........%x.
..x.....0xx.
.xx0...xxx..
.x%.0......
.xx%xx.
..xxx..
 .....
ENDMAP

# vault rotation makes the jar with loot unknown
NAME:   minmay_mini_jars
TAGS:   transparent
DEPTH:  D:2-4
WEIGHT: 3
MAP
..........
.x.x++x.x.
...x00x...
.xxxxxxxx.
.+0x%%00+.
.+0x%%00+.
.xxxxxxxx.
...x00x...
.x.x++x.x.
..........
ENDMAP

NAME:   minmay_divided_ellipse
TAGS:   transparent
DEPTH:  D:2-6
WEIGHT: 5
: if you.depth() < 5 then
SUBST:  9 = 0
: end
MAP
      .......
   ....xx+xx....
 ...xxxx...xxxx...
..xxx%0x...x0%xxx..
.xx0x0.x0.0x.0x0xx.
.+.%x..x.0.x..x%.+.
.xx0x..x...x..x0xx.
..xxx..x9.9x..xxx..
 ...xx+x%*%x+xx...
   ....xxxxx....
      .......
ENDMAP

NAME:   minmay_hollow_rounded_squares
TAGS:   transparent
DEPTH:  D:4-, Depths
SUBST:  0 = 0., x : x c:2 v:1 b:1
: if you.absdepth() > 12 then
SUBST:  = = +
SUBST:  n = c
: end
MAP
 ........
..xxxxxx..
.xx.00.xx.
.x0xxxx0x.
.x.0.x0xx........
.x0x.xx.+.cc==cc..
.x0xx9xxxccG..Gcc.
.xx*x.|xxcG....Gc.
..xxxxxxcc*.9..|n.
..xxxxxxcc|..9.*n.
.xx0.9|xxcG....Gc.
.x..xxxxxccG..Gcc.
.x0xx0x.+.cc==cc..
.x0x*x0.x........
.x.xxxx0x.
.xx.00.xx.
..xxxxxx..
 ........
ENDMAP

NAME:   minmay_pinched_square
TAGS:   transparent
DEPTH:  D:8-, Depths
MAP
.......   .......
.xxx.........xxx.
.x|xxxx...xxxx|x.
.xx9..xxxxx..9xx.
..x.....0.....x..
..x..x..0..x..x..
..xx..xx.xx..xx..
 ..x..xx.xx..x..
 ..x00..9xx00x..
 ..x..xxxxx..x..
..xx..xxxxx..xx..
..x..x..0..x.0x..
..x.....0...0.x..
.xx9..xxxxx0..xx.
.x|xxxx...xxxx.x.
.xxx.........xx..
.......   .......
ENDMAP

NAME:  minmay_st_funbox
TAGS:  extra transparent
DEPTH: D:9-, Depths
KMONS: 0 = 0
KMONS: 9 = 9
KMONS: 8 = 8
: if you.absdepth() < 11 then
SUBST: 9 = 0, 8 = 9
KITEM: 09 = star_item
KITEM: 8 = superb_item
: elseif you.absdepth() < 21 then
SUBST: 0 = 90
KITEM: 098 = superb_item
: else
SUBST: 9 = 98, 0 = 98
KITEM: 09 = superb_item
KITEM: 8 = any good_item
: end
MAP
.......
.vvnvv.
.v090v.
.n989n.
.v090v.
.vv=vv.
..G.G..
  ...
ENDMAP

NAME:    minmay_three_doors
DEPTH:   D:6-, Depths
SHUFFLE: 089, ABC
SUBST:   AB = ., C = *
MARKER:  G = lua:props_marker { stop_explore = "statue" }
MAP
xxxxxxx
xxAAAxx
x.....x
x..0..x
x.....x
xx...xx
xxx+xxxxxxxxx
......xx...xx
......x....Bx
...G..+..9.Bx
......x....Bx
......xx...xx
xxx+xxxxxxxxx
xx...xx
x.....x
x..8..x
x.....x
xxCCCxx
xxxxxxx
ENDMAP

NAME:   kb_rosetta
TAGS:   vaults_hard transparent misc_elf_vault
WEIGHT: 3 (Elf), 10
DEPTH:  D:6-, Depths, Vaults, Elf
SUBST:  x : xcvmnt
SUBST:  X : GtTU
: if you.in_branch("Vaults") then
FTILE:  t = floor_pebble_brown
:  vaults_hard_standard(_G)
: end
MAP
   ...   ...
  ..x.. ..x..
 ...xx...xx...
....xxx.xxx....
.xxx.xx.xx.xxx.
..xxx9x.x9xxx..
 ..xxxx.xxxx..
  .....X.....
 ..xxxx.xxxx..
..xxx9x.x9xxx..
.xxx.xx.xx.xxx.
....xxx.xxx....
 ...xx...xx...
  ..x.. ..x..
   ...   ...
ENDMAP

# Small chamber for a nice item (Eino)
NAME:   small_chamber_with_monster
TAGS:   extra
DEPTH:  D:8-, Depths, Elf, Crypt
MAP
xxxxxxx
xxG.Gxx
x..|..x
x..9..x
xx...xx
xxT.Txx
xx...xx
xxT.Txx
ENDMAP

# Evil grid
NAME:   minmay_evil_grid
DEPTH:  D:8-, Depths
NSUBST: A = 7:+ / *:c
NSUBST: B = 1:+ / 1:n / *:c
NSUBST: C = 1:+ / *:c
SUBST:  * = *|
MAP
ccCcccCcccCcc
c...c...c...c
C.9.A.9.A.9.C
c...c...c...c
ccAcccBcccAcc
c...c*.*c...c
C.9.B.8.B.9.C
c...c*.*c...c
ccAcccBcccAcc
c...c...c...c
C.9.A.9.A.9.C
c...c...c...c
ccCcccCcccCcc
ENDMAP

NAME:    dispersion_dpeg
TAGS:    transparent
DEPTH:   D:$, Depths
KITEM:   89 = * / |
KMONS:   8 = 8
KMONS:   9 = 9
KFEAT:   ^ = teleport trap / dispersal trap
KFEAT:   ~ = teleport trap / floor w:20
SHUFFLE: xm / cn / cn / cn
SUBST:   9 = 89, c : cvb
# Traps occur at the corners, but ensure we always have a dispersal-free path
# out of the center.
NSUBST:  a = ~ / ^, p = ~ / ^
MAP
............
............
..pxxmmxxp..
..x......x..
..x.amma.x..
..m.m99m.m..
..m.m99m.m..
..x.amma.x..
..x......x..
..pxxmmxxp..
............
............
ENDMAP

NAME:    pandoras_box_mu
TAGS:    no_monster_gen no_item_gen transparent
DEPTH:   Depths, Crypt:1-4
MARKER:  a = lua:fog_machine { \
                 pow_max = 10, delay_min = 10, delay_max = 40, \
                 size = 2, size_buildup_amnt = 5, \
                 size_buildup_time = 25, cloud_type = "black smoke" \
             }
KMONS:   a = vampire mosquito
KMONS:   b = green death
KMONS:   c = reaper
KMONS:   d = soul eater
KMONS:   e = chaos spawn
KMONS:   f = demonic crawler
KMONS:   g = glowing shapeshifter
KMONS:   h = shadow wraith
KMONS:   i = hell rat
KMONS:   j = clockroach
KMONS:   k = bes kemwar
KMONS:   l = large abomination
KMONS:   m = emperor scorpion
KMONS:   n = small abomination
KMONS:   o = unseen horror
KMONS:   p = spark wasp
KMONS:   q = goliath frog
KMONS:   r = wolf spider
KITEM:   abcdfghjiklmnopqr = $
KITEM:   e = $ q:66, any armour good_item / potion of experience q:1 pre_id / \
             scroll of acquirement pre_id
SHUFFLE: bcdfghjklnopqr
MAP
.............
.............
..v.......v..
...vvvvvvv...
...vgbcdev...
...vfahajv...
...vklanov...
...vpqrimv...
...vv===vv...
..v.......v..
.............
.............
ENDMAP

NAME:    onia_ninara_dug_in_and_dangerous
TAGS:    ruin_abyss transparent no_descent
DEPTH:   D:8-, !D:$, Depths:2-, !Depths:$, Abyss
ITEM:    wand of digging pre_id
ITEM:    scroll of teleportation pre_id q:2
ITEM:    parchment disc:earth / any ring / any talisman w:2
SHUFFLE: vcb, AB? / CD!, d<>, de
SUBST:   AD = 9, B = 8, C = 0
SUBST:   ? = %:10 *:50 |:60, ! = %:90 *:30 |:10
: if you.in_branch("Abyss") then
TAGS:    patrolling
SUBST:   de%*| = f
: end
KMASK:   x = no_wall_fixup
KMASK:   089%*|de<> = opaque
KPROP:   089%*|de<> = no_tele_into
MAP
...........
.vvnvvvnvv.
.vAAABAAAv.
.xxxxxxxxx.
.v???d???v.
.vvnvvvnvv.
.....@.....
ENDMAP

NAME:   minmay_librarian
TAGS:   no_monster_gen no_item_gen no_trap_gen
DEPTH:  D:9-, Elf, Depths
: if you.absdepth() > 24 then
MONS:   ancient lich w:25 / dread lich w:25 / royal mummy
ITEM:   any scroll w:6 / any book
: elseif you.absdepth() > 20 then
MONS:   lich w:60 / draconian annihilator w:20 / \
        draconian scorcher / draconian shifter
ITEM:   any scroll / any book
: elseif you.absdepth() > 15 then
MONS:   deep elf annihilator w:30 / deep elf sorcerer w:20 / \
        deep elf demonologist / deep elf death mage
ITEM:   any scroll / any book w:6
: elseif you.absdepth() > 12 then
MONS:   arcanist w:25 / occultist w:25 / necromancer w:20 / \
        deep elf pyromancer w:20 / deep elf zephyrmancer w:20 / \
        orc sorcerer / ogre mage / naga mage / vampire mage
ITEM:   scroll of identify w:2 / any scroll w:8 / any book w:4
: else
MONS:   arcanist w:25 / deep elf pyromancer w:25 / orc sorcerer / \
        kobold geomancer w:5 / kobold demonologist w:15
ITEM:   scroll of identify w:3 / scroll of amnesia w:2 / \
        any scroll w:5 / randbook numspells:2 w:3
: end
SUBST:  c : cx
TILE:   c = wall_studio
MAP
xxxxxxxxxxxxx
xd....1....dx
xc.........cx
xd.........dx
xc.........cx
xd.........dx
xc.........cx
xd.........dx
xc.........cx
xd.........dx
xxxxxx+xxxxxx
ENDMAP

NAME:   wad_scary_box
DEPTH:  D:9-, Depths, !Depths:$
WEIGHT: 4
FTILE:  ' = floor_pebble
COLOUR: ' = white
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxx...............x
x.x.+.......xx..xx.......xx..x
x..xcccccccc.xxxxxxxx..G.xx.Gxxx
xxx.0098+*|n.+.'.'.'..xx.......+
xxx.0098+**n.+.'.'.'..xx.......+
x..xcccccccc.xxxxxxxx..G.xx.Gxxx
x.x.+.......xx..xx.......xx..x
xxxxxxxxxxxxxx...............x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   wad_mini_maze
TAGS:   transparent
DEPTH:  D:7-, Depths, !Depths:$
WEIGHT: 4
NSUBST: ? = 1:n / 1:+ / *:X
SUBST:  X : cccvvb
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxx@xx
xXXXXXXXXXXXXXXXXXXXXXXXXX.Xx
xX9%......X.......X...X....Xx
xXXXXXX.X.XXXXX.X.XXX.X.XX.Xx
xX......X.......X.....X..X.Xx
xX.???XXX.XXXXXXXXXXX.XX.X.Xx
xX.?**?.......X.X...X.X..X.Xx
xX.?**?.XXXXX.X.X.X.X.XXXX.Xx
xX.?**?.....X.X.X.X.X.X....Xx
xX.X??XXX.X.XXX.X.X.X.X.XXXXx
xX.X9%..X.X.....X.X.X.X....Xx
xX.XXXX.X.X.XXX.X.X%X.XXXX.Xx
xX......X.X...X...X9X......Xx
xXXXXXXXX.XXXXXXXXXXXXXXXXXXx
xxxxxxxxx@xxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   wad_hexagon
TAGS:   transparent
WEIGHT: 4
DEPTH:  D:8-, Depths, !Depths:$
KFEAT:  t = tree
FTILE:  ' = floor_pebble
COLOUR: ' = white
MAP
xxx...xxxxxxxxxxxxxx...xxx
xx...xxxxxx........xx...xx
x...xxxxx..xxxxxxxx.xx...x
...xxxxx...xxxxxxxxx.xx...
..xxxxx...xxcccccccnx.xx..
.xxxxx..xxxxc'0...'cxx.xx.
.xxxx.xxx*.9v.'..'.cxxx.xx
@....xx**8..=.V''V....+..@
.xxxx.xxx*.9v.'..'.cxxx.xx
.xxxxx..xxxxc'...0'cxx.xx.
..xxxxx...xxcccccccnx.xx..
...xxxxx...xxxxxxxxx.xx...
x...xxxxx..xxxxxxxx.xx...x
xx...xxxxxx........xx...xx
xxx...xxxxxxxxxxxxxx...xxx
ENDMAP

NAME:   wad_rectangle_vault
DEPTH:  D:3-, Depths, !Depths:$
WEIGHT: 4
FTILE:  ; = floor_pebble
FTILE: "0U = floor_pebble_brown
COLOUR: "0 = brown
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x..xxx;;;;;.;;;;;.;;;;;xxx..x
x..xxxx;";...;";...;";xxxx..x
xx.x.x;""";.;"0";.;""";x.x.xx
@.x.x;"""0";""U0";""""0;x.x.@
xx.x.x;""";.;""";.;0"";x.x.xx
x..xxxx;";...;";...;0;xxxx..x
x..xxx;;;;;.;;;;;.;;;;;xxx..x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# Updated to not hide the loot area behind opaque walls and to scale numbers of
# monsters/loot in the chamber with depth of placement. -gammafunk
NAME:   wad_dig_loot
TAGS:   transparent no_descent
DEPTH:  D:8-, Elf, Depths, !Depths:$
WEIGHT: 4
KPROP:  %*8DEeF = no_tele_into
KMASK:  %*|8aDEeF' = opaque
KITEM:  EF = *
KMONS:  EF = 8
KMONS:  p = plant
SHUFFLE: DE
# Before D:12, a dig wand is required to access the loot area. From D:12, add a
# digging monster. Add another 8 in Elf and one more again for Depths. Add one
# more loot item with each added monster.
: if you.in_branch("D") and you.depth() >= 12 then
KITEM:  D = |
KMONS:  D = deep troll earth mage
SUBST:  EF = '
: elseif you.in_branch("Elf") then
KITEM:  D = |
KMONS:  D = patrolling cacodemon
KMONS:  e = patrolling deep elf demonologist
SUBST:  E = e, F = '
: elseif you.in_branch("Depths") then
KITEM:  D = |
KMONS:  D = deep troll earth mage / cacodemon
# D:8-11
: else
SUBST:  DE = v, F = '
: end
: if you.in_branch("Elf") then
TILE:   v = dngn_metal_wall_red
FTILE:  " = floor_infernal_blank
COLOUR: " = red
: else
FTILE:  " = floor_pebble_brown
COLOUR: " = brown
: end
MAP
@....vvvvv..G.@
.""".vvvvvp....
.."..vvvvv.."0.
.....vvvvv.""".
..G..vvvvv.....
vvvvv.....vvvvv
vvvvv."...vv*Dv
vvvvv."".GmF%8v
vvvvv."...vv*Ev
vvvvv0....vvvvv
ENDMAP

NAME:    evilmike_minifort
TAGS:    misc_elf_vault no_descent
DEPTH:   D:9-, Depths, !Depths:$, Elf
TILE:    x = wall_marble
COLOUR:  x = white
TILE:    c = wall_vines
FTILE:   ABCDEFcx+. = floor_vines
SHUFFLE: ABCDEF
NSUBST:  A = 1:> / * = .%
NSUBST:  B = 6:0 / *:., C = 6 = $0 / *:., D = 6 = %0 / *:.
NSUBST:  E = 1:98 / 1:*| / *:., F = 1:90 / 1:$ / *:.
SUBST:   ' = .
MAP
ccccc@'''''''@ccccc
cAAAcwwwwwwwwwcBBBc
cAAAcwwwwwwwwwcBBBc
cAAAcGwwwwwwwGcBBBc
cAAAccccc+ccccc.BBc
cAAAc.........+.BBc
cAA.c.........c.BBc
cAA.+..xxxxx..ccccc
cAA.c..xxxxx..+.DDc
ccccc.........c.DDc
cCC.+.........cDDDc
cCC.ccccc+cc+cccccc
cCCCcEEE..c...FFFFc
cCCCcEEEEEcFFFFFFFc
cCCCcEEEEEcFFFFFFFc
ccccccccccccccccccc
ENDMAP

NAME:    hangedman_feature_mirror
TAGS:    transparent extra allow_dup no_monster_gen
TAGS:    no_item_gen no_trap_gen no_pool_fixup patrolling
DEPTH:   D, Depths, Orc, Elf, Crypt, Snake, Shoals, Zot
WEIGHT:  10 (D), 4
KFEAT:   A = stone_arch
KFEAT:   D = any shop
KFEAT:   ^ : teleport trap / shaft trap
KFEAT:   Z = zot trap
SUBST:   A : C:20 D:20 ATVY^{[(<>, b : c:30 G:20 bvwtdGG123, 0 : 0:3 9:2 ':1
SUBST:   .' : .:99 W:1, [ : [], ( : ()
NSUBST:  { = 1:{ / 1:}, [ = 1:[ / 1:(, ] = 1:[ / 1:], ( = 1:] / 1:), ) = 1:( / 1:)
: if you.in_branch("D") or you.in_branch("Depths") then
:    if you.absdepth() < 2 then
SUBST:   CDY[{^ = T, 9 : 0'
:    elseif you.absdepth() < 5 then
SUBST:   CDY = T, 9 : 0'
:    elseif you.absdepth() > 20 then
MARKER:  A = lua:props_marker { portal=1 }
:    end
: elseif you.in_branch("Orc") then
SUBST:   G = I, t23 = 1:9 I:1
: elseif you.in_branch("Crypt") then
SUBST:   TV : VY, t123 : c
: elseif you.in_branch("Zot") then
SUBST:   D : V:9 Z:1, ^ : ^Z, t123 : G:9 Z:1
: else
SUBST:   A = T
: end
MAP
...
.b..
.0C.
.b..                                ...
...                                ..b.
                                   .C0.
                                   ..b.
                                    ...
ENDMAP

NAME:    hangedman_corner_corridor
TAGS:    transparent misc_elf_vault
WEIGHT:  5 (Snake, Elf), 10
DEPTH:   D:9-, Depths, Snake, Elf
SHUFFLE: 9* / 9* / *8, 098%* / 098%* / 098%* / !!!!$, y'Y" / 'y"Y, Y" / ??
SUBST:   Y = y, '"!? = ., y : z:100 ccvbm, z : x:100 ccvbm
: if you.absdepth() < 13 then
SUBST:   9 = 0, 8 = 9
: end
MAP
xxxxxxxxxx
xxxxxxxxxx
xx0.Y".0xx
xx.."Y..xx
@+..zz..+@
@+..zz..+@
xx..y'..xx
xx..'y..xx
xx..y'..xx
xx..zz..xxx
xx..zz..xxxxxx
xx..'y...xxxxxx
xx..y'....9%xxx
xx..'y.....*%xx
xx..zzy'yzz.9xxx
xx..zz'y'zz..xxxxxx@@xxxx
xx.......'y...xxxxx++xxxx
xxx%.9...y'...........0xx
xxxxxx*..'y............xx
 xxxxxx9.zzy'yzz'y'zzY"xx
    xxx..zz'y'zzy'yzz"Yxx
     xx%...............xx
     xxx..............0xx
     xxxxxxxxxxxxxx++xxxx
      xxxxxxxxxxxxx@@xxxx
ENDMAP

NAME:   minmay_small_thing
DEPTH:  D:4-8
SUBST:  9 = 999.
MAP
 xxxxxxxxxx
xx........@
x..xx.x.x.x
x.xx.xxxxxx
x..xx.x.x.x
xx..xx.x.xx
 xx.xxxxx.x
xx..x*.x.xx
x..xxx.x.*x
xx...9.9.xx
 xxxxxxxxx
ENDMAP

NAME:   minmay_crossroads
TAGS:   transparent
DEPTH:  D:4-8
SUBST:  0 = 0.
MAP
                xxxxxxx
    x@.0.@xx  xxx....{x
    xx..0..xxxx.....xxx
     xx.....x.....xxx
      xx........xxx
      xxx.....xxx
    xxx........xx
  xxx.....x.....xx
xxx.....xxxx..0..xx
x}....xxx  xx@.0.@x
xxxxxxx
ENDMAP

##################
# Stair vaults. They place a few random monsters but are mainly for variety.
NAME:    st_stairs_1
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Elf, Crypt
NSUBST:  ' = 1:> / *:., . = 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
.........
.G.....G.
.........
...'''...
...'''...
...'''...
.........
.G.....G.
.........
ENDMAP

NAME:    st_stairs_2
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Elf, Crypt
NSUBST:  . = 1:> / 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
SHUFFLE: abc
SUBST:   b:b., c:c.
SUBST:   a=x, b=x, c=x
MAP
.........
.a.b.b.a.
.........
.b.c.c.b.
.........
.b.c.c.b.
.........
.a.b.b.a.
.........
ENDMAP

NAME:    st_stairs_3
TAGS:    extra transparent allow_dup ruin_lair luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
.........
.xxx.xxx.
.x.....x.
.x.'''.x.
...'''...
.x.'''.x.
.x.....x.
.xxx.xxx.
.........
ENDMAP

NAME:    st_stairs_4
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
x.x.x.x.x
.........
x.......x
...'''...
x..'''..x
...'''...
x.......x
.........
x.x.x.x.x
ENDMAP

NAME:    st_stairs_5
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 2 = 0:19 .:1 / 3 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
xx..xx..xx
x........x
..........
...''''...
x..''''..x
x..''''..x
...''''...
..........
x........x
xx..xx..xx
ENDMAP

NAME:    st_stairs_6
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 1 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
xx..xx
xG..Gx
..''..
..''..
xG..Gx
xx..xx
ENDMAP

NAME:    st_stairs_7
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 1 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
x.xx.x
..xx..
xx''xx
xx''xx
..xx..
x.xx.x
ENDMAP

# I like the way these ones can turn out,
# it reminds me of those rooms in Angband
NAME:    st_stairs_8
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 1 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x
.......
x.x.x.x
.......
x.x.x.x
.......
x.x.x.x
ENDMAP

NAME:    st_stairs_9
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 2:0 / 2 = .:3 0:1 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x
.........
x.x.x.x.x
.........
x.x.x.x.x
.........
x.x.x.x.x
.........
x.x.x.x.x
ENDMAP

NAME:    st_stairs_10
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 2 = 0:19 .:1 / 4 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_11
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 3 = 0:19 .:1 / 5 = 0:1 .:9 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_12
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 1 : 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_13
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 1 : 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x.x.x.x.x.x
.....................
x.x.x.x.x.x.x.x.x.x.x
.....................
x.x.x.x.x.x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_14
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Elf, Crypt
NSUBST:  . = 1 : 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
SHUFFLE: abc / bab / cbb / bcb
SUBST:   a=x, b=., c:Gx
MAP
.......
.......
..aba..
..b>b..
..aba..
.......
.......
ENDMAP

##################

NAME:   lightli_corner_chamber
TAGS:   transparent
DEPTH:  D:2-, Depths
KPROP:  $*09 = no_tele_into
KMASK:  $*09 = opaque
MAP
xxxxxxxxxxxx
xxxxxxx....x
xxxxx......+
xxxx.......x
xxx.....xxxx
xx....xxxxxx
xx...xmcccc
x....xc$9$c
x...xxc0*0c
x...xxc$9$c
x...xxccccc
xx+xxx
ENDMAP

NAME:   lightli_gold_pyramid
TAGS:   no_vmirror no_rotate
DEPTH:  Depths
COLOUR: .089+*|c = yellow
FTILE:  .089+*|c = floor_sandstone
TILE:   c = wall_tomb
MAP
       cnc
      cc|cc
      c***c
     cc***cc
     ccc+ccc
    cc8.8.8cc
    cc.....cc
    cccc=cccc
   cc.......cc
   c9.9.9.9.9c
  cc.........cc
  cccccc=cccccc
 cc...........cc
 c.............c
cc0.0.0.0.0.0.0cc
c...............c
cccccccc+cccccccc
ENDMAP

NAME:  lightli_airlock
DEPTH: D:11-, Snake, Shoals
: if not you.in_branch("D") then
SUBST: = = +
:   if you.in_branch("Shoals") then
SUBST: n = c
CLEAR: x
:   end
: end
KMASK: W = no_monster_gen
KPROP: W = no_tele_into
MAP
     xxxxx  xxxx
 WccccWWWccccWWxxxxx
 cc..ncWcn..nnWWWWWx
 c....cGc....cccncWx
 c.00.cnc.09.cc%*ccx
@=..9.+%+.0*.++%8|cx
 c.00.cnc.09.cc%*ccx
 c....cGc....cccncWx
 cc..ncWcn..nnWWWWWx
 WccccWWWccccWWxxxxx
     xxxxx  xxxx
ENDMAP

NAME: lightli_fourway_metalbox
DEPTH: D:9-, Depths
TAGS: transparent
NSUBST:   % = 1:* / *:%
NSUBST:   0 = 1:9 / *:0
MAP
vvvv..vvvv
v0%v++v%0v
v%v....v%v
vv......vv
.+......+.
.+......+.
vv......vv
v%v....v%v
v0%v++v%0v
vvvv..vvvv
ENDMAP

NAME:   minmay_close_crescents
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
 .........
..xxxx..x..
.xx00xx.xx.
.x0..%x.0x.
.x0.x%..0x.
.xx.xx00xx.
..x..xxxx..
 .........
ENDMAP

NAME:   minmay_cut_off
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
.
..
.x.
.x..
.x0x.
.x0xx.
.x0%xx.
.xxxxxx.
 .xx%0x.
  .xx0x.
   .x0x.
    ..x.
     .x.
      ..
       .
ENDMAP

NAME:   minmay_cupped
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
..........
.xxx...xx.
.x%xx..xx.
.xx%xx.0x.
..xx...0x.
...x..0xx.
.....0xxx.
.xx00xxx..
.xxxxxx...
.........
ENDMAP

NAME:   minmay_unequal
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
........
.xxx......
...xxx....
....0xxx...
....0.%xxx.
....0xxx...
...xxx.....
.xxx...xxx.
.....xxx...
...xxx0....
.xxx%.0....
...xxx0....
 ....xxx...
 ......xxx.
   ........
ENDMAP

NAME:   minmay_box_of_dots
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0., + : +.
MAP
 .........
..xxx+xxx..
.xx.....xx.
.x.0x0x0.x.
.+.x%x%x.+.
.x.0x0x0.x.
.xx.....xx.
..xxx+xxx..
 .........
ENDMAP

NAME:   minmay_quantized
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
    .....
    .xxx.
  ...x%x...
  .xxx.xxx.
...x0.0.0x...
.xxx.xxx.xxx.
....0xxx0.%x.
.xxx.xxx.xxx.
...x0.0.0x...
  .xxx.xxx.
  ...x%x...
    .xxx.
    .....
ENDMAP

NAME:   minmay_ruptured
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
 ..................
...xx.xx.....xx.xx..
.xxx.x.xx.x.xx.x.xx.
.x%..x000xxx000x.%x.
.xxx.x.xx.x.xx.x.xx.
...xx.xx.....xx.xx..
 ..................
ENDMAP

NAME:   minmay_bisected
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
.....
.xxx..
.x%xx..
.xx0x...
..xx00...
 ...00xx..
  ...x0xx.
   ..xx%x.
    ..xxx.
     .....
ENDMAP

NAME:   minmay_distorted
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
   ...
 .......
 .xxxxx.
..x.0.x..
.x0%0x...
..x.0.x..
 .xxxxx.
 .......
   ...
ENDMAP

NAME:   minmay_vboxes
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
.....         .....
.xxx..       ..xxx.
.x%x...     ...x%x.
.xx.xx..   ..xx.xx.
...x0x... ...x0x...
 ..xx.xx...xx.xx..
  ...x0x...x0x...
   ..xx0xxx0xx..
    ...x000x...
     ..x000x..
      .x%%%x.
      .xxxxx.
      .......
ENDMAP

NAME:    minmay_surrounded
TAGS:    transparent
DEPTH:   D:1-4
SUBST:   0 = 0.
KMASK:   * = opaque
KPROP:   * = no_tele_into
MAP
.........
.x0xxx0x.
.0.....0.
.x.mmm.x.
.x.m*m.x.
.x.mmm.x.
.0.....0.
.x0xxx0x.
.........
ENDMAP

NAME:    minmay_shallow_snake_nest
# deeper depths already have snake vaults
DEPTH:   D:1-3
: if you.absdepth() > 1 then
MONS:   ball python / nothing w:20, adder
: else
MONS:    ball python / nothing w:50, ball python / nothing w:50
: end
MONS:    plant / nothing, fungus / nothing
SUBST:   " = xxx3, ' = xx..13, 1 = 1 3:1
SHUFFLE: 3334
MAP
 xxxxxxx
xx"""""xx
x""1'1""x
x"1'2'1"x
x"'111'"x
x"1'1'1"x
xx"'1'"xx
 xx"@"xx
ENDMAP

NAME:    minmay_lizard_king
DEPTH:   D:1-13
MONS:    frilled lizard, iguana w:20 / crocodile w:1
MONS:    komodo dragon, basilisk, plant
SUBST:   5 = 51, 1 = 1.
: if you.absdepth() > 9 then
SUBST:   1 = 32211
: elseif you.absdepth() > 6 then
SUBST:   4 = 3, 1 = 21
: elseif you.absdepth() > 3 then
SUBST:   4 = 2
: else
SUBST:   4 = 1
: end
MAP
  xxxxxx
xxx5115x
x451551xx
xx155155x
 x555515x
 xxxxx5@
ENDMAP

NAME:    minmay_joined_circles
TAGS:    transparent
DEPTH:   D:2-
NSUBST:  ? = 1:+ / *:?
SUBST:   ? = +xxx
SUBST:   x : x:50 cvbnm
SHUFFLE: ABC
SUBST:   A = 0....%, B = 0.%, C = 0%
MAP
     .....
    ..xxx..
    .xxCxx.
    .?CCCx.
    .xxCxx....
  ....x+xxx?x..
 .xxxxx.xxBBxx.
.xxAAA+x+BBBBx.
.xAAAAAxxBBBBx.
.xAAAAAxxxBBxx.
.xAAAAA?.xxxx..
.xxAAAxx......
 .xxxxx.
  .....
ENDMAP

NAME:    minmay_diamond_spiral
TAGS:    transparent
DEPTH:   D:8-
SUBST:   ? = .G+m
SHUFFLE: xcvb / mnnn
: if you.absdepth() < 13 then
SUBST:   8 = 9
: end
MAP
          .
         .x.
        ..xx.
       .x..xx.
      .xxx..xx.
     .xx8xx..xx.
    .xx...xx..xx.
   .xx..x..xx..xx.
  .xx..xxx..xx..xx.
 .xx..xx|xx..xx..xx.
.xx8.xx|..?..|xx.8xx.
 .xx..xx..xx|xx..xx.
  .xx..xx..xxx..xx.
   .xx..xx..x..xx.
    .xx..xx...xx.
     .xx..xx8xx.
      .xx..xxx.
       .xx..x.
        .xx..
         .x.
          .
ENDMAP

NAME:    minmay_radiant
TAGS:    transparent
DEPTH:   D:8-
SUBST:   8 = 888.
SUBST:   x : xcvbnm G:1
: if you.absdepth() < 13 then
SUBST:   8 = 9
: end
MAP
 ..........
....xxxxx.....
..xxx..........
..x......xxxx...
.xx.........xx..
.x...xxx.....x..
.x...x8..xx..x...
.x...x.|.8x..x...
.x......|......x.
...x..x8.|.x...x.
...x..xx..8x...x.
 ..x.....xxx...x.
 ..xx.........xx.
 ...xxxx......x..
 ...........xxx..
 .......xxxxx....
      ..........
ENDMAP

NAME:  grunt_potential
TAGS:  no_pool_fixup
DEPTH: D:6-, Depths
: init_hm_decor_walldepth(_G, 'x')
SHUFFLE: wlvbn
: if you.absdepth() > 20 then
SUBST: 9 = 8
SUBST: 1 = 8
SUBST: * = |
NSUBST: % = 4:* / *:.
NSUBST: 0 = 2:9 / *:0
: elseif you.absdepth() >= 12 then
SUBST: 1 = 9
: else
SUBST: 1 = 0
SUBST: * = %
: end
KMONS: 0 = 0 band
KMONS: 9 = 9 band
MAP
       @
    xxx+xxx
  xxx.....xxx
 xx..0.w.0..xx
 x....%w%....x
xx...wwwww...xx
x......w......x
x.....%w%.....x
x%0...1*1...0%x
x.....%9%.....x
x.............x
xx...lllll...xx
 x....%.%....x
 xx...0.0...xx
  xxx.....xxx
    xxx+xxx
       @
ENDMAP

# It's intended that the loot item isn't obtainable without either entering los
# of at least some of the monsters or breaking walls, either of which is very
# likely to wake up these monsters.
NAME:   grunt_tough_drop
TAGS:   no_monster_gen no_trap_gen transparent
DEPTH:  D:4-, Depths
KMASK:  ^809 = opaque
KFEAT:  ^ = permanent teleport trap
KFEAT:  ~ = alarm trap
KFEAT:  a = iron_grate
KPROP:  8^ = no_tele_into
: if you.absdepth() < 9 then
SUBST: | = %
SUBST: 8 = 0
: elseif you.absdepth() < 18 then
SUBST: | = *
SUBST: 8 = 999000
: else
SUBST: 8 = 889900
: end
MAP
   .....
   .cnc.
....n|n....
.cccc+cccc.
.c8^a~a^8c.
.cc^c.c^cc.
.c8^a.a^8c.
.cc^c.c^cc.
.c8^a.a^8c.
.cccc+cccc.
...........
ENDMAP

# Some miniature stair vaults; these all place a couple of monsters,
# but they're mainly around for the decor (same principle as st's).
NAME:    grunt_ministairs_1
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
  ...
 ..G..
.......
...{...
.......
 G...G
  ...
ENDMAP

NAME:    grunt_ministairs_2
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
   .....
  .G...G.
 .........
.G...{...G.
 .........
  .G...G.
   .....
ENDMAP

NAME:    grunt_ministairs_3
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
    @
xxxx+xxxx
x.......x
x.G...G.x
x.......x
x.G...G.x
x.......x
x.G...G.x
x...{...x
xxxxxxxxx
ENDMAP

NAME:    grunt_ministairs_4
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
NSUBST:  @ = 1:@ / *:.
MAP
       .@.
       @G@
 xxxxx.....xxxxx
xx...+xx+xx+...xx
x{.G..xx.xx..G.(x
xx...xx...xx...xx
 xxxxxx.G.xxxxxx
      x...x
      xx[xx
       xxx
ENDMAP

NAME:    grunt_ministairs_5
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
        @
 xxxxxxx+xxxxxxx
xx...xx...xx...xx
x{.G..+.G.+..G.(x
xx...xx...xx...xx
 xxxxxxx+xxxxxxx
      xx.xx
      x...x
      x.G.x
      x...x
      xx[xx
       xxx
ENDMAP

NAME:    grunt_ministairs_6
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
NSUBST:  @ = 1:@ / *:.
MAP
xxxx .@..xxxx
x{.xx...xx.[x
x...x...x...x
xx.+x...x+.xx
 xxx.....xxx
.............
@.....G.....@
.............
 xxx.....xxx
xx.+x...x+.xx
x...x...x...x
x(.xx...xx.<x
xxxx .@..xxxx
ENDMAP

NAME:    grunt_ministairs_7
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
    @
  xx+xx
 xx...xx
xxG...Gxx
x.......x
x.{.G.(.x
x.......x
xxG.[.Gxx
 xx...xx
  xxxxx
ENDMAP

NAME:    grunt_ministairs_8
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
    xxx
   xxGx
  xx..+@
 xx..Gx
xx...xx
xG..xx
x.{.x
xG..xx
xx...xx
 xx..Gx
  xx..+@
   xxGx
    xxx
ENDMAP

NAME:    grunt_ministairs_9
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
 xx...
xx..G..
x.......
x.....G..
x..{....@
x.....G..
x.......
xx..G..
 xx...
ENDMAP

NAME:    grunt_ministairs_10
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
NSUBST:  @ = 1:@ / *:.
MAP
 xx...@...xx
xx..G...G..xx
x...........x
x.....G.....x
x..{.....(..x
x.....G.....x
x...........x
xx..G...G..xx
 xx...@...xx
ENDMAP

NAME:    grunt_ministairs_11
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
NSUBST:  @ = 1:@ / *:.
MAP
     @
 xxxx+xxxx
xx.......xx
x.GxxxxxG.x
x.xx...xx.x
x.x.G.G.x.x
x.x..{..x.x
x.x.G.G.x.x
x.xx...xx.x
x.Gxx+xxG.x
xx.......xx
 xxxxxxxxx
ENDMAP

NAME:    grunt_ministairs_12
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
xxxxx     xxxxx
x...xxx xxx...x
x.{...xxx...[.x
x.............x
xxx....G....xxx
  xxx.....xxx
    xx.@.xx
ENDMAP

NAME:    grunt_ministairs_13
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
   @         @
 xx+xx     xx+xx
 x...xxx xxx...x
@+.G...xxx...G.+@
 x.............x
 xxx....{....xxx
   xxx.....xxx
     xx.G.xx
   xxx.....xxx
 xxx....(....xxx
 x.............x
@+.G...xxx...G.+@
 x...xxx xxx...x
 xx+xx     xx+xx
   @         @
ENDMAP

NAME:    grunt_ministairs_14
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
      @
     x+x
     x.xx
xxxxxx..xx
x........xx
x.{...G...+@
x........xx
xxxxxx..xx
     x.xx
     x+x
      @
ENDMAP

NAME:    grunt_ministairs_15
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
     @     @
    x+x   x+x
   xx.x   x.xx
  xx..xxxxx..xx
 xx...........xx
@+...G..{..G...+@
 xx...........xx
  xx..xxxxx..xx
   xx.x   x.xx
    x+x   x+x
     @     @
ENDMAP

NAME:    hangedman_minor_gate_pass
TAGS:    transparent
DEPTH:   D:4-9
: if you.absdepth() < 6 then
SHUFFLE: 0% / 0% / '"
SUBST:   1 = 0..
: else
SHUFFLE: 2% / 2% / 2% / d9 / d9 / '"
SUBST:   1 = 0...
: end
SUBST:   x : xxc, 2 = 0, d = %, '" = .
MAP
xxxxxxxxxxxxxxxxxxxxxxxxx
x.1.%.0.x.2.%.2.x.0.%.1.x
x.x.x.x.x.x.x.x.x.x.x.x.x
@.......................@
xxxxxxxxxxxx+xxxxxxxxxxxx
          ..10.
           .0.
ENDMAP

NAME:   minmay_hidden_floor
DEPTH:  D:12-, Depths
SUBST:  9 = 9999., 8 = 8888.
KPROP:  8*$ = no_tele_into
MAP
     @
cccccnccccc
c.........c
c.ccc9ccc.c
c.c8ncn8c.c
c.cn***nc.c
@.9c*$*c9.n@
cncn***nc.c
c.=8ncn8c.c
c.ccc9ccc.c
c.........c
cccccnccccc
     @
ENDMAP

NAME:    minmay_multi_spiral
TAGS:    transparent
SHUFFLE: AC
DEPTH:   Depths
SUBST:   A : ., Cx : ccvb
SUBST:   8 = . 0:1 9:1 8:1
MAP
         ......
         @CCCC..  xxxxxx
   xxx....AAACC.. x||||xxx
  xx88AAAA..AACC. xAAAA88xx
 xx8AAACCAAA.AAC..xCCCAAA8xx
 x8AACCCCCCAA.ACC8x||CCCAA8x
xx8ACC8888CCA.AAC8xx888CCA8xx
x8AAC88xx88CAA.AC8xxxx88CAA8x
x8ACC8xxxx8CCA.AC88xbxx8CCA8x
x8ACC8xxbx88CA.ACC8xxxx8CCA8x
x8AAC88xxxx8CA.AAC88xx88CAA8x
xx8ACC888xx8CAA.ACC8888CCA8xx
 x8AACCC||x8CCA.AACCCCCCAA8x
 xx8AAACCCx..CAA.AAACCAAA8xx
  xx88AAAAx .CCAA..AAAA88xx
   xxx||||x ..CCAAA....xxx
     xxxxxx  ..CCCC.
              .....@
ENDMAP

NAME:   kennysheep_kite_vault
TAGS:   no_item_gen no_monster_gen transparent
SUBST:  x : xcnvb
DEPTH:  D:8-, Depths
MAP
      ccc
     cc*cc
    cc.x.cc
   cc0xxx0cc
  cc...x...cc
  c..x.*.x..c
 cc.xxx.xxx.cc
cc.0.x0*0x.0.cc
c..x.0.x.0.x..+
c*xxx*xxx*xxx.+
c..x.0.x.0.x..+
cc.0.x0*0x...cc
 cc.xxx.xxx0cc
  c..x.*.x..c
  cc...x...cc
   cc0xxx0cc
    cc.x.cc
     cc*cc
      ccc
ENDMAP

NAME:   kennysheep_treasure_room
TAGS:   no_monster_gen no_pool_fixup extra
DEPTH:  D:12-, Depths
MAP
ccccc
c|||c
c888c
c=nnc
 @@@
ENDMAP

NAME:   kennysheep_four_rooms
TAGS:   no_monster_gen
DEPTH:  D:12-, Depths
MAP
 cccc cccc
cc..ccc..cc
+....+...0c
+....+...0c
cc..ccc..cc
 cnncxc++c
cc..ccc..cc
c.**.+....c
c8**.+....c
cc..ccc00cc
 cccc cccc
ENDMAP

#############################################################
NAME:   kennysheep_opposing_triangles
DEPTH:  D:4-, Depths, !D:$, !Depths:$
SUBST:  c:ccxxv
SUBST:  w:wl
MAP
               ww
 cccccccccccccwww
 +.........ccwww
 +........mcwwwc
 c...0...mmwwwcc
 c..0*..ccwwwccc
 c.....mcwwwmm.c
 c....mmwwwcm..c
 c...ccwwwcc...c
 c..mcwwwmm....c
 c.mmwwwcm.....c
 cccwwwcc..*0..c
 ccwwwmm...0...c
 cwwwcm........+
 wwwcc.........+
wwwccccccccccccc
ww
ENDMAP

# TODO: this can be hard to place because the boundaries are not passable;
# maybe add some dead space as a buffer?
NAME:    kennysheep_island_fort
TAGS:    no_pool_fixup no_descent
DEPTH:   D:8-, Depths:2-, !D:$, !Depths:$
SHUFFLE: {}'
KFEAT:   ' = .
: if crawl.coinflip() then
SUBST:  w : l
SUBST:  c : xxv
: else
SUBST:  c : ccb
: end
MAP
   wwwwwwww
  wwwwwwwwww
 wwwccmmccwww
wwwcc....ccwww
wwcc..8...ccww
wwc..cc+c..cww
wwm.0c**c0.mww
wwm..c|*c..mww
wwc..cccc..cww
wwcc......ccww
wwwcc....ccwww
 wwGcc++ccGww
 www.G..G.www
  www....www
   www}{www
    wwwwww
     wwww
ENDMAP

NAME:   kennysheep_just_a_vault
DEPTH:  D:8-, Depths, !D:$, !Depths:$
SUBST:  c : ccxxv
SUBST:  x : ccxxvbm
MAP
 ccccc
cc.8.cc
c.x+x.c
c.x|x.c
c.xxx.c
cc...cc
 cc+cc
ENDMAP

NAME:   kennysheep_orc_chapel
DEPTH:  D:3-4, Orc
SUBST:  $ = $.
: if you.in_branch("Orc") then
KMONS:  1 = orc high priest band
: else
KMONS:  1 = orc priest band
: end
KFEAT:  1 = altar_beogh
TILE:   x = wall_zot_yellow
MAP
 xxxxx
xx$1$xx
x$I$I$x
x$$$$$x
x$I.I$x
xx...xx
 xx+xx
ENDMAP

NAME:   kennysheep_jessica_study
TAGS:   transparent no_mons_gen
DEPTH:  D:2-3
: if crawl.x_chance_in_y(3, 10) then
NSUBST: d = 1:e / *:d
: end
KITEM:  d = any potion / any scroll / nothing w:30
KITEM:  e = randbook disc:necromancy slevels:2 owner:Jessica / \
            randbook disc:hexes slevels:2 owner:Jessica / \
            randbook disc:translocation slevels:2 owner:Jessica
MONS:   jessica, quokka
veto {{ return you.uniques("Jessica") }}
MAP
   .....
  .......
 ..xxxxx..
..xx.12xx..
..xd...dx..
..xd...dx..
..xd...dx..
..xx...xx..
 ..xx+xx..
  .......
   .....
ENDMAP

NAME:   kennysheep_underground_church
TAGS:   no_pool_fixup no_wall_fixup misc_elf_vault vaults_hard vaults_orient_s
DEPTH:  Vaults, !Vaults:$, Elf, Zot
: if you.in_branch("Elf") then
MONS:   deep elf high priest, deep elf pyromancer / deep elf zephyrmancer
SUBST:  - = +
: elseif you.in_branch("Vaults") then
KMONS:  1| = deep elf high priest
KMONS:  2 = orc knight / ironbound preserver / war gargoyle
: else -- Zot
MONS:   draconian stormcaller, base draconian / draconian monk w:2
KFEAT:  t = petrified_tree
SUBST:  - = +
: end
COLOUR: c = white
TILE:   c = wall_church
FTILE:  -.mcwFt12|*+ = floor_limestone
: single_cloud(_G, "F", "flame", false)
KPROP:  wF = no_tele_into
KMASK:  wF = no_monster_gen
SUBST:  F = w
KMASK:  w = opaque
MAP
 ccccccccccc
 cwwwwwwwwwc
ccwwwmmmwwwcc
cwwFmm|mmFwwc
cwwmm*1*mmwwc
cccc*222*cccc
ctcc.....cctc
c2.cc+++cc.2c
c...........c
cc.........cc
 cccc...cccc
    cc-cc
ENDMAP

NAME:  kennysheep_potato
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
  cccFcccc
 ccwwHwwwccc
ccww....wwwcc
cww.......wwcc
cw....t....wwc
+....x.xxx..wcc
cw...x0%0x..wwc
cw...x%t%x...wc
cww..x0%0x...wc
ccw..xxx.x...ED
 cww....t....wc
 ccww.......wwc
  ccwww....wwcc
   cccwwwHwwcc
     ccccFccc
ENDMAP

NAME:  kennysheep_generic_room_2
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccccccFccccccc
cwwwwwwHwwwwwwc
cwwww.....wwwwc
cwww.......wwwc
cww....t....wwc
cw...xx.xx...wc
cw...x0%0x...wc
+...t.%t%.t..ED
cw...x0%0x...wc
cw...xx.xx...wc
cww....t....wwc
cwww.......wwwc
cwwww.....wwwwc
cwwwwwwHwwwwwwc
cccccccFccccccc
ENDMAP

NAME:  kennysheep_generic_room_3
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
  ccFFcc
 ccwHHwcc
ccww..wwcc
cwwxx.xwwc
+..x0t..ED
+...t0x.ED
cwwx.xxwwc
ccww..wwcc
 ccwHHwcc
  ccFFcc
ENDMAP

NAME:  kennysheep_generic_room_4
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cwww..wwwc
cwwxx.xwwc
+..x0t..ED
+...t0x.ED
cwwx.xxwwc
cwww..wwwc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_5
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cwxx..xxwc
cwxt0.txwc
+...%%0.ED
+..0%%..ED
cwxt.0txwc
cwxx..xxwc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_6
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cw.%..0.wc
cw0txxt%wc
+..xxxx.ED
+..xxxx.ED
cw%txxt0wc
cw.0..%.wc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_7
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cw....0.wc
cw0txx..wc
+..x%%x.ED
+..x%%x.ED
cw..xxt0wc
cw.0....wc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_8
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cww...wwc
cw.0x%.wc
+..xxx.ED
cw.%x0.wc
cww...wwc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_9
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cwxx.xxwc
cwx0x%xwc
+..xtx.ED
cwx%x0xwc
cwxx.xxwc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_10
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cw..t..wc
cw.x0x.wc
+.t%x%tED
cw.x0x.wc
cw..t..wc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_11
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cw..0..wc
cw.xxx.wc
+..txt.ED
cw.xxx.wc
cw..0..wc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_12
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFFccc
cwwHHwwc
cwx.xxwc
+.x0t.ED
+..t0xED
cwxx.xwc
cwwHHwwc
cccFFccc
ENDMAP

NAME:  kennysheep_generic_room_13
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFccc
cww.wwc
cw%x0wc
+.xtxED
cw0x%wc
cww.wwc
cccFccc
ENDMAP

NAME:  kennysheep_generic_room_14
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFcc
cwwHwc
+.t0wc
cw0tED
cwHwwc
ccFccc
ENDMAP

NAME:  kennysheep_generic_room_15
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFFccc
cwwHHwwc
cwt.0twc
+..xx.ED
+..xx.ED
cwt0.twc
cwwHHwwc
cccFFccc
ENDMAP

NAME:  kennysheep_generic_room_16
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccccccFccccccc
cwwwwwwHwwwwwwc
cw...........wc
cw...........wc
cw...xxxxx...wc
cw...0%x%0...wc
cw.....x.....wc
+..xxxxtxxxx.ED
cw...0%x%0...wc
cw.....x.....wc
cw...xxxxx...wc
cw...........wc
cw...........wc
cwwwwwwHwwwwwwc
cccccccFccccccc
ENDMAP

NAME:  kennysheep_small_circle
DEPTH: D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G, true)
: if crawl.coinflip() then
SUBST: * : %
SUBST: % = %$..
: else
SUBST: * : .
SUBST: % : {}OB
KFEAT: O = any shop
: end
SUBST: 0 = 0.
MAP
  ccDcc
 ccwEwcc
ccww0wwcc
cwwt*twwc
FH0*%*0HF
cwwt*twwc
ccww0wwcc
 ccw.wcc
  cc+cc
ENDMAP

NAME:  kennysheep_small_square
DEPTH: D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G, true)
: if crawl.coinflip() then
SUBST: * : %
SUBST: % = %$..
: else
SUBST: * : .
SUBST: % : {}O
KFEAT: O = any shop
: end
SUBST: 0 = 0.
MAP
ccccDcccc
cwwwEwwwc
cwt.0.twc
cw..*..wc
FH0*%*0HF
cw..*..wc
cwt.0.twc
cwww.wwwc
cccc+cccc
ENDMAP

NAME:   kennysheep_inner_square
DEPTH:  D:14-, Depths, !Depths:$
: ks_random_setup(_G, false)
NSUBST: % : 1:|
SUBST:  % = *
SUBST:  9 = 9900.
MAP
   ccccDcccc
  ccwwwEwwwcc
 ccww..x..wwcc
ccww..xtx..wwcc
cww..x.x.x..wwc
cw..xtx.xtx..wc
cw.x.x9%9x.x.wc
FHxtx.%%%.xtxHF
cw.x.x9%9x.x.wc
cw..xtx.xtx..wc
cww..x.x.x..wwc
ccww..xtx..wwcc
 ccww..x..wwcc
  ccwww.wwwcc
   cccc+cccc
ENDMAP

NAME:   kennysheep_dice
DEPTH:  D:4-, Depths, !D:$, !Depths:$
SUBST:  % = %$., 0 = 0.
: ks_random_setup(_G, false)
MAP
ccccccccDDcccccccc
cwwwwwwwEEwwwwwwwc
cw..............wc
cw.txxt....txxt.wc
cw.xxxx....xxxx.wc
cw.xxxx....xxxx.wc
cw.txxt....txxt.wc
cw.....0..0.....wc
FH......%%......HF
FH......%%......HF
cw.....0..0.....wc
cw.txxt....txxt.wc
cw.xxxx....xxxx.wc
cw.xxxx....xxxx.wc
cw.txxt....txxt.wc
cw..............wc
cwwwwwww..wwwwwwwc
cccccccc++cccccccc
ENDMAP

NAME:   kennysheep_two_boxes
DEPTH:  D:14-, Depths, !Depths:$
: ks_random_setup(_G, false)
NSUBST: % : 1:|
SUBST:  % = *,  9 = 9900.
MAP
ccccccDcccccc
ctwwwwEwwwwtc
cw.........wc
cw.xxx.xxx.wc
cw.xtwEwtx.wc
cw.xw9%9wx.wc
FH..H%t%H..HF
cw.xw9%9wx.wc
cw.xtw.wtx.wc
cw.xxx.xxx.wc
cw.........wc
ctwwww.wwwwtc
cccccc+cccccc
ENDMAP

NAME:  kennysheep_diamond
DEPTH: D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G, true)
: if crawl.coinflip() then
SUBST: * : %
SUBST: % = %$..
: else
SUBST: * : .
SUBST: % : {}OCB
KFEAT: O = any shop
: end
SUBST: 0 = 0.
MAP
       ccDcc
      ccwEwcc
     ccww.wwcc
    ccww.t.wwcc
   ccww.xxx.wwcc
  ccww.xxtxx.wwcc
 ccww.xxw.wxx.wwcc
ccww.xxw.0.wxx.wwcc
cww.xxw..*..wxx.wwc
FH.....0*%*0.....HF
cww.xxw..*..wxx.wwc
ccww.xxw.0.wxx.wwcc
 ccww.xxw.wxx.wwcc
  ccww.xxtxx.wwcc
   ccww.xxx.wwcc
    ccww.t.wwcc
     ccww.wwcc
      ccw.wcc
       cc+cc
ENDMAP

NAME:   kennysheep_windowed_goal
DEPTH:  D:4-, Depths, !D:$, !Depths:$
: if crawl.coinflip() then
SUBST:  O : 0
: else
KFEAT:  O = any shop
SUBST:  } : 0
: end
: if crawl.coinflip() then
SUBST:  w:.
: else
SUBST:  t:w
: end
: ks_random_setup(_G, true, true)
MAP
  ccccc
 ccwwwcc
ccw...wcc
+....}..m@
+..}O...m@
+....}..m@
ccw...wcc
 ccwwwcc
  ccccc
ENDMAP

NAME:  kennysheep_nondecorative_pillar
TAGS:  transparent
DEPTH: Depths:2-, !Depths:$
: ks_random_setup(_G, false, true)
MAP
     ...xtx....
    .....x......
   ..............
  ..x..........x..
 ..xx..........xx..
....................
.......wwwwww.......
......wwccccww......
......wcc||ccw.....x
x.....wc*88*cw....xt
tx....wc*..*cw.....x
x.....wcc..ccw......
......wwc++cww......
.......ww..ww.......
....................
 ..xx..........xx..
  ..x..........x..
   ..............
    ......x.....
     ....xtx...
ENDMAP

NAME:    minmay_checkerbox
TAGS:    transparent
DEPTH:   D:3-
SHUFFLE: "'
SUBST:   " = ., ' = x
SHUFFLE: xxxm
SUBST:   x : x:40 cvbm
: if you.absdepth() < 9 then
SUBST:   9 = 0
: end
MAP
 .......
."mx0xm".
.m'...'m.
.x.xmx.x.
.m.9|9.m.
.x.xmx.x.
.m'...'m.
."mx0xm".
 .......
ENDMAP

NAME:  minmay_bent
TAGS:  transparent
DEPTH: D:4-
SUBST: " : "'
SUBST: " : .:100 xcvbnmGTt0
SUBST: ' : .:100 xcvbnmGt0%
SUBST: 0 = 00.
: if you.absdepth() < 9 then
SUBST: 9 = 0
: end
MAP
     .....
    ..xxx0
  ...xx...0.
  ."0x*.'.x.
 ..0*x.'..x.
..xxxx9..xx.
.xx..9xxxx..
.x..'.x*0..
.x.'.*x0".
.0...xx...
  0xxx..
  .....
ENDMAP

NAME:    minmay_ruined_shrine
TAGS:    transparent
DEPTH:   D:4-
SUBST:   c = ccc.
SUBST:   c : c b:2 v:2
NSUBST:  0 = 2:0 / 6 = 0.. / *:.
SHUFFLE: '"
SUBST:   " : 0:75 ':75 xcvbnTG t:5
SUBST:   ' : 0:75 xcvbnTG t:5
: if you.absdepth() < 9 then
SUBST:   9 = 0
: end
MAP
    .......
   ..ccccc..
  ..ccccccc..
 ..ccc9C9ccc..
..ccc00"00ccc..
.ccc00'0'00ccc.
.cc*0000000*cc.
.cccccc0cccccc.
.cccccc0cccccc.
......000......
ENDMAP

NAME:    minmay_checkered_concentric_circles
TAGS:    transparent
DEPTH:   D:12-, Depths, Elf
SHUFFLE: vc / vc / vc / vc / vb / vn / cb / cn
NSUBST:  8 = 1:8 / 1:. / * = 8.
NSUBST:  9 = 1:9 / 1:. / * = 9.
MAP
     .....
   ...vcv...
  ..cvc8cvc..
 ..cv.9.9.vc..
 .cv9.....9vc.
..v...vcv...v..
.vc8.vc|cv.9cv.
.c8..+|||c...+.
.vc8.vc|cv.9cv.
..v...vcv...v..
 .cv9.....9vc.
 ..cv.9.9.vc..
  ..cvc8cvc..
   ...vcv...
     .....
ENDMAP

NAME:  minmay_tall_x
TAGS:  transparent
DEPTH: D:1-2
MAP
.......
.xx.xx.
..x0x..
 .%x%.
 0xbx0
 .%x%.
..x0x..
.xx.xx.
.......
ENDMAP

NAME:  minmay_split_cup_small
TAGS:  transparent
DEPTH: D:1-2
MAP
.......
.xxxxx.
.x0x%x.
.x0.%..
.x0x%x.
.xxxxx.
.......
ENDMAP

NAME:  minmay_split_cup_large
TAGS:  transparent
DEPTH: D:1-2
SUBST: b : xcvbmGT%0 .:50
MAP
.........
.xxxxxxx.
.x0...0x.
.xx0b0xx.
.x%%.%%x.
.xxx.xxx.
.........
ENDMAP

NAME:  minmay_tripent
TAGS:  transparent
DEPTH: D:1-2
MAP
 .. ...
..x.xx.
.xxx0x.
 .x%x.
.x0xxx.
.xx.x..
... ..
ENDMAP

NAME:  minmay_tiny_reverse_x
TAGS:  transparent
DEPTH: D:1-2
MAP
.. . ..
.x.x.x.
 .x%x.
.x0.0x.
 .x%x.
.x.x.x.
.. . ..
ENDMAP

NAME:  minmay_small_reverse_x
TAGS:  transparent
DEPTH: D:1-2
MAP
........
.x.xx.x.
..x0%x..
.x%bb0x.
.x0bb%x.
..x%0x..
.x.xx.x.
........
ENDMAP

NAME:   minmay_guardbox
TAGS:   transparent
DEPTH:  D:2-3
WEIGHT: 1
MAP
0000
0%%0
0%%0
0000
ENDMAP

NAME:    minmay_randomly_rotated_circles
TAGS:    transparent
DEPTH:   D:2-3
SHUFFLE: ABCDEFGH
SHUFFLE: IJKLMNOP
SUBST:   AI : ., BCDEFGHJKLMNOP : x
SUBST:   b : bxcvm 0:5 .:5 %:5
MAP
    ........
  ...BBBCCC...
 ..BBB....CCC..
 .AA........CD.
..A..JJJKKK..D..
.AA.II...0KL.DD.
.A..I0.%%.0L..D.
.A..I.%bb%.L..D.
.H..P.%bb%.M..E.
.H..P0.%%..M..E.
.HH.PO0..0MM.EE.
..H..OOONNN..E..
 .HG........EE.
 ..GGG....FFF..
  ...GGGFFF...
    ........
ENDMAP

NAME:    minmay_swirly_circle
TAGS:    transparent
DEPTH:   Depths
SUBST:   x : ccvvb
MAP
       ........
    ....xxxxxx....
   ..xxxx....9xxx..
  ..xxxx.xxxxxxxxx..
 ..xx|xx.xx|xxx.8xx..
 .xx8xxx.xxx8x.xx|xx.
 .xx.xxx.xxx.x.xxxxx.
..xxx...x...xx.xxxxx..
.x9xxxxxxxxx.xx....xx.
.x.xx8.x.9xx9x.xxxx.x.
.x.x|xx.xx**xx.xxxx.x.
.x.xxxx.xx**xx.xx|x.x.
.x.xxxx.x9xx9.x.8xx.x.
.xx....xx.xxxxxxxxx9x.
..xxxxx.xx...x...xxx..
 .xxxxx.x.xxx.xxx.xx.
 .xx|xx.x8xxx.xxx8xx.
 ..xx8.xxx|xx.xx|xx..
  ..xxxxxxxxx.xxxx..
   ..xxx9....xxxx..
    ....xxxxxx....
       ........
ENDMAP

NAME:   minmay_indecisive_spiral
TAGS:   transparent
DEPTH:  D:1-2
MAP
...........
.xxx.xxx.x.
...xxx...x.
.x.x.x.xxx.
.x...0.%x..
.xxx0x0xxx.
..x%.0...x.
.xxx.x.x.x.
.x...xxx...
.x.xxx.xxx.
...........
ENDMAP

NAME:   minmay_increasing_density
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
.........................
x.......x.......x.......x
.....x......x......x.....
...x.....x.....x.....x...
..x....x....x....x....x..
x...x...x...x...x...x...x
...x..x..x..x..x..x..x...
x.x.x.x.x.x.x.x.x.x.x.x.x
x0xx0xx0xx0xxx0xx0xx0xx0x
xx0xxx0xxx%xxx%xxx0xxx0xx
xx0xxxx%xxxxxxxxx%xxxx0xx
xxx%xxxxxxxxxxxxxxxxx%xxx
xxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:  minmay_starry_boxes
TAGS:  transparent
DEPTH: D:3-,Depths
SUBST: 0 = 0..
SUBST: x : xxxxxxcvb
MAP
 ...............
..xx...xxx...xx..
.xxx.x.x%x.x.xxx.
.xxx...x.x...xxx.
....xxx.0.xxx....
..x.x%x0x0x%x.x..
....xx0x.x0xx....
.xxx.0x.x.x0.xxx.
.x%.0x.x.x.x0.%x.
.xxx.0x.x.x0.xxx.
....xx0x.x0xx....
..x.x%x0x0x%x.x..
....xxx.0.xxx....
.xxx...x.x...xxx.
.xxx.x.x%x.x.xxx.
..xx...xxx...xx..
 ...............
ENDMAP

NAME:   minmay_diced_spiral
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
..................
.xxxx.xxx.xx.x.xx.
.xxxx.xxx.xx.x.xx.
...............xx.
.xx.xxx.xx.x.x.xx.
.............x....
.xx.x.xx0x0x.x.xx.
.xx...0....x...xx.
....x.x.%..0.x.xx.
.xx.x.0..%.x.x....
.xx...x....0...xx.
.xx.x.x0x0xx.x.xx.
....x.............
.xx.x.x.xx.xxx.xx.
.xx...............
.xx.x.xx.xxx.xxxx.
.xx.x.xx.xxx.xxxx.
..................
ENDMAP

NAME:   minmay_quadrilaterals
TAGS:   transparent
DEPTH:  D:2-
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
.....................
..xxxx+xxxxxxx+xxxxx.
.xxx.....xxx.....xxx.
.xxxx.....xxx.....xx.
.x.xxx..0..xxx..0..x.
.x..xxx.....xxx....x.
.+...xxx.....xxx...+.
.x....xxxx+xxxxxx..x.
.x..0..x0...0x.xxx.x.
.xx....x..%..x..xxxx.
.xxx...+.%'%.+...xxx.
.xxxx..x..%..x....xx.
.x.xxx.x0...0x..0..x.
.x..xxxxxx+xxxx....x.
.+...xxx.....xxx...+.
.x....xxx.....xxx..x.
.x..0..xxx..0..xxx.x.
.xx.....xxx.....xxxx.
.xxx.....xxx.....xxx.
.xxxxx+xxxxxxx+xxxx..
.....................
ENDMAP

NAME:   minmay_3d_cube
TAGS:   transparent
DEPTH:  D:1-2
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
.........
.xxxxxxx..
.xx..0..x..
.x.x..0..x..
.x..xxxxxxx.
.x0.x0.0..x.
.x.0x.%...x.
.x..x0....x.
..x.x...%.x.
 ..xx.....x.
  ..xxxxxx+.
   .........
ENDMAP

NAME:   minmay_puff
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
   xxxxx
xxxx...xxx
xx.......xx
x...xmx...xx
x..xx%xx...x
xx0..0xx...xxxxx
.xmxxmx...xx...xx
.........xx.....xx
@......xmx..xxx.0x
....xmxx...xx%0.xx
xxmx........mxxxx
....xmxx...xx%0.xx
@......xmx..xxx.0x
.........xx.....xx
.xmxxmx...xx...xx
xx0..0xx...xxxxx
x..xx%xx...x
x...xmx...xx
xx.......xx
xxxx...xxx
xxxxxxxx
ENDMAP

NAME:   minmay_fractal_squares_5
TAGS:   transparent
DEPTH:  D:2-
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
        ...
        .x.
       .....
     ...xxx...
     .x.x%x.x.
   .....x.x.....
   .x...0.0...x.
  .....xx0xx.....
...xxx0x...x0xxx...
.x.x%..0.%.0..%x.x.
...xxx0x...x0xxx...
  .....xx0xx.....
   .x...0.0...x.
   .....x.x.....
     .x.x%x.x.
     ...xxx...
       .....
        .x.
        ...
ENDMAP

NAME:   minmay_fractal_squares_gapless_5
TAGS:   transparent
DEPTH:  D:2-
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
      ...
     ..x..
    ..xxx..
    .xx%xx.
  ....x.x....
 ..x.xx0xx.x..
..xxxx0.0xxxx..
.xx%.0.%.0.%xx.
..xxxx0.0xxxx..
 ..x.xx0xx.x..
  ....+.x....
    .xx%xx.
    ..xxx..
     ..x..
      ...
ENDMAP

NAME:   minmay_fractal_squares_gapless_7
TAGS:   transparent
DEPTH:  D:9-,Depths
SUBST:  m : nx
SUBST:  x : cvb
SUBST:  ' : xcvbnGT .:70
SUBST:  9 = 09..
MAP
            ...
           ..x..
          ..xxx..
          .xx%xx.
        ....m.m....
       ..x.xx9xx.x..
      ..xxmx...xmxx..
     ..xx%.9.'.9.%xx..
    ..xxxxxx...xxxxxx..
    .xx%xxxxx.xxxxx%xx.
  ....m.xxxxx9xxxxx.m....
 ..x.xx9xxx.....xxx9xx.x..
..xxmx...xx.....xx...xmxx..
.xx%.9.'..9..'..9..'.9.%xx.
..xxmx...xx.....xx...xmxx..
 ..x.xx9xxx.....xxx9xx.x..
  ....m.xxxxx9xxxxx.m....
    .xx%xxxxx.xxxxx%xx.
    ..xxxxxx...xxxxxx..
     ..xx%.9.'.9.%xx..
      ..xxmx...xmxx..
       ..x.xx9xx.x..
        ....+.m....
          .xx%xx.
          ..xxx..
           ..x..
            ...
ENDMAP

NAME:   minmay_fractal_squares_diagonal_5
TAGS:   transparent
DEPTH:  D:3-, Depths
SUBST:  0 = 0..
MAP
... ... ... ...
.x...x. .x...x.
..xxx.. ..xxx..
 .x%x.   .x%x.
..xx+00000+xx..
.x..0xx+xx0..x.
... 0x...x0 ...
    0x...x0
... 0x%%%x0 ...
.x..0xxxxx0..x.
..xx+00000+xx..
 .x%x.   .x%x.
..xxx.. ..xxx..
.x...x. .x...x.
... ... ... ...
ENDMAP

NAME:    minmay_mirror_moons_of_madness
TAGS:    transparent
DEPTH:   D:9-, Depths
SHUFFLE: ccvvbb
MAP
     ........
   ...cncncn...
  ..ncncncncnc...
 ..ncnc0..0ncncn.
 .ncn0......0cnc.
..cn...nbnb...cn..
......nbnbnb..ncn.
.....nb|..|nb.0nc.
.....bn........cn.
.....nb........nc.
.....bn9..9bn.%cn.
......bnbnbn..cnc.
..nc...bnbn...nc..
 .cnc%......%ncn.
 ..cncn%..%cncn..
  ..cncncncncn..
   ...ncncnc...
     ........
ENDMAP

NAME:   minmay_circle_x
TAGS:   transparent
DEPTH:  D:2-
SUBST:  z : y:50 %0GTz
SUBST:  y : x:34 .:34 cvb G:2
SUBST:  x : xcvb
SUBST:  z = x
SUBST:  0 = 0..
MAP
  .......
 ..xxxxx..
..y0xxx0y..
.x0y0x0y0x.
.xx0y%y0xx.
.xxx%z%xxx.
.xx0y%y0xx.
.x0y0x0y0x.
..y0xxx0y..
 ..xxxxx..
  .......
ENDMAP

NAME:   minmay_between
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
 .......
..x...x..
.xxx.xxx.
.00xxx00.
.xxx.xxx.
..x..%x...
 ...x%..x..
  .xxx.xxx.
  .00xxx00.
  .xxxxxxx.
  ..x...x..
   .......
ENDMAP

# Each chamber contains a different feature in a different arrangement of 5.
NAME:    minmay_chambers_of_fives
TAGS:    transparent
DEPTH:   D:5-10
SHUFFLE: ABCDG / EFHI0 / JKLMT / NOPQ" / RSYZ%
SHUFFLE: AFLPZ / BHMQR / CIJNS / DEKOY
SUBST:   BCDHIEMJKQNORSY = .
SUBST:   A = G, F = 00009, L = TTTTV, P = x, Z = %%%%*
SUBST:   " = x
SUBST:   x : xxxxxcccvb
MAP
      .........
      .xxx.xxx.
      .xI.H.Ix.
      .x.FEF.x.
      ..HE0EH..
      .x.FEF.x.
.......xI.H.Ix.......
.xxx.xxxxx.xxxxx.xxx.
.xD.C.DxZ.Y.ZxM.L.Mx.
.x.BAB.x.SRS.x.KJK.x.
..CAGAC.YR%RY.LJTJL..
.x.BAB.x.SRS.x.KJK.x.
.xD.C.DxZ.Y.ZxM.L.Mx.
.xxx.xxxxx.xxxxx.xxx.
.......xQ.P.Qx.......
      .x.ONO.x.
      ..PN"NP..
      .x.ONO.x.
      .xQ.P.Qx.
      .xxx.xxx.
      .........
ENDMAP

NAME:   minmay_shattered_shrine
DEPTH:  D:7-, Depths, Lair
TAGS:   transparent
KMONS:  p = plant
SUBST:  9 = 9., " = .:190 0:5 %:5, ' = .:30 0:5 %:5
MAP
.......................
.ccccccc""c"cc"ccccccc.
.cp9..pc"cc"c""cp9.9pc.
.c9nnn.c"cc""c"c9n+n9c.
.c.+*n.+""c"c""c.n*n.c.
.c9nnn.c"c"""c"c.nnn.c.
.cp9..pc"c""cc"cp...pc.
.ccccccc"c"c"c"ccc+ccc.
.""""""""ccccc"""""""".
.cc"c""cc'cc''"ccc"cc".
.c""c"c""''c''c""""""".
.cccc""ccccc'c"cc"ccc".
."c"cc"""c''c'c""""""".
.c"ccc"cc'cc'c""cccc"c.
.""""""""c""c""""cccc".
.ccc+ccc"ccc""""""""c".
.cp...pc"""cccc"cc""cc.
.c.nnn.c""ccc"cc"c"c"c.
.c.n*n.c"cccc"""c"cccc.
.c9n+n9c""cc"c"""""""c.
.cp9.9pc"c""""ccc""c"c.
.ccccccc"cc"cc"""""""".
.......................
ENDMAP

NAME:    minmay_pentangle
TAGS:    transparent
DEPTH:   D:3-6
SHUFFLE: '! / Q" / Q" / Q"
# Each chamber independently has either monsters or items
SHUFFLE: 12345adefg
SUBST:   12345 = 0..., adefg = %..., ! = ', ' : xcvb, ? : +., x : xxxxxcccvb
SUBST:   " = .:80 xcvbGTV%, Q = .
MAP
...................
.xxxxxxxx?xxxxxxxx.
.xxxx111x.x222xxxx.
.xx1111xx.xx2222xx.
.xx1111xx.xx2222xx.
.x1111+x...x+2222x.
.xxxxxx..'..xxxxxx.
.?.......'.......?.
.xxx..''.'.''..xxx.
.x4xx..''"''..xx3x.
.x44xx..'.'..xx33x.
.x444+.''.''.+333x.
.x44xx.'...'.xx33x.
.x4xx....x....xx3x.
.x44x..xx+xx..x33x.
.xx4x.xx555xx.x3xx.
.xxxx?xxxxxxx?xxxx.
...................
ENDMAP

NAME:    minmay_pentomino_pile
TAGS:    transparent
DEPTH:   D:2-4
SUBST:   0 = 0%
MAP
   ............
   ....xxx.....
   .xx.x.x.xxx.
....x.x.0.xx...
..x.x.xx.x..x..
..x.x.x.xxx0xx...
..xx.0x.0x..xx...
..x.xx.x..xx..xx.
.x.0.x.xxx.xx0xx.
.xx.xx0..x.x..x..
..xx..xxx.0.xx...
....x0.x.xxx...
   .xx.x.x.....
   ..xx..x...
   ..........
ENDMAP

NAME:   minmay_alternating_orb
TAGS:   transparent
DEPTH:  D:6-, Depths
WEIGHT: 5
SUBST:  x : xxxxxcccvb
MAP
     ......
  ....xxxx..
 ..xxx%%%xx.
 .xx%%xx%%x.
 .x%%x0xx%x.
..x%xx00x%x.
.x0x%%xx0x..
.x0xx%x00x.
.x00xx00xx.
.xx000xxx..
..xxxx...
 ......
ENDMAP

NAME:   minmay_microvault
DEPTH:  D:6-, Depths
MAP
c9c
c*c
ccc
ENDMAP

NAME:   amcnicky_mini_pool_medium
TAGS:   no_pool_fixup
WEIGHT: 5
DEPTH:  D:5-, Depths, Lair
SUBST:  p : wwwWWl, q = 0.
: if you.in_branch("Depths") then
SUBST:  x = c
: end
MAP
  xx...xx
 xx..p..xx
xx.qpppq.xx
x.qpppppq.x
..ppppppp..
.ppppppppp.
..ppppppp..
x.qpppppq.x
xx.qpppq.xx
 xx..p..xx
  xx...xx
ENDMAP

NAME:    nicolae_fountain_basement
TAGS:    transparent allow_dup luniq no_descent
DEPTH:   D:5-, Depths:2-, Snake:2-, Elf:2-, Crypt:2-
KMASK:   -'cnTUVY0%{[( = opaque
SHUFFLE: DE/TF
SUBST:   D : ---T, T : T:30 UV Y:3, F : n, E : cccn, H : cccn, \
         s = {[(, - = 0%----
MAP
    .....
    .FFF.
  ...HTH...
  .EEH-HEE.
...ED---DE...
.FHH-'''-HHF.
.FT--'s'--TF.
.FHH-'''-HHF.
...ED---DE...
  .EEH-HEE.
  ...HTH...
    .FFF.
    .....
ENDMAP

NAME:   nicolae_rejected_hall
TAGS:   transparent
DEPTH:  D:9-, Depths
NSUBST: D = + / n+, E = + / n+, F = + / n+, H = + / n+, J = + / n+
SUBST:  n : nccc, % = %%%*, * = ***|, 0 = 0..., 9 = 9..., 8 = 8...
MAP
    ccccccccc+ccccccccc
    c%...D0.....0E...%c
  ccc.89.c.......c.98.ccc
  c*.998.c0.0.0.0c.899.*c
ccc.899.%cc..T..cc%.998.ccc
c%.998.cccc0.0.0cccc.899.%c
c.899.*ccccc...ccccc*.998.c
c.98.ccccccc0.0ccccccc.89.c
c...%ccccccccJcccccccc%...c
cDccccccccc0...0cccccccccEc
c0.0cccccc%.0.0.%cccccc0.0c
c....0ccc0.9.0.9.0ccc0....c
c..0...0c.0.9.9.0.c0...0..c
+...T0..J..0.U.0..J..0T...+
c..0...0c.0.9.9.0.c0...0..c
c....0ccc0.9.0.9.0ccc0....c
c0.0cccccc%.0.0.%cccccc0.0c
cFccccccccc0...0cccccccccHc
c...%ccccccccJcccccccc%...c
c.98.ccccccc0.0ccccccc.89.c
c.899.*ccccc...ccccc*.998.c
c%.998.cccc0.0.0cccc.899.%c
ccc.899.%cc..T..cc%.998.ccc
  c*.998.c0.0.0.0c.899.*c
  ccc.89.c.......c.98.ccc
    c%...F0.....0H...%c
    ccccccccc+ccccccccc
ENDMAP

# With shadow creatures, summons, word of recall, and phantom mirror, this
# vault can get out of hand pretty quickly. You've got this, though.
NAME:    nicolae_keep_em_comin
TAGS:    transparent
DEPTH:   Depths:2-
KMONS:   1 = rakshasa / shadow demon / ironbound convoker / \
             deep elf demonologist / boggart / vampire mage
NSUBST:  D = + / c, E = + / c, F = + / c, H = + / c
# 40% chance of all three upstairs, 60% of just two.
SHUFFLE: {[(<<
# Generates between 8 and 16 monsters
NSUBST:  . = 8=1 / 8=1. / .
FTILE:   .'{[(<1+G = floor_mystic_chasm
MAP
cccc   cccc   cccc
cccccDccccccDccccc
cccc'''cccc'''cccc
ccc............ccc
 c'............'c
 H'..''''''''..'E
 c'..''''''''..'c
ccc..''G''G''..ccc
ccc..'''{['''..ccc
ccc..'''(<'''..ccc
ccc..''G''G''..ccc
 c'..''''''''..'c
 H'..''''''''..'E
 c'............'c
ccc............ccc
cccc'''cccc'''cccc
cccccFccccccFccccc
cccc   cccc   cccc
ENDMAP

# So named because the layout started as a doodle in my notebook.
NAME:  nicolae_doodle_vault
TAGS:  transparent
DEPTH: D:8-
KITEM: * = * w:30 / |
KMONS: * = 9 w:30 / 8
SUBST: 0 = .000, % = .%%%
MAP
  xx@xxxxxxxxx@xx
  x......x......x
xxx.xxxx.x.xxxx.xxx
x...x....x....x...x
@.xxx.x.xxx.x.xxx.@
x.x..0x0...0x0..x.x
x.x.xxxxx.xxxxx.x.x
x.x..0x*%.%*x0..x.x
x...x.x%xxx%x.x...x
xxxxx...xxx...xxxxx
x...x.x%xxx%x.x...x
x.x..0x*%.%*x0..x.x
x.x.xxxxx.xxxxx.x.x
x.x..0x0...0x0..x.x
@.xxx.x.xxx.x.xxx.@
x...x....x....x...x
xxx.xxxx.x.xxxx.xxx
  x......x......x
  xx@xxxxxxxxx@xx
ENDMAP

# Places an early-ish talisman with corresponding monsters and scenery
NAME:  hellmonk_talismancer
TAGS:  transparent no_item_gen patrolling
DEPTH: D:12-, Lair:2-, Orc:$
: local r = 0
: if you.branch() == "Lair" then
:   r = crawl.random_range(1, 4)
: elseif you.branch() == "Orc" then
:   r = crawl.random_range(3, 5)
: else
:   r = crawl.random_range(1, 9)
: end
: if r == 1 then
MONS:   eight-headed hydra / goliath frog
ITEM:   maw talisman / maw talisman randart w:1
SUBST:  " : ., . = . %:1
KITEM:  % = yak skeleton
: elseif r == 2 then
MONS:   anaconda
KMONS:  " = water moccasin
ITEM:   serpent talisman / serpent talisman randart w:1
KFEAT:  "' = shallow_water
NSUBST: " = 1:" / 1:' / * = "'
SUBST:  2 = .
: elseif r == 3 then
MONS:   fire dragon, lindwurm
KITEM:  d = dragon-coil talisman / dragon-coil talisman randart w:1
SUBST:  '" = l
: elseif r == 4 then
KMONS:  12 = boulder beetle
KITEM:  d = granite talisman / granite talisman randart w:1
SUBST:  " = G
: elseif r == 5 then
MONS:   dancing weapon ; rapier | scimitar | great sword | \
                         quick blade w:1 | triple sword w:1 | double sword w:1
ITEM:   blade talisman / blade talisman randart w:1
KITEM:  " = damaged long sword / damaged falchion
SUBST:  x = v, 2 = .
: elseif r == 6 then
MONS:   reaper, soul eater
KITEM:  d = talisman of death / talisman of death randart w:1
SUBST:  " = G
:   vault_granite_statue_setup(_G, "G", "gravestone")
: elseif r == 7 then
MONS:   air elemental
KMONS:  2" = raiju
KITEM:  d = storm talisman / storm talisman randart w:1
SUBST:  " = "...
MARKER: d = lua:fog_machine {cloud_type = "thin mist", \
             pow_min = 5, pow_max = 12, delay_min = 28, delay_max = 42, \
             size = 2, spread_rate = 2, start_clouds = 1 }
: elseif r == 8 then
MONS:   vampire mage
KMONS:  2" = vampire
KITEM:  d = sanguine talisman / sanguine talisman randart w:1
KFEAT:  " = fountain_blood
SUBST:  " = ""YY
: else
SUBST: 1d'" = .
: end
SUBST: x : xcc
MAP
xxxxxxxxxxx
xxxxxxxxxxx
xx"'xxx'"xx
xx'..1..'xx
xxx..2..xxx
xxxx.d.xxxx
xxx.....xxx
xx'.....'xx
xx"'x+x'"xx
xxxxx.xxxxx
xxxx+++xxxx
ENDMAP

NAME:    regret_index_sullied_sanctum
TAGS:    no_monster_gen no_item_gen vaults_room vaults_orient_e
DEPTH:   D:5-, !D:$, Lair, !Lair:$, Orc, Vaults, !Vaults:$, Zot, !Zot:$
WEIGHT:  5 (Vaults), 10
# Randomization comes first before monsters due to per-branch tilework.
NSUBST:  G = 3:G / 1:. / * = GGD.., c = 2:D / 45:c / * = ccc.
NSUBST:  . = 4:t / 4:x / 1:12 / 4:d / 2:e / 2:f / / *:.
NSUBST:  ~ = 2:x / 2 = t' / 4 = '. / *:., - = 2:x / 1 = t' / 3 = '. / *:.
SUBST:   0 = 122, z = c
: if you.in_branch("D") then
:   if you.depth() < 8 then
MONS:    dart slug / jackal zombie w:1
MONS:    shadow imp / howler monkey w:2 / drude w:2, bullfrog zombie / jelly w:5
NSUBST:  g = 1:g$$ / *:$, * = 1:% / *:$
:   elseif you.depth() < 11 then
MONS:    ufetubus / wight w:5, sky beast / sleepcap, hornet zombie / marrowcuda
NSUBST:  g = 1:g$ / *:$, * = 1:*% / *:%
:   elseif you.depth() < 14 then
MONS:    vampire mosquito / basilisk / simulacrum
MONS:    meliai simulacrum / acid dragon
MONS:    very large slime creature / shadowghast
NSUBST:  g = 1:g / * = g$
:   else
MONS:    large slime creature / redback, necromancer, hydra / flayed ghost
:   end
ITEM:    human skeleton / kobold skeleton w:3
: elseif you.in_branch("Lair") then
MONS:    hell rat / bullfrog w:3, basilisk / manticore w:3
MONS:    alligator / torpor snail w:6
ITEM:    centaur skeleton / spriggan skeleton
: elseif you.in_branch("Orc") then
MONS:    warg, troll / deep troll w:3, obsidian bat
ITEM:    dwarf skeleton / elf skeleton w:1
: elseif you.in_branch("Vaults") then
MONS:    large slime creature / crawling flesh cage w:4
MONS:    formless jellyfish, entropy weaver
ITEM:    troll skeleton / ogre skeleton w:6
NSUBST:  W = 2:1 / * = ef, g = 1:g / 1:h, . = 1:3, % = 1:|*%% / *:%
: else -- Zot
MONS:    spectral base draconian / death cob w:5
MONS:    shadow dragon / green draconian monk
MONS:    ghost moth / curse toe
ITEM:    oni skeleton / elf skeleton w:2 / apis skeleton w:2
SUBST:   g = h
: end
: if you.in_branch("Vaults") then
NSUBST:  @ = 2:. / *:x, & = 2:. / *:x
SUBST:   t = e, }) = .
CLEAR:   X
FTILE:   'V = floor_hall
FTILE:   .defgh%*|CDG123 = floor_pebble_brown
TILE:    c = wall_stone_smooth
: else
:   if you.in_branch("Zot") then
KMONS:   t = withered plant
NSUBST:  . = 1:2 / 1:3 / *:.
SHUFFLE: })]<>
TILE:    n = dngn_transparent_stone_magenta
:   else
:     if you.in_branch("Lair") then
FTILE:   .defgh%*|CDG123 = floor_sprouting_stone
:     end
KMONS:   t = toadstool / fungus w:2
SUBST:   }) = t
FTILE:   'tV = floor_pebble_green
:   end
NSUBST:  @ = 2:x / *:@, & = 2:@x / * = cx
SUBST:   X = x
: end
KMONS:   D = pile of debris
ITEM:    any weapon mundane damaged no_pickup
ITEM:    robe mundane damaged no_pickup
# XXX: Light ego would normally be on a helmet, but this is specifically
#      referencing Monk starting items.
ITEM:    robe good_item / quarterstaff good_item / orb ego:light pre_id / \
         amulet of faith pre_id / \
         potion of ambrosia q:1 pre_id / scroll of revelation q:1 pre_id
ITEM:    robe randart / lajatang randart / orb ego:light randart / \
         amulet of faith randart / manual of invocations pre_id / \
         potion of ambrosia q:3 pre_id / scroll of revelation q:3 pre_id
KITEM:   CD = large rock q:1
KITEM:   % = % / any scroll q:1
KFEAT:   C = altar_ecumenical
KPROP:   C = no_tele_into
COLOUR:  W = lightgreen
: vault_granite_statue_setup(_G, "G", "broken pillar")
: decorative_floor(_G, '?', "broken floral vase")
MAP
XXXXXXXXXX
XzzzzzcccXXXXXXXXX
Xznnn...cccccccccXXXXXXXXX
XznCng..c~......cccccccczXXXXXX
Xznnn.).~c.G..G.c......?zcccccccc
Xz0g....c~..ee...c.Vt.1.zc......@
Xc..}.WW~c..ee..c..tt2..zc.G..G.@
Xc....WWc~.G..G..c...tt.zc......@
Xc~c~c~ccc......c..1.tV.zc......@
Xcc~c~czzc~c~c~ccc1.....zc.G..G.@
Xc...1.3zcc~c~cczcc-c-c-zc......@
Xc.G..G.c~......zc-c-c-ccc-c-c-cc
Xc..*%.1~c.Vt...zc......-cc-c-c-c
Xc..%*..c~.tt...zc.G..G.c-......c
Xc.G..G.~c...tt.zc..ff..-c.Vt.1.&
Xc2.....c~...tV.zc..ff..c-.tW...&
Xccccccccc0.....zc.G..G.-c...Wt.&
XXXXXXXXXccccccczc?.....c-.1.tV.&
        XXXXXXXXXccccccccc......c
                XXXXXXXXXcccccccc
                        XXXXXXX
ENDMAP

# A gloomy forest spreads throughout the depth, a dark tunnel
# leading to the misty lake at its heart.
NAME:    darby_gloom_lake
TAGS:    no_monster_gen no_item_gen no_pool_fixup
DEPTH:   D:1-3, Lair, !Lair:$, Depths, !Depths:$, Zot, !Zot:$, Pan
WEIGHT:  7 (D:1), 10
# Monsters that might fit a dark or Gothic forest atmosphere, with
# Doom, rN checks, and similar mechanics where available.
: if you.in_branch("D") then
KMONS:   1 = bat
KMONS:   2 = jackal band / spectral hobgoblin
KMONS:   3 = rat / kobold / endoplasm
KITEM:   k = human skeleton / barachi skeleton / centaur skeleton
SUBST:   4 = 3
NSUBST:  ! = 4:1 / *:w
: elseif you.in_branch("Lair") then
KMONS:   1 = raven
KMONS:   2 = catoblepas / death yak band
KMONS:   3 = basilisk / wolf band
# Never spawn a death yak band atop the "secret" staircase.
KMONS:   4 = catoblepas / basilisk / wolf band
KITEM:   k = naga skeleton / merfolk skeleton
SUBST:   R = Rx
NSUBST:  ! = 2:1 / *:w
: elseif you.in_branch("Depths") then
KMONS:   1 = vampire mage / shadow dragon
KMONS:   2 = alderking
KMONS:   3 = occultist w:5 / necromancer / vampire knight / lich
KITEM:   k = spriggan skeleton / tengu skeleton
SUBST:   4 = 3
NSUBST:  ! = 2:1 / *:w
: elseif you.in_branch("Pandemonium") then
KMONS:   1 = soul eater / reaper w:5
KMONS:   2 = tzitzimitl / profane servitor w:5
KMONS:   3 = demonspawn soul scholar band / tormentor
KMONS:   4 = profane servitor
KITEM:   k = demonspawn skeleton
KFEAT:   C = altar_yredelemnul
SUBST:   G = C, } = {., W = w
NSUBST:  ! = 4:1 / *:w
: elseif you.in_branch("Zot") then
KMONS:   1 = shadow dragon / curse toe / spectral draconian
KMONS:   2 = orb of entropy
KMONS:   3 = draugr
KITEM:   k = draconian skeleton
NSUBST:  ! = 2:1 / *:w
SUBST:   4 = 3, W = w
: end
# 2 common necromantic items and 1 rare one.
ITEM:    any weapon ego:draining / parchment of Soul Splinter w:4 / \
         parchment of Kiss of Death w:1 / parchment of Gloom w:1
ITEM:    any weapon ego:pain / any weapon ego:vampirism / \
         any weapon ego:draining good_item / parchment disc:necromancy
ITEM:    sanguine talisman w:30 / staff of necromancy w:30 / \
         shadow dragon scales good_item w:30 / manual of necromancy w:15 / \
         scale mail ego:death good_item / chain mail ego:death good_item / \
         plate armour ego:death good_item
KFEAT:   1F = deep_water
KFEAT:   X = x
SHUFFLE: '"` / #&$, s} / s} / S]
NSUBST:  ? = 1:2 / *:3
SUBST:   2 = 23, k = k., " = @, # = X, & = x
SUBST:   ` : w., $ = ., s = t, S = ., ] = }.
: if not you.in_branch("D") then
NSUBST:  d = 1:f / *:e
: end
CLEAR:   R
MARKER:  F = lua:fog_machine { cloud_type = "thin mist", \
             pow_min = 8, pow_max = 12, delay = 25, \
             size = 2, walk_dist = 1, spread_rate= 33 }
: if you.in_branch("Pandemonium") then
KFEAT:   tT = demonic_tree
FTILE:   .defkstCGX1234?{}` = floor_nerves_darkgray
TILE:    X# = wall_hall_of_shadows
TILE:    tT = dngn_demonic_tree_1 / dngn_demonic_tree_16 / \
              dngn_demonic_tree_4 / dngn_demonic_tree_5 / \
              dngn_demonic_tree_6 w:5 / dngn_demonic_tree_7 w:5 / \
              dngn_demonic_tree_8 w:5 / dngn_demonic_tree_9 w:5
TILE:    w1F = dngn_starwater
: elseif you.in_branch("Zot") then
KFEAT:   tT = petrified_tree
TILE:    X# = wall_abyss_darkgray
TILE:    w1F = dngn_starwater
: else
KFEAT:   T = t
COLOUR:  tT = brown
TILE:    tT = dngn_tree_dead
TILE:    X = wall_pebble_darkgray
:   set_feature_name("tree", "dead tree")
:   if you.in_branch("Lair") then
FTILE:   .defkstGX1234?}` = floor_rough_darkgray
:   end
: end
: vault_granite_statue_setup(_G, "G", "gravestone")
veto {{
  return dgn.zot_orb_type() ~= "orb of entropy" and you.in_branch("Zot")
}}
# "Secret" gravestone area is a very mild spoiler, revealed when
# entering from below. In Pan, a guaranteed servitor reveals it.
MAP
                 T    T
          T        TTT     T
 RRR           TTTTTtTTTTT
RxxxxX@Xx     TTtttttttttTT
RxxxXX.XxRT  TTtttwtttwwttT
RxxXX3XXxR  TTtttwwwwwwwwtTT
RxxX`XXxxRTTTttttwwwwwwwwttT T
RxxX``Xxxxxxxtttww!wwwwwwwtT
RxxXX`XXxXXXttk.wwwwwwwwwwtTT
RxxxX``XXX.Xk?d.wwwwwFwwwttTT
RxxxXX``.......wwwwwwwwwwttT
RxxxxX.`wwwwWWwwwwwwwww!wttTT
RxxxXX.w!ww....kwwwwwwwwwttT
RxxxX..ww..XXk?d.wwwwwwwwwtT T
RxxxX..W.XXXXt..SwwwwwwwwwtTT
RxxXX.ww..XXXtsttww!wwwwwwttT
RxxX..www.XXXtssttwwwwwwwtttT
RxxX.ww1ww.XXttstwwwwFwwwttTT
RxxX..wwww.XXtt..wwwwwwwwttT
RxxXX...w..XXt.}G.wwwwww!wtT T
RxxxXXX...XXXt.d4.wwwwwwwwtT
RxxxxxXX'XXxxtt.tttwwwwwwttTT
Rxxxxxxx"xxxxtttttttttwtttTT
 RRRRRR     TTTTTTTTTtttTTT
          T   TT    TTTTT   T
                 T     T
ENDMAP

################################################################
#
# <<8>> Minivaults with monsters guarding a thematic item.
#
# A series begun by minmay. More entries welcome!
# minmay: "Depths begin intentionally shallow; players should not
#          be able to beat these right away, but should be able
#          to flee. I'd like to see what other people can come up
#          with for more of these vaults!
#
# We use a standard weight of 3 for the vaults that place unrandarts, since
# these items tend to be particularly strong and are more interesting when they
# don't generate too frequently. Out-of-depth threats are encouraged, but when
# placing in earlier Dungeon, use threats that can be reasonably escaped if
# there's no runed door or transporter.
################################################################

# Ring of the Tortoise
#
NAME:   minmay_guarded_unrand_tortoise
DEPTH:  D:$, Depths
# Can place in Vaults as a hard room.
TAGS:   no_monster_gen no_item_gen transparent vaults_hard
WEIGHT: 3
: if you.in_branch("Vaults") then
SUBST:  v = x
:   vaults_hard_standard(_G)
: end
MONS:   patrolling iron troll
KMONS:  d = patrolling iron dragon
KITEM:  d = ring_of_the_tortoise no_pickup
MAP
...............
.vvvvv.@.vvvvv.
.v1.........1v.
.v.vvvvvvvvv.v.
.v.v1.....1v.v.
.v.v.vv.vv.v.v.
.v...v...v...v.
.v...v.d.v...v.
.v...v...v...v.
.v.v.vv.vv.v.v.
.v.v1.....1v.v.
.v.vvvvvvvvv.v.
.v1.........1v.
.vvvvv.@.vvvvv.
...............
ENDMAP

# Zonguldrok
#
NAME:   minmay_guarded_unrand_zonguldrok
DEPTH:  D:12-, Depths, Crypt
TAGS:   no_monster_gen no_item_gen transparent
WEIGHT: 3
: if you.in_branch("Depths") then
MONS:   place:Depths:$ spectre / place:Depths:$ draugr, bone dragon
: elseif you.in_branch("Crypt") then
MONS:   spectral storm dragon / spectral ettin / golden dragon draugr / \
        juggernaut draugr w:5 / ancient champion w:5
MONS:   bone dragon
: else
MONS:   place:D:$ spectre / place:D:$ draugr, ghoul
: end
ITEM:   skull_of_zonguldrok no_pickup
MAP
...............
.cc+cccccccccc.
.c...c1..c1.1c.
.c...c...+...c.
.c1.1c1..c...c.
.cc+ccc+ccc+cc.
.c...c1.1c1.1c.
.c...c.2.c...c.
.c1.1c1d1c...c.
.cc+ccccccc+cc.
.c...c..1c..1c.
.c...+...+...c.
.c1.1c..1c..1c.
.ccccccccccccc.
...............
ENDMAP

# Scythe of Curses
#
NAME:   minmay_guarded_unrand_curses
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:12-, Depths, Crypt
WEIGHT: 3
MONS:   reaper, reaper; scythe_of_curses, mummy, guardian mummy
KPROP:  12' = no_tele_into
KMASK:  12' = opaque
MAP
..............
.cccccc+cccccc.
.c3.........3c.
.c.+ccccccc+.c.
.c.c...4...c.c.
.c.c.mmmmm.c.c.
.c.c.m1'1m.c.c.
.+.c4m'2'm4c.+.
.c.c.m1'1m.c.c.
.c.c.mmmmm.c.c.
.c.c...4...c.c.
.c.+ccccccc+.c.
.c3.........3c.
.cccccc+cccccc.
...............
ENDMAP

# There's a sword stuck inside a stone. Some knights are milling around
# wondering how to get it out. If you can dig through rock and tame the
# sword's enchantment, you could become the monarch! Or not..... (by Shiori)
#
# This is not about guarding an unrandart, but very close in spirit. (dpeg)
# If the vault comes up in Orc or Elf, there will be natives around.
#
# The dancing weapon is very out of depth early in D, but digging it out
# is mostly a deliberate action and there are enough system warnings. (Index)
NAME:    sword_in_stone
TAGS:    no_monster_gen patrolling vaults_hard transparent no_descent
DEPTH:   D:6-, Depths, !Depths:$, Vaults, Orc, Elf
WEIGHT:  3
: local ss = "rapier | long sword . leather armour . buckler | nothing"
: local gs = "great sword . chain mail | plate armour"
: local ls = "falchion | scimitar . chain mail . kite shield"
: local rs = "long sword . robe | leather armour . kite shield"
KMONS:   A = gnoll sergeant ; trident . scale mail | chain mail . kite shield
: kmons("B = wight ; " .. ls .. " | nothing")
: kmons("C = Eustachio / orc warrior ; " .. ss .. ", " ..
:            "orc warrior ; " .. ss .. " / nothing")
: kmons("D = Blorkula the orcula / orc warrior ; " .. gs .. ", " ..
:           "orc warrior ; " .. gs .. " / nothing")
: kmons("E = Maurice / kobold brigand ; dart ego:poisoned . " .. ss .. ", " ..
:           "kobold brigand ; dart ego:poisoned . " .. ss .. " / nothing")
: kmons("F = Joseph / orc knight ; " .. ls .. ", " ..
:           "orc knight ; " .. ls .. " / nothing")
: kmons("G = Erica / arcanist ; " .. rs .. ", arcanist ; " .. rs .. " / nothing")
: kmons("H = Maggie / occultist ; " .. rs .. ", " ..
:           "occultist ; " .. rs .. " / nothing")
: kmons("I = Urug / orc knight ; " .. gs .. ", orc knight ; " .. gs .. " / nothing")
KMONS:   J = Harold / deep elf knight, deep elf knight / nothing
KMONS:   K = Donald / orc warlord, orc warlord / nothing
KMONS:   L = Louise / hell knight, hell knight / nothing
KMONS:   M = Frances / hell knight, hell knight / nothing
KMONS:   N = Agnes / spriggan defender, spriggan defender / nothing
KMONS:   O = Rupert / vampire knight, vampire knight / nothing
KMONS:   P = Asterion / ancient champion, ancient champion / nothing
KMONS:   Q = Frederick / draconian knight, draconian knight / nothing
KMONS:   R = Sojobo / tengu reaver, tengu reaver / nothing
: if crawl.one_chance_in(50) then
KMONS:   S = dancing weapon ; singing sword
KITEM:   s = singing sword
: else
KMONS:   S = dancing weapon ; scimitar good_item | great sword good_item | \
                              demon blade good_item | double sword good_item | \
                              double sword good_item
KITEM:   s = scimitar good_item / great sword good_item / \
             demon blade good_item / double sword good_item / \
             triple sword good_item
: end
KMONS:   o = orc warrior / orc knight w:5
KMONS:   e = deep elf knight
NSUBST:  k = 4:k / 2 = k. / *:.
SHUFFLE: bm
SUBST:   b = cccvvb
: if you.in_branch("Orc") then
NSUBST:  k = 1:A / 1:I / *:o
: elseif you.in_branch("Elf") then
NSUBST:  k = 2 = KLMN / *:e
: elseif you.absdepth() < 12 then
SUBST:   k = ABCD, S = s
: elseif you.absdepth() < 14 then
SUBST:   k = EFGH
: elseif you.absdepth() < 16 then
SUBST:   k = GHIJ
: elseif you.absdepth() < 20 then
SUBST:   k = KLMNO
: else
SUBST:   k = OPQR
: end
KMASK:   Ss = opaque
KPROP:   s = no_tele_into
FTILE:   ABCDEFGHJIKLMNOPQRS. = floor_limestone
FTILE:   m = floor_pebble_darkgray
MAP
kkkkkkk
kkkkkkk
kkmbmkk
kkbSbkk
kkmbmkk
kkkkkkk
kkkkkkk
ENDMAP

# obsidian axe
# A mini-temple of Makhleb; demons ahoy!
NAME:   grunt_guarded_unrand_obsidian_axe
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:$, Depths
WEIGHT: 3
MONS:   obsidian statue
MONS:   patrolling hell knight
MONS:   sun demon / soul eater / smoke demon / neqoxec / ynoxinul / chaos spawn
MONS:   ice devil / rust devil / orange demon / red devil / hellwing / \
        sixfirhy
SUBST:  b : bbc
KPROP:  ._-cGO12345 = bloody / nothing w:20
KFEAT:  _ = altar_makhleb
KFEAT:  - = altar_makhleb
KITEM:  - = obsidian_axe no_pickup
: single_cloud(_G, "O", "flame", false)
TILE:   b = bedevilled_crystal_gehenna / bedevilled_crystal_dis
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
      ccccc
      cO1Oc
      c2-2c
     cc323cc
    cc4.3.4cc
   cc.G4.4G.cc
  ccc4.....4ccc
.ccOc.G4.4G.cOcc.
.c4.c.......c.4c.
@+.2+.G.3.G.+2.+@
.c4.c..._...c.4c.
.ccOcb.O1O.bcOcc.
..ccccccccccccc..
 ...............
ENDMAP

# sword of the Dread Knight
# A temple to Yredelemnul, with a champion wielding the blade designate.
NAME:   grunt_guarded_unrand_dread_knight
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  Depths, Crypt
WEIGHT: 3
MONS:   death knight ; sword_of_the_dread_knight . chain mail w:7 | \
                       plate armour w:1
MONS:   profane servitor, bone dragon, ghoul, death cob, skeletal warrior
MONS:   freezing wraith / phantasmal warrior / \
        jiangshi / flayed ghost / skeletal warrior
KFEAT:  _ = altar_yredelemnul
KFEAT:  - = open_door
MAP
    ccccc
    c2_3c
    c.1.c
    c465c
ccccc+++ccccc
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
ccccc+++ccccc
     .@.
ENDMAP

# autumn katana
# An autumnal forest, with warriors paying respect to the last wielder
NAME:    wheals_guarded_unrand_autumn_katana
TAGS:    no_monster_gen no_item_gen patrolling
DEPTH:   Depths
WEIGHT:  3
MONS:    minotaur, fire giant, frost giant, spriggan defender, \
         deep elf blademaster
SHUFFLE: 12345
ITEM:    autumn_katana no_pickup
SUBST:   u = t.
TILE:    t = DNGN_TREE_YELLOW / DNGN_TREE_LIGHTRED w:5 / DNGN_TREE_RED / \
             DNGN_TREE_DEAD w:5
COLOUR:  t = lightred w:5 / red / yellow / brown w:5
MAP
ttttttttttttttttttttt
ttttttttttttttttttttt
ttuuuuuuuuuuuuuuutttt
@.................ttt
ttuuuuuuuuuuuuuu..ttt
tttttttttttttttuu..tt
tttttttttttttttu1.ttt
ttttttttttttttu..tttt
ttttttttttttuu..ttttt
tttttT.4.........tttt
tttttGd....3..2..tttt
tttttT.5.........tttt
ttttttttttttttttttttt
ttttttttttttttttttttt
ENDMAP

NAME:    minmay_guarded_unrand_brilliance
TAGS:    transparent
DEPTH:   D:13-, Depths
MONS:    profane servitor
ITEM:    brilliance no_pickup
KFEAT:   _ = altar_yredelemnul
SUBST:   1 = 1'
KMASK:   '*d1_ = no_monster_gen
KPROP:   '*d1_ = no_tele_into
MAP
         ...
         .c.
         .n.
  ...    .c.    ...
  .c... ..n.. ...c.
  ..cn...ncn...nc..
   .ncnc.cdc.cncn.
   ..n*ncn'ncn*n..
    .cn'nc'cn'nc.
   ...cn1n1n1nc...
....ncncn'''ncncn....
.ncnc*''1'_'1''*cncn.
....ncncn'''ncncn....
   ...cn1n1n1nc...
    .cn'nc'cn'nc.
   ..n*ncn'ncn*n..
  ..ncnc.c'c.cncn..
  .ncn...n=n...ncn.
 ..cn.. ..... ..nc..
 .c...   .c.   ...c.
 ...     .n.     ...
         .c.
         ...
ENDMAP

NAME:    minmay_guarded_unrand_prune
TAGS:    transparent no_monster_gen
DEPTH:   D:12-
WEIGHT:  3
MONS:    deep elf pyromancer / deep elf zephyrmancer / ogre mage / occultist / \
         arcanist / kobold demonologist w:2 / kobold fleshcrafter w:2 / \
         naga mage w:2
ITEM:    glaive_of_prune no_pickup
SUBST:   " : .:50 ccvbn, ' : .:50 ccvbn, ? : .:50 ccvbn, ! : .:60 ccvbnT
NSUBST:  1 = 6:1 / 10=1.... / .
KMASK:   l = no_monster_gen
TILE:    b = dngn_crystal_magenta
MAP
     ...........
   ...lvlv1vlvl...
  ..vlvvvv1vvvvlv..
 ..lvvvlvl1lvlvvvl..
 .vvvlv1111111vlvvv.
..lvl111"'?'"111lvl..
.lvvv1"'?1"1?'"1vvvl.
.vvl11'111!111'11lvv.
.lvv1"?1!111!1111vvl.
.vvl1'111lvlvlvlvlvv.
.1111?"!1vvvvvvvvvvl.
.vvl1'111lvG.G.G.Gvv.
.lvv1"?1!vv.U...U.vl.
.vvl11'11lvG.b.b.Gvv.
.lvvv1"'1.+...d.Gvvl.
..lvl1111lvG.b.b.vl..
 .vvvlv11vv.U.G.vvv.
 ..lvvvlvlvG.Gvvvl..
  ..vlvvvvvvvvvlv..
   ...lvlvlvlvl...
     ...........
ENDMAP

NAME:    minmay_guarded_unrand_variability
TAGS:    transparent
DEPTH:   D:8-
WEIGHT:  3
ITEM:    mace_of_variability no_pickup
MONS:    chaos spawn
KFEAT:   _ = altar_xom
# walls are carefully placed and guarantee no islands
SUBST:   x = xcvbmGwWlTUVYt+ <:4 >:4 A:2 1:160
NSUBST:  1 = 2=1 / 2=% / 3=1%...... / .
MAP
...........
.1xxx11xxx.
.x1xxxx1xx.
.xxxxx1xxx.
.xxxx_xxxx.
.x1xx1xxx1.
.1xxxdxx1x.
.1xx1xxxxx.
.x11xxxxxx.
.xxxxxx1xx.
...........
ENDMAP

NAME:    minmay_guarded_unrand_staff_of_olgreb
TAGS:    no_monster_gen no_trap_gen transparent
DEPTH:   D:5-
WEIGHT:  3
ITEM:    staff_of_olgreb no_pickup
: if you.depth() < 9 then
MONS:    scorpion / redback w:5
MONS:    killer bee
MONS:    adder / water moccasin
: elseif you.depth() < 13 then
MONS:    redback / wolf spider w:5
MONS:    killer bee / hornet w:5
MONS:    water moccasin / black mamba
: else
MONS:    wolf spider / emperor scorpion w:5
MONS:    hornet / ghost moth w:5
MONS:    black mamba / sea snake
: end
# TODO: built in fallback for staff of olgreb is kind of dumb
NSUBST:  1 = 5=1 / 6=1.. / ., 2 = 5=2 / 9=2.. / ., 3 = 5=3 / 6=1.. / .
MAP
      ...
      .b.
      .b.
     ..b..
     .bbb.
     .ndn.
    ..b+b..
    .bb2bb.
   ..n222n..
  ..bb222bb..
 ..bb22222bb..
..bb2222222bb..
.bb=bb222bb=bb.
.n111bbnbb333n.
.b1111n*n3333b.
.b1111b*b3333b.
.n1111===3333n.
.bb111b.b333bb.
..bbb1b.b3bbb..
 ...bnb.bnb...
   .........
ENDMAP

NAME:    minmay_guarded_unrand_vampires_tooth
TAGS:    transparent
DEPTH:   D:10-, Crypt, Depths
WEIGHT:  3
: if you.in_branch("D") then
:   if you.depth() < 13 then
MONS:    vampire mosquito / tyrant leech w:5, vampire
:   else
MONS:    vampire mosquito / tyrant leech / vampire, vampire knight
:   end
: else
MONS:    vampire knight, vampire mage
:   if you.in_branch("Crypt") then
KMONS:   d = vampire bloodprince
:   end
: end
KITEM:   d = vampires_tooth no_pickup
MAP
.........
.ccc.ccc.
.1c...c1.
.cc...cc.
.1c2Y2c1.
.cc.d.cc.
.1c...c1.
.ccccccc.
.........
ENDMAP

NAME:    minmay_guarded_unrand_wrath_of_trog
TAGS:    transparent
DEPTH:   Elf, Depths
WEIGHT:  3
MONS:    spriggan berserker
ITEM:    wrath_of_trog no_pickup pre_id
NSUBST:  1 = 3=1 / 9=1...... / .
MAP
    .......
   .."""""..
  .."ttttt"..
 .."tt"""tt"..
.."tt"111"tt"..
."tt"11c11"tt".
."t"1c111c1"t".
."t"111d111"t".
."t"1c111c1"t".
."tt"11c11"tt".
.."tt"111"tt"..
 .."".. ..""..
  ....   ....
ENDMAP

NAME:    minmay_guarded_unrand_skullcrusher
TAGS:    transparent
DEPTH:   D:12-, Crypt
WEIGHT:  3
MONS:    laughing skull
: if you.in_branch("Crypt") then
MONS:    curse skull
NSUBST:  d = 1:d / *:*
NSUBST:  ' = 6:1 / 4 = 1.... / *:.
SUBST:   " = 1.., ! = 2.
: else
MONS:    skeletal warrior
NSUBST:  d = 1:d / *:%, ' = 4:1 / 6 = 1.... / *:.
NSUBST:  " = 2:1 / 2 = 1.. / *:., ! = 2:2 / *:.
: end
ITEM:    skullcrusher no_pickup pre_id
MAP
     .........
   ...ccccc.....
  ..ccc''cc..c...
 ..cc'''c'ccc..c..
 .cc'''''c'c.cc.c.
..c''''c''''ccccc..
.cc'''''''c''c'c.cc.
.c''''''''c''''''c.
.c'''''''''c'''''c.
.c'ccc'''''''ccc'c.
.c'ccncc'''ccncc'c.
.c'nnnnn'''nnnnn'c.
.c'ccncc'''ccncc'c.
.c''cnc'''''cnc''c.
.c'''''''c'''''''c.
.cc'''''ccc'''''cc.
..ccc''''c''''ccc..
 ...cc'''''''cc...
   ..c!c!c!c!c..
    .cdcdcdcdc.
    .cncncncnc.
    .c"c"c"c"c.
    .c"c"c"c"c.
    ...........
ENDMAP

NAME:    minmay_guarded_unrand_finisher
TAGS:    transparent
DEPTH:   D:7-
WEIGHT:  3
: if you.depth() < 13 then
MONS:    wraith, skeletal warrior
: else
MONS:    skeletal warrior, reaper
: end
ITEM:    finisher no_pickup pre_id
NSUBST:  2 = 2 / 1, 1 = 1.
NSUBST:  D = . / c, E = . / c
SUBST:   c = c .:2
MAP
.............
.DxxDxDxDxxD.
.x..xc1cx..x.
.x.c..x..c.x.
.Dx.ExExE.xD.
.xc.x2c2x.cx.
.D1xEcdcEx1D.
.xc.x2c2x.cx.
.Dx.ExExE.xD.
.x.c..x..c.x.
.x..xc1cx..x.
.DxxDxDxDxxD.
.............
ENDMAP

NAME:    minmay_guarded_unrand_resistance
TAGS:    no_monster_gen no_trap_gen transparent
DEPTH:   D:9-
WEIGHT:  3
MONS:    fire dragon, ice dragon
ITEM:    shield_of_resistance no_pickup
KMASK:   lw = opaque
MAP
...........
.vnnv=vnnv.
.n...1nlln.
.n.T..nlln.
.v....vnnv.
.n2..d..1n.
.vnnv....v.
.nwwn..V.n.
.nwwn2...n.
.vnnv=vnnv.
...........
ENDMAP

NAME:    chequers_guarded_unrand_ignorance
TAGS:    no_monster_gen no_trap_gen transparent
DEPTH:   D:7-, Orc
WEIGHT:  3
MONS:    orange crystal statue
ITEM:    tower shield_of_ignorance no_pickup
KPROP:   .d1 = no_tele_into
SUBST:   - = .
MAP
-----------
-cccc=cccc-
-c1.....1c-
-c.c...c.c-
-c.......c-
-n...d...n-
-c.......c-
-c.c...c.c-
-c1.....1c-
-cncc=cccc-
-----------
ENDMAP

NAME:    chequers_guarded_unrand_mask_of_the_dragon
TAGS:    no_monster_gen no_trap_gen
DEPTH:   Zot, !Zot:$
WEIGHT:  3
ITEM:    mask_of_the_dragon no_pickup
MONS:    storm dragon, shadow dragon, golden dragon, ghost moth, moth of wrath
# Shuffle one transporter destination location
NSUBST:  r = R / -
# Randomly swap which transporter is the entrance and the loot locations.
SHUFFLE: PQd|*$ / SRDEFH
# Replace non-loot locations with floor.
SUBST:   DEFH = -
# Place monsters randomly.
# 3 of each dragon (and up to 4 random extras), 3 ghost moth, 3 moth of wrath
NSUBST:  - = 3=1 / 3=2 / 3=3 / 4=123--- / 3=4 / 3=5 / -
KMASK: . = !opaque
# Place transporters
MARKER:  P = lua:transp_loc("mask_of_the_dragon_entry")
MARKER:  Q = lua:transp_dest_loc("mask_of_the_dragon_entry")
MARKER:  R = lua:transp_loc("mask_of_the_dragon_exit")
MARKER:  S = lua:transp_dest_loc("mask_of_the_dragon_exit")
MAP
         .........
 .........ccccccc.
 .ccccccccc-----c..
 .ccr--------c--cc..
 .cc--------ccc--cc..
  .ccc*$---cccF---cc.
   ..c|$---ccEHH---c.
   S.nd$---rcDH--Q-nP@
   ..c|$---ccEHH---c.
  .ccc*$---cccF---cc.
 .cc--------ccc--cc..
 .ccr--------c--cc..
 .ccccccccc-----c..
 .........ccccccc.
         .........
ENDMAP

####
# Maxwell's Thermic Engine
#
# Use demon blade as fallback here instead of double sword, to keep
# consistency with the Maxwell's demon reference.
#
NAME:   brannock_guarded_unrand_thermic_engine
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  Depths
WEIGHT: 3
ITEM:   maxwell's_thermic_engine no_pickup
MONS:   ice devil, blizzard demon, ice fiend
MONS:   sun demon, balrug, brimstone fiend
# 6-2-1, 9 total demons for each side
NSUBST: 1 = 6=1 / ., 2 = 2=2 / ., 3 = 3 / .
NSUBST: 4 = 6=4 / ., 5 = 2=5 / ., 6 = 6 / .
MAP
       @@@
 bbbbbb...bbbbbb
bb....bb+bb....bb
b32111.=.=.44456b
b32111.=.=.44456b
b32111.=.=.44456b
b32111.bnb.44456b
b32111.+d+.44456b
bb....bbbbb....bb
 bbbbbb   bbbbbb
ENDMAP

NAME:   wander_guarded_unrand_ratskin
TAGS:   no_monster_gen no_item_gen
DEPTH:  D:5-8
WEIGHT: 3
ITEM:   ratskin_cloak no_pickup
MONS:   river rat, hell rat
SUBST:  - = 1 .:50, ' = 112...
MAP
     xxxxxxxxx
  xxxx-x---x-xxx
xxx---x-xxx-x--xx
xx-xxxxxxxxxxxx-xx
x-xxxxxx''''''xx-xxx
xx--xx''''x'''dxx--xx
 xxx-xx''x'''''xxxx-x
 xx-xx'''''''xxxxx-xx
 x-xx-x-x-xxxxxxx-x-x
 xx-xx---x---xx--xxxx
 xx--xxx-------xxx
  x--xxxxxxxxxxx
  xxx@xx
ENDMAP

NAME:    hellmonk_guarded_unrand_starlight
TAGS:    transparent patrolling
DEPTH:   D:13-, Depths
WEIGHT:  3
ITEM:    cloak of starlight no_pickup
: if you.in_branch("D") then
MONS:    wretched star, cherub
SUBST:   D = 12 .:60
# Depths
: else
MONS:    wretched star, daeva / angel
SUBST:   D = 12..
: end
SHUFFLE: 12
MAP
                @
               v+v
               v.v
               v.v
               v.v
              vv.vv
              v...v
              v...v
             vv...vv
             v..1..v
            vv.....vv
           vv.......vv
          vv....v....vv
        vvv.v...v...v.vvv
     vvvv....v.vDv.v....vvvv
 vvvvv........vDvDv........vvvvv
@+.......2..vvDvdvDvv..2.......+@
 vvvvv........vDvDv........vvvvv
     vvvv....v.vDv.v....vvvv
        vvv.v...v...v.vvv
          vv....v....vv
           vv.......vv
            vv.....vv
             v..1..v
             vv...vv
              v...v
              v...v
              vv.vv
               v.v
               v.v
               v.v
               v+v
                @
ENDMAP

NAME:   hellmonk_guarded_unrand_salamander
TAGS:   no_monster_gen
DEPTH:  D:10-, Snake, !Snake:$, Depths
WEIGHT: 3
ITEM:   salamander_hide_armour no_pickup
: if you.in_branch("Snake") then
MONS:   salamander, salamander mystic, salamander tyrant
SUBST:  v = x
: elseif you.in_branch("Depths") then
MONS:   fire dragon, salamander tyrant, salamander tyrant
# D:10-12
: elseif you.depth() < 13 then
MONS:   salamander, salamander mystic
SUBST:  2 = 1, 3 = 2, 1 = 1.
# D:13-
: else
MONS:   salamander, salamander mystic, salamander tyrant
SUBST:  2 = 22.
: end
SUBST:  v : cv
MAP
vvvvvvvvvvvvvvvvv
vGllllllllGvGllGv
vl1..1....lvl..dv
vl...Gv..1lvl.3.v
vl...lv...lvl...v
vl...lv...GlG...v
vl...lv.1......2v
vG...Gv....2....v
vv+++vvvvvvvvvvvv
  @@
ENDMAP

NAME:   hellmonk_guarded_unrand_damnation
TAGS:   no_monster_gen
DEPTH:  D:13-, Elf
WEIGHT: 3
ITEM:   damnation no_pickup
: if you.in_branch("Elf") then
MONS:   deep elf sorcerer / deep elf high priest, hellion
KFEAT:  a = iron_grate
NSUBST: D = 2=2 / 1.
: else  -- D:13-
MONS:   efreet, hellion
NSUBST: D = 2 / 1..
SUBST:  a = c
: end
SUBST:  b = bc, c : cv
TILE:   b = bedevilled_crystal_gehenna
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
           ccc    ccccccc
 ccc       cDcccccccc..Dcc
 c.cc      c.......D.....cc
 c..cccccccc..ccac..cac...cc
 c.c..c..c......c....c.....cc
@+..c......DccccacdccaccbD.Dcc
 c.c..c..c......c....c.....cc
 c..cccccccc..ccac..cac...cc
 c.cc      c.......D.....cc
 ccc       cDcccccccc..Dcc
           ccc    ccccccc
ENDMAP

NAME:   hellmonk_guarded_unrand_cigotuvi
TAGS:   no_monster_gen
DEPTH:  D:9-
WEIGHT: 3
ITEM:   cigotuvi's_embrace no_pickup
: if you.depth() < 13 then
MONS:   zombie place:D:15, hellwing
SUBST:  1 = 1.
: else
MONS:   zombie place:Depths:1 / draugr place:D:$, soul eater
: end
KPROP:  D = no_tele_into
: dgn.delayed_decay(_G, 'D', 'human corpse')
MAP
     @
ccccc+ccccc
ccc.....ccc
cc.......cc
c1.......1c
c..nnnnn..c
c.1nDDDn1.c
c..nDDDn..c
c1.nDDDn.1c
c..nnnnn..c
c1.1.2.1.1c
cc.......cc
ccc2.d.2ccc
ccccccccccc
ENDMAP

NAME:   hellmonk_guarded_unrand_sphere_of_battle
TAGS:   transparent
DEPTH:  D:9-
WEIGHT: 3
ITEM:   sphere_of_battle no_pickup
MONS:   tengu conjurer, tengu reaver
: if you.depth() < 13 then
SUBST:  D = 1.
: else
NSUBST: D = 1 / 2
: end
NSUBST: a = + / b
MAP
    ........
  ...aaaaaa...
 ..aaa....aaa..
 .aa........aa.
..a...bbbb...a..
.aa..bbdDbb..aa.
.a...b....b...a.
.a.....bb.....a.
.a.....bb.....a.
.a...b....b...a.
.aa..bbD1bb..aa.
..a...bbbb...a..
 .aa........aa.
 ..aaa....aaa..
  ...aaaaaa...
    ........
ENDMAP

# this vault gives the item to a monster instead of placing it normally
NAME:   hellmonk_guarded_unrand_dark_maul
TAGS:   transparent no_monster_gen
DEPTH:  D:8-, Orc, Depths
WEIGHT: 3
: if you.in_branch("Depths") then
MONS:   ettin ; dark maul . great mace randart
MONS:   stone giant w:30 / ettin w:20 / juggernaut / titan / iron giant w:5
SUBST:  D = 222.
: elseif you.in_branch("Orc") then
MONS:   two-headed ogre ; dark maul . dire flail ego:heavy
MONS:   two-headed ogre / cyclops / orc knight / orc warlord w:2 \
        / stone giant w:2 / ettin w:2
SUBST:  D = 2..
# D:8-12
: elseif you.depth() < 13 then
MONS:   two-headed ogre ; dark maul \
            . dire flail | giant club | giant spiked club
MONS:   orc warrior / two-headed ogre / cyclops / orc knight w:2
SUBST:  D = 2...
# D:13-15
: else
MONS:   ettin ; dark maul . great mace ego:heavy good_item
MONS:   two-headed ogre / cyclops / orc knight / orc warlord w:5 \
        / stone giant w:5 / ettin w:5
SUBST:  D = 2.
: end
MAP
                    @@
vvvvvvvvvvvvvvvvvvvv++v
v.2+.....D......D..v..v
v..+..v.........v..v..v
v..v..v....D....v..v..v
v..v..v...v.v...v..v..v
v..v..v..D.1.D..v..v..v
v..v..v...v.v...v..v..v
v..v..v....D....v..v..v
v..v..v.........v..+..v
v..v..D......D.....+2.v
v++vvvvvvvvvvvvvvvvvvvv
 @@
ENDMAP

NAME:   hellmonk_guarded_unrand_gong
TAGS:   transparent no_monster_gen patrolling vaults_hard vaults_orient_n
DEPTH:  D:7-, Vaults
WEIGHT: 3
ITEM:   shield_of_the_gong no_pickup
MONS:   vault sentinel
: if you.in_branch("Dungeon") then
:     if you.depth() < 13 then
SUBST:  9 = .
:     else
NSUBST: 9 = 9 / .
:     end
# Vaults
: else
# Only one entrance in Vaults, and any door is handled by the layout.
SUBST:  va = x, @+ = .
CLEAR:  p'
FTILE:  ^-.19d = floor_metal_gold
: end
KFEAT:  ^ = alarm trap
SUBST:  - = ^...., ' = ^, a = +, p = @
MAP
      ^@^
     vv+vv
   vvv^.^vvv
  vv^-----^vv
  v^-------^v
 vv---vvv---vv
 v..-v.9.v-..v
 v1.v..d..v.1v
 v..-v.9.v-..v
 vv---vvv---vv
  v^-------^v
  vv^-----^vv
   vvv^.^vvv
     vvavv
      'p'
ENDMAP

NAME:   hellmonk_guarded_unrand_night
TAGS:   no_monster_gen patrolling
DEPTH:  D:7-
WEIGHT: 3
ITEM:   robe_of_night no_pickup
: if you.depth() < 13 then
MONS:   dream sheep, shadowghast
SUBST:  1 = 1.
: else
MONS:   dream sheep w:20 / satyr, shadow wraith
SUBST:  1 = 111.
: end
SUBST:  c : ccv
FTILE:  .12d+ = floor_limestone
COLOUR: .12d+ = yellow
MAP
    cccccc
  ccc1...ccc
 cc1.....2dcc
 c.....ccccc
cc..1ccc
c1..cc
c...c
c.2.c
c...c
c1..cc
cc..1ccc
 c.....ccccc
 cc1.......+@
  ccc1...ccc
    cccccc
ENDMAP

NAME:   hellmonk_guarded_unrand_gyre_and_gimble
TAGS:   no_monster_gen
DEPTH:  D:7-, Elf
WEIGHT: 3
ITEM:   gyre no_pickup
: if you.in_branch("Elf") then
MONS:   deep elf blademaster, deep elf blademaster
# D:6-12
: elseif you.depth() < 13 then
MONS:   two-headed ogre, spriggan
# D:13-
: else
MONS:   ettin, spriggan berserker ; rapier . animal skin
: end
KFEAT:  D = c
SUBST:  x : Dx, c : cv
COLOUR: xD = white
TILE:   x = wall_ice
TILE:   D = wall_marble
MAP
    xxbcc
   xxcdxcc
  xxc...xccc
   xxx2ccc
     x.c
   ccc.xxx
 ccc1...1xxx
ccG..x.c..Gxx
 ccc.....xxx
   cc...xx
    cc.xx
     x.c
    cx.cx
     x@c
ENDMAP

NAME:   hellmonk_guarded_unrand_vines
TAGS:   transparent ruin_lair
DEPTH:  D:7-, Lair
WEIGHT: 3
ITEM:   robe_of_vines no_pickup
KMONS:  p = plant
MONS:   troll, hydra, oklob plant
MONS:   shambling mangrove / thorn hunter
: if you.in_branch("D") then
:     if you.depth() < 13 then
NSUBST: ' = 2=1' / ', 1 = 2 / 1
:     else
NSUBST: 1 = 4 / 2, ' = 2=2 / '
:     end
# Lair
: else
:     if you.depth() < 4 then
NSUBST: 1 = 3 / 2, ' = 2 / '
:     else
NSUBST: 1 = 3 / 23, ' = 2=2 / '
:     end
: end
NSUBST: d = d / p
SUBST:  ' = p..
MAP
        xxxxxx
  ..'xxxxd'1dxxxx'..
 ''..'x'x'.....x'..''
xx'...''t'WW'''....'xx
xx'....'''WW't'....'xx
 ''..'x.....'x'x'..''
  ..'xxxxd1'dxxxx'..
        xxxxxx
ENDMAP

NAME:   hellmonk_guarded_unrand_frostbite
TAGS:   no_monster_gen
DEPTH:  D:7-
WEIGHT: 3
ITEM:   frostbite no_pickup
NSUBST: d = d / W
: if you.depth() < 13 then
MONS:   white imp, ice devil, freezing wraith
: else
MONS:   ice devil, freezing wraith, blizzard demon
: end
SUBST:  1 = 1., 2 = 2., 3 = 3.
COLOUR: x. = white
TILE:   x = wall_ice
FTILE:  . = floor_ice
MAP
          xxxxxx
       xxxx2332xxxx
 xxxxxxx11......11xxxxxxx
xxW3..................3Wxx
 xxx..1.2...xddx.2.1..xxx
 xW...xx..xddxxW..xx...Wx
xxx1.xxx.1WxxxxW1.xxx.1xxx
 xW...xx..WxxWWx..xx...Wx
 xxx......xWWx........xxx
xxW....................Wxx
 xxxxxxx..........xxxxxxx
       xxxx++++xxxx
ENDMAP

NAME:   hellmonk_guarded_unrand_rift
TAGS:   patrolling uniq_guarded_rift
DEPTH:  D:13-, Depths
WEIGHT: 2
ITEM:   rift no_pickup
MONS:   arcanist, occultist, tentacled starspawn, starcursed mass, wyrmhole
KFEAT:  t = demonic_tree
KFEAT:  _ = altar_lugonu / enter_abyss
: if you.in_branch("D") then
SUBST:  1 = 12..
NSUBST: D = 1:d / 1:3 / *:4
# Depths
: else
SUBST:  1 = 23..
NSUBST: D = 1:d / 1 = 4 5:2 / *:4
: end
SUBST:  c = ccvbx t:5
SUBST:  E = xxxcvlWbtTG_....
# Color weights similar to that used for rock in the Abyss.
COLOUR: x = blue:13 / red:66 / magenta:50 / brown:90 / lightgreen:68 \
            / lightred:110 / lightmagenta:38 / yellow / white
RTILE:  x = wall_abyss
MAP
   c       c       c
   c       c       c
  ccc     ccc     ccc
 ccDcc   ccDcc   ccDcc
ccE.Ecc ccE.Ecc ccE.Ecc
 c...c   c...c   c...c
 c.1.c   c.1.c   c.1.c
 c...c   c...c   c...c
 c...c   c...c   c...c
 c...c   cE.Ec   c...c
 c..EcccccE.EcccccE..c
 c..EEcccEE2EEcccEE..c
 c1....1..._...1....1c
 cc......EE.EE......cc
  ccccccccE1Ecccccccc
        ccE.Ecc
         c...c
         c...c
         c...c
         cE1Ec
         c...c
         c...c
         c...c
         cE.Ec
         c...c
         c...c
         c...c
         c@@@c
ENDMAP

NAME:   hellmonk_guarded_unrand_lears
TAGS:   transparent patrolling
DEPTH:  D:6-
WEIGHT: 3
ITEM:   lear's_hauberk no_pickup, hat plus:-2 pre_id
ITEM:   helmet plus:-2 pre_id, chain mail plus:-2 pre_id
ITEM:   pair of boots plus:-2 pre_id
ITEM:   pair of gloves plus:-2 pre_id
: if you.depth() < 9 then
MONS:   troll
: elseif you.depth() < 13 then
MONS:   tengu warrior
: else
MONS:   minotaur
: end
NSUBST: D = d / e / f / g / h / i
SUBST:  E : xcv, F : xcv, H : xcv, G = G.., T : T...
MAP
   .EEE.
   .EDE.
....E+E....
FFF.....HHH
FDF.G.G.HDH
FF+..T..+HH
....G1G....
HH+..T..+FF
HDH.G.G.FDF
HHH.....FFF
....E+E....
   .EDE.
   .EEE.
ENDMAP

NAME:   hellmonk_guarded_unrand_seven_league_boots
TAGS:   no_monster_gen
DEPTH:  D:10-, Lair, Depths
WEIGHT: 3
KITEM:  d = seven-league_boots no_pickup
KMONS:  d = guardian serpent
: if you.in_branch("Depths") then
MONS:   vampire knight
: elseif you.in_branch("Lair") then
MONS:   boulder beetle
: else
MONS:   phantasmal warrior
: end
SUBST:  D = FFW, H : JF, J : cx
NSUBST: F = 1 / 1. / 9 / 9=0.. / .
FTILE:  .019d = floor_grass_dark
FTILE:  E = floor_ice
COLOUR: E = white
MAP
        xxxxxxxxx
     xxxxWWEEEWWxxxx
   xxxWDDWWWWWWWWWWxxx
  xxWWWDHDWWWWWWWWWWWxx
 xxWWWDFFFDWWWWDDFFDDWxx
 xWWDDHFFHFDWWDFFJFFFHFx
xxWWWDFHFFDWWWDFFJFFFFFxx
xWWWWDFHFDWWJWWWDFJFFFFFx
@WWWDFFHDWWJJWWWDFJFFFFdx
xWWWWDJDWWWWWWWDDDHFFFFFx
xxWWWDJFFDWWWWDDFHDFFDDxx
 xWWDJFFFDWWWWDFFHFDDWWx
 xxWWDJFFDWWDWDFHFFDWWxx
  xxWWDDDWWWWWWDFDDWWxx
   xxxWWDWWWWWWWDWWxxx
     xxxxWEEEEEWxxxx
        xxxxxxxxx
ENDMAP

NAME:   hellmonk_guarded_unrand_zhor
TAGS:   transparent no_monster_gen
DEPTH:  D:7-, Lair
WEIGHT: 3
ITEM:   skin_of_zhor no_pickup, box of beasts w:100 /\
        scroll of summoning pre_id q:3 w:1
MONS:   rime drake, torpor snail, ice dragon
NSUBST: d = d / 1
SUBST:  e = e..
: if you.in_branch("D") then
:     if you.depth() < 13 then
SUBST:  2 = 1, 1 = 1..
:     else
NSUBST: 2 = 3 / 2
:     end
# Lair
: else
:     if you.depth() < 4 then
NSUBST: 2 = 2 / 1
SUBST:  1 = 1..
:     else
NSUBST: 1 = 1.
:     end
: end
MAP
            nnnn
           nndenn
          nn1.nn
         nn.1nn
    nnnnnn..nn
   nnd.nn.1nn
    nn..1.nn
     nn22nn
    nn..nn
   nn1..1nn
  nn..nn..nn
 nn...11...nn
nn+nnnnnnn+nnn
ENDMAP

NAME:   hellmonk_guarded_unrand_vitality_bloodlust
TAGS:   no_monster_gen
DEPTH:  D:7-
WEIGHT: 3
MONS:   deep troll, deep troll shaman
ITEM:   amulet_of_vitality no_pickup / necklace_of_bloodlust no_pickup
: if you.depth() < 13 then
NSUBST: 1 = 1:1 / 2:. / * =  1..
: else
NSUBST: 1 = 1:2 / * = 1.
: end
COLOUR: x. = lightred
TILE:   x = wall_pebble_red
FTILE:  .d1 = floor_pebble_lightred
MAP
    @
   x.x
  xx.xx
 xx...xx
xx.....xx
x.......x
x..1.1..x
x.......x
x1.....1x
x...1...x
xx1...1xx
 xx.d.xx
  xxxxx
ENDMAP

NAME:   dilly_guarded_unrand_elemental_staff
TAGS:   transparent patrolling no_monster_gen no_trap_gen
DEPTH:  D:8-, Elf, Depths
WEIGHT: 3
KPROP:  alpwq'r = no_tele_into
KMASK:  alpwq'r = no_item_gen
KMASK:  alpwq'r = opaque
KFEAT:  a = l
KFEAT:  p = w
: if you.in_branch("D") then
:     if you.depth() < 12 then
# Monsters 1 through 4 must be defined in order of fire, ice, earth, air.
MONS:   fire elemental, rime drake / ice devil, gargoyle, steam dragon
# Slot 5 are elemental themed moderate out of depth monsters, equivalent to no
# worse than a 9 spawn.
MONS:   efreet / white ugly thing / basilisk / boulder beetle / raiju \
         / tengu conjurer
# Slot 6 is an appropriate elementalist boss.
MONS:   deep elf pyromancer ; elemental staff . robe good_item
# Monster counts scale slowly, placing up to 1/3 of each type by Depths.
SUBST:  1 = 1...., 2 = 2...., 3 = 3...., 4 = 4...., 5 = 5...
:     elseif you.depth() < 14 then
MONS:   deep elf pyromancer / efreet
MONS:   rime drake / ice devil / white ugly thing
MONS:   basilisk / boulder beetle / catoblepas
MONS:   raiju / tengu conjurer
MONS:   fire crab / fire dragon / freezing wraith / earth elemental \
        / air elemental
MONS:   deep elf zephyrmancer ; elemental staff . robe good_item
SUBST:  1 = 1...., 2 = 2...., 3 = 3...., 4 = 4...., 5 = 5..
:     else
MONS:   deep elf pyromancer / efreet / fire crab w:5 / fire dragon w:5
MONS:   white ugly thing / freezing wraith / ice dragon w:5
MONS:   catoblepas / boulder beetle / earth elemental
MONS:   raiju / tengu conjurer / air elemental
MONS:   white very ugly thing / stone giant / thermic dynamo / \
        deep elf zephyrmancer
MONS:   tengu reaver ; elemental staff \
            . ring mail good_item | scale mail good_item . buckler good_item
SUBST:  1 = 1..., 2 = 2..., 3 = 3..., 4 = 4..., 5 = 5.
:     end
: elseif you.in_branch("Elf") then
MONS:   fire elemental / deep elf pyromancer / thermic dynamo w:5
MONS:   water elemental / thermic dynamo w:5
MONS:   earth elemental / deep troll earth mage w:5
MONS:   air elemental / deep elf zephyrmancer
MONS:   deep elf elementalist w:40 / fire giant / frost giant / iron dragon \
        / storm dragon
: mons(master_elementalist_setup(_G, false))
SUBST:  1 = 1..., 2 = 2..., 3 = 3..., 4 = 4...
CLEAR:  @>
: else -- Depths
MONS:   fire dragon / fire giant
MONS:   ice dragon / frost giant
MONS:   stone giant / iron troll / deep troll earth mage / iron dragon
MONS:   spriggan air mage / storm dragon
MONS:   hellephant / shard shrike / iron giant / titan
: mons(master_elementalist_setup(_G, false))
SUBST:  1 = 1.., 2 = 2.., 3 = 3.., 4 = 4..
CLEAR:  @>
: end
# Fog machine for each closed elemntal chamber.
MARKER: a = lua:fog_machine { cloud_type = "flame", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
MARKER: p = lua:fog_machine { cloud_type = "freezing vapour", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
MARKER: q = lua:fog_machine { cloud_type = "calcifying dust", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
MARKER: r = lua:fog_machine { cloud_type = "thunder", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
FTILE:  +123456alpwq'r. = floor_crystal_squares
MAP
              b
             nbn
            nblbn
           nblllbn
          bbllallbb
        >bbnblllbnbb@
       @+b11nblbn11b+>
       bb...1nbn1...bb
      bb4.5.1bbb1.5.3bb
     nbn4...bb.bb...3nbn
    nb'bn44b+...+b33nb'bn
   nb'''bnbb.....bbnb'''bn
  bb''r''bb...6...bb''q''bb
   nb'''bnbb.....bbnb'''bn
    nb'bn44b+...+b33nb'bn
     nbn4...bb.bb...3nbn
      bb4.5.2bbb2.5.3bb
       bb...2nbn2...bb
       >+b22nbwbn22b+@
        @bbnbwwwbnbb>
          bbwwpwwbb
           nbwwwbn
            nbwbn
             nbn
              b
ENDMAP

# The orcs have wrecked her old lab...
NAME:   pf_guarded_unrand_delatra
TAGS:   no_monster_gen
DEPTH:  D:2-6
WEIGHT: 3
KFEAT:  - = broken_door
ITEM:   delatra's gloves no_pickup, any potion no_pickup / any scroll no_pickup
MONS:   orc, orc wizard, orc warrior
: if you.depth() < 4 then
SUBST:  1 = 1..
: else
SUBST:  2 = 3
NSUBST: 1 = 2:2 / 1
: end
COLOUR: x. = blue
TILE:   x = wall_pebble_lightblue
FTILE:  .de123- = floor_pebble_blue
MAP
        @
       x-x
      xx.xx
      x...x
      xG.Gx
      x1.1x
xxxxxxxx-xxxx
x.e.x.......x
x...-.1...1.xxxxx
x1.1x.......x1.1x
xxxxx.1.2.1.-...x
    x...d...x.e.x
    xxxxxxxxxxxxx
ENDMAP

NAME:   pf_guarded_unrand_woodcutter
TAGS:   no_monster_gen
DEPTH:  D:2-8
WEIGHT: 3
ITEM:   woodcutter's axe no_pickup, hand axe
MONS:   gnoll, gnoll bouda, gnoll sergeant
: if you.depth() < 4 then
SUBST:  2 = 1
SUBST:  1 = 1..
: elseif you.depth() < 6 then
NSUBST: 2 = 2 / 1
: else
SUBST:  1 = 1 / 3
: end
MAP
     xxxxxxxxx
    xxtttttttxx
   xxttte.1.ttx
 xxxttt..ccnccx
xxttt1..1c..2cxx
xtte..t1.n1..ccx
@........+.3d.cx
xtt...1t.n1..ccx
xxttt1e.1c..2cxx
 xxxttt..ccnccx
   xxttt.1.ettx
    xxtttttttxx
     xxxxxxxxx
ENDMAP

# Beogh's priests aren't fond of competition.
NAME:   pf_guarded_unrand_meek
TAGS:   no_monster_gen
DEPTH:  D:3-9
WEIGHT: 3
ITEM:   staff of the Meek no_pickup
: dgn.delayed_decay(_G, '_', 'human corpse')
MONS:  orc, orc priest, orc warrior
: if you.depth() < 5 then
SUBST:  2 = .
SUBST:  1 = 1.
SUBST:  3 = 2
: elseif you.depth() >= 8 then
SUBST:  1 = 123
: end
KFEAT: G = orcish_idol
KFEAT: _ = altar_beogh
MAP
  ccc ccc
cccGcccGcc
c1...c.1.c
c.1cc..2Gcc
@...c1.3d_c
c.1cc..2Gcc
c1...c.1.c
cccGcccGcc
  ccc ccc
ENDMAP

NAME:   dilly_guarded_unrand_throatcut
TAGS:   no_monster_gen
DEPTH:  D:3-9
WEIGHT: 3
MONS:   kobold, kobold brigand, kobold demonologist
ITEM:   throatcutter no_pickup
KITEM:  "- = orc skeleton / goblin skeleton / hobgoblin skeleton /\
             gnoll skeleton
KFEAT:  a = x
KFEAT:  p = c
: if you.depth() < 5 then
SUBST:  1 = 1---, 23 = 1112
: elseif you.depth() < 7 then
SUBST:  1 = 2---, 3 = 2223
: else
NSUBST: 1 = 2--, 2 = 223
: end
SUBST:  " = "..., - = -., x = axx, c = pcc
KPROP:  ap = bloody
TILE:   cp = DNGN_STONE_DARK
MAP
   ccccc
  cc...cc
 cc..d..cc
 c.......c
 c1123211c
 c-11211-c
 cc-111-cc
  cc---cc
   cc+cc
    x"x
    x"x
   xx"xx
xxxx"""xxxx
+"""""""""+
xxxx"""xxxx
   xx"xx
    x"x
    x"x
    x+x
ENDMAP

# Natasha misses her master
NAME:   dilly_guarded_unrand_morg
TAGS:   no_monster_gen
DEPTH:  D:3-9
WEIGHT: 3
KMONS:  p = withered plant
MONS:   kobold draugr / zombie, spectral thing / simulacrum
MONS:   weeping skull, phantom, wraith
ITEM:   dagger randart ego:pain pre_id no_pickup
ITEM:   book of necromancy w:30 / book of decay w:5 / book of death w:5
: if you.depth() < 5 then
KMONS:  D = natasha, phantom
SUBST:  3 = 2, 2 = 1112
: elseif you.depth() < 8 then
KMONS:  D = wight band w:30 / wraith
SUBST:  3 = 34
: else
KMONS:  D = skeletal warrior w:30 / draugr
SUBST:  1 = 2, 3 = 5
: end
SUBST:  p = .ppp
COLOUR: t = brown
TILE:   t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
MAP
 ttt
ttpttt
ttpeptt
tp3G3pt
tp2d2pt
ttp1Dptt
tpp1.ppttttt
ttppp..pppptt
 ttttpp....pt
    tttpppp..
      ttttt.@
ENDMAP

NAME:   dilly_guarded_unrand_devastator
TAGS:   no_monster_gen transparent
DEPTH:  D:4-12
WEIGHT: 3
ITEM:   devastator no_pickup, stone, large rock q:1
MONS:   ogre, two-headed ogre, gargoyle, boulder beetle
# 18 'a' squares. Use 11, saving 7 for 'D'.
NSUBST: a = 8=x / 3=G / D
NSUBST: ' = 20=e. / 10=f. / .
: if you.depth() < 7 then
NSUBST: D = 1 / 2=1. / xxG
: elseif you.depth() < 10 then
NSUBST: D = 2 / 2=2. / 3 / xxG
: else
NSUBST: D = 2 / 3 / 2=23.. / 4 / xxG
: end
FTILE:  xGdef1234. = floor_pebble
TILE:   G = dngn_statue_orb
MAP
  a'a'a
 '''''''
 a'a'a'a
'''''''''
a'a'd'a'a
'''''''''
 a'a'a'a
 '''''''
  a'a'a
ENDMAP

NAME:   hellmonk_guarded_unrand_hermit
TAGS:   no_monster_gen
DEPTH:  D:3-8
WEIGHT: 3
KFEAT:  _ = altar_ecumenical
KITEM:  _ = hermit's pendant no_pickup
NSUBST: E = . / xxx., H = . / xxx., J = . / xxx., L = . / xxx., M = . / xxx.
NSUBST: N = . / xxx., ' = 8 / .
SUBST:  D:wWlG, F = xxxxxG.
TILE:   G = dngn_crumbled_column
MAP
  xxx
 xxxxx
xxxxxxx
xx'''xx
x'''''x
x.._..x
xx...xx
xxD.Dxx
xxEEExx
xxF.Fxx
xxHHHxx
xxF.Fxx
xxJJJxx
xxF.Fxx
xxLLLxx
xxF.Fxx
xxMMMxx
xxF.Fxx
xxNNNxx
xxx@xxx
ENDMAP

NAME:    nicolae_guarded_unrand_lochaber
TAGS:    patrolling no_monster_gen no_item_gen
DEPTH:   D:10-, Depths
WEIGHT:  3
KITEM:   L = lochaber axe no_pickup
: if you.in_branch("D") then
# Two-headed ogres get half the weight because they get twice the armament.
KMONS:   a = orc knight ; war axe | broad axe | battleaxe w:5 / \
             deep elf knight ; war axe | broad axe | battleaxe w:5 / \
             tengu warrior ; war axe | broad axe | battleaxe w:5 / \
             two-headed ogre w:5 ; war axe | broad axe | battleaxe w:5 . \
                                   war axe | broad axe | battleaxe w:5
KMONS:   p = orc knight ; halberd | demon trident | glaive w:5 / \
             deep elf knight ; halberd | demon trident | glaive w:5 / \
             tengu warrior ; halberd | demon trident | glaive w:5 / \
             two-headed ogre w:5 ; halberd | demon trident | glaive w:5 . \
                                   halberd | demon trident | glaive w:5
KMONS:   L = ettin ; executioner's axe . bardiche
KMONS:   P = phantasmal warrior w:5 / nothing
: else
KMONS:   a = war gargoyle ; broad axe | battleaxe / \
             stone giant ; broad axe | battleaxe / \
             orc warlord ; broad axe | battleaxe / \
             ettin w:5 ; broad axe | battleaxe . broad axe | battleaxe
KMONS:   p = war gargoyle ; partisan | glaive / \
             stone giant ; partisan | glaive / \
             orc warlord ; partisan | glaive / \
             ettin w:5 ; partisan | glaive . partisan | glaive
KMONS:   L = deep elf blademaster ; executioner's axe . bardiche
KMONS:   P = phantasmal warrior / nothing w:5
: end
SHUFFLE: DE
SUBST:   D : cccT., E : GGGc.
MAP
G.....ccccccccccccccccc
.....Gcc.a.a.a.a.cccccc
..c++cc..........Pccccc
..c..cE.D.E.D.E.D.Ecccc
@.c..............P...cc
@.c................L..c
@.c..............P...cc
..c..cE.D.E.D.E.D.Ecccc
..c++cc..........Pccccc
.....Gcc.p.p.p.p.cccccc
G.....ccccccccccccccccc
ENDMAP

# Skysharks because that's what the slippers are made of. Elementals, anacondas,
# and throwing nets to demonstrate the hazards that the slippers can help you
# with. The merfolk will also have some nets and tridents, if you're not
# interested in the footwear.
NAME:   nicolae_guarded_unrand_slippers
TAGS:   no_item_gen no_monster_gen no_trap_gen no_pool_fixup transparent
DEPTH:  D:10-
WEIGHT: 3
KITEM:  s = slick slippers no_pickup
KMONS:  S = skyshark w:40 / nothing
KMONS:  ET = nothing w:20 / water elemental / anaconda / \
             w:20 merfolk ; trident w:45 | trident good_item | \
                            demon trident w:5 . throwing net q:4
KFEAT:  sS = W
KFEAT:  E = w
KFEAT:  T = T w:30 / V
KPROP:  sSEwWT` = no_tele_into
MAP
       .........
  ......cccnccc......
...ccccccwwwwwcccccc...
...cwwwwwEwEwE`````c...
@..cwSWSwwwwww`T`T`c..@
@..nwWsWWWWWWW`````=..@
@..cwSWSwwwwww`T`T`c..@
...cwwwwwEwEwE`````c...
...ccccccwwwwwcccccc...
  ......cccnccc......
       .........
ENDMAP

NAME:   nicolae_guarded_unrand_storm_shield
TAGS:   no_monster_gen no_trap_gen no_tele_into
DEPTH:  D:10-
KITEM:  S = storm queen's shield no_pickup
KMONS:  S = patrolling storm dragon
KMONS:  1 = sixfirhy w:20 / shock serpent w:20 / spark wasp w:20 / \
            air elemental / raiju
KMONS:  2 = tengu conjurer  / deep elf zephyrmancer / spriggan air mage w:3
NSUBST: 1 = 2 / 1111112
MAP
  xxx         xxx
 xxxxx  @@@  xxxxx
xxxxxxc.....cxxxxxx
xxxxxxccc=cccxxxxxx
xxxxccc.....cccxxxx
 xxxcG.......Gcxxx
  ccc....1....ccc
  .c...1...1...c.
 @.c...........c.@
 @.=..1..S..1..=.@
 @.c...........c.@
  .c...1...1...c.
  ccc....1....ccc
 xxxcG.......Gcxxx
xxxxccc.....cccxxxx
xxxxxxccc=cccxxxxxx
xxxxxxc.....cxxxxxx
 xxxxx  @@@  xxxxx
  xxx         xxx
ENDMAP

# A monster will have this equipped rather than it being on the ground
# Yo ho ho and a bottle o' rum
NAME:   beargit_guarded_unrand_captain_cutlass
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  Shoals, Swamp, Crypt, Depths
WEIGHT: 3
# The captain and their parrot(s), the lore-invoking kraken,
# some undead crew members, and some lingering ghosts.
: if you.in_branch("Swamp") then
MONS:   skeletal warrior ; captain's cutlass . swamp dragon scales
MONS:   shard shrike zombie, kraken zombie / kraken simulacrum
MONS:   bog body / freezing wraith / spriggan berserker zombie / \
        spriggan draugr w:2
KMONS:  56 = bloated husk / hydra zombie
KMONS:  7 = ghost crab / will-o-the-wisp
NSUBST: w = 1:3 / 4:6 / 1:67 / 1:7 / *:w
SUBST:  ~ = t, ? = 4
KITEM: Z = human skeleton / spriggan skeleton
: elseif you.in_branch("Shoals") then
TAGS:   water_ok no_pool_fixup
# Shoals doesn't have any default undead themes, so instead have
# mostly wildlife that picked the crew's bones clean.
MONS:   skeletal warrior ; captain's cutlass . scale mail . buckler
MONS:   harpy draugr, kraken
MONS:   merfolk draugr / spectral snapping turtle w:4
KMONS:  56 = wind drake / manticore
KMONS:  7 = alligator snapping turtle
KMONS:  0 = harpy / sea snake / snapping turtle
NSUBST: w = 2:3 / 3:6 / 1:77w / *:w, 4 = 4:0 / 2:Z / *:4
SUBST:  ~ = @, ? = 0
KITEM: Z = human skeleton / merfolk skeleton
: elseif you.in_branch("Crypt") then
MONS:   ancient champion ; captain's cutlass . scale mail . kite shield
MONS:   shard shrike simulacrum / spectral shard shrike, spectral kraken
MONS:   skeletal warrior / jiangshi / vampire knight w:4 / \
        alligator snapping turtle draugr w:2 / sea snake draugr w:2
KMONS:  56 = flayed ghost / vampire mage
KMONS:  7 = curse skull
SUBST:  ~ = xw, ? = 2
NSUBST: w = 2:3 / 2:6 / 1:7 / 1:6w / *:w, . = 2:4
KITEM: Z = spriggan skeleton / merfolk skeleton
: else -- Depths
MONS:   ancient champion ; captain's cutlass . plate armour
MONS:   caustic shrike simulacrum / spectral caustic shrike
MONS:   kraken / kraken simulacrum / spectral kraken
MONS:   jiangshi / spriggan defender zombie / vampire knight w:4
KMONS:  56 = phantasmal warrior / spectral storm dragon
KMONS:  7 = flayed ghost / merfolk javelineer
NSUBST: w = 3:3 / 3:6 / 3:7 / 4 = 67w / *:w
SUBST:  ~ = xw, ? = 2
KITEM:  Z = any skeleton
: end
ITEM:   potion of moonshine pre_id, potion of ambrosia pre_id
ITEM:   scroll of immolation pre_id / % w:20
KFEAT:  67 = w
NSUBST: . = 10:d / 2:e / 8:Z / 3:` / 3:4 / 3 = 45.. / *:.
KPROP:  ` = bloody
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
     WWWWWWWWWWWWWW.@.WWWWWWWWWWWWWW
    WWWWWWWWwwwwwww...wWwWwwWWWwwwwwww
   WwwwWwwwWwwwwwww.`.wwwwwwwWwwwwwwwwww
 wwwwwwwwwwwwwwwwww...wwwwwwwwwwwwwwwwww
wwwwwxxmxmxmxmxmx...`.wwwwwwwwwwwwwwwwwww
wwwwxxff.f+.....+............wwwwwwwwwwww
wwwwxf..fxx..4..x...............xxxxwwwwwwww
wwwxxxxxxxxxxxxxx.....4....>....x.4xxxxwwwwww
wwxx.G..x.......+...............x`.`.5xxxxwww
wwm.....x.......x....xxx........+.4.`.x4.xxwwww
wwx*12?.xxx+xxxxx....xxx........xxxxxxx.4|xxxww
wwm.....+...4...+....xxx..4.....+.....+.4xxwww
wwxx....x.......x...............x..4..xxxxwwww
wwwxxx+xxxxx+xxxx....4.....>....x..xxxxwwwwww
wwwwx$$$$$x...4.x...............xxxxwwwwwwww
wwwwxx$$$$x.....x............wwwwwwwwwwww
wwwwwxxxxxxmxmxmx.....wwwwwwwwwwwwwwwwww
 wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  ~~~~~~~wwwwwww~~~w~w~ww~~~wwwwwwww
ENDMAP

NAME:    orjb1_guarded_unrand_arga
TAGS:    no_monster_gen no_trap_gen no_item_gen
DEPTH:   Vaults, Depths
WEIGHT:  3
KITEM:   d = arga no_pickup
MONS:    quicksilver dragon
TILE:    v = dngn_metal_wall_lightblue
MAP
 vv=====vv
 v.......v
 v...1...v
 vv.....vv
  v1...1v
  vv.d.vv
   vvvvv
ENDMAP

NAME:   orjb1_guarded_unrand_rift
TAGS:   no_monster_gen no_trap_gen no_item_gen uniq_guarded_rift
DEPTH:  Vaults, Elf
WEIGHT: 2
MONS:   dancing weapon ; damaged demon trident ego:distortion
KMONS:  D = dancing weapon ; rift
KMONS:  E = generate_awake occultist god:Lugonu name:mad_acolyte_of_Lugonu \
        n_rpl n_des n_noc col:lightgreen tile:mons_mad_acolyte_of_lugonu; \
        robe good_item . demon trident ego:distortion | demon trident ego:none \
        spells:smiting.20.priest;banishment.10.priest;invisibility.10.priest;
KMONS:  B = pile of debris
ITEM:   demon trident ego:none w:15 / demon trident ego:distortion / \
        demon trident ego:chaos w:5
ITEM:   elf skeleton / blink frog skeleton
KFEAT:  D = altar_lugonu
KFEAT:  E = stone_arch
NSUBST: ? = 3:1 / 4:d / *:., ! = 3:e / *:.
TILE:   c : stone_wall_abyss_a / stone_wall_abyss_b / stone_wall_abyss_c
MAP
      c===c
     cc..?cc
    cc!?..?cc
   cc??.DB.?cc
  cc.?.!EU!?.cc
 cc!.?.???!!?.cc
ccccccccccccccccc
ENDMAP

####

# From the dcss channel on the roguelikes discord:
# Lici the Crawler: @nicolae  FR some earlyish (d7-d11) vaults
#                   with lightning rod in them
# Iguana Iguana:    @nicolae  FR some earlyish (d7-d11) vaults
#                   with lightning rod and harm in them. FTFY
# You've got to give the people what they want.
NAME:   nicolae_have_a_lightning_rod
DEPTH:  D:7-11
KITEM:  L = lightning rod
KITEM:  H = scarf ego:harm pre_id
KMONS:  E = electric eel
KMONS:  R = patrolling raiju
KFEAT:  E = w
NSUBST: E = 2=E / 2=w / 2=Ew
veto {{
  return not items.pickable("lightning rod")
}}
MAP
xxxxxxxxxxxxxxxxxxxxxx
xxxxxwEwwxxxxxxxxxxxxx
xxxwww..wwwxxxxxxxxwwx
xwww...R..wEwxxxxEww.@
xw..........wwwwww...@
@.....ww..LH..ww.....@
@...wwwwww..........wx
@.wwExxxxwEw..R...wwwx
xwwxxxxxxxxwww..wwwxxx
xxxxxxxxxxxxxwwEwxxxxx
xxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# I expanded Lici's request to a few other evokers.
# (See comment on nicolae_have_a_lightning_rod)
NAME:   nicolae_beast_mode
TAGS:   transparent
DEPTH:  D:7-11
KITEM:  D = box of beasts
# Even on juveniles, blinkbolt can be overwhelming, especially if you roll more
# than one shock beast. Explicitly specify beast facets here to avoid rolling
# any shock ones for the juveniles. The larval one, being the "boss" here, can
# still roll shock for now.
KMONS:  D = juvenile bat-sting mutant beast / juvenile fire-bat mutant beast / \
        juvenile bat-weird mutant beast / juvenile ox-bat mutant beast / \
        juvenile sting-fire mutant beast / juvenile weird-sting mutant beast / \
        juvenile sting-ox mutant beast / juvenile fire-weird mutant beast / \
        juvenile ox-fire mutant beast / juvenile weird-ox mutant beast
KMONS:  L = larval mutant beast
NSUBST: D = D / L / ., L = 2=L / 3=-L / -
SUBST:  - = .x, ` = x_
CLEAR:  _
veto {{
  return not items.pickable("box of beasts")
}}
MAP
     `xxxxx`
    `xx-.-x
  ..xx-L.....xx`
  .......-...-x`
`x-...-..L...-xx`
xxx-.L.....-..-xx`
xxx-.-.......L.-x`
xx-.....DD......x`
`x-..L..DDD..-.L.
 xx-.-...DD......
 `x-.L........L..
 `xx-..-.....-.-x`
  xx-..L..-L..-xx`
 `x..........-xx`
  ...-xxx-..xxxx
   .xxxxxx..xx`
     `xxx`
ENDMAP

NAME:   nicolae_rank_and_phial
TAGS:   transparent patrolling
DEPTH:  D:7-11
KITEM:  P = phial of floods
KMONS:  E = water elemental
KMONS:  P = patrolling merfolk
KFEAT:  E~ = w
KMASK:  E~ = no_pool_fixup
SUBST:  M = w.
NSUBST: E = 2=E / 2=Eww / *:w
veto {{
  return not items.pickable("phial of floods")
}}
MAP
MMMMMMMMMMM
MwwwwwwwwwM
MwE~~E~~EwM
Mw~wwwww~wM
Mw~w...w~wM
MwEw.P.wEwM
Mw~w...w~wM
Mw~wwWww~wM
MwE~~W~~EwM
MwwwwWwwwwM
MMMMMWMMMMM
ENDMAP

# Summoning a player illusion is probably too cruel at this depth, so a boggart
# or two doing shadow creatures will have to suffice thematically instead.
NAME:    nicolae_phantomly_mirrored
TAGS:    no_item_gen no_monster_gen no_trap_gen
DEPTH:   D:7-11
KITEM:   P = phantom mirror
# Using the same probabilities from mon-gear.cc.
KMONS:   O : w:60 two-headed ogre ; giant club . giant club / \
             w:30 two-headed ogre ; giant spiked club . giant spiked club / \
             w:9  two-headed ogre ; dire flail . dire flail / \
             w:1  two-headed ogre ; great mace . great mace
KMONS:   S = boggart
KFEAT:   DEFH = G
SHUFFLE: OS
{{
local statuetiles = {"dngn_statue_ancient_evil", "dngn_statue_ancient_hero",
   "dngn_statue_angel", "dngn_statue_archer", "dngn_statue_axe",
   "dngn_statue_cat", "dngn_statue_centaur", "dngn_statue_cerebov",
   "dngn_statue_demonic_bust", "dngn_statue_dragon", "dngn_statue_dwarf",
   "dngn_statue_elephant", "dngn_statue_hydra", "dngn_statue_imp",
   "dngn_statue_maw", "dngn_statue_mermaid", "dngn_statue_naga",
   "dngn_statue_orb", "dngn_statue_orb_guardian", "dngn_statue_polearm",
   "dngn_statue_princess", "dngn_statue_sigmund", "dngn_statue_snail",
   "dngn_statue_sword", "dngn_statue_tengu", "dngn_statue_tentacles",
   "dngn_statue_triangle", "dngn_statue_twins", "dngn_statue_wraith"}
tile("D : " .. util.random_from(statuetiles))
tile("E : " .. util.random_from(statuetiles))
tile("F : " .. util.random_from(statuetiles))
tile("H : " .. util.random_from(statuetiles))
}}
veto {{
  return not items.pickable("phantom mirror")
}}
MAP
xxxxxxxx
xxvvvvvxxxx
xxv...vvvvxxxx
xxv.H....vvvvxxxx
xvv....F....vvvvx
xv.....O..E....vx
@.........S..D.vx
@............P.vx
@.........S..D.vx
xv.....O..E....vx
xvv....F....vvvvx
xxv.H....vvvvxxxx
xxv...vvvxxxxx
xxvvvvvxxx
xxxxxxxx
ENDMAP

####
# A simple idea I had about vaults guarding highly valued dual-school spells
# alongside other thematic loot. Since these have a bit of a spoilery nature,
# they're still sorted with the other guarded unrands and less likely than
# default, but it'd be a nice concept to extend to other spells in game-long
# vaults like Permafrost Eruption, Hellfire Mortar, or Freezing Cloud....

NAME:    regret_index_guardbook_plasma_beam
TAGS:    no_monster_gen no_item_gen vaults_hard vaults_orient_n vaults_orient_s
DEPTH:   D:8-, Vaults, !Vaults:$, Elf, Depths, Zot
WEIGHT:  10 (Vaults), 6
SHUFFLE: d|
: if you.in_branch("D") then
:   if you.depth() < 10 then
MONS:    sky beast, fire bat
MONS:    fire elemental, tengu warrior ; long sword ego:electrocution . \
                                         leather armour . buckler
KMONS:   0 = orc wizard / steam dragon / centaur / marrowcuda
NSUBST:  . = 3:2 / 3 = 2. / *:.
:   elseif you.depth() < 12 then
MONS:    fire elemental, harpy
MONS:    deep elf pyromancer, tengu conjurer
KMONS:   0 = wyvern / red ugly thing / cyan ugly thing / fire bat band w:2
:   else
MONS:    salamander ; shortbow ego:flaming . spear ego:flaming, tengu conjurer
MONS:    deep elf zephyrmancer, efreet / fire dragon w:2
KMONS:   0 = centaur warrior / fire crab / \
             laughing skull band / thermic dynamo w:2
:   end
SUBST:   | = e
: else
:    if you.in_branch("Vaults") then
MONS:    lindwurm, crawling flesh cage / polterguardian / formless jellyfish
MONS:    ironbound thunderhulk / deep elf annihilator w:5
MONS:    hell knight w:2 / fire giant / yaktaur captain ; arbalest ego:flaming
KMONS:   0 = vault guard / ironbound preserver / centaur warrior
SUBST:   @ = ., u = c
TILE:    c = dngn_stone_wall_red
:   elseif you.in_branch("Elf") then
MONS:    deep elf pyromancer, deep elf zephyrmancer
MONS:    air elemental, dancing weapon ; scimitar ego:flaming
KMONS:   0 = glowing shapeshifter / deep elf annihilator w:5 / thermic dynamo w:5
COLOUR:  u = red
:   elseif you.in_branch("Depths") then
MONS:    hell knight / fire giant w:2, spriggan air mage / spark wasp w:4
MONS:    storm dragon, tengu reaver
KMONS:   0 = fire dragon / chonchon w:2 / spriggan rider w:2
:   else -- Zot
MONS:    black draconian, red draconian scorcher
MONS:    golden dragon, electric golem
KMONS:   0 = red draconian / storm dragon w:5 / moth of wrath w:5
NSUBST:  % = 1:)> / 1:]>
:   end
SUBST:   | = f
: end
: if you.in_branch("Vaults") then
CLEAR:   X
: else
SUBST:   X = x
: end
ITEM:    randbook disc:fire disc2:air spells:plasma_beam pre_id
ITEM:    staff of air / staff of fire / \
         fire dragon scales good_item / storm dragon scales good_item
ITEM:    staff of air randart / staff of fire randart / \
         fire dragon scales randart / storm dragon scales randart
KFEAT:   u = x
NSUBST:  z = 2:x. / * = x., . = 1:0 / *:.
: vaults_hard_standard(_G)
TILE:    u = wall_pebble_red
TILE:    v = dngn_metal_wall_lightcyan
MAP
  xx@x@x@xx     xxxxxxx     xxxx
  x...z...xxxxxxx..z..xxxxxxx.1xX
Xxx........$xzx$.......$xzx$..02X
X....vvuvv.......vvuvv.......u..X
Xz...v.d.v..u.u..v.%.v..u.u..v..X
X....v.4.v..vvv..v1.1v.......v..X
X....v...v.......v...v.......v..X
X..uuuu.uuuu...uuuu2uuuu4v4uuuu.X
X...v.....v.....v.....v.....v...X
X.uuuu3v3uuuu1uuuu...uuuu.uuuu..X
X..v.......v...v.......v...v....X
X..v.......v2.2v..vvv..v.3.v....X
X..v..u.u..v.%.v..u.u..v.|.v...zX
X..u.......vvuvv.......vvuvv....X
X20..$xzx$.......$xzx$........xxX
Xx1.xxxxxxx..z..xxxxxxx...z...x
 xxxx     xxxxxxx     xx@x@x@xx
ENDMAP

# Justicar's Regalia
# Bad guys in jail
NAME:    tekkud_guarded_unrand_justicar
TAGS:    no_monster_gen no_item_gen no_trap_gen vaults_hard vaults_orient_n
DEPTH:   Elf:2-, Vaults, !Vaults:$, Depths
WEIGHT:  3
MONS:    angel / cherub, fravashi / daeva
ITEM:    justicar's_regalia no_pickup, any amulet no_pickup
KFEAT:   m = iron_grate
: if you.in_branch("Elf") then
MONS:    deep elf pyromancer / deep elf zephyrmancer / \
         deep elf archer / deep elf knight
MONS:    deep elf elementalist / deep elf blademaster / deep elf master archer
MONS:    deep elf high priest / deep elf death mage / deep elf demonologist /\
         deep elf annihilator / balrug w:5 / blizzard demon w:5
SUBST:   2 = 2.
: elseif you.in_branch("Vaults") then
MONS:    vault guard w:30 / vault sentinel / peacekeeper w:5
MONS:    crystal guardian / vault warden / titan
MONS:    entropy weaver / death knight / polterguardian w:5 /\
         glowing orange brain w:8 / boggart w:8 / dread lich w:2
# if no_convoke ever gets added as a vault tag,
# this won't need the reduced holies subst.
SUBST:   1 = 1.., 2 = 2.., @ = .
: else -- Depths
MONS:    tengu warrior / spriggan defender w:8 / fire giant / \
         frost giant / stone giant / guardian sphinx w:14
MONS:    ophan / walking divine tome / pearl dragon w:5
MONS:    hell knight / rakshasa / chonchon / vampire mage / vampire knight / \
         alderking / dread lich / shadow demon / glowing orange brain
: end
NSUBST:  y = 3:3 / 2=33. / *:.
NSUBST:  z = 1:5 / 2=5. / *:.
TILE:    c = wall_stone_smooth
TILE:    v = dngn_metal_wall_white
COLOUR:  v = white
FTILE:   =+Gdeu.mn12345 = floor_pebble_darkgray
: vault_metal_statue_setup(_G, "G", "silver statue")
MAP
         @@@@@
      cccc+++cccc
      c.........c
      c.vvnnnvv.c
      c.vG...Gv.c
      c.v.....v.c
      c.v..d..v.c
ccccccc.v.....v.ccccccc
c....y..vG...Gv..y....c
c.vvvvvvnvv+vvnvvvvvv.c
c.vG...zm.2.2.=....Gv.c
c.v.....m3...3m..z..v.c
cyn5.e..m..4..m..e5.nyc
c.v.....m1...1m..z..v.c
c.vG...z=.3.3.m....Gv.c
c.vvvvvvnmmmm+nvvvvvv.c
c....y..v.....v..y....c
ccccccc.v..3..v.ccccccc
      c.n..G..n.c
      cyv.....vyc
      c.v.....v.c
      c.vn===nv.c
      c....y....c
      ccccccccccc
ENDMAP

###################################################################
#
# <<9>> Pre-Lair vaults with monsters guarding a manual
#       Manuals are most interesting early in the game when your character may
#       not yet be committed to a specific strategy. However, randomly
#       generated manuals are extremely rare and biased towards deeper levels,
#       and existing vaults that explicitly place manuals are all quite deep as
#       well. So here are some shallow vaults that place manuals!
#
#       These all have a mean of five monsters and a minimum of two, with the
#       exception of minmay_manual_mares which simply has 2 centaurs. There are
#       currently 10 vaults, with a total weight of 50.

NAME:   minmay_manual_maat
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxccvb
MAP
 .......
..xxxxx..
.xx...xx.
.x.xxxdx.
.xx...xx.
.x0xxxx..
.xx00.0.
.x0xxx.
.xx00..
.x0xxx.
.xx00..
.x0xxx.
.xx00..
.x0xxx.
.xx....
....
ENDMAP

NAME:   minmay_manual_macuahuitl
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
MAP
       ................
      ..cc.cc.cc.cc.c..
...  ..xxxxxxxxxxxxxcc.
.x...0xx.x.0x.0x.0xxx..
.xxxxx00x.0x.0x.0x.dxc.
.x...0xx.0x.0x.0x.0xx..
...  ..xxxxxxxxxxxxxcc.
      ..cc.cc.cc.cc.c..
       ................
ENDMAP

NAME:   minmay_manual_mail
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
# crawl can mirror the vault, so no need to randomize these
ITEM:   any manual, ring mail
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
MAP
 .........
..vvv0vvv..
.v...v...v..
.v.0vvv0vvv..
.v.v0v0v0v0v..
..vvvdvvvevvv..
 ..v0v0v0v0v.v.
  ..vvv0vvv0.v.
   ..v...v...v.
    ..vvv0vvv..
     .........
ENDMAP

NAME:   minmay_manual_mandibuliform
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
ITEM:   any manual
MAP
...
.x..
.xx..
0cxx..
0c.xx..
00.cxx..
0c0c.xx..
0c0..cxx..
.xxc000xx..
..xxxc0cxx..
 ...xxx00xx.
   ...xxxdx.
     ...xxx.
       .....
ENDMAP

# this layout tries to be as merciful to autoexplore as centaurs can be
NAME:   minmay_manual_mares
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
MONS:   centaur
SUBST:  x : xxxxccvb
MAP
 .......
..xx.xx..
.xx...xx.
.x..xx.x.
...1d1...
.x.xx..x.
.xx...xx.
..xx.xx..
 .......
ENDMAP

NAME:   minmay_manual_mess
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = d / 2=0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxccvb
MAP
..........
.x.xx00xx..
..x0xxx00x..
 ..x00xxx0xx.
  ..xx00xx0x.
   .x0x000x..
   ..xx.xx..
    .......
ENDMAP

NAME:   minmay_manual_monolith
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
MAP
..0.0.0.0.0.0.
0ccccccdccccc.
.cccccccccccc0
.0.0.0.0.0.0..
ENDMAP

NAME:   minmay_manual_monstrance
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxccvb
MAP
    ...
    .x.
 ...0x0...
 .x.x0x.x.
...xx0xx...
.xxx0d0xxx.
...xx0xx...
 .x.x0x.x.
 ...x0x...
   .x0x.
  ..x0x..
 ..xx0xx..
 .xxx0xxx.
 ....0....
ENDMAP

NAME:   minmay_manual_moon
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
SUBST:  b : xcvbG.....
SUBST:  x : xxxxccvb
MAP
    ......
  ...xxxx..
 ..xxxxxxx..
.0xx...xxxx.
.x...00dxxx.
....00.0.xx.
 ..00b00.xx.
  ...00..x..
   ..0..xx.
    ....x..
     ..x0.
      ...
ENDMAP

# The asymmetry is intentional
NAME:   minmay_manual_mullet
TAGS:   transparent no_monster_gen
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxcccv
MAP
              WWWW   WWWW
             WWxxW  WWxxW
       WWWWWWWxxWWWWWxxWW   WWWW
   WWWWWxxxxxxxxxxxxxxWWWWWWWxxW
 WWWxxxxx.W.x0W..xW..xxxxxxWxxWW
WWxxx00..x.x.x.x..x0x0x.x.xxxWW
Wxxd000b..x.W.x.W..x0..W.W..+W
WWxxxx00...x.x.x.x.0x0x.x.xxxWW
 WWWWxxxxxx.x0W.x.Wx.xxxxxxWxxWW
    WWWWWWxxxxxxxxxxxxWWWWWWWxxW
         WWxxWWWWWWWWxxWW   WWWW
          WWxxW     WWxxW
           WWWW      WWWW
ENDMAP

###################################################################
#
# <<10>> The classics.
#        These are ancient minivaults, or expansions of them.
#
###################################################################

# Wizard's laboratory
NAME:  laboratory
DEPTH: D:12-, Depths, Elf
MONS:  arcanist, occultist, kobold fleshcrafter
MONS:  small abomination, large abomination
KFEAT: T = permanent teleport trap
: if you.branch() ~= "D" then
SUBST: 1 = 3
: else
SUBST: * = %, | = *
:   if you.depth() > 12 then
SUBST: 1 = 12
:   end
: end
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
ccc+cccccc
cT......Gc
c........c
c......1.c
cG.......c
ccccccc+cc
c***c5454c
c|**+4445c
c||*c545Gc
cccccccccc
ENDMAP

# Lava pond
NAME: minivault_8
TAGS: transparent
DEPTH: D:9-, Elf:1-2
MONS: patrolling molten gargoyle
SUBST: F = G:99 F:1
KMONS: F = orange crystal statue / obsidian statue / ice statue
KMASK: FG = opaque
MAP
x.x.x.x.x.x.
.c.c.c.c.c.x
x...l1l...c.
.c.llllll..x
x.lllllll1c.
.c.llFGll..x
x..llGFll.c.
.c1lllllll.x
x..llllll.c.
.c...l1l...x
x.c.c.c.c.c.
.x.x.x.x.x.x
ENDMAP

# Evil zoo
NAME:   door_vault
TAGS:   allow_dup luniq vaults_hard
DEPTH:  D:13-, Elf, Vaults, !Vaults:$, Crypt, Depths, Zot, Dis, Geh, Tar, Coc
# Pick interesting monsters for dungeon branches.
: if you.in_branch("Elf") then
KMONS:  1 = dancing weapon / deep elf annihilator / deep elf blademaster / \
            deep elf master archer / deep elf sorcerer / \
            deep elf death mage / deep elf demonologist / \
            deep elf high priest / place:Elf:$ w:27
: elseif you.in_branch("Crypt") then
KMONS:  1 = reaper / ancient champion / vampire knight / flayed ghost / \
            eidolon / revenant soulmonger / ancient lich / dread lich / \
            curse skull w:15 / vampire bloodprince w:15 / place:Crypt:$ w:30
: elseif you.in_branch("Dis") then
KMONS:  1 = tormentor / hellion / shadow demon / tzitzimitl / \
            ice fiend / brimstone fiend / hell sentinel w:15 / \
            iron giant w:15 / place:Dis:$ w:30
: elseif you.in_branch("Geh") then
KMONS:  1 = tormentor / hellion / balrug / brimstone fiend w:15 / \
            oni incarcerator / ancient lich / dread lich / place:Geh:$ w:20
: elseif you.in_branch("Tar") then
KMONS:  1 = oblivion hound w:15 / death drake / undertaker / tormentor / \
            shadow demon / tzitzimitl w:15 / ancient lich / dread lich / \
            place:Tar:$ w:27
: elseif you.in_branch("Coc") then
KMONS:  1 = shard shrike w:15 / titan / blizzard demon / tormentor / \
            ice fiend w:15 / ancient lich / dread lich / place:Coc:$ w:24
: elseif you.in_branch("Zot") then
KMONS:  1 = nonbase draconian / orb of appropriateness / electric golem / \
            killer klown / ancient lich / dread lich / curse toe / \
            protean progenitor / place:Zot:$ w:20
# Dungeon, Vaults, and Depths get 8 spawns.
: else
KMONS:  1 = 8
:   vaults_hard_standard(_G)
: end
KMONS:  2 = 9
: door_vault_setup(_G)
MAP
..............
..............
..aaaaaaaaaa..
..a++++++++a..
..a++++++++a..
..a++1111++a..
..a++1221++a..
..a++1221++a..
..a++1111++a..
..a++++++++a..
..a++++++++a..
..aaaaaaaaaa..
..............
..............
ENDMAP

# No, John. You are the door vault
NAME:   reverse_door_vault
TAGS:   no_descent
DEPTH:  Depths:2-
WEIGHT: 4
KMONS:  1 = 8
KMONS:  2 = 9
: door_vault_setup(_G)
MAP
xxxxxxxxxxxxxx
x1...1..1.2.1x
x.++++++++++.x
x2++++++++++.x
x.++aaaaaa++.x
x1++a....a++1x
x.++a.(..a++.x
x.++a....a++.x
x1++a....a++1x
x.++aaaaaa++.x
x.++++++++++2x
x.++++++++++.x
x1.2.1..1...1x
xxxxxxxxxxxxxx
ENDMAP

# Closed-box minivault
NAME:  minivault_12
TAGS:  no_descent
DEPTH: D:8-, Depths, !Depths:$
KPROP: .><$*|9 = no_tele_into
KMASK: " = !opaque
MAP
""""""""""""
"nccccxcccn"
"c>9$9$9$<c"
"c.$9$9$.$c"
"c$.****$.c"
"c.$*||*.$x"
"x$.*||*$.c"
"c.$****.$c"
"c$9$9$9$.c"
"c<$9$9$9>c"
"ncccxccccn"
""""""""""""
ENDMAP

# Little trap spiral
NAME:    minivault_13
TAGS:    ruin_abyss transparent
DEPTH:   D:9-, Elf, Abyss
KMONS:   F = orange crystal statue / obsidian statue / ice statue
: if you.in_branch("Elf") then
KMONS:   9 = air elemental / thermic dynamo / dancing weapon / \
             deep elf annihilator / deep elf high priest
KMONS:   8 = deep elf sorcerer / deep elf death mage / \
             deep elf demonologist / deep elf elementalist / \
             deep elf blademaster w:5 / deep elf master archer w:5
: end
ITEM:    robe good_item / scale mail good_item
SHUFFLE: AB, CD, EH/FG
SUBST:   F = G:99 F:1, ABCD = $'
: if you.in_branch("Abyss") then
SUBST:   '| = dd$, = = +
: end
MAP
............
.xxxxxxxxxx.
.+..c..c.9x.
.x.B+.D+..x.
.ccccccc=cc.
.c.8+|0c8.c.
.c8$c.|c..c.
.cc+cccc+cc.
.c.9+.F+..c.
.c..cG.c9.c.
.cccccccccc.
............
ENDMAP

# Lava pond
NAME:  minivault_15
TAGS:  extra transparent no_descent
: if you.in_branch("D") then
KMONS: 1 = orange crystal statue / obsidian statue / ice statue
: else
KMONS: 1 = orange crystal statue
: end
KFEAT: 1 = <
KMASK: 1<|* = opaque
MAP
.........
...lll...
..vvlvv..
.lv|*|vl.
.ll*1*ll.
.lv|*|vl.
..vvlvv..
...lll...
.........
ENDMAP

NAME:   minivault_16
TAGS:   allow_dup extra luniq transparent
WEIGHT: 40
# as this replaces the former statue only minivaults
: if you.in_branch("D") then
MONS:   orange crystal statue / obsidian statue / ice statue
: else
MONS:   orange crystal statue
: end
SUBST:  G = G111
MAP
...........
...........
...........
...........
...........
.....G.....
.....%.....
...........
...........
...........
...........
ENDMAP

NAME: minivault_20
TAGS: allow_dup extra ruin_abyss transparent
DEPTH: D:9-, Elf, Abyss
MAP
............
.xxxx..xxxx.
.x........x.
.x..xxxx..x.
.x.x....x.x.
...x.x9.x...
...x.9x.x...
.x.x....x.x.
.x..xxxx..x.
.x........x.
.xxxx..xxxx.
............
ENDMAP

NAME:    minivault_25_ag
TAGS:    allow_dup extra ruin_abyss transparent
DEPTH:   D:9-, Elf, Abyss
KFEAT:   > = abyssal_stair
SHUFFLE: XY, ABCDE
SUBST:   X=x, Y=+
SUBST:   A=?, B=%%%*, C=T, D=0009, E=89
: if you.in_branch("Abyss") then
SUBST:   %* = >
: end
MAP
............
.xxXxxxxxxx.
.x........x.
.x.xYxxxx.Y.
.x.x....X.x.
.x.x.AA.x.x.
.x.x.AA.x.x.
.x.X....x.x.
.Y.xxxxYx.x.
.x........x.
.xxxxxxxXxx.
............
ENDMAP

NAME:  minivault_28
TAGS:  allow_dup ruin_abyss transparent
DEPTH: D:9-, Elf, Abyss
MAP
...........
.xxxx.xxxx.
.x.......x.
.x..999..x.
.x.9...9.x.
...9.I.9...
.x.9...9.x.
.x..999..x.
.x.......x.
.xxxx.xxxx.
...........
ENDMAP

# These next three are former food vaults
NAME:   grunt_livestock
TAGS:   extra no_monster_gen no_trap_gen patrolling
DEPTH:  D:7-14
MONS:   human ; animal skin . hand axe
{{
  local hog_weight = 14 - you.absdepth()
  if hog_weight <= 0 then
    mons("yak")
  else
    mons("hog w:" .. hog_weight .. " / yak w:1")
  end
}}
KFEAT:  K = iron_grate
KFEAT:  F = cache_of_meat
KFEAT:  - = open_door
MAP
.xxxxxxx
@+...$$x
.x...1Fx
 xKK-KKx
 x2...2x
 x.2.2.x
 xxxxxxx
ENDMAP

NAME:    hangedman_stone_soup
DEPTH:   D:10-14
TAGS:    extra patrolling no_rotate no_vmirror
# Branch representatives working together to cook some soup:
# D, Orc, Elf, Swamp, Shoals, Vaults, Crypt, Pan.
KMONS:   A = kobold
KMONS:   B = orc
KMONS:   C = deep elf pyromancer / deep elf zephyrmancer
KMONS:   D = spriggan
KMONS:   E = merfolk
KMONS:   F = human
KMONS:   G = vampire
KMONS:   H = crimson imp
KITEM:   1 = stone q:1 w:50 no_pickup / large rock q:1 w:24 / \
             mundane hand axe w:1 no_pickup
KITEM:   b = gold / nothing w:12
KFEAT:   1 = cache_of_fruit / cache_of_meat
KFEAT:   Yab = shallow_water
KMASK:   1Yac = no_monster_gen
MARKER:  Y = lua:fog_machine { cloud_type = "steam", pow_min = 1, \
                 pow_max = 10, delay = 60, size = 1, walk_dist = 0 }
: single_cloud(_G, "Z", "flame", false)
NSUBST:  c = 2:a / *:b
SHUFFLE: ABCDEFGH
MAP
 .......
..A...B..
..vv.vv..
..vcccv..
..vc1cv..
..vcYcv..
.CvvvvvD.
...Z.Z...
 .......
ENDMAP

NAME:     hangedman_ranch
DEPTH:    D:8-11
TAGS:     no_monster_gen patrolling
KMONS:    A = three-headed hydra / w:5 two-headed hydra
KMONS:    B = dream sheep
KMONS:    C = yak
KMONS:    D = kobold brigand
KMONS:    E = kobold brigand ; falchion ego:flaming | hand axe ego:flaming
KMONS:    F = plant
KITEM:    E = halberd
KFEAT:    H = cache_of_meat
KFEAT:    EF = shallow_water
TILE:     H = dngn_cache_of_pizza
MAP
cccccccccc
cAH+.....c
cHDcD..BBc
c+ccm+++cc
x.WF.....x
xFWW.t.t.x
xWEF..t..x
xFW..t.t.x
xFFW..W..x
xxxxx@xxxx
ENDMAP

# Welcome to Pandemonium Pizzeria; is this for carry-out or delivery?
# (Ideally the cashier would have a silly hat, but they can't wear hats.)
NAME:   grunt_pizzeria
DEPTH:  D:8-11
TAGS:   no_monster_gen no_trap_gen extra patrolling
MONS:   human ; short sword | rapier / orc warrior ; dagger / spriggan ; dagger
KFEAT:  d = cache_of_meat
KFEAT:  e = cache_of_baked_goods
TILE:   d = dngn_cache_of_pizza
: single_cloud(_G, "O", "flame", false)
MAP
xxxxxxx
xvvvdex
xvO+..x
xvvv.xx
x$1...x
xmmm.xx
x.....x
xmm+mmx
 ..@..
ENDMAP

NAME:   special_room
TAGS:   allow_dup luniq no_item_gen ruin_spider ruin_slime
TAGS:   no_monster_gen layout_rooms layout_corridors layout_passages
TAGS:   layout_narrow_caves layout_open_caves
CHANCE: 1% (Geh, Coc, Dis, Tar, Pan), 2%
DEPTH:  D:8-, Depths, Orc, Elf, Lair, Snake, Spider, Slime, Crypt, \
        Geh, !Geh:$, Coc, !Coc:$, Dis, !Dis:$, Geh, !Geh:$, Pan
KFEAT:  X = slimy_wall
# FIXME: subvaults still don't set feature names on a higher level.
#        For now, only the bee room uses this, so this should be fine.
: set_feature_name("decorative_floor", "flower patch")
{{
    -- An incredibly ugly kludge to avoid duplicating the list of valid
    -- branches/depths (and causing mysterious errors if it's not up to date).
    if not dgn.map_by_tag("special_room") and not is_validating() then
      return
    end

    local width = 6 + crawl.random2avg(3, 2)
    local height = 5 + crawl.random2avg(5, 2)

    extend_map { width = width, height = height }
    make_box { x1 = 0, y1 = 0, x2 = width - 1, y2 = height - 1, floor = 'O' }
    subvault('O : special_room')

    local entrance_x, entrance_y
    if crawl.coinflip() then
        entrance_x = crawl.coinflip() and 0 or width - 1
        entrance_y = crawl.random_range(1, height - 2)
    else
        entrance_x = crawl.random_range(1, width - 2)
        entrance_y = crawl.coinflip() and 0 or height - 1
    end

    mapgrd[entrance_x][entrance_y] = '@'

    if you.in_branch("Crypt") then
        subst("x = c")
    elseif you.in_branch("Slime") then
        subst("x = X")
    end
}}
MAP
ENDMAP

NAME:   special_room_vaults
TAGS:   allow_dup luniq unrand no_item_gen vaults_hard
DEPTH:  Vaults, !Vaults:$
{{
    local width = 6 + crawl.random2avg(3, 2)
    local height = 5 + crawl.random2avg(5, 1)

    extend_map { width = width, height = height, fill = 'O' }
    subvault('O : special_room')
}}
MAP
ENDMAP