summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/des/altar/overflow.des
blob: beb3e0dbf7944452dce3a083d8157a3fcd5c0f86 (plain) (blame)
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
###############################################################################
# overflow.des: This is the place where vaults containing overflow altars go.
#
# Altar vaults do not just provide flavour. They are crucial for ensuring
# that granted gods without altars in the Temple will be present in the
# early part of the dungeon. Such altars are called "overflow temples".
# Sometimes, ordinary altar maps featuring a single C glyph (random altar)
# are used. However, there are also vaults dedicated to a special god.
# These look much more interesting, of course.
# There are two TAGs to be used for single-altar maps with a specified god:
#
# TAG: temple_overflow_1 temple_overflow_FOO
#      Says the map will only ever be used for overflow temples to god FOO.
#      (The 1 indicates there's only one god placed by this vault.)
# TAG: uniq_altar_FOO
#      If you also add this, then the map can be placed randomly even if
#      that altar has been chosen at new-game time to be an overflow temple
#      on a specific level. If it happens to be randomly placed before being
#      generated specifically then it will only be placed once, rather than
#      being placed a second time at the location chosen at new-game time.
#
# And there is a TAG if you want a single-altar map to a random god:
#
# TAG: temple_overflow_generic_1
#      Allows any of the overflow temple altars to be used.
#      For this, use one B glyph in your map.
#
# If you want to check overflow temple placement in wizard mode, use the &:
# command. The levels overflow temples are placed on, and which gods are
# in them, are chosen at new-game time.
#
###############################################################################

{{
function interest_check(e)
  if you.branch() ~= "D" or you.absdepth() > 9 then
    e.tags('extra')
  end
end

function get_overflow_altar_count(e)
  local params = dgn.map_parameters()
  if params ~= nil then
    local tag = unpack(params)
    if tag ~= nil then
      -- temple_overflow_generic_ is 24 characters
      return string.sub(tag, 25)
    end
  end

  return nil
end

function altar_check(e)
  if e.is_validating() then
    e.subst('C = B')
    return
  end
  if get_overflow_altar_count(e) ~= nil then
    e.subst('C = B')
  else
    e.tags('extra')
  end
end

function callback.vampire_church_blood(data, triggerable, triggerer, marker, ev)
  local slaves = dgn.find_marker_positions_by_prop("slave_name", "vampire_church_blood")
  crawl.god_speaks("Kikubaaqudgha", "As you approach the altar, the fountains"
                                 .. " begin to flow with blood!")
  for i, slave in ipairs(slaves) do
    dgn.terrain_changed(slave.x, slave.y, "fountain_blood", false, false, false)
  end
end
}}

default-depth: D, Depths

# These must feature one of the temple_overflow_* TAGs (see header).
# Altars are sorted alphabetically by god, with the Shining One coming
# after Zin. At the end, there are altar vaults which can be used for
# more than just one god.

### Ashenzari overflow altars #################################################

NAME:   ashenzari_altar_1
TAGS:   uniq_altar_ashenzari temple_overflow_1 temple_overflow_ashenzari
TAGS:   transparent decor
KFEAT:  _ = altar_ashenzari
: interest_check(_G)
MAP
b@b
@_@
b@b
ENDMAP

# A ruined temple
NAME:   evilmike_ruin_ashenzari
TAGS:   uniq_altar_ashenzari temple_overflow_1 temple_overflow_ashenzari
TAGS:   transparent decor
SUBST:  x = xxxxx-, - = ----.
TILE:   x = WALL_BRICK_VINES
FTILE:  -V_ = FLOOR_SANDSTONE
KFEAT:  _ = altar_ashenzari
SUBST:  - = .
: interest_check(_G)
MAP
      .......
      .xx+xx.
     ..x---x..
   ....x---x....
   .xxxx---xxxx.
  ..xV-xx+xx-Vx..
....x---------x....
.xxxxx-------xxxxx.
.x---x-------x---x.
.x---+---_---+---x.
.x---x-------x---x.
.xxxxx-------xxxxx.
....x---------x....
  ..xV-xx+xx-Vx..
   .xxxx---xxxx.
   ....x---x....
     ..x---x..
      .xxxxx.
      .......
ENDMAP

NAME:   ashenzari_conservatory_becter
TAGS:   temple_overflow_1 temple_overflow_ashenzari transparent
DEPTH:  D:2-9
KFEAT:  _ = altar_ashenzari
MAP
   .....
 .........
 .........
....mmm....
....m_m....
....c+c....
xxxxx.xxxxx
     @
ENDMAP

NAME:  cheibrodos_ashenzari_chains
TAGS:  temple_overflow_1
TAGS:  temple_overflow_ashenzari uniq_altar_ashenzari transparent
DEPTH: D:3-9
KFEAT: _ = altar_ashenzari
KFEAT: m = iron_grate
MAP
.............
.mmm.....mmm.
.mcmmc_cmmcm.
.mmm.....mmm.
.............
ENDMAP

### Cheibriados overflow altars ###############################################

NAME:   cheibriados_altar_1
TAGS:   uniq_altar_cheibriados temple_overflow_1 temple_overflow_cheibriados
TAGS:   transparent decor
KFEAT:  _ = altar_cheibriados
: interest_check(_G)
MAP
...
._.
...
ENDMAP

NAME:    cheibriados_altar_2
TAGS:    uniq_altar_cheibriados temple_overflow_1 temple_overflow_cheibriados
TAGS:    transparent decor
DEPTH:   D:2-
WEIGHT:  1
KPROP:   1 = no_rtele_into
KFEAT:   _ = altar_cheibriados
MONS:    torpor snail
SUBST:   1 : 1:50 2:30 3:10 4:10
NSUBST:  4 = 1:1 / 1:2 / 1:3
: interest_check(_G)
MAP
.......
.mmm...
.m1m...
.mmmmm.
.._m1m.
.mmmmm.
.m1m...
.mmm...
.......
ENDMAP

# Golems are slow and they protect an altar to the slow god. (Lemuel)
# Goliath beetles are also slow and more reasonable for an overflow altar.
# --elliptic
NAME:  beetle_altar_1
DEPTH: D:5-9
TAGS:  patrolling no_monster_gen no_item_gen transparent
TAGS:  uniq_beetle_altar temple_overflow_1 temple_overflow_cheibriados
KMONS: _ = goliath beetle
KFEAT: _ = altar_cheibriados
SUBST: x : xxxcccmnvb
MAP
xxx..@..xxx
xxx.....xxx
xxx.....xxx
...........
...........
@...._....@
...........
...........
xxx.....xxx
xxx.....xxx
xxx..@..xxx
ENDMAP

NAME:    beetle_altar_2
DEPTH:   D:5-9
TAGS:    patrolling no_monster_gen no_item_gen
TAGS:    uniq_beetle_altar temple_overflow_1 temple_overflow_cheibriados
KMONS:   _ = goliath beetle
KFEAT:   _ = altar_cheibriados
SUBST:   x : xxxcccvb
MAP
x@@G@@x
x.....x
x.....x
xx+++xx
x.....x
x.....x
x.....x
x.....x
x.._..x
xxxxxxx
ENDMAP

NAME:   cheibriados_altar_wand_db
TAGS:   uniq_altar_cheibriados temple_overflow_1 temple_overflow_cheibriados
TAGS:   patrolling
DEPTH:  D:2-9
WEIGHT: 5
KFEAT:  _ = altar_cheibriados
MONS:   goblin; wand of slowing ident:type / \
        hobgoblin; wand of slowing ident:type / \
        gnoll; wand of slowing ident:type / \
        orc; wand of slowing ident:type / \
        kobold; wand of slowing ident:type
MONS:   goblin / hobgoblin / gnoll / orc / kobold
NSUBST: 2 = 1:1 / *:2
MAP
ccccccc
c.2.2.c
c2._.2c
c.....c
c.....c
ccc+ccc
ENDMAP

NAME:   chei_beetle_safe_becter
TAGS:   overflow_altar_cheibriados transparent no_monster_gen
TAGS:   transparent
DEPTH:  D:4-9
WEIGHT: 5
KMONS:  a = goliath beetle
NSUBST: ' = 1:a / *:.
KFEAT:  _ = altar_cheibriados
MAP
 ........
..xxxxxx..
.xx''''xx.
.x'xxxx'x.
.x'm.<x'x.
.xx+._x'x.
..xxxxx'x.
.x.....xx.
.xxxxxxx..
.........
ENDMAP

NAME:   cheibrodos_beetle_habitat
TAGS:   no_item_gen no_monster_gen temple_overflow_1 transparent
TAGS:   temple_overflow_cheibriados uniq_altar_cheibriados
DEPTH:  D:5-9
WEIGHT: 5
KFEAT:  _ = altar_cheibriados
MONS:   goliath beetle
MAP
.............
.xxxxx.xxxxx.
.xTWWxxxWWTx.
.xWWWWWWWWWx.
.xWWWxWxWWWx.
.xxWxx.xxWxx.
..xWm._.mWx..
.xxWxx1xxWxx.
.xWWWxmxWWWx.
.xWWWWWWWWWx.
.xTWWx+xWWTx.
.xxxxx.xxxxx.
......@......
ENDMAP

### Dithmenos overflow altars ################################################

NAME:   grunt_dithmenos_smoke
TAGS:   uniq_altar_dithmenos temple_overflow_1 temple_overflow_dithmenos
TAGS:   transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_dithmenos
MARKER: C = lua:fog_machine { cloud_type = "black smoke", \
                              pow_min = 10, pow_max = 20, \
                              delay = 100, size = 1, walk_dist = 1 }
: interest_check(_G)
MAP
...
.C.
...
ENDMAP

# Reflect upon the darkness, mortal.
NAME:   grunt_dithmenos_smoke_and_mirrors
TAGS:   uniq_altar_dithmenos temple_overflow_1 temple_overflow_dithmenos
TAGS:   transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_dithmenos
KFEAT:  O = .
MARKER: O = lua:fog_machine { cloud_type = "black smoke", \
                              pow_min = 25, pow_max = 25, \
                              delay = 30, size = 1, walk_dist = 0 }
: interest_check(_G)
MAP
  b@b
 b.O.b
b.b.b.b
@O.C.O@
b.b.b.b
 b.O.b
  b@b
ENDMAP

NAME:  grunt_dithmenos_shadows
TAGS:  uniq_altar_dithmenos temple_overflow_1 temple_overflow_dithmenos decor
DEPTH: D:4-
KFEAT: C = altar_dithmenos
{{
  if you.absdepth() >= 14 then
     mons("shadow")
  else
     local imp_weight = 9 - you.absdepth()
     if imp_weight > 0 then
         local phantom_weight = 9 - imp_weight
         mons("phantom w:" .. phantom_weight ..
              " / shadow imp w:" .. imp_weight)
     else
         mons("shadow imp")
     end
  end
}}
: interest_check(_G)
MAP
ccccc
c.C.c
c.1.c
c...c
cc+cc
ENDMAP

NAME: nicolae_dithmenos_the_darkroom
TAGS: temple_overflow_dithmenos temple_overflow_1 uniq_altar_dithmenos
TAGS: decor transparent
DEPTH: D:4-
KFEAT: _ = altar_dithmenos
MARKER: ' = lua:fog_machine { cloud_type = "black smoke", pow_min = 30, \
   pow_max = 50, delay_min = 50, delay_max = 90, size = 1, walk_dist = 1, \
   spread_rate = 10 }
: interest_check(_G)
MAP
xxxx@@@xxxx
xxx.....xxx
xx'.....'xx
x.........x
@.........@
@...._....@
@.........@
x.........x
xx'.....'xx
xxx.....xxx
xxxx@@@xxxx
ENDMAP

NAME: nicolae_dithmenos_shadow_blocks
TAGS: temple_overflow_dithmenos temple_overflow_1 uniq_altar_dithmenos
TAGS: decor transparent
DEPTH: D:2-
COLOUR: s' = magenta, c = white
TILE: c = dngn_stone_wall_white
TILE: s = dngn_stone_dark
FTILE: 's_ = floor_pebble_darkgray
KFEAT: cs = stone_wall
KFEAT: _ = altar_dithmenos
: interest_check(_G)
MAP
      .....
      ..c..
  .....ccc.....
  .cc..scs..cc.
  .ccs''s''scc.
  ..ss'''''ss..
....'''''''''....
..cs'''''''''sc..
.cccs'''_'''sccc.
..cs'''''''''sc..
....'''''''''....
  ..ss'''''ss..
  .ccs''s''scc.
  .cc..scs..cc.
  .....ccc.....
      ..c..
      .....
ENDMAP

NAME: nicolae_dithmenos_through_a_glass_darkly
TAGS: temple_overflow_dithmenos uniq_altar_dithmenos temple_overflow_1
TAGS: decor transparent
DEPTH: D:2-
COLOUR: x = magenta, m = lightmagenta
TILE: m = dngn_transparent_wall_darkgray
TILE: x = wall_brick_darkgray
KFEAT: _ = altar_dithmenos
: interest_check(_G)
MAP
  ..xxx
 .....xx
...mm..xx
..mm....x
@.m._...x
..mm....x
...mm..xx
 .....xx
  ..xxx
ENDMAP

### Elyvilon overflow altars ##################################################

NAME:   elyvilon_altar_1
TAGS:   uniq_altar_elyvilon temple_overflow_1 temple_overflow_elyvilon
TAGS:   transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_elyvilon
SUBST:  X : T G t 1 2 3
MONS:   plant, bush, fungus
KMASK:  T = no_monster_gen
: interest_check(_G)
MAP
      xx@xx
      x...x
      x.X.x
      x...x
      xx.xx
       x.x
xxxxx xx.xx xxxxx
x...xxx...xxx...x
@.X.....C.....X.@
x...xxx...xxx...x
xxxxx xx.xx xxxxx
       x.x
      xx.xx
      x...x
      x.X.x
      x...x
      xx@xx
ENDMAP

NAME:   elyvilon_altar_3
TAGS:   uniq_altar_elyvilon temple_overflow_1 temple_overflow_elyvilon
TAGS:   no_pool_fixup decor
DEPTH:  D:2-
KFEAT:  C = altar_elyvilon
KMASK:  wW = no_monster_gen
: interest_check(_G)
MAP
       xxxxxxxxxxxxxxx
      xxtttttttttttttxx
      xtttttttttttttttx
      tttttttt.tttttttt
  .....ttttt.....ttttt.....
 .......ttt.......ttt.......
...wWw...t...wWw...t...wWw...
..wwWww.....wwWww.....wwWww..
@.WWtWW.....WWCWW.....WWtWW.@
..wwWww.....wwWww.....wwWww..
...wWw...t...wWw...t...wWw...
 .......ttt.......ttt.......
  .....ttttt.....ttttt.....
      tttttttt.tttttttt
      xtttttttttttttttx
      xxtttttttttttttxx
       xxxxxxxxxxxxxxx
ENDMAP

NAME:   elyvilon_altar_4
TAGS:   uniq_altar_elyvilon temple_overflow_1 temple_overflow_elyvilon
TAGS:   no_monster_gen transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_elyvilon
MONS:   patrolling quokka att:good_neutral
: interest_check(_G)
MAP
xxx.@.xxx
xWW...WWx
xW..t..Wx
....1....
@.t.C.t.@
.........
xW..t..Wx
xWW...WWx
xxx.@.xxx
ENDMAP

NAME:   elyvilon_altar_5
TAGS:   uniq_altar_elyvilon temple_overflow_1 temple_overflow_elyvilon decor
DEPTH:  D:2-
KFEAT:  C = altar_elyvilon
KMASK:  T = no_monster_gen
: interest_check(_G)
MAP
.............
.c.c.c.c.c.c.
.............
...T.....T...
@.....C.....@
...T.....T...
.............
.c.c.c.c.c.c.
.............
ENDMAP


### Fedhas overflow altars ####################################################

NAME:   fedhas_altar_1
TAGS:   uniq_altar_fedhas temple_overflow_1 temple_overflow_fedhas
TAGS:   transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_fedhas
MONS:   plant
: interest_check(_G)
MAP
.....
.1.1.
..C..
.1.1.
.....
ENDMAP

NAME:   fedhas_altar_2
TAGS:   uniq_altar_fedhas temple_overflow_1 temple_overflow_fedhas
TAGS:   transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_fedhas
NSUBST: w = 2:W / *:w
SUBST:  . = ..wW
SUBST:  w = wwwP
: interest_check(_G)
MAP
.....
.www.
.wCw.
.www.
.....
ENDMAP

NAME:   fedhas_altar_3
TAGS:   uniq_altar_fedhas temple_overflow_1 temple_overflow_fedhas
TAGS:   transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_fedhas
NSUBST: b = 1:. / *:1
MONS:   plant w:5 / fungus / nothing w:3
: interest_check(_G)
MAP
@111@
1b1b1
11C11
1b1b1
@111@
ENDMAP

NAME:   fedhas_altar_4
TAGS:   uniq_altar_fedhas temple_overflow_1 temple_overflow_fedhas
TAGS:   decor
DEPTH:  D:2-
KFEAT:  C = altar_fedhas
FTILE:  . = floor_moss
FTILE:  t = floor_moss
: interest_check(_G)
MAP
xxxxxxxxxxxxxxx
xxxtttttttxxxxx
xxtttttttttxxxx
xtttt.ttttttxxx
xtttt.C.ttttttt
xxtttt...ttttt.
xxtttttt......@
xxxxttttttttt..
xxxxxxttttttttx
xxxxxxxtttttttx
xxxxxxxxxxxxxxx
ENDMAP

# The oklob plant may be abusable (if so, remove it).
NAME:    tgw_fedhas
TAGS:    no_item_gen no_monster_gen
TAGS:    temple_overflow_1 temple_overflow_fedhas uniq_altar_fedhas
DEPTH:   Lair, D:2-
KFEAT:   _ = altar_fedhas
KPROP:   xzd3P = no_rtele_into
MONS:    plant, fungus, oklob plant, bush, toadstool col:random
KITEM:   d = fruit / nothing
KFEAT:   d = floor
SUBST:   x = TTPPPPP.
# Only make "oklob behind bushes" situation possible a bit deeper.
: if you.absdepth() > 5 then
SHUFFLE: PQR
SUBST:   Q = 114, R = 11124
: end
SUBST:   P = 112
SUBST:   z = .
SHUFFLE: ...", TU
SUBST:   T = xt, U = xx
SUBST:   " = .....5
COLOUR:  . = green / none
COLOUR:  ' = green

MAP
ccccccccccccccccccccccc
cxxxxxxxxxxxxxxxxxxxxxc
cxxxxxxxxxxxxxxPxxd3xxc
cxxxxxxxxxxxxxxPddddxxc
cxxxxxxxxxxxxxxPPPxzdxc
cxxxxxxx.......xxPPxxxc
cxxxxxx..ww.ww..xxPPxxc
cxxxxx..www.www..xxxPxc
cxxxx..wwww.wwww..xxxxc
cxxxx.wwwww.wwwww.xxxxc
cxxxx.wwww'''wwww.xxxxc
cxxxx.wwww'_'wwww.xxxxc
cxxxx.wwww'''wwww.xxxxc
cxxxx.wwwwwwwwwww.xxxxc
cxxxx..wwwwwwwww..xxxxc
cxxxxx..wwwwwww..xxxxxc
cxxxxxx..wwwww..xxxxxxc
cxxxxxxx.......xxxxxxxc
cxxxxxxxxxc.cxxxxxxxxxc
cxxxxxxxxxc.cxxxxxxxxxc
ccccccccccc@ccccccccccc
ENDMAP

NAME:  fedhas_ov_isle_minmay
TAGS:  temple_overflow_1 temple_overflow_fedhas uniq_altar_fedhas no_monster_gen
TAGS:  transparent
DEPTH: D:2-9
MONS:  plant / bush w:5
KPROP: 1_ = no_rtele_into
SUBST: 1 = 111t...
KFEAT: _ = altar_fedhas
MAP
     .....
   ...www...
  ..wwwwwww..
 ..wwwwwwwww..
 .wwwwwwwwwww.
..wwww111wwww..
.wwww11111wwww.
.wwww11_11wwww.
.wwww11111wwww.
..wwww111wwww..
 .wwwwwwwwwww.
 ..wwwwwwwww..
  ..wwwwwww..
   ...www...
     .....
ENDMAP

NAME:   fedhas_altar_fruit_tree
TAGS:   uniq_altar_fedhas temple_overflow_1 temple_overflow_fedhas
TAGS:   no_item_gen no_rotate no_vmirror decor
DEPTH:  D:2-
NSUBST: g = 4:f/*:.
NSUBST: f = 4:A/*:.
NSUBST: w = 2:4 / *:w
KFEAT:  C = altar_fedhas
KFEAT:  A = .
KITEM:  A = fruit
FTILE:  .tfCA = floor_moss
FTILE:  d = floor_hall
COLOUR: fd = brown
COLOUR: AC. = green
: interest_check(_G)
MAP
xxxxxxxxxxxxxxxxx
xtttttttttttttttx
xtttttttttttttttx
xttttttgfgttttttx
xtttttgf.fgtttttx
xttttgf.f.fgttttx
xtttgf..C..fgtttx
xtttgf.f.f.fgtttx
xttgfffffffffgttx
xttgt.......tgttx
xttttttdddttttttx
xttttttdddttttttx
xtttttdd@ddtttttx
ENDMAP

NAME:  fedhas_bush_and_centaur_altar
TAGS:  temple_overflow_1 temple_overflow_fedhas uniq_altar_fedhas
TAGS:  transparent
DEPTH: D:3-15
KFEAT: _ = altar_fedhas
MONS:  centaur, bush
: interest_check(_G)
MAP
......
.2222..
.21222.
.22_22.
...22..
.222..
ENDMAP

NAME:   fedhas_altar_decomposition
TAGS:   uniq_altar_fedhas temple_overflow_1 temple_overflow_fedhas
TAGS:   no_item_gen no_monster_gen no_trap_gen
DEPTH:  D:6-13
MONS:   bush, plant, necrophage, zombie
KFEAT:  _ = altar_fedhas
FTILE:  '!12@ = floor_moss
COLOUR: '!@ = green
: if you.race() ~= "Mummy" and you.race() ~= "Ghoul"
:   and you.race() ~= "Vampire"
: then
MARKER:  ! = lua:message_at_spot("Fedhas urges you to decompose the vile \
                                 beasts imprisoned behind the altar.", \
                                 "god")
: end
NSUBST: 3 = 3:3 / 3 = 3 4:25 / 3 = 4 .:25 / *:.
SUBST:  ! = .
KPROP:  .3 = no_rtele_into
MAP
 xxxxxxxxx
xx33...33xx
x33.222.33x
x332111233x
x3321_1233x
x3321'1233x
x3.2x'x2.3x
x3..x'x..3x
xxxxx'xxxxx
   xx!xx
   x2@2x
ENDMAP

### Gozag overflow altars #####################################################

NAME:   grunt_gozag_statues
DEPTH:  D:2-
TAGS:   transparent no_item_gen no_monster_gen no_trap_gen temple_overflow_1
TAGS:   temple_overflow_gozag uniq_altar_gozag
KFEAT:  _ = altar_gozag
TILE:   G = dngn_golden_statue
FTILE:  _-G = floor_limestone
RTILE:  x = wall_sandstone
COLOUR: xG = yellow
: set_feature_name("granite_statue", "golden statue")
: interest_check(_G)
MAP
     @
  xxx-xxx
 xx-----xx
 x-G---G-x
 x-------x
@----_----@
 x-------x
 x-G---G-x
 xx-----xx
  xxx-xxx
     @
ENDMAP

NAME:   grunt_gozag_breadcrumbs
DEPTH:  D:2-
TAGS:   transparent no_item_gen no_monster_gen no_trap_gen temple_overflow_1
TAGS:   temple_overflow_gozag uniq_altar_gozag
KFEAT:  _ = altar_gozag
ITEM:   gold q:1
KITEM:  e = gold q:1
TILE:   G = dngn_golden_statue
FTILE:  _-Ge = floor_limestone
RTILE:  x = wall_sandstone
COLOUR: xG = yellow
: set_feature_name("granite_statue", "golden statue")
: interest_check(_G)
MAP
        xxxxx
.@......x-eGx
@d.d.d.d-e-_x
.@......x-eGx
        xxxxx
ENDMAP

NAME:   grunt_gozag_potion_petition
DEPTH:  D:2-
TAGS:   transparent no_item_gen no_monster_gen no_trap_gen temple_overflow_1
TAGS:   temple_overflow_gozag uniq_altar_gozag
WEIGHT: 5
KFEAT:  _ = altar_gozag
KFEAT:  O = general shop name:Gozag type:Nutrition suffix:Petition greed:100 \
        use_all ; potion of porridge | potion of blood q:4
TILE:   G = dngn_golden_statue
FTILE:  _-GO = floor_limestone
RTILE:  x = wall_sandstone
COLOUR: xG = yellow
: set_feature_name("granite_statue", "golden statue")
: interest_check(_G)
MAP
  xxxxxxx
 xx--_--xx
 x-G---G-x
 x---O---x
  @-----@
   @ @ @
ENDMAP

NAME:  nicolae_gozag_cash_rules_everything_around_me
TAGS:  temple_overflow_gozag temple_overflow_1 uniq_altar_gozag \
       no_hmirror no_vmirror no_rotate no_item_gen transparent decor
DEPTH: D:2-
KFEAT: _ = altar_gozag
: interest_check(_G)
MAP
bbb@bbb
b....$b
b.b.bbb
b.._..b
bbb.b.b
b$....b
bbb@bbb
ENDMAP

# No, you probably can't afford any of it.
# You should have thought of that before being poor.
NAME:  nicolae_gozag_zags_fifth_avenue
TAGS:  temple_overflow_gozag temple_overflow_1 uniq_altar_gozag
TAGS:  no_pool_fixup no_item_gen no_monster_gen decor transparent
DEPTH: D:2-
WEIGHT: 5
FTILE: '_TS = floor_limestone
KFEAT: _ = altar_gozag
KFEAT: S = general shop name:Gozag type:Platinum suffix:Reserve count:4 \
        greed:100 ; any weapon randart | any armour randart | any jewellery randart
: interest_check(_G)
MAP
wwwwwww....
w'''''wwww.
w'T'T''''w.
w''S'''_''@
w'T'T''''w.
w'''''wwww.
wwwwwww....
ENDMAP

NAME:  nicolae_gozag_seed_capital
TAGS:  temple_overflow_gozag temple_overflow_1 uniq_altar_gozag decor
TAGS:  transparent no_item_gen
DEPTH: D:2-
ITEM:  gold q:1 / gold q:2
KFEAT: _ = altar_gozag
: interest_check(_G)
MAP
ddd
d_d
ddd
ENDMAP

### Kikubaaqudgha overflow altars #############################################

NAME:   lemuel_zombie_altar_kikubaaqudgha
DEPTH:  D:2-, Crypt
TAGS:   no_pool_fixup uniq_zombie_altar no_monster_gen temple_overflow_1
TAGS:   temple_overflow_kikubaaqudgha
KFEAT:  _ = altar_kikubaaqudgha
MONS:   rat zombie / bat zombie / nothing w:90
: interest_check(_G)
MAP
xxxxxxxxxxxxxxxx
xxxxwwwwwwwwxxxx
xxxx11111111xxxx
@............._x
xxxx11111111xxxx
xxxxwwwwwwwwxxxx
xxxxxxxxxxxxxxxx
ENDMAP

NAME:   lemuel_mausoleum_altar_kikubaaqudgha
TAGS:   uniq_altar_kikubaaqudgha temple_overflow_1
TAGS:   temple_overflow_kikubaaqudgha uniq_mausoleum_altar
DEPTH:  D:7-, Crypt
MONS:   w:50 human zombie/orc zombie/elf zombie/w:5 ogre zombie/w:5 troll zombie
MONS:   w:50 human skeleton/orc skeleton/elf skeleton/w:5 ogre skeleton/\
        w:5 troll skeleton
MONS:   mummy, wight, wraith, necrophage
NSUBST: ? = 1:_ / *:1
SUBST:  1 = 1:25 2 3 4:8 5:7 6:5
KFEAT:  _ = altar_kikubaaqudgha
KMONS:  _ = human zombie
: if you.branch() ~= "D" or you.absdepth() > 14 then
TAGS:   extra
: end
MAP
ccccccccccccccc
c?c?c?c?c?c?ccG
c+c+c+c+c+c+ccc
c............+@
c+c+c+c+c+c+ccc
c?c?c?c?c?c?ccG
ccccccccccccccc
ENDMAP

NAME:   kiku_gazebo_garden_becter
TAGS:   temple_overflow_1 temple_overflow_kikubaaqudgha transparent
DEPTH:  D:2-9
KMONS:  f = w:2 col:darkgrey plant name:withered name_adjective               \
            tile:mons_withered_plant / w:1 col:lightgrey plant name:withered  \
            name_adjective tile:mons_withered_plant
KFEAT:  _ = altar_kikubaaqudgha
SUBST:  ` = f....
COLOUR: c = magenta
COLOUR: i' = brown
COLOUR: " = yellow
TILE:   c = dngn_stone_wall_magenta
FTILE:  '"_ = floor_pebble_yellow
MAP
..````
.ccc`````
.c'c"`````
.c''""````
.c'''"c````
.c'_''cc```
.c'''"c````
.c''""````
.c'c"`````
.ccc`````
..````
ENDMAP

NAME:   kiku_gazebo_pond_becter
TAGS:   temple_overflow_1 temple_overflow_kikubaaqudgha transparent
DEPTH:  D:2-9
KFEAT:  _ = altar_kikubaaqudgha
KMASK:  Ww = no_monster_gen
SUBST:  M = W..
COLOUR: c = magenta
COLOUR: i' = brown
COLOUR: " = yellow
COLOUR: w = green
COLOUR: W = lightgreen
TILE:   c = dngn_stone_wall_magenta
FTILE:  '"_ = floor_pebble_yellow
MAP
..........
.cccccccc.
.c''''cc...
.c'_'""..V.
.c'W""MMM..
.c'"WWWwwM.
.cc".MWwwM.
.cc..MwwwM.
.c...MwwwM.
...V..MMM..
.........
ENDMAP

NAME:   kennysheep_vampire_church
TAGS:   no_monster_gen temple_overflow_1 temple_overflow_kikubaaqudgha
DEPTH:  D:2-9
MONS:   vampire bat / nothing w:7, bat skeleton / bat zombie
KFEAT:  A = altar_kikubaaqudgha
NSUBST: . = 4:2 / 3 = 2. / *:.
{{
local trig_marker = TriggerableFunction:new {
  func="callback.vampire_church_blood",
  repeated = false
}
trig_marker:add_triggerer(DgnTriggerer:new { type = "player_move" })
lua_marker("A", trig_marker)
lua_marker("V", portal_desc { slave_name = "vampire_church_blood" })
}}
MAP
  xxxxxxxxx
  xx.V1V.xx
xxx..1A1..xxx
xx.x.VdV.x.xx
x.V.x...x.V.x
xx.x.x.x.x.xx
x.x.V.x.V.x.x
xx.x.x.x.x.xx
x.V.x.V.x.V.x
xx.x.x.x.x.xx
xxx.V.x.V.xxx
xx.x.x.x.x.xx
xx..x.V.x..xx
xx.x.x.x.x.xx
xxx.V.x.V.xxx
xxxx.....xxxx
xxxxx+++xxxxx
ENDMAP

### Makhleb overflow altars ###################################################

NAME:    demons_altar
DEPTH:   D:3-11, Orc:1-3
TAGS:    no_monster_gen patrolling temple_overflow_1 temple_overflow_makhleb
TAGS:    layout_rooms layout_city layout_open
KFEAT:   _ = altar_makhleb
# Either one type 3 or 4 demon (iron devil or smoke demon) or
# three slow type 5 demons (iron imp).
# The higher demons can only come up in D:9-11.
: if you.absdepth() > 9 then
SHUFFLE: 123
NSUBST:  1 = 1:1 / *:.
NSUBST:  2 = 1:2 / *:.
: end
MONS:    iron devil, smoke demon, iron imp
MAP
xxxxxxxxxxxxxxx
x.............x
x.ll.......ll.x
x.ll..3_3..ll.x
x.ll...3...ll.x
x..ll.....ll..x
x...lll.lll...x
x....llGll....x
x......l......x
x.............x
x.............x
x.............x
x.............x
ENDMAP

NAME:  bloody_makhleb
TAGS:  uniq_altar_makhleb temple_overflow_1 temple_overflow_makhleb
TAGS:  transparent decor
DEPTH: D:2-12, Orc, Vaults
KPROP: . = bloody / nothing
KFEAT: _ = altar_makhleb
KITEM: _ = robe, whip
: interest_check(_G)
MAP
...
._.
...
ENDMAP

NAME:  makhleb_altar_promises_db
TAGS:  uniq_altar_makhleb temple_overflow_1 temple_overflow_makhleb
DEPTH: D:2-
KFEAT: _ = altar_makhleb
MONS:  executioner / balrug / green death / cacodemon / blizzard demon
MONS:  orange demon / ynoxinul / neqoxec / hellwing / smoke demon
: interest_check(_G)
MAP
  ccc
  c1c
cccnccc
c2n_n2c
ccc.ccc
  c.c
  c@c
ENDMAP

NAME:   makhleb_blood_cavern_becter
TAGS:   uniq_altar_makhleb temple_overflow_1 temple_overflow_makhleb
DEPTH:  2-9
: if you.absdepth() < 6 then
: dgn.delayed_decay(_G, '1', 'human corpse')
KMONS:  2 = hound
: else
KMONS:  1 = necrophage
KMONS:  2 = hound skeleton
: end
KFEAT:  _ = altar_makhleb
KPROP:  y' = bloody
TILE:   c = wall_hall
SUBST:  ' = .
SUBST:  y = x
: interest_check(_G)
MAP
  @@@
 x..'.xxx
 xx...'yxx
 xxxx..'yxx
 xxxxxx.'yx
 xxxxxxy'.x
xxxx.'y'.xx
xcc.12'.xx
xcA_'.xxx
xcc..xxx
xxxxxx
ENDMAP

NAME:   makhleb_heckhound_becter
TAGS:   uniq_altar_makhleb temple_overflow_1 temple_overflow_makhleb
TAGS:   no_monster_gen
DEPTH:  D:2-9
KFEAT:  _ = altar_makhleb
KMONS:  _ = hound perm_ench:bleeding
TILE:   c = wall_hall
SUBST:  y = xx.
: interest_check(_G)
MAP
 xxxxx
xxcccxx
xycAcyx
x.._..x
xy...yx
 y...y
  @@@
ENDMAP

NAME:   makhleb_grotto_becter
TAGS:   no_monster_gen temple_overflow_1 temple_overflow_makhleb
DEPTH:  D:2-9
MONS:   iron imp w:1 / shadow imp w:1 / crimson imp
KFEAT:  _ = altar_makhleb
TILE:   c = wall_hall
FTILE:  A_'1 = floor_grey_dirt
SUBST:  ' = .
: interest_check(_G)
MAP
 xxxxx
xxcccxx
xwcAcwx
xww_wwx
xww1wwx
x.w'w.x
xx...xx
 xx+xx
   @
ENDMAP

### Nemelex overflow altars ###################################################

NAME:  nemelex_xobeh_ov_fountains_minmay
TAGS:  temple_overflow_1 temple_overflow_nemelex_xobeh uniq_altar_nemelex_xobeh
TAGS:  transparent decor
KFEAT: _ = altar_nemelex_xobeh
: interest_check(_G)
MAP
U@U
@_@
U@U
ENDMAP

NAME:  nemelex_deck
TAGS:  temple_overflow_1 temple_overflow_nemelex_xobeh uniq_altar_nemelex_xobeh
TAGS:  transparent
KFEAT: _ = altar_nemelex_xobeh
KITEM: _ = plain deck
: interest_check(_G)
MAP
_
ENDMAP

###################################################################
# Nemelex altar (Shiori)
# Perhaps could have different parameters for the two types of clouds,
# and different patterns.
NAME:   nemelex_altar_shiori
DEPTH:  D, Depths, Elf, Vaults
TAGS:   temple_overflow_1 temple_overflow_nemelex_xobeh uniq_altar_nemelex_xobeh
TAGS:   no_pool_fixup no_monster_gen no_item_gen
TAGS:   generate_awake patrolling no_rotate
TAGS:   layout_rooms layout_city layout_open
KPROP:  abcdefghBR' = no_rtele_into
KFEAT:  _ = altar_nemelex_xobeh
SUBST:  b:aa. , a:n. , d:c. , c:nn. , f:ee. , e:nn. , h:g. , g:n.
SUBST:  G:GTUVblw> , C=c
SUBST:  ':.
MARKER: R = lua:fog_machine { cloud_type="flame", walk_dist=1, size=9, \
            pow_max=20, delay=10, buildup_amnt=14, buildup_time=7, \
            spread_rate=3, start_clouds=1 }
MARKER: B = lua:fog_machine { cloud_type="foul pestilence", walk_dist=1, \
            size=9,  pow_max=20, delay=10, buildup_amnt=14, buildup_time=7, \
            spread_rate=3, start_clouds=1 }
KFEAT:  RB = floor
MAP
CCCCCCCC+++CCCCCCCC
Cnnnnnnn...nnnnnnnC
Cnab'ban...ncd'dcnC
Cnb'''bn.G.nd'''dnC
Cn''B''n...n''R''nC
Cnb'''bn...nd'''dnC
Cnab'ban...ncd'dcnC
Cnnnnnnn...nnnnnnnC
CG......._.......GC
Cnnnnnnn...nnnnnnnC
Cnef'fen...ngh'hgnC
Cnf'''fn...nh'''hnC
Cn''R''n...n''B''nC
Cnf'''fn.G.nh'''hnC
Cnef'fen...ngh'hgnC
Cnnnnnnn...nnnnnnnC
CCCCCCCC+++CCCCCCCC
ENDMAP

NAME:    nemelex_dance_club_becter
TAGS:    overflow_altar_nemelex_xobeh transparent
TAGS:    no_rotate no_vmirror no_monster_gen no_item_gen
DEPTH:   D:2-9
: if you.depth() <= 4 then
MONS:    orc ; club
: else
MONS:    ogre ; giant club
: end
MONS:    ooze
KFEAT:   _ = altar_nemelex_xobeh
SHUFFLE:  12_
COLOUR:  12' = random
TILE:    x = wall_pebble_darkgray
MAP
    .....
   ..xxx..
   .xx'xx.
 ...x'1'x...
..xxxx'xxxx..
.xx''x+x''xx.
.x'2'+.+'_'x.
.xx'xx.xx'xx.
..xxx.x.xxx..
 .....x.....
    .xxx.
    .....
ENDMAP

NAME:   nemelex_diamond_rough_becter
TAGS:   overflow_altar_nemelex_xobeh transparent
KFEAT:  _ = altar_nemelex_xobeh
COLOUR: x = lightred
COLOUR: 'b = silver
TILE:   x = wall_pebble_red
TILE:   b = dngn_crystal_white
: interest_check(_G)
: set_feature_name("green_crystal_wall", "wall of white crystal")
MAP
    ...
   ..x..
  ..xxx..
 ..xxbxx..
..xxb'bxx..
.xxb'_'bxx.
..xxb'bxx..
 ..x+b+x..
  ..xxx..
   ..x..
    ...
ENDMAP

NAME:   nemelex_lonely_heart_becter
TAGS:   overflow_altar_nemelex_xobeh transparent
TAGS:   no_rotate no_vmirror no_monster_gen no_item_gen
DEPTH:  D:2-9
MONS:   nothing w:4 / jessica w:1
KFEAT:  _ = altar_nemelex_xobeh
COLOUR: x = lightred
TILE:   x = wall_pebble_red
MAP
  .... ....
 ..xx...xx..
..xxxx.xxxx..
.xx..x+x..xx.
.xx.......xx.
..xx.._..xx..
 ..xx.1.xx..
  ..xx.xx..
   ..xxx..
    .....
ENDMAP

NAME:   nemelex_spade_bored_becter
TAGS:   overflow_altar_nemelex_xobeh transparent
TAGS:   no_rotate no_vmirror no_monster_gen no_item_gen
DEPTH:  D:2-9
KFEAT:  _ = altar_nemelex_xobeh
KFEAT:  o = known shaft trap
NSUBST: ' = 6:o / *:.
TILE:   x = wall_pebble_darkgray
MAP
     .....
    ..xxx..
   ..xx'xx..
  ..xx'''xx..
 ..xx''_''xx..
..xx'''''''xx..
.xx'''''''''xx.
.x'''xxxxx'''x.
.xx'+x.x.x+'xx.
..xxx..x..xxx..
 .....xxx.....
     .....
ENDMAP

### Okawaru overflow altars ###################################################

NAME:    okawaru_metal_pillars_1_2
TAGS:    temple_overflow_1 temple_overflow_okawaru uniq_altar_okawaru
TAGS:    transparent decor
DEPTH:   D:2-10, Orc
WEIGHT:  7
KFEAT:   _ = altar_okawaru
SHUFFLE: v'
SUBST:   ' = .
: interest_check(_G)
MAP
.....
.v'v.
.'_'.
.v'v.
.....
ENDMAP

NAME:   okawaru_metal_pillars_3
TAGS:   temple_overflow_1 temple_overflow_okawaru uniq_altar_okawaru
TAGS:   transparent decor
DEPTH:  D:2-10, Orc
WEIGHT: 3
KFEAT:  _ = altar_okawaru
MAP
.......
...v...
..v.v..
.v._.v.
..v.v..
...v...
.......
ENDMAP

NAME:   okawaru_trees_1
TAGS:   temple_overflow_1 temple_overflow_okawaru uniq_altar_okawaru
TAGS:   transparent decor
DEPTH:  D:2-10
WEIGHT: 5
KFEAT:  _ = altar_okawaru
: interest_check(_G)
MAP
.........
.v.t.t.v.
.........
.t.t.t.t.
...._....
.t.t.t.t.
.........
.v.t.t.v.
.........
ENDMAP

NAME:   okawaru_trees_2
TAGS:   temple_overflow_1 temple_overflow_okawaru uniq_altar_okawaru
TAGS:   transparent decor
DEPTH:  D:2-10
WEIGHT: 5
KFEAT:  _ = altar_okawaru
: interest_check(_G)
MAP
...........
.v...t...v.
....t.t....
...t.t.t...
..t.t.t.t..
.t.t._.t.t.
..t.t.t.t..
...t.t.t...
....t.t....
.v...t...v.
...........
ENDMAP

NAME:  okawaru_ov_weapons_minmay
TAGS:  temple_overflow_1 temple_overflow_okawaru uniq_altar_okawaru
TAGS:  transparent decor
ITEM:  hand axe, falchion, mace, spear
KFEAT: _ = altar_okawaru
: interest_check(_G)
MAP
   .....
  ...v...
 ...vvv...
...........
..v.e.f.v..
.vv.._..vv.
..v.d.g.v..
...........
 ...vvv...
  ...v...
   .....
ENDMAP

NAME:  okawaru_altar_gauntlet_db
TAGS:  uniq_altar_okawaru temple_overflow_1 temple_overflow_okawaru
DEPTH: D:2-9
KFEAT: _ = altar_okawaru
MONS:  goblin; stone q:5 / hobgoblin; stone q:5 / gnoll; stone q:5 /\
       orc; stone q:5 / kobold; stone q:5
MAP
  xxx
xxx_xxx
x1w.wxx
xxw.w1x
x1w.wxx
xxw.w1x
x1w.wxx
xxw.w1x
xxx+xxx
ENDMAP

NAME:   okawaru_gym_becter
TAGS:   uniq_altar_okawaru temple_overflow_1 temple_overflow_okawaru
TAGS:   transparent decor
DEPTH:  D:2-9
KFEAT:  _ = altar_okawaru
MAP
   .....
 .........
 .vv...vv.
..v.....v..
....._.....
..v.....v..
 .vv...vv.
 .........
   .....
ENDMAP

NAME:    okawaru_humans
TAGS:    uniq_altar_okawaru temple_overflow_1 temple_overflow_okawaru
TAGS:    no_monster_gen no_wall_fixup transparent
DEPTH:   D:7-12
COLOUR:  1 = yellow, ' = yellow, x = white
MONS:    human ; long sword . ring mail
FTILE:   1'xO = floor_sandstone
RTILE:   x = wall_tomb
KFEAT:   _ = altar_okawaru
: interest_check(_G)
MAP
.........
.xxxxxxx.
.x1'_'1x.
.x'''''x.
.x'x'x'x.
.xGx'xGx.
.xxx'xxx.
....'....
ENDMAP

### Qazlal overflow altars ####################################################

# There's always a safe path to the altar.
NAME:   grunt_qazlal_clouds
DEPTH:  D:2-
TAGS:   transparent no_monster_gen no_item_gen no_trap_gen temple_overflow_1
TAGS:   temple_overflow_qazlal uniq_altar_qazlal
KFEAT:  _ = altar_qazlal
MARKER:  L = lua:fog_machine { cloud_type = "flame", \
                               pow_min = 5, pow_max = 7, delay_min = 55, \
                               delay_max = 75, size = 1, walk_dist = 0, \
                               spread_rate = 0, excl_rad = 0 }
MARKER:  M = lua:fog_machine { cloud_type = "freezing vapour", \
                               pow_min = 5, pow_max = 7, delay_min = 55, \
                               delay_max = 75, size = 1, walk_dist = 0, \
                               spread_rate = 0, excl_rad = 0 }
MARKER:  N = lua:fog_machine { cloud_type = "sparse dust", \
                               pow_min = 5, pow_max = 7, delay_min = 55, \
                               delay_max = 75, size = 1, walk_dist = 0, \
                               spread_rate = 0 }
# not a storm cloud - it would be too noisy
MARKER:  O = lua:fog_machine { cloud_type = "rain", \
                               pow_min = 5, pow_max = 7, delay_min = 55, \
                               delay_max = 75, size = 1, walk_dist = 0, \
                               spread_rate = 0 }
SHUFFLE: LMNO
KPROP:   LMNO- = no_rtele_into
KFEAT:   - = .
: interest_check(_G)
MAP
ccc@ccc
cL-.-Mc
c-...-c
@.._..@
c-...-c
cN-.-Oc
ccc@ccc
ENDMAP

NAME:   grunt_qazlal_sundering
DEPTH:  D:2-
TAGS:   no_monster_gen no_item_gen no_trap_gen temple_overflow_1
TAGS:   temple_overflow_qazlal uniq_altar_qazlal
KFEAT:  _ = altar_qazlal
KPROP:  c = no_rtele_into
SUBST:  c = cccl^.
SUBST:  - = ..l^
KFEAT:  ^ = known shaft trap
KITEM:  . = nothing w:189 / stone / large rock q:1 w:1
KFEAT:  . = .
: interest_check(_G)
MAP
 ----@----
-ccc-.-ccc-
-ccc-.-ccc-
-ccc-.-ccc-
-----.-----
@...._....@
-----.-----
-ccc-.-ccc-
-ccc-.-ccc-
-ccc-.-ccc-
 ----@----
ENDMAP

NAME:  nicolae_qazlal_eye_of_the_storm
TAGS:  temple_overflow_qazlal temple_overflow_1 uniq_altar_qazlal
TAGS:  no_trap_gen no_item_gen no_monster_gen
DEPTH: D:2-
KPROP: 'd = no_rtele_into
KMONS: d = diamond obelisk
KFEAT: _ = altar_qazlal
: interest_check(_G)
MAP
     ccccc
   ccc'''ccc
  cc'''''''cc
 cc'''''''''cc
 c'''''''''''c
cc'''''''''''cc
@nnnnnn'''''''c
@...._nd''''''c
@nnnnnn'''''''c
cc'''''''''''cc
 c'''''''''''c
 cc'''''''''cc
  cc'''''''cc
   ccc'''ccc
     ccccc
ENDMAP

NAME:    nicolae_qazlal_style_of_elements
TAGS:    temple_overflow_qazlal temple_overflow_1 uniq_altar_qazlal
TAGS:    no_trap_gen no_item_gen no_monster_gen
DEPTH:   D:2-
SHUFFLE: faew
KPROP:   faew = no_rtele_into
KMONS:   f = fire elemental
KMONS:   a = air elemental
KMONS:   e = earth elemental
KMONS:   w = water elemental
KFEAT:   _ = altar_qazlal
KFEAT:   f = lava
KFEAT:   w = deep_water
MARKER:  a = lua:fog_machine { cloud_type = "thin mist", \
                               pow_min = 100, pow_max = 100, delay = 1, \
                               size = 1, walk_dist = 0, start_clouds = 1 }
MARKER:  e = lua:fog_machine { cloud_type = "sparse dust", \
                               pow_min = 100, pow_max = 100, delay = 1, \
                               size = 1, walk_dist = 0, start_clouds = 1 }
: interest_check(_G)
MAP
ccc.@.ccc
cfn...nac
cnn...nnc
.........
...._....
.........
cnn...nnc
cwn...nec
ccc...ccc
ENDMAP

# general_overflow_altar cannot contain the power of Qazlal
NAME:    nicolae_qazlal_general_emergency
TAGS:    temple_overflow_qazlal temple_overflow_1 uniq_altar_qazlal
TAGS:    no_monster_gen no_pool_fixup
DEPTH:   D:2-
SHUFFLE: xXY / xXY / xXY / abc
SHUFFLE: XY
SUBST:   z = w.., X = +++w., Y = xxxxw., x = wxxx, a = w, b = w, c = w
SHUFFLE: ABCD
SUBST:   A = >, C = .GTU, D = .
KFEAT:   B = altar_qazlal
SHUFFLE: wll
: interest_check(_G)
MAP
...........z.
.z...z.zzz...
..zz.z.wwwz..
..wxXYYxwwz..
.zwwwwwwxwz..
zwwxwABwxz...
zwwxwCDwx..z.
.zzxwwwwx.z..
...xxxwxxwz..
.z...zwwwz...
...z..zzz....
...........z.
ENDMAP

### Sif Muna overflow altars ##################################################

NAME:   lemuel_blue_sif_altar
DEPTH:  D:2-, Elf, Vaults
TAGS:   no_monster_gen temple_overflow_1 temple_overflow_sif_muna
TAGS:   uniq_altar_sif_muna decor
COLOUR: . = blue
FTILE:  . = floor_hall, C = floor_hall, @ = floor_hall, + = floor_hall
KFEAT:  _ = altar_sif_muna
: interest_check(_G)
MAP
xxxxxxxxxxxxxx
...........xxx
@..........+_x
...........xxx
xxxxxxxxxxxxxx
ENDMAP

NAME:       tgw_sif
DEPTH:      D:3-, Elf
TAGS:       no_item_gen no_monster_gen no_pool_fixup decor
TAGS:       temple_overflow_1 temple_overflow_sif_muna uniq_altar_sif_muna
KFEAT:      _ = altar_sif_muna
MONS:       orc wizard w:15 / Jessica / Blork the orc
NSUBST:     M = 1:1 / *:"
SUBST:      ' : "'., ' = ''.
COLOUR:     . = blue
SUBST:      ' = ., " = .
: interest_check(_G)
MAP
        xx@xx
        x...x
        x...x
      xxx...xxx
     xx'''''''xx
    xx'''...'''xx
    x'''.www.'''x
   xx''.wwwww.''xx
   x''.wwM"Mww.''x
   x''.wwM>Mww.''x
   x''.wwMMMww.''x
   xx''.wwwww.''xx
    x'''.www.'''x
    xx'''...'''xx
     xx'''''''xx
      xxx...xxx
        x._.x
        x...x
        xxxxx
ENDMAP

NAME:   led_sif_book
DEPTH:  D:3-12, Orc
TAGS:   no_item_gen no_pool_fixup no_monster_gen
TAGS:   temple_overflow_1 temple_overflow_sif_muna uniq_altar_sif_muna
KPROP:  1d = no_rtele_into
KFEAT:  _ = altar_sif_muna
KFEAT:  d = escape_hatch_down
KITEM:  d = randbook owner:Sif_Muna numspells:1 slevels:1
MONS:   orc wizard
COLOUR: .@+1 = blue
FTILE:  .@+1G_ = floor_marble
: interest_check(_G)
MAP
xxxxxxxxx
xbbbbx..xx
x1w..xG..x
xdw..+._.@
x1w..xG..x
xbbbbx..xx
xxxxxxxxx
ENDMAP

NAME:   led_sif_pool
DEPTH:  D:2-9
TAGS:   no_item_gen no_monster_gen no_pool_fixup
TAGS:   temple_overflow_1 temple_overflow_sif_muna uniq_altar_sif_muna
KFEAT:  _ = altar_sif_muna
COLOUR: . = blue
FTILE:  ._ = floor_marble
: interest_check(_G)
MAP
 xxx@xxx
 xxx+xxx
xxWW.WWxx
xWWW.WWWx
xWW...WWx
xWW._.WWx
xWW...WWx
xWWWWWWWx
xxWWWWWxx
 xxxxxxx
ENDMAP


### Trog overflow altars ######################################################

NAME:  bloody_trog
TAGS:  uniq_altar_trog temple_overflow_1 temple_overflow_trog
TAGS:  transparent decor
DEPTH: D:2-12, Orc, Vaults
KPROP: . = bloody / nothing
KFEAT: _ = altar_trog
KITEM: _ = animal skin, dagger
: interest_check(_G)
MAP
...
._.
...
ENDMAP

NAME:   trog_ov_bears_minmay
TAGS:   temple_overflow_1 temple_overflow_trog uniq_altar_trog
TAGS:   transparent
DEPTH:  D:6-
: if you.absdepth() < 10 then
MONS:   black bear
: else
MONS:   polar bear
: end
MONS:   bush
NSUBST: ' = 2:2 / 2=2. / *=.
KFEAT:  _ = altar_trog
MAP
.....
.'''.
.1_1.
.'''.
.....
ENDMAP

NAME:   tgw_trog
TAGS:   no_item_gen no_monster_gen patrolling
TAGS:   temple_overflow_1 temple_overflow_trog uniq_altar_trog
DEPTH:  D:2-9
KFEAT:  _ = altar_trog
KPROP:  1 = no_rtele_into
MONS:   moth of wrath, rat / worm w:5
ITEM:   any weapon
NSUBST: M = 4:d / *:.
SUBST:  + = +....
KFEAT:  o = iron_grate
MAP
      xxxxxxx
     xxxMMMxxx
    xxMMM2MMMxx
   xxMM22_22MMxx
   xx.........xx
   x....ooo....x
   x...oo1oo...x
   x....ooo....x
   x...........x
   xx.........xx
    xx.......xx
     xxxx+xxxx
       xx@xx
ENDMAP

NAME:   trog_eyes_of_draining
TAGS:   uniq_altar_trog temple_overflow_1 temple_overflow_trog patrolling
DEPTH:  D:3-9
WEIGHT: 4
MONS:   eye of draining
: if you.absdepth() > 5 and crawl.coinflip() then
KMONS:  2 = ogre god:trog ; giant club ego:antimagic ident:type | w:3 giant club / \
        ogre god:trog ; giant spiked club ego:antimagic ident:type | w:5 giant spiked club / \
        orc warrior god:trog ; halberd ego:antimagic ident:type | war axe ego:antimagic ident:type | \
        flail ego:antimagic ident:type | great mace ego:antimagic ident:type | any weapon / \
        big kobold god:trog ; short sword ego:antimagic ident:type | dagger ego:antimagic ident:type | \
        cutlass ego:antimagic ident:type | cutlass
: else
KMONS:  2 = orc god:trog ; spear ego:antimagic ident:type | hand axe ego:antimagic ident:type | \
        war axe ego:antimagic ident:type | any weapon / \
        kobold god:trog ; short sword ego:antimagic ident:type | hand axe ego:antimagic ident:type | \
        club ego:antimagic ident:type | whip ego:antimagic ident:type | any weapon / \
        goblin god:trog ; dagger ego:antimagic ident:type | short sword ego:antimagic ident:type / \
        gnoll god:trog ; spear ego:antimagic ident:type | trident ego:antimagic ident:type | \
        halberd ego:antimagic ident:type | whip ego:antimagic ident:type | halberd | any weapon
: end
KFEAT:  _ = altar_trog
NSUBST: 1 = 1:1 / 1 = 1. / 1 = 1.. / *:.
MAP
  xxxxx
 xx111xx
xx11_11xx
x112.211x
x.......x
x.G...G.x
xx.....xx
 xx@@@xx
ENDMAP

NAME:   trog_butcher_becter
TAGS:   overflow_altar_trog
DEPTH:  D:2-9, Orc:1-3
: if you.absdepth() < 6 then
MONS:   orc ; hand axe . animal skin
MONS:   giant gecko / rat / giant newt / quokka
{{
  dgn.delayed_decay(_G, 'd',
                    'giant gecko chunk q:1 / rat chunk q:1 / ' ..
                    'giant newt chunk q:1 / quokka chunk q:1')
}}
: else
MONS:   orc warrior ; war axe . animal skin
MONS:   sheep / iguana / worker ant
{{
  dgn.delayed_decay(_G, 'd',
                    'sheep chunk q:1 / iguana chunk q:1 / ' ..
                    'worker ant chunk q:1')
}}
: end
NSUBST: ' = 3:2 / *:.
KPROP:  1y" = bloody
KFEAT:  _ = altar_trog
KFEAT:  ^ = known shaft trap
KFEAT:  m = iron_grate
SUBST:  y = x
SUBST:  " = .
MAP
  xxxxxxx
 xx'''''xx
xx.xxxxxxxx
xx+xmmmx^yx
xx.."1d""yx
xx..._"..xx
 xx.....xx
  xx...xx
     @
ENDMAP

NAME:   trog_hazing_becter
TAGS:   overflow_altar_trog no_monster_gen no_item_gen no_pool_fixup
DEPTH:  D:2-9, Orc:1-3
MONS:   goblin ; stone q:5 . animal skin / \
        hobgoblin ; stone q:5 . animal skin / \
        kobold ; stone q:5 | throwing net q:1 . animal skin
ITEM:   stone
NSUBST: T = 6:1 / *:.
SUBST:  . = d....
KFEAT:  _ = altar_trog
KFEAT:  m = iron_grate
: interest_check(_G)
MAP
  xxxxx
 xxmmmxx
xx.._..xx
xTw...wTx
xTWw.wWTx
xTTw.wTTx
xxTw.wTxx
 xxx.xxx
  xx@xx
ENDMAP

NAME:   trog_three_pillars_becter
TAGS:   overflow_altar_trog transparent decor
DEPTH:  D:2-9
KFEAT:  _ = altar_trog
SUBST:  y = x..
SUBST:  z = xx.
MAP
 ..........
.......yy..
..yy..zxxy.
.yxxz.xbxy.
.yxb...xxy.
.yxx._.....
.......xy..
.....zbxy..
   ..yxxy..
   ...yy...
    ......
ENDMAP

### Vehumet overflow altars ###################################################

# Rather than put the flame cloud on the altar, flames now surround the
# altar, and the maximum delay between flames has gone away. Thus, standing
# on the altar properly is safe, and a cautious player can time their entrance
# to take no damage.
NAME:   fiery_altar_vehumet
DEPTH:  D:2-10, Orc:1-3
WEIGHT: 8
TAGS:   temple_overflow_1 temple_overflow_vehumet
MARKER: : = lua:fog_machine { cloud_type = "flame", \
               pow_min = 6, pow_max = 8, delay_min = 55, delay_max = 75, \
               size = 2, walk_dist = 0, spread_rate= 0 }
KFEAT:  _ = altar_vehumet
: interest_check(_G)
MAP
.....
.:.:.
.._..
.:.:.
.....
ENDMAP

NAME:    vehumet_statue
DEPTH:   D:4-10
TAGS:    temple_overflow_1 temple_overflow_vehumet transparent
SHUFFLE: 12
MONS:    statue name:charred name_adjective tile:mons_statue_mage \
             hp:12 hd:3 spells:throw_flame
MONS:    statue name:frost-covered name_adjective tile:mons_statue_mage \
             hp:12 hd:3 spells:throw_frost
KFEAT:   _ = altar_vehumet
MAP
...........
.bbbbbbbbb.
.b.......b.
.b.1._.....
.b.......b.
.bbbbbbbbb.
...........
ENDMAP

NAME:    vehumet_crystals
DEPTH:   D:2-10, Orc:1-3
TAGS:    temple_overflow_1 temple_overflow_vehumet transparent
KFEAT:   _ = altar_vehumet
: interest_check(_G)
MAP
.........
..b...b..
.bbb.bbb.
..b...b..
...._....
..b...b..
.bbb.bbb.
..b...b..
.........
ENDMAP

NAME:  vehumet_altar_wand_db
TAGS:  uniq_altar_vehumet temple_overflow_1 temple_overflow_vehumet
TAGS:  transparent patrolling
DEPTH: D:2-9
KFEAT: _ = altar_vehumet
MONS:  goblin; wand of flame | wand of frost | wand of magic darts /\
       hobgoblin; wand of flame | wand of frost | wand of magic darts /\
       kobold; wand of flame | wand of frost | wand of magic darts
MAP
.......
...x...
...1...
.x._.x.
.......
...x...
.......
ENDMAP

### Xom overflow altars #######################################################

NAME:   tgw_xom
DEPTH:  D:2-, Depths
TAGS:   no_item_gen no_monster_gen temple_overflow_1 temple_overflow_xom
TAGS:   uniq_altar_xom
KFEAT:  _ = altar_xom
MONS:   orc; club ego:chaos / orc; dagger ego:chaos / orc; spear ego:chaos
MONS:   gnoll; club ego:chaos / gnoll; dagger ego:chaos / gnoll; spear ego:chaos
MONS:   place:D:1-8
NSUBST: ' = 1:_ / *:.
SUBST:  . = .:200 ~:10 W:60 w:50 x:80 n:80 v b l Z T U M:20
KFEAT:  ~ = shaft trap / teleport trap / alarm trap w:3
NSUBST: Z = 1:* / *:%
SUBST:  M : 123333M, 1 = 1.., 2 = 2.., M = 123.
COLOUR: . = random
MAP
   xxxxxx@xxxxxx
  xx...........xx
 xx.............xx
xx...............xx
x.................x
x.................x
x'...............'x
x'...............'x
xx'.............'xx
 xx'''''''''''''xx
  xx'''''''''''xx
   xxxxxxxxxxxxx
ENDMAP

NAME:    xom_teletrap_fun
TAGS:    temple_overflow_1 temple_overflow_xom uniq_altar_xom
TAGS:    transparent
KFEAT:   _ = altar_xom
NSUBST:  T = . / T
KFEAT:   T = known teleport trap
MAP
.....
.TTT.
.T_T.
.TTT.
.....
ENDMAP

NAME:    xom_butterflies
TAGS:    temple_overflow_1 temple_overflow_xom transparent
KFEAT:   _ = altar_xom
KITEM:   _ = wand of random effects w:40 / any wand
COLOUR:  . = random
SUBST:   . = 11.
MONS:    butterfly
: interest_check(_G)
MAP
...
._.
...
ENDMAP

NAME:    xom_shifter_show
TAGS:    temple_overflow_1 temple_overflow_xom uniq_altar_xom
DEPTH:   D:7-
KFEAT:   _ = altar_xom
FTILE:   ._ = floor_pebble
COLOUR:  . = random
NSUBST:  . = 2:1 / 1:> / .
SUBST:   . = _...
SUBST:   x = bmv
COLOUR:  . = random
MONS:    shapeshifter
MAP
 xxxxxxx
 x.....x
 m.....x
@m.._..x
 m.....x
 x.....x
 xxxxxxx
ENDMAP

NAME:    xom_confusion_cloud
TAGS:    temple_overflow_1 temple_overflow_xom uniq_altar_xom
DEPTH:   D:4-13
KFEAT:   _ = altar_xom
MARKER:  _ = lua:fog_machine { cloud_type = "noxious fumes", \
               pow_min = 6, pow_max = 8, delay_min = 35, delay_max = 55, \
               size = 3, walk_dist = 0, spread_rate= 0 }
SUBST:   . = 1.
SHUFFLE: wW/l.
MONS:    random
MAP
  wwwww
 ww...ww
 w.....w
@W.._..w
 w.....w
 ww...ww
  wwwww
ENDMAP

NAME:    xom_redecorated
TAGS:    temple_overflow_1 temple_overflow_xom uniq_altar_xom decor
SUBST:   x = ccbbbv
NSUBST:  . = 2:T / .
SUBST:   . = lWwtm_~......
KFEAT:   _ = altar_xom
NSUBST:  T = 3:T / .
KFEAT:   T = known teleport trap
KFEAT:   ~ = shaft trap / alarm trap / teleport trap
: interest_check(_G)
MAP
      @
   xxxTxxx
  xx.....xx
 xx.......xx
 x.........x
@T...._....T@
 x.........x
 xx.......xx
  xx.....xx
   xxxTxxx
      @
ENDMAP

NAME:   led_xom_imps
DEPTH:  D:3-5
TAGS:   temple_overflow_1 temple_overflow_xom uniq_altar_xom
KFEAT:  _ = altar_xom
KFEAT:  T = known teleport trap
NSUBST: I = 1:1 / 3:2
MONS: crimson imp ; dagger ego:chaos ident:type, crimson imp ; nothing
MAP
xxxx+xxxx
xIT...TIx
xxx._.xxx
xIT...TIx
xxxx+xxxx
ENDMAP


### Yredelemnul overflow altars ###############################################

NAME:   yredelemnul_altar_generic
TAGS:   uniq_altar_yredelemnul temple_overflow_1 temple_overflow_yredelemnul
TAGS:   transparent decor
DEPTH:  D:2-
KFEAT:  C = altar_yredelemnul
KMONS:  f = w:2 col:darkgrey plant name:withered name_adjective               \
            tile:mons_withered_plant / w:1 col:lightgrey plant name:withered  \
            name_adjective tile:mons_withered_plant
: interest_check(_G)
MAP
.....
.f.f.
..C..
.f.f.
.....
ENDMAP

NAME:   lemuel_zombie_altar_yredelemnul
DEPTH:  D:2-, Crypt
TAGS:   no_pool_fixup uniq_zombie_altar no_monster_gen temple_overflow_1
TAGS:   temple_overflow_yredelemnul
KFEAT:  _ = altar_yredelemnul
MONS:   patrolling gnoll zombie
NSUBST: A = 2:1 / *:.
MAP
xxxxxxxxxxxxxxxx
xxxxAAAAAAAAxxxx
xxxx........xxxx
@............._x
xxxx........xxxx
xxxxAAAAAAAAxxxx
xxxxxxxxxxxxxxxx
ENDMAP

NAME:   lemuel_mausoleum_altar_yredelemnul
TAGS:   uniq_altar_yredelemnul temple_overflow_1 temple_overflow_yredelemnul
TAGS:   uniq_mausoleum_altar decor
DEPTH:  D:7-, Crypt
MONS:   w:50 human zombie/orc zombie/elf zombie/w:5 ogre zombie/w:5 troll zombie
MONS:   w:50 human skeleton/orc skeleton/elf skeleton/w:5 ogre skeleton/\
        w:5 troll skeleton
MONS:   mummy, wight, wraith, necrophage
NSUBST: ? = 1:_ / *:1
SUBST:  1 = 1:25 2 3 4:8 5:7 6:5
KFEAT:  _ = altar_yredelemnul
KMONS:  _ = human zombie
: if you.branch() ~= "D" or you.absdepth() > 14 then
TAGS:   extra
: end
MAP
ccccccccccccccc
c?c?c?c?c?c?ccG
c+c+c+c+c+c+ccc
c............+@
c+c+c+c+c+c+ccc
c?c?c?c?c?c?ccG
ccccccccccccccc
ENDMAP

NAME:   yredelemnul_forgotten_temple_becter
TAGS:   temple_overflow_1 temple_overflow_yredelemnul no_monster_gen no_item_gen
DEPTH:  D:2-9
KFEAT:  _ = altar_yredelemnul
KFEAT:  . = known web trap / .
KMONS:  _ = spectral orc
MAP
xxxxxxxxx
xcccccccx
xc.._..cx
xcc...ccx
xc.....cx
xcc...ccx
xxcc+ccxx
 xxx@xxx
ENDMAP

### Zin overflow altars #######################################################

NAME:   zin_angel
TAGS:   no_item_gen no_monster_gen temple_overflow_1 temple_overflow_zin decor
DEPTH:  D:2-
KFEAT:  _ = altar_zin
KPROP:  1 = no_rtele_into
COLOUR: G = lightgray
COLOUR: c = white
TILE:   c = wall_church
FTILE: _.G1m+ = floor_limestone
MONS:   angel god:zin dbname:zin_angel / \
        angel god:zin dbname:zin_angel ; any weapon level:20 ego:holy_wrath ident:type / \
        angel god:zin dbname:zin_angel ; long sword ego:holy_wrath ident:type / \
        angel god:zin dbname:zin_angel ; mace ego:holy_wrath ident:type
: interest_check(_G)
MAP
xxxxxxxxx
xcccccccx
xc1m.._cx
xcmm...cx
xc.....cx
xcG...Gcx
xccc+cccx
    @
ENDMAP

NAME:   zin_treasury
TAGS:   no_item_gen no_monster_gen temple_overflow_1 temple_overflow_zin
DEPTH:  D:2-9, Orc:1-3
KFEAT:  _ = altar_zin
KFEAT:  m = iron_grate
KPROP:  $ = no_rtele_into
COLOUR: c = white
TILE:   c = wall_church
FTILE:  _.m+$ = floor_limestone
: interest_check(_G)
MAP
  xxxxxxx
  xcccccx
 xxc$$$cxx
xxcc$$$ccxx
xccmm$mmccx
xcc.mmm.ccx
xcc.._..ccx
xxc.....cxx
 xccc+cccx
     @
ENDMAP

NAME:   zin_purify
TAGS:   no_item_gen no_monster_gen temple_overflow_1 temple_overflow_zin
TAGS:   transparent
DEPTH:  D:2-9, Orc:1-3
KFEAT:  _ = altar_zin
KFEAT:  v = general shop name:Zin type:Purification suffix:Station count:1 \
        greed:30 ; \
        potion of curing | potion of restore abilities w:1 | \
        potion of cure mutation w:1
COLOUR: c = white
COLOUR: ' = white
TILE:   c = wall_church
FTILE:  Td'_ = floor_limestone
SUBST:  ' = .
: interest_check(_G)
MAP
 .....
..ccc..
.ccTcc.
..c_c..
 .....
...'...
..'v'..
 ..'..
  ...
ENDMAP

NAME:   zin_scriptorium
TAGS:   no_item_gen no_monster_gen temple_overflow_1 temple_overflow_zin
DEPTH:  D:2-9
ITEM:   any scroll
KFEAT:  _ = altar_zin
KFEAT:  m = iron_grate
KPROP:  ? = no_rtele_into
COLOUR: c = white
TILE:   c = wall_church
FTILE:  _.m+d = floor_limestone
NSUBST: ? = 2:d / *:.
MAP
  xxxxxxx
  xcccccx
 xxc???cxx
 xcc???ccx
xxcccmcccxx
xcc.....ccx
xcc.._..ccx
xxc.....cxx
 xccc+cccx
     @
ENDMAP

NAME:   zin_academy
TAGS:   no_item_gen no_monster_gen temple_overflow_1 temple_overflow_zin
TAGS:   transparent
DEPTH:  D:2-9
KFEAT:  _ = altar_zin
COLOUR: c = white
COLOUR: ' = white
TILE:   c = wall_church
FTILE:  _' = floor_limestone
SUBST:  ' = .
MAP
  ccccccc
ccc.ttttccc
c.tt'_'t..c
....'''....
...........
...'''''...
 .........
   .....
ENDMAP

NAME:   zin_statuary
TAGS:   no_item_gen no_monster_gen temple_overflow_1 temple_overflow_zin
TAGS:   transparent
DEPTH:  D:2-9
KFEAT:  _ = altar_zin
COLOUR: c = white
TILE:   c = wall_church
FTILE:  _'+ = floor_limestone
SUBST:  ' = .
MAP
 .......
..ccccc..
.cc'_'cc.
..cc+cc..
...'''...
.G.....G.
 ..G.G..
  .....
ENDMAP


### The Shining One overflow altars ###########################################

# TSO's small temple (1KB)
# Idea stolen from protected_by_tso_3.
NAME:     tso_altar
TAGS:     no_item_gen no_rotate decor
TAGS:     temple_overflow_1 temple_overflow_the_shining_one
TAGS:     uniq_altar_the_shining_one
COLOUR:   _ = yellow
FTILE:    _A = floor_limestone
SUBST:    _ = .
COLOUR:   c = white
TILE:     c = wall_church
KFEAT:    A = altar_the_shining_one
: interest_check(_G)
MAP
  xxxxx
xxxcccxxx
xcccAcccx
xc.___.cx
xct._.tcx
xc.._..cx
xct...tcx
xccc+cccx
ENDMAP

NAME:    tso_metal_star
TAGS:    no_monster_gen no_trap_gen no_pool_fixup no_item_gen decor
TAGS:    temple_overflow_1 temple_overflow_the_shining_one transparent
TAGS:    uniq_altar_the_shining_one
KFEAT:   _ = altar_the_shining_one
SUBST:   ! : vmmTG..
: interest_check(_G)
MAP
          @
          .
         ...
         .v.
        ..v..
       ..vvv..
      ..vv.vv..
     ..vv...vv..
    ..vm..!..mv..
  ...vv..!.!..vv...
@..vvv..!._.!..vvv..@
  ...vv..!.!..vv...
    ..vm..!..+v..
     ..vv...vv..
      ..vv.vv..
       ..vvv..
        ..v..
         .v.
         ...
          .
          @
ENDMAP

NAME:   tso_oasis_becter
TAGS:   temple_overflow_1 temple_overflow_the_shining_one transparent
TAGS:   no_item_gen no_monster_gen
KMONS:  f = plant
SUBST:  ` = ff.
COLOUR: . = yellow
FTILE:  `.Tf = floor_sand
FTILE:  _ = floor_limestone
COLOUR: c = white
TILE:   c = wall_church
KFEAT:  _ = altar_the_shining_one
: interest_check(_G)
MAP
  ....
 ..``....
 .`ww`...
 ..``..c..
......+cc..
..T..cc_cc.
 .....ccc..
   ....c..
     ....
ENDMAP

NAME: nicolae_tso_swordbearing_angel
TAGS: temple_overflow_the_shining_one uniq_altar_the_shining_one
TAGS: temple_overflow_1 decor transparent
DEPTH: D:2-
COLOUR: . = yellow
COLOUR: c = white
FTILE: @._+ = floor_limestone
TILE: c = wall_church
KFEAT: _ = altar_the_shining_one
: interest_check(_G)
MAP
     xxxxx
    xxcccxx
    xcc.ccx
xxxxxc._.cxxxxx
xcccccc.ccccccx
xc...........cx
xcc....v....ccx
xxcc..vvv..ccxx
 xxcc..v..ccxx
  xxcc.v.ccxx
   xxc.v.cxx
    xc.v.cx
    xc.v.cx
    xc...cx
    xcc+ccx
ENDMAP


NAME: nicolae_tso_carved_into_rock
TAGS: temple_overflow_the_shining_one uniq_altar_the_shining_one
TAGS: temple_overflow_1 transparent decor
DEPTH: D:2-
SUBST: X = xxx.
COLOUR: ' = yellow
COLOUR: c = white
TILE: G = dngn_golden_statue
TILE: c = wall_church
FTILE: G'_ = floor_limestone
KFEAT: _ = altar_the_shining_one
: interest_check(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxXXXXxxxxxxxxxxxxx
xxxxxxxXXXXXX....XXXXXXxxxxxxx
xxxxXXX................XXXxxxx
xxXX......................XXxx
xX......XxX........XxX......Xx
X.....XXxxxxcG'''GcxxxXX.....X
.....Xxxxxxxccc'cccxxxxxX.....
@...Xxxxxxxxxc'''cxxxxxxxX...@
..Xxxxxxxxxxxc'_'cxxxxxxxxXX..
XXxxxxxxxxxxxc'''cxxxxxxxxxxXX
xxxxxxxxxxxxxcccccxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME: nicolae_tso_besieged_by_evil
TAGS: temple_overflow_the_shining_one uniq_altar_the_shining_one
TAGS: temple_overflow_1 patrolling transparent no_monster_gen
DEPTH: D:4-9
SUBST: c = ccc' s:2 z:2, + = ++'
NSUBST: ' = 2:s / 2:z / 2:sz'' / *:'
COLOUR: 'sz = yellow / none w:5
COLOUR: c = white
TILE: c = wall_sandstone
FTILE: +'_sz = floor_sandstone / none w:5
KMONS: s = orc skeleton / kobold skeleton / goblin skeleton / hobgoblin zombie
KMONS: z = orc zombie / kobold zombie / goblin zombie / hobgoblin zombie
: if you.absdepth() <= 4 then
KMONS: _ = crimson imp / white imp w:5
: else
KMONS: _ = crimson imp / white imp / shadow imp / iron imp / quasit
: end
KFEAT: _ = altar_the_shining_one
MAP
.............
.............
..cccc.cccc..
..cccc+cccc..
..cc'''''cc..
..cc'''''cc..
...+''_''+...
..cc'''''cc..
..cc'''''cc..
..cccc+cccc..
..cccc.cccc..
.............
.............
ENDMAP

### Multiple god overflow altars ###############################################

# These ones are multiple overflows to specific gods;
# they get tags temple_overflow_N and temple_overflow_<god>.

NAME:    good_gods_temple_1
DEPTH:   D:2-, Depths, Lair
TAGS:    temple_overflow_3 temple_overflow_elyvilon
TAGS:    temple_overflow_zin temple_overflow_the_shining_one
TAGS:    no_monster_gen no_trap_gen uniq_good_god_temple
MONS:    plant
KFEAT:   D = altar_elyvilon
KFEAT:   E = altar_zin
KFEAT:   F = altar_the_shining_one
SHUFFLE: DEF
SUBST:   1 : GTV1
SUBST:   X : GTt
SUBST:   ? : t@
: interest_check(_G)
MAP
  ttttttt
 tt.....tt
tt...E...tt
tt.D...F.tt
tt...1...tt
 tt.....tt
  tt...tt
   ?X@X?
ENDMAP

NAME:    good_gods_mini_temple
DEPTH:   D:2-, Depths, Lair
TAGS:    temple_overflow_3 temple_overflow_elyvilon
TAGS:    temple_overflow_zin temple_overflow_the_shining_one
TAGS:    no_monster_gen no_trap_gen no_pool_fixup uniq_good_god_temple
TAGS:    no_item_gen
MONS:    plant
KFEAT:   D = altar_elyvilon
KFEAT:   E = altar_zin
KFEAT:   F = altar_the_shining_one
: if crawl.coinflip() then
SHUFFLE: x" / t1 / wT / IJ
: else
SUBST:   " : ..x
: end
SUBST:   HI : x
SUBST:   x : xcvb
SUBST:   ' : .
SHUFFLE: EG/'E
SUBST:   J : G
SHUFFLE: DEF
: interest_check(_G)
MAP
 xxxxx
xxxGxxx
xD.E.Fx
xx+++xx
 ""@""
ENDMAP

NAME:  grunt_temple_overflow_champion_of_chaos
DEPTH: D:3-9
TAGS:  temple_overflow_2 temple_overflow_makhleb temple_overflow_xom
TAGS:  no_monster_gen
MONS:  crimson imp ; dagger ego:chaos ident:type
KFEAT: A = altar_makhleb
KFEAT: B = altar_xom
MAP
xxxxx
xA.Bx
x.1.x
x...x
xx+xx
ENDMAP

NAME:  grunt_temple_overflow_growth_and_decay
DEPTH: D:2-9
TAGS:  temple_overflow_2 temple_overflow_fedhas temple_overflow_kikubaaqudgha
TAGS:  transparent
KFEAT: A = altar_fedhas
KFEAT: B = altar_kikubaaqudgha
MONS:  plant / nothing
MONS:  plant col:lightgrey name:withered n_adj tile:mons_withered_plant / \
       nothing
MAP
xxxxx
x111xx@@
x1A111..xxx
x11.....22xxxx
xxxx11.....22x
   xxx..222B2x
      @@xx222x
         xxxxx
ENDMAP

NAME:   grunt_temple_overflow_holy_war
DEPTH:  D:2-9
TAGS:   temple_overflow_2 temple_overflow_the_shining_one
TAGS:   temple_overflow_yredelemnul transparent
MONS:   angel, profane servitor
FTILE:  A+_Kn1 = floor_limestone
FTILE:  B-;LN2 = floor_crypt
TILE:   c = wall_church
TILE:   C = wall_catacombs
KFEAT:  A = altar_the_shining_one
KFEAT:  B = altar_yredelemnul
KFEAT:  C = stone_wall
KFEAT:  KL = floor
KFEAT:  - = closed_door
KFEAT:  N = clear_stone_wall
KPROP:  12 = no_rtele_into
KMASK:  12 = opaque
COLOUR: c = white
COLOUR: C = magenta
MARKER: K = lua:fog_machine {cloud_type = "blessed fire", \
                             pow_min = 10, pow_max = 10, delay = 10, \
                             size = 1, walk_dist = 0, spread_rate = 0, \
                             excl_rad = 0 }
MARKER: L = lua:fog_machine {cloud_type = "foul pestilence", \
                             pow_min = 10, pow_max = 10, delay = 10, \
                             size = 1, walk_dist = 0, spread_rate = 0, \
                             excl_rad = 0 }
MAP
xxxxxxxxxxxx@xxxxxxxxxxxx
xcccccccccc...CCCCCCCCCCx
xcnnK_K_K_c...C;L;L;LNNCx
xc1n_A____+...-;;;;B;N2Cx
xcnnK_K_K_c...C;L;L;LNNCx
xcccccccccc...CCCCCCCCCCx
xxxxxxxxxxxx@xxxxxxxxxxxx
ENDMAP

NAME:  grunt_temple_overflow_lords_of_destruction
TAGS:  temple_overflow_2 temple_overflow_makhleb temple_overflow_vehumet
DEPTH: D:3-9
KFEAT: A = altar_makhleb
KFEAT: B = altar_vehumet
MONS:  crimson imp ; wand of magic darts charges:1 | \
                     wand of flame charges:1 | \
                     wand of frost charges:1
MAP
 xxxxx
xxA.Bxx
x..1..x
xx...xx
 xx.xx
  x+x
ENDMAP

NAME:  grunt_temple_overflow_order_and_chaos_1
DEPTH: D:2-9
TAGS:  temple_overflow_2 temple_overflow_xom temple_overflow_zin transparent
KPROP: _1 = no_rtele_into
KMASK: _1 = opaque
KMASK: _1 = no_trap_gen
KFEAT: A = altar_xom
KFEAT: B = altar_zin
FTILE: n_1 = floor_limestone
MONS:  angel god:zin dbname:zin_angel perm_ench:confusion generate_awake / \
       angel god:zin dbname:zin_angel perm_ench:mute generate_awake w:1 / \
       angel god:zin dbname:zin_angel perm_ench:mad generate_awake w:1 / \
       angel god:zin dbname:zin_angel perm_ench:dumb generate_awake w:1
MAP
 .......
....A....
..nnnnn..
..n___n..
@.n_1_n.@
..n___n..
..nnnnn..
....B....
 .......
ENDMAP

NAME:   grunt_temple_overflow_order_and_chaos_2
DEPTH:  D:2-9
TAGS:   temple_overflow_2 temple_overflow_makhleb temple_overflow_zin
TAGS:   transparent
KFEAT:  A = altar_makhleb
KFEAT:  B = altar_zin
MONS:   executioner / balrug / green death / cacodemon / blizzard demon
MONS:   angel god:zin dbname:zin_angel
SUBST:  ; = -_
KPROP:  - = bloody / nothing
KPROP:  12 = no_rtele_into
KMASK:  12 = opaque
SUBST:  - = _L
KFEAT:  L_ = floor
KFEAT:  C = stone_wall
KFEAT:  N = clear_stone_wall
SUBST:  X = CL
FTILE:  _BN2 = floor_limestone
TILE:   C = wall_church
COLOUR: C = white
MAP
    x.@.x
  xxx...xxx
xxxXXX+CCCxxx
xccc--;__CCCx
xc1nA-;_BN2Cx
xccc--;__CCCx
xxxXXX+CCCxxx
  xxx...xxx
    x.@.x
ENDMAP

# If the berserker scares you, use the escape hatch.
NAME:  grunt_temple_overflow_bloody_war
TAGS:  temple_overflow_2 temple_overflow_okawaru temple_overflow_trog
TAGS:  patrolling
DEPTH: D:3-9
KFEAT: A = altar_okawaru
KFEAT: B = altar_trog
KPROP: . = bloody / nothing
# The guard is generate_awake because the potion fails to generate if the
# monster is asleep at the time it's generated (can't berserk when asleep).
: if you.absdepth() < 8 then
MONS: gnoll generate_awake ; club | spear | nothing . potion of berserk rage / \
      orc generate_awake ; club | hand axe | short sword . \
                           leather armour | nothing . potion of berserk rage
: else
MONS: orc warrior generate_awake ; club | hand axe | short sword . \
                                   leather armour | ring mail . \
                                   potion of berserk rage
: end
MAP
xxxxx
xA.Bx
x.1.x
x...x
x...x
x...x
xx+xx
 .@<
ENDMAP

NAME:    grunt_temple_overflow_magic_moments
DEPTH:   D:2-9
TAGS:    temple_overflow_3 temple_overflow_kikubaaqudgha
TAGS:    temple_overflow_sif_muna temple_overflow_vehumet
KFEAT:   A = altar_kikubaaqudgha
KFEAT:   B = altar_sif_muna
KFEAT:   C = altar_vehumet
ITEM:    randbook owner:Kikubaaqudgha disc:necromancy spells:pain \
         numspells:1 / \
         randbook owner:Kikubaaqudgha disc:necromancy spells:animate_skeleton \
         numspells:1
ITEM:    randbook owner:Sif_Muna numspells:1 slevels:1
ITEM:    randbook owner:Vehumet disc:conjuration spells:magic_dart numspells:1
SHUFFLE: Ad / Be / Cf
MAP
     xxxxx
    xx.B.xx
  xxxG.e.Gxxx
 xxGxx...xxGxx
 x...xx+xx...x
 xAd.+...+.fCx
 x...x.U.x...x
 xxGxx...xxGxx
  xxx  @  xxx
ENDMAP

# This doesn't place multiple gods, but it can place one of two distinct
# gods.
NAME:  lightli_temple_of_fire
TAGS:  temple_overflow_1 temple_overflow_trog temple_overflow_makhleb
DEPTH: D:2-9
KPROP: Y = no_rtele_into
{{
  local params = dgn.map_parameters()
  if params ~= nil then
    local tag = unpack(params)
    if tag ~= nil then
      if string.find(tag, "trog") ~= nil then
        kfeat('_ = altar_trog')
      elseif string.find(tag, "makhleb") ~= nil then
        kfeat('_ = altar_makhleb')
      else
        kfeat('_ = altar_trog / altar_makhleb')
      end
    else
      kfeat('_ = altar_trog / altar_makhleb')
    end
  else
    kfeat('_ = altar_trog / altar_makhleb')
  end
}}
MAP
llcccccc
lccYcYccc
lclllllcc
lcl...lcc
lcl...lYc
@+.._.lcc
lcl...lYc
lcl...lcc
lclllllcc
lccYcYccc
llcccccc
ENDMAP

NAME:    grunt_temple_overflow_opulence
DEPTH:   D:2-9
TAGS:    temple_overflow_2 temple_overflow_gozag temple_overflow_nemelex_xobeh
TAGS:    transparent
SHUFFLE: GU, _O
KFEAT:   _ = altar_gozag
KFEAT:   O = altar_nemelex_xobeh
TILE:    G = dngn_golden_statue
FTILE:   ._GOU+ = floor_limestone
RTILE:   x = wall_sandstone
COLOUR:  xG = yellow
: set_feature_name("granite_statue", "golden statue")
MAP
  xxxxxxx
 xx.....xx
xx...U...xx
x.........x
x.G._.O.G.x
x.........x
xx...U...xx
 xx.....xx
  xxx+xxx
ENDMAP

NAME:   grunt_temple_overflow_gold_and_silver
DEPTH:  D:2-9
TAGS:   temple_overflow_2 temple_overflow_gozag temple_overflow_zin
TAGS:   transparent
KITEM:  $ = gold q:1 / gold q:2
KFEAT:  _ = altar_gozag
KFEAT:  O = altar_zin
TILE:   G = dngn_golden_statue
COLOUR: G = yellow
TILE:   v = dngn_metal_wall_white
COLOUR: v = white
FTILE:  +._O$ = floor_limestone
: set_feature_name("granite_statue", "golden statue")
: set_feature_name("metal_wall", "silver wall")
MAP
vvvvvvvvv
v..$$$..v
v._.$.O.v
v.......v
vv.....vv
 vvv+vvv
ENDMAP

NAME:   grunt_temple_overflow_forces_of_nature
DEPTH:  D:2-9
TAGS:   temple_overflow_2 temple_overflow_fedhas temple_overflow_qazlal
TAGS:   transparent
MONS:   fungus / plant / bush
SUBST:  2 = 1.
KFEAT:  _ = altar_fedhas
KFEAT:  O = altar_qazlal
KPROP:  12Ll = no_rtele_into
SUBST:  L = ll^.
SUBST:  l = cll.
KFEAT:  ^ = known shaft trap
MAP
 222.@.LLL
21112.LlllL
21_.....OlL
21112.LlllL
 222.@.LLL
ENDMAP

### Variable overflow altars ##################################################

# To make an overflow temple for N altars, give it the tag
# "temple_overflow_generic_N".

# The boring standard.
# B places the altar to a guaranteed god.
NAME:   overflow_temple_1_default
TAGS:   temple_overflow_generic_1 allow_dup transparent
MAP
B
ENDMAP

# General overflow vault, can be used for all gods.
NAME:     general_overflow_altar
DEPTH:    D:2-
WEIGHT:   10
TAGS:     no_monster_gen no_pool_fixup temple_overflow_generic_1
TAGS:     transparent
SHUFFLE:  xXY / xXY / xXY / abc
SHUFFLE:  XY
SUBST:    X=+, Y=x, a=w, b=w, c=w
SHUFFLE:  ABCD
SUBST:    A=>, C=.GTU, D=.
SHUFFLE:  wll
: interest_check(_G)
MAP
........
.xXYYxx.
.xwwwwx.
.xwABwx.
.xwCDwx.
.xwwwwx.
.xxxxxx.
........
ENDMAP

NAME:    old_standard_altar
DEPTH:   D, Depths
TAGS:    transparent allow_dup decor temple_overflow_generic_1
SHUFFLE: cvxxxx
: altar_check(_G)
MAP
...........
.xxxx.xxxx.
.xx.....xx.
.x.......x.
.x.......x.
.....C.....
.x.......x.
.x.......x.
.xx.....xx.
.xxxx.xxxx.
...........
ENDMAP

NAME:    lemuel_round_altar
DEPTH:   D, Depths
TAGS:    allow_dup transparent decor temple_overflow_generic_1
SUBST:   X:x@
SHUFFLE: cvxx
: altar_check(_G)
MAP
   xxXxx
  xx...xx
 xx.....xx
 x.......x
 X...C...@
 x.......x
 xx.....xx
  xx...xx
   xxXxx
ENDMAP

NAME:  lemuel_crystal_altar
DEPTH: D, Depths
TAGS:  transparent allow_dup decor temple_overflow_generic_1
: altar_check(_G)
MAP
b@b
@C@
b@b
ENDMAP

NAME:    lemuel_doored_altar
TAGS:    transparent decor temple_overflow_generic_1
DEPTH:   D:1-, Vaults, Lair, Elf, Crypt
SHUFFLE: XY
SUBST:   X = .
SUBST:   Y = +
: altar_check(_G)
MAP
.........
.xxxmxxx.
.xxxmxxx.
.xxxmxxx.
.X.YCY.X.
.xxxYxxx.
.xxx.xxx.
.xxxXxxx.
.........
ENDMAP

NAME:   lemuel_coloured_pillars_altar
TAGS:   no_rotate decor temple_overflow_generic_1
DEPTH:  D:2-, Vaults, Elf
COLOUR: c = blue / yellow / red / cyan
: altar_check(_G)
MAP
xxxxxxxxxxxxxxxxxxxx
...................x
c...c...c...c...c..x
@.................Cx
c...c...c...c...c..x
...................x
xxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   amethyst_overflow_temple_binary
TAGS:   temple_overflow_generic_2
SUBST:  p : .:15 c:10 g:3 n:2
SUBST:  G : G:20 T:10 U:1 .:1
SUBST:  g : t:10 T:10 .:5 w:5 U:1 l:1
SUBST:  c : c:20 x:5 v:1 b:1
SUBST:  + : +:10 .:10 A:5
KMASK:  TUw = no_monster_gen
MAP
  ccc     ccc
 ccGcccccccGcc
cc...ccgcc...cc
cB.p..+.+..p.Bc
cc...cc.cc...cc
 ccGccg.gccGcc
  ccccc+ccccc
       @
ENDMAP

NAME:   gammafunk_temple_overflow_statue
TAGS:   temple_overflow_generic_2
SUBST:  g : t:10 T:10 .:5 w:5 l:5 U:1
KMASK:  wlTU = no_monster_gen
MAP
  ccc
cccGccc
c.B.B.c
cc...cc
ccg.gcc
 cc+cc
   @
ENDMAP

NAME:   gammafunk_temple_overflow_pools
TAGS:   temple_overflow_generic_2
SUBST:  G : G:20 T:10 U:1 .:1
KMASK:  TU = no_monster_gen
MAP
 ccccc ccccc
cc.B.ccc.B.cc
c.....G.....c
c..T.....T..c
cc.........cc
 ccc.....ccc
   ccc+ccc
      @
ENDMAP

NAME:    gammafunk_temple_overflow_elements
TAGS:    temple_overflow_generic_2
SHUFFLE: lw
KMASK:   lw = no_monster_gen
MAP
 ccccccc
ccB...Bcc
cclc+cwcc
 ccc@ccc
ENDMAP

NAME:    gammafunk_temple_overflow_wave
TAGS:    temple_overflow_generic_2
SUBST:   p = G:20 c:20 1 w:5 l:5
MONS:    plant / bush
KMASK:   Twl = no_monster_gen
MAP
   ccccc
 cccpcc
ccTB.+@
ccTB.+@
 cccpcc
   ccccc
ENDMAP

NAME: minmay_overflow_temple_star_quad
TAGS: temple_overflow_generic_3
MAP
           c
           c
          ccc
          cBc
         cc.cc
         c...c
        cc...cc
        c.....c
      ccc.....ccc
    ccc....G....ccc
  ccc......c......ccc
cccB.....GcccG.....Bccc
  ccc......c......ccc
    ccc....G....ccc
      ccc.....ccc
        c.....c
        cc...cc
         c...c
         cc.cc
          c.c
          c+c
           @
ENDMAP

NAME:   gammafunk_temple_overflow_forgotten
TAGS:   temple_overflow_generic_3
SUBST:  p = x:50 . 1, T = V:30 T, + = +:20 .
NSUBST: _ = 3:1 / *:_
MONS:   plant / bush
KMASK:  T = no_monster_gen
TILE:   x = wall_brick_brown_vines
FTILE:  _+T12B = floor_pebble_yellow
MAP
 ppppppp
pxB_B_Bxp
p_______p
p___T___p
px_____xp
 xxx+xxx
    @
ENDMAP

NAME:   grunt_temple_overflow_diamond
TAGS:   temple_overflow_generic_3
SUBST:  T = T G V:1 U:1 t:1
MAP
      c
     ccc
    ccBcc
   cc...cc
  cccc+cccc
 cc.c...c.cc
ccB.+.T.+.Bcc
 cc.c...c.cc
  cccc+cccc
   cc...cc
    cc.cc
     c.c
      @
ENDMAP

NAME:   gammafunk_temple_overflow_claw
TAGS:   temple_overflow_generic_3
SUBST:  l : lw
KMASK:  lw = no_monster_gen
MAP
  ...........
 ..cc..c..cc..
..cc..ccc..cc..
.ccc..ccc..ccc.
.ccc.ccccc.ccc.
.ccccccGcccccc.
.ccGB..B..BGcc.
..ccl.....lcc..
..ccll...llcc..
 ..ccll.llcc..
  ..ccl.lcc..
   ..cc+cc..
    ...@...
ENDMAP

NAME:   grunt_temple_overflow_cloverleaf
TAGS:   temple_overflow_generic_4 transparent
SUBST:  T : T U:1 V:1
MAP
 ccccc.@.ccccc
cc...cc.cc...cc
c.G.G.c.c.G.G.c
c..B..c.c..B..c
c.G...c.c...G.c
cc...+c.c+...cc
.ccccc...ccccc.
@......T......@
.ccccc...ccccc.
cc...+c.c+...cc
c.G...c.c...G.c
c..B..c.c..B..c
c.G.G.c.c.G.G.c
cc...cc.cc...cc
 ccccc.@.ccccc
ENDMAP

NAME: nicolae_overflow_quartered_altars
TAGS: temple_overflow_generic_4
SHUFFLE: fgh/ijk, pq/rs
SUBST: pqi = ., rk = c, s = +, z : cm, j : GTt
CLEAR: fgh
MAP
  ffghgff
 @.ccccc.@
f.qp.c.pq.f
fcp..z..pcf
gc..BcB..cg
hcczccczcch
gc..BcB..cg
fcp..z..pcf
f.qp.c.pq.f
 @.ccccc.@
  ffghgff
ENDMAP

NAME:   minmay_overflow_temple_star_hex
TAGS:   temple_overflow_generic_5
KMASK:  T = no_monster_gen
MAP
          ccc
         ccBcc
        cc...cc
       cc.....cc
cccccccc...G...cccccccc
cB...................Bc
ccc......G...G......ccc
  ccc.............ccc
    ccc....T....ccc
  ccc.............ccc
ccc......G...G......ccc
cB...................Bc
cccccccc...G...cccccccc
       cc.....cc
        cc...cc
         cc.cc
          c+c
          ...
          .@.
ENDMAP

NAME:   minmay_overflow_temple_hex
TAGS:   temple_overflow_generic_6
MAP
   cccccccccc
   cB......Bc
  cc........cc
  c...c..c...c
 cc..........cc
 c...c....c...c
cc............cc
cB..c......c..Bc
cc............cc
 c...c....c...c
 cc..........cc
  c...c..c...c
  cc........cc
   cB......Bc
   cccc++cccc
      ....
      ....
      .@@.
ENDMAP

NAME:  grunt_temple_overflow_octagram
TAGS:  temple_overflow_generic_7
SUBST: T : T G t V:1
MAP
          c
         ccc
        ccBcc
   cccccc...cccccc
   cB..ccc+ccc..Bc
   c..cc.....cc..c
   c.c+.......+c.c
   ccc....T....ccc
  ccc...T...T...ccc
 cc.c...........c.cc
ccB.+..T..T..T..+.Bcc
 cc.c...........c.cc
  ccc...T...T...ccc
   ccc....T....ccc
   c.c+.......+c.c
   c..cc.....cc..c
   cB..ccc+ccc..Bc
   cccccc...cccccc
        cc.cc
         c.c
          @
ENDMAP

NAME:    grunt_temple_overflow_open
TAGS:    temple_overflow_generic_8 temple_overflow_generic_7
TAGS:    temple_overflow_generic_6 temple_overflow_generic_5
TAGS:    temple_overflow_generic_4 temple_overflow_generic_3
TAGS:    temple_overflow_generic_2
TAGS:    transparent
SHUFFLE: defghijk / efghijkd
{{
  local altarcount = 1
  if is_validating() then
    altarcount = 8
  else
    altarcount = get_overflow_altar_count(_G)
  end
  if altarcount == "1" then
    subst("d = B")
    subst("efghijk = .")
  elseif altarcount == "2" then
    subst("dh = B")
    subst("efgijk = .")
  elseif altarcount == "3" then
    subst("dgi = B")
    subst("efhjk = .")
  elseif altarcount == "4" then
    subst("dfhj = B")
    subst("egik = .")
  elseif altarcount == "5" then
    subst("dfgij = B")
    subst("ehk = .")
  elseif altarcount == "6" then
    subst("defhij = B")
    subst("gk = .")
  elseif altarcount == "7" then
    subst("defghij = B")
    subst("k = .")
  else
    subst("defghijk = B")
  end
}}
SUBST: G = G T V:1 U:1 t:1
MAP
   ...
 ...d...
 .k...e.
.........
.j..G..f.
.........
 .i...g.
 ...h...
   ...
ENDMAP

# Formerly minivault_3; resurrected after being removed way back in late 2009.
NAME:  minitemple
TAGS:  temple_overflow_generic_14 temple_overflow_generic_13
TAGS:  temple_overflow_generic_12 temple_overflow_generic_11
TAGS:  temple_overflow_generic_10 temple_overflow_generic_9
TAGS:  temple_overflow_generic_8 temple_overflow_generic_7
TAGS:  temple_overflow_generic_6 temple_overflow_generic_5
TAGS:  temple_overflow_generic_4 temple_overflow_generic_3
TAGS:  temple_overflow_generic_2
# The original vault had allow_dup; I think that's overkill.
{{
  local altarcount = 1
  if is_validating() then
    altarcount = 14
  else
    altarcount = get_overflow_altar_count(_G)
  end
  nsubst("B : " .. altarcount .. ":B / *:x")
}}
SUBST: x = .:50 c:50 G T t:1 V:1 U:1
MAP
cccccccccccc
cBcBcBcBcBcc
G.c.c.c.c.Bc
@.........Bc
@.........Bc
G.c.c.c.c.Bc
cBcBcBcBcBcc
cccccccccccc
ENDMAP

NAME: nicolae_overflow_hidden_temple
TAGS: temple_overflow_generic_5 temple_overflow_generic_4 temple_overflow_generic_3 \
      temple_overflow_generic_2 temple_overflow_generic_1 no_monster_gen
{{
  local altarcount = 1
  if is_validating() then
    altarcount = 5
  else
    altarcount = get_overflow_altar_count(_G)
  end
  if altarcount == "1" then
    subst("c = B")
    subst("abde = G")
  elseif altarcount == "2" then
    subst("bd = B")
    subst("ace = G")
  elseif altarcount == "3" then
    shuffle("ae/bd")
    subst("cbd = B")
    subst("ae = G")
  elseif altarcount == "4" then
    subst("abde = B")
    subst("c = G")
  else
    subst("abcde = B")
  end
}}
SUBST: } = })]
MAP
 xxxxxxxxxxxxx
 xxxxaxxxbxxxx
 xxG...G...Gxx
 nn.........nn
@n}.........cn@
 nn.........nn
 xxG...G...Gxx
 xxxxexxxdxxxx
 xxxxxxxxxxxxx
ENDMAP